diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5233eb2e0a2d..da72f2a27789 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3855,7 +3855,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.0.0-dev.20230223 + typescript: 5.0.0-dev.20230224 dev: false /downlevel-dts/0.7.0: @@ -8604,8 +8604,8 @@ packages: hasBin: true dev: false - /typescript/5.0.0-dev.20230223: - resolution: {integrity: sha512-dUsdRdWs5mX+5uhIGuE1IEkfTzM5vY9qfVxIbRB3vxVINGEI8mS9/f3gs5xenafNblfMX8wUVvQ7y2x6Syk0tA==} + /typescript/5.0.0-dev.20230224: + resolution: {integrity: sha512-ntlbPkFF0PM1+lmvLenUGwo+3EJPq5QAvAsw+6HA6KTOHpF3IcmYE57rcgpL54NLXhqz84RNTtcmb4dttBuBsA==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -14614,15 +14614,15 @@ packages: dev: false file:projects/arm-sql.tgz: - resolution: {integrity: sha512-UxZlI+CpMOr4L9p5GKxXlxcsUwOvFSUVT6Jscm97Z2szOxwhnxN9Kr8p11XKyPp04jk0sRn089mtVK9ZKJRLHw==, tarball: file:projects/arm-sql.tgz} + resolution: {integrity: sha512-/PoCawld5CiNcBg75w8NfOYN1QjqbugJSbt1efrMpAPMV02V9lUSPCGJapZK4f3k2Xa6454NjaVQrBvJ94MKFg==, tarball: file:projects/arm-sql.tgz} name: '@rush-temp/arm-sql' version: 0.0.0 dependencies: '@azure/identity': 2.1.0 '@microsoft/api-extractor': 7.33.7 - '@rollup/plugin-commonjs': 24.0.1_rollup@2.79.1 - '@rollup/plugin-json': 6.0.0_rollup@2.79.1 - '@rollup/plugin-multi-entry': 6.0.0_rollup@2.79.1 + '@rollup/plugin-commonjs': 21.1.0_rollup@2.79.1 + '@rollup/plugin-json': 4.1.0_rollup@2.79.1 + '@rollup/plugin-multi-entry': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@types/chai': 4.3.4 '@types/node': 14.18.36 diff --git a/sdk/sql/arm-sql/CHANGELOG.md b/sdk/sql/arm-sql/CHANGELOG.md index 9500618f48cc..92f98429d450 100644 --- a/sdk/sql/arm-sql/CHANGELOG.md +++ b/sdk/sql/arm-sql/CHANGELOG.md @@ -1,15 +1,589 @@ # Release History + +## 10.0.0-beta.1 (2023-02-24) + +**Features** -## 9.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group DatabaseAdvancedThreatProtectionSettings + - Added operation group DatabaseEncryptionProtectors + - Added operation group DatabaseSqlVulnerabilityAssessmentBaselines + - Added operation group DatabaseSqlVulnerabilityAssessmentExecuteScan + - Added operation group DatabaseSqlVulnerabilityAssessmentRuleBaselines + - Added operation group DatabaseSqlVulnerabilityAssessmentScanResult + - Added operation group DatabaseSqlVulnerabilityAssessmentScans + - Added operation group DatabaseSqlVulnerabilityAssessmentsSettings + - Added operation group DistributedAvailabilityGroups + - Added operation group EndpointCertificates + - Added operation group IPv6FirewallRules + - Added operation group ManagedDatabaseAdvancedThreatProtectionSettings + - Added operation group ManagedDatabaseMoveOperations + - Added operation group ManagedInstanceAdvancedThreatProtectionSettings + - Added operation group ManagedInstanceDtcs + - Added operation group ManagedLedgerDigestUploadsOperations + - Added operation group ManagedServerDnsAliases + - Added operation group ServerAdvancedThreatProtectionSettings + - Added operation group ServerConfigurationOptions + - Added operation group ServerTrustCertificates + - Added operation group SqlVulnerabilityAssessmentBaseline + - Added operation group SqlVulnerabilityAssessmentBaselines + - Added operation group SqlVulnerabilityAssessmentExecuteScan + - Added operation group SqlVulnerabilityAssessmentRuleBaseline + - Added operation group SqlVulnerabilityAssessmentRuleBaselines + - Added operation group SqlVulnerabilityAssessments + - Added operation group SqlVulnerabilityAssessmentScanResult + - Added operation group SqlVulnerabilityAssessmentScans + - Added operation group SqlVulnerabilityAssessmentsSettings + - Added operation group StartStopManagedInstanceSchedules + - Added operation group SynapseLinkWorkspaces + - Added operation GeoBackupPolicies.list + - Added operation ManagedDatabases.beginCancelMove + - Added operation ManagedDatabases.beginCancelMoveAndWait + - Added operation ManagedDatabases.beginCompleteMove + - Added operation ManagedDatabases.beginCompleteMoveAndWait + - Added operation ManagedDatabases.beginStartMove + - Added operation ManagedDatabases.beginStartMoveAndWait + - Added operation ManagedDatabaseSensitivityLabels.listByDatabase + - Added operation ManagedInstanceLongTermRetentionPolicies.beginDelete + - Added operation ManagedInstanceLongTermRetentionPolicies.beginDeleteAndWait + - Added operation ManagedInstances.beginStart + - Added operation ManagedInstances.beginStartAndWait + - Added operation ManagedInstances.beginStop + - Added operation ManagedInstances.beginStopAndWait + - Added operation ManagedInstances.listOutboundNetworkDependenciesByManagedInstance + - Added operation ReplicationLinks.beginDelete + - Added operation ReplicationLinks.beginDeleteAndWait + - Added operation SensitivityLabels.listByDatabase + - Added operation Servers.beginRefreshStatus + - Added operation Servers.beginRefreshStatusAndWait + - Added operation TransparentDataEncryptions.beginCreateOrUpdate + - Added operation TransparentDataEncryptions.beginCreateOrUpdateAndWait + - Added operation VirtualClusters.beginUpdateDnsServers + - Added operation VirtualClusters.beginUpdateDnsServersAndWait + - Added Interface Baseline + - Added Interface BaselineAdjustedResult + - Added Interface BenchmarkReference + - Added Interface DatabaseAdvancedThreatProtection + - Added Interface DatabaseAdvancedThreatProtectionListResult + - Added Interface DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + - Added Interface DatabaseAdvancedThreatProtectionSettingsGetOptionalParams + - Added Interface DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams + - Added Interface DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + - Added Interface DatabaseEncryptionProtectorsRevalidateOptionalParams + - Added Interface DatabaseEncryptionProtectorsRevertOptionalParams + - Added Interface DatabaseKey + - Added Interface DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentBaselineSet + - Added Interface DatabaseSqlVulnerabilityAssessmentBaselineSetListResult + - Added Interface DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaseline + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselineInput + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextOptionalParams + - Added Interface DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams + - Added Interface DataMaskingRulesListByDatabaseNextOptionalParams + - Added Interface DistributedAvailabilityGroup + - Added Interface DistributedAvailabilityGroupsCreateOrUpdateOptionalParams + - Added Interface DistributedAvailabilityGroupsDeleteOptionalParams + - Added Interface DistributedAvailabilityGroupSetRole + - Added Interface DistributedAvailabilityGroupsGetOptionalParams + - Added Interface DistributedAvailabilityGroupsListByInstanceNextOptionalParams + - Added Interface DistributedAvailabilityGroupsListByInstanceOptionalParams + - Added Interface DistributedAvailabilityGroupsListResult + - Added Interface DistributedAvailabilityGroupsSetRoleOptionalParams + - Added Interface DistributedAvailabilityGroupsUpdateOptionalParams + - Added Interface EndpointCertificate + - Added Interface EndpointCertificateListResult + - Added Interface EndpointCertificatesGetOptionalParams + - Added Interface EndpointCertificatesListByInstanceNextOptionalParams + - Added Interface EndpointCertificatesListByInstanceOptionalParams + - Added Interface EndpointDependency + - Added Interface EndpointDetail + - Added Interface GeoBackupPoliciesListNextOptionalParams + - Added Interface GeoBackupPoliciesListOptionalParams + - Added Interface IPv6FirewallRule + - Added Interface IPv6FirewallRuleListResult + - Added Interface IPv6FirewallRulesCreateOrUpdateOptionalParams + - Added Interface IPv6FirewallRulesDeleteOptionalParams + - Added Interface IPv6FirewallRulesGetOptionalParams + - Added Interface IPv6FirewallRulesListByServerNextOptionalParams + - Added Interface IPv6FirewallRulesListByServerOptionalParams + - Added Interface LogicalServerAdvancedThreatProtectionListResult + - Added Interface ManagedDatabaseAdvancedThreatProtection + - Added Interface ManagedDatabaseAdvancedThreatProtectionListResult + - Added Interface ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + - Added Interface ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams + - Added Interface ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams + - Added Interface ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + - Added Interface ManagedDatabaseMoveDefinition + - Added Interface ManagedDatabaseMoveOperationListResult + - Added Interface ManagedDatabaseMoveOperationResult + - Added Interface ManagedDatabaseMoveOperationsGetOptionalParams + - Added Interface ManagedDatabaseMoveOperationsListByLocationNextOptionalParams + - Added Interface ManagedDatabaseMoveOperationsListByLocationOptionalParams + - Added Interface ManagedDatabaseRestoreDetailsBackupSetProperties + - Added Interface ManagedDatabaseRestoreDetailsUnrestorableFileProperties + - Added Interface ManagedDatabasesCancelMoveOptionalParams + - Added Interface ManagedDatabasesCompleteMoveOptionalParams + - Added Interface ManagedDatabaseSensitivityLabelsListByDatabaseNextOptionalParams + - Added Interface ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams + - Added Interface ManagedDatabasesStartMoveOptionalParams + - Added Interface ManagedDatabaseStartMoveDefinition + - Added Interface ManagedInstanceAdvancedThreatProtection + - Added Interface ManagedInstanceAdvancedThreatProtectionListResult + - Added Interface ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + - Added Interface ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams + - Added Interface ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextOptionalParams + - Added Interface ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams + - Added Interface ManagedInstanceDtc + - Added Interface ManagedInstanceDtcListResult + - Added Interface ManagedInstanceDtcsCreateOrUpdateOptionalParams + - Added Interface ManagedInstanceDtcSecuritySettings + - Added Interface ManagedInstanceDtcsGetOptionalParams + - Added Interface ManagedInstanceDtcsListByManagedInstanceNextOptionalParams + - Added Interface ManagedInstanceDtcsListByManagedInstanceOptionalParams + - Added Interface ManagedInstanceDtcTransactionManagerCommunicationSettings + - Added Interface ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams + - Added Interface ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextOptionalParams + - Added Interface ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams + - Added Interface ManagedInstancesStartOptionalParams + - Added Interface ManagedInstancesStopOptionalParams + - Added Interface ManagedLedgerDigestUploads + - Added Interface ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams + - Added Interface ManagedLedgerDigestUploadsDisableOptionalParams + - Added Interface ManagedLedgerDigestUploadsGetOptionalParams + - Added Interface ManagedLedgerDigestUploadsListByDatabaseNextOptionalParams + - Added Interface ManagedLedgerDigestUploadsListByDatabaseOptionalParams + - Added Interface ManagedLedgerDigestUploadsListResult + - Added Interface ManagedServerDnsAlias + - Added Interface ManagedServerDnsAliasAcquisition + - Added Interface ManagedServerDnsAliasCreation + - Added Interface ManagedServerDnsAliasesAcquireOptionalParams + - Added Interface ManagedServerDnsAliasesCreateOrUpdateOptionalParams + - Added Interface ManagedServerDnsAliasesDeleteOptionalParams + - Added Interface ManagedServerDnsAliasesGetOptionalParams + - Added Interface ManagedServerDnsAliasesListByManagedInstanceNextOptionalParams + - Added Interface ManagedServerDnsAliasesListByManagedInstanceOptionalParams + - Added Interface ManagedServerDnsAliasListResult + - Added Interface OutboundEnvironmentEndpoint + - Added Interface OutboundEnvironmentEndpointCollection + - Added Interface PhaseDetails + - Added Interface QueryCheck + - Added Interface RecoverableDatabasesListByServerNextOptionalParams + - Added Interface RefreshExternalGovernanceStatusOperationResult + - Added Interface Remediation + - Added Interface ScheduleItem + - Added Interface SensitivityLabelsListByDatabaseNextOptionalParams + - Added Interface SensitivityLabelsListByDatabaseOptionalParams + - Added Interface ServerAdvancedThreatProtection + - Added Interface ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + - Added Interface ServerAdvancedThreatProtectionSettingsGetOptionalParams + - Added Interface ServerAdvancedThreatProtectionSettingsListByServerNextOptionalParams + - Added Interface ServerAdvancedThreatProtectionSettingsListByServerOptionalParams + - Added Interface ServerConfigurationOption + - Added Interface ServerConfigurationOptionListResult + - Added Interface ServerConfigurationOptionsCreateOrUpdateOptionalParams + - Added Interface ServerConfigurationOptionsGetOptionalParams + - Added Interface ServerConfigurationOptionsListByManagedInstanceNextOptionalParams + - Added Interface ServerConfigurationOptionsListByManagedInstanceOptionalParams + - Added Interface ServersRefreshStatusOptionalParams + - Added Interface ServerTrustCertificate + - Added Interface ServerTrustCertificatesCreateOrUpdateOptionalParams + - Added Interface ServerTrustCertificatesDeleteOptionalParams + - Added Interface ServerTrustCertificatesGetOptionalParams + - Added Interface ServerTrustCertificatesListByInstanceNextOptionalParams + - Added Interface ServerTrustCertificatesListByInstanceOptionalParams + - Added Interface ServerTrustCertificatesListResult + - Added Interface ServerUsagesListByServerNextOptionalParams + - Added Interface SqlVulnerabilityAssessment + - Added Interface SqlVulnerabilityAssessmentBaselineGetOptionalParams + - Added Interface SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextOptionalParams + - Added Interface SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams + - Added Interface SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + - Added Interface SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + - Added Interface SqlVulnerabilityAssessmentListResult + - Added Interface SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams + - Added Interface SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams + - Added Interface SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextOptionalParams + - Added Interface SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams + - Added Interface SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + - Added Interface SqlVulnerabilityAssessmentScanError + - Added Interface SQLVulnerabilityAssessmentScanListResult + - Added Interface SqlVulnerabilityAssessmentScanRecord + - Added Interface SqlVulnerabilityAssessmentScanRecordListResult + - Added Interface SqlVulnerabilityAssessmentScanResultGetOptionalParams + - Added Interface SqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams + - Added Interface SqlVulnerabilityAssessmentScanResultListByScanOptionalParams + - Added Interface SqlVulnerabilityAssessmentScanResults + - Added Interface SqlVulnerabilityAssessmentScansGetOptionalParams + - Added Interface SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams + - Added Interface SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + - Added Interface SqlVulnerabilityAssessmentsDeleteOptionalParams + - Added Interface SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + - Added Interface SqlVulnerabilityAssessmentsSettingsGetOptionalParams + - Added Interface SqlVulnerabilityAssessmentsSettingsListByServerNextOptionalParams + - Added Interface SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams + - Added Interface StartStopManagedInstanceSchedule + - Added Interface StartStopManagedInstanceScheduleListResult + - Added Interface StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams + - Added Interface StartStopManagedInstanceSchedulesDeleteOptionalParams + - Added Interface StartStopManagedInstanceSchedulesGetOptionalParams + - Added Interface StartStopManagedInstanceSchedulesListByInstanceNextOptionalParams + - Added Interface StartStopManagedInstanceSchedulesListByInstanceOptionalParams + - Added Interface SynapseLinkWorkspace + - Added Interface SynapseLinkWorkspaceInfoProperties + - Added Interface SynapseLinkWorkspaceListResult + - Added Interface SynapseLinkWorkspacesListByDatabaseNextOptionalParams + - Added Interface SynapseLinkWorkspacesListByDatabaseOptionalParams + - Added Interface UpdateVirtualClusterDnsServersOperation + - Added Interface UpsertManagedServerOperationStepWithEstimatesAndDuration + - Added Interface VaRule + - Added Type Alias AdvancedThreatProtectionName + - Added Type Alias AdvancedThreatProtectionState + - Added Type Alias AlwaysEncryptedEnclaveType + - Added Type Alias AvailabilityZoneType + - Added Type Alias BaselineName + - Added Type Alias DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse + - Added Type Alias DatabaseAdvancedThreatProtectionSettingsGetResponse + - Added Type Alias DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse + - Added Type Alias DatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse + - Added Type Alias DatabaseKeyType + - Added Type Alias DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentBaselinesGetResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentScanResultGetResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentScanResultListByScanResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentScansGetResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentsSettingsGetResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextResponse + - Added Type Alias DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseResponse + - Added Type Alias DataMaskingPolicyName + - Added Type Alias DataMaskingRulesListByDatabaseNextResponse + - Added Type Alias DevOpsAuditingSettingsName + - Added Type Alias DistributedAvailabilityGroupsCreateOrUpdateResponse + - Added Type Alias DistributedAvailabilityGroupsGetResponse + - Added Type Alias DistributedAvailabilityGroupsListByInstanceNextResponse + - Added Type Alias DistributedAvailabilityGroupsListByInstanceResponse + - Added Type Alias DistributedAvailabilityGroupsSetRoleResponse + - Added Type Alias DistributedAvailabilityGroupsUpdateResponse + - Added Type Alias DNSRefreshOperationStatus + - Added Type Alias DtcName + - Added Type Alias EndpointCertificatesGetResponse + - Added Type Alias EndpointCertificatesListByInstanceNextResponse + - Added Type Alias EndpointCertificatesListByInstanceResponse + - Added Type Alias ExternalGovernanceStatus + - Added Type Alias GeoBackupPoliciesListNextResponse + - Added Type Alias GeoBackupPoliciesListResponse + - Added Type Alias InstanceRole + - Added Type Alias IPv6FirewallRulesCreateOrUpdateResponse + - Added Type Alias IPv6FirewallRulesGetResponse + - Added Type Alias IPv6FirewallRulesListByServerNextResponse + - Added Type Alias IPv6FirewallRulesListByServerResponse + - Added Type Alias ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse + - Added Type Alias ManagedDatabaseAdvancedThreatProtectionSettingsGetResponse + - Added Type Alias ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse + - Added Type Alias ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse + - Added Type Alias ManagedDatabaseMoveOperationsGetResponse + - Added Type Alias ManagedDatabaseMoveOperationsListByLocationNextResponse + - Added Type Alias ManagedDatabaseMoveOperationsListByLocationResponse + - Added Type Alias ManagedDatabaseSensitivityLabelsListByDatabaseNextResponse + - Added Type Alias ManagedDatabaseSensitivityLabelsListByDatabaseResponse + - Added Type Alias ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + - Added Type Alias ManagedInstanceAdvancedThreatProtectionSettingsGetResponse + - Added Type Alias ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextResponse + - Added Type Alias ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceResponse + - Added Type Alias ManagedInstanceDtcsCreateOrUpdateResponse + - Added Type Alias ManagedInstanceDtcsGetResponse + - Added Type Alias ManagedInstanceDtcsListByManagedInstanceNextResponse + - Added Type Alias ManagedInstanceDtcsListByManagedInstanceResponse + - Added Type Alias ManagedInstanceLongTermRetentionPoliciesDeleteResponse + - Added Type Alias ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextResponse + - Added Type Alias ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceResponse + - Added Type Alias ManagedLedgerDigestUploadsCreateOrUpdateResponse + - Added Type Alias ManagedLedgerDigestUploadsDisableResponse + - Added Type Alias ManagedLedgerDigestUploadsGetResponse + - Added Type Alias ManagedLedgerDigestUploadsListByDatabaseNextResponse + - Added Type Alias ManagedLedgerDigestUploadsListByDatabaseResponse + - Added Type Alias ManagedLedgerDigestUploadsName + - Added Type Alias ManagedLedgerDigestUploadsState + - Added Type Alias ManagedServerDnsAliasesAcquireResponse + - Added Type Alias ManagedServerDnsAliasesCreateOrUpdateResponse + - Added Type Alias ManagedServerDnsAliasesGetResponse + - Added Type Alias ManagedServerDnsAliasesListByManagedInstanceNextResponse + - Added Type Alias ManagedServerDnsAliasesListByManagedInstanceResponse + - Added Type Alias MoveOperationMode + - Added Type Alias Phase + - Added Type Alias RecoverableDatabasesListByServerNextResponse + - Added Type Alias ReplicationLinksFailoverAllowDataLossResponse + - Added Type Alias ReplicationLinksFailoverResponse + - Added Type Alias ReplicationMode + - Added Type Alias RoleChangeType + - Added Type Alias RuleSeverity + - Added Type Alias RuleStatus + - Added Type Alias RuleType + - Added Type Alias SecondaryInstanceType + - Added Type Alias SecurityAlertPolicyNameAutoGenerated + - Added Type Alias SensitivityLabelsListByDatabaseNextResponse + - Added Type Alias SensitivityLabelsListByDatabaseResponse + - Added Type Alias ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse + - Added Type Alias ServerAdvancedThreatProtectionSettingsGetResponse + - Added Type Alias ServerAdvancedThreatProtectionSettingsListByServerNextResponse + - Added Type Alias ServerAdvancedThreatProtectionSettingsListByServerResponse + - Added Type Alias ServerConfigurationOptionName + - Added Type Alias ServerConfigurationOptionsCreateOrUpdateResponse + - Added Type Alias ServerConfigurationOptionsGetResponse + - Added Type Alias ServerConfigurationOptionsListByManagedInstanceNextResponse + - Added Type Alias ServerConfigurationOptionsListByManagedInstanceResponse + - Added Type Alias ServerPublicNetworkAccessFlag + - Added Type Alias ServersRefreshStatusResponse + - Added Type Alias ServerTrustCertificatesCreateOrUpdateResponse + - Added Type Alias ServerTrustCertificatesGetResponse + - Added Type Alias ServerTrustCertificatesListByInstanceNextResponse + - Added Type Alias ServerTrustCertificatesListByInstanceResponse + - Added Type Alias ServerUsagesListByServerNextResponse + - Added Type Alias SqlVulnerabilityAssessmentBaselineGetResponse + - Added Type Alias SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextResponse + - Added Type Alias SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentResponse + - Added Type Alias SqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse + - Added Type Alias SQLVulnerabilityAssessmentName + - Added Type Alias SqlVulnerabilityAssessmentName + - Added Type Alias SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateResponse + - Added Type Alias SqlVulnerabilityAssessmentRuleBaselineGetResponse + - Added Type Alias SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextResponse + - Added Type Alias SqlVulnerabilityAssessmentRuleBaselineListByBaselineResponse + - Added Type Alias SqlVulnerabilityAssessmentScanResultGetResponse + - Added Type Alias SqlVulnerabilityAssessmentScanResultListByScanNextResponse + - Added Type Alias SqlVulnerabilityAssessmentScanResultListByScanResponse + - Added Type Alias SqlVulnerabilityAssessmentScansGetResponse + - Added Type Alias SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse + - Added Type Alias SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse + - Added Type Alias SqlVulnerabilityAssessmentsSettingsCreateOrUpdateResponse + - Added Type Alias SqlVulnerabilityAssessmentsSettingsGetResponse + - Added Type Alias SqlVulnerabilityAssessmentsSettingsListByServerNextResponse + - Added Type Alias SqlVulnerabilityAssessmentsSettingsListByServerResponse + - Added Type Alias SqlVulnerabilityAssessmentState + - Added Type Alias StartStopManagedInstanceSchedulesCreateOrUpdateResponse + - Added Type Alias StartStopManagedInstanceSchedulesGetResponse + - Added Type Alias StartStopManagedInstanceSchedulesListByInstanceNextResponse + - Added Type Alias StartStopManagedInstanceSchedulesListByInstanceResponse + - Added Type Alias StartStopScheduleName + - Added Type Alias Status + - Added Type Alias SynapseLinkWorkspacesListByDatabaseNextResponse + - Added Type Alias SynapseLinkWorkspacesListByDatabaseResponse + - Added Type Alias SyncGroupsType + - Interface Database has a new optional parameter availabilityZone + - Interface Database has a new optional parameter encryptionProtector + - Interface Database has a new optional parameter keys + - Interface Database has a new optional parameter manualCutover + - Interface Database has a new optional parameter performCutover + - Interface Database has a new optional parameter preferredEnclaveType + - Interface Database has a new optional parameter sourceResourceId + - Interface DatabaseBlobAuditingPolicy has a new optional parameter isManagedIdentityInUse + - Interface DatabaseExtensions has a new optional parameter administratorLogin + - Interface DatabaseExtensions has a new optional parameter administratorLoginPassword + - Interface DatabaseExtensions has a new optional parameter authenticationType + - Interface DatabaseExtensions has a new optional parameter databaseEdition + - Interface DatabaseExtensions has a new optional parameter maxSizeBytes + - Interface DatabaseExtensions has a new optional parameter networkIsolation + - Interface DatabaseExtensions has a new optional parameter serviceObjectiveName + - Interface DatabaseOperation has a new optional parameter operationPhaseDetails + - Interface DatabasesGetOptionalParams has a new optional parameter expand + - Interface DatabasesGetOptionalParams has a new optional parameter filter + - Interface DatabaseUpdate has a new optional parameter encryptionProtector + - Interface DatabaseUpdate has a new optional parameter keys + - Interface DatabaseUpdate has a new optional parameter manualCutover + - Interface DatabaseUpdate has a new optional parameter performCutover + - Interface DatabaseUpdate has a new optional parameter preferredEnclaveType + - Interface DataMaskingRuleListResult has a new optional parameter nextLink + - Interface EditionCapability has a new optional parameter zonePinning + - Interface ElasticPool has a new optional parameter availabilityZone + - Interface ElasticPool has a new optional parameter highAvailabilityReplicaCount + - Interface ElasticPool has a new optional parameter minCapacity + - Interface ElasticPool has a new optional parameter preferredEnclaveType + - Interface ElasticPoolEditionCapability has a new optional parameter zonePinning + - Interface ElasticPoolUpdate has a new optional parameter availabilityZone + - Interface ElasticPoolUpdate has a new optional parameter highAvailabilityReplicaCount + - Interface ElasticPoolUpdate has a new optional parameter minCapacity + - Interface ElasticPoolUpdate has a new optional parameter preferredEnclaveType + - Interface ExtendedDatabaseBlobAuditingPolicy has a new optional parameter isManagedIdentityInUse + - Interface ExtendedServerBlobAuditingPolicy has a new optional parameter isManagedIdentityInUse + - Interface GeoBackupPolicyListResult has a new optional parameter nextLink + - Interface ImportExportExtensionsOperationResult has a new optional parameter blobUri + - Interface ImportExportExtensionsOperationResult has a new optional parameter privateEndpointConnections + - Interface ImportExportExtensionsOperationResult has a new optional parameter queuedTime + - Interface InstanceFailoverGroup has a new optional parameter secondaryType + - Interface ManagedDatabase has a new optional parameter crossSubscriptionRestorableDroppedDatabaseId + - Interface ManagedDatabase has a new optional parameter crossSubscriptionSourceDatabaseId + - Interface ManagedDatabase has a new optional parameter crossSubscriptionTargetManagedInstanceId + - Interface ManagedDatabase has a new optional parameter isLedgerOn + - Interface ManagedDatabase has a new optional parameter storageContainerIdentity + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter currentBackupType + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter currentRestoredSizeMB + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter currentRestorePlanSizeMB + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter diffBackupSets + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter fullBackupSets + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter logBackupSets + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter numberOfFilesQueued + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter numberOfFilesRestored + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter numberOfFilesRestoring + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter numberOfFilesSkipped + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter numberOfFilesUnrestorable + - Interface ManagedDatabaseRestoreDetailsResult has a new optional parameter typePropertiesType + - Interface ManagedDatabaseUpdate has a new optional parameter crossSubscriptionRestorableDroppedDatabaseId + - Interface ManagedDatabaseUpdate has a new optional parameter crossSubscriptionSourceDatabaseId + - Interface ManagedDatabaseUpdate has a new optional parameter crossSubscriptionTargetManagedInstanceId + - Interface ManagedDatabaseUpdate has a new optional parameter isLedgerOn + - Interface ManagedDatabaseUpdate has a new optional parameter storageContainerIdentity + - Interface ManagedInstancePrivateLinkProperties has a new optional parameter requiredZoneNames + - Interface PrivateEndpointConnection has a new optional parameter groupIds + - Interface PrivateEndpointConnectionProperties has a new optional parameter groupIds + - Interface RecoverableDatabase has a new optional parameter keys + - Interface RecoverableDatabaseListResult has a new optional parameter nextLink + - Interface RecoverableDatabasesGetOptionalParams has a new optional parameter expand + - Interface RecoverableDatabasesGetOptionalParams has a new optional parameter filter + - Interface ReplicationLink has a new optional parameter partnerDatabaseId + - Interface ReplicationLinksDeleteOptionalParams has a new optional parameter resumeFrom + - Interface ReplicationLinksDeleteOptionalParams has a new optional parameter updateIntervalInMs + - Interface RestorableDroppedDatabase has a new optional parameter keys + - Interface RestorableDroppedDatabasesGetOptionalParams has a new optional parameter expand + - Interface RestorableDroppedDatabasesGetOptionalParams has a new optional parameter filter + - Interface Server has a new optional parameter externalGovernanceStatus + - Interface ServerBlobAuditingPolicy has a new optional parameter isManagedIdentityInUse + - Interface ServerDevOpsAuditingSettings has a new optional parameter isManagedIdentityInUse + - Interface ServerUpdate has a new optional parameter externalGovernanceStatus + - Interface ServerUsageListResult has a new optional parameter nextLink + - Interface ServiceObjectiveCapability has a new optional parameter zonePinning + - Interface SqlManagementClientOptionalParams has a new optional parameter apiVersion + - Interface TransparentDataEncryptionsCreateOrUpdateOptionalParams has a new optional parameter resumeFrom + - Interface TransparentDataEncryptionsCreateOrUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Interface VirtualCluster has a new optional parameter version + - Interface VirtualClustersUpdateDnsServersOptionalParams has a new optional parameter resumeFrom + - Interface VirtualClustersUpdateDnsServersOptionalParams has a new optional parameter updateIntervalInMs + - Interface VirtualClusterUpdate has a new optional parameter version + - Added Enum KnownAdvancedThreatProtectionName + - Added Enum KnownAlwaysEncryptedEnclaveType + - Added Enum KnownAvailabilityZoneType + - Added Enum KnownBaselineName + - Added Enum KnownDatabaseKeyType + - Added Enum KnownDataMaskingPolicyName + - Added Enum KnownDevOpsAuditingSettingsName + - Added Enum KnownDNSRefreshOperationStatus + - Added Enum KnownDtcName + - Added Enum KnownExternalGovernanceStatus + - Added Enum KnownInstanceRole + - Added Enum KnownManagedLedgerDigestUploadsName + - Added Enum KnownManagedLedgerDigestUploadsState + - Added Enum KnownMoveOperationMode + - Added Enum KnownPhase + - Added Enum KnownReplicationMode + - Added Enum KnownRoleChangeType + - Added Enum KnownRuleSeverity + - Added Enum KnownRuleStatus + - Added Enum KnownRuleType + - Added Enum KnownSecondaryInstanceType + - Added Enum KnownSecurityAlertPolicyNameAutoGenerated + - Added Enum KnownServerConfigurationOptionName + - Added Enum KnownServerPublicNetworkAccessFlag + - Added Enum KnownSQLVulnerabilityAssessmentName + - Added Enum KnownSqlVulnerabilityAssessmentName + - Added Enum KnownStartStopScheduleName + - Added Enum KnownStatus + - Added Enum KnownSyncGroupsType + - Enum KnownManagedDatabaseStatus has a new value DbCopying + - Enum KnownManagedDatabaseStatus has a new value DbMoving + - Enum KnownManagedDatabaseStatus has a new value Starting + - Enum KnownManagedDatabaseStatus has a new value Stopped + - Enum KnownManagedDatabaseStatus has a new value Stopping + - Enum KnownOperationMode has a new value Export + - Enum KnownOperationMode has a new value Import + - Enum KnownReplicationLinkType has a new value Standby + - Enum KnownSecondaryType has a new value Standby + - Enum KnownStorageCapabilityStorageAccountType has a new value Gzrs -### Other Changes +**Breaking Changes** + - Removed operation group ElasticPoolActivities + - Removed operation group ElasticPoolDatabaseActivities + - Removed operation group OperationsHealthOperations + - Removed operation group ServerCommunicationLinks + - Removed operation group ServiceObjectives + - Removed operation Databases.listMetricDefinitions + - Removed operation Databases.listMetrics + - Removed operation ElasticPools.listMetricDefinitions + - Removed operation ElasticPools.listMetrics + - Removed operation GeoBackupPolicies.listByDatabase + - Removed operation ReplicationLinks.beginUnlink + - Removed operation ReplicationLinks.beginUnlinkAndWait + - Removed operation ReplicationLinks.delete + - Removed operation TransparentDataEncryptions.createOrUpdate + - Removed operation VirtualClusters.updateDnsServers + - Operation DataMaskingPolicies.createOrUpdate has a new signature + - Operation DataMaskingPolicies.get has a new signature + - Operation DataMaskingRules.createOrUpdate has a new signature + - Operation DataMaskingRules.listByDatabase has a new signature + - Operation ManagedServerSecurityAlertPolicies.beginCreateOrUpdate has a new signature + - Operation ManagedServerSecurityAlertPolicies.beginCreateOrUpdateAndWait has a new signature + - Operation ManagedServerSecurityAlertPolicies.get has a new signature + - Operation OutboundFirewallRules.beginCreateOrUpdate has a new signature + - Operation OutboundFirewallRules.beginCreateOrUpdateAndWait has a new signature + - Operation ServerDevOpsAuditSettings.beginCreateOrUpdate has a new signature + - Operation ServerDevOpsAuditSettings.beginCreateOrUpdateAndWait has a new signature + - Operation ServerDevOpsAuditSettings.get has a new signature + - Operation ServerSecurityAlertPolicies.beginCreateOrUpdate has a new signature + - Operation ServerSecurityAlertPolicies.beginCreateOrUpdateAndWait has a new signature + - Operation ServerSecurityAlertPolicies.get has a new signature + - Operation SyncGroups.listLogs has a new signature + - Interface Database no longer has parameter primaryDelegatedIdentityClientId + - Interface DatabaseIdentity no longer has parameter delegatedResources + - Interface DatabaseUpdate no longer has parameter primaryDelegatedIdentityClientId + - Interface ServerUsage no longer has parameter name + - Interface ServerUsage no longer has parameter nextResetTime + - Interface ServerUsage no longer has parameter resourceName + - Interface VirtualCluster no longer has parameter family + - Interface VirtualCluster no longer has parameter maintenanceConfigurationId + - Interface VirtualClusterUpdate no longer has parameter family + - Interface VirtualClusterUpdate no longer has parameter maintenanceConfigurationId + - Type of parameter unrestorableFiles of interface ManagedDatabaseRestoreDetailsResult is changed from string[] to ManagedDatabaseRestoreDetailsUnrestorableFileProperties[] + - Type of parameter stepsList of interface ManagedInstanceOperationSteps is changed from UpsertManagedServerOperationStep[] to UpsertManagedServerOperationStepWithEstimatesAndDuration[] + - Type of parameter publicNetworkAccess of interface Server is changed from ServerNetworkAccessFlag to ServerPublicNetworkAccessFlag + - Type of parameter publicNetworkAccess of interface ServerUpdate is changed from ServerNetworkAccessFlag to ServerPublicNetworkAccessFlag + - Class SqlManagementClient no longer has parameter elasticPoolActivities + - Class SqlManagementClient no longer has parameter elasticPoolDatabaseActivities + - Class SqlManagementClient no longer has parameter operationsHealthOperations + - Class SqlManagementClient no longer has parameter serverCommunicationLinks + - Class SqlManagementClient no longer has parameter serviceObjectives + - Removed Enum KnownDnsRefreshConfigurationPropertiesStatus + - Removed Enum KnownEnum60 + - Removed Enum KnownPrimaryAggregationType + - Removed Enum KnownServiceObjectiveName + - Removed Enum KnownUnitDefinitionType + - Removed Enum KnownUnitType + - Removed Enum KnownUpsertManagedServerOperationStepStatus + + ## 9.1.0 (2022-12-14) **Features** diff --git a/sdk/sql/arm-sql/LICENSE b/sdk/sql/arm-sql/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/sql/arm-sql/LICENSE +++ b/sdk/sql/arm-sql/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/sql/arm-sql/README.md b/sdk/sql/arm-sql/README.md index 20a34b7d9592..d3f5f0111807 100644 --- a/sdk/sql/arm-sql/README.md +++ b/sdk/sql/arm-sql/README.md @@ -6,7 +6,7 @@ The Azure SQL Database management API provides a RESTful set of web services tha [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/sql/arm-sql) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-sql) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-sql) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-sql?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/sql/arm-sql/_meta.json b/sdk/sql/arm-sql/_meta.json index 70c797c195b5..ad418c022bf3 100644 --- a/sdk/sql/arm-sql/_meta.json +++ b/sdk/sql/arm-sql/_meta.json @@ -1,8 +1,8 @@ { - "commit": "16d746c3411d553df56df7bedbcef0682115ad18", - "readme": "specification\\sql\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\sql\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.4 --generate-sample=true", + "commit": "2f266d71d5c6d7d1450d2e390a379dc3020f35f4", + "readme": "specification/sql/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/sql/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.5", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.3", - "use": "@autorest/typescript@6.0.0-rc.4" + "release_tool": "@azure-tools/js-sdk-release-tools@2.6.2", + "use": "@autorest/typescript@6.0.0-rc.5" } \ No newline at end of file diff --git a/sdk/sql/arm-sql/package.json b/sdk/sql/arm-sql/package.json index cce04f056ef2..a00b6c7404bb 100644 --- a/sdk/sql/arm-sql/package.json +++ b/sdk/sql/arm-sql/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for SqlManagementClient.", - "version": "9.1.1", + "version": "10.0.0-beta.1", "engines": { "node": ">=14.0.0" }, @@ -29,9 +29,9 @@ "types": "./types/arm-sql.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "@rollup/plugin-commonjs": "^24.0.0", - "@rollup/plugin-json": "^6.0.0", - "@rollup/plugin-multi-entry": "^6.0.0", + "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-multi-entry": "^4.1.0", "@rollup/plugin-node-resolve": "^13.1.3", "mkdirp": "^1.0.4", "rollup": "^2.66.1", @@ -110,13 +110,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-sql?view=azure-node-preview" - } -} + "autoPublish": true +} \ No newline at end of file diff --git a/sdk/sql/arm-sql/review/arm-sql.api.md b/sdk/sql/arm-sql/review/arm-sql.api.md index 35fd8c1de035..1e8873bc7def 100644 --- a/sdk/sql/arm-sql/review/arm-sql.api.md +++ b/sdk/sql/arm-sql/review/arm-sql.api.md @@ -22,6 +22,12 @@ export type AdministratorName = string; // @public export type AdministratorType = string; +// @public +export type AdvancedThreatProtectionName = string; + +// @public +export type AdvancedThreatProtectionState = "New" | "Enabled" | "Disabled"; + // @public export interface Advisor extends ProxyResource { readonly advisorStatus?: AdvisorStatus; @@ -40,6 +46,9 @@ export type AdvisorStatus = "GA" | "PublicPreview" | "LimitedPublicPreview" | "P // @public export type AggregationFunctionType = string; +// @public +export type AlwaysEncryptedEnclaveType = string; + // @public export type AuthenticationName = string; @@ -93,6 +102,9 @@ export interface AutoPauseDelayTimeRange { readonly unit?: PauseDelayTimeUnit; } +// @public +export type AvailabilityZoneType = string; + // @public export interface AzureADOnlyAuthListResult { readonly nextLink?: string; @@ -163,6 +175,29 @@ export interface BackupShortTermRetentionPolicyListResult { // @public export type BackupStorageRedundancy = string; +// @public +export interface Baseline { + readonly expectedResults?: string[][]; + readonly updatedTime?: Date; +} + +// @public +export interface BaselineAdjustedResult { + readonly baseline?: Baseline; + readonly resultsNotInBaseline?: string[][]; + readonly resultsOnlyInBaseline?: string[][]; + readonly status?: RuleStatus; +} + +// @public +export type BaselineName = string; + +// @public +export interface BenchmarkReference { + readonly benchmark?: string; + readonly reference?: string; +} + // @public export type BlobAuditingPolicyState = "Enabled" | "Disabled"; @@ -242,6 +277,7 @@ export type CreateMode = string; // @public export interface Database extends TrackedResource { autoPauseDelay?: number; + availabilityZone?: AvailabilityZoneType; catalogCollation?: CatalogCollationType; collation?: string; createMode?: CreateMode; @@ -253,22 +289,28 @@ export interface Database extends TrackedResource { readonly defaultSecondaryLocation?: string; readonly earliestRestoreDate?: Date; elasticPoolId?: string; + encryptionProtector?: string; readonly failoverGroupId?: string; federatedClientId?: string; highAvailabilityReplicaCount?: number; identity?: DatabaseIdentity; readonly isInfraEncryptionEnabled?: boolean; isLedgerOn?: boolean; + keys?: { + [propertyName: string]: DatabaseKey; + }; readonly kind?: string; licenseType?: DatabaseLicenseType; longTermRetentionBackupResourceId?: string; maintenanceConfigurationId?: string; readonly managedBy?: string; + manualCutover?: boolean; readonly maxLogSizeBytes?: number; maxSizeBytes?: number; minCapacity?: number; readonly pausedDate?: Date; - primaryDelegatedIdentityClientId?: string; + performCutover?: boolean; + preferredEnclaveType?: AlwaysEncryptedEnclaveType; readScale?: DatabaseReadScale; recoverableDatabaseId?: string; recoveryServicesRecoveryPointId?: string; @@ -282,10 +324,59 @@ export interface Database extends TrackedResource { sku?: Sku; sourceDatabaseDeletionDate?: Date; sourceDatabaseId?: string; + sourceResourceId?: string; readonly status?: DatabaseStatus; zoneRedundant?: boolean; } +// @public +export interface DatabaseAdvancedThreatProtection extends ProxyResource { + readonly creationTime?: Date; + state?: AdvancedThreatProtectionState; + readonly systemData?: SystemData; +} + +// @public +export interface DatabaseAdvancedThreatProtectionListResult { + readonly nextLink?: string; + readonly value?: DatabaseAdvancedThreatProtection[]; +} + +// @public +export interface DatabaseAdvancedThreatProtectionSettings { + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: DatabaseAdvancedThreatProtection, options?: DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, options?: DatabaseAdvancedThreatProtectionSettingsGetOptionalParams): Promise; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse = DatabaseAdvancedThreatProtection; + +// @public +export interface DatabaseAdvancedThreatProtectionSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseAdvancedThreatProtectionSettingsGetResponse = DatabaseAdvancedThreatProtection; + +// @public +export interface DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse = DatabaseAdvancedThreatProtectionListResult; + +// @public +export interface DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse = DatabaseAdvancedThreatProtectionListResult; + // @public export interface DatabaseAdvisors { get(resourceGroupName: string, serverName: string, databaseName: string, advisorName: string, options?: DatabaseAdvisorsGetOptionalParams): Promise; @@ -383,6 +474,7 @@ export type DatabaseBlobAuditingPoliciesListByDatabaseResponse = DatabaseBlobAud export interface DatabaseBlobAuditingPolicy extends ProxyResource { auditActionsAndGroups?: string[]; isAzureMonitorTargetEnabled?: boolean; + isManagedIdentityInUse?: boolean; isStorageSecondaryKeyInUse?: boolean; readonly kind?: string; queueDelayMs?: number; @@ -461,9 +553,36 @@ export interface DatabaseColumnsListByTableOptionalParams extends coreClient.Ope // @public export type DatabaseColumnsListByTableResponse = DatabaseColumnListResult; +// @public +export interface DatabaseEncryptionProtectors { + beginRevalidate(resourceGroupName: string, serverName: string, databaseName: string, encryptionProtectorName: EncryptionProtectorName, options?: DatabaseEncryptionProtectorsRevalidateOptionalParams): Promise, void>>; + beginRevalidateAndWait(resourceGroupName: string, serverName: string, databaseName: string, encryptionProtectorName: EncryptionProtectorName, options?: DatabaseEncryptionProtectorsRevalidateOptionalParams): Promise; + beginRevert(resourceGroupName: string, serverName: string, databaseName: string, encryptionProtectorName: EncryptionProtectorName, options?: DatabaseEncryptionProtectorsRevertOptionalParams): Promise, void>>; + beginRevertAndWait(resourceGroupName: string, serverName: string, databaseName: string, encryptionProtectorName: EncryptionProtectorName, options?: DatabaseEncryptionProtectorsRevertOptionalParams): Promise; +} + +// @public +export interface DatabaseEncryptionProtectorsRevalidateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface DatabaseEncryptionProtectorsRevertOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface DatabaseExtensions extends ProxyResource { + administratorLogin?: string; + administratorLoginPassword?: string; + authenticationType?: string; + databaseEdition?: string; + maxSizeBytes?: string; + networkIsolation?: NetworkIsolationSettings; operationMode?: OperationMode; + serviceObjectiveName?: string; storageKey?: string; storageKeyType?: StorageKeyType; storageUri?: string; @@ -506,9 +625,6 @@ export interface DatabaseExtensionsOperations { // @public export interface DatabaseIdentity { - delegatedResources?: { - [propertyName: string]: Delegation; - }; readonly tenantId?: string; type?: DatabaseIdentityType; userAssignedIdentities?: { @@ -519,6 +635,17 @@ export interface DatabaseIdentity { // @public export type DatabaseIdentityType = string; +// @public +export interface DatabaseKey { + readonly creationDate?: Date; + readonly subregion?: string; + readonly thumbprint?: string; + readonly type?: DatabaseKeyType; +} + +// @public +export type DatabaseKeyType = string; + // @public export type DatabaseLicenseType = string; @@ -540,6 +667,7 @@ export interface DatabaseOperation extends ProxyResource { readonly isUserError?: boolean; readonly operation?: string; readonly operationFriendlyName?: string; + readonly operationPhaseDetails?: PhaseDetails; readonly percentComplete?: number; readonly serverName?: string; readonly startTime?: Date; @@ -631,8 +759,6 @@ export interface Databases { listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: DatabasesListByElasticPoolOptionalParams): PagedAsyncIterableIterator; listByServer(resourceGroupName: string, serverName: string, options?: DatabasesListByServerOptionalParams): PagedAsyncIterableIterator; listInaccessibleByServer(resourceGroupName: string, serverName: string, options?: DatabasesListInaccessibleByServerOptionalParams): PagedAsyncIterableIterator; - listMetricDefinitions(resourceGroupName: string, serverName: string, databaseName: string, options?: DatabasesListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator; - listMetrics(resourceGroupName: string, serverName: string, databaseName: string, filter: string, options?: DatabasesListMetricsOptionalParams): PagedAsyncIterableIterator; rename(resourceGroupName: string, serverName: string, databaseName: string, parameters: ResourceMoveDefinition, options?: DatabasesRenameOptionalParams): Promise; } @@ -761,6 +887,8 @@ export interface DatabasesFailoverOptionalParams extends coreClient.OperationOpt // @public export interface DatabasesGetOptionalParams extends coreClient.OperationOptions { + expand?: string; + filter?: string; } // @public @@ -820,27 +948,223 @@ export interface DatabasesListInaccessibleByServerOptionalParams extends coreCli export type DatabasesListInaccessibleByServerResponse = DatabaseListResult; // @public -export interface DatabasesListMetricDefinitionsOptionalParams extends coreClient.OperationOptions { +export interface DatabasesPauseOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type DatabasesListMetricDefinitionsResponse = MetricDefinitionListResult; +export type DatabasesPauseResponse = Database; // @public -export interface DatabasesListMetricsOptionalParams extends coreClient.OperationOptions { +export interface DatabaseSqlVulnerabilityAssessmentBaselines { + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, options?: DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, options?: DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams): Promise; + listBySqlVulnerabilityAssessment(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams): PagedAsyncIterableIterator; } // @public -export type DatabasesListMetricsResponse = MetricListResult; +export interface DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} // @public -export interface DatabasesPauseOptionalParams extends coreClient.OperationOptions { +export type DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentBaselineSet extends ProxyResource { + results?: { + [propertyName: string]: string[][]; + }; + readonly systemData?: SystemData; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentBaselineSetListResult { + readonly nextLink?: string; + readonly value?: DatabaseSqlVulnerabilityAssessmentBaselineSet[]; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentBaselinesGetResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentExecuteScan { + beginExecute(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams): Promise, void>>; + beginExecuteAndWait(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams): Promise; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type DatabasesPauseResponse = Database; +export interface DatabaseSqlVulnerabilityAssessmentRuleBaseline extends ProxyResource { + results?: string[][]; + readonly systemData?: SystemData; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselineInput extends ProxyResource { + latestScan?: boolean; + results?: string[][]; + readonly systemData?: SystemData; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput extends ProxyResource { + latestScan?: boolean; + results?: { + [propertyName: string]: string[][]; + }; + readonly systemData?: SystemData; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult { + readonly nextLink?: string; + readonly value?: DatabaseSqlVulnerabilityAssessmentRuleBaseline[]; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselines { + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, ruleId: string, parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, ruleId: string, options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, ruleId: string, options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams): Promise; + listByBaseline(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScanResult { + get(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, scanId: string, scanResultId: string, options?: DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams): Promise; + listByScan(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, scanId: string, options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentScanResultGetResponse = SqlVulnerabilityAssessmentScanResults; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextResponse = SQLVulnerabilityAssessmentScanListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentScanResultListByScanResponse = SQLVulnerabilityAssessmentScanListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScans { + get(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, options?: DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams): Promise; + listBySqlVulnerabilityAssessments(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentScansGetResponse = SqlVulnerabilityAssessmentScanRecord; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse = SqlVulnerabilityAssessmentScanRecordListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse = SqlVulnerabilityAssessmentScanRecordListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentsSettings { + get(resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName, options?: DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams): Promise; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentsSettingsGetResponse = SqlVulnerabilityAssessment; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextResponse = SqlVulnerabilityAssessmentListResult; + +// @public +export interface DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseResponse = SqlVulnerabilityAssessmentListResult; // @public export interface DatabasesRenameOptionalParams extends coreClient.OperationOptions { @@ -930,20 +1254,26 @@ export interface DatabaseUpdate { readonly defaultSecondaryLocation?: string; readonly earliestRestoreDate?: Date; elasticPoolId?: string; + encryptionProtector?: string; readonly failoverGroupId?: string; federatedClientId?: string; highAvailabilityReplicaCount?: number; identity?: DatabaseIdentity; readonly isInfraEncryptionEnabled?: boolean; isLedgerOn?: boolean; + keys?: { + [propertyName: string]: DatabaseKey; + }; licenseType?: DatabaseLicenseType; longTermRetentionBackupResourceId?: string; maintenanceConfigurationId?: string; + manualCutover?: boolean; readonly maxLogSizeBytes?: number; maxSizeBytes?: number; minCapacity?: number; readonly pausedDate?: Date; - primaryDelegatedIdentityClientId?: string; + performCutover?: boolean; + preferredEnclaveType?: AlwaysEncryptedEnclaveType; readScale?: DatabaseReadScale; recoverableDatabaseId?: string; recoveryServicesRecoveryPointId?: string; @@ -1145,8 +1475,8 @@ export type DataMaskingFunction = "Default" | "CCN" | "Email" | "Number" | "SSN" // @public export interface DataMaskingPolicies { - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: DataMaskingPolicy, options?: DataMaskingPoliciesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serverName: string, databaseName: string, options?: DataMaskingPoliciesGetOptionalParams): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingPolicyName: DataMaskingPolicyName, parameters: DataMaskingPolicy, options?: DataMaskingPoliciesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingPolicyName: DataMaskingPolicyName, options?: DataMaskingPoliciesGetOptionalParams): Promise; } // @public @@ -1173,6 +1503,9 @@ export interface DataMaskingPolicy extends ProxyResource { readonly maskingLevel?: string; } +// @public +export type DataMaskingPolicyName = string; + // @public export interface DataMaskingRule extends ProxyResource { aliasName?: string; @@ -1193,13 +1526,14 @@ export interface DataMaskingRule extends ProxyResource { // @public export interface DataMaskingRuleListResult { - value?: DataMaskingRule[]; + readonly nextLink?: string; + readonly value?: DataMaskingRule[]; } // @public export interface DataMaskingRules { - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingRuleName: string, parameters: DataMaskingRule, options?: DataMaskingRulesCreateOrUpdateOptionalParams): Promise; - listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: DataMaskingRulesListByDatabaseOptionalParams): PagedAsyncIterableIterator; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingPolicyName: DataMaskingPolicyName, dataMaskingRuleName: string, parameters: DataMaskingRule, options?: DataMaskingRulesCreateOrUpdateOptionalParams): Promise; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, dataMaskingPolicyName: DataMaskingPolicyName, options?: DataMaskingRulesListByDatabaseOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1209,6 +1543,13 @@ export interface DataMaskingRulesCreateOrUpdateOptionalParams extends coreClient // @public export type DataMaskingRulesCreateOrUpdateResponse = DataMaskingRule; +// @public +export interface DataMaskingRulesListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataMaskingRulesListByDatabaseNextResponse = DataMaskingRuleListResult; + // @public export interface DataMaskingRulesListByDatabaseOptionalParams extends coreClient.OperationOptions { } @@ -1217,10 +1558,10 @@ export interface DataMaskingRulesListByDatabaseOptionalParams extends coreClient export type DataMaskingRulesListByDatabaseResponse = DataMaskingRuleListResult; // @public -export type DataMaskingRuleState = "Disabled" | "Enabled"; +export type DataMaskingRuleState = "Enabled" | "Disabled"; // @public -export type DataMaskingState = "Disabled" | "Enabled"; +export type DataMaskingState = "Enabled" | "Disabled"; // @public export interface DataWarehouseUserActivities extends ProxyResource { @@ -1266,12 +1607,6 @@ export type DataWarehouseUserActivityName = string; // @public export type DayOfWeek = string; -// @public -export interface Delegation { - resourceId?: string; - readonly tenantId?: string; -} - // @public export interface DeletedServer extends ProxyResource { readonly deletionTime?: Date; @@ -1339,113 +1674,140 @@ export interface DeletedServersRecoverOptionalParams extends coreClient.Operatio // @public export type DeletedServersRecoverResponse = DeletedServer; +// @public +export type DevOpsAuditingSettingsName = string; + // @public export type DiffBackupIntervalInHours = number; // @public -export type DnsRefreshConfigurationPropertiesStatus = string; +export interface DistributedAvailabilityGroup extends ProxyResource { + readonly distributedAvailabilityGroupId?: string; + readonly instanceRole?: string; + readonly lastHardenedLsn?: string; + readonly linkState?: string; + primaryAvailabilityGroupName?: string; + replicationMode?: ReplicationMode; + secondaryAvailabilityGroupName?: string; + sourceEndpoint?: string; + readonly sourceReplicaId?: string; + targetDatabase?: string; + readonly targetReplicaId?: string; +} // @public -export interface EditionCapability { - readonly name?: string; - readonly readScale?: ReadScaleCapability; - reason?: string; - readonly status?: CapabilityStatus; - readonly supportedServiceLevelObjectives?: ServiceObjectiveCapability[]; - readonly supportedStorageCapabilities?: StorageCapability[]; - readonly zoneRedundant?: boolean; +export interface DistributedAvailabilityGroups { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, parameters: DistributedAvailabilityGroup, options?: DistributedAvailabilityGroupsCreateOrUpdateOptionalParams): Promise, DistributedAvailabilityGroupsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, parameters: DistributedAvailabilityGroup, options?: DistributedAvailabilityGroupsCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, options?: DistributedAvailabilityGroupsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, options?: DistributedAvailabilityGroupsDeleteOptionalParams): Promise; + beginSetRole(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, parameters: DistributedAvailabilityGroupSetRole, options?: DistributedAvailabilityGroupsSetRoleOptionalParams): Promise, DistributedAvailabilityGroupsSetRoleResponse>>; + beginSetRoleAndWait(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, parameters: DistributedAvailabilityGroupSetRole, options?: DistributedAvailabilityGroupsSetRoleOptionalParams): Promise; + beginUpdate(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, parameters: DistributedAvailabilityGroup, options?: DistributedAvailabilityGroupsUpdateOptionalParams): Promise, DistributedAvailabilityGroupsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, parameters: DistributedAvailabilityGroup, options?: DistributedAvailabilityGroupsUpdateOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, distributedAvailabilityGroupName: string, options?: DistributedAvailabilityGroupsGetOptionalParams): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: DistributedAvailabilityGroupsListByInstanceOptionalParams): PagedAsyncIterableIterator; } // @public -export interface ElasticPool extends TrackedResource { - readonly creationDate?: Date; - readonly kind?: string; - licenseType?: ElasticPoolLicenseType; - maintenanceConfigurationId?: string; - maxSizeBytes?: number; - perDatabaseSettings?: ElasticPoolPerDatabaseSettings; - sku?: Sku; - readonly state?: ElasticPoolState; - zoneRedundant?: boolean; +export interface DistributedAvailabilityGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface ElasticPoolActivities { - listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: ElasticPoolActivitiesListByElasticPoolOptionalParams): PagedAsyncIterableIterator; +export type DistributedAvailabilityGroupsCreateOrUpdateResponse = DistributedAvailabilityGroup; + +// @public +export interface DistributedAvailabilityGroupsDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export interface ElasticPoolActivitiesListByElasticPoolOptionalParams extends coreClient.OperationOptions { +export interface DistributedAvailabilityGroupSetRole { + instanceRole: InstanceRole; + roleChangeType: RoleChangeType; } // @public -export type ElasticPoolActivitiesListByElasticPoolResponse = ElasticPoolActivityListResult; +export interface DistributedAvailabilityGroupsGetOptionalParams extends coreClient.OperationOptions { +} // @public -export interface ElasticPoolActivity extends ProxyResource { - readonly elasticPoolName?: string; - readonly endTime?: Date; - readonly errorCode?: number; - readonly errorMessage?: string; - readonly errorSeverity?: number; - location?: string; - readonly operation?: string; - readonly operationId?: string; - readonly percentComplete?: number; - readonly requestedDatabaseDtuCap?: number; - readonly requestedDatabaseDtuGuarantee?: number; - readonly requestedDatabaseDtuMax?: number; - readonly requestedDatabaseDtuMin?: number; - readonly requestedDtu?: number; - readonly requestedDtuGuarantee?: number; - readonly requestedElasticPoolName?: string; - readonly requestedStorageLimitInGB?: number; - readonly requestedStorageLimitInMB?: number; - readonly serverName?: string; - readonly startTime?: Date; - readonly state?: string; +export type DistributedAvailabilityGroupsGetResponse = DistributedAvailabilityGroup; + +// @public +export interface DistributedAvailabilityGroupsListByInstanceNextOptionalParams extends coreClient.OperationOptions { } // @public -export interface ElasticPoolActivityListResult { - value: ElasticPoolActivity[]; +export type DistributedAvailabilityGroupsListByInstanceNextResponse = DistributedAvailabilityGroupsListResult; + +// @public +export interface DistributedAvailabilityGroupsListByInstanceOptionalParams extends coreClient.OperationOptions { } // @public -export interface ElasticPoolDatabaseActivities { - listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams): PagedAsyncIterableIterator; +export type DistributedAvailabilityGroupsListByInstanceResponse = DistributedAvailabilityGroupsListResult; + +// @public +export interface DistributedAvailabilityGroupsListResult { + readonly nextLink?: string; + readonly value?: DistributedAvailabilityGroup[]; } // @public -export interface ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams extends coreClient.OperationOptions { +export interface DistributedAvailabilityGroupsSetRoleOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type ElasticPoolDatabaseActivitiesListByElasticPoolResponse = ElasticPoolDatabaseActivityListResult; +export type DistributedAvailabilityGroupsSetRoleResponse = DistributedAvailabilityGroup; // @public -export interface ElasticPoolDatabaseActivity extends ProxyResource { - readonly currentElasticPoolName?: string; - readonly currentServiceObjective?: string; - readonly databaseName?: string; - readonly endTime?: Date; - readonly errorCode?: number; - readonly errorMessage?: string; - readonly errorSeverity?: number; - location?: string; - readonly operation?: string; - readonly operationId?: string; - readonly percentComplete?: number; - readonly requestedElasticPoolName?: string; - readonly requestedServiceObjective?: string; - readonly serverName?: string; - readonly startTime?: Date; - readonly state?: string; +export interface DistributedAvailabilityGroupsUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type DistributedAvailabilityGroupsUpdateResponse = DistributedAvailabilityGroup; + +// @public +export type DNSRefreshOperationStatus = string; + +// @public +export type DtcName = string; + +// @public +export interface EditionCapability { + readonly name?: string; + readonly readScale?: ReadScaleCapability; + reason?: string; + readonly status?: CapabilityStatus; + readonly supportedServiceLevelObjectives?: ServiceObjectiveCapability[]; + readonly supportedStorageCapabilities?: StorageCapability[]; + readonly zonePinning?: boolean; + readonly zoneRedundant?: boolean; } // @public -export interface ElasticPoolDatabaseActivityListResult { - value: ElasticPoolDatabaseActivity[]; +export interface ElasticPool extends TrackedResource { + availabilityZone?: AvailabilityZoneType; + readonly creationDate?: Date; + highAvailabilityReplicaCount?: number; + readonly kind?: string; + licenseType?: ElasticPoolLicenseType; + maintenanceConfigurationId?: string; + maxSizeBytes?: number; + minCapacity?: number; + perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + preferredEnclaveType?: AlwaysEncryptedEnclaveType; + sku?: Sku; + readonly state?: ElasticPoolState; + zoneRedundant?: boolean; } // @public @@ -1454,6 +1816,7 @@ export interface ElasticPoolEditionCapability { reason?: string; readonly status?: CapabilityStatus; readonly supportedElasticPoolPerformanceLevels?: ElasticPoolPerformanceLevelCapability[]; + readonly zonePinning?: boolean; readonly zoneRedundant?: boolean; } @@ -1565,8 +1928,6 @@ export interface ElasticPools { beginUpdateAndWait(resourceGroupName: string, serverName: string, elasticPoolName: string, parameters: ElasticPoolUpdate, options?: ElasticPoolsUpdateOptionalParams): Promise; get(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: ElasticPoolsGetOptionalParams): Promise; listByServer(resourceGroupName: string, serverName: string, options?: ElasticPoolsListByServerOptionalParams): PagedAsyncIterableIterator; - listMetricDefinitions(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: ElasticPoolsListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator; - listMetrics(resourceGroupName: string, serverName: string, elasticPoolName: string, filter: string, options?: ElasticPoolsListMetricsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -1612,20 +1973,6 @@ export interface ElasticPoolsListByServerOptionalParams extends coreClient.Opera // @public export type ElasticPoolsListByServerResponse = ElasticPoolListResult; -// @public -export interface ElasticPoolsListMetricDefinitionsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ElasticPoolsListMetricDefinitionsResponse = MetricDefinitionListResult; - -// @public -export interface ElasticPoolsListMetricsOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ElasticPoolsListMetricsResponse = MetricListResult; - // @public export type ElasticPoolState = string; @@ -1640,10 +1987,14 @@ export type ElasticPoolsUpdateResponse = ElasticPool; // @public export interface ElasticPoolUpdate { + availabilityZone?: AvailabilityZoneType; + highAvailabilityReplicaCount?: number; licenseType?: ElasticPoolLicenseType; maintenanceConfigurationId?: string; maxSizeBytes?: number; + minCapacity?: number; perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + preferredEnclaveType?: AlwaysEncryptedEnclaveType; sku?: Sku; tags?: { [propertyName: string]: string; @@ -1719,7 +2070,53 @@ export interface EncryptionProtectorsRevalidateOptionalParams extends coreClient } // @public -export type Enum60 = string; +export interface EndpointCertificate extends ProxyResource { + publicBlob?: string; +} + +// @public +export interface EndpointCertificateListResult { + readonly nextLink?: string; + readonly value?: EndpointCertificate[]; +} + +// @public +export interface EndpointCertificates { + get(resourceGroupName: string, managedInstanceName: string, endpointType: string, options?: EndpointCertificatesGetOptionalParams): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: EndpointCertificatesListByInstanceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface EndpointCertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EndpointCertificatesGetResponse = EndpointCertificate; + +// @public +export interface EndpointCertificatesListByInstanceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EndpointCertificatesListByInstanceNextResponse = EndpointCertificateListResult; + +// @public +export interface EndpointCertificatesListByInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type EndpointCertificatesListByInstanceResponse = EndpointCertificateListResult; + +// @public +export interface EndpointDependency { + readonly domainName?: string; + readonly endpointDetails?: EndpointDetail[]; +} + +// @public +export interface EndpointDetail { + readonly port?: number; +} // @public export interface ExportDatabaseDefinition { @@ -1771,6 +2168,7 @@ export type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseResponse = Extende export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { auditActionsAndGroups?: string[]; isAzureMonitorTargetEnabled?: boolean; + isManagedIdentityInUse?: boolean; isStorageSecondaryKeyInUse?: boolean; predicateExpression?: string; queueDelayMs?: number; @@ -1830,6 +2228,7 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { auditActionsAndGroups?: string[]; isAzureMonitorTargetEnabled?: boolean; isDevopsAuditEnabled?: boolean; + isManagedIdentityInUse?: boolean; isStorageSecondaryKeyInUse?: boolean; predicateExpression?: string; queueDelayMs?: number; @@ -1846,6 +2245,9 @@ export interface ExtendedServerBlobAuditingPolicyListResult { readonly value?: ExtendedServerBlobAuditingPolicy[]; } +// @public +export type ExternalGovernanceStatus = string; + // @public export interface FailoverGroup extends ProxyResource { databases?: string[]; @@ -2039,7 +2441,7 @@ export type FirewallRulesReplaceResponse = FirewallRule; export interface GeoBackupPolicies { createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, geoBackupPolicyName: GeoBackupPolicyName, parameters: GeoBackupPolicy, options?: GeoBackupPoliciesCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, serverName: string, databaseName: string, geoBackupPolicyName: GeoBackupPolicyName, options?: GeoBackupPoliciesGetOptionalParams): Promise; - listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: GeoBackupPoliciesListByDatabaseOptionalParams): PagedAsyncIterableIterator; + list(resourceGroupName: string, serverName: string, databaseName: string, options?: GeoBackupPoliciesListOptionalParams): PagedAsyncIterableIterator; } // @public @@ -2057,30 +2459,38 @@ export interface GeoBackupPoliciesGetOptionalParams extends coreClient.Operation export type GeoBackupPoliciesGetResponse = GeoBackupPolicy; // @public -export interface GeoBackupPoliciesListByDatabaseOptionalParams extends coreClient.OperationOptions { +export interface GeoBackupPoliciesListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GeoBackupPoliciesListNextResponse = GeoBackupPolicyListResult; + +// @public +export interface GeoBackupPoliciesListOptionalParams extends coreClient.OperationOptions { } // @public -export type GeoBackupPoliciesListByDatabaseResponse = GeoBackupPolicyListResult; +export type GeoBackupPoliciesListResponse = GeoBackupPolicyListResult; // @public export interface GeoBackupPolicy extends ProxyResource { readonly kind?: string; readonly location?: string; - state: GeoBackupPolicyState; + state?: GeoBackupPolicyState; readonly storageType?: string; } // @public export interface GeoBackupPolicyListResult { - value?: GeoBackupPolicy[]; + readonly nextLink?: string; + readonly value?: GeoBackupPolicy[]; } // @public export type GeoBackupPolicyName = string; // @public -export type GeoBackupPolicyState = "Disabled" | "Enabled"; +export type GeoBackupPolicyState = "Enabled" | "Disabled"; // @public export function getContinuationToken(page: unknown): string | undefined; @@ -2110,9 +2520,12 @@ export interface ImportExportExtensionsOperationListResult { // @public export interface ImportExportExtensionsOperationResult extends ProxyResource { + readonly blobUri?: string; readonly databaseName?: string; readonly errorMessage?: string; readonly lastModifiedTime?: string; + readonly privateEndpointConnections?: PrivateEndpointConnectionRequestStatus[]; + readonly queuedTime?: string; readonly requestId?: string; readonly requestType?: string; readonly serverName?: string; @@ -2156,6 +2569,7 @@ export interface InstanceFailoverGroup extends ProxyResource { readWriteEndpoint?: InstanceFailoverGroupReadWriteEndpoint; readonly replicationRole?: InstanceFailoverGroupReplicationRole; readonly replicationState?: string; + secondaryType?: SecondaryInstanceType; } // @public @@ -2368,6 +2782,61 @@ export interface InstancePoolVcoresCapability { readonly value?: number; } +// @public +export type InstanceRole = string; + +// @public +export interface IPv6FirewallRule extends ProxyResourceWithWritableName { + endIPv6Address?: string; + startIPv6Address?: string; +} + +// @public +export interface IPv6FirewallRuleListResult { + readonly nextLink?: string; + readonly value?: IPv6FirewallRule[]; +} + +// @public +export interface IPv6FirewallRules { + createOrUpdate(resourceGroupName: string, serverName: string, firewallRuleName: string, parameters: IPv6FirewallRule, options?: IPv6FirewallRulesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: IPv6FirewallRulesDeleteOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, firewallRuleName: string, options?: IPv6FirewallRulesGetOptionalParams): Promise; + listByServer(resourceGroupName: string, serverName: string, options?: IPv6FirewallRulesListByServerOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface IPv6FirewallRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IPv6FirewallRulesCreateOrUpdateResponse = IPv6FirewallRule; + +// @public +export interface IPv6FirewallRulesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface IPv6FirewallRulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IPv6FirewallRulesGetResponse = IPv6FirewallRule; + +// @public +export interface IPv6FirewallRulesListByServerNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IPv6FirewallRulesListByServerNextResponse = IPv6FirewallRuleListResult; + +// @public +export interface IPv6FirewallRulesListByServerOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type IPv6FirewallRulesListByServerResponse = IPv6FirewallRuleListResult; + // @public export type IsRetryable = "Yes" | "No"; @@ -3005,6 +3474,11 @@ export enum KnownAdministratorType { ActiveDirectory = "ActiveDirectory" } +// @public +export enum KnownAdvancedThreatProtectionName { + Default = "Default" +} + // @public export enum KnownAggregationFunctionType { Avg = "avg", @@ -3014,11 +3488,25 @@ export enum KnownAggregationFunctionType { Sum = "sum" } +// @public +export enum KnownAlwaysEncryptedEnclaveType { + Default = "Default", + VBS = "VBS" +} + // @public export enum KnownAuthenticationName { Default = "Default" } +// @public +export enum KnownAvailabilityZoneType { + NoPreference = "NoPreference", + One = "1", + Three = "3", + Two = "2" +} + // @public export enum KnownBackupStorageRedundancy { Geo = "Geo", @@ -3027,6 +3515,11 @@ export enum KnownBackupStorageRedundancy { Zone = "Zone" } +// @public +export enum KnownBaselineName { + Default = "default" +} + // @public export enum KnownCapabilityGroup { SupportedEditions = "supportedEditions", @@ -3113,6 +3606,11 @@ export enum KnownDatabaseIdentityType { UserAssigned = "UserAssigned" } +// @public +export enum KnownDatabaseKeyType { + AzureKeyVault = "AzureKeyVault" +} + // @public export enum KnownDatabaseLicenseType { BasePrice = "BasePrice", @@ -3160,6 +3658,11 @@ export enum KnownDatabaseStatus { Suspect = "Suspect" } +// @public +export enum KnownDataMaskingPolicyName { + Default = "Default" +} + // @public export enum KnownDataWarehouseUserActivityName { Current = "current" @@ -3176,6 +3679,11 @@ export enum KnownDayOfWeek { Wednesday = "Wednesday" } +// @public +export enum KnownDevOpsAuditingSettingsName { + Default = "Default" +} + // @public export enum KnownDiffBackupIntervalInHours { Twelve = 12, @@ -3183,11 +3691,17 @@ export enum KnownDiffBackupIntervalInHours { } // @public -export enum KnownDnsRefreshConfigurationPropertiesStatus { +export enum KnownDNSRefreshOperationStatus { Failed = "Failed", + InProgress = "InProgress", Succeeded = "Succeeded" } +// @public +export enum KnownDtcName { + Current = "current" +} + // @public export enum KnownElasticPoolLicenseType { BasePrice = "BasePrice", @@ -3207,11 +3721,9 @@ export enum KnownEncryptionProtectorName { } // @public -export enum KnownEnum60 { - All = "All", - Error = "Error", - Success = "Success", - Warning = "Warning" +export enum KnownExternalGovernanceStatus { + Disabled = "Disabled", + Enabled = "Enabled" } // @public @@ -3245,6 +3757,12 @@ export enum KnownInstancePoolLicenseType { LicenseIncluded = "LicenseIncluded" } +// @public +export enum KnownInstanceRole { + Primary = "Primary", + Secondary = "Secondary" +} + // @public export enum KnownJobAgentState { Creating = "Creating", @@ -3323,11 +3841,16 @@ export enum KnownManagedDatabaseCreateMode { // @public export enum KnownManagedDatabaseStatus { Creating = "Creating", + DbCopying = "DbCopying", + DbMoving = "DbMoving", Inaccessible = "Inaccessible", Offline = "Offline", Online = "Online", Restoring = "Restoring", Shutdown = "Shutdown", + Starting = "Starting", + Stopped = "Stopped", + Stopping = "Stopping", Updating = "Updating" } @@ -3373,6 +3896,17 @@ export enum KnownManagedInstanceProxyOverride { Redirect = "Redirect" } +// @public +export enum KnownManagedLedgerDigestUploadsName { + Current = "current" +} + +// @public +export enum KnownManagedLedgerDigestUploadsState { + Disabled = "Disabled", + Enabled = "Enabled" +} + // @public export enum KnownManagedServerCreateMode { Default = "Default", @@ -3411,8 +3945,16 @@ export enum KnownMetricType { LogIo = "logIo" } +// @public +export enum KnownMoveOperationMode { + Copy = "Copy", + Move = "Move" +} + // @public export enum KnownOperationMode { + Export = "Export", + Import = "Import", PolybaseImport = "PolybaseImport" } @@ -3434,13 +3976,11 @@ export enum KnownPerformanceLevelUnit { } // @public -export enum KnownPrimaryAggregationType { - Average = "Average", - Count = "Count", - Maximum = "Maximum", - Minimum = "Minimum", - None = "None", - Total = "Total" +export enum KnownPhase { + Catchup = "Catchup", + Copying = "Copying", + CutoverInProgress = "CutoverInProgress", + WaitingForCutover = "WaitingForCutover" } // @public @@ -3528,7 +4068,14 @@ export enum KnownRecommendedActionCurrentState { // @public export enum KnownReplicationLinkType { GEO = "GEO", - Named = "NAMED" + Named = "NAMED", + Standby = "STANDBY" +} + +// @public +export enum KnownReplicationMode { + Async = "Async", + Sync = "Sync" } // @public @@ -3550,6 +4097,36 @@ export enum KnownRestoreDetailsName { Default = "Default" } +// @public +export enum KnownRoleChangeType { + Forced = "Forced", + Planned = "Planned" +} + +// @public +export enum KnownRuleSeverity { + High = "High", + Informational = "Informational", + Low = "Low", + Medium = "Medium", + Obsolete = "Obsolete" +} + +// @public +export enum KnownRuleStatus { + Finding = "Finding", + InternalError = "InternalError", + NonFinding = "NonFinding" +} + +// @public +export enum KnownRuleType { + BaselineExpected = "BaselineExpected", + Binary = "Binary", + NegativeList = "NegativeList", + PositiveList = "PositiveList" +} + // @public export enum KnownSampleName { AdventureWorksLT = "AdventureWorksLT", @@ -3557,17 +4134,34 @@ export enum KnownSampleName { WideWorldImportersStd = "WideWorldImportersStd" } +// @public +export enum KnownSecondaryInstanceType { + Geo = "Geo", + Standby = "Standby" +} + // @public export enum KnownSecondaryType { Geo = "Geo", - Named = "Named" + Named = "Named", + Standby = "Standby" } // @public export enum KnownSecurityAlertPolicyName { + Default = "default" +} + +// @public +export enum KnownSecurityAlertPolicyNameAutoGenerated { Default = "Default" } +// @public +export enum KnownServerConfigurationOptionName { + AllowPolybaseExport = "allowPolybaseExport" +} + // @public export enum KnownServerConnectionType { Default = "Default", @@ -3587,6 +4181,13 @@ export enum KnownServerNetworkAccessFlag { Enabled = "Enabled" } +// @public +export enum KnownServerPublicNetworkAccessFlag { + Disabled = "Disabled", + Enabled = "Enabled", + SecuredByPerimeter = "SecuredByPerimeter" +} + // @public export enum KnownServerTrustGroupPropertiesTrustScopesItem { GlobalTransactions = "GlobalTransactions", @@ -3599,75 +4200,6 @@ export enum KnownServerWorkspaceFeature { Disconnected = "Disconnected" } -// @public -export enum KnownServiceObjectiveName { - Basic = "Basic", - DS100 = "DS100", - DS1000 = "DS1000", - DS1200 = "DS1200", - DS1500 = "DS1500", - DS200 = "DS200", - DS2000 = "DS2000", - DS300 = "DS300", - DS400 = "DS400", - DS500 = "DS500", - DS600 = "DS600", - DW100 = "DW100", - DW1000 = "DW1000", - DW10000C = "DW10000c", - DW1000C = "DW1000c", - DW1200 = "DW1200", - DW1500 = "DW1500", - DW15000C = "DW15000c", - DW1500C = "DW1500c", - DW200 = "DW200", - DW2000 = "DW2000", - DW2000C = "DW2000c", - DW2500C = "DW2500c", - DW300 = "DW300", - DW3000 = "DW3000", - DW30000C = "DW30000c", - DW3000C = "DW3000c", - DW400 = "DW400", - DW500 = "DW500", - DW5000C = "DW5000c", - DW600 = "DW600", - DW6000 = "DW6000", - DW6000C = "DW6000c", - DW7500C = "DW7500c", - ElasticPool = "ElasticPool", - Free = "Free", - P1 = "P1", - P11 = "P11", - P15 = "P15", - P2 = "P2", - P3 = "P3", - P4 = "P4", - P6 = "P6", - PRS1 = "PRS1", - PRS2 = "PRS2", - PRS4 = "PRS4", - PRS6 = "PRS6", - S0 = "S0", - S1 = "S1", - S12 = "S12", - S2 = "S2", - S3 = "S3", - S4 = "S4", - S6 = "S6", - S7 = "S7", - S9 = "S9", - System = "System", - System0 = "System0", - System1 = "System1", - System2 = "System2", - System2L = "System2L", - System3 = "System3", - System3L = "System3L", - System4 = "System4", - System4L = "System4L" -} - // @public export enum KnownServicePrincipalType { None = "None", @@ -3686,28 +4218,54 @@ export enum KnownSqlAgentConfigurationPropertiesState { } // @public -export enum KnownStorageCapabilityStorageAccountType { - GRS = "GRS", - LRS = "LRS", - ZRS = "ZRS" +export enum KnownSQLVulnerabilityAssessmentName { + Default = "default" } // @public -export enum KnownStorageKeyType { - SharedAccessKey = "SharedAccessKey", - StorageAccessKey = "StorageAccessKey" +export enum KnownSqlVulnerabilityAssessmentName { + Default = "default" } // @public -export enum KnownSyncAgentState { - NeverConnected = "NeverConnected", - Offline = "Offline", - Online = "Online" +export enum KnownStartStopScheduleName { + Default = "default" } // @public -export enum KnownSyncConflictResolutionPolicy { - HubWin = "HubWin", +export enum KnownStatus { + Canceled = "Canceled", + Completed = "Completed", + Failed = "Failed", + InProgress = "InProgress", + NotStarted = "NotStarted", + SlowedDown = "SlowedDown" +} + +// @public +export enum KnownStorageCapabilityStorageAccountType { + GRS = "GRS", + Gzrs = "GZRS", + LRS = "LRS", + ZRS = "ZRS" +} + +// @public +export enum KnownStorageKeyType { + SharedAccessKey = "SharedAccessKey", + StorageAccessKey = "StorageAccessKey" +} + +// @public +export enum KnownSyncAgentState { + NeverConnected = "NeverConnected", + Offline = "Offline", + Online = "Online" +} + +// @public +export enum KnownSyncConflictResolutionPolicy { + HubWin = "HubWin", MemberWin = "MemberWin" } @@ -3735,6 +4293,14 @@ export enum KnownSyncGroupState { Warning = "Warning" } +// @public +export enum KnownSyncGroupsType { + All = "All", + Error = "Error", + Success = "Success", + Warning = "Warning" +} + // @public export enum KnownSyncMemberDbType { AzureSqlDatabase = "AzureSqlDatabase", @@ -3775,36 +4341,6 @@ export enum KnownTransparentDataEncryptionName { Current = "current" } -// @public -export enum KnownUnitDefinitionType { - Bytes = "Bytes", - BytesPerSecond = "BytesPerSecond", - Count = "Count", - CountPerSecond = "CountPerSecond", - Percent = "Percent", - Seconds = "Seconds" -} - -// @public -export enum KnownUnitType { - Bytes = "bytes", - BytesPerSecond = "bytesPerSecond", - Count = "count", - CountPerSecond = "countPerSecond", - Percent = "percent", - Seconds = "seconds" -} - -// @public -export enum KnownUpsertManagedServerOperationStepStatus { - Canceled = "Canceled", - Completed = "Completed", - Failed = "Failed", - InProgress = "InProgress", - NotStarted = "NotStarted", - SlowedDown = "SlowedDown" -} - // @public export enum KnownVirtualNetworkRuleState { Deleting = "Deleting", @@ -3928,6 +4464,12 @@ export interface LogicalDatabaseTransparentDataEncryptionListResult { readonly value?: LogicalDatabaseTransparentDataEncryption[]; } +// @public +export interface LogicalServerAdvancedThreatProtectionListResult { + readonly nextLink?: string; + readonly value?: ServerAdvancedThreatProtection[]; +} + // @public export interface LogicalServerSecurityAlertPolicyListResult { readonly nextLink?: string; @@ -4475,9 +5017,13 @@ export interface ManagedDatabase extends TrackedResource { collation?: string; createMode?: ManagedDatabaseCreateMode; readonly creationDate?: Date; + crossSubscriptionRestorableDroppedDatabaseId?: string; + crossSubscriptionSourceDatabaseId?: string; + crossSubscriptionTargetManagedInstanceId?: string; readonly defaultSecondaryLocation?: string; readonly earliestRestorePoint?: Date; readonly failoverGroupId?: string; + isLedgerOn?: boolean; lastBackupName?: string; longTermRetentionBackupResourceId?: string; recoverableDatabaseId?: string; @@ -4485,10 +5031,59 @@ export interface ManagedDatabase extends TrackedResource { restorePointInTime?: Date; sourceDatabaseId?: string; readonly status?: ManagedDatabaseStatus; + storageContainerIdentity?: string; storageContainerSasToken?: string; storageContainerUri?: string; } +// @public +export interface ManagedDatabaseAdvancedThreatProtection extends ProxyResource { + readonly creationTime?: Date; + state?: AdvancedThreatProtectionState; + readonly systemData?: SystemData; +} + +// @public +export interface ManagedDatabaseAdvancedThreatProtectionListResult { + readonly nextLink?: string; + readonly value?: ManagedDatabaseAdvancedThreatProtection[]; +} + +// @public +export interface ManagedDatabaseAdvancedThreatProtectionSettings { + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: ManagedDatabaseAdvancedThreatProtection, options?: ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, options?: ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams): Promise; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse = ManagedDatabaseAdvancedThreatProtection; + +// @public +export interface ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseAdvancedThreatProtectionSettingsGetResponse = ManagedDatabaseAdvancedThreatProtection; + +// @public +export interface ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse = ManagedDatabaseAdvancedThreatProtectionListResult; + +// @public +export interface ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse = ManagedDatabaseAdvancedThreatProtectionListResult; + // @public export interface ManagedDatabaseColumns { get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: ManagedDatabaseColumnsGetOptionalParams): Promise; @@ -4546,6 +5141,66 @@ export interface ManagedDatabaseListResult { readonly value?: ManagedDatabase[]; } +// @public +export interface ManagedDatabaseMoveDefinition { + destinationManagedDatabaseId: string; +} + +// @public +export interface ManagedDatabaseMoveOperationListResult { + readonly nextLink?: string; + readonly value?: ManagedDatabaseMoveOperationResult[]; +} + +// @public +export interface ManagedDatabaseMoveOperationResult extends ProxyResource { + readonly errorCode?: number; + readonly errorDescription?: string; + readonly errorSeverity?: number; + readonly isCancellable?: boolean; + readonly isUserError?: boolean; + readonly operation?: string; + readonly operationFriendlyName?: string; + readonly operationMode?: MoveOperationMode; + readonly sourceDatabaseName?: string; + readonly sourceManagedInstanceId?: string; + readonly sourceManagedInstanceName?: string; + readonly startTime?: Date; + readonly state?: ManagementOperationState; + readonly targetDatabaseName?: string; + readonly targetManagedInstanceId?: string; + readonly targetManagedInstanceName?: string; +} + +// @public +export interface ManagedDatabaseMoveOperations { + get(resourceGroupName: string, locationName: string, operationId: string, options?: ManagedDatabaseMoveOperationsGetOptionalParams): Promise; + listByLocation(resourceGroupName: string, locationName: string, options?: ManagedDatabaseMoveOperationsListByLocationOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedDatabaseMoveOperationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseMoveOperationsGetResponse = ManagedDatabaseMoveOperationResult; + +// @public +export interface ManagedDatabaseMoveOperationsListByLocationNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseMoveOperationsListByLocationNextResponse = ManagedDatabaseMoveOperationListResult; + +// @public +export interface ManagedDatabaseMoveOperationsListByLocationOptionalParams extends coreClient.OperationOptions { + filter?: string; + onlyLatestPerDatabase?: boolean; +} + +// @public +export type ManagedDatabaseMoveOperationsListByLocationResponse = ManagedDatabaseMoveOperationListResult; + // @public export interface ManagedDatabaseQueries { get(resourceGroupName: string, managedInstanceName: string, databaseName: string, queryId: string, options?: ManagedDatabaseQueriesGetOptionalParams): Promise; @@ -4590,6 +5245,16 @@ export interface ManagedDatabaseRestoreDetails { get(resourceGroupName: string, managedInstanceName: string, databaseName: string, restoreDetailsName: RestoreDetailsName, options?: ManagedDatabaseRestoreDetailsGetOptionalParams): Promise; } +// @public +export interface ManagedDatabaseRestoreDetailsBackupSetProperties { + readonly backupSizeMB?: number; + readonly firstStripeName?: string; + readonly numberOfStripes?: number; + readonly restoreFinishedTimestampUtc?: Date; + readonly restoreStartedTimestampUtc?: Date; + readonly status?: string; +} + // @public export interface ManagedDatabaseRestoreDetailsGetOptionalParams extends coreClient.OperationOptions { } @@ -4600,25 +5265,48 @@ export type ManagedDatabaseRestoreDetailsGetResponse = ManagedDatabaseRestoreDet // @public export interface ManagedDatabaseRestoreDetailsResult extends ProxyResource { readonly blockReason?: string; + readonly currentBackupType?: string; + readonly currentRestoredSizeMB?: number; + readonly currentRestorePlanSizeMB?: number; readonly currentRestoringFileName?: string; + readonly diffBackupSets?: ManagedDatabaseRestoreDetailsBackupSetProperties[]; + readonly fullBackupSets?: ManagedDatabaseRestoreDetailsBackupSetProperties[]; readonly lastRestoredFileName?: string; readonly lastRestoredFileTime?: Date; readonly lastUploadedFileName?: string; readonly lastUploadedFileTime?: Date; + readonly logBackupSets?: ManagedDatabaseRestoreDetailsBackupSetProperties[]; readonly numberOfFilesDetected?: number; + readonly numberOfFilesQueued?: number; + readonly numberOfFilesRestored?: number; + readonly numberOfFilesRestoring?: number; + readonly numberOfFilesSkipped?: number; + readonly numberOfFilesUnrestorable?: number; readonly percentCompleted?: number; readonly status?: string; - readonly unrestorableFiles?: string[]; + readonly typePropertiesType?: string; + readonly unrestorableFiles?: ManagedDatabaseRestoreDetailsUnrestorableFileProperties[]; +} + +// @public +export interface ManagedDatabaseRestoreDetailsUnrestorableFileProperties { + readonly name?: string; } // @public export interface ManagedDatabases { + beginCancelMove(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseMoveDefinition, options?: ManagedDatabasesCancelMoveOptionalParams): Promise, void>>; + beginCancelMoveAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseMoveDefinition, options?: ManagedDatabasesCancelMoveOptionalParams): Promise; + beginCompleteMove(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseMoveDefinition, options?: ManagedDatabasesCompleteMoveOptionalParams): Promise, void>>; + beginCompleteMoveAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseMoveDefinition, options?: ManagedDatabasesCompleteMoveOptionalParams): Promise; beginCompleteRestore(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: CompleteDatabaseRestoreDefinition, options?: ManagedDatabasesCompleteRestoreOptionalParams): Promise, void>>; beginCompleteRestoreAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: CompleteDatabaseRestoreDefinition, options?: ManagedDatabasesCompleteRestoreOptionalParams): Promise; beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabase, options?: ManagedDatabasesCreateOrUpdateOptionalParams): Promise, ManagedDatabasesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabase, options?: ManagedDatabasesCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabasesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabasesDeleteOptionalParams): Promise; + beginStartMove(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseStartMoveDefinition, options?: ManagedDatabasesStartMoveOptionalParams): Promise, void>>; + beginStartMoveAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseStartMoveDefinition, options?: ManagedDatabasesStartMoveOptionalParams): Promise; beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseUpdate, options?: ManagedDatabasesUpdateOptionalParams): Promise, ManagedDatabasesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: ManagedDatabaseUpdate, options?: ManagedDatabasesUpdateOptionalParams): Promise; get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabasesGetOptionalParams): Promise; @@ -4626,6 +5314,12 @@ export interface ManagedDatabases { listInaccessibleByInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedDatabasesListInaccessibleByInstanceOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ManagedDatabasesCancelMoveOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface ManagedDatabaseSchemas { get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, options?: ManagedDatabaseSchemasGetOptionalParams): Promise; @@ -4654,6 +5348,12 @@ export interface ManagedDatabaseSchemasListByDatabaseOptionalParams extends core // @public export type ManagedDatabaseSchemasListByDatabaseResponse = DatabaseSchemaListResult; +// @public +export interface ManagedDatabasesCompleteMoveOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface ManagedDatabasesCompleteRestoreOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -4758,6 +5458,7 @@ export interface ManagedDatabaseSensitivityLabels { disableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: ManagedDatabaseSensitivityLabelsDisableRecommendationOptionalParams): Promise; enableRecommendation(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: ManagedDatabaseSensitivityLabelsEnableRecommendationOptionalParams): Promise; get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: SensitivityLabelSource, options?: ManagedDatabaseSensitivityLabelsGetOptionalParams): Promise; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams): PagedAsyncIterableIterator; listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams): PagedAsyncIterableIterator; listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams): PagedAsyncIterableIterator; update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: SensitivityLabelUpdateList, options?: ManagedDatabaseSensitivityLabelsUpdateOptionalParams): Promise; @@ -4789,6 +5490,21 @@ export interface ManagedDatabaseSensitivityLabelsGetOptionalParams extends coreC // @public export type ManagedDatabaseSensitivityLabelsGetResponse = SensitivityLabel; +// @public +export interface ManagedDatabaseSensitivityLabelsListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedDatabaseSensitivityLabelsListByDatabaseNextResponse = SensitivityLabelListResult; + +// @public +export interface ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type ManagedDatabaseSensitivityLabelsListByDatabaseResponse = SensitivityLabelListResult; + // @public export interface ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextOptionalParams extends coreClient.OperationOptions { } @@ -4865,6 +5581,18 @@ export interface ManagedDatabasesListInaccessibleByInstanceOptionalParams extend // @public export type ManagedDatabasesListInaccessibleByInstanceResponse = ManagedDatabaseListResult; +// @public +export interface ManagedDatabasesStartMoveOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedDatabaseStartMoveDefinition { + destinationManagedDatabaseId: string; + operationMode?: MoveOperationMode; +} + // @public export type ManagedDatabaseStatus = string; @@ -4947,9 +5675,13 @@ export interface ManagedDatabaseUpdate { collation?: string; createMode?: ManagedDatabaseCreateMode; readonly creationDate?: Date; + crossSubscriptionRestorableDroppedDatabaseId?: string; + crossSubscriptionSourceDatabaseId?: string; + crossSubscriptionTargetManagedInstanceId?: string; readonly defaultSecondaryLocation?: string; readonly earliestRestorePoint?: Date; readonly failoverGroupId?: string; + isLedgerOn?: boolean; lastBackupName?: string; longTermRetentionBackupResourceId?: string; recoverableDatabaseId?: string; @@ -4957,6 +5689,7 @@ export interface ManagedDatabaseUpdate { restorePointInTime?: Date; sourceDatabaseId?: string; readonly status?: ManagedDatabaseStatus; + storageContainerIdentity?: string; storageContainerSasToken?: string; storageContainerUri?: string; tags?: { @@ -5170,6 +5903,57 @@ export type ManagedInstanceAdministratorsListByInstanceResponse = ManagedInstanc // @public export type ManagedInstanceAdministratorType = string; +// @public +export interface ManagedInstanceAdvancedThreatProtection extends ProxyResource { + readonly creationTime?: Date; + state?: AdvancedThreatProtectionState; + readonly systemData?: SystemData; +} + +// @public +export interface ManagedInstanceAdvancedThreatProtectionListResult { + readonly nextLink?: string; + readonly value?: ManagedInstanceAdvancedThreatProtection[]; +} + +// @public +export interface ManagedInstanceAdvancedThreatProtectionSettings { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: ManagedInstanceAdvancedThreatProtection, options?: ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams): Promise, ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: ManagedInstanceAdvancedThreatProtection, options?: ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, options?: ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse = ManagedInstanceAdvancedThreatProtection; + +// @public +export interface ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstanceAdvancedThreatProtectionSettingsGetResponse = ManagedInstanceAdvancedThreatProtection; + +// @public +export interface ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextResponse = ManagedInstanceAdvancedThreatProtectionListResult; + +// @public +export interface ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceResponse = ManagedInstanceAdvancedThreatProtectionListResult; + // @public export interface ManagedInstanceAzureADOnlyAuthentication extends ProxyResource { azureADOnlyAuthentication?: boolean; @@ -5227,6 +6011,75 @@ export interface ManagedInstanceAzureADOnlyAuthListResult { readonly value?: ManagedInstanceAzureADOnlyAuthentication[]; } +// @public +export interface ManagedInstanceDtc extends ProxyResource { + dtcEnabled?: boolean; + readonly dtcHostNameDnsSuffix?: string; + externalDnsSuffixSearchList?: string[]; + readonly provisioningState?: ProvisioningState; + securitySettings?: ManagedInstanceDtcSecuritySettings; +} + +// @public +export interface ManagedInstanceDtcListResult { + readonly nextLink?: string; + readonly value?: ManagedInstanceDtc[]; +} + +// @public +export interface ManagedInstanceDtcs { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, dtcName: DtcName, parameters: ManagedInstanceDtc, options?: ManagedInstanceDtcsCreateOrUpdateOptionalParams): Promise, ManagedInstanceDtcsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, dtcName: DtcName, parameters: ManagedInstanceDtc, options?: ManagedInstanceDtcsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, dtcName: DtcName, options?: ManagedInstanceDtcsGetOptionalParams): Promise; + listByManagedInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstanceDtcsListByManagedInstanceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedInstanceDtcsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedInstanceDtcsCreateOrUpdateResponse = ManagedInstanceDtc; + +// @public +export interface ManagedInstanceDtcSecuritySettings { + snaLu6Point2TransactionsEnabled?: boolean; + transactionManagerCommunicationSettings?: ManagedInstanceDtcTransactionManagerCommunicationSettings; + xaTransactionsDefaultTimeout?: number; + xaTransactionsEnabled?: boolean; + xaTransactionsMaximumTimeout?: number; +} + +// @public +export interface ManagedInstanceDtcsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstanceDtcsGetResponse = ManagedInstanceDtc; + +// @public +export interface ManagedInstanceDtcsListByManagedInstanceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstanceDtcsListByManagedInstanceNextResponse = ManagedInstanceDtcListResult; + +// @public +export interface ManagedInstanceDtcsListByManagedInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstanceDtcsListByManagedInstanceResponse = ManagedInstanceDtcListResult; + +// @public +export interface ManagedInstanceDtcTransactionManagerCommunicationSettings { + allowInboundEnabled?: boolean; + allowOutboundEnabled?: boolean; + authentication?: string; +} + // @public export interface ManagedInstanceEditionCapability { readonly name?: string; @@ -5412,6 +6265,8 @@ export interface ManagedInstanceLongTermRetentionBackupListResult { export interface ManagedInstanceLongTermRetentionPolicies { beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, policyName: ManagedInstanceLongTermRetentionPolicyName, parameters: ManagedInstanceLongTermRetentionPolicy, options?: ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalParams): Promise, ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, policyName: ManagedInstanceLongTermRetentionPolicyName, parameters: ManagedInstanceLongTermRetentionPolicy, options?: ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, managedInstanceName: string, databaseName: string, policyName: ManagedInstanceLongTermRetentionPolicyName, options?: ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams): Promise, ManagedInstanceLongTermRetentionPoliciesDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, policyName: ManagedInstanceLongTermRetentionPolicyName, options?: ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams): Promise; get(resourceGroupName: string, managedInstanceName: string, databaseName: string, policyName: ManagedInstanceLongTermRetentionPolicyName, options?: ManagedInstanceLongTermRetentionPoliciesGetOptionalParams): Promise; listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedInstanceLongTermRetentionPoliciesListByDatabaseOptionalParams): PagedAsyncIterableIterator; } @@ -5425,6 +6280,15 @@ export interface ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalP // @public export type ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateResponse = ManagedInstanceLongTermRetentionPolicy; +// @public +export interface ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedInstanceLongTermRetentionPoliciesDeleteResponse = ManagedInstanceLongTermRetentionPolicy; + // @public export interface ManagedInstanceLongTermRetentionPoliciesGetOptionalParams extends coreClient.OperationOptions { } @@ -5536,7 +6400,7 @@ export type ManagedInstanceOperationsListByManagedInstanceResponse = ManagedInst // @public export interface ManagedInstanceOperationSteps { readonly currentStep?: number; - readonly stepsList?: UpsertManagedServerOperationStep[]; + readonly stepsList?: UpsertManagedServerOperationStepWithEstimatesAndDuration[]; readonly totalSteps?: string; } @@ -5638,6 +6502,7 @@ export interface ManagedInstancePrivateLinkListResult { export interface ManagedInstancePrivateLinkProperties { readonly groupId?: string; readonly requiredMembers?: string[]; + readonly requiredZoneNames?: string[]; } // @public @@ -5699,6 +6564,10 @@ export interface ManagedInstances { beginDeleteAndWait(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesDeleteOptionalParams): Promise; beginFailover(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesFailoverOptionalParams): Promise, void>>; beginFailoverAndWait(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesFailoverOptionalParams): Promise; + beginStart(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesStartOptionalParams): Promise, void>>; + beginStartAndWait(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesStartOptionalParams): Promise; + beginStop(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesStopOptionalParams): Promise, void>>; + beginStopAndWait(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesStopOptionalParams): Promise; beginUpdate(resourceGroupName: string, managedInstanceName: string, parameters: ManagedInstanceUpdate, options?: ManagedInstancesUpdateOptionalParams): Promise, ManagedInstancesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, managedInstanceName: string, parameters: ManagedInstanceUpdate, options?: ManagedInstancesUpdateOptionalParams): Promise; get(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesGetOptionalParams): Promise; @@ -5706,6 +6575,7 @@ export interface ManagedInstances { listByInstancePool(resourceGroupName: string, instancePoolName: string, options?: ManagedInstancesListByInstancePoolOptionalParams): PagedAsyncIterableIterator; listByManagedInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesListByManagedInstanceOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: ManagedInstancesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + listOutboundNetworkDependenciesByManagedInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams): PagedAsyncIterableIterator; } // @public @@ -5802,13 +6672,39 @@ export interface ManagedInstancesListOptionalParams extends coreClient.Operation } // @public -export type ManagedInstancesListResponse = ManagedInstanceListResult; +export interface ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextOptionalParams extends coreClient.OperationOptions { +} // @public -export interface ManagedInstancesUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} +export type ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextResponse = OutboundEnvironmentEndpointCollection; + +// @public +export interface ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceResponse = OutboundEnvironmentEndpointCollection; + +// @public +export type ManagedInstancesListResponse = ManagedInstanceListResult; + +// @public +export interface ManagedInstancesStartOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedInstancesStopOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedInstancesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} // @public export type ManagedInstancesUpdateResponse = ManagedInstance; @@ -5939,6 +6835,73 @@ export interface ManagedInstanceVulnerabilityAssessmentsListByInstanceOptionalPa // @public export type ManagedInstanceVulnerabilityAssessmentsListByInstanceResponse = ManagedInstanceVulnerabilityAssessmentListResult; +// @public +export interface ManagedLedgerDigestUploads extends ProxyResource { + digestStorageEndpoint?: string; + readonly state?: ManagedLedgerDigestUploadsState; +} + +// @public +export interface ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedLedgerDigestUploadsCreateOrUpdateResponse = ManagedLedgerDigestUploads; + +// @public +export interface ManagedLedgerDigestUploadsDisableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedLedgerDigestUploadsDisableResponse = ManagedLedgerDigestUploads; + +// @public +export interface ManagedLedgerDigestUploadsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedLedgerDigestUploadsGetResponse = ManagedLedgerDigestUploads; + +// @public +export interface ManagedLedgerDigestUploadsListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedLedgerDigestUploadsListByDatabaseNextResponse = ManagedLedgerDigestUploadsListResult; + +// @public +export interface ManagedLedgerDigestUploadsListByDatabaseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedLedgerDigestUploadsListByDatabaseResponse = ManagedLedgerDigestUploadsListResult; + +// @public +export interface ManagedLedgerDigestUploadsListResult { + readonly nextLink?: string; + readonly value?: ManagedLedgerDigestUploads[]; +} + +// @public +export type ManagedLedgerDigestUploadsName = string; + +// @public +export interface ManagedLedgerDigestUploadsOperations { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ledgerDigestUploads: ManagedLedgerDigestUploadsName, parameters: ManagedLedgerDigestUploads, options?: ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams): Promise, ManagedLedgerDigestUploadsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, ledgerDigestUploads: ManagedLedgerDigestUploadsName, parameters: ManagedLedgerDigestUploads, options?: ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams): Promise; + beginDisable(resourceGroupName: string, managedInstanceName: string, databaseName: string, ledgerDigestUploads: ManagedLedgerDigestUploadsName, options?: ManagedLedgerDigestUploadsDisableOptionalParams): Promise, ManagedLedgerDigestUploadsDisableResponse>>; + beginDisableAndWait(resourceGroupName: string, managedInstanceName: string, databaseName: string, ledgerDigestUploads: ManagedLedgerDigestUploadsName, options?: ManagedLedgerDigestUploadsDisableOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ledgerDigestUploads: ManagedLedgerDigestUploadsName, options?: ManagedLedgerDigestUploadsGetOptionalParams): Promise; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: ManagedLedgerDigestUploadsListByDatabaseOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export type ManagedLedgerDigestUploadsState = string; + // @public export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies { beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, policyName: ManagedShortTermRetentionPolicyName, parameters: ManagedBackupShortTermRetentionPolicy, options?: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateOptionalParams): Promise, ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesCreateOrUpdateResponse>>; @@ -5991,11 +6954,90 @@ export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpda // @public export type ManagedServerCreateMode = string; +// @public +export interface ManagedServerDnsAlias extends ProxyResource { + readonly azureDnsRecord?: string; + readonly publicAzureDnsRecord?: string; +} + +// @public +export interface ManagedServerDnsAliasAcquisition { + oldManagedServerDnsAliasResourceId: string; +} + +// @public +export interface ManagedServerDnsAliasCreation { + createDnsRecord?: boolean; +} + +// @public +export interface ManagedServerDnsAliases { + beginAcquire(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, parameters: ManagedServerDnsAliasAcquisition, options?: ManagedServerDnsAliasesAcquireOptionalParams): Promise, ManagedServerDnsAliasesAcquireResponse>>; + beginAcquireAndWait(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, parameters: ManagedServerDnsAliasAcquisition, options?: ManagedServerDnsAliasesAcquireOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, parameters: ManagedServerDnsAliasCreation, options?: ManagedServerDnsAliasesCreateOrUpdateOptionalParams): Promise, ManagedServerDnsAliasesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, parameters: ManagedServerDnsAliasCreation, options?: ManagedServerDnsAliasesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, options?: ManagedServerDnsAliasesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, options?: ManagedServerDnsAliasesDeleteOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, dnsAliasName: string, options?: ManagedServerDnsAliasesGetOptionalParams): Promise; + listByManagedInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedServerDnsAliasesListByManagedInstanceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ManagedServerDnsAliasesAcquireOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedServerDnsAliasesAcquireResponse = ManagedServerDnsAlias; + +// @public +export interface ManagedServerDnsAliasesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ManagedServerDnsAliasesCreateOrUpdateResponse = ManagedServerDnsAlias; + +// @public +export interface ManagedServerDnsAliasesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ManagedServerDnsAliasesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedServerDnsAliasesGetResponse = ManagedServerDnsAlias; + +// @public +export interface ManagedServerDnsAliasesListByManagedInstanceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedServerDnsAliasesListByManagedInstanceNextResponse = ManagedServerDnsAliasListResult; + +// @public +export interface ManagedServerDnsAliasesListByManagedInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ManagedServerDnsAliasesListByManagedInstanceResponse = ManagedServerDnsAliasListResult; + +// @public +export interface ManagedServerDnsAliasListResult { + readonly nextLink?: string; + readonly value?: ManagedServerDnsAlias[]; +} + // @public export interface ManagedServerSecurityAlertPolicies { - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, securityAlertPolicyName: SecurityAlertPolicyName, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise, ManagedServerSecurityAlertPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, securityAlertPolicyName: SecurityAlertPolicyName, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, managedInstanceName: string, securityAlertPolicyName: SecurityAlertPolicyName, options?: ManagedServerSecurityAlertPoliciesGetOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise, ManagedServerSecurityAlertPoliciesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, options?: ManagedServerSecurityAlertPoliciesGetOptionalParams): Promise; listByInstance(resourceGroupName: string, managedInstanceName: string, options?: ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams): PagedAsyncIterableIterator; } @@ -6084,60 +7126,9 @@ export interface MaxSizeRangeCapability { // @public export type MaxSizeUnit = string; -// @public -export interface Metric { - readonly endTime?: Date; - readonly metricValues?: MetricValue[]; - readonly name?: MetricName; - readonly startTime?: Date; - readonly timeGrain?: string; - readonly unit?: UnitType; -} - -// @public -export interface MetricAvailability { - readonly retention?: string; - readonly timeGrain?: string; -} - -// @public -export interface MetricDefinition { - readonly metricAvailabilities?: MetricAvailability[]; - readonly name?: MetricName; - readonly primaryAggregationType?: PrimaryAggregationType; - readonly resourceUri?: string; - readonly unit?: UnitDefinitionType; -} - -// @public -export interface MetricDefinitionListResult { - value: MetricDefinition[]; -} - -// @public -export interface MetricListResult { - value: Metric[]; -} - -// @public -export interface MetricName { - readonly localizedValue?: string; - readonly value?: string; -} - // @public export type MetricType = string; -// @public -export interface MetricValue { - readonly average?: number; - readonly count?: number; - readonly maximum?: number; - readonly minimum?: number; - readonly timestamp?: Date; - readonly total?: number; -} - // @public export interface MinCapacityCapability { reason?: string; @@ -6145,6 +7136,9 @@ export interface MinCapacityCapability { readonly value?: number; } +// @public +export type MoveOperationMode = string; + // @public export interface Name { localizedValue?: string; @@ -6175,14 +7169,6 @@ export interface OperationDisplay { readonly resource?: string; } -// @public -export interface OperationImpact { - readonly changeValueAbsolute?: number; - readonly changeValueRelative?: number; - readonly name?: string; - readonly unit?: string; -} - // @public export interface OperationListResult { readonly nextLink?: string; @@ -6201,51 +7187,31 @@ export interface Operations { } // @public -export interface OperationsHealth extends ProxyResource { - readonly description?: string; - readonly health?: string; - readonly namePropertiesName?: string; -} - -// @public -export interface OperationsHealthListByLocationNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationsHealthListByLocationNextResponse = OperationsHealthListResult; - -// @public -export interface OperationsHealthListByLocationOptionalParams extends coreClient.OperationOptions { +export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { } // @public -export type OperationsHealthListByLocationResponse = OperationsHealthListResult; +export type OperationsListNextResponse = OperationListResult; // @public -export interface OperationsHealthListResult { - readonly nextLink?: string; - readonly value?: OperationsHealth[]; +export interface OperationsListOptionalParams extends coreClient.OperationOptions { } // @public -export interface OperationsHealthOperations { - listByLocation(locationName: string, options?: OperationsHealthListByLocationOptionalParams): PagedAsyncIterableIterator; -} +export type OperationsListResponse = OperationListResult; // @public -export interface OperationsListNextOptionalParams extends coreClient.OperationOptions { +export interface OutboundEnvironmentEndpoint { + readonly category?: string; + readonly endpoints?: EndpointDependency[]; } // @public -export type OperationsListNextResponse = OperationListResult; - -// @public -export interface OperationsListOptionalParams extends coreClient.OperationOptions { +export interface OutboundEnvironmentEndpointCollection { + readonly nextLink?: string; + readonly value?: OutboundEnvironmentEndpoint[]; } -// @public -export type OperationsListResponse = OperationListResult; - // @public export interface OutboundFirewallRule extends ProxyResource { readonly provisioningState?: string; @@ -6259,8 +7225,8 @@ export interface OutboundFirewallRuleListResult { // @public export interface OutboundFirewallRules { - beginCreateOrUpdate(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, parameters: OutboundFirewallRule, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams): Promise, OutboundFirewallRulesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, parameters: OutboundFirewallRule, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams): Promise, OutboundFirewallRulesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams): Promise; beginDelete(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, options?: OutboundFirewallRulesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, options?: OutboundFirewallRulesDeleteOptionalParams): Promise; get(resourceGroupName: string, serverName: string, outboundRuleFqdn: string, options?: OutboundFirewallRulesGetOptionalParams): Promise; @@ -6329,13 +7295,22 @@ export interface PerformanceLevelCapability { export type PerformanceLevelUnit = string; // @public -export type PrimaryAggregationType = string; +export type Phase = string; + +// @public +export interface PhaseDetails { + readonly phase?: Phase; + readonly phaseInformation?: { + [propertyName: string]: string; + }; +} // @public export type PrincipalType = string; // @public export interface PrivateEndpointConnection extends ProxyResource { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: PrivateEndpointProvisioningState; @@ -6349,6 +7324,7 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnectionProperties { + readonly groupIds?: string[]; privateEndpoint?: PrivateEndpointProperty; privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; readonly provisioningState?: PrivateEndpointProvisioningState; @@ -6484,6 +7460,13 @@ export interface ProxyResource extends Resource { export interface ProxyResourceWithWritableName extends ResourceWithWritableName { } +// @public +export interface QueryCheck { + readonly columnNames?: string[]; + readonly expectedResult?: string[][]; + readonly query?: string; +} + // @public export interface QueryMetricInterval { readonly executionCount?: number; @@ -6647,13 +7630,17 @@ export interface RecommendedSensitivityLabelUpdateList { export interface RecoverableDatabase extends ProxyResource { readonly edition?: string; readonly elasticPoolName?: string; + keys?: { + [propertyName: string]: DatabaseKey; + }; readonly lastAvailableBackupDate?: Date; readonly serviceLevelObjective?: string; } // @public export interface RecoverableDatabaseListResult { - value: RecoverableDatabase[]; + readonly nextLink?: string; + readonly value?: RecoverableDatabase[]; } // @public @@ -6664,11 +7651,20 @@ export interface RecoverableDatabases { // @public export interface RecoverableDatabasesGetOptionalParams extends coreClient.OperationOptions { + expand?: string; + filter?: string; } // @public export type RecoverableDatabasesGetResponse = RecoverableDatabase; +// @public +export interface RecoverableDatabasesListByServerNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RecoverableDatabasesListByServerNextResponse = RecoverableDatabaseListResult; + // @public export interface RecoverableDatabasesListByServerOptionalParams extends coreClient.OperationOptions { } @@ -6714,11 +7710,30 @@ export interface RecoverableManagedDatabasesListByInstanceOptionalParams extends // @public export type RecoverableManagedDatabasesListByInstanceResponse = RecoverableManagedDatabaseListResult; +// @public +export interface RefreshExternalGovernanceStatusOperationResult extends ProxyResource { + readonly errorMessage?: string; + readonly queuedTime?: string; + readonly requestId?: string; + readonly requestType?: string; + readonly serverName?: string; + readonly status?: string; +} + +// @public +export interface Remediation { + readonly automated?: boolean; + readonly description?: string; + readonly portalLink?: string; + readonly scripts?: string[]; +} + // @public export interface ReplicationLink extends ProxyResource { readonly isTerminationAllowed?: boolean; readonly linkType?: ReplicationLinkType; readonly partnerDatabase?: string; + readonly partnerDatabaseId?: string; readonly partnerLocation?: string; readonly partnerRole?: ReplicationRole; readonly partnerServer?: string; @@ -6737,13 +7752,12 @@ export interface ReplicationLinkListResult { // @public export interface ReplicationLinks { - beginFailover(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverOptionalParams): Promise, void>>; - beginFailoverAllowDataLoss(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverAllowDataLossOptionalParams): Promise, void>>; - beginFailoverAllowDataLossAndWait(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverAllowDataLossOptionalParams): Promise; - beginFailoverAndWait(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverOptionalParams): Promise; - beginUnlink(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, parameters: UnlinkParameters, options?: ReplicationLinksUnlinkOptionalParams): Promise, void>>; - beginUnlinkAndWait(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, parameters: UnlinkParameters, options?: ReplicationLinksUnlinkOptionalParams): Promise; - delete(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksDeleteOptionalParams): Promise; + beginDelete(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksDeleteOptionalParams): Promise; + beginFailover(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverOptionalParams): Promise, ReplicationLinksFailoverResponse>>; + beginFailoverAllowDataLoss(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverAllowDataLossOptionalParams): Promise, ReplicationLinksFailoverAllowDataLossResponse>>; + beginFailoverAllowDataLossAndWait(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverAllowDataLossOptionalParams): Promise; + beginFailoverAndWait(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksFailoverOptionalParams): Promise; get(resourceGroupName: string, serverName: string, databaseName: string, linkId: string, options?: ReplicationLinksGetOptionalParams): Promise; listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: ReplicationLinksListByDatabaseOptionalParams): PagedAsyncIterableIterator; listByServer(resourceGroupName: string, serverName: string, options?: ReplicationLinksListByServerOptionalParams): PagedAsyncIterableIterator; @@ -6751,6 +7765,8 @@ export interface ReplicationLinks { // @public export interface ReplicationLinksDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -6759,12 +7775,18 @@ export interface ReplicationLinksFailoverAllowDataLossOptionalParams extends cor updateIntervalInMs?: number; } +// @public +export type ReplicationLinksFailoverAllowDataLossResponse = ReplicationLink; + // @public export interface ReplicationLinksFailoverOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } +// @public +export type ReplicationLinksFailoverResponse = ReplicationLink; + // @public export interface ReplicationLinksGetOptionalParams extends coreClient.OperationOptions { } @@ -6801,13 +7823,10 @@ export interface ReplicationLinksListByServerOptionalParams extends coreClient.O export type ReplicationLinksListByServerResponse = ReplicationLinkListResult; // @public -export interface ReplicationLinksUnlinkOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} +export type ReplicationLinkType = string; // @public -export type ReplicationLinkType = string; +export type ReplicationMode = string; // @public export type ReplicationRole = "Primary" | "Secondary" | "NonReadableSecondary" | "Source" | "Copy"; @@ -6854,6 +7873,9 @@ export interface RestorableDroppedDatabase extends ProxyResource { readonly databaseName?: string; readonly deletionDate?: Date; readonly earliestRestoreDate?: Date; + keys?: { + [propertyName: string]: DatabaseKey; + }; location?: string; readonly maxSizeBytes?: number; sku?: Sku; @@ -6876,6 +7898,8 @@ export interface RestorableDroppedDatabases { // @public export interface RestorableDroppedDatabasesGetOptionalParams extends coreClient.OperationOptions { + expand?: string; + filter?: string; } // @public @@ -7000,15 +8024,41 @@ export type RestorePointsListByDatabaseResponse = RestorePointListResult; // @public export type RestorePointType = "CONTINUOUS" | "DISCRETE"; +// @public +export type RoleChangeType = string; + +// @public +export type RuleSeverity = string; + +// @public +export type RuleStatus = string; + +// @public +export type RuleType = string; + // @public export type SampleName = string; +// @public +export interface ScheduleItem { + startDay: DayOfWeek; + startTime: string; + stopDay: DayOfWeek; + stopTime: string; +} + +// @public +export type SecondaryInstanceType = string; + // @public export type SecondaryType = string; // @public export type SecurityAlertPolicyName = string; +// @public +export type SecurityAlertPolicyNameAutoGenerated = string; + // @public export type SecurityAlertPolicyState = "New" | "Enabled" | "Disabled"; @@ -7085,6 +8135,7 @@ export interface SensitivityLabels { disableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: SensitivityLabelsDisableRecommendationOptionalParams): Promise; enableRecommendation(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: SensitivityLabelsEnableRecommendationOptionalParams): Promise; get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: SensitivityLabelSource, options?: SensitivityLabelsGetOptionalParams): Promise; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: SensitivityLabelsListByDatabaseOptionalParams): PagedAsyncIterableIterator; listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: SensitivityLabelsListCurrentByDatabaseOptionalParams): PagedAsyncIterableIterator; listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: SensitivityLabelsListRecommendedByDatabaseOptionalParams): PagedAsyncIterableIterator; update(resourceGroupName: string, serverName: string, databaseName: string, parameters: SensitivityLabelUpdateList, options?: SensitivityLabelsUpdateOptionalParams): Promise; @@ -7116,6 +8167,21 @@ export interface SensitivityLabelsGetOptionalParams extends coreClient.Operation // @public export type SensitivityLabelsGetResponse = SensitivityLabel; +// @public +export interface SensitivityLabelsListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SensitivityLabelsListByDatabaseNextResponse = SensitivityLabelListResult; + +// @public +export interface SensitivityLabelsListByDatabaseOptionalParams extends coreClient.OperationOptions { + filter?: string; +} + +// @public +export type SensitivityLabelsListByDatabaseResponse = SensitivityLabelListResult; + // @public export interface SensitivityLabelsListCurrentByDatabaseNextOptionalParams extends coreClient.OperationOptions { } @@ -7184,6 +8250,7 @@ export interface Server extends TrackedResource { administratorLogin?: string; administratorLoginPassword?: string; administrators?: ServerExternalAdministrator; + readonly externalGovernanceStatus?: ExternalGovernanceStatus; federatedClientId?: string; readonly fullyQualifiedDomainName?: string; identity?: ResourceIdentity; @@ -7192,7 +8259,7 @@ export interface Server extends TrackedResource { minimalTlsVersion?: string; primaryUserAssignedIdentityId?: string; readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; - publicNetworkAccess?: ServerNetworkAccessFlag; + publicNetworkAccess?: ServerPublicNetworkAccessFlag; restrictOutboundNetworkAccess?: ServerNetworkAccessFlag; readonly state?: string; version?: string; @@ -7200,14 +8267,59 @@ export interface Server extends TrackedResource { } // @public -export interface ServerAdvisors { - get(resourceGroupName: string, serverName: string, advisorName: string, options?: ServerAdvisorsGetOptionalParams): Promise; - listByServer(resourceGroupName: string, serverName: string, options?: ServerAdvisorsListByServerOptionalParams): Promise; - update(resourceGroupName: string, serverName: string, advisorName: string, parameters: Advisor, options?: ServerAdvisorsUpdateOptionalParams): Promise; +export interface ServerAdvancedThreatProtection extends ProxyResource { + readonly creationTime?: Date; + state?: AdvancedThreatProtectionState; + readonly systemData?: SystemData; } // @public -export interface ServerAdvisorsGetOptionalParams extends coreClient.OperationOptions { +export interface ServerAdvancedThreatProtectionSettings { + beginCreateOrUpdate(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: ServerAdvancedThreatProtection, options?: ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams): Promise, ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, parameters: ServerAdvancedThreatProtection, options?: ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, advancedThreatProtectionName: AdvancedThreatProtectionName, options?: ServerAdvancedThreatProtectionSettingsGetOptionalParams): Promise; + listByServer(resourceGroupName: string, serverName: string, options?: ServerAdvancedThreatProtectionSettingsListByServerOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse = ServerAdvancedThreatProtection; + +// @public +export interface ServerAdvancedThreatProtectionSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerAdvancedThreatProtectionSettingsGetResponse = ServerAdvancedThreatProtection; + +// @public +export interface ServerAdvancedThreatProtectionSettingsListByServerNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerAdvancedThreatProtectionSettingsListByServerNextResponse = LogicalServerAdvancedThreatProtectionListResult; + +// @public +export interface ServerAdvancedThreatProtectionSettingsListByServerOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerAdvancedThreatProtectionSettingsListByServerResponse = LogicalServerAdvancedThreatProtectionListResult; + +// @public +export interface ServerAdvisors { + get(resourceGroupName: string, serverName: string, advisorName: string, options?: ServerAdvisorsGetOptionalParams): Promise; + listByServer(resourceGroupName: string, serverName: string, options?: ServerAdvisorsListByServerOptionalParams): Promise; + update(resourceGroupName: string, serverName: string, advisorName: string, parameters: Advisor, options?: ServerAdvisorsUpdateOptionalParams): Promise; +} + +// @public +export interface ServerAdvisorsGetOptionalParams extends coreClient.OperationOptions { } // @public @@ -7406,6 +8518,7 @@ export interface ServerBlobAuditingPolicy extends ProxyResource { auditActionsAndGroups?: string[]; isAzureMonitorTargetEnabled?: boolean; isDevopsAuditEnabled?: boolean; + isManagedIdentityInUse?: boolean; isStorageSecondaryKeyInUse?: boolean; queueDelayMs?: number; retentionDays?: number; @@ -7422,53 +8535,57 @@ export interface ServerBlobAuditingPolicyListResult { } // @public -export interface ServerCommunicationLink extends ProxyResource { - readonly kind?: string; - readonly location?: string; - partnerServer?: string; - readonly state?: string; +export interface ServerConfigurationOption extends ProxyResource { + readonly provisioningState?: ProvisioningState; + serverConfigurationOptionValue?: number; } // @public -export interface ServerCommunicationLinkListResult { - value?: ServerCommunicationLink[]; +export interface ServerConfigurationOptionListResult { + readonly nextLink?: string; + readonly value?: ServerConfigurationOption[]; } // @public -export interface ServerCommunicationLinks { - beginCreateOrUpdate(resourceGroupName: string, serverName: string, communicationLinkName: string, parameters: ServerCommunicationLink, options?: ServerCommunicationLinksCreateOrUpdateOptionalParams): Promise, ServerCommunicationLinksCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, communicationLinkName: string, parameters: ServerCommunicationLink, options?: ServerCommunicationLinksCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, serverName: string, communicationLinkName: string, options?: ServerCommunicationLinksDeleteOptionalParams): Promise; - get(resourceGroupName: string, serverName: string, communicationLinkName: string, options?: ServerCommunicationLinksGetOptionalParams): Promise; - listByServer(resourceGroupName: string, serverName: string, options?: ServerCommunicationLinksListByServerOptionalParams): PagedAsyncIterableIterator; +export type ServerConfigurationOptionName = string; + +// @public +export interface ServerConfigurationOptions { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, serverConfigurationOptionName: ServerConfigurationOptionName, parameters: ServerConfigurationOption, options?: ServerConfigurationOptionsCreateOrUpdateOptionalParams): Promise, ServerConfigurationOptionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, serverConfigurationOptionName: ServerConfigurationOptionName, parameters: ServerConfigurationOption, options?: ServerConfigurationOptionsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, serverConfigurationOptionName: ServerConfigurationOptionName, options?: ServerConfigurationOptionsGetOptionalParams): Promise; + listByManagedInstance(resourceGroupName: string, managedInstanceName: string, options?: ServerConfigurationOptionsListByManagedInstanceOptionalParams): PagedAsyncIterableIterator; } // @public -export interface ServerCommunicationLinksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +export interface ServerConfigurationOptionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; } // @public -export type ServerCommunicationLinksCreateOrUpdateResponse = ServerCommunicationLink; +export type ServerConfigurationOptionsCreateOrUpdateResponse = ServerConfigurationOption; // @public -export interface ServerCommunicationLinksDeleteOptionalParams extends coreClient.OperationOptions { +export interface ServerConfigurationOptionsGetOptionalParams extends coreClient.OperationOptions { } // @public -export interface ServerCommunicationLinksGetOptionalParams extends coreClient.OperationOptions { +export type ServerConfigurationOptionsGetResponse = ServerConfigurationOption; + +// @public +export interface ServerConfigurationOptionsListByManagedInstanceNextOptionalParams extends coreClient.OperationOptions { } // @public -export type ServerCommunicationLinksGetResponse = ServerCommunicationLink; +export type ServerConfigurationOptionsListByManagedInstanceNextResponse = ServerConfigurationOptionListResult; // @public -export interface ServerCommunicationLinksListByServerOptionalParams extends coreClient.OperationOptions { +export interface ServerConfigurationOptionsListByManagedInstanceOptionalParams extends coreClient.OperationOptions { } // @public -export type ServerCommunicationLinksListByServerResponse = ServerCommunicationLinkListResult; +export type ServerConfigurationOptionsListByManagedInstanceResponse = ServerConfigurationOptionListResult; // @public export interface ServerConnectionPolicies { @@ -7527,6 +8644,7 @@ export type ServerConnectionType = string; // @public export interface ServerDevOpsAuditingSettings extends ProxyResource { isAzureMonitorTargetEnabled?: boolean; + isManagedIdentityInUse?: boolean; state?: BlobAuditingPolicyState; storageAccountAccessKey?: string; storageAccountSubscriptionId?: string; @@ -7536,9 +8654,9 @@ export interface ServerDevOpsAuditingSettings extends ProxyResource { // @public export interface ServerDevOpsAuditSettings { - beginCreateOrUpdate(resourceGroupName: string, serverName: string, devOpsAuditingSettingsName: string, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams): Promise, ServerDevOpsAuditSettingsCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, devOpsAuditingSettingsName: string, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serverName: string, devOpsAuditingSettingsName: string, options?: ServerDevOpsAuditSettingsGetOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, devOpsAuditingSettingsName: DevOpsAuditingSettingsName, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams): Promise, ServerDevOpsAuditSettingsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, devOpsAuditingSettingsName: DevOpsAuditingSettingsName, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, devOpsAuditingSettingsName: DevOpsAuditingSettingsName, options?: ServerDevOpsAuditSettingsGetOptionalParams): Promise; listByServer(resourceGroupName: string, serverName: string, options?: ServerDevOpsAuditSettingsListByServerOptionalParams): PagedAsyncIterableIterator; } @@ -7790,6 +8908,9 @@ export interface ServerPrivateEndpointConnection { readonly properties?: PrivateEndpointConnectionProperties; } +// @public +export type ServerPublicNetworkAccessFlag = string; + // @public export interface Servers { beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: Server, options?: ServersCreateOrUpdateOptionalParams): Promise, ServersCreateOrUpdateResponse>>; @@ -7798,6 +8919,8 @@ export interface Servers { beginDeleteAndWait(resourceGroupName: string, serverName: string, options?: ServersDeleteOptionalParams): Promise; beginImportDatabase(resourceGroupName: string, serverName: string, parameters: ImportNewDatabaseDefinition, options?: ServersImportDatabaseOptionalParams): Promise, ServersImportDatabaseResponse>>; beginImportDatabaseAndWait(resourceGroupName: string, serverName: string, parameters: ImportNewDatabaseDefinition, options?: ServersImportDatabaseOptionalParams): Promise; + beginRefreshStatus(resourceGroupName: string, serverName: string, options?: ServersRefreshStatusOptionalParams): Promise, ServersRefreshStatusResponse>>; + beginRefreshStatusAndWait(resourceGroupName: string, serverName: string, options?: ServersRefreshStatusOptionalParams): Promise; beginUpdate(resourceGroupName: string, serverName: string, parameters: ServerUpdate, options?: ServersUpdateOptionalParams): Promise, ServersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, serverName: string, parameters: ServerUpdate, options?: ServersUpdateOptionalParams): Promise; checkNameAvailability(parameters: CheckNameAvailabilityRequest, options?: ServersCheckNameAvailabilityOptionalParams): Promise; @@ -7830,9 +8953,9 @@ export interface ServersDeleteOptionalParams extends coreClient.OperationOptions // @public export interface ServerSecurityAlertPolicies { - beginCreateOrUpdate(resourceGroupName: string, serverName: string, securityAlertPolicyName: SecurityAlertPolicyName, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise, ServerSecurityAlertPoliciesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, securityAlertPolicyName: SecurityAlertPolicyName, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise; - get(resourceGroupName: string, serverName: string, securityAlertPolicyName: SecurityAlertPolicyName, options?: ServerSecurityAlertPoliciesGetOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise, ServerSecurityAlertPoliciesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, options?: ServerSecurityAlertPoliciesGetOptionalParams): Promise; listByServer(resourceGroupName: string, serverName: string, options?: ServerSecurityAlertPoliciesListByServerOptionalParams): PagedAsyncIterableIterator; } @@ -7926,6 +9049,15 @@ export interface ServersListOptionalParams extends coreClient.OperationOptions { // @public export type ServersListResponse = ServerListResult; +// @public +export interface ServersRefreshStatusOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ServersRefreshStatusResponse = RefreshExternalGovernanceStatusOperationResult; + // @public export interface ServersUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -7935,6 +9067,65 @@ export interface ServersUpdateOptionalParams extends coreClient.OperationOptions // @public export type ServersUpdateResponse = Server; +// @public +export interface ServerTrustCertificate extends ProxyResource { + readonly certificateName?: string; + publicBlob?: string; + readonly thumbprint?: string; +} + +// @public +export interface ServerTrustCertificates { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, certificateName: string, parameters: ServerTrustCertificate, options?: ServerTrustCertificatesCreateOrUpdateOptionalParams): Promise, ServerTrustCertificatesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, managedInstanceName: string, certificateName: string, parameters: ServerTrustCertificate, options?: ServerTrustCertificatesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, managedInstanceName: string, certificateName: string, options?: ServerTrustCertificatesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, managedInstanceName: string, certificateName: string, options?: ServerTrustCertificatesDeleteOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, certificateName: string, options?: ServerTrustCertificatesGetOptionalParams): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: ServerTrustCertificatesListByInstanceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ServerTrustCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ServerTrustCertificatesCreateOrUpdateResponse = ServerTrustCertificate; + +// @public +export interface ServerTrustCertificatesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ServerTrustCertificatesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerTrustCertificatesGetResponse = ServerTrustCertificate; + +// @public +export interface ServerTrustCertificatesListByInstanceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerTrustCertificatesListByInstanceNextResponse = ServerTrustCertificatesListResult; + +// @public +export interface ServerTrustCertificatesListByInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerTrustCertificatesListByInstanceResponse = ServerTrustCertificatesListResult; + +// @public +export interface ServerTrustCertificatesListResult { + readonly nextLink?: string; + readonly value?: ServerTrustCertificate[]; +} + // @public export interface ServerTrustGroup extends ProxyResource { groupMembers?: ServerInfo[]; @@ -8016,6 +9207,7 @@ export interface ServerUpdate { administratorLogin?: string; administratorLoginPassword?: string; administrators?: ServerExternalAdministrator; + readonly externalGovernanceStatus?: ExternalGovernanceStatus; federatedClientId?: string; readonly fullyQualifiedDomainName?: string; identity?: ResourceIdentity; @@ -8023,7 +9215,7 @@ export interface ServerUpdate { minimalTlsVersion?: string; primaryUserAssignedIdentityId?: string; readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; - publicNetworkAccess?: ServerNetworkAccessFlag; + publicNetworkAccess?: ServerPublicNetworkAccessFlag; restrictOutboundNetworkAccess?: ServerNetworkAccessFlag; readonly state?: string; tags?: { @@ -8034,19 +9226,17 @@ export interface ServerUpdate { } // @public -export interface ServerUsage { +export interface ServerUsage extends ProxyResource { readonly currentValue?: number; readonly displayName?: string; readonly limit?: number; - readonly name?: string; - readonly nextResetTime?: Date; - readonly resourceName?: string; readonly unit?: string; } // @public export interface ServerUsageListResult { - value: ServerUsage[]; + readonly nextLink?: string; + readonly value?: ServerUsage[]; } // @public @@ -8054,6 +9244,13 @@ export interface ServerUsages { listByServer(resourceGroupName: string, serverName: string, options?: ServerUsagesListByServerOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface ServerUsagesListByServerNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServerUsagesListByServerNextResponse = ServerUsageListResult; + // @public export interface ServerUsagesListByServerOptionalParams extends coreClient.OperationOptions { } @@ -8127,15 +9324,6 @@ export type ServerVulnerabilityAssessmentsListByServerResponse = ServerVulnerabi // @public export type ServerWorkspaceFeature = string; -// @public -export interface ServiceObjective extends ProxyResource { - readonly description?: string; - readonly enabled?: boolean; - readonly isDefault?: boolean; - readonly isSystem?: boolean; - readonly serviceObjectiveName?: string; -} - // @public export interface ServiceObjectiveCapability { readonly computeModel?: string; @@ -8151,37 +9339,10 @@ export interface ServiceObjectiveCapability { readonly supportedMaintenanceConfigurations?: MaintenanceConfigurationCapability[]; readonly supportedMaxSizes?: MaxSizeRangeCapability[]; readonly supportedMinCapacities?: MinCapacityCapability[]; + readonly zonePinning?: boolean; readonly zoneRedundant?: boolean; } -// @public -export interface ServiceObjectiveListResult { - value: ServiceObjective[]; -} - -// @public -export type ServiceObjectiveName = string; - -// @public -export interface ServiceObjectives { - get(resourceGroupName: string, serverName: string, serviceObjectiveName: string, options?: ServiceObjectivesGetOptionalParams): Promise; - listByServer(resourceGroupName: string, serverName: string, options?: ServiceObjectivesListByServerOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ServiceObjectivesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceObjectivesGetResponse = ServiceObjective; - -// @public -export interface ServiceObjectivesListByServerOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ServiceObjectivesListByServerResponse = ServiceObjectiveListResult; - // @public export interface ServicePrincipal { readonly clientId?: string; @@ -8205,13 +9366,6 @@ export interface Sku { tier?: string; } -// @public -export interface SloUsageMetric { - readonly inRangeTimeRatio?: number; - readonly serviceLevelObjective?: ServiceObjectiveName; - readonly serviceLevelObjectiveId?: string; -} - // @public export interface SqlAgent { createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: SqlAgentConfiguration, options?: SqlAgentCreateOrUpdateOptionalParams): Promise; @@ -8246,10 +9400,14 @@ export class SqlManagementClient extends coreClient.ServiceClient { $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: SqlManagementClientOptionalParams); // (undocumented) + apiVersion: string; + // (undocumented) backupShortTermRetentionPolicies: BackupShortTermRetentionPolicies; // (undocumented) capabilities: Capabilities; // (undocumented) + databaseAdvancedThreatProtectionSettings: DatabaseAdvancedThreatProtectionSettings; + // (undocumented) databaseAdvisors: DatabaseAdvisors; // (undocumented) databaseAutomaticTuningOperations: DatabaseAutomaticTuningOperations; @@ -8258,6 +9416,8 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) databaseColumns: DatabaseColumns; // (undocumented) + databaseEncryptionProtectors: DatabaseEncryptionProtectors; + // (undocumented) databaseExtensionsOperations: DatabaseExtensionsOperations; // (undocumented) databaseOperations: DatabaseOperations; @@ -8270,6 +9430,18 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) databaseSecurityAlertPolicies: DatabaseSecurityAlertPolicies; // (undocumented) + databaseSqlVulnerabilityAssessmentBaselines: DatabaseSqlVulnerabilityAssessmentBaselines; + // (undocumented) + databaseSqlVulnerabilityAssessmentExecuteScan: DatabaseSqlVulnerabilityAssessmentExecuteScan; + // (undocumented) + databaseSqlVulnerabilityAssessmentRuleBaselines: DatabaseSqlVulnerabilityAssessmentRuleBaselines; + // (undocumented) + databaseSqlVulnerabilityAssessmentScanResult: DatabaseSqlVulnerabilityAssessmentScanResult; + // (undocumented) + databaseSqlVulnerabilityAssessmentScans: DatabaseSqlVulnerabilityAssessmentScans; + // (undocumented) + databaseSqlVulnerabilityAssessmentsSettings: DatabaseSqlVulnerabilityAssessmentsSettings; + // (undocumented) databaseTables: DatabaseTables; // (undocumented) databaseUsages: DatabaseUsages; @@ -8288,9 +9460,7 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) deletedServers: DeletedServers; // (undocumented) - elasticPoolActivities: ElasticPoolActivities; - // (undocumented) - elasticPoolDatabaseActivities: ElasticPoolDatabaseActivities; + distributedAvailabilityGroups: DistributedAvailabilityGroups; // (undocumented) elasticPoolOperations: ElasticPoolOperations; // (undocumented) @@ -8298,6 +9468,8 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) encryptionProtectors: EncryptionProtectors; // (undocumented) + endpointCertificates: EndpointCertificates; + // (undocumented) extendedDatabaseBlobAuditingPolicies: ExtendedDatabaseBlobAuditingPolicies; // (undocumented) extendedServerBlobAuditingPolicies: ExtendedServerBlobAuditingPolicies; @@ -8312,6 +9484,8 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) instancePools: InstancePools; // (undocumented) + iPv6FirewallRules: IPv6FirewallRules; + // (undocumented) jobAgents: JobAgents; // (undocumented) jobCredentials: JobCredentials; @@ -8344,8 +9518,12 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) managedBackupShortTermRetentionPolicies: ManagedBackupShortTermRetentionPolicies; // (undocumented) + managedDatabaseAdvancedThreatProtectionSettings: ManagedDatabaseAdvancedThreatProtectionSettings; + // (undocumented) managedDatabaseColumns: ManagedDatabaseColumns; // (undocumented) + managedDatabaseMoveOperations: ManagedDatabaseMoveOperations; + // (undocumented) managedDatabaseQueries: ManagedDatabaseQueries; // (undocumented) managedDatabaseRecommendedSensitivityLabels: ManagedDatabaseRecommendedSensitivityLabels; @@ -8374,8 +9552,12 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) managedInstanceAdministrators: ManagedInstanceAdministrators; // (undocumented) + managedInstanceAdvancedThreatProtectionSettings: ManagedInstanceAdvancedThreatProtectionSettings; + // (undocumented) managedInstanceAzureADOnlyAuthentications: ManagedInstanceAzureADOnlyAuthentications; // (undocumented) + managedInstanceDtcs: ManagedInstanceDtcs; + // (undocumented) managedInstanceEncryptionProtectors: ManagedInstanceEncryptionProtectors; // (undocumented) managedInstanceKeys: ManagedInstanceKeys; @@ -8394,14 +9576,16 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) managedInstanceVulnerabilityAssessments: ManagedInstanceVulnerabilityAssessments; // (undocumented) + managedLedgerDigestUploadsOperations: ManagedLedgerDigestUploadsOperations; + // (undocumented) managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; // (undocumented) + managedServerDnsAliases: ManagedServerDnsAliases; + // (undocumented) managedServerSecurityAlertPolicies: ManagedServerSecurityAlertPolicies; // (undocumented) operations: Operations; // (undocumented) - operationsHealthOperations: OperationsHealthOperations; - // (undocumented) outboundFirewallRules: OutboundFirewallRules; // (undocumented) privateEndpointConnections: PrivateEndpointConnections; @@ -8424,6 +9608,8 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) sensitivityLabels: SensitivityLabels; // (undocumented) + serverAdvancedThreatProtectionSettings: ServerAdvancedThreatProtectionSettings; + // (undocumented) serverAdvisors: ServerAdvisors; // (undocumented) serverAutomaticTuningOperations: ServerAutomaticTuningOperations; @@ -8434,7 +9620,7 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) serverBlobAuditingPolicies: ServerBlobAuditingPolicies; // (undocumented) - serverCommunicationLinks: ServerCommunicationLinks; + serverConfigurationOptions: ServerConfigurationOptions; // (undocumented) serverConnectionPolicies: ServerConnectionPolicies; // (undocumented) @@ -8450,20 +9636,42 @@ export class SqlManagementClient extends coreClient.ServiceClient { // (undocumented) serverSecurityAlertPolicies: ServerSecurityAlertPolicies; // (undocumented) + serverTrustCertificates: ServerTrustCertificates; + // (undocumented) serverTrustGroups: ServerTrustGroups; // (undocumented) serverUsages: ServerUsages; // (undocumented) serverVulnerabilityAssessments: ServerVulnerabilityAssessments; // (undocumented) - serviceObjectives: ServiceObjectives; - // (undocumented) sqlAgent: SqlAgent; // (undocumented) + sqlVulnerabilityAssessmentBaseline: SqlVulnerabilityAssessmentBaseline; + // (undocumented) + sqlVulnerabilityAssessmentBaselines: SqlVulnerabilityAssessmentBaselines; + // (undocumented) + sqlVulnerabilityAssessmentExecuteScan: SqlVulnerabilityAssessmentExecuteScan; + // (undocumented) + sqlVulnerabilityAssessmentRuleBaseline: SqlVulnerabilityAssessmentRuleBaseline; + // (undocumented) + sqlVulnerabilityAssessmentRuleBaselines: SqlVulnerabilityAssessmentRuleBaselines; + // (undocumented) + sqlVulnerabilityAssessments: SqlVulnerabilityAssessments; + // (undocumented) + sqlVulnerabilityAssessmentScanResult: SqlVulnerabilityAssessmentScanResult; + // (undocumented) + sqlVulnerabilityAssessmentScans: SqlVulnerabilityAssessmentScans; + // (undocumented) + sqlVulnerabilityAssessmentsSettings: SqlVulnerabilityAssessmentsSettings; + // (undocumented) + startStopManagedInstanceSchedules: StartStopManagedInstanceSchedules; + // (undocumented) subscriptionId: string; // (undocumented) subscriptionUsages: SubscriptionUsages; // (undocumented) + synapseLinkWorkspaces: SynapseLinkWorkspaces; + // (undocumented) syncAgents: SyncAgents; // (undocumented) syncGroups: SyncGroups; @@ -8490,9 +9698,339 @@ export class SqlManagementClient extends coreClient.ServiceClient { // @public export interface SqlManagementClientOptionalParams extends coreClient.ServiceClientOptions { $host?: string; + apiVersion?: string; endpoint?: string; } +// @public +export interface SqlVulnerabilityAssessment extends ProxyResource { + state?: SqlVulnerabilityAssessmentState; + readonly systemData?: SystemData; +} + +// @public +export interface SqlVulnerabilityAssessmentBaseline { + get(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, options?: SqlVulnerabilityAssessmentBaselineGetOptionalParams): Promise; + listBySqlVulnerabilityAssessment(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SqlVulnerabilityAssessmentBaselineGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentBaselineGetResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; + +// @public +export interface SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; + +// @public +export interface SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; + +// @public +export interface SqlVulnerabilityAssessmentBaselines { + createOrUpdate(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, options?: SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams): Promise; +} + +// @public +export interface SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; + +// @public +export interface SqlVulnerabilityAssessmentExecuteScan { + beginExecute(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams): Promise, void>>; + beginExecuteAndWait(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams): Promise; +} + +// @public +export interface SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface SqlVulnerabilityAssessmentListResult { + readonly nextLink?: string; + readonly value?: SqlVulnerabilityAssessment[]; +} + +// @public +export type SQLVulnerabilityAssessmentName = string; + +// @public +export type SqlVulnerabilityAssessmentName = string; + +// @public +export interface SqlVulnerabilityAssessmentRuleBaseline { + createOrUpdate(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, ruleId: string, parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, options?: SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, ruleId: string, options?: SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams): Promise; + listByBaseline(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; + +// @public +export interface SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentRuleBaselineGetResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; + +// @public +export interface SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; + +// @public +export interface SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentRuleBaselineListByBaselineResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; + +// @public +export interface SqlVulnerabilityAssessmentRuleBaselines { + delete(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, baselineName: BaselineName, ruleId: string, options?: SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams): Promise; +} + +// @public +export interface SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SqlVulnerabilityAssessments { + delete(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: SqlVulnerabilityAssessmentsDeleteOptionalParams): Promise; +} + +// @public +export interface SqlVulnerabilityAssessmentScanError { + readonly code?: string; + readonly message?: string; +} + +// @public +export interface SQLVulnerabilityAssessmentScanListResult { + readonly nextLink?: string; + readonly value?: SqlVulnerabilityAssessmentScanResults[]; +} + +// @public +export interface SqlVulnerabilityAssessmentScanRecord extends ProxyResource { + readonly database?: string; + readonly endTime?: Date; + readonly errors?: SqlVulnerabilityAssessmentScanError[]; + readonly highSeverityFailedRulesCount?: number; + readonly isBaselineApplied?: boolean; + readonly lastScanTime?: Date; + readonly lowSeverityFailedRulesCount?: number; + readonly mediumSeverityFailedRulesCount?: number; + readonly scanId?: string; + readonly server?: string; + readonly sqlVersion?: string; + readonly startTime?: Date; + readonly state?: VulnerabilityAssessmentScanState; + readonly systemData?: SystemData; + readonly totalFailedRulesCount?: number; + readonly totalPassedRulesCount?: number; + readonly totalRulesCount?: number; + readonly triggerType?: VulnerabilityAssessmentScanTriggerType; +} + +// @public +export interface SqlVulnerabilityAssessmentScanRecordListResult { + readonly nextLink?: string; + readonly value?: SqlVulnerabilityAssessmentScanRecord[]; +} + +// @public +export interface SqlVulnerabilityAssessmentScanResult { + get(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, scanId: string, scanResultId: string, options?: SqlVulnerabilityAssessmentScanResultGetOptionalParams): Promise; + listByScan(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, scanId: string, options?: SqlVulnerabilityAssessmentScanResultListByScanOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SqlVulnerabilityAssessmentScanResultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentScanResultGetResponse = SqlVulnerabilityAssessmentScanResults; + +// @public +export interface SqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentScanResultListByScanNextResponse = SQLVulnerabilityAssessmentScanListResult; + +// @public +export interface SqlVulnerabilityAssessmentScanResultListByScanOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentScanResultListByScanResponse = SQLVulnerabilityAssessmentScanListResult; + +// @public (undocumented) +export interface SqlVulnerabilityAssessmentScanResults extends ProxyResource { + readonly baselineAdjustedResult?: BaselineAdjustedResult; + readonly errorMessage?: string; + readonly isTrimmed?: boolean; + readonly queryResults?: string[][]; + readonly remediation?: Remediation; + readonly ruleId?: string; + readonly ruleMetadata?: VaRule; + readonly status?: RuleStatus; + readonly systemData?: SystemData; +} + +// @public +export interface SqlVulnerabilityAssessmentScans { + get(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, options?: SqlVulnerabilityAssessmentScansGetOptionalParams): Promise; + listBySqlVulnerabilityAssessments(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SqlVulnerabilityAssessmentScansGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentScansGetResponse = SqlVulnerabilityAssessmentScanRecord; + +// @public +export interface SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse = SqlVulnerabilityAssessmentScanRecordListResult; + +// @public +export interface SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse = SqlVulnerabilityAssessmentScanRecordListResult; + +// @public +export interface SqlVulnerabilityAssessmentsDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface SqlVulnerabilityAssessmentsSettings { + createOrUpdate(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, parameters: SqlVulnerabilityAssessment, options?: SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams): Promise; + get(resourceGroupName: string, serverName: string, vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName, options?: SqlVulnerabilityAssessmentsSettingsGetOptionalParams): Promise; + listByServer(resourceGroupName: string, serverName: string, options?: SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentsSettingsCreateOrUpdateResponse = SqlVulnerabilityAssessment; + +// @public +export interface SqlVulnerabilityAssessmentsSettingsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentsSettingsGetResponse = SqlVulnerabilityAssessment; + +// @public +export interface SqlVulnerabilityAssessmentsSettingsListByServerNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentsSettingsListByServerNextResponse = SqlVulnerabilityAssessmentListResult; + +// @public +export interface SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlVulnerabilityAssessmentsSettingsListByServerResponse = SqlVulnerabilityAssessmentListResult; + +// @public +export type SqlVulnerabilityAssessmentState = "Enabled" | "Disabled"; + +// @public +export interface StartStopManagedInstanceSchedule extends ProxyResource { + description?: string; + readonly nextExecutionTime?: string; + readonly nextRunAction?: string; + scheduleList?: ScheduleItem[]; + readonly systemData?: SystemData; + timeZoneId?: string; +} + +// @public +export interface StartStopManagedInstanceScheduleListResult { + readonly nextLink?: string; + readonly value?: StartStopManagedInstanceSchedule[]; +} + +// @public +export interface StartStopManagedInstanceSchedules { + createOrUpdate(resourceGroupName: string, managedInstanceName: string, startStopScheduleName: StartStopScheduleName, parameters: StartStopManagedInstanceSchedule, options?: StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, managedInstanceName: string, startStopScheduleName: StartStopScheduleName, options?: StartStopManagedInstanceSchedulesDeleteOptionalParams): Promise; + get(resourceGroupName: string, managedInstanceName: string, startStopScheduleName: StartStopScheduleName, options?: StartStopManagedInstanceSchedulesGetOptionalParams): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: StartStopManagedInstanceSchedulesListByInstanceOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StartStopManagedInstanceSchedulesCreateOrUpdateResponse = StartStopManagedInstanceSchedule; + +// @public +export interface StartStopManagedInstanceSchedulesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface StartStopManagedInstanceSchedulesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StartStopManagedInstanceSchedulesGetResponse = StartStopManagedInstanceSchedule; + +// @public +export interface StartStopManagedInstanceSchedulesListByInstanceNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StartStopManagedInstanceSchedulesListByInstanceNextResponse = StartStopManagedInstanceScheduleListResult; + +// @public +export interface StartStopManagedInstanceSchedulesListByInstanceOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type StartStopManagedInstanceSchedulesListByInstanceResponse = StartStopManagedInstanceScheduleListResult; + +// @public +export type StartStopScheduleName = string; + +// @public +export type Status = string; + // @public export interface StorageCapability { reason?: string; @@ -8547,6 +10085,42 @@ export interface SubscriptionUsagesListByLocationOptionalParams extends coreClie // @public export type SubscriptionUsagesListByLocationResponse = SubscriptionUsageListResult; +// @public +export interface SynapseLinkWorkspace extends ProxyResource { + workspaces?: SynapseLinkWorkspaceInfoProperties[]; +} + +// @public +export interface SynapseLinkWorkspaceInfoProperties { + linkConnectionName?: string; + workspaceId?: string; +} + +// @public +export interface SynapseLinkWorkspaceListResult { + readonly nextLink?: string; + readonly value?: SynapseLinkWorkspace[]; +} + +// @public +export interface SynapseLinkWorkspaces { + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: SynapseLinkWorkspacesListByDatabaseOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface SynapseLinkWorkspacesListByDatabaseNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SynapseLinkWorkspacesListByDatabaseNextResponse = SynapseLinkWorkspaceListResult; + +// @public +export interface SynapseLinkWorkspacesListByDatabaseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SynapseLinkWorkspacesListByDatabaseResponse = SynapseLinkWorkspaceListResult; + // @public export interface SyncAgent extends ProxyResource { readonly expiryTime?: Date; @@ -8762,7 +10336,7 @@ export interface SyncGroups { get(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: SyncGroupsGetOptionalParams): Promise; listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: SyncGroupsListByDatabaseOptionalParams): PagedAsyncIterableIterator; listHubSchemas(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: SyncGroupsListHubSchemasOptionalParams): PagedAsyncIterableIterator; - listLogs(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, startTime: string, endTime: string, typeParam: Enum60, options?: SyncGroupsListLogsOptionalParams): PagedAsyncIterableIterator; + listLogs(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, startTime: string, endTime: string, typeParam: SyncGroupsType, options?: SyncGroupsListLogsOptionalParams): PagedAsyncIterableIterator; listSyncDatabaseIds(locationName: string, options?: SyncGroupsListSyncDatabaseIdsOptionalParams): PagedAsyncIterableIterator; triggerSync(resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, options?: SyncGroupsTriggerSyncOptionalParams): Promise; } @@ -8882,6 +10456,9 @@ export type SyncGroupState = string; export interface SyncGroupsTriggerSyncOptionalParams extends coreClient.OperationOptions { } +// @public +export type SyncGroupsType = string; + // @public export interface SyncGroupsUpdateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -9099,13 +10676,16 @@ export type TransparentDataEncryptionName = string; // @public export interface TransparentDataEncryptions { - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, tdeName: TransparentDataEncryptionName, parameters: LogicalDatabaseTransparentDataEncryption, options?: TransparentDataEncryptionsCreateOrUpdateOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, tdeName: TransparentDataEncryptionName, parameters: LogicalDatabaseTransparentDataEncryption, options?: TransparentDataEncryptionsCreateOrUpdateOptionalParams): Promise, TransparentDataEncryptionsCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, serverName: string, databaseName: string, tdeName: TransparentDataEncryptionName, parameters: LogicalDatabaseTransparentDataEncryption, options?: TransparentDataEncryptionsCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, serverName: string, databaseName: string, tdeName: TransparentDataEncryptionName, options?: TransparentDataEncryptionsGetOptionalParams): Promise; listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: TransparentDataEncryptionsListByDatabaseOptionalParams): PagedAsyncIterableIterator; } // @public export interface TransparentDataEncryptionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public @@ -9135,25 +10715,14 @@ export type TransparentDataEncryptionsListByDatabaseResponse = LogicalDatabaseTr // @public export type TransparentDataEncryptionState = "Enabled" | "Disabled"; -// @public -export type UnitDefinitionType = string; - -// @public -export type UnitType = string; - -// @public -export interface UnlinkParameters { - forcedTermination?: boolean; -} - // @public export interface UpdateLongTermRetentionBackupParameters { requestedBackupStorageRedundancy?: BackupStorageRedundancy; } // @public -export interface UpdateManagedInstanceDnsServersOperation extends ProxyResource { - readonly status?: DnsRefreshConfigurationPropertiesStatus; +export interface UpdateVirtualClusterDnsServersOperation extends ProxyResource { + readonly status?: DNSRefreshOperationStatus; } // @public (undocumented) @@ -9169,18 +10738,21 @@ export interface UpsertManagedServerOperationParameters { } // @public (undocumented) -export interface UpsertManagedServerOperationStep { +export interface UpsertManagedServerOperationStepWithEstimatesAndDuration { // (undocumented) name?: string; // (undocumented) order?: number; // (undocumented) - status?: UpsertManagedServerOperationStepStatus; + status?: Status; + // (undocumented) + stepEndTime?: Date; + // (undocumented) + stepStartTime?: Date; + // (undocumented) + timeElapsed?: string; } -// @public -export type UpsertManagedServerOperationStepStatus = string; - // @public export interface Usage { readonly currentValue?: number; @@ -9224,12 +10796,24 @@ export interface UserIdentity { readonly principalId?: string; } +// @public +export interface VaRule { + readonly benchmarkReferences?: BenchmarkReference[]; + readonly category?: string; + readonly description?: string; + readonly queryCheck?: QueryCheck; + readonly rationale?: string; + readonly ruleId?: string; + readonly ruleType?: RuleType; + readonly severity?: RuleSeverity; + readonly title?: string; +} + // @public export interface VirtualCluster extends TrackedResource { readonly childResources?: string[]; - family?: string; - maintenanceConfigurationId?: string; readonly subnetId?: string; + version?: string; } // @public @@ -9244,10 +10828,11 @@ export interface VirtualClusters { beginDeleteAndWait(resourceGroupName: string, virtualClusterName: string, options?: VirtualClustersDeleteOptionalParams): Promise; beginUpdate(resourceGroupName: string, virtualClusterName: string, parameters: VirtualClusterUpdate, options?: VirtualClustersUpdateOptionalParams): Promise, VirtualClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, virtualClusterName: string, parameters: VirtualClusterUpdate, options?: VirtualClustersUpdateOptionalParams): Promise; + beginUpdateDnsServers(resourceGroupName: string, virtualClusterName: string, options?: VirtualClustersUpdateDnsServersOptionalParams): Promise, VirtualClustersUpdateDnsServersResponse>>; + beginUpdateDnsServersAndWait(resourceGroupName: string, virtualClusterName: string, options?: VirtualClustersUpdateDnsServersOptionalParams): Promise; get(resourceGroupName: string, virtualClusterName: string, options?: VirtualClustersGetOptionalParams): Promise; list(options?: VirtualClustersListOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: VirtualClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; - updateDnsServers(resourceGroupName: string, virtualClusterName: string, options?: VirtualClustersUpdateDnsServersOptionalParams): Promise; } // @public @@ -9293,10 +10878,12 @@ export type VirtualClustersListResponse = VirtualClusterListResult; // @public export interface VirtualClustersUpdateDnsServersOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type VirtualClustersUpdateDnsServersResponse = UpdateManagedInstanceDnsServersOperation; +export type VirtualClustersUpdateDnsServersResponse = UpdateVirtualClusterDnsServersOperation; // @public export interface VirtualClustersUpdateOptionalParams extends coreClient.OperationOptions { @@ -9310,12 +10897,11 @@ export type VirtualClustersUpdateResponse = VirtualCluster; // @public export interface VirtualClusterUpdate { readonly childResources?: string[]; - family?: string; - maintenanceConfigurationId?: string; readonly subnetId?: string; tags?: { [propertyName: string]: string; }; + version?: string; } // @public diff --git a/sdk/sql/arm-sql/src/models/index.ts b/sdk/sql/arm-sql/src/models/index.ts index 9664861b8b04..ec07aa98f49c 100644 --- a/sdk/sql/arm-sql/src/models/index.ts +++ b/sdk/sql/arm-sql/src/models/index.ts @@ -8,262 +8,88 @@ import * as coreClient from "@azure/core-client"; -/** ARM resource. */ -export interface Resource { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * Resource name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * Resource type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; -} - -/** The response to a list recoverable databases request */ -export interface RecoverableDatabaseListResult { - /** A list of recoverable databases */ - value: RecoverableDatabase[]; -} - -/** The response to a list data masking rules request. */ -export interface DataMaskingRuleListResult { - /** The list of database data masking rules. */ - value?: DataMaskingRule[]; -} - -/** The response to a list geo backup policies request. */ -export interface GeoBackupPolicyListResult { - /** The list of geo backup policies. */ - value?: GeoBackupPolicy[]; -} - -/** The response to a list database metrics request. */ -export interface MetricListResult { - /** The list of metrics for the database. */ - value: Metric[]; -} - -/** Database metrics. */ -export interface Metric { - /** - * 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; - /** - * 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; - /** - * 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; - /** - * The unit of the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly unit?: UnitType; - /** - * The name information for the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: MetricName; - /** - * 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[]; -} - -/** A database metric name. */ -export interface MetricName { +/** A list of short term retention policies. */ +export interface BackupShortTermRetentionPolicyListResult { /** - * The name of the database metric. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: string; + readonly value?: BackupShortTermRetentionPolicy[]; /** - * The friendly name of the database metric. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly localizedValue?: string; + readonly nextLink?: string; } -/** Represents database metrics. */ -export interface MetricValue { - /** - * 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; - /** - * The average value of the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly average?: number; - /** - * The max value of the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maximum?: number; +/** ARM resource. */ +export interface Resource { /** - * The min value of the metric. + * Resource ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly minimum?: number; + readonly id?: string; /** - * The metric timestamp (ISO-8601 format). + * Resource name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timestamp?: Date; + readonly name?: string; /** - * The total value of the metric. + * Resource type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly total?: number; -} - -/** The response to a list database metric definitions request. */ -export interface MetricDefinitionListResult { - /** The list of metric definitions for the database. */ - value: MetricDefinition[]; + readonly type?: string; } -/** A database metric definition. */ -export interface MetricDefinition { - /** - * The name information for the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: MetricName; - /** - * The primary aggregation type defining how metric values are displayed. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly primaryAggregationType?: PrimaryAggregationType; - /** - * The resource uri of the database. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceUri?: string; +/** A list of server auditing settings. */ +export interface ServerBlobAuditingPolicyListResult { /** - * The unit of the metric. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: UnitDefinitionType; + readonly value?: ServerBlobAuditingPolicy[]; /** - * The list of database metric availabilities for the metric. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly metricAvailabilities?: MetricAvailability[]; + readonly nextLink?: string; } -/** A metric availability value. */ -export interface MetricAvailability { +/** A list of database auditing settings. */ +export interface DatabaseBlobAuditingPolicyListResult { /** - * The length of retention for the database metric. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly retention?: string; + readonly value?: DatabaseBlobAuditingPolicy[]; /** - * The granularity of the database metric. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timeGrain?: string; -} - -/** Represents the parameters for Unlink Replication Link request. */ -export interface UnlinkParameters { - /** Determines whether link will be terminated in a forced or a friendly way. */ - forcedTermination?: boolean; -} - -/** A list of server communication links. */ -export interface ServerCommunicationLinkListResult { - /** The list of server communication links. */ - value?: ServerCommunicationLink[]; -} - -/** Represents the response to a get database service objectives request. */ -export interface ServiceObjectiveListResult { - /** The list of database service objectives. */ - value: ServiceObjective[]; -} - -/** Represents the response to a list elastic pool activity request. */ -export interface ElasticPoolActivityListResult { - /** The list of elastic pool activities. */ - value: ElasticPoolActivity[]; -} - -/** Represents the response to a list elastic pool database activity request. */ -export interface ElasticPoolDatabaseActivityListResult { - /** The list of elastic pool database activities. */ - value: ElasticPoolDatabaseActivity[]; -} - -/** Represents the response to a list server metrics request. */ -export interface ServerUsageListResult { - /** The list of server metrics for the server. */ - value: ServerUsage[]; + readonly nextLink?: string; } -/** Represents server metrics. */ -export interface ServerUsage { - /** - * Name of the server usage metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The name of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceName?: string; - /** - * The metric display name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * The current value of the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly currentValue?: number; - /** - * The current limit of the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly limit?: number; +/** A list of database extended auditing settings. */ +export interface ExtendedDatabaseBlobAuditingPolicyListResult { /** - * The units of the metric. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; + readonly value?: ExtendedDatabaseBlobAuditingPolicy[]; /** - * The next reset time for the metric (ISO8601 format). + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextResetTime?: Date; + readonly nextLink?: string; } -/** A list of database extended auditing settings. */ -export interface ExtendedDatabaseBlobAuditingPolicyListResult { +/** A list of server extended auditing settings. */ +export interface ExtendedServerBlobAuditingPolicyListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ExtendedDatabaseBlobAuditingPolicy[]; + readonly value?: ExtendedServerBlobAuditingPolicy[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -271,13 +97,13 @@ export interface ExtendedDatabaseBlobAuditingPolicyListResult { readonly nextLink?: string; } -/** A list of server extended auditing settings. */ -export interface ExtendedServerBlobAuditingPolicyListResult { +/** The list of database data masking rules. */ +export interface DataMaskingRuleListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ExtendedServerBlobAuditingPolicy[]; + readonly value?: DataMaskingRule[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -285,13 +111,13 @@ export interface ExtendedServerBlobAuditingPolicyListResult { readonly nextLink?: string; } -/** A list of server auditing settings. */ -export interface ServerBlobAuditingPolicyListResult { +/** User activities of a data warehouse */ +export interface DataWarehouseUserActivitiesListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerBlobAuditingPolicy[]; + readonly value?: DataWarehouseUserActivities[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -299,13 +125,13 @@ export interface ServerBlobAuditingPolicyListResult { readonly nextLink?: string; } -/** A list of database auditing settings. */ -export interface DatabaseBlobAuditingPolicyListResult { +/** A list of the database's Advanced Threat Protection configurations. */ +export interface DatabaseAdvancedThreatProtectionListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseBlobAuditingPolicy[]; + readonly value?: DatabaseAdvancedThreatProtection[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -313,6 +139,22 @@ export interface DatabaseBlobAuditingPolicyListResult { readonly nextLink?: string; } +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + /** Contains information of current state for an Azure SQL Database, Server or Elastic Pool Recommended Action. */ export interface RecommendedActionStateInfo { /** Current state the recommended action is in. Some commonly used states are: Active -> recommended action is active and no action has been taken yet. Pending -> recommended action is approved for and is awaiting execution. Executing -> recommended action is being applied on the user database. Verifying -> recommended action was applied and is being verified of its usefulness by the system. Success -> recommended action was applied and improvement found during verification. Pending Revert -> verification found little or no improvement so recommended action is queued for revert or user has manually reverted. Reverting -> changes made while applying recommended action are being reverted on the user database. Reverted -> successfully reverted the changes made by recommended action on user database. Ignored -> user explicitly ignored/discarded the recommended action. */ @@ -450,13 +292,13 @@ export interface DatabaseColumnListResult { readonly nextLink?: string; } -/** A list of database schemas. */ -export interface DatabaseSchemaListResult { +/** Import export operation extensions list. */ +export interface ImportExportExtensionsOperationListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseSchema[]; + readonly value?: ImportExportExtensionsOperationResult[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -464,43 +306,40 @@ export interface DatabaseSchemaListResult { readonly nextLink?: string; } -/** Metadata pertaining to creation and last modification of the resource. */ -export interface SystemData { - /** The identity that created the resource. */ - createdBy?: string; - /** The type of identity that created the resource. */ - createdByType?: CreatedByType; - /** The timestamp of resource creation (UTC). */ - createdAt?: Date; - /** The identity that last modified the resource. */ - lastModifiedBy?: string; - /** The type of identity that last modified the resource. */ - lastModifiedByType?: CreatedByType; - /** The timestamp of resource last modification (UTC) */ - lastModifiedAt?: Date; -} - -/** A list of the database's security alert policies. */ -export interface DatabaseSecurityAlertListResult { +/** Contains the private endpoint connection requests status. */ +export interface PrivateEndpointConnectionRequestStatus { /** - * Array of results. + * Resource id for which the private endpoint is created. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseSecurityAlertPolicy[]; + readonly privateLinkServiceId?: string; /** - * Link to retrieve next page of results. + * The connection name for the private endpoint. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly privateEndpointConnectionName?: string; + /** + * Status of this private endpoint connection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; } -/** A list of database tables. */ -export interface DatabaseTableListResult { +/** Contains the ARM resources for which to create private endpoint connection. */ +export interface NetworkIsolationSettings { + /** The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter. */ + storageAccountResourceId?: string; + /** The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation. */ + sqlServerResourceId?: string; +} + +/** The response to a list database operations request */ +export interface DatabaseOperationListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseTable[]; + readonly value?: DatabaseOperation[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -508,43 +347,27 @@ export interface DatabaseTableListResult { readonly nextLink?: string; } -/** Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result. */ -export interface DatabaseVulnerabilityAssessmentRuleBaselineItem { - /** The rule baseline result */ - result: string[]; -} - -/** Properties of a Vulnerability Assessment recurring scans. */ -export interface VulnerabilityAssessmentRecurringScansProperties { - /** Recurring scans state. */ - isEnabled?: boolean; - /** Specifies that the schedule scan notification will be is sent to the subscription administrators. */ - emailSubscriptionAdmins?: boolean; - /** Specifies an array of e-mail addresses to which the scan notification is sent. */ - emails?: string[]; -} - -/** A list of the database's vulnerability assessments. */ -export interface DatabaseVulnerabilityAssessmentListResult { +/** The phase details properties of a database operation. */ +export interface PhaseDetails { /** - * Array of results. + * The operation phase. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseVulnerabilityAssessment[]; + readonly phase?: Phase; /** - * Link to retrieve next page of results. + * The operation phase information. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly phaseInformation?: { [propertyName: string]: string }; } -/** A list of vulnerability assessment scan records. */ -export interface VulnerabilityAssessmentScanRecordListResult { +/** A list of database schemas. */ +export interface DatabaseSchemaListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: VulnerabilityAssessmentScanRecord[]; + readonly value?: DatabaseSchema[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -552,27 +375,27 @@ export interface VulnerabilityAssessmentScanRecordListResult { readonly nextLink?: string; } -/** Properties of a vulnerability assessment scan error. */ -export interface VulnerabilityAssessmentScanError { +/** A list of the database's security alert policies. */ +export interface DatabaseSecurityAlertListResult { /** - * The error code. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly code?: string; + readonly value?: DatabaseSecurityAlertPolicy[]; /** - * The error message. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly nextLink?: string; } -/** User activities of a data warehouse */ -export interface DataWarehouseUserActivitiesListResult { +/** A list of SQL Vulnerability Assessments baseline set. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselineSetListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DataWarehouseUserActivities[]; + readonly value?: DatabaseSqlVulnerabilityAssessmentBaselineSet[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -580,13 +403,13 @@ export interface DataWarehouseUserActivitiesListResult { readonly nextLink?: string; } -/** A list of deleted servers. */ -export interface DeletedServerListResult { +/** A list of SQL Vulnerability Assessments rule baseline. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DeletedServer[]; + readonly value?: DatabaseSqlVulnerabilityAssessmentRuleBaseline[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -594,13 +417,13 @@ export interface DeletedServerListResult { readonly nextLink?: string; } -/** The response to a list elastic pool operations request */ -export interface ElasticPoolOperationListResult { +/** A list of vulnerability assessment scan results. */ +export interface SQLVulnerabilityAssessmentScanListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ElasticPoolOperation[]; + readonly value?: SqlVulnerabilityAssessmentScanResults[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -608,273 +431,157 @@ export interface ElasticPoolOperationListResult { readonly nextLink?: string; } -/** The result of an elastic pool list request. */ -export interface ElasticPoolListResult { +/** SQL Vulnerability Assessment remediation Details. */ +export interface Remediation { /** - * Array of results. + * SQL Vulnerability Assessment remediation description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ElasticPool[]; + readonly description?: string; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment remediation script. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** An ARM Resource SKU. */ -export interface Sku { - /** The name of the SKU, typically, a letter + Number code, e.g. P3. */ - name: string; - /** The tier or edition of the particular SKU, e.g. Basic, Premium. */ - tier?: string; - /** Size of the particular SKU */ - size?: string; - /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - family?: string; - /** Capacity of the particular SKU. */ - capacity?: number; -} - -/** Per database settings of an elastic pool. */ -export interface ElasticPoolPerDatabaseSettings { - /** The minimum capacity all databases are guaranteed. */ - minCapacity?: number; - /** The maximum capacity any one database can consume. */ - maxCapacity?: number; -} - -/** An elastic pool update. */ -export interface ElasticPoolUpdate { - /** An ARM Resource SKU. */ - sku?: Sku; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The storage limit for the database elastic pool in bytes. */ - maxSizeBytes?: number; - /** The per database settings for the elastic pool. */ - perDatabaseSettings?: ElasticPoolPerDatabaseSettings; - /** 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; - /** The license type to apply for this elastic pool. */ - licenseType?: ElasticPoolLicenseType; - /** Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. */ - maintenanceConfigurationId?: string; -} - -/** A list of server encryption protectors. */ -export interface EncryptionProtectorListResult { + readonly scripts?: string[]; /** - * Array of results. + * SQL Vulnerability Assessment is remediation automated. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: EncryptionProtector[]; + readonly automated?: boolean; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment optional link to remediate in Azure Portal. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Read-write endpoint of the failover group instance. */ -export interface FailoverGroupReadWriteEndpoint { - /** Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ - failoverPolicy: ReadWriteEndpointFailoverPolicy; - /** Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ - failoverWithDataLossGracePeriodMinutes?: number; -} - -/** Read-only endpoint of the failover group instance. */ -export interface FailoverGroupReadOnlyEndpoint { - /** Failover policy of the read-only endpoint for the failover group. */ - failoverPolicy?: ReadOnlyEndpointFailoverPolicy; + readonly portalLink?: string; } -/** Partner server information for the failover group. */ -export interface PartnerInfo { - /** Resource identifier of the partner server. */ - id: string; +/** SQL Vulnerability Assessment baseline adjusted results */ +export interface BaselineAdjustedResult { /** - * Geo location of the partner server. + * SQL Vulnerability Assessment baseline details * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly baseline?: Baseline; /** - * Replication role of the partner server. + * SQL Vulnerability Assessment baseline status * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationRole?: FailoverGroupReplicationRole; -} - -/** A failover group update request. */ -export interface FailoverGroupUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Read-write endpoint of the failover group instance. */ - readWriteEndpoint?: FailoverGroupReadWriteEndpoint; - /** Read-only endpoint of the failover group instance. */ - readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; - /** List of databases in the failover group. */ - databases?: string[]; -} - -/** A list of failover groups. */ -export interface FailoverGroupListResult { + readonly status?: RuleStatus; /** - * Array of results. + * SQL Vulnerability Assessment results that are not in baseline * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: FailoverGroup[]; + readonly resultsNotInBaseline?: string[][]; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment results that are in baseline. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly resultsOnlyInBaseline?: string[][]; } -/** ARM resource. */ -export interface ResourceWithWritableName { +/** SQL Vulnerability Assessment baseline Details */ +export interface Baseline { /** - * Resource ID. + * SQL Vulnerability Assessment baseline expected results * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; - /** Resource name. */ - name?: string; + readonly expectedResults?: string[][]; /** - * Resource type. + * SQL Vulnerability Assessment baseline update time (UTC) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly updatedTime?: Date; } -/** The response to a list firewall rules request */ -export interface FirewallRuleListResult { +/** SQL Vulnerability Assessment rule metadata details. */ +export interface VaRule { /** - * Array of results. + * SQL Vulnerability Assessment rule Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: FirewallRule[]; + readonly ruleId?: string; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment rule severity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of server firewall rules. */ -export interface FirewallRuleList { - values?: FirewallRule[]; -} - -/** Read-write endpoint of the failover group instance. */ -export interface InstanceFailoverGroupReadWriteEndpoint { - /** Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ - failoverPolicy: ReadWriteEndpointFailoverPolicy; - /** Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ - failoverWithDataLossGracePeriodMinutes?: number; -} - -/** Read-only endpoint of the failover group instance. */ -export interface InstanceFailoverGroupReadOnlyEndpoint { - /** Failover policy of the read-only endpoint for the failover group. */ - failoverPolicy?: ReadOnlyEndpointFailoverPolicy; -} - -/** Partner region information for the failover group. */ -export interface PartnerRegionInfo { - /** Geo location of the partner managed instances. */ - location?: string; + readonly severity?: RuleSeverity; /** - * Replication role of the partner managed instances. + * SQL Vulnerability Assessment rule category. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationRole?: InstanceFailoverGroupReplicationRole; -} - -/** Pairs of Managed Instances in the failover group. */ -export interface ManagedInstancePairInfo { - /** Id of Primary Managed Instance in pair. */ - primaryManagedInstanceId?: string; - /** Id of Partner Managed Instance in pair. */ - partnerManagedInstanceId?: string; -} - -/** A list of instance failover groups. */ -export interface InstanceFailoverGroupListResult { + readonly category?: string; /** - * Array of results. + * SQL Vulnerability Assessment rule type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: InstanceFailoverGroup[]; + readonly ruleType?: RuleType; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment rule title. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** An update to an Instance pool. */ -export interface InstancePoolUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -} - -/** A list of Azure SQL instance pools. */ -export interface InstancePoolListResult { + readonly title?: string; /** - * Array of results. + * SQL Vulnerability Assessment rule description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: InstancePool[]; + readonly description?: string; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment rule rationale. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of Azure SQL job agents. */ -export interface JobAgentListResult { + readonly rationale?: string; /** - * Array of results. + * SQL Vulnerability Assessment rule query details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: JobAgent[]; + readonly queryCheck?: QueryCheck; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment benchmark references. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly benchmarkReferences?: BenchmarkReference[]; } -/** An update to an Azure SQL job agent. */ -export interface JobAgentUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; +/** SQL Vulnerability Assessment query check object. */ +export interface QueryCheck { + /** + * SQL Vulnerability Assessment rule query. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly query?: string; + /** + * SQL Vulnerability Assessment query expected result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly expectedResult?: string[][]; + /** + * SQL Vulnerability Assessment column names of query expected result. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly columnNames?: string[]; } -/** A list of job credentials. */ -export interface JobCredentialListResult { +/** SQL Vulnerability Assessment benchmark reference */ +export interface BenchmarkReference { /** - * Array of results. + * SQL Vulnerability Assessment benchmark name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: JobCredential[]; + readonly benchmark?: string; /** - * Link to retrieve next page of results. + * SQL Vulnerability Assessment benchmark reference. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly reference?: string; } -/** A list of job executions. */ -export interface JobExecutionListResult { +/** A list of vulnerability assessment scan records. */ +export interface SqlVulnerabilityAssessmentScanRecordListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: JobExecution[]; + readonly value?: SqlVulnerabilityAssessmentScanRecord[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -882,32 +589,41 @@ export interface JobExecutionListResult { readonly nextLink?: string; } -/** The target that a job execution is executed on. */ -export interface JobExecutionTarget { +/** Properties of a vulnerability assessment scan error. */ +export interface SqlVulnerabilityAssessmentScanError { /** - * The type of the target. + * The error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: JobTargetType; + readonly code?: string; /** - * The server name. + * The error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly message?: string; +} + +/** A list of SQL Vulnerability Assessments. */ +export interface SqlVulnerabilityAssessmentListResult { /** - * The database name. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly value?: SqlVulnerabilityAssessment[]; + /** + * 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; } -/** A list of jobs. */ -export interface JobListResult { +/** A list of database tables. */ +export interface DatabaseTableListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Job[]; + readonly value?: DatabaseTable[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -915,27 +631,13 @@ export interface JobListResult { readonly nextLink?: string; } -/** Scheduling properties of a job. */ -export interface JobSchedule { - /** Schedule start time. */ - startTime?: Date; - /** Schedule end time. */ - endTime?: Date; - /** Schedule interval type */ - type?: JobScheduleType; - /** Whether or not the schedule is enabled. */ - enabled?: boolean; - /** Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. */ - interval?: string; -} - -/** A list of job steps. */ -export interface JobStepListResult { +/** A list of database usage metrics. */ +export interface DatabaseUsageListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: JobStep[]; + readonly value?: DatabaseUsage[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -943,57 +645,47 @@ export interface JobStepListResult { readonly nextLink?: string; } -/** The action to be executed by a job step. */ -export interface JobStepAction { - /** Type of action being executed by the job step. */ - type?: JobStepActionType; - /** The source of the action to execute. */ - source?: JobStepActionSource; - /** The action value, for example the text of the T-SQL script to execute. */ - value: string; +/** Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result. */ +export interface DatabaseVulnerabilityAssessmentRuleBaselineItem { + /** The rule baseline result */ + result: string[]; } -/** The output configuration of a job step. */ -export interface JobStepOutput { - /** The output destination type. */ - type?: JobStepOutputType; - /** The output destination subscription id. */ - subscriptionId?: string; - /** The output destination resource group. */ - resourceGroupName?: string; - /** The output destination server name. */ - serverName: string; - /** The output destination database. */ - databaseName: string; - /** The output destination schema. */ - schemaName?: string; - /** The output destination table. */ - tableName: string; - /** The resource ID of the credential to use to connect to the output destination. */ - credential: string; +/** A list of vulnerability assessment scan records. */ +export interface VulnerabilityAssessmentScanRecordListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: VulnerabilityAssessmentScanRecord[]; + /** + * 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; } -/** The execution options of a job step. */ -export interface JobStepExecutionOptions { - /** Execution timeout for the job step. */ - timeoutSeconds?: number; - /** Maximum number of times the job step will be reattempted if the first attempt fails. */ - retryAttempts?: number; - /** Initial delay between retries for job step execution. */ - initialRetryIntervalSeconds?: number; - /** The maximum amount of time to wait between retries for job step execution. */ - maximumRetryIntervalSeconds?: number; - /** The backoff multiplier for the time between retries. */ - retryIntervalBackoffMultiplier?: number; +/** Properties of a vulnerability assessment scan error. */ +export interface VulnerabilityAssessmentScanError { + /** + * The error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly code?: string; + /** + * The error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; } -/** A list of target groups. */ -export interface JobTargetGroupListResult { +/** A list of the database's vulnerability assessments. */ +export interface DatabaseVulnerabilityAssessmentListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: JobTargetGroup[]; + readonly value?: DatabaseVulnerabilityAssessment[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1001,31 +693,23 @@ export interface JobTargetGroupListResult { readonly nextLink?: string; } -/** A job target, for example a specific database or a container of databases that is evaluated during job execution. */ -export interface JobTarget { - /** Whether the target is included or excluded from the group. */ - membershipType?: JobTargetGroupMembershipType; - /** The target type. */ - type: JobTargetType; - /** The target server name. */ - serverName?: string; - /** The target database name. */ - databaseName?: string; - /** The target elastic pool name. */ - elasticPoolName?: string; - /** The target shard map. */ - shardMapName?: string; - /** 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; +/** Properties of a Vulnerability Assessment recurring scans. */ +export interface VulnerabilityAssessmentRecurringScansProperties { + /** Recurring scans state. */ + isEnabled?: boolean; + /** Specifies that the schedule scan notification will be is sent to the subscription administrators. */ + emailSubscriptionAdmins?: boolean; + /** Specifies an array of e-mail addresses to which the scan notification is sent. */ + emails?: string[]; } -/** A list of job versions. */ -export interface JobVersionListResult { +/** A list of databases. */ +export interface DatabaseListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: JobVersion[]; + readonly value?: Database[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1033,539 +717,827 @@ export interface JobVersionListResult { readonly nextLink?: string; } -/** The location capability. */ -export interface LocationCapabilities { - /** - * The location name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; +/** An ARM Resource SKU. */ +export interface Sku { + /** The name of the SKU, typically, a letter + Number code, e.g. P3. */ + name: string; + /** The tier or edition of the particular SKU, e.g. Basic, Premium. */ + tier?: string; + /** Size of the particular SKU */ + size?: string; + /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ + family?: string; + /** Capacity of the particular SKU. */ + capacity?: number; +} + +/** Azure Active Directory identity configuration for a resource. */ +export interface DatabaseIdentity { + /** The identity type */ + type?: DatabaseIdentityType; /** - * The list of supported server versions. + * The Azure Active Directory tenant id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedServerVersions?: ServerVersionCapability[]; + readonly tenantId?: string; + /** The resource ids of the user assigned identities to use */ + userAssignedIdentities?: { [propertyName: string]: DatabaseUserIdentity }; +} + +/** Azure Active Directory identity configuration for a resource. */ +export interface DatabaseUserIdentity { /** - * The list of supported managed instance versions. + * The Azure Active Directory principal id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedManagedInstanceVersions?: ManagedInstanceVersionCapability[]; + readonly principalId?: string; /** - * The status of the capability. + * The Azure Active Directory client id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly clientId?: string; } -/** The server capability */ -export interface ServerVersionCapability { +/** Database level key used for encryption at rest. */ +export interface DatabaseKey { /** - * The server version name. + * The database key type. Only supported value is 'AzureKeyVault'. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly type?: DatabaseKeyType; /** - * The list of supported database editions. + * Thumbprint of the database key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedEditions?: EditionCapability[]; + readonly thumbprint?: string; /** - * The list of supported elastic pool editions. + * The database key creation date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedElasticPoolEditions?: ElasticPoolEditionCapability[]; + readonly creationDate?: Date; /** - * The status of the capability. + * Subregion of the server key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly subregion?: string; } -/** The edition capability. */ -export interface EditionCapability { +/** A database update resource. */ +export interface DatabaseUpdate { + /** The name and tier of the SKU. */ + sku?: Sku; + /** Database identity */ + identity?: DatabaseIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; /** - * The database edition name. - * NOTE: This property will not be serialized. It can only be populated by the server. + * 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. */ - readonly name?: string; + createMode?: CreateMode; + /** The collation of the database. */ + collation?: string; + /** The max size of the database expressed in bytes. */ + maxSizeBytes?: number; + /** The name of the sample schema to apply when creating this database. */ + sampleName?: SampleName; + /** The resource identifier of the elastic pool containing this database. */ + elasticPoolId?: string; + /** The resource identifier of the source database associated with create operation of this database. */ + sourceDatabaseId?: string; /** - * The list of supported service objectives for the edition. + * The status of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedServiceLevelObjectives?: ServiceObjectiveCapability[]; + readonly status?: DatabaseStatus; /** - * Whether or not zone redundancy is supported for the edition. + * The ID of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zoneRedundant?: boolean; + readonly databaseId?: string; /** - * The read scale capability for the edition. + * The creation date of the database (ISO8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly readScale?: ReadScaleCapability; + readonly creationDate?: Date; /** - * The list of supported storage capabilities for this edition + * 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 supportedStorageCapabilities?: StorageCapability[]; + readonly currentServiceObjectiveName?: string; /** - * The status of the capability. + * 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 status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; -} - -/** The service objectives capability. */ -export interface ServiceObjectiveCapability { + readonly requestedServiceObjectiveName?: string; /** - * The unique ID of the service objective. + * The default secondary region for this database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly defaultSecondaryLocation?: string; /** - * The service objective name. + * 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 name?: string; - /** - * 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[]; - /** - * The performance level. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly performanceLevel?: PerformanceLevelCapability; + readonly failoverGroupId?: string; + /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ + restorePointInTime?: Date; + /** Specifies the time that the database was deleted. */ + sourceDatabaseDeletionDate?: Date; + /** The resource identifier of the recovery point associated with create operation of this database. */ + recoveryServicesRecoveryPointId?: string; + /** The resource identifier of the long term retention backup associated with create operation of this database. */ + longTermRetentionBackupResourceId?: string; + /** The resource identifier of the recoverable database associated with create operation of this database. */ + recoverableDatabaseId?: string; + /** The resource identifier of the restorable dropped database associated with create operation of this database. */ + restorableDroppedDatabaseId?: string; + /** Collation of the metadata catalog. */ + catalogCollation?: CatalogCollationType; + /** Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. */ + zoneRedundant?: boolean; + /** The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. */ + licenseType?: DatabaseLicenseType; /** - * The sku. + * The max log size for this database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sku?: Sku; + readonly maxLogSizeBytes?: number; /** - * List of supported license types. + * 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 supportedLicenseTypes?: LicenseTypeCapability[]; + readonly earliestRestoreDate?: Date; + /** 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. Not applicable to a Hyperscale database within an elastic pool. */ + readScale?: DatabaseReadScale; + /** The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. */ + highAvailabilityReplicaCount?: number; + /** The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. */ + secondaryType?: SecondaryType; /** - * The included (free) max size. + * The name and tier of the SKU. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly includedMaxSize?: MaxSizeCapability; + readonly currentSku?: Sku; + /** Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled */ + autoPauseDelay?: number; /** - * Whether or not zone redundancy is supported for the service objective. + * The storage account type used to store backups for this database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zoneRedundant?: boolean; + readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; + /** The storage account type to be used to store backups for this database. */ + requestedBackupStorageRedundancy?: BackupStorageRedundancy; + /** Minimal capacity that database will always have allocated, if not paused */ + minCapacity?: number; /** - * Supported time range for auto pause delay + * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedAutoPauseDelay?: AutoPauseDelayTimeRange; + readonly pausedDate?: Date; /** - * List of supported min capacities + * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedMinCapacities?: MinCapacityCapability[]; + readonly resumedDate?: Date; + /** Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. */ + maintenanceConfigurationId?: string; + /** Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. */ + isLedgerOn?: boolean; /** - * The compute model + * Infra encryption is enabled for this database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly computeModel?: string; + readonly isInfraEncryptionEnabled?: boolean; + /** The Client id used for cross tenant per database CMK scenario */ + federatedClientId?: string; + /** The resource ids of the user assigned identities to use */ + keys?: { [propertyName: string]: DatabaseKey }; + /** The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. */ + encryptionProtector?: string; + /** Type of enclave requested on the database i.e. Default or VBS enclaves. */ + preferredEnclaveType?: AlwaysEncryptedEnclaveType; /** - * List of supported maintenance configurations - * NOTE: This property will not be serialized. It can only be populated by the server. + * Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier. + * + * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier. + * + * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database. + * + * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. */ - readonly supportedMaintenanceConfigurations?: MaintenanceConfigurationCapability[]; + manualCutover?: boolean; /** - * The status of the capability. - * NOTE: This property will not be serialized. It can only be populated by the server. + * To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress. + * + * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter. + * + * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress. + * + * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + performCutover?: boolean; } -/** The maximum size range capability. */ -export interface MaxSizeRangeCapability { - /** - * Minimum value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly minValue?: MaxSizeCapability; - /** - * Maximum value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly maxValue?: MaxSizeCapability; - /** - * 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; +/** Contains the information necessary to perform export database operation. */ +export interface ExportDatabaseDefinition { + /** Storage key type. */ + storageKeyType: StorageKeyType; + /** Storage key. */ + storageKey: string; + /** Storage Uri. */ + storageUri: string; + /** Administrator login name. */ + administratorLogin: string; + /** Administrator login password. */ + administratorLoginPassword: string; + /** Authentication type. */ + authenticationType?: string; + /** Optional resource information to enable network isolation for request. */ + networkIsolation?: NetworkIsolationSettings; +} + +/** Contains the information necessary to perform import operation for existing database. */ +export interface ImportExistingDatabaseDefinition { + /** Storage key type. */ + storageKeyType: StorageKeyType; + /** Storage key. */ + storageKey: string; + /** Storage Uri. */ + storageUri: string; + /** Administrator login name. */ + administratorLogin: string; + /** Administrator login password. */ + administratorLoginPassword: string; + /** Authentication type. */ + authenticationType?: string; + /** Optional resource information to enable network isolation for request. */ + networkIsolation?: NetworkIsolationSettings; +} + +/** Contains the information necessary to perform a resource move (rename). */ +export interface ResourceMoveDefinition { + /** The target ID for the resource */ + id: string; +} + +/** A list of deleted servers. */ +export interface DeletedServerListResult { /** - * Size of transaction log. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly logSize?: LogSizeCapability; + readonly value?: DeletedServer[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** The maximum size capability. */ -export interface MaxSizeCapability { +/** A list of distributed availability groups in instance. */ +export interface DistributedAvailabilityGroupsListResult { /** - * The maximum size limit (see 'unit' for the units). + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limit?: number; + readonly value?: DistributedAvailabilityGroup[]; /** - * The units that the limit is expressed in. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: MaxSizeUnit; + readonly nextLink?: string; } -/** The log size capability. */ -export interface LogSizeCapability { +/** Distributed availability group failover request. */ +export interface DistributedAvailabilityGroupSetRole { + /** New role of managed instance in a distributed availability group, can be Primary or Secondary. */ + instanceRole: InstanceRole; + /** The type of the role change, can be Planned or Forced. */ + roleChangeType: RoleChangeType; +} + +/** The response to a list elastic pool operations request */ +export interface ElasticPoolOperationListResult { /** - * The log size limit (see 'unit' for the units). + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limit?: number; + readonly value?: ElasticPoolOperation[]; /** - * The units that the limit is expressed in. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: LogSizeUnit; + readonly nextLink?: string; } -/** The performance level capability. */ -export interface PerformanceLevelCapability { +/** The result of an elastic pool list request. */ +export interface ElasticPoolListResult { /** - * Performance level value. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: number; + readonly value?: ElasticPool[]; /** - * Unit type used to measure performance level. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: PerformanceLevelUnit; + readonly nextLink?: string; } -/** The license type capability */ -export interface LicenseTypeCapability { +/** Per database settings of an elastic pool. */ +export interface ElasticPoolPerDatabaseSettings { + /** The minimum capacity all databases are guaranteed. */ + minCapacity?: number; + /** The maximum capacity any one database can consume. */ + maxCapacity?: number; +} + +/** An elastic pool update. */ +export interface ElasticPoolUpdate { + /** An ARM Resource SKU. */ + sku?: Sku; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The storage limit for the database elastic pool in bytes. */ + maxSizeBytes?: number; + /** Minimal capacity that serverless pool will not shrink below, if not paused */ + minCapacity?: number; + /** The per database settings for the elastic pool. */ + perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + /** 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; + /** The license type to apply for this elastic pool. */ + licenseType?: ElasticPoolLicenseType; + /** Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. */ + maintenanceConfigurationId?: string; + /** The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. */ + highAvailabilityReplicaCount?: number; + /** Type of enclave requested on the elastic pool. */ + preferredEnclaveType?: AlwaysEncryptedEnclaveType; + /** Specifies the availability zone the pool's primary replica is pinned to. */ + availabilityZone?: AvailabilityZoneType; +} + +/** A list of server encryption protectors. */ +export interface EncryptionProtectorListResult { /** - * License type identifier. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly value?: EncryptionProtector[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** Supported auto pause delay time range */ -export interface AutoPauseDelayTimeRange { +/** A list of endpoint certificates on the target instance. */ +export interface EndpointCertificateListResult { /** - * Minimum value + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly minValue?: number; + readonly value?: EndpointCertificate[]; /** - * Maximum value + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxValue?: number; + readonly nextLink?: string; +} + +/** A list of failover groups. */ +export interface FailoverGroupListResult { /** - * Step value for discrete values between the minimum value and the maximum value. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly stepSize?: number; + readonly value?: FailoverGroup[]; /** - * Default value is no value is provided + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly default?: number; - /** - * Unit of time that delay is expressed in - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly unit?: PauseDelayTimeUnit; - /** - * Value that is used to not pause (infinite delay before pause) - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly doNotPauseValue?: number; + readonly nextLink?: string; } -/** The min capacity capability */ -export interface MinCapacityCapability { +/** Read-write endpoint of the failover group instance. */ +export interface FailoverGroupReadWriteEndpoint { + /** Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ + failoverPolicy: ReadWriteEndpointFailoverPolicy; + /** Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ + failoverWithDataLossGracePeriodMinutes?: number; +} + +/** Read-only endpoint of the failover group instance. */ +export interface FailoverGroupReadOnlyEndpoint { + /** Failover policy of the read-only endpoint for the failover group. */ + failoverPolicy?: ReadOnlyEndpointFailoverPolicy; +} + +/** Partner server information for the failover group. */ +export interface PartnerInfo { + /** Resource identifier of the partner server. */ + id: string; /** - * Min capacity value + * Geo location of the partner server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: number; + readonly location?: string; /** - * The status of the capability. + * Replication role of the partner server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly replicationRole?: FailoverGroupReplicationRole; } -/** The maintenance configuration capability */ -export interface MaintenanceConfigurationCapability { - /** - * Maintenance configuration name - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; +/** A failover group update request. */ +export interface FailoverGroupUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Read-write endpoint of the failover group instance. */ + readWriteEndpoint?: FailoverGroupReadWriteEndpoint; + /** Read-only endpoint of the failover group instance. */ + readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; + /** List of databases in the failover group. */ + databases?: string[]; +} + +/** The response to a list firewall rules request */ +export interface FirewallRuleListResult { /** - * Whether or not zone redundancy is supported for the maintenance configuration. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zoneRedundant?: boolean; + readonly value?: FirewallRule[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** The read scale capability. */ -export interface ReadScaleCapability { +/** ARM resource. */ +export interface ResourceWithWritableName { /** - * The maximum number of read scale replicas. + * Resource ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxNumberOfReplicas?: number; + readonly id?: string; + /** Resource name. */ + name?: string; /** - * The status of the capability. + * Resource type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly type?: string; } -/** The storage account type capability. */ -export interface StorageCapability { +/** A list of server firewall rules. */ +export interface FirewallRuleList { + values?: FirewallRule[]; +} + +/** The list of geo backup policies. */ +export interface GeoBackupPolicyListResult { /** - * The storage account type for the database's backups. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly storageAccountType?: StorageCapabilityStorageAccountType; + readonly value?: GeoBackupPolicy[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** The elastic pool edition capability. */ -export interface ElasticPoolEditionCapability { +/** The response to a list IPv6 firewall rules request */ +export interface IPv6FirewallRuleListResult { /** - * The elastic pool edition name. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly value?: IPv6FirewallRule[]; /** - * The list of supported elastic pool DTU levels for the edition. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedElasticPoolPerformanceLevels?: ElasticPoolPerformanceLevelCapability[]; + readonly nextLink?: string; +} + +/** A list of instance failover groups. */ +export interface InstanceFailoverGroupListResult { /** - * Whether or not zone redundancy is supported for the edition. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zoneRedundant?: boolean; + readonly value?: InstanceFailoverGroup[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** The Elastic Pool performance level capability. */ -export interface ElasticPoolPerformanceLevelCapability { - /** - * The performance level for the pool. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly performanceLevel?: PerformanceLevelCapability; +/** Read-write endpoint of the failover group instance. */ +export interface InstanceFailoverGroupReadWriteEndpoint { + /** Failover policy of the read-write endpoint for the failover group. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ + failoverPolicy: ReadWriteEndpointFailoverPolicy; + /** Grace period before failover with data loss is attempted for the read-write endpoint. If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. */ + failoverWithDataLossGracePeriodMinutes?: number; +} + +/** Read-only endpoint of the failover group instance. */ +export interface InstanceFailoverGroupReadOnlyEndpoint { + /** Failover policy of the read-only endpoint for the failover group. */ + failoverPolicy?: ReadOnlyEndpointFailoverPolicy; +} + +/** Partner region information for the failover group. */ +export interface PartnerRegionInfo { + /** Geo location of the partner managed instances. */ + location?: string; /** - * The sku. + * Replication role of the partner managed instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sku?: Sku; + readonly replicationRole?: InstanceFailoverGroupReplicationRole; +} + +/** Pairs of Managed Instances in the failover group. */ +export interface ManagedInstancePairInfo { + /** Id of Primary Managed Instance in pair. */ + primaryManagedInstanceId?: string; + /** Id of Partner Managed Instance in pair. */ + partnerManagedInstanceId?: string; +} + +/** A list of Azure SQL instance pools. */ +export interface InstancePoolListResult { /** - * List of supported license types. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedLicenseTypes?: LicenseTypeCapability[]; + readonly value?: InstancePool[]; /** - * The maximum number of databases supported. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxDatabaseCount?: number; + readonly nextLink?: string; +} + +/** An update to an Instance pool. */ +export interface InstancePoolUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** A list of Azure SQL job agents. */ +export interface JobAgentListResult { /** - * The included (free) max size for this performance level. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly includedMaxSize?: MaxSizeCapability; + readonly value?: JobAgent[]; /** - * The list of supported max sizes. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedMaxSizes?: MaxSizeRangeCapability[]; + readonly nextLink?: string; +} + +/** An update to an Azure SQL job agent. */ +export interface JobAgentUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** A list of job credentials. */ +export interface JobCredentialListResult { /** - * The list of supported per database max sizes. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedPerDatabaseMaxSizes?: MaxSizeRangeCapability[]; + readonly value?: JobCredential[]; /** - * The list of supported per database max performance levels. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedPerDatabaseMaxPerformanceLevels?: ElasticPoolPerDatabaseMaxPerformanceLevelCapability[]; + readonly nextLink?: string; +} + +/** A list of job executions. */ +export interface JobExecutionListResult { /** - * Whether or not zone redundancy is supported for the performance level. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zoneRedundant?: boolean; + readonly value?: JobExecution[]; /** - * List of supported maintenance configurations + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedMaintenanceConfigurations?: MaintenanceConfigurationCapability[]; + readonly nextLink?: string; +} + +/** The target that a job execution is executed on. */ +export interface JobExecutionTarget { /** - * The status of the capability. + * The type of the target. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; -} - -/** The max per-database performance level capability. */ -export interface ElasticPoolPerDatabaseMaxPerformanceLevelCapability { + readonly type?: JobTargetType; /** - * The maximum performance level per database. + * The server name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limit?: number; + readonly serverName?: string; /** - * Unit type used to measure performance level. + * The database name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: PerformanceLevelUnit; + readonly databaseName?: string; +} + +/** A list of job steps. */ +export interface JobStepListResult { /** - * The list of supported min database performance levels. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedPerDatabaseMinPerformanceLevels?: ElasticPoolPerDatabaseMinPerformanceLevelCapability[]; + readonly value?: JobStep[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** The minimum per-database performance level capability. */ -export interface ElasticPoolPerDatabaseMinPerformanceLevelCapability { +/** The action to be executed by a job step. */ +export interface JobStepAction { + /** Type of action being executed by the job step. */ + type?: JobStepActionType; + /** The source of the action to execute. */ + source?: JobStepActionSource; + /** The action value, for example the text of the T-SQL script to execute. */ + value: string; +} + +/** The output configuration of a job step. */ +export interface JobStepOutput { + /** The output destination type. */ + type?: JobStepOutputType; + /** The output destination subscription id. */ + subscriptionId?: string; + /** The output destination resource group. */ + resourceGroupName?: string; + /** The output destination server name. */ + serverName: string; + /** The output destination database. */ + databaseName: string; + /** The output destination schema. */ + schemaName?: string; + /** The output destination table. */ + tableName: string; + /** The resource ID of the credential to use to connect to the output destination. */ + credential: string; +} + +/** The execution options of a job step. */ +export interface JobStepExecutionOptions { + /** Execution timeout for the job step. */ + timeoutSeconds?: number; + /** Maximum number of times the job step will be reattempted if the first attempt fails. */ + retryAttempts?: number; + /** Initial delay between retries for job step execution. */ + initialRetryIntervalSeconds?: number; + /** The maximum amount of time to wait between retries for job step execution. */ + maximumRetryIntervalSeconds?: number; + /** The backoff multiplier for the time between retries. */ + retryIntervalBackoffMultiplier?: number; +} + +/** A list of target groups. */ +export interface JobTargetGroupListResult { /** - * The minimum performance level per database. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limit?: number; + readonly value?: JobTargetGroup[]; /** - * Unit type used to measure performance level. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: PerformanceLevelUnit; + readonly nextLink?: string; +} + +/** A job target, for example a specific database or a container of databases that is evaluated during job execution. */ +export interface JobTarget { + /** Whether the target is included or excluded from the group. */ + membershipType?: JobTargetGroupMembershipType; + /** The target type. */ + type: JobTargetType; + /** The target server name. */ + serverName?: string; + /** The target database name. */ + databaseName?: string; + /** The target elastic pool name. */ + elasticPoolName?: string; + /** The target shard map. */ + shardMapName?: string; + /** 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; +} + +/** A list of job versions. */ +export interface JobVersionListResult { /** - * The status of the capability. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly value?: JobVersion[]; + /** + * 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; } -/** The managed instance capability */ -export interface ManagedInstanceVersionCapability { +/** A list of jobs. */ +export interface JobListResult { /** - * The server version name. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly value?: Job[]; /** - * The list of supported managed instance editions. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedEditions?: ManagedInstanceEditionCapability[]; + readonly nextLink?: string; +} + +/** Scheduling properties of a job. */ +export interface JobSchedule { + /** Schedule start time. */ + startTime?: Date; + /** Schedule end time. */ + endTime?: Date; + /** Schedule interval type */ + type?: JobScheduleType; + /** Whether or not the schedule is enabled. */ + enabled?: boolean; + /** Value of the schedule's recurring interval, if the ScheduleType is recurring. ISO8601 duration format. */ + interval?: string; +} + +/** A list of ledger digest upload settings. */ +export interface LedgerDigestUploadsListResult { /** - * The list of supported instance pool editions. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedInstancePoolEditions?: InstancePoolEditionCapability[]; + readonly value?: LedgerDigestUploads[]; /** - * The status of the capability. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; + readonly nextLink?: string; } -/** The managed server capability */ -export interface ManagedInstanceEditionCapability { +/** The location capability. */ +export interface LocationCapabilities { /** - * The managed server version name. + * The location name. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The supported families. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly supportedFamilies?: ManagedInstanceFamilyCapability[]; - /** - * The list of supported storage capabilities for this edition + * The list of supported server versions. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedStorageCapabilities?: StorageCapability[]; + readonly supportedServerVersions?: ServerVersionCapability[]; /** - * Whether or not zone redundancy is supported for the edition. + * The list of supported managed instance versions. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly zoneRedundant?: boolean; + readonly supportedManagedInstanceVersions?: ManagedInstanceVersionCapability[]; /** * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1575,28 +1547,23 @@ export interface ManagedInstanceEditionCapability { reason?: string; } -/** The managed server family capability. */ -export interface ManagedInstanceFamilyCapability { +/** The server capability */ +export interface ServerVersionCapability { /** - * Family name. + * The server version name. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * SKU name. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly sku?: string; - /** - * List of supported license types. + * The list of supported database editions. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedLicenseTypes?: LicenseTypeCapability[]; + readonly supportedEditions?: EditionCapability[]; /** - * List of supported virtual cores values. + * The list of supported elastic pool editions. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedVcoresValues?: ManagedInstanceVcoresCapability[]; + readonly supportedElasticPoolEditions?: ElasticPoolEditionCapability[]; /** * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1606,43 +1573,38 @@ export interface ManagedInstanceFamilyCapability { reason?: string; } -/** The managed instance virtual cores capability. */ -export interface ManagedInstanceVcoresCapability { +/** The edition capability. */ +export interface EditionCapability { /** - * The virtual cores identifier. + * The database edition name. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The virtual cores value. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: number; - /** - * Included size. + * 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 includedMaxSize?: MaxSizeCapability; + readonly supportedServiceLevelObjectives?: ServiceObjectiveCapability[]; /** - * Storage size ranges. + * 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 supportedStorageSizes?: MaxSizeRangeCapability[]; + readonly zoneRedundant?: boolean; /** - * True if this service objective is supported for managed instances in an instance pool. + * The read scale capability for the edition. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instancePoolSupported?: boolean; + readonly readScale?: ReadScaleCapability; /** - * True if this service objective is supported for standalone managed instances. + * The list of supported storage capabilities for this edition * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly standaloneSupported?: boolean; + readonly supportedStorageCapabilities?: StorageCapability[]; /** - * List of supported maintenance configurations + * Whether or not zone pinning is supported for the edition. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedMaintenanceConfigurations?: ManagedInstanceMaintenanceConfigurationCapability[]; + readonly zonePinning?: boolean; /** * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1652,86 +1614,73 @@ export interface ManagedInstanceVcoresCapability { reason?: string; } -/** The maintenance configuration capability */ -export interface ManagedInstanceMaintenanceConfigurationCapability { - /** - * Maintenance configuration name - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; +/** The service objectives capability. */ +export interface ServiceObjectiveCapability { /** - * The status of the capability. + * The unique ID of the service objective. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; -} - -/** The instance pool capability */ -export interface InstancePoolEditionCapability { + readonly id?: string; /** - * The instance pool version name. + * The service objective name. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The supported families. + * The list of supported maximum database sizes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedFamilies?: InstancePoolFamilyCapability[]; + readonly supportedMaxSizes?: MaxSizeRangeCapability[]; /** - * The status of the capability. + * The performance level. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; -} - -/** The instance pool family capability. */ -export interface InstancePoolFamilyCapability { + readonly performanceLevel?: PerformanceLevelCapability; /** - * Family name. + * The sku. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly sku?: Sku; /** * List of supported license types. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly supportedLicenseTypes?: LicenseTypeCapability[]; /** - * List of supported virtual cores values. + * The included (free) max size. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly supportedVcoresValues?: InstancePoolVcoresCapability[]; + readonly includedMaxSize?: MaxSizeCapability; /** - * The status of the capability. + * Whether or not zone redundancy is supported for the service objective. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: CapabilityStatus; - /** The reason for the capability not being available. */ - reason?: string; -} - -/** The managed instance virtual cores capability. */ -export interface InstancePoolVcoresCapability { + readonly zoneRedundant?: boolean; /** - * The virtual cores identifier. + * Supported time range for auto pause delay * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly supportedAutoPauseDelay?: AutoPauseDelayTimeRange; /** - * The virtual cores value. + * List of supported min capacities * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: number; + readonly supportedMinCapacities?: MinCapacityCapability[]; /** - * Storage limit. + * The compute model * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly storageLimit?: MaxSizeCapability; + readonly computeModel?: string; + /** + * List of supported maintenance configurations + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly supportedMaintenanceConfigurations?: MaintenanceConfigurationCapability[]; + /** + * Whether or not zone pinning is supported. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly zonePinning?: boolean; /** * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1741,724 +1690,603 @@ export interface InstancePoolVcoresCapability { reason?: string; } -/** A list of long term retention policies. */ -export interface LongTermRetentionPolicyListResult { - /** - * Array of results. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: LongTermRetentionPolicy[]; +/** The maximum size range capability. */ +export interface MaxSizeRangeCapability { /** - * Link to retrieve next page of results. + * Minimum value. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Maintenance window time range. */ -export interface MaintenanceWindowTimeRange { - /** Day of maintenance window. */ - dayOfWeek?: DayOfWeek; - /** Start time minutes offset from 12am. */ - startTime?: string; - /** Duration of maintenance window in minutes. */ - duration?: string; -} - -/** A list of short term retention policies. */ -export interface ManagedBackupShortTermRetentionPolicyListResult { + readonly minValue?: MaxSizeCapability; /** - * Array of results. + * Maximum value. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedBackupShortTermRetentionPolicy[]; + readonly maxValue?: MaxSizeCapability; /** - * Link to retrieve next page of results. + * 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 nextLink?: string; -} - -/** Execution statistics for one particular query */ -export interface ManagedInstanceQueryStatistics { + readonly scaleSize?: MaxSizeCapability; /** - * Array of results. + * Size of transaction log. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: QueryStatistics[]; + readonly logSize?: LogSizeCapability; /** - * Link to retrieve next page of results. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** Properties of a query execution statistics. */ -export interface QueryStatisticsProperties { +/** The maximum size capability. */ +export interface MaxSizeCapability { /** - * Database name of the database in which this query was executed. + * 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 databaseName?: string; + readonly limit?: number; /** - * Unique query id (unique within one database). + * The units that the limit is expressed in. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly queryId?: string; + readonly unit?: MaxSizeUnit; +} + +/** The log size capability. */ +export interface LogSizeCapability { /** - * The start time for the metric (ISO-8601 format). + * 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 startTime?: string; + readonly limit?: number; /** - * The end time for the metric (ISO-8601 format). + * The units that the limit is expressed in. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: string; - /** List of intervals with appropriate metric data */ - intervals?: QueryMetricInterval[]; + readonly unit?: LogSizeUnit; } -/** Properties of a query metrics interval. */ -export interface QueryMetricInterval { - /** - * The start time for the metric interval (ISO-8601 format). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly intervalStartTime?: string; +/** The performance level capability. */ +export interface PerformanceLevelCapability { /** - * Interval type (length). + * Performance level value. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly intervalType?: QueryTimeGrainType; + readonly value?: number; /** - * Execution count of a query in this interval. + * Unit type used to measure performance level. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly executionCount?: number; - /** List of metric objects for this interval */ - metrics?: QueryMetricProperties[]; + readonly unit?: PerformanceLevelUnit; } -/** Properties of a topquery metric in one interval. */ -export interface QueryMetricProperties { +/** The license type capability */ +export interface LicenseTypeCapability { /** - * The name information for the metric. + * License type identifier. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The UI appropriate name for the metric. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly displayName?: string; - /** - * The unit of the metric. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: QueryMetricUnitType; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; +} + +/** Supported auto pause delay time range */ +export interface AutoPauseDelayTimeRange { /** - * The value of the metric. + * Minimum value * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: number; + readonly minValue?: number; /** - * Metric value when min() aggregate function is used over the interval. + * Maximum value * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly min?: number; + readonly maxValue?: number; /** - * Metric value when max() aggregate function is used over the interval. + * Step value 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 max?: number; + readonly stepSize?: number; /** - * Metric value when avg() aggregate function is used over the interval. + * Default value is no value is provided * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly avg?: number; + readonly default?: number; /** - * Metric value when sum() aggregate function is used over the interval. + * Unit of time that delay is expressed in * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly sum?: number; + readonly unit?: PauseDelayTimeUnit; /** - * Metric value when stdev aggregate function is used over the interval. + * Value that is used to not pause (infinite delay before pause) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly stdev?: number; + readonly doNotPauseValue?: number; } -/** A list of managed databases. */ -export interface ManagedDatabaseListResult { +/** The min capacity capability */ +export interface MinCapacityCapability { /** - * Array of results. + * Min capacity value * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedDatabase[]; + readonly value?: number; /** - * Link to retrieve next page of results. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** An managed database update. */ -export interface ManagedDatabaseUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Collation of the managed database. */ - collation?: string; +/** The maintenance configuration capability */ +export interface MaintenanceConfigurationCapability { /** - * Status of the database. + * Maintenance configuration name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: ManagedDatabaseStatus; + readonly name?: string; /** - * Creation date of the database. + * Whether or not zone redundancy is supported for the maintenance configuration. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly zoneRedundant?: boolean; /** - * Earliest restore point in time for point in time restore. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly earliestRestorePoint?: Date; - /** 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; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; +} + +/** The read scale capability. */ +export interface ReadScaleCapability { /** - * Geo paired region. + * The maximum number of read scale replicas. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly defaultSecondaryLocation?: string; - /** Collation of the metadata catalog. */ - catalogCollation?: CatalogCollationType; - /** Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). */ - createMode?: ManagedDatabaseCreateMode; - /** 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; - /** The resource identifier of the source database associated with create operation of this database. */ - sourceDatabaseId?: string; - /** The restorable dropped database resource id to restore when creating this database. */ - restorableDroppedDatabaseId?: string; - /** Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. */ - storageContainerSasToken?: string; + readonly maxNumberOfReplicas?: number; /** - * Instance Failover Group resource identifier that this managed database belongs to. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly failoverGroupId?: string; - /** The resource identifier of the recoverable database associated with create operation of this database. */ - recoverableDatabaseId?: string; - /** The name of the Long Term Retention backup to be used for restore of this managed database. */ - longTermRetentionBackupResourceId?: string; - /** Whether to auto complete restore of this managed database. */ - autoCompleteRestore?: boolean; - /** Last backup file name for restore of this managed database. */ - lastBackupName?: string; -} - -/** Contains the information necessary to perform a complete database restore operation. */ -export interface CompleteDatabaseRestoreDefinition { - /** The last backup name to apply */ - lastBackupName: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of the managed database's security alert policies. */ -export interface ManagedDatabaseSecurityAlertPolicyListResult { +/** The storage account type capability. */ +export interface StorageCapability { /** - * Array of results. + * The storage account type for the database's backups. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedDatabaseSecurityAlertPolicy[]; + readonly storageAccountType?: StorageCapabilityStorageAccountType; /** - * Link to retrieve next page of results. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of security events. */ -export interface SecurityEventCollection { +/** The elastic pool edition capability. */ +export interface ElasticPoolEditionCapability { /** - * Array of results. + * The elastic pool edition name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SecurityEvent[]; + readonly name?: string; /** - * Link to retrieve next page of results. + * 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 nextLink?: string; -} - -/** The properties of a security event sql injection additional properties. */ -export interface SecurityEventSqlInjectionAdditionalProperties { - /** - * The threat ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly threatId?: string; + readonly supportedElasticPoolPerformanceLevels?: ElasticPoolPerformanceLevelCapability[]; /** - * The statement + * 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 statement?: string; + readonly zoneRedundant?: boolean; /** - * The statement highlight offset + * Whether or not zone pinning is supported for the edition. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly statementHighlightOffset?: number; + readonly zonePinning?: boolean; /** - * The statement highlight length + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly statementHighlightLength?: number; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; +} + +/** The Elastic Pool performance level capability. */ +export interface ElasticPoolPerformanceLevelCapability { /** - * The sql error code + * The performance level for the pool. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorCode?: number; + readonly performanceLevel?: PerformanceLevelCapability; /** - * The sql error severity + * The sku. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorSeverity?: number; + readonly sku?: Sku; /** - * The sql error message + * List of supported license types. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; -} - -/** A list of sensitivity labels. */ -export interface SensitivityLabelListResult { + readonly supportedLicenseTypes?: LicenseTypeCapability[]; /** - * Array of results. + * The maximum number of databases supported. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SensitivityLabel[]; + readonly maxDatabaseCount?: number; /** - * Link to retrieve next page of results. + * 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 nextLink?: string; -} - -/** A list of sensitivity label update operations. */ -export interface SensitivityLabelUpdateList { - operations?: SensitivityLabelUpdate[]; -} - -/** A list of recommended sensitivity label update operations. */ -export interface RecommendedSensitivityLabelUpdateList { - operations?: RecommendedSensitivityLabelUpdate[]; -} - -/** A list of managed transparent data encryptions */ -export interface ManagedTransparentDataEncryptionListResult { + readonly includedMaxSize?: MaxSizeCapability; /** - * Array of results. + * The list of supported max sizes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedTransparentDataEncryption[]; + readonly supportedMaxSizes?: MaxSizeRangeCapability[]; /** - * Link to retrieve next page of results. + * The list of supported per database max sizes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of managed instance administrators. */ -export interface ManagedInstanceAdministratorListResult { + readonly supportedPerDatabaseMaxSizes?: MaxSizeRangeCapability[]; /** - * Array of results. + * 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 value?: ManagedInstanceAdministrator[]; + readonly supportedPerDatabaseMaxPerformanceLevels?: ElasticPoolPerDatabaseMaxPerformanceLevelCapability[]; /** - * Link to retrieve next page of results. + * Whether or not zone redundancy is supported for the performance level. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of active directory only authentications. */ -export interface ManagedInstanceAzureADOnlyAuthListResult { + readonly zoneRedundant?: boolean; /** - * Array of results. + * List of supported maintenance configurations * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceAzureADOnlyAuthentication[]; + readonly supportedMaintenanceConfigurations?: MaintenanceConfigurationCapability[]; /** - * Link to retrieve next page of results. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of managed instance encryption protectors. */ -export interface ManagedInstanceEncryptionProtectorListResult { +/** The max per-database performance level capability. */ +export interface ElasticPoolPerDatabaseMaxPerformanceLevelCapability { /** - * Array of results. + * The maximum performance level per database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceEncryptionProtector[]; + readonly limit?: number; /** - * Link to retrieve next page of results. + * Unit type used to measure performance level. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of managed instance keys. */ -export interface ManagedInstanceKeyListResult { + readonly unit?: PerformanceLevelUnit; /** - * Array of results. + * The list of supported min database performance levels. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceKey[]; + readonly supportedPerDatabaseMinPerformanceLevels?: ElasticPoolPerDatabaseMinPerformanceLevelCapability[]; /** - * Link to retrieve next page of results. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of long term retention policies. */ -export interface ManagedInstanceLongTermRetentionPolicyListResult { +/** The minimum per-database performance level capability. */ +export interface ElasticPoolPerDatabaseMinPerformanceLevelCapability { /** - * Array of results. + * The minimum performance level per database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceLongTermRetentionPolicy[]; + readonly limit?: number; /** - * Link to retrieve next page of results. + * Unit type used to measure performance level. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly unit?: PerformanceLevelUnit; + /** + * The status of the capability. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** The response to a list managed instance operations request */ -export interface ManagedInstanceOperationListResult { +/** The managed instance capability */ +export interface ManagedInstanceVersionCapability { /** - * Array of results. + * The server version name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceOperation[]; + readonly name?: string; /** - * Link to retrieve next page of results. + * The list of supported managed instance editions. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** The parameters of a managed instance operation. */ -export interface ManagedInstanceOperationParametersPair { + readonly supportedEditions?: ManagedInstanceEditionCapability[]; /** - * The current parameters. + * The list of supported instance pool editions. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentParameters?: UpsertManagedServerOperationParameters; + readonly supportedInstancePoolEditions?: InstancePoolEditionCapability[]; /** - * The requested parameters. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedParameters?: UpsertManagedServerOperationParameters; -} - -export interface UpsertManagedServerOperationParameters { - family?: string; - tier?: string; - vCores?: number; - storageSizeInGB?: number; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** The steps of a managed instance operation. */ -export interface ManagedInstanceOperationSteps { +/** The managed server capability */ +export interface ManagedInstanceEditionCapability { /** - * The total number of operation steps. + * The managed server version name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly totalSteps?: string; + readonly name?: string; /** - * The number of current operation steps. + * The supported families. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentStep?: number; + readonly supportedFamilies?: ManagedInstanceFamilyCapability[]; /** - * The operation steps list. + * The list of supported storage capabilities for this edition * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly stepsList?: UpsertManagedServerOperationStep[]; -} - -export interface UpsertManagedServerOperationStep { - order?: number; - name?: string; - status?: UpsertManagedServerOperationStepStatus; -} - -/** Properties of a private endpoint connection. */ -export interface ManagedInstancePrivateEndpointConnectionProperties { - /** Private endpoint which the connection belongs to. */ - privateEndpoint?: ManagedInstancePrivateEndpointProperty; - /** Connection State of the Private Endpoint Connection. */ - privateLinkServiceConnectionState?: ManagedInstancePrivateLinkServiceConnectionStateProperty; + readonly supportedStorageCapabilities?: StorageCapability[]; /** - * State of the Private Endpoint Connection. + * 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 provisioningState?: string; -} - -export interface ManagedInstancePrivateEndpointProperty { - /** Resource id of the private endpoint. */ - id?: string; -} - -export interface ManagedInstancePrivateLinkServiceConnectionStateProperty { - /** The private link service connection status. */ - status: string; - /** The private link service connection description. */ - description: string; + readonly zoneRedundant?: boolean; /** - * The private link service connection description. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly actionsRequired?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of private endpoint connections. */ -export interface ManagedInstancePrivateEndpointConnectionListResult { +/** The managed server family capability. */ +export interface ManagedInstanceFamilyCapability { /** - * Array of results. + * Family name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstancePrivateEndpointConnection[]; + readonly name?: string; /** - * Link to retrieve next page of results. + * SKU name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of private link resources */ -export interface ManagedInstancePrivateLinkListResult { + readonly sku?: string; /** - * Array of results. + * List of supported license types. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstancePrivateLink[]; + readonly supportedLicenseTypes?: LicenseTypeCapability[]; /** - * Link to retrieve next page of results. + * List of supported virtual cores values. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Properties of a private link resource. */ -export interface ManagedInstancePrivateLinkProperties { + readonly supportedVcoresValues?: ManagedInstanceVcoresCapability[]; /** - * The private link resource group id. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly groupId?: string; - /** - * The private link resource required member names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly requiredMembers?: string[]; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of the ManagedInstance's vulnerability assessments. */ -export interface ManagedInstanceVulnerabilityAssessmentListResult { +/** The managed instance virtual cores capability. */ +export interface ManagedInstanceVcoresCapability { /** - * Array of results. + * The virtual cores identifier. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceVulnerabilityAssessment[]; + readonly name?: string; /** - * Link to retrieve next page of results. + * The virtual cores value. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of the managed Server's security alert policies. */ -export interface ManagedServerSecurityAlertPolicyListResult { + readonly value?: number; /** - * Array of results. + * Included size. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedServerSecurityAlertPolicy[]; + readonly includedMaxSize?: MaxSizeCapability; /** - * Link to retrieve next page of results. + * Storage size ranges. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Result of the request to list SQL operations. */ -export interface OperationListResult { + readonly supportedStorageSizes?: MaxSizeRangeCapability[]; /** - * Array of results. + * True if this service objective is supported for managed instances in an instance pool. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Operation[]; + readonly instancePoolSupported?: boolean; /** - * Link to retrieve next page of results. + * True if this service objective is supported for standalone managed instances. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** SQL REST API operation definition. */ -export interface Operation { + readonly standaloneSupported?: boolean; /** - * The name of the operation being performed on this particular object. + * List of supported maintenance configurations * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly supportedMaintenanceConfigurations?: ManagedInstanceMaintenanceConfigurationCapability[]; /** - * The localized display information for this particular operation / action. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly display?: OperationDisplay; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; +} + +/** The maintenance configuration capability */ +export interface ManagedInstanceMaintenanceConfigurationCapability { /** - * The intended executor of the operation. + * Maintenance configuration name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly origin?: OperationOrigin; + readonly name?: string; /** - * Additional descriptions for the operation. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly properties?: { [propertyName: string]: Record }; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** Display metadata associated with the operation. */ -export interface OperationDisplay { - /** - * 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; +/** The instance pool capability */ +export interface InstancePoolEditionCapability { /** - * The localized friendly form of the resource type related to this action/operation. + * The instance pool version name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resource?: string; + readonly name?: string; /** - * The localized friendly name for the operation. + * The supported families. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operation?: string; + readonly supportedFamilies?: InstancePoolFamilyCapability[]; /** - * The localized friendly description for the operation. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of service health statuses in a location. */ -export interface OperationsHealthListResult { +/** The instance pool family capability. */ +export interface InstancePoolFamilyCapability { /** - * Array of results. + * Family name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: OperationsHealth[]; + readonly name?: string; /** - * Link to retrieve next page of results. + * List of supported license types. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Properties of a private endpoint connection. */ -export interface PrivateEndpointConnectionProperties { - /** Private endpoint which the connection belongs to. */ - privateEndpoint?: PrivateEndpointProperty; - /** Connection state of the private endpoint connection. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + readonly supportedLicenseTypes?: LicenseTypeCapability[]; /** - * State of the private endpoint connection. + * List of supported virtual cores values. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: PrivateEndpointProvisioningState; -} - -export interface PrivateEndpointProperty { - /** Resource id of the private endpoint. */ - id?: string; -} - -export interface PrivateLinkServiceConnectionStateProperty { - /** The private link service connection status. */ - status: PrivateLinkServiceConnectionStateStatus; - /** The private link service connection description. */ - description: string; + readonly supportedVcoresValues?: InstancePoolVcoresCapability[]; /** - * The actions required for private link service connection. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** A list of private endpoint connections. */ -export interface PrivateEndpointConnectionListResult { +/** The managed instance virtual cores capability. */ +export interface InstancePoolVcoresCapability { /** - * Array of results. + * The virtual cores identifier. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: PrivateEndpointConnection[]; + readonly name?: string; /** - * Link to retrieve next page of results. + * The virtual cores value. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of private link resources */ -export interface PrivateLinkResourceListResult { + readonly value?: number; /** - * Array of results. + * Storage limit. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: PrivateLinkResource[]; + readonly storageLimit?: MaxSizeCapability; /** - * Link to retrieve next page of results. + * The status of the capability. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly status?: CapabilityStatus; + /** The reason for the capability not being available. */ + reason?: string; } -/** Properties of a private link resource. */ -export interface PrivateLinkResourceProperties { - /** - * The private link resource group id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly groupId?: string; +/** A list of long term retention backups. */ +export interface LongTermRetentionBackupListResult { /** - * The private link resource required member names. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requiredMembers?: string[]; + readonly value?: LongTermRetentionBackup[]; /** - * The private link resource required zone names. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requiredZoneNames?: string[]; + readonly nextLink?: string; } -/** A list of recoverable managed databases. */ -export interface RecoverableManagedDatabaseListResult { +/** Contains the information necessary to perform long term retention backup copy operation. */ +export interface CopyLongTermRetentionBackupParameters { + /** The subscription that owns the target server */ + targetSubscriptionId?: string; + /** The resource group that owns the target server */ + targetResourceGroup?: string; + /** The resource Id of the target server that owns the database */ + targetServerResourceId?: string; + /** The fully qualified domain name of the target server */ + targetServerFullyQualifiedDomainName?: string; + /** The name of the database owns the copied backup. */ + targetDatabaseName?: string; + /** The storage redundancy type of the copied backup */ + targetBackupStorageRedundancy?: BackupStorageRedundancy; +} + +/** Contains the information necessary to perform long term retention backup update operation. */ +export interface UpdateLongTermRetentionBackupParameters { + /** The storage redundancy type of the copied backup */ + requestedBackupStorageRedundancy?: BackupStorageRedundancy; +} + +/** A list of long term retention backups for managed database(s). */ +export interface ManagedInstanceLongTermRetentionBackupListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RecoverableManagedDatabase[]; + readonly value?: ManagedInstanceLongTermRetentionBackup[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2466,13 +2294,13 @@ export interface RecoverableManagedDatabaseListResult { readonly nextLink?: string; } -/** A list of long term retention backups. */ -export interface RestorePointListResult { +/** A list of long term retention policies. */ +export interface LongTermRetentionPolicyListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RestorePoint[]; + readonly value?: LongTermRetentionPolicy[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2480,40 +2308,37 @@ export interface RestorePointListResult { readonly nextLink?: string; } -/** Contains the information necessary to perform a create database restore point operation. */ -export interface CreateDatabaseRestorePointDefinition { - /** The restore point label to apply */ - restorePointLabel: string; +/** Maintenance window time range. */ +export interface MaintenanceWindowTimeRange { + /** Day of maintenance window. */ + dayOfWeek?: DayOfWeek; + /** Start time minutes offset from 12am. */ + startTime?: string; + /** Duration of maintenance window in minutes. */ + duration?: string; } -/** Automatic tuning properties for individual advisors. */ -export interface AutomaticTuningServerOptions { - /** Automatic tuning option desired state. */ - desiredState?: AutomaticTuningOptionModeDesired; - /** - * Automatic tuning option actual state. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly actualState?: AutomaticTuningOptionModeActual; +/** A list of short term retention policies. */ +export interface ManagedBackupShortTermRetentionPolicyListResult { /** - * Reason code if desired and actual state are different. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reasonCode?: number; + readonly value?: ManagedBackupShortTermRetentionPolicy[]; /** - * Reason description if desired and actual state are different. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reasonDesc?: AutomaticTuningServerReason; + readonly nextLink?: string; } -/** A list of active directory administrators. */ -export interface AdministratorListResult { +/** A list of the managed database's Advanced Threat Protection settings. */ +export interface ManagedDatabaseAdvancedThreatProtectionListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerAzureADAdministrator[]; + readonly value?: ManagedDatabaseAdvancedThreatProtection[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2521,13 +2346,13 @@ export interface AdministratorListResult { readonly nextLink?: string; } -/** A list of active directory only authentications. */ -export interface AzureADOnlyAuthListResult { +/** List of managed database move operations. */ +export interface ManagedDatabaseMoveOperationListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerAzureADOnlyAuthentication[]; + readonly value?: ManagedDatabaseMoveOperationResult[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2535,13 +2360,13 @@ export interface AzureADOnlyAuthListResult { readonly nextLink?: string; } -/** A list of server DevOps audit settings. */ -export interface ServerDevOpsAuditSettingsListResult { +/** Execution statistics for one particular query */ +export interface ManagedInstanceQueryStatistics { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerDevOpsAuditingSettings[]; + readonly value?: QueryStatistics[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2549,183 +2374,152 @@ export interface ServerDevOpsAuditSettingsListResult { readonly nextLink?: string; } -/** A list of server DNS aliases. */ -export interface ServerDnsAliasListResult { +/** Properties of a query execution statistics. */ +export interface QueryStatisticsProperties { /** - * Array of results. + * Database name of the database in which this query was executed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerDnsAlias[]; + readonly databaseName?: string; /** - * Link to retrieve next page of results. + * Unique query id (unique within one database). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A server dns alias acquisition request. */ -export interface ServerDnsAliasAcquisition { - /** The id of the server alias that will be acquired to point to this server instead. */ - oldServerDnsAliasId: string; -} - -/** A list of server keys. */ -export interface ServerKeyListResult { + readonly queryId?: string; /** - * Array of results. + * 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 value?: ServerKey[]; + readonly startTime?: string; /** - * Link to retrieve next page of results. + * 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 nextLink?: string; + readonly endTime?: string; + /** List of intervals with appropriate metric data */ + intervals?: QueryMetricInterval[]; } -/** The response to a list server operations request */ -export interface ServerOperationListResult { +/** Properties of a query metrics interval. */ +export interface QueryMetricInterval { /** - * Array of results. + * The start time for the metric interval (ISO-8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerOperation[]; + readonly intervalStartTime?: string; /** - * Link to retrieve next page of results. + * Interval type (length). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of the server's security alert policies. */ -export interface LogicalServerSecurityAlertPolicyListResult { + readonly intervalType?: QueryTimeGrainType; /** - * Array of results. + * Execution count of a query in this interval. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerSecurityAlertPolicy[]; + readonly executionCount?: number; + /** List of metric objects for this interval */ + metrics?: QueryMetricProperties[]; +} + +/** Properties of a topquery metric in one interval. */ +export interface QueryMetricProperties { /** - * Link to retrieve next page of results. + * The name information for the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** Server info for the server trust group. */ -export interface ServerInfo { - /** Server Id. */ - serverId: string; -} - -/** A list of server trust groups. */ -export interface ServerTrustGroupListResult { + readonly name?: string; /** - * Array of results. + * The UI appropriate name for the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerTrustGroup[]; + readonly displayName?: string; /** - * Link to retrieve next page of results. + * The unit of the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of the server's vulnerability assessments. */ -export interface ServerVulnerabilityAssessmentListResult { + readonly unit?: QueryMetricUnitType; /** - * Array of results. + * The value of the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ServerVulnerabilityAssessment[]; + readonly value?: number; /** - * Link to retrieve next page of results. + * Metric value when min() aggregate function is used over the interval. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of subscription usage metrics in a location. */ -export interface SubscriptionUsageListResult { + readonly min?: number; /** - * Array of results. + * Metric value when max() aggregate function is used over the interval. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SubscriptionUsage[]; + readonly max?: number; /** - * Link to retrieve next page of results. + * Metric value when avg() aggregate function is used over the interval. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of sync agents. */ -export interface SyncAgentListResult { + readonly avg?: number; /** - * Array of results. + * Metric value when sum() aggregate function is used over the interval. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncAgent[]; + readonly sum?: number; /** - * Link to retrieve next page of results. + * Metric value when stdev aggregate function is used over the interval. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly stdev?: number; } -/** Properties of an Azure SQL Database sync agent key. */ -export interface SyncAgentKeyProperties { +/** The managed database's restore details backup set properties. */ +export interface ManagedDatabaseRestoreDetailsBackupSetProperties { /** - * Key of sync agent. + * Backup set status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly syncAgentKey?: string; -} - -/** A list of sync agent linked databases. */ -export interface SyncAgentLinkedDatabaseListResult { + readonly status?: string; /** - * Array of results. + * First stripe name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncAgentLinkedDatabase[]; + readonly firstStripeName?: string; /** - * Link to retrieve next page of results. + * Number of stripes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; -} - -/** A list of sync database ID properties. */ -export interface SyncDatabaseIdListResult { + readonly numberOfStripes?: number; /** - * Array of results. + * Backup size. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncDatabaseIdProperties[]; + readonly backupSizeMB?: number; /** - * Link to retrieve next page of results. + * Last restored file time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly restoreStartedTimestampUtc?: Date; + /** + * Last restored file time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restoreFinishedTimestampUtc?: Date; } -/** Properties of the sync database id. */ -export interface SyncDatabaseIdProperties { +/** The managed database's restore details unrestorable file properties. */ +export interface ManagedDatabaseRestoreDetailsUnrestorableFileProperties { /** - * ARM resource id of sync database. + * File name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly name?: string; } -/** A list of sync schema properties. */ -export interface SyncFullSchemaPropertiesListResult { +/** A list of the managed database's security alert policies. */ +export interface ManagedDatabaseSecurityAlertPolicyListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncFullSchemaProperties[]; + readonly value?: ManagedDatabaseSecurityAlertPolicy[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2733,95 +2527,104 @@ export interface SyncFullSchemaPropertiesListResult { readonly nextLink?: string; } -/** Properties of the database full schema. */ -export interface SyncFullSchemaProperties { +/** A list of security events. */ +export interface SecurityEventCollection { /** - * List of tables in the database full schema. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tables?: SyncFullSchemaTable[]; + readonly value?: SecurityEvent[]; /** - * Last update time of the database schema. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastUpdateTime?: Date; + readonly nextLink?: string; } -/** Properties of the table in the database full schema. */ -export interface SyncFullSchemaTable { - /** - * 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[]; +/** The properties of a security event sql injection additional properties. */ +export interface SecurityEventSqlInjectionAdditionalProperties { /** - * Error id of the table. + * The threat ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorId?: string; + readonly threatId?: string; /** - * If there is error in the table. + * The statement * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hasError?: boolean; + readonly statement?: string; /** - * Name of the table. + * The statement highlight offset * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly statementHighlightOffset?: number; /** - * Quoted name of the table. + * The statement highlight length * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly quotedName?: string; -} - -/** Properties of the column in the table of database full schema. */ -export interface SyncFullSchemaTableColumn { + readonly statementHighlightLength?: number; /** - * Data size of the column. + * The sql error code * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dataSize?: string; + readonly errorCode?: number; /** - * Data type of the column. + * The sql error severity * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dataType?: string; + readonly errorSeverity?: number; /** - * Error id of the column. + * The sql error message * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorId?: string; + readonly errorMessage?: string; +} + +/** A list of sensitivity labels. */ +export interface SensitivityLabelListResult { /** - * If there is error in the table. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly hasError?: boolean; + readonly value?: SensitivityLabel[]; /** - * If it is the primary key of the table. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isPrimaryKey?: boolean; + readonly nextLink?: string; +} + +/** A list of sensitivity label update operations. */ +export interface SensitivityLabelUpdateList { + operations?: SensitivityLabelUpdate[]; +} + +/** A list of recommended sensitivity label update operations. */ +export interface RecommendedSensitivityLabelUpdateList { + operations?: RecommendedSensitivityLabelUpdate[]; +} + +/** A list of managed transparent data encryptions */ +export interface ManagedTransparentDataEncryptionListResult { /** - * Name of the column. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly value?: ManagedTransparentDataEncryption[]; /** - * Quoted name of the column. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly quotedName?: string; + readonly nextLink?: string; } -/** A list of sync group log properties. */ -export interface SyncGroupLogListResult { +/** A list of managed databases. */ +export interface ManagedDatabaseListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncGroupLogProperties[]; + readonly value?: ManagedDatabase[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2829,73 +2632,98 @@ export interface SyncGroupLogListResult { readonly nextLink?: string; } -/** Properties of an Azure SQL Database sync group log. */ -export interface SyncGroupLogProperties { +/** An managed database update. */ +export interface ManagedDatabaseUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Collation of the managed database. */ + collation?: string; /** - * Timestamp of the sync group log. + * Status of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly timestamp?: Date; + readonly status?: ManagedDatabaseStatus; /** - * Type of the sync group log. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: SyncGroupLogType; - /** - * Source of the sync group log. + * Creation date of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly source?: string; + readonly creationDate?: Date; /** - * Details of the sync group log. + * 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 details?: string; + readonly earliestRestorePoint?: Date; + /** 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; /** - * TracingId of the sync group log. + * Geo paired region. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tracingId?: string; + readonly defaultSecondaryLocation?: string; + /** Collation of the metadata catalog. */ + catalogCollation?: CatalogCollationType; + /** Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). */ + createMode?: ManagedDatabaseCreateMode; + /** 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; + /** The resource identifier of the source database associated with create operation of this database. */ + sourceDatabaseId?: string; + /** The resource identifier of the cross-subscription source database associated with create operation of this database. */ + crossSubscriptionSourceDatabaseId?: string; + /** The restorable dropped database resource id to restore when creating this database. */ + restorableDroppedDatabaseId?: string; + /** The restorable cross-subscription dropped database resource id to restore when creating this database. */ + crossSubscriptionRestorableDroppedDatabaseId?: string; + /** Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. */ + storageContainerIdentity?: string; + /** Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. */ + storageContainerSasToken?: string; /** - * OperationStatus of the sync group log. + * 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 operationStatus?: string; + readonly failoverGroupId?: string; + /** The resource identifier of the recoverable database associated with create operation of this database. */ + recoverableDatabaseId?: string; + /** The name of the Long Term Retention backup to be used for restore of this managed database. */ + longTermRetentionBackupResourceId?: string; + /** Whether to auto complete restore of this managed database. */ + autoCompleteRestore?: boolean; + /** Last backup file name for restore of this managed database. */ + lastBackupName?: string; + /** Target managed instance id used in cross-subscription restore. */ + crossSubscriptionTargetManagedInstanceId?: string; + /** Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. */ + isLedgerOn?: boolean; } -/** Properties of sync group schema. */ -export interface SyncGroupSchema { - /** List of tables in sync group schema. */ - tables?: SyncGroupSchemaTable[]; - /** Name of master sync member where the schema is from. */ - masterSyncMemberName?: string; +/** Contains the information necessary to perform a managed database move. */ +export interface ManagedDatabaseMoveDefinition { + /** The destination managed database ID */ + destinationManagedDatabaseId: string; } -/** Properties of table in sync group schema. */ -export interface SyncGroupSchemaTable { - /** List of columns in sync group schema. */ - columns?: SyncGroupSchemaTableColumn[]; - /** Quoted name of sync group schema table. */ - quotedName?: string; +/** Contains the information necessary to perform a complete database restore operation. */ +export interface CompleteDatabaseRestoreDefinition { + /** The last backup name to apply */ + lastBackupName: string; } -/** Properties of column in sync group table. */ -export interface SyncGroupSchemaTableColumn { - /** Quoted name of sync group table column. */ - quotedName?: string; - /** Data size of the column. */ - dataSize?: string; - /** Data type of the column. */ - dataType?: string; +/** Contains the information necessary to start a managed database move. */ +export interface ManagedDatabaseStartMoveDefinition { + /** The destination managed database ID */ + destinationManagedDatabaseId: string; + /** The move operation mode. */ + operationMode?: MoveOperationMode; } -/** A list of sync groups. */ -export interface SyncGroupListResult { +/** A list of managed instance administrators. */ +export interface ManagedInstanceAdministratorListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncGroup[]; + readonly value?: ManagedInstanceAdministrator[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2903,13 +2731,13 @@ export interface SyncGroupListResult { readonly nextLink?: string; } -/** A list of Azure SQL Database sync members. */ -export interface SyncMemberListResult { +/** A list of the managed instance's Advanced Threat Protection settings. */ +export interface ManagedInstanceAdvancedThreatProtectionListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SyncMember[]; + readonly value?: ManagedInstanceAdvancedThreatProtection[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2917,13 +2745,13 @@ export interface SyncMemberListResult { readonly nextLink?: string; } -/** A list of time zones. */ -export interface TimeZoneListResult { +/** A list of active directory only authentications. */ +export interface ManagedInstanceAzureADOnlyAuthListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: TimeZone[]; + readonly value?: ManagedInstanceAzureADOnlyAuthentication[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2931,13 +2759,13 @@ export interface TimeZoneListResult { readonly nextLink?: string; } -/** A list of virtual clusters. */ -export interface VirtualClusterListResult { +/** A list of managed instance's DTCs. */ +export interface ManagedInstanceDtcListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: VirtualCluster[]; + readonly value?: ManagedInstanceDtc[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2945,33 +2773,37 @@ export interface VirtualClusterListResult { readonly nextLink?: string; } -/** An update request for an Azure SQL Database virtual cluster. */ -export interface VirtualClusterUpdate { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * 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; - /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - family?: string; - /** - * 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[]; - /** Specifies maintenance configuration id to apply to this virtual cluster. */ - maintenanceConfigurationId?: string; +/** The Security Settings of managed instance DTC. */ +export interface ManagedInstanceDtcSecuritySettings { + /** Transaction Manager communication settings of managed instance DTC. */ + transactionManagerCommunicationSettings?: ManagedInstanceDtcTransactionManagerCommunicationSettings; + /** Allow XA Transactions to managed instance DTC. */ + xaTransactionsEnabled?: boolean; + /** Allow SNA LU 6.2 Transactions to managed instance DTC. */ + snaLu6Point2TransactionsEnabled?: boolean; + /** Default timeout for XA Transactions (in seconds). */ + xaTransactionsDefaultTimeout?: number; + /** Maximum timeout for XA Transactions (in seconds). */ + xaTransactionsMaximumTimeout?: number; } -/** A list of virtual network rules. */ -export interface VirtualNetworkRuleListResult { +/** The Transaction Manager Communication Settings of managed instance DTC. */ +export interface ManagedInstanceDtcTransactionManagerCommunicationSettings { + /** Allow Inbound traffic to managed instance DTC. */ + allowInboundEnabled?: boolean; + /** Allow Outbound traffic of managed instance DTC. */ + allowOutboundEnabled?: boolean; + /** Authentication type of managed instance DTC. */ + authentication?: string; +} + +/** A list of managed instance encryption protectors. */ +export interface ManagedInstanceEncryptionProtectorListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: VirtualNetworkRule[]; + readonly value?: ManagedInstanceEncryptionProtector[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2979,13 +2811,13 @@ export interface VirtualNetworkRuleListResult { readonly nextLink?: string; } -/** A list of workload classifiers for a workload group. */ -export interface WorkloadClassifierListResult { +/** A list of managed instance keys. */ +export interface ManagedInstanceKeyListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: WorkloadClassifier[]; + readonly value?: ManagedInstanceKey[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2993,13 +2825,13 @@ export interface WorkloadClassifierListResult { readonly nextLink?: string; } -/** A list of workload groups. */ -export interface WorkloadGroupListResult { +/** A list of long term retention policies. */ +export interface ManagedInstanceLongTermRetentionPolicyListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: WorkloadGroup[]; + readonly value?: ManagedInstanceLongTermRetentionPolicy[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3007,13 +2839,13 @@ export interface WorkloadGroupListResult { readonly nextLink?: string; } -/** A list of transparent data encryptions */ -export interface LogicalDatabaseTransparentDataEncryptionListResult { +/** The response to a list managed instance operations request */ +export interface ManagedInstanceOperationListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: LogicalDatabaseTransparentDataEncryption[]; + readonly value?: ManagedInstanceOperation[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3021,41 +2853,62 @@ export interface LogicalDatabaseTransparentDataEncryptionListResult { readonly nextLink?: string; } -/** A list of short term retention policies. */ -export interface BackupShortTermRetentionPolicyListResult { +/** The parameters of a managed instance operation. */ +export interface ManagedInstanceOperationParametersPair { /** - * Array of results. + * The current parameters. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: BackupShortTermRetentionPolicy[]; + readonly currentParameters?: UpsertManagedServerOperationParameters; /** - * Link to retrieve next page of results. + * The requested parameters. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly requestedParameters?: UpsertManagedServerOperationParameters; } -/** Import export operation extensions list. */ -export interface ImportExportExtensionsOperationListResult { +export interface UpsertManagedServerOperationParameters { + family?: string; + tier?: string; + vCores?: number; + storageSizeInGB?: number; +} + +/** The steps of a managed instance operation. */ +export interface ManagedInstanceOperationSteps { /** - * Array of results. + * The total number of operation steps. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ImportExportExtensionsOperationResult[]; + readonly totalSteps?: string; /** - * Link to retrieve next page of results. + * The number of current operation steps. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly currentStep?: number; + /** + * The operation steps list. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly stepsList?: UpsertManagedServerOperationStepWithEstimatesAndDuration[]; } -/** The response to a list database operations request */ -export interface DatabaseOperationListResult { +export interface UpsertManagedServerOperationStepWithEstimatesAndDuration { + stepStartTime?: Date; + stepEndTime?: Date; + timeElapsed?: string; + order?: number; + name?: string; + status?: Status; +} + +/** A list of private endpoint connections. */ +export interface ManagedInstancePrivateEndpointConnectionListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseOperation[]; + readonly value?: ManagedInstancePrivateEndpointConnection[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3063,27 +2916,43 @@ export interface DatabaseOperationListResult { readonly nextLink?: string; } -/** A list of database usage metrics. */ -export interface DatabaseUsageListResult { +/** Properties of a private endpoint connection. */ +export interface ManagedInstancePrivateEndpointConnectionProperties { + /** Private endpoint which the connection belongs to. */ + privateEndpoint?: ManagedInstancePrivateEndpointProperty; + /** Connection State of the Private Endpoint Connection. */ + privateLinkServiceConnectionState?: ManagedInstancePrivateLinkServiceConnectionStateProperty; /** - * Array of results. + * State of the Private Endpoint Connection. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DatabaseUsage[]; + readonly provisioningState?: string; +} + +export interface ManagedInstancePrivateEndpointProperty { + /** Resource id of the private endpoint. */ + id?: string; +} + +export interface ManagedInstancePrivateLinkServiceConnectionStateProperty { + /** The private link service connection status. */ + status: string; + /** The private link service connection description. */ + description: string; /** - * Link to retrieve next page of results. + * The private link service connection description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly actionsRequired?: string; } -/** A list of ledger digest upload settings. */ -export interface LedgerDigestUploadsListResult { +/** A list of private link resources */ +export interface ManagedInstancePrivateLinkListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: LedgerDigestUploads[]; + readonly value?: ManagedInstancePrivateLink[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3091,27 +2960,32 @@ export interface LedgerDigestUploadsListResult { readonly nextLink?: string; } -/** A list of outbound rules. */ -export interface OutboundFirewallRuleListResult { +/** Properties of a private link resource. */ +export interface ManagedInstancePrivateLinkProperties { /** - * Array of results. + * The private link resource group id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: OutboundFirewallRule[]; + readonly groupId?: string; /** - * Link to retrieve next page of results. + * The private link resource required member names. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly requiredMembers?: string[]; + /** + * The private link resource required zone names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredZoneNames?: string[]; } -/** A list of replication links. */ -export interface ReplicationLinkListResult { +/** A list of the ManagedInstance's vulnerability assessments. */ +export interface ManagedInstanceVulnerabilityAssessmentListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ReplicationLink[]; + readonly value?: ManagedInstanceVulnerabilityAssessment[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3119,13 +2993,13 @@ export interface ReplicationLinkListResult { readonly nextLink?: string; } -/** A list of servers. */ -export interface ServerListResult { +/** A list of managed instances. */ +export interface ManagedInstanceListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Server[]; + readonly value?: ManagedInstance[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3165,8 +3039,8 @@ export interface UserIdentity { readonly clientId?: string; } -/** A private endpoint connection under a server */ -export interface ServerPrivateEndpointConnection { +/** A private endpoint connection under a managed instance */ +export interface ManagedInstancePecProperty { /** * Resource ID. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3176,11 +3050,11 @@ export interface ServerPrivateEndpointConnection { * Private endpoint connection properties * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly properties?: PrivateEndpointConnectionProperties; + readonly properties?: ManagedInstancePrivateEndpointConnectionProperties; } /** Properties of a active directory administrator. */ -export interface ServerExternalAdministrator { +export interface ManagedInstanceExternalAdministrator { /** Type of the sever administrator. */ administratorType?: AdministratorType; /** Principal Type of the sever administrator. */ @@ -3195,144 +3069,181 @@ export interface ServerExternalAdministrator { azureADOnlyAuthentication?: boolean; } -/** An update request for an Azure SQL Database server. */ -export interface ServerUpdate { - /** Server identity */ - identity?: ResourceIdentity; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Administrator username for the server. Once created it cannot be changed. */ - administratorLogin?: string; - /** The administrator login password (required for server creation). */ - administratorLoginPassword?: string; - /** The version of the server. */ - version?: string; +/** The managed instance's service principal configuration for a resource. */ +export interface ServicePrincipal { /** - * The state of the server. + * The Azure Active Directory application object id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: string; + readonly principalId?: string; /** - * The fully qualified domain name of the server. + * The Azure Active Directory application client id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; + /** + * The Azure Active Directory tenant id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** Service principal type. */ + type?: ServicePrincipalType; +} + +/** An update request for an Azure SQL Database managed instance. */ +export interface ManagedInstanceUpdate { + /** Managed instance sku */ + sku?: Sku; + /** Managed instance identity */ + identity?: ResourceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly provisioningState?: ManagedInstancePropertiesProvisioningState; + /** + * Specifies the mode of database creation. + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + */ + managedInstanceCreateMode?: ManagedServerCreateMode; + /** + * 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; + /** Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). */ + administratorLogin?: string; + /** The administrator login password (required for managed instance creation). */ + administratorLoginPassword?: string; + /** Subnet resource ID for the managed instance. */ + subnetId?: string; /** - * List of private endpoint connections on a server + * The state of the managed instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; - /** Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' */ + readonly state?: string; + /** The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). */ + licenseType?: ManagedInstanceLicenseType; + /** The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ + vCores?: number; + /** Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. */ + storageSizeInGB?: number; + /** Collation of the managed instance. */ + collation?: string; + /** + * 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; + /** The resource id of another managed instance whose DNS zone this managed instance will share after creation. */ + dnsZonePartner?: string; + /** Whether or not the public data endpoint is enabled. */ + publicDataEndpointEnabled?: boolean; + /** The resource identifier of the source managed instance associated with create operation of this instance. */ + sourceManagedInstanceId?: string; + /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ + restorePointInTime?: Date; + /** Connection type used for connecting to the instance. */ + proxyOverride?: ManagedInstanceProxyOverride; + /** + * 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; + /** The Id of the instance pool this managed server belongs to. */ + instancePoolId?: string; + /** Specifies maintenance configuration id to apply to this managed instance. */ + maintenanceConfigurationId?: string; + /** + * List of private endpoint connections on a managed instance. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: ManagedInstancePecProperty[]; + /** Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' */ minimalTlsVersion?: string; - /** Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' */ - publicNetworkAccess?: ServerNetworkAccessFlag; /** - * Whether or not existing server has a workspace created and if it allows connection from workspace + * The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly workspaceFeature?: ServerWorkspaceFeature; + readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; + /** The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) */ + requestedBackupStorageRedundancy?: BackupStorageRedundancy; + /** Whether or not the multi-az is enabled. */ + zoneRedundant?: boolean; /** The resource id of a user assigned identity to be used by default. */ primaryUserAssignedIdentityId?: string; - /** The Client id used for cross tenant CMK scenario */ - federatedClientId?: string; /** A CMK URI of the key to use for encryption. */ keyId?: string; - /** The Azure Active Directory identity of the server. */ - administrators?: ServerExternalAdministrator; - /** Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' */ - restrictOutboundNetworkAccess?: ServerNetworkAccessFlag; -} - -/** Contains the information necessary to perform import operation for new database. */ -export interface ImportNewDatabaseDefinition { - /** Name of the import database. */ - databaseName?: string; - /** Edition of the import database. */ - edition?: string; - /** Service level objective name of the import database. */ - serviceObjectiveName?: string; - /** Max size in bytes for the import database. */ - maxSizeBytes?: string; - /** Storage key type. */ - storageKeyType: StorageKeyType; - /** Storage key. */ - storageKey: string; - /** Storage Uri. */ - storageUri: string; - /** Administrator login name. */ - administratorLogin: string; - /** Administrator login password. */ - administratorLoginPassword: string; - /** Authentication type. */ - authenticationType?: string; - /** Optional resource information to enable network isolation for request. */ - networkIsolation?: NetworkIsolationSettings; -} - -/** Contains the ARM resources for which to create private endpoint connection. */ -export interface NetworkIsolationSettings { - /** The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for StorageUri parameter. */ - storageAccountResourceId?: string; - /** The resource id for the SQL server which is the target of this request. If set, private endpoint connection will be created for the SQL server. Must match server which is target of the operation. */ - sqlServerResourceId?: string; + /** The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. */ + administrators?: ManagedInstanceExternalAdministrator; + /** The managed instance's service principal. */ + servicePrincipal?: ServicePrincipal; } -/** Contains the private endpoint connection requests status. */ -export interface PrivateEndpointConnectionRequestStatus { +/** A collection of endpoints that the managed instance service requires outbound network access to. */ +export interface OutboundEnvironmentEndpointCollection { /** - * Resource id for which the private endpoint is created. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateLinkServiceId?: string; + readonly value?: OutboundEnvironmentEndpoint[]; /** - * The connection name for the private endpoint. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnectionName?: string; + readonly nextLink?: string; +} + +/** An endpoint that the managed instance service requires outbound network access to. */ +export interface OutboundEnvironmentEndpoint { /** - * Status of this private endpoint connection. + * The type of service accessed by the managed instance service, e.g., Azure Storage, Azure Active Directory, etc. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: string; -} - -/** A request to check whether the specified name for a resource is available. */ -export interface CheckNameAvailabilityRequest { - name: string; - type: "Microsoft.Sql/servers"; -} - -/** The result of a name availability check. */ -export interface CheckNameAvailabilityResponse { + readonly category?: string; /** - * The name whose availability was checked. + * The endpoints that the managed instance service communicates with in order to function correctly. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly endpoints?: EndpointDependency[]; +} + +/** A domain name that the managed instance service needs to communicate with, along with additional details. */ +export interface EndpointDependency { /** - * True if the name is available, otherwise false. + * The domain name of the dependency. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly available?: boolean; + readonly domainName?: string; /** - * The reason code explaining why the name is unavailable. Will be undefined if the name is available. + * The IP Addresses and Ports used when connecting to DomainName. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly reason?: CheckNameAvailabilityReason; + readonly endpointDetails?: EndpointDetail[]; +} + +/** A domain name that the managed instance service needs to communicate with, along with additional details. */ +export interface EndpointDetail { /** - * A message explaining why the name is unavailable. Will be undefined if the name is available. + * The port an endpoint is connected to. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; + readonly port?: number; } -/** A list of usages. */ -export interface UsageListResult { +/** A list of top resource consuming queries on managed instance */ +export interface TopQueriesListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Usage[]; + readonly value?: TopQueries[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3340,60 +3251,48 @@ export interface UsageListResult { readonly nextLink?: string; } -/** ARM usage. */ -export interface Usage { - /** - * Resource ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; +export interface TopQueries { /** - * Resource name. + * Requested number of top queries. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: Name; + readonly numberOfQueries?: number; /** - * Resource type. + * Aggregation function used to calculate query metrics. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly aggregationFunction?: string; /** - * Usage unit. + * Metric used to rank queries. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; + readonly observationMetric?: string; /** - * Usage current value. + * Interval type (length). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentValue?: number; + readonly intervalType?: QueryTimeGrainType; /** - * Usage limit. + * 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 limit?: number; + readonly startTime?: string; /** - * Usage requested limit. + * 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 requestedLimit?: number; -} - -/** ARM Usage Name */ -export interface Name { - /** Usage name value */ - value?: string; - /** Usage name localized value. */ - localizedValue?: string; + readonly endTime?: string; + /** List of top resource consuming queries with appropriate metric data */ + queries?: QueryStatisticsProperties[]; } -/** A list of databases. */ -export interface DatabaseListResult { +/** A list of ledger digest upload settings. */ +export interface ManagedLedgerDigestUploadsListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: Database[]; + readonly value?: ManagedLedgerDigestUploads[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3401,265 +3300,129 @@ export interface DatabaseListResult { readonly nextLink?: string; } -/** Azure Active Directory identity configuration for a resource. */ -export interface DatabaseIdentity { - /** The identity type */ - type?: DatabaseIdentityType; - /** - * The Azure Active Directory tenant id. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The resource ids of the user assigned identities to use */ - userAssignedIdentities?: { [propertyName: string]: DatabaseUserIdentity }; - /** Resources delegated to the database - Internal Use Only */ - delegatedResources?: { [propertyName: string]: Delegation }; -} - -/** Azure Active Directory identity configuration for a resource. */ -export interface DatabaseUserIdentity { +/** A list of managed server DNS aliases. */ +export interface ManagedServerDnsAliasListResult { /** - * The Azure Active Directory principal id. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly value?: ManagedServerDnsAlias[]; /** - * The Azure Active Directory client id. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; + readonly nextLink?: string; } -/** Delegated Resource Properties - Internal Use Only */ -export interface Delegation { - /** The resource id of the source resource - Internal Use Only */ - resourceId?: string; - /** - * AAD tenant guid of the source resource identity - Internal Use Only. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; +/** A managed server dns alias creation request. */ +export interface ManagedServerDnsAliasCreation { + /** Whether or not DNS record should be created for this alias. */ + createDnsRecord?: boolean; } -/** A database resource. */ -export interface DatabaseUpdate { - /** The name and tier of the SKU. */ - sku?: Sku; - /** Database identity */ - identity?: DatabaseIdentity; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** - * 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. - */ - createMode?: CreateMode; - /** The collation of the database. */ - collation?: string; - /** The max size of the database expressed in bytes. */ - maxSizeBytes?: number; - /** The name of the sample schema to apply when creating this database. */ - sampleName?: SampleName; - /** The resource identifier of the elastic pool containing this database. */ - elasticPoolId?: string; - /** The resource identifier of the source database associated with create operation of this database. */ - sourceDatabaseId?: string; +/** A managed server DNS alias acquisition request. */ +export interface ManagedServerDnsAliasAcquisition { + /** The resource ID of the managed server DNS alias that will be acquired to point to this managed server instead. */ + oldManagedServerDnsAliasResourceId: string; +} + +/** A list of the managed Server's security alert policies. */ +export interface ManagedServerSecurityAlertPolicyListResult { /** - * The status of the database. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: DatabaseStatus; + readonly value?: ManagedServerSecurityAlertPolicy[]; /** - * The ID of the database. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseId?: string; + readonly nextLink?: string; +} + +/** Result of the request to list SQL operations. */ +export interface OperationListResult { /** - * The creation date of the database (ISO8601 format). + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly value?: Operation[]; /** - * The current service level objective name of the database. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentServiceObjectiveName?: string; + readonly nextLink?: string; +} + +/** SQL REST API operation definition. */ +export interface Operation { /** - * The requested service level objective name of the database. + * 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 requestedServiceObjectiveName?: string; + readonly name?: string; /** - * The default secondary region for this database. + * 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 defaultSecondaryLocation?: string; + readonly display?: OperationDisplay; /** - * Failover Group resource identifier that this database belongs to. + * The intended executor of the operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly failoverGroupId?: string; - /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ - restorePointInTime?: Date; - /** Specifies the time that the database was deleted. */ - sourceDatabaseDeletionDate?: Date; - /** The resource identifier of the recovery point associated with create operation of this database. */ - recoveryServicesRecoveryPointId?: string; - /** The resource identifier of the long term retention backup associated with create operation of this database. */ - longTermRetentionBackupResourceId?: string; - /** The resource identifier of the recoverable database associated with create operation of this database. */ - recoverableDatabaseId?: string; - /** The resource identifier of the restorable dropped database associated with create operation of this database. */ - restorableDroppedDatabaseId?: string; - /** Collation of the metadata catalog. */ - catalogCollation?: CatalogCollationType; - /** Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. */ - zoneRedundant?: boolean; - /** The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. */ - licenseType?: DatabaseLicenseType; + readonly origin?: OperationOrigin; /** - * The max log size for this database. + * Additional descriptions for the operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxLogSizeBytes?: number; + readonly properties?: { [propertyName: string]: Record }; +} + +/** Display metadata associated with the operation. */ +export interface OperationDisplay { /** - * This records the earliest start date and time that restore is available for this database (ISO8601 format). + * 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 earliestRestoreDate?: Date; - /** 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. */ - readScale?: DatabaseReadScale; - /** The number of secondary replicas associated with the database that are used to provide high availability. */ - highAvailabilityReplicaCount?: number; - /** The secondary type of the database if it is a secondary. Valid values are Geo and Named. */ - secondaryType?: SecondaryType; + readonly provider?: string; /** - * The name and tier of the SKU. + * 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 currentSku?: Sku; - /** Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled */ - autoPauseDelay?: number; + readonly resource?: string; /** - * The storage account type used to store backups for this database. + * The localized friendly name for the operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; - /** The storage account type to be used to store backups for this database. */ - requestedBackupStorageRedundancy?: BackupStorageRedundancy; - /** Minimal capacity that database will always have allocated, if not paused */ - minCapacity?: number; + readonly operation?: string; /** - * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. + * The localized friendly description for the operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly pausedDate?: Date; + readonly description?: string; +} + +/** A list of outbound rules. */ +export interface OutboundFirewallRuleListResult { /** - * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resumedDate?: Date; - /** Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. */ - maintenanceConfigurationId?: string; - /** Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. */ - isLedgerOn?: boolean; + readonly value?: OutboundFirewallRule[]; /** - * Infra encryption is enabled for this database. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isInfraEncryptionEnabled?: boolean; - /** The Client id used for cross tenant per database CMK scenario */ - federatedClientId?: string; - /** The Primary Delegated Identity Client id used for per database CMK - for internal use only */ - primaryDelegatedIdentityClientId?: string; -} - -/** Contains the information necessary to perform a resource move (rename). */ -export interface ResourceMoveDefinition { - /** The target ID for the resource */ - id: string; -} - -/** Contains the information necessary to perform import operation for existing database. */ -export interface ImportExistingDatabaseDefinition { - /** Storage key type. */ - storageKeyType: StorageKeyType; - /** Storage key. */ - storageKey: string; - /** Storage Uri. */ - storageUri: string; - /** Administrator login name. */ - administratorLogin: string; - /** Administrator login password. */ - administratorLoginPassword: string; - /** Authentication type. */ - authenticationType?: string; - /** Optional resource information to enable network isolation for request. */ - networkIsolation?: NetworkIsolationSettings; -} - -/** Contains the information necessary to perform export database operation. */ -export interface ExportDatabaseDefinition { - /** Storage key type. */ - storageKeyType: StorageKeyType; - /** Storage key. */ - storageKey: string; - /** Storage Uri. */ - storageUri: string; - /** Administrator login name. */ - administratorLogin: string; - /** Administrator login password. */ - administratorLoginPassword: string; - /** Authentication type. */ - authenticationType?: string; - /** Optional resource information to enable network isolation for request. */ - networkIsolation?: NetworkIsolationSettings; -} - -/** Contains the information necessary to perform long term retention backup copy operation. */ -export interface CopyLongTermRetentionBackupParameters { - /** The subscription that owns the target server */ - targetSubscriptionId?: string; - /** The resource group that owns the target server */ - targetResourceGroup?: string; - /** The resource Id of the target server that owns the database */ - targetServerResourceId?: string; - /** The fully qualified domain name of the target server */ - targetServerFullyQualifiedDomainName?: string; - /** The name of the database owns the copied backup. */ - targetDatabaseName?: string; - /** The storage redundancy type of the copied backup */ - targetBackupStorageRedundancy?: BackupStorageRedundancy; -} - -/** Contains the information necessary to perform long term retention backup update operation. */ -export interface UpdateLongTermRetentionBackupParameters { - /** The storage redundancy type of the copied backup */ - requestedBackupStorageRedundancy?: BackupStorageRedundancy; + readonly nextLink?: string; } -/** A list of long term retention backups. */ -export interface LongTermRetentionBackupListResult { +/** A list of private endpoint connections. */ +export interface PrivateEndpointConnectionListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: LongTermRetentionBackup[]; + readonly value?: PrivateEndpointConnection[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3667,27 +3430,48 @@ export interface LongTermRetentionBackupListResult { readonly nextLink?: string; } -/** A list of long term retention backups for managed database(s). */ -export interface ManagedInstanceLongTermRetentionBackupListResult { +/** Properties of a private endpoint connection. */ +export interface PrivateEndpointConnectionProperties { + /** Private endpoint which the connection belongs to. */ + privateEndpoint?: PrivateEndpointProperty; /** - * Array of results. + * Group IDs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstanceLongTermRetentionBackup[]; + readonly groupIds?: string[]; + /** Connection state of the private endpoint connection. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; /** - * Link to retrieve next page of results. + * State of the private endpoint connection. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: string; + readonly provisioningState?: PrivateEndpointProvisioningState; } -/** A list of managed instances. */ -export interface ManagedInstanceListResult { +export interface PrivateEndpointProperty { + /** Resource id of the private endpoint. */ + id?: string; +} + +export interface PrivateLinkServiceConnectionStateProperty { + /** The private link service connection status. */ + status: PrivateLinkServiceConnectionStateStatus; + /** The private link service connection description. */ + description: string; + /** + * The actions required for private link service connection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly actionsRequired?: PrivateLinkServiceConnectionStateActionsRequire; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ManagedInstance[]; + readonly value?: PrivateLinkResource[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3695,160 +3479,102 @@ export interface ManagedInstanceListResult { readonly nextLink?: string; } -/** A private endpoint connection under a managed instance */ -export interface ManagedInstancePecProperty { +/** Properties of a private link resource. */ +export interface PrivateLinkResourceProperties { /** - * Resource ID. + * The private link resource group id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly groupId?: string; /** - * Private endpoint connection properties + * The private link resource required member names. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly properties?: ManagedInstancePrivateEndpointConnectionProperties; -} - -/** Properties of a active directory administrator. */ -export interface ManagedInstanceExternalAdministrator { - /** Type of the sever administrator. */ - administratorType?: AdministratorType; - /** Principal Type of the sever administrator. */ - principalType?: PrincipalType; - /** Login name of the server administrator. */ - login?: string; - /** SID (object ID) of the server administrator. */ - sid?: string; - /** Tenant ID of the administrator. */ - tenantId?: string; - /** Azure Active Directory only Authentication enabled. */ - azureADOnlyAuthentication?: boolean; -} - -/** The managed instance's service principal configuration for a resource. */ -export interface ServicePrincipal { + readonly requiredMembers?: string[]; /** - * The Azure Active Directory application object id. + * The private link resource required zone names. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly requiredZoneNames?: string[]; +} + +/** A list of recoverable databases. */ +export interface RecoverableDatabaseListResult { /** - * The Azure Active Directory application client id. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; + readonly value?: RecoverableDatabase[]; /** - * The Azure Active Directory tenant id. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** Service principal type. */ - type?: ServicePrincipalType; + readonly nextLink?: string; } -/** An update request for an Azure SQL Database managed instance. */ -export interface ManagedInstanceUpdate { - /** Managed instance sku */ - sku?: Sku; - /** Managed instance identity */ - identity?: ResourceIdentity; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ManagedInstancePropertiesProvisioningState; +/** A list of recoverable managed databases. */ +export interface RecoverableManagedDatabaseListResult { /** - * Specifies the mode of database creation. - * - * Default: Regular instance creation. - * - * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - managedInstanceCreateMode?: ManagedServerCreateMode; + readonly value?: RecoverableManagedDatabase[]; /** - * The fully qualified domain name of the managed instance. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly fullyQualifiedDomainName?: string; - /** Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). */ - administratorLogin?: string; - /** The administrator login password (required for managed instance creation). */ - administratorLoginPassword?: string; - /** Subnet resource ID for the managed instance. */ - subnetId?: string; + readonly nextLink?: string; +} + +/** A list of replication links. */ +export interface ReplicationLinkListResult { /** - * The state of the managed instance. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: string; - /** The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). */ - licenseType?: ManagedInstanceLicenseType; - /** The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ - vCores?: number; - /** Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. */ - storageSizeInGB?: number; - /** Collation of the managed instance. */ - collation?: string; + readonly value?: ReplicationLink[]; /** - * The Dns Zone that the managed instance is in. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsZone?: string; - /** The resource id of another managed instance whose DNS zone this managed instance will share after creation. */ - dnsZonePartner?: string; - /** Whether or not the public data endpoint is enabled. */ - publicDataEndpointEnabled?: boolean; - /** The resource identifier of the source managed instance associated with create operation of this instance. */ - sourceManagedInstanceId?: string; - /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ - restorePointInTime?: Date; - /** Connection type used for connecting to the instance. */ - proxyOverride?: ManagedInstanceProxyOverride; + readonly nextLink?: string; +} + +/** A list of restorable dropped databases. */ +export interface RestorableDroppedDatabaseListResult { /** - * 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". + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - timezoneId?: string; - /** The Id of the instance pool this managed server belongs to. */ - instancePoolId?: string; - /** Specifies maintenance configuration id to apply to this managed instance. */ - maintenanceConfigurationId?: string; + readonly value?: RestorableDroppedDatabase[]; /** - * List of private endpoint connections on a managed instance. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: ManagedInstancePecProperty[]; - /** Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' */ - minimalTlsVersion?: string; + readonly nextLink?: string; +} + +/** A list of restorable dropped managed databases. */ +export interface RestorableDroppedManagedDatabaseListResult { /** - * The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; - /** The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) */ - requestedBackupStorageRedundancy?: BackupStorageRedundancy; - /** Whether or not the multi-az is enabled. */ - zoneRedundant?: boolean; - /** The resource id of a user assigned identity to be used by default. */ - primaryUserAssignedIdentityId?: string; - /** A CMK URI of the key to use for encryption. */ - keyId?: string; - /** The Azure Active Directory administrator of the server. */ - administrators?: ManagedInstanceExternalAdministrator; - /** The managed instance's service principal. */ - servicePrincipal?: ServicePrincipal; + readonly value?: RestorableDroppedManagedDatabase[]; + /** + * 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; } -/** A list of top resource consuming queries on managed instance */ -export interface TopQueriesListResult { +/** A list of long term retention backups. */ +export interface RestorePointListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: TopQueries[]; + readonly value?: RestorePoint[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3856,48 +3582,68 @@ export interface TopQueriesListResult { readonly nextLink?: string; } -export interface TopQueries { +/** Contains the information necessary to perform a create database restore point operation. */ +export interface CreateDatabaseRestorePointDefinition { + /** The restore point label to apply */ + restorePointLabel: string; +} + +/** A list of the server's Advanced Threat Protection configurations. */ +export interface LogicalServerAdvancedThreatProtectionListResult { /** - * Requested number of top queries. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfQueries?: number; + readonly value?: ServerAdvancedThreatProtection[]; /** - * Aggregation function used to calculate query metrics. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly aggregationFunction?: string; + readonly nextLink?: string; +} + +/** Automatic tuning properties for individual advisors. */ +export interface AutomaticTuningServerOptions { + /** Automatic tuning option desired state. */ + desiredState?: AutomaticTuningOptionModeDesired; /** - * Metric used to rank queries. + * Automatic tuning option actual state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly observationMetric?: string; + readonly actualState?: AutomaticTuningOptionModeActual; /** - * Interval type (length). + * 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 intervalType?: QueryTimeGrainType; + readonly reasonCode?: number; /** - * The start time for the metric (ISO-8601 format). + * Reason description if desired and actual state are different. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: string; + readonly reasonDesc?: AutomaticTuningServerReason; +} + +/** A list of active directory administrators. */ +export interface AdministratorListResult { /** - * The end time for the metric (ISO-8601 format). + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: string; - /** List of top resource consuming queries with appropriate metric data */ - queries?: QueryStatisticsProperties[]; + readonly value?: ServerAzureADAdministrator[]; + /** + * 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; } -/** A list of restorable dropped databases. */ -export interface RestorableDroppedDatabaseListResult { +/** A list of active directory only authentications. */ +export interface AzureADOnlyAuthListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RestorableDroppedDatabase[]; + readonly value?: ServerAzureADOnlyAuthentication[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3905,13 +3651,13 @@ export interface RestorableDroppedDatabaseListResult { readonly nextLink?: string; } -/** A list of restorable dropped managed databases. */ -export interface RestorableDroppedManagedDatabaseListResult { +/** A list of server configuration options. */ +export interface ServerConfigurationOptionListResult { /** * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RestorableDroppedManagedDatabase[]; + readonly value?: ServerConfigurationOption[]; /** * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -3933,530 +3679,813 @@ export interface ServerConnectionPolicyListResult { readonly nextLink?: string; } -/** A Slo Usage Metric. */ -export interface SloUsageMetric { +/** A list of server DevOps audit settings. */ +export interface ServerDevOpsAuditSettingsListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ServerDevOpsAuditingSettings[]; /** - * The serviceLevelObjective for SLO usage metric. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceLevelObjective?: ServiceObjectiveName; + readonly nextLink?: string; +} + +/** A list of server DNS aliases. */ +export interface ServerDnsAliasListResult { /** - * The serviceLevelObjectiveId for SLO usage metric. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceLevelObjectiveId?: string; + readonly value?: ServerDnsAlias[]; /** - * Gets or sets inRangeTimeRatio for SLO usage metric. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly inRangeTimeRatio?: number; + readonly nextLink?: string; +} + +/** A server dns alias acquisition request. */ +export interface ServerDnsAliasAcquisition { + /** The id of the server alias that will be acquired to point to this server instead. */ + oldServerDnsAliasId: string; } -/** The impact of an operation, both in absolute and relative terms. */ -export interface OperationImpact { +/** A list of server keys. */ +export interface ServerKeyListResult { /** - * The name of the impact dimension. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly value?: ServerKey[]; /** - * The unit in which estimated impact to dimension is measured. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; + readonly nextLink?: string; +} + +/** The response to a list server operations request */ +export interface ServerOperationListResult { /** - * The absolute impact to dimension. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly changeValueAbsolute?: number; + readonly value?: ServerOperation[]; /** - * The relative impact to dimension (null if not applicable) + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly changeValueRelative?: number; -} - -/** The properties that are supported in the $filter operation. */ -export interface SecurityEventsFilterParameters { - /** Filter on the event time. */ - eventTime?: Date; - /** Whether to show server records or not. */ - showServerRecords?: boolean; -} - -/** ARM proxy resource. */ -export interface ProxyResource extends Resource {} - -/** ARM tracked top level resource. */ -export interface TrackedResource extends Resource { - /** Resource location. */ - location: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; + readonly nextLink?: string; } -/** ARM proxy resource. */ -export interface ProxyResourceWithWritableName - extends ResourceWithWritableName {} - -/** A recoverable database */ -export interface RecoverableDatabase extends ProxyResource { +/** A list of the server's security alert policies. */ +export interface LogicalServerSecurityAlertPolicyListResult { /** - * The edition of the database + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly edition?: string; + readonly value?: ServerSecurityAlertPolicy[]; /** - * The service level objective name of the database + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceLevelObjective?: string; + readonly nextLink?: string; +} + +/** A list of server trust certificates in instance. */ +export interface ServerTrustCertificatesListResult { /** - * The elastic pool name of the database + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly elasticPoolName?: string; + readonly value?: ServerTrustCertificate[]; /** - * The last available backup date of the database (ISO8601 format) + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastAvailableBackupDate?: Date; + readonly nextLink?: string; } -/** Represents a database data masking policy. */ -export interface DataMaskingPolicy extends ProxyResource { +/** A list of server trust groups. */ +export interface ServerTrustGroupListResult { /** - * The location of the data masking policy. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly value?: ServerTrustGroup[]; /** - * The kind of data masking policy. Metadata, used for Azure portal. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; - /** The state of the data masking policy. */ - dataMaskingState?: DataMaskingState; - /** 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; + readonly nextLink?: string; +} + +/** Server info for the server trust group. */ +export interface ServerInfo { + /** Server Id. */ + serverId: string; +} + +/** A list of server usage metrics. */ +export interface ServerUsageListResult { /** - * The list of the application principals. This is a legacy parameter and is no longer used. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly applicationPrincipals?: string; + readonly value?: ServerUsage[]; /** - * The masking level. This is a legacy parameter and is no longer used. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maskingLevel?: string; + readonly nextLink?: string; } -/** Represents a database data masking rule. */ -export interface DataMaskingRule extends ProxyResource { - /** - * 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; +/** A list of the server's vulnerability assessments. */ +export interface ServerVulnerabilityAssessmentListResult { /** - * The kind of Data Masking Rule. Metadata, used for Azure portal. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly value?: ServerVulnerabilityAssessment[]; /** - * The rule Id. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly idPropertiesId?: string; - /** The alias name. This is a legacy parameter and is no longer used. */ - aliasName?: string; - /** 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. */ - ruleState?: DataMaskingRuleState; - /** The schema name on which the data masking rule is applied. */ - schemaName?: string; - /** The table name on which the data masking rule is applied. */ - tableName?: string; - /** The column name on which the data masking rule is applied. */ - columnName?: string; - /** The masking function that is used for the data masking rule. */ - maskingFunction?: DataMaskingFunction; - /** The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. */ - numberFrom?: string; - /** The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. */ - numberTo?: string; - /** 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; - /** 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; - /** 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; + readonly nextLink?: string; } -/** A database geo backup policy. */ -export interface GeoBackupPolicy extends ProxyResource { +/** A request to check whether the specified name for a resource is available. */ +export interface CheckNameAvailabilityRequest { + name: string; + type: "Microsoft.Sql/servers"; +} + +/** The result of a name availability check. */ +export interface CheckNameAvailabilityResponse { /** - * Kind of geo backup policy. This is metadata used for the Azure portal experience. + * The name whose availability was checked. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly name?: string; /** - * Backup policy location. + * True if the name is available, otherwise false. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; - /** The state of the geo backup policy. */ - state: GeoBackupPolicyState; + readonly available?: boolean; /** - * The storage type of the geo backup policy. + * The reason code explaining why the name is unavailable. Will be undefined if the name is available. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly storageType?: string; -} - -/** Server communication link. */ -export interface ServerCommunicationLink extends ProxyResource { + readonly reason?: CheckNameAvailabilityReason; /** - * Communication link location. + * A message explaining why the name is unavailable. Will be undefined if the name is available. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly message?: string; +} + +/** A list of servers. */ +export interface ServerListResult { /** - * Communication link kind. This property is used for Azure Portal metadata. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly value?: Server[]; /** - * The state. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: string; - /** The name of the partner server. */ - partnerServer?: string; + readonly nextLink?: string; } -/** Represents a database service objective. */ -export interface ServiceObjective extends ProxyResource { +/** A private endpoint connection under a server */ +export interface ServerPrivateEndpointConnection { /** - * The name for the service objective. + * Resource ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceObjectiveName?: string; + readonly id?: string; /** - * Gets whether the service level objective is the default service objective. + * Private endpoint connection properties * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isDefault?: boolean; + readonly properties?: PrivateEndpointConnectionProperties; +} + +/** Properties of a active directory administrator. */ +export interface ServerExternalAdministrator { + /** Type of the sever administrator. */ + administratorType?: AdministratorType; + /** Principal Type of the sever administrator. */ + principalType?: PrincipalType; + /** Login name of the server administrator. */ + login?: string; + /** SID (object ID) of the server administrator. */ + sid?: string; + /** Tenant ID of the administrator. */ + tenantId?: string; + /** Azure Active Directory only Authentication enabled. */ + azureADOnlyAuthentication?: boolean; +} + +/** An update request for an Azure SQL Database server. */ +export interface ServerUpdate { + /** Server identity */ + identity?: ResourceIdentity; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Administrator username for the server. Once created it cannot be changed. */ + administratorLogin?: string; + /** The administrator login password (required for server creation). */ + administratorLoginPassword?: string; + /** The version of the server. */ + version?: string; /** - * Gets whether the service level objective is a system service objective. + * The state of the server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isSystem?: boolean; + readonly state?: string; /** - * The description for the service level objective. + * The fully qualified domain name of the server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; + readonly fullyQualifiedDomainName?: string; /** - * Gets whether the service level objective is enabled. + * List of private endpoint connections on a server * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly enabled?: boolean; -} - -/** Represents the activity on an elastic pool. */ -export interface ElasticPoolActivity extends ProxyResource { - /** The geo-location where the resource lives */ - location?: string; + readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; + /** Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' */ + minimalTlsVersion?: string; + /** Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter' */ + publicNetworkAccess?: ServerPublicNetworkAccessFlag; /** - * The time the operation finished (ISO8601 format). + * Whether or not existing server has a workspace created and if it allows connection from workspace * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: Date; + readonly workspaceFeature?: ServerWorkspaceFeature; + /** The resource id of a user assigned identity to be used by default. */ + primaryUserAssignedIdentityId?: string; + /** The Client id used for cross tenant CMK scenario */ + federatedClientId?: string; + /** A CMK URI of the key to use for encryption. */ + keyId?: string; + /** The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. */ + administrators?: ServerExternalAdministrator; + /** Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' */ + restrictOutboundNetworkAccess?: ServerNetworkAccessFlag; /** - * The error code if available. + * Status of external governance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorCode?: number; + readonly externalGovernanceStatus?: ExternalGovernanceStatus; +} + +/** Contains the information necessary to perform import operation for new database. */ +export interface ImportNewDatabaseDefinition { + /** Name of the import database. */ + databaseName?: string; + /** Edition of the import database. */ + edition?: string; + /** Service level objective name of the import database. */ + serviceObjectiveName?: string; + /** Max size in bytes for the import database. */ + maxSizeBytes?: string; + /** Storage key type. */ + storageKeyType: StorageKeyType; + /** Storage key. */ + storageKey: string; + /** Storage Uri. */ + storageUri: string; + /** Administrator login name. */ + administratorLogin: string; + /** Administrator login password. */ + administratorLoginPassword: string; + /** Authentication type. */ + authenticationType?: string; + /** Optional resource information to enable network isolation for request. */ + networkIsolation?: NetworkIsolationSettings; +} + +/** Managed instance's Start/Stop schedule list result. */ +export interface StartStopManagedInstanceScheduleListResult { /** - * The error message if available. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; + readonly value?: StartStopManagedInstanceSchedule[]; /** - * The error severity if available. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorSeverity?: number; + readonly nextLink?: string; +} + +/** Schedule info describing when the server should be started or stopped. */ +export interface ScheduleItem { + /** Start day. */ + startDay: DayOfWeek; + /** Start time. */ + startTime: string; + /** Stop day. */ + stopDay: DayOfWeek; + /** Stop time. */ + stopTime: string; +} + +/** A list of subscription usage metrics in a location. */ +export interface SubscriptionUsageListResult { /** - * The operation name. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operation?: string; + readonly value?: SubscriptionUsage[]; /** - * The unique operation ID. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationId?: string; + readonly nextLink?: string; +} + +/** A list of synapselink workspaces */ +export interface SynapseLinkWorkspaceListResult { /** - * The percentage complete if available. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentComplete?: number; + readonly value?: SynapseLinkWorkspace[]; /** - * The requested max DTU per database if available. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedDatabaseDtuMax?: number; + readonly nextLink?: string; +} + +/** Properties of a Synapse link workspaces */ +export interface SynapseLinkWorkspaceInfoProperties { + /** Synapse link workspace id. */ + workspaceId?: string; + /** Link connection name. */ + linkConnectionName?: string; +} + +/** A list of sync agents. */ +export interface SyncAgentListResult { /** - * The requested min DTU per database if available. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedDatabaseDtuMin?: number; + readonly value?: SyncAgent[]; /** - * The requested DTU for the pool if available. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedDtu?: number; + readonly nextLink?: string; +} + +/** Properties of an Azure SQL Database sync agent key. */ +export interface SyncAgentKeyProperties { /** - * The requested name for the elastic pool if available. + * Key of sync agent. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedElasticPoolName?: string; + readonly syncAgentKey?: string; +} + +/** A list of sync agent linked databases. */ +export interface SyncAgentLinkedDatabaseListResult { /** - * The requested storage limit for the pool in GB if available. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedStorageLimitInGB?: number; + readonly value?: SyncAgentLinkedDatabase[]; /** - * The name of the elastic pool. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly elasticPoolName?: string; + readonly nextLink?: string; +} + +/** A list of sync database ID properties. */ +export interface SyncDatabaseIdListResult { /** - * The name of the server the elastic pool is in. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly value?: SyncDatabaseIdProperties[]; /** - * The time the operation started (ISO8601 format). + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly nextLink?: string; +} + +/** Properties of the sync database id. */ +export interface SyncDatabaseIdProperties { /** - * The current state of the operation. + * ARM resource id of sync database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: string; + readonly id?: string; +} + +/** A list of sync groups. */ +export interface SyncGroupListResult { /** - * The requested storage limit in MB. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedStorageLimitInMB?: number; + readonly value?: SyncGroup[]; /** - * The requested per database DTU guarantee. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedDatabaseDtuGuarantee?: number; + readonly nextLink?: string; +} + +/** Properties of sync group schema. */ +export interface SyncGroupSchema { + /** List of tables in sync group schema. */ + tables?: SyncGroupSchemaTable[]; + /** Name of master sync member where the schema is from. */ + masterSyncMemberName?: string; +} + +/** Properties of table in sync group schema. */ +export interface SyncGroupSchemaTable { + /** List of columns in sync group schema. */ + columns?: SyncGroupSchemaTableColumn[]; + /** Quoted name of sync group schema table. */ + quotedName?: string; +} + +/** Properties of column in sync group table. */ +export interface SyncGroupSchemaTableColumn { + /** Quoted name of sync group table column. */ + quotedName?: string; + /** Data size of the column. */ + dataSize?: string; + /** Data type of the column. */ + dataType?: string; +} + +/** A list of sync schema properties. */ +export interface SyncFullSchemaPropertiesListResult { /** - * The requested per database DTU cap. + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedDatabaseDtuCap?: number; + readonly value?: SyncFullSchemaProperties[]; /** - * The requested DTU guarantee. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedDtuGuarantee?: number; + readonly nextLink?: string; } -/** Represents the activity on an elastic pool. */ -export interface ElasticPoolDatabaseActivity extends ProxyResource { - /** The geo-location where the resource lives */ - location?: string; +/** Properties of the database full schema. */ +export interface SyncFullSchemaProperties { /** - * The database name. + * List of tables in the database full schema. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly tables?: SyncFullSchemaTable[]; /** - * The time the operation finished (ISO8601 format). + * Last update time of the database schema. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: Date; + readonly lastUpdateTime?: Date; +} + +/** Properties of the table in the database full schema. */ +export interface SyncFullSchemaTable { /** - * The error code if available. + * 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 errorCode?: number; + readonly columns?: SyncFullSchemaTableColumn[]; /** - * The error message if available. + * Error id of the table. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; + readonly errorId?: string; /** - * The error severity if available. + * If there is error in the table. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorSeverity?: number; + readonly hasError?: boolean; /** - * The operation name. + * Name of the table. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operation?: string; + readonly name?: string; + /** + * Quoted name of the table. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly quotedName?: string; +} + +/** Properties of the column in the table of database full schema. */ +export interface SyncFullSchemaTableColumn { /** - * The unique operation ID. + * Data size of the column. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationId?: string; + readonly dataSize?: string; /** - * The percentage complete if available. + * Data type of the column. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentComplete?: number; + readonly dataType?: string; /** - * The name for the elastic pool the database is moving into if available. + * Error id of the column. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedElasticPoolName?: string; + readonly errorId?: string; /** - * The name of the current elastic pool the database is in if available. + * If there is error in the table. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentElasticPoolName?: string; + readonly hasError?: boolean; /** - * The name of the current service objective if available. + * 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 currentServiceObjective?: string; + readonly isPrimaryKey?: boolean; /** - * The name of the requested service objective if available. + * Name of the column. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedServiceObjective?: string; + readonly name?: string; /** - * The name of the server the elastic pool is in. + * Quoted name of the column. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly quotedName?: string; +} + +/** A list of sync group log properties. */ +export interface SyncGroupLogListResult { /** - * The time the operation started (ISO8601 format). + * Array of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly value?: SyncGroupLogProperties[]; /** - * The current state of the operation. + * Link to retrieve next page of results. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: string; + readonly nextLink?: string; } -/** An extended database blob auditing policy. */ -export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { - /** Specifies condition of where clause when creating an audit. */ - predicateExpression?: string; - /** Specifies the number of days to keep in the audit logs in the storage account. */ - retentionDays?: number; +/** Properties of an Azure SQL Database sync group log. */ +export interface SyncGroupLogProperties { /** - * 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) + * Timestamp of the sync group log. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - auditActionsAndGroups?: string[]; - /** Specifies whether storageAccountAccessKey value is the storage's secondary key. */ - isStorageSecondaryKeyInUse?: boolean; + readonly timestamp?: Date; /** - * 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) - * + * Type of the sync group log. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - isAzureMonitorTargetEnabled?: boolean; + readonly type?: SyncGroupLogType; /** - * Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. - * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * Source of the sync group log. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - queueDelayMs?: number; - /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ - state?: BlobAuditingPolicyState; - /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ - storageEndpoint?: string; + readonly source?: string; /** - * Specifies the identifier key of the auditing storage account. - * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. - * Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. - * For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + * Details of the sync group log. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageAccountAccessKey?: string; - /** Specifies the blob storage subscription Id. */ - storageAccountSubscriptionId?: string; -} - -/** An extended server blob auditing policy. */ -export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { + readonly details?: string; + /** + * TracingId of the sync group log. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tracingId?: string; + /** + * OperationStatus of the sync group log. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationStatus?: string; +} + +/** A list of Azure SQL Database sync members. */ +export interface SyncMemberListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: SyncMember[]; + /** + * 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; +} + +/** A list of time zones. */ +export interface TimeZoneListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: TimeZone[]; + /** + * 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; +} + +/** A list of transparent data encryptions */ +export interface LogicalDatabaseTransparentDataEncryptionListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: LogicalDatabaseTransparentDataEncryption[]; + /** + * 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; +} + +/** A list of usages. */ +export interface UsageListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: Usage[]; + /** + * 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; +} + +/** ARM usage. */ +export interface Usage { + /** + * Resource ID. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Resource name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: Name; + /** + * Resource type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Usage unit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly unit?: string; + /** + * Usage current value. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentValue?: number; + /** + * Usage limit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly limit?: number; + /** + * Usage requested limit. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requestedLimit?: number; +} + +/** ARM Usage Name */ +export interface Name { + /** Usage name value */ + value?: string; + /** Usage name localized value. */ + localizedValue?: string; +} + +/** A list of virtual clusters. */ +export interface VirtualClusterListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: VirtualCluster[]; + /** + * 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; +} + +/** An update request for virtual cluster. */ +export interface VirtualClusterUpdate { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** + * 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; + /** Virtual cluster version. */ + version?: string; + /** + * 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[]; +} + +/** A list of virtual network rules. */ +export interface VirtualNetworkRuleListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: VirtualNetworkRule[]; + /** + * 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; +} + +/** A list of workload classifiers for a workload group. */ +export interface WorkloadClassifierListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: WorkloadClassifier[]; + /** + * 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; +} + +/** A list of workload groups. */ +export interface WorkloadGroupListResult { + /** + * Array of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: WorkloadGroup[]; + /** + * 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; +} + +/** The properties that are supported in the $filter operation. */ +export interface SecurityEventsFilterParameters { + /** Filter on the event time. */ + eventTime?: Date; + /** Whether to show server records or not. */ + showServerRecords?: boolean; +} + +/** ARM proxy resource. */ +export interface ProxyResource extends Resource {} + +/** ARM tracked top level resource. */ +export interface TrackedResource extends Resource { + /** Resource location. */ + location: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; +} + +/** ARM proxy resource. */ +export interface ProxyResourceWithWritableName + extends ResourceWithWritableName {} + +/** A short term retention policy. */ +export interface BackupShortTermRetentionPolicy extends ProxyResource { + /** The backup retention period in days. This is how many days Point-in-Time Restore will be supported. */ + retentionDays?: number; + /** The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases. */ + diffBackupIntervalInHours?: DiffBackupIntervalInHours; +} + +/** A server blob auditing policy. */ +export interface ServerBlobAuditingPolicy extends ProxyResource { /** * Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true @@ -4471,8 +4500,6 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { * */ isDevopsAuditEnabled?: boolean; - /** Specifies condition of where clause when creating an audit. */ - predicateExpression?: string; /** Specifies the number of days to keep in the audit logs in the storage account. */ retentionDays?: number; /** @@ -4508,6 +4535,10 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { * USER_CHANGE_PASSWORD_GROUP * BATCH_STARTED_GROUP * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_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. * @@ -4557,6 +4588,8 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ queueDelayMs?: number; + /** Specifies whether Managed Identity is used to access blob storage */ + isManagedIdentityInUse?: boolean; /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ state?: BlobAuditingPolicyState; /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ @@ -4574,22 +4607,13 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { storageAccountSubscriptionId?: string; } -/** A server blob auditing policy. */ -export interface ServerBlobAuditingPolicy extends ProxyResource { +/** A database blob auditing policy. */ +export interface DatabaseBlobAuditingPolicy extends ProxyResource { /** - * Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true - * - * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created. - * - * Diagnostic Settings URI format: - * PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * 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) - * + * Resource kind. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - isDevopsAuditEnabled?: boolean; + readonly kind?: string; /** Specifies the number of days to keep in the audit logs in the storage account. */ retentionDays?: number; /** @@ -4625,6 +4649,10 @@ export interface ServerBlobAuditingPolicy extends ProxyResource { * USER_CHANGE_PASSWORD_GROUP * BATCH_STARTED_GROUP * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_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. * @@ -4674,6 +4702,8 @@ export interface ServerBlobAuditingPolicy extends ProxyResource { * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ queueDelayMs?: number; + /** Specifies whether Managed Identity is used to access blob storage */ + isManagedIdentityInUse?: boolean; /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ state?: BlobAuditingPolicyState; /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ @@ -4691,13 +4721,10 @@ export interface ServerBlobAuditingPolicy extends ProxyResource { storageAccountSubscriptionId?: string; } -/** A database blob auditing policy. */ -export interface DatabaseBlobAuditingPolicy extends ProxyResource { - /** - * Resource kind. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly kind?: string; +/** An extended database blob auditing policy. */ +export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { + /** Specifies condition of where clause when creating an audit. */ + predicateExpression?: string; /** Specifies the number of days to keep in the audit logs in the storage account. */ retentionDays?: number; /** @@ -4733,6 +4760,10 @@ export interface DatabaseBlobAuditingPolicy extends ProxyResource { * USER_CHANGE_PASSWORD_GROUP * BATCH_STARTED_GROUP * BATCH_COMPLETED_GROUP + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_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. * @@ -4782,6 +4813,8 @@ export interface DatabaseBlobAuditingPolicy extends ProxyResource { * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. */ queueDelayMs?: number; + /** Specifies whether Managed Identity is used to access blob storage */ + isManagedIdentityInUse?: boolean; /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ state?: BlobAuditingPolicyState; /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ @@ -4799,7 +4832,226 @@ export interface DatabaseBlobAuditingPolicy extends ProxyResource { storageAccountSubscriptionId?: string; } -/** Database, Server or Elastic Pool Recommended Action. */ +/** An extended server blob auditing policy. */ +export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { + /** + * Specifies the state of devops audit. If state is Enabled, devops logs will be sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled', 'IsAzureMonitorTargetEnabled' as true and 'IsDevopsAuditEnabled' as true + * + * When using REST API to configure auditing, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should also be created. + * + * Diagnostic Settings URI format: + * PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * 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) + * + */ + isDevopsAuditEnabled?: boolean; + /** Specifies condition of where clause when creating an audit. */ + predicateExpression?: string; + /** Specifies the number of days to keep in the audit logs in the storage account. */ + retentionDays?: number; + /** + * 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 + * DBCC_GROUP + * DATABASE_OWNERSHIP_CHANGE_GROUP + * DATABASE_CHANGE_GROUP + * LEDGER_OPERATION_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[]; + /** Specifies whether storageAccountAccessKey value is the storage's secondary key. */ + isStorageSecondaryKeyInUse?: boolean; + /** + * 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; + /** + * Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + */ + queueDelayMs?: number; + /** Specifies whether Managed Identity is used to access blob storage */ + isManagedIdentityInUse?: boolean; + /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ + state?: BlobAuditingPolicyState; + /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ + storageEndpoint?: string; + /** + * Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + * For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + */ + storageAccountAccessKey?: string; + /** Specifies the blob storage subscription Id. */ + storageAccountSubscriptionId?: string; +} + +/** A database data masking policy. */ +export interface DataMaskingPolicy extends ProxyResource { + /** + * 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; + /** + * 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; + /** The state of the data masking policy. */ + dataMaskingState?: DataMaskingState; + /** 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; + /** + * 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; + /** + * 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; +} + +/** A database data masking rule. */ +export interface DataMaskingRule extends ProxyResource { + /** + * 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; + /** + * 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; + /** + * The rule Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly idPropertiesId?: string; + /** 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. */ + ruleState?: DataMaskingRuleState; + /** The schema name on which the data masking rule is applied. */ + schemaName?: string; + /** The table name on which the data masking rule is applied. */ + tableName?: string; + /** The column name on which the data masking rule is applied. */ + columnName?: string; + /** The alias name. This is a legacy parameter and is no longer used. */ + aliasName?: string; + /** The masking function that is used for the data masking rule. */ + maskingFunction?: DataMaskingFunction; + /** The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. */ + numberFrom?: string; + /** The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. */ + numberTo?: string; + /** 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; + /** 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; + /** 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; +} + +/** User activities of a data warehouse */ +export interface DataWarehouseUserActivities extends ProxyResource { + /** + * Count of running and suspended queries. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly activeQueriesCount?: number; +} + +/** A database Advanced Threat Protection. */ +export interface DatabaseAdvancedThreatProtection extends ProxyResource { + /** + * SystemData of AdvancedThreatProtectionResource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. */ + state?: AdvancedThreatProtectionState; + /** + * 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; +} + +/** Database, Server or Elastic Pool Recommended Action. */ export interface RecommendedAction extends ProxyResource { /** * Resource kind. @@ -4991,158 +5243,93 @@ export interface DatabaseColumn extends ProxyResource { isComputed?: boolean; } -/** A database schema resource. */ -export interface DatabaseSchema extends ProxyResource {} - -/** A database security alert policy. */ -export interface DatabaseSecurityAlertPolicy extends ProxyResource { +/** An Extension operation result resource. */ +export interface ImportExportExtensionsOperationResult extends ProxyResource { /** - * SystemData of SecurityAlertPolicyResource. + * Request Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ - state?: SecurityAlertsPolicyState; - /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ - disabledAlerts?: string[]; - /** Specifies an array of e-mail addresses to which the alert is sent. */ - emailAddresses?: string[]; - /** Specifies that the alert is sent to the account administrators. */ - emailAccountAdmins?: boolean; - /** 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; - /** Specifies the identifier key of the Threat Detection audit storage account. */ - storageAccountAccessKey?: string; - /** Specifies the number of days to keep in the Threat Detection audit logs. */ - retentionDays?: number; + readonly requestId?: string; /** - * Specifies the UTC creation time of the policy. + * Request type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationTime?: Date; -} - -/** A database table resource. */ -export interface DatabaseTable extends ProxyResource { - /** The table temporal type. */ - temporalType?: TableTemporalType; - /** Whether or not the table is memory optimized. */ - memoryOptimized?: boolean; -} - -/** A database vulnerability assessment rule baseline. */ -export interface DatabaseVulnerabilityAssessmentRuleBaseline - extends ProxyResource { - /** The rule baseline result */ - baselineResults?: DatabaseVulnerabilityAssessmentRuleBaselineItem[]; -} - -/** A database vulnerability assessment. */ -export interface DatabaseVulnerabilityAssessment extends ProxyResource { - /** 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; - /** 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; - /** Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. */ - storageAccountAccessKey?: string; - /** The recurring scans settings */ - recurringScans?: VulnerabilityAssessmentRecurringScansProperties; -} - -/** A vulnerability assessment scan record. */ -export interface VulnerabilityAssessmentScanRecord extends ProxyResource { - /** - * The scan ID. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly scanId?: string; - /** - * The scan trigger type. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly triggerType?: VulnerabilityAssessmentScanTriggerType; + readonly requestType?: string; /** - * The scan status. + * Last modified time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: VulnerabilityAssessmentScanState; + readonly lastModifiedTime?: string; /** - * The scan start time (UTC). + * Server name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly serverName?: string; /** - * The scan end time (UTC). + * Database name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: Date; + readonly databaseName?: string; /** - * The scan errors. + * Operation status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errors?: VulnerabilityAssessmentScanError[]; + readonly status?: string; /** - * The scan results storage container path. + * Error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly storageContainerPath?: string; + readonly errorMessage?: string; /** - * The number of failed security checks. + * Queued time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfFailedSecurityChecks?: number; -} - -/** A database Vulnerability Assessment scan export resource. */ -export interface DatabaseVulnerabilityAssessmentScansExport - extends ProxyResource { + readonly queuedTime?: string; /** - * Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + * Blob URI. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly exportedReportLocation?: string; -} - -/** User activities of a data warehouse */ -export interface DataWarehouseUserActivities extends ProxyResource { + readonly blobUri?: string; /** - * Count of running and suspended queries. + * Gets the status of private endpoints associated with this request. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly activeQueriesCount?: number; + readonly privateEndpointConnections?: PrivateEndpointConnectionRequestStatus[]; } -/** A deleted server. */ -export interface DeletedServer extends ProxyResource { - /** - * The version of the deleted server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly version?: string; - /** - * The deletion time of the deleted server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly deletionTime?: Date; - /** - * The original ID of the server before deletion. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly originalId?: string; - /** - * 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; +/** An Import, Export, or PolybaseImport resource. */ +export interface DatabaseExtensions extends ProxyResource { + /** Operation mode of the operation: Import, Export, or PolybaseImport. */ + operationMode?: OperationMode; + /** Storage key type: StorageAccessKey or SharedAccessKey. */ + storageKeyType?: StorageKeyType; + /** Storage key for the storage account. */ + storageKey?: string; + /** Storage Uri for the storage account. */ + storageUri?: string; + /** Administrator login name. */ + administratorLogin?: string; + /** Administrator login password. */ + administratorLoginPassword?: string; + /** Authentication type: SQL authentication or AD password. */ + authenticationType?: string; + /** Database edition for the newly created database in the case of an import operation. */ + databaseEdition?: string; + /** Database service level objective for the newly created database in the case of an import operation. */ + serviceObjectiveName?: string; + /** Database max size in bytes for the newly created database in the case of an import operation. */ + maxSizeBytes?: string; + /** Optional resource information to enable network isolation for request. */ + networkIsolation?: NetworkIsolationSettings; } -/** A elastic pool operation. */ -export interface ElasticPoolOperation extends ProxyResource { +/** A database operation. */ +export interface DatabaseOperation extends ProxyResource { /** - * The name of the elastic pool the operation is being performed on. + * 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 elasticPoolName?: string; + readonly databaseName?: string; /** * The name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5172,7 +5359,7 @@ export interface ElasticPoolOperation extends ProxyResource { * The operation state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: string; + readonly state?: ManagementOperationState; /** * The operation error code. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5208,563 +5395,483 @@ export interface ElasticPoolOperation extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isCancellable?: boolean; + /** + * The operation phase details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationPhaseDetails?: PhaseDetails; } -/** The server encryption protector. */ -export interface EncryptionProtector extends ProxyResource { +/** A database schema resource. */ +export interface DatabaseSchema extends ProxyResource {} + +/** A database security alert policy. */ +export interface DatabaseSecurityAlertPolicy extends ProxyResource { /** - * Kind of encryption protector. This is metadata used for the Azure portal experience. + * SystemData of SecurityAlertPolicyResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly systemData?: SystemData; + /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ + state?: SecurityAlertsPolicyState; + /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ + disabledAlerts?: string[]; + /** Specifies an array of e-mail addresses to which the alert is sent. */ + emailAddresses?: string[]; + /** Specifies that the alert is sent to the account administrators. */ + emailAccountAdmins?: boolean; + /** 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; + /** Specifies the identifier key of the Threat Detection audit storage account. */ + storageAccountAccessKey?: string; + /** Specifies the number of days to keep in the Threat Detection audit logs. */ + retentionDays?: number; /** - * Resource location. + * Specifies the UTC creation time of the policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly creationTime?: Date; +} + +/** A database sql vulnerability assessment baseline set. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselineSet + extends ProxyResource { /** - * Subregion of the encryption protector. + * SystemData of DatabaseSqlVulnerabilityAssessmentBaselineSetResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subregion?: string; - /** The name of the server key. */ - serverKeyName?: string; - /** The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ - serverKeyType?: ServerKeyType; + readonly systemData?: SystemData; + /** The baseline set result */ + results?: { [propertyName: string]: string[][] }; +} + +/** A database sql vulnerability assessment rule baseline list input. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput + extends ProxyResource { /** - * The URI of the server key. + * SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly uri?: string; + readonly systemData?: SystemData; + /** The latest scan flag */ + latestScan?: boolean; + /** The rule baseline result list */ + results?: { [propertyName: string]: string[][] }; +} + +/** A database sql vulnerability assessment rule baseline. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaseline + extends ProxyResource { /** - * Thumbprint of the server key. + * SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; - /** Key auto rotation opt-in flag. Either true or false. */ - autoRotationEnabled?: boolean; + readonly systemData?: SystemData; + /** The rule baseline result */ + results?: string[][]; } -/** A failover group. */ -export interface FailoverGroup extends ProxyResource { +/** A database sql vulnerability assessment rule baseline input. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselineInput + extends ProxyResource { /** - * Resource location. + * SystemData of DatabaseSqlVulnerabilityAssessmentRuleBaselineInputResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** Read-write endpoint of the failover group instance. */ - readWriteEndpoint?: FailoverGroupReadWriteEndpoint; - /** Read-only endpoint of the failover group instance. */ - readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; + readonly systemData?: SystemData; + /** The latest scan flag */ + latestScan?: boolean; + /** The rule baseline result */ + results?: string[][]; +} + +export interface SqlVulnerabilityAssessmentScanResults extends ProxyResource { /** - * Local replication role of the failover group instance. + * SystemData of AdvancedThreatProtectionResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationRole?: FailoverGroupReplicationRole; + readonly systemData?: SystemData; /** - * Replication state of the failover group instance. + * SQL Vulnerability Assessment rule Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationState?: string; - /** List of partner server information for the failover group. */ - partnerServers?: PartnerInfo[]; - /** List of databases in the failover group. */ - databases?: string[]; -} - -/** An instance failover group. */ -export interface InstanceFailoverGroup extends ProxyResource { - /** Read-write endpoint of the failover group instance. */ - readWriteEndpoint?: InstanceFailoverGroupReadWriteEndpoint; - /** Read-only endpoint of the failover group instance. */ - readOnlyEndpoint?: InstanceFailoverGroupReadOnlyEndpoint; + readonly ruleId?: string; /** - * Local replication role of the failover group instance. + * SQL Vulnerability Assessment rule result status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationRole?: InstanceFailoverGroupReplicationRole; + readonly status?: RuleStatus; /** - * Replication state of the failover group instance. + * SQL Vulnerability Assessment error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationState?: string; - /** Partner region information for the failover group. */ - partnerRegions?: PartnerRegionInfo[]; - /** List of managed instance pairs in the failover group. */ - managedInstancePairs?: ManagedInstancePairInfo[]; -} - -/** A stored credential that can be used by a job to connect to target databases. */ -export interface JobCredential extends ProxyResource { - /** The credential user name. */ - username?: string; - /** The credential password. */ - password?: string; -} - -/** An execution of a job */ -export interface JobExecution extends ProxyResource { + readonly errorMessage?: string; /** - * The job version number. + * SQL Vulnerability Assessment is the query results trimmed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobVersion?: number; + readonly isTrimmed?: boolean; /** - * The job step name. + * SQL Vulnerability Assessment query results that was run. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly stepName?: string; + readonly queryResults?: string[][]; /** - * The job step id. + * SQL Vulnerability Assessment the remediation details. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly stepId?: number; + readonly remediation?: Remediation; /** - * The unique identifier of the job execution. + * SQL Vulnerability Assessment rule result adjusted with baseline. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly jobExecutionId?: string; + readonly baselineAdjustedResult?: BaselineAdjustedResult; /** - * The detailed state of the job execution. + * SQL Vulnerability Assessment rule metadata. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lifecycle?: JobExecutionLifecycle; + readonly ruleMetadata?: VaRule; +} + +/** A vulnerability assessment scan record. */ +export interface SqlVulnerabilityAssessmentScanRecord extends ProxyResource { /** - * The ARM provisioning state of the job execution. + * SystemData of SqlVulnerabilityAssessmentScanRecordResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ProvisioningState; + readonly systemData?: SystemData; /** - * The time that the job execution was created. + * The scan ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly createTime?: Date; + readonly scanId?: string; /** - * The time that the job execution started. + * The scan trigger type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly triggerType?: VulnerabilityAssessmentScanTriggerType; /** - * The time that the job execution completed. + * The scan status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: Date; - /** Number of times the job execution has been attempted. */ - currentAttempts?: number; + readonly state?: VulnerabilityAssessmentScanState; /** - * Start time of the current attempt. + * The scan start time (UTC). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentAttemptStartTime?: Date; + readonly startTime?: Date; /** - * The last status or error message. + * The scan end time (UTC). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastMessage?: string; + readonly endTime?: Date; /** - * The target that this execution is executed on. + * The scan errors. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly target?: JobExecutionTarget; -} - -/** A job. */ -export interface Job extends ProxyResource { - /** User-defined description of the job. */ - description?: string; + readonly errors?: SqlVulnerabilityAssessmentScanError[]; /** - * The job version number. + * The server name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly version?: number; - /** Schedule properties of the job. */ - schedule?: JobSchedule; -} - -/** A job step. */ -export interface JobStep extends ProxyResource { - /** 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; - /** The resource ID of the target group that the job step will be executed on. */ - targetGroup?: string; - /** The resource ID of the job credential that will be used to connect to the targets. */ - credential?: string; - /** The action payload of the job step. */ - action?: JobStepAction; - /** Output destination properties of the job step. */ - output?: JobStepOutput; - /** Execution options for the job step. */ - executionOptions?: JobStepExecutionOptions; -} - -/** A group of job targets. */ -export interface JobTargetGroup extends ProxyResource { - /** Members of the target group. */ - members?: JobTarget[]; -} - -/** A job version. */ -export interface JobVersion extends ProxyResource {} - -/** A long term retention policy. */ -export interface LongTermRetentionPolicy extends ProxyResource { - /** The weekly retention policy for an LTR backup in an ISO 8601 format. */ - weeklyRetention?: string; - /** The monthly retention policy for an LTR backup in an ISO 8601 format. */ - monthlyRetention?: string; - /** The yearly retention policy for an LTR backup in an ISO 8601 format. */ - yearlyRetention?: string; - /** The week of year to take the yearly backup in an ISO 8601 format. */ - weekOfYear?: number; -} - -/** Maintenance window options. */ -export interface MaintenanceWindowOptions extends ProxyResource { - /** Whether maintenance windows are enabled for the database. */ - isEnabled?: boolean; - /** Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. */ - maintenanceWindowCycles?: MaintenanceWindowTimeRange[]; - /** Minimum duration of maintenance window. */ - minDurationInMinutes?: number; - /** Default duration for maintenance window. */ - defaultDurationInMinutes?: number; - /** Minimum number of maintenance windows cycles to be set on the database. */ - minCycles?: number; - /** Time granularity in minutes for maintenance windows. */ - timeGranularityInMinutes?: number; - /** Whether we allow multiple maintenance windows per cycle. */ - allowMultipleMaintenanceWindowsPerCycle?: boolean; -} - -/** Maintenance windows. */ -export interface MaintenanceWindows extends ProxyResource { - timeRanges?: MaintenanceWindowTimeRange[]; -} - -/** A short term retention policy. */ -export interface ManagedBackupShortTermRetentionPolicy extends ProxyResource { - /** The backup retention period in days. This is how many days Point-in-Time Restore will be supported. */ - retentionDays?: number; -} - -/** Database query. */ -export interface ManagedInstanceQuery extends ProxyResource { - /** Query text. */ - queryText?: string; -} - -export interface QueryStatistics extends ProxyResource { + readonly server?: string; /** - * Database name of the database in which this query was executed. + * The database name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly database?: string; /** - * Unique query id (unique within one database). + * The SQL version. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly queryId?: string; + readonly sqlVersion?: string; /** - * The start time for the metric (ISO-8601 format). + * The number of failed rules with high severity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: string; + readonly highSeverityFailedRulesCount?: number; /** - * The end time for the metric (ISO-8601 format). + * The number of failed rules with medium severity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly endTime?: string; - /** List of intervals with appropriate metric data */ - intervals?: QueryMetricInterval[]; -} - -/** A managed database restore details. */ -export interface ManagedDatabaseRestoreDetailsResult extends ProxyResource { + readonly mediumSeverityFailedRulesCount?: number; /** - * Restore status. + * The number of failed rules with low severity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: string; + readonly lowSeverityFailedRulesCount?: number; /** - * Current restoring file name. + * The number of total passed rules. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentRestoringFileName?: string; + readonly totalPassedRulesCount?: number; /** - * Last restored file name. + * The number of total failed rules. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastRestoredFileName?: string; + readonly totalFailedRulesCount?: number; /** - * Last restored file time. + * The number of total rules assessed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastRestoredFileTime?: Date; + readonly totalRulesCount?: number; /** - * Percent completed. + * Baseline created for this database, and has one or more rules. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentCompleted?: number; + readonly isBaselineApplied?: boolean; /** - * List of unrestorable files. + * The last scan time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unrestorableFiles?: string[]; + readonly lastScanTime?: Date; +} + +/** A SQL Vulnerability Assessment. */ +export interface SqlVulnerabilityAssessment extends ProxyResource { /** - * Number of files detected. + * SystemData of SqlVulnerabilityAssessmentResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly numberOfFilesDetected?: number; + readonly systemData?: SystemData; + /** Specifies the state of the SQL Vulnerability Assessment, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. */ + state?: SqlVulnerabilityAssessmentState; +} + +/** A database table resource. */ +export interface DatabaseTable extends ProxyResource { + /** The table temporal type. */ + temporalType?: TableTemporalType; + /** Whether or not the table is memory optimized. */ + memoryOptimized?: boolean; +} + +/** Usage metric of a database. */ +export interface DatabaseUsage extends ProxyResource { /** - * Last uploaded file name. + * User-readable name of the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastUploadedFileName?: string; + readonly displayName?: string; /** - * Last uploaded file time. + * Current value of the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastUploadedFileTime?: Date; + readonly currentValue?: number; /** - * The reason why restore is in Blocked state. + * Boundary value of the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly blockReason?: string; -} - -/** A managed database security alert policy. */ -export interface ManagedDatabaseSecurityAlertPolicy extends ProxyResource { - /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ - state?: SecurityAlertPolicyState; - /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ - disabledAlerts?: string[]; - /** Specifies an array of e-mail addresses to which the alert is sent. */ - emailAddresses?: string[]; - /** Specifies that the alert is sent to the account administrators. */ - emailAccountAdmins?: boolean; - /** 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; - /** Specifies the identifier key of the Threat Detection audit storage account. */ - storageAccountAccessKey?: string; - /** Specifies the number of days to keep in the Threat Detection audit logs. */ - retentionDays?: number; + readonly limit?: number; /** - * Specifies the UTC creation time of the policy. + * Unit of the metric. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationTime?: Date; + readonly unit?: string; } -/** A security event. */ -export interface SecurityEvent extends ProxyResource { +/** A database vulnerability assessment rule baseline. */ +export interface DatabaseVulnerabilityAssessmentRuleBaseline + extends ProxyResource { + /** The rule baseline result */ + baselineResults?: DatabaseVulnerabilityAssessmentRuleBaselineItem[]; +} + +/** A vulnerability assessment scan record. */ +export interface VulnerabilityAssessmentScanRecord extends ProxyResource { /** - * The time when the security event occurred. + * The scan ID. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly eventTime?: Date; + readonly scanId?: string; /** - * The type of the security event. + * The scan trigger type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly securityEventType?: SecurityEventType; + readonly triggerType?: VulnerabilityAssessmentScanTriggerType; /** - * The subscription name + * The scan status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subscription?: string; + readonly state?: VulnerabilityAssessmentScanState; /** - * The server name + * The scan start time (UTC). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly server?: string; + readonly startTime?: Date; /** - * The database name + * The scan end time (UTC). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly database?: string; + readonly endTime?: Date; /** - * The IP address of the client who executed the statement. + * The scan errors. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientIp?: string; + readonly errors?: VulnerabilityAssessmentScanError[]; /** - * The application used to execute the statement. + * The scan results storage container path. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly applicationName?: string; + readonly storageContainerPath?: string; /** - * The principal user who executed the statement + * The number of failed security checks. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalName?: string; + readonly numberOfFailedSecurityChecks?: number; +} + +/** A database Vulnerability Assessment scan export resource. */ +export interface DatabaseVulnerabilityAssessmentScansExport + extends ProxyResource { /** - * The sql injection additional properties, populated only if the type of the security event is sql injection. + * 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 securityEventSqlInjectionAdditionalProperties?: SecurityEventSqlInjectionAdditionalProperties; + readonly exportedReportLocation?: string; } -/** A sensitivity label. */ -export interface SensitivityLabel extends ProxyResource { +/** A database vulnerability assessment. */ +export interface DatabaseVulnerabilityAssessment extends ProxyResource { + /** 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; + /** 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. Applies only if the storage account is not behind a Vnet or a firewall */ + storageContainerSasKey?: string; + /** Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall */ + storageAccountAccessKey?: string; + /** The recurring scans settings */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** An ImportExport operation result resource. */ +export interface ImportExportOperationResult extends ProxyResource { /** - * Resource that manages the sensitivity label. + * Request Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly managedBy?: string; + readonly requestId?: string; /** - * The schema name. + * Request type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly schemaName?: string; + readonly requestType?: string; /** - * The table name. + * Queued time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tableName?: string; + readonly queuedTime?: string; /** - * The column name. + * Last modified time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly columnName?: string; - /** The label name. */ - labelName?: string; - /** The label ID. */ - labelId?: string; - /** The information type. */ - informationType?: string; - /** The information type ID. */ - informationTypeId?: string; + readonly lastModifiedTime?: string; /** - * Is sensitivity recommendation disabled. Applicable for recommended sensitivity label only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. + * Blob Uri. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isDisabled?: boolean; - rank?: SensitivityLabelRank; -} - -/** A sensitivity label update operation. */ -export interface SensitivityLabelUpdate extends ProxyResource { - op?: SensitivityLabelUpdateKind; - /** Schema name of the column to update. */ - schema?: string; - /** Table name of the column to update. */ - table?: string; - /** Column name to update. */ - column?: string; - /** The sensitivity label information to apply on a column. */ - sensitivityLabel?: SensitivityLabel; -} - -/** A recommended sensitivity label update operation. */ -export interface RecommendedSensitivityLabelUpdate extends ProxyResource { - op?: RecommendedSensitivityLabelUpdateKind; - /** Schema name of the column to update. */ - schema?: string; - /** Table name of the column to update. */ - table?: string; - /** Column name to update. */ - column?: string; -} - -/** A managed database transparent data encryption state. */ -export interface ManagedTransparentDataEncryption extends ProxyResource { - /** Specifies the state of the transparent data encryption. */ - state?: TransparentDataEncryptionState; -} - -/** An Azure SQL managed instance administrator. */ -export interface ManagedInstanceAdministrator extends ProxyResource { - /** Type of the managed instance administrator. */ - administratorType?: ManagedInstanceAdministratorType; - /** Login name of the managed instance administrator. */ - login?: string; - /** SID (object ID) of the managed instance administrator. */ - sid?: string; - /** Tenant ID of the managed instance administrator. */ - tenantId?: string; -} - -/** Azure Active Directory only authentication. */ -export interface ManagedInstanceAzureADOnlyAuthentication - extends ProxyResource { - /** Azure Active Directory only Authentication enabled. */ - azureADOnlyAuthentication?: boolean; -} - -/** The managed instance encryption protector. */ -export interface ManagedInstanceEncryptionProtector extends ProxyResource { + readonly blobUri?: string; /** - * Kind of encryption protector. This is metadata used for the Azure portal experience. + * Server name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; - /** The name of the managed instance key. */ - serverKeyName?: string; - /** The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ - serverKeyType?: ServerKeyType; + readonly serverName?: string; /** - * The URI of the server key. + * Database name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly uri?: string; + readonly databaseName?: string; /** - * Thumbprint of the server key. + * Operation status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; - /** Key auto rotation opt-in flag. Either true or false. */ - autoRotationEnabled?: boolean; + readonly status?: string; + /** + * Error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorMessage?: string; + /** + * Gets the status of private endpoints associated with this request. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: PrivateEndpointConnectionRequestStatus[]; } -/** A managed instance key. */ -export interface ManagedInstanceKey extends ProxyResource { +/** A deleted server. */ +export interface DeletedServer extends ProxyResource { /** - * Kind of encryption protector. This is metadata used for the Azure portal experience. + * The version of the deleted server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; - /** The key type like 'ServiceManaged', 'AzureKeyVault'. */ - serverKeyType?: ServerKeyType; - /** The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. */ - uri?: string; + readonly version?: string; /** - * Thumbprint of the key. + * The deletion time of the deleted server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; + readonly deletionTime?: Date; /** - * The key creation date. + * The original ID of the server before deletion. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly originalId?: string; /** - * Key auto rotation opt-in flag. Either true or false. + * The fully qualified domain name of the server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly autoRotationEnabled?: boolean; + readonly fullyQualifiedDomainName?: string; } -/** A long term retention policy. */ -export interface ManagedInstanceLongTermRetentionPolicy extends ProxyResource { - /** The weekly retention policy for an LTR backup in an ISO 8601 format. */ - weeklyRetention?: string; - /** The monthly retention policy for an LTR backup in an ISO 8601 format. */ - monthlyRetention?: string; - /** The yearly retention policy for an LTR backup in an ISO 8601 format. */ - yearlyRetention?: string; - /** The week of year to take the yearly backup in an ISO 8601 format. */ - weekOfYear?: number; +/** Distributed availability group between box and Sql Managed Instance. */ +export interface DistributedAvailabilityGroup extends ProxyResource { + /** The name of the target database */ + targetDatabase?: string; + /** The source endpoint */ + sourceEndpoint?: string; + /** The primary availability group name */ + primaryAvailabilityGroupName?: string; + /** The secondary availability group name */ + secondaryAvailabilityGroupName?: string; + /** The replication mode of a distributed availability group. Parameter will be ignored during link creation. */ + replicationMode?: ReplicationMode; + /** + * The distributed availability group id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly distributedAvailabilityGroupId?: string; + /** + * The source replica id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceReplicaId?: string; + /** + * The target replica id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly targetReplicaId?: string; + /** + * The link state + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly linkState?: string; + /** + * The last hardened lsn + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastHardenedLsn?: string; + /** + * Role of managed instance + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceRole?: string; } -/** A managed instance operation. */ -export interface ManagedInstanceOperation extends ProxyResource { +/** A elastic pool operation. */ +export interface ElasticPoolOperation extends ProxyResource { /** - * The name of the managed instance the operation is being performed on. + * 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 managedInstanceName?: string; + readonly elasticPoolName?: string; /** * The name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5780,6 +5887,11 @@ export interface ManagedInstanceOperation extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly percentComplete?: number; + /** + * The name of the server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverName?: string; /** * The operation start time. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5789,7 +5901,7 @@ export interface ManagedInstanceOperation extends ProxyResource { * The operation state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: ManagementOperationState; + readonly state?: string; /** * The operation error code. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -5825,4299 +5937,6041 @@ export interface ManagedInstanceOperation extends ProxyResource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly isCancellable?: boolean; +} + +/** The server encryption protector. */ +export interface EncryptionProtector extends ProxyResource { /** - * The operation parameters. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationParameters?: ManagedInstanceOperationParametersPair; - /** - * The operation steps. + * 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 operationSteps?: ManagedInstanceOperationSteps; -} - -/** A private endpoint connection */ -export interface ManagedInstancePrivateEndpointConnection - extends ProxyResource { - /** Private endpoint which the connection belongs to. */ - privateEndpoint?: ManagedInstancePrivateEndpointProperty; - /** Connection State of the Private Endpoint Connection. */ - privateLinkServiceConnectionState?: ManagedInstancePrivateLinkServiceConnectionStateProperty; + readonly kind?: string; /** - * State of the Private Endpoint Connection. + * Resource location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -} - -/** A private link resource */ -export interface ManagedInstancePrivateLink extends ProxyResource { + readonly location?: string; /** - * The private link resource group id. + * Subregion of the encryption protector. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly properties?: ManagedInstancePrivateLinkProperties; -} - -/** A TDE certificate that can be uploaded into a server. */ -export interface TdeCertificate extends ProxyResource { - /** The base64 encoded certificate private blob. */ - privateBlob?: string; - /** The certificate password. */ - certPassword?: string; -} - -/** A managed instance vulnerability assessment. */ -export interface ManagedInstanceVulnerabilityAssessment extends ProxyResource { - /** A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). */ - storageContainerPath?: string; - /** 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. Applies only if the storage account is not behind a Vnet or a firewall */ - storageContainerSasKey?: string; - /** Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall */ - storageAccountAccessKey?: string; - /** The recurring scans settings */ - recurringScans?: VulnerabilityAssessmentRecurringScansProperties; -} - -/** A managed server security alert policy. */ -export interface ManagedServerSecurityAlertPolicy extends ProxyResource { + readonly subregion?: string; + /** The name of the server key. */ + serverKeyName?: string; + /** The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ + serverKeyType?: ServerKeyType; /** - * SystemData of SecurityAlertPolicyResource. + * The URI of the server key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ - state?: SecurityAlertsPolicyState; - /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ - disabledAlerts?: string[]; - /** Specifies an array of e-mail addresses to which the alert is sent. */ - emailAddresses?: string[]; - /** Specifies that the alert is sent to the account administrators. */ - emailAccountAdmins?: boolean; - /** 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; - /** Specifies the identifier key of the Threat Detection audit storage account. */ - storageAccountAccessKey?: string; - /** Specifies the number of days to keep in the Threat Detection audit logs. */ - retentionDays?: number; + readonly uri?: string; /** - * Specifies the UTC creation time of the policy. + * Thumbprint of the server key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationTime?: Date; + readonly thumbprint?: string; + /** Key auto rotation opt-in flag. Either true or false. */ + autoRotationEnabled?: boolean; +} + +/** Certificate used on an endpoint on the Managed Instance. */ +export interface EndpointCertificate extends ProxyResource { + /** The certificate public blob */ + publicBlob?: string; } -/** Operations health status in a location. */ -export interface OperationsHealth extends ProxyResource { +/** A failover group. */ +export interface FailoverGroup extends ProxyResource { /** - * Operation name for the service + * Resource location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly namePropertiesName?: string; + readonly location?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** Read-write endpoint of the failover group instance. */ + readWriteEndpoint?: FailoverGroupReadWriteEndpoint; + /** Read-only endpoint of the failover group instance. */ + readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; /** - * Operation health status of the service. + * Local replication role of the failover group instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly health?: string; + readonly replicationRole?: FailoverGroupReplicationRole; /** - * Health status description. + * Replication state of the failover group instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; -} + readonly replicationState?: string; + /** List of partner server information for the failover group. */ + partnerServers?: PartnerInfo[]; + /** List of databases in the failover group. */ + databases?: string[]; +} -/** A private endpoint connection */ -export interface PrivateEndpointConnection extends ProxyResource { - /** Private endpoint which the connection belongs to. */ - privateEndpoint?: PrivateEndpointProperty; - /** Connection state of the private endpoint connection. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; +/** A Geo backup policy. */ +export interface GeoBackupPolicy extends ProxyResource { /** - * State of the private endpoint connection. + * Backup policy location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: PrivateEndpointProvisioningState; -} - -/** A private link resource */ -export interface PrivateLinkResource extends ProxyResource { + readonly location?: string; /** - * The private link resource group id. + * 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 properties?: PrivateLinkResourceProperties; -} - -/** A recoverable managed database resource. */ -export interface RecoverableManagedDatabase extends ProxyResource { + readonly kind?: string; + /** The state of the geo backup policy. */ + state?: GeoBackupPolicyState; /** - * The last available backup date. + * The storage type of the geo backup policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastAvailableBackupDate?: string; + readonly storageType?: string; } -/** Database restore points. */ -export interface RestorePoint extends ProxyResource { +/** An instance failover group. */ +export interface InstanceFailoverGroup extends ProxyResource { + /** Type of the geo-secondary instance. Set 'Standby' if the instance is used as a DR option only. */ + secondaryType?: SecondaryInstanceType; + /** Read-write endpoint of the failover group instance. */ + readWriteEndpoint?: InstanceFailoverGroupReadWriteEndpoint; + /** Read-only endpoint of the failover group instance. */ + readOnlyEndpoint?: InstanceFailoverGroupReadOnlyEndpoint; /** - * Resource location. + * Local replication role of the failover group instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly replicationRole?: InstanceFailoverGroupReplicationRole; /** - * The type of restore point + * Replication state of the failover group instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly restorePointType?: RestorePointType; + readonly replicationState?: string; + /** Partner region information for the failover group. */ + partnerRegions?: PartnerRegionInfo[]; + /** List of managed instance pairs in the failover group. */ + managedInstancePairs?: ManagedInstancePairInfo[]; +} + +/** A stored credential that can be used by a job to connect to target databases. */ +export interface JobCredential extends ProxyResource { + /** The credential user name. */ + username?: string; + /** The credential password. */ + password?: string; +} + +/** An execution of a job */ +export interface JobExecution extends ProxyResource { /** - * The earliest time to which this database can be restored + * The job version number. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly earliestRestoreDate?: Date; + readonly jobVersion?: number; /** - * The time the backup was taken + * The job step name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly restorePointCreationDate?: Date; + readonly stepName?: string; /** - * The label of restore point for backup request by user + * The job step id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly restorePointLabel?: string; -} - -/** Server-level Automatic Tuning. */ -export interface ServerAutomaticTuning extends ProxyResource { - /** Automatic tuning desired state. */ - desiredState?: AutomaticTuningServerMode; + readonly stepId?: number; /** - * Automatic tuning actual state. + * The unique identifier of the job execution. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly actualState?: AutomaticTuningServerMode; - /** Automatic tuning options definition. */ - options?: { [propertyName: string]: AutomaticTuningServerOptions }; -} - -/** Azure Active Directory administrator. */ -export interface ServerAzureADAdministrator extends ProxyResource { - /** Type of the sever administrator. */ - administratorType?: AdministratorType; - /** Login name of the server administrator. */ - login?: string; - /** SID (object ID) of the server administrator. */ - sid?: string; - /** Tenant ID of the administrator. */ - tenantId?: string; + readonly jobExecutionId?: string; /** - * Azure Active Directory only Authentication enabled. + * The detailed state of the job execution. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly azureADOnlyAuthentication?: boolean; -} - -/** Azure Active Directory only authentication. */ -export interface ServerAzureADOnlyAuthentication extends ProxyResource { - /** Azure Active Directory only Authentication enabled. */ - azureADOnlyAuthentication?: boolean; -} - -/** A server DevOps auditing settings. */ -export interface ServerDevOpsAuditingSettings extends ProxyResource { + readonly lifecycle?: JobExecutionLifecycle; /** - * SystemData of ServerDevOpsAuditSettingsResource. + * The ARM provisioning state of the job execution. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** - * Specifies whether DevOps 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 DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also created. - * - * Diagnostic Settings URI format: - * PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * 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; - /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ - state?: BlobAuditingPolicyState; - /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ - storageEndpoint?: string; + readonly provisioningState?: ProvisioningState; /** - * Specifies the identifier key of the auditing storage account. - * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. - * Prerequisites for using managed identity authentication: - * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). - * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. - * For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + * The time that the job execution was created. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - storageAccountAccessKey?: string; - /** Specifies the blob storage subscription Id. */ - storageAccountSubscriptionId?: string; -} - -/** A server DNS alias. */ -export interface ServerDnsAlias extends ProxyResource { + readonly createTime?: Date; /** - * The fully qualified DNS record for alias + * The time that the job execution started. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly azureDnsRecord?: string; -} - -/** A server key. */ -export interface ServerKey extends ProxyResource { + readonly startTime?: Date; /** - * Kind of encryption protector. This is metadata used for the Azure portal experience. + * The time that the job execution completed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly endTime?: Date; + /** Number of times the job execution has been attempted. */ + currentAttempts?: number; /** - * Resource location. + * Start time of the current attempt. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly currentAttemptStartTime?: Date; /** - * Subregion of the server key. + * The last status or error message. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subregion?: string; - /** The server key type like 'ServiceManaged', 'AzureKeyVault'. */ - serverKeyType?: ServerKeyType; - /** The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. */ - uri?: string; + readonly lastMessage?: string; /** - * Thumbprint of the server key. + * The target that this execution is executed on. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly thumbprint?: string; + readonly target?: JobExecutionTarget; +} + +/** A job step. */ +export interface JobStep extends ProxyResource { + /** 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; + /** The resource ID of the target group that the job step will be executed on. */ + targetGroup?: string; + /** The resource ID of the job credential that will be used to connect to the targets. */ + credential?: string; + /** The action payload of the job step. */ + action?: JobStepAction; + /** Output destination properties of the job step. */ + output?: JobStepOutput; + /** Execution options for the job step. */ + executionOptions?: JobStepExecutionOptions; +} + +/** A group of job targets. */ +export interface JobTargetGroup extends ProxyResource { + /** Members of the target group. */ + members?: JobTarget[]; +} + +/** A job version. */ +export interface JobVersion extends ProxyResource {} + +/** A job. */ +export interface Job extends ProxyResource { + /** User-defined description of the job. */ + description?: string; /** - * The server key creation date. + * The job version number. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly version?: number; + /** Schedule properties of the job. */ + schedule?: JobSchedule; +} + +/** Azure SQL Database ledger digest upload settings. */ +export interface LedgerDigestUploads extends ProxyResource { + /** The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. */ + digestStorageEndpoint?: string; /** - * Key auto rotation opt-in flag. Either true or false. + * Specifies the state of ledger digest upload. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly autoRotationEnabled?: boolean; + readonly state?: LedgerDigestUploadsState; } -/** A server operation. */ -export interface ServerOperation extends ProxyResource { +/** A long term retention backup. */ +export interface LongTermRetentionBackup extends ProxyResource { /** - * The name of operation. + * 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 operation?: string; + readonly serverName?: string; /** - * The friendly name of operation. + * The create time of the server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationFriendlyName?: string; + readonly serverCreateTime?: Date; /** - * The percentage of the operation completed. + * 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 percentComplete?: number; + readonly databaseName?: string; /** - * The name of the server. + * The delete time of the database * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly databaseDeletionTime?: Date; /** - * The operation start time. + * The time the backup was taken * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly backupTime?: Date; /** - * The operation state. + * 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 state?: ManagementOperationState; + readonly backupExpirationTime?: Date; /** - * The operation error code. + * The storage redundancy type of the backup * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorCode?: number; + readonly backupStorageRedundancy?: BackupStorageRedundancy; + /** The storage redundancy type of the backup */ + requestedBackupStorageRedundancy?: BackupStorageRedundancy; +} + +/** A LongTermRetentionBackup operation result resource. */ +export interface LongTermRetentionBackupOperationResult extends ProxyResource { /** - * The operation error description. + * Request Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDescription?: string; + readonly requestId?: string; /** - * The operation error severity. + * Operation type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorSeverity?: number; + readonly operationType?: string; /** - * Whether or not the error is a user error. + * Source backup resource id * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isUserError?: boolean; + readonly fromBackupResourceId?: string; /** - * The estimated completion time of the operation. + * Target backup resource id * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly estimatedCompletionTime?: Date; + readonly toBackupResourceId?: string; /** - * The operation description. + * The storage redundancy type of the copied backup * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; + readonly targetBackupStorageRedundancy?: BackupStorageRedundancy; /** - * Whether the operation can be cancelled. + * Operation status * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isCancellable?: boolean; + readonly status?: string; + /** + * Progress message + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly message?: string; } -/** A server security alert policy. */ -export interface ServerSecurityAlertPolicy extends ProxyResource { +/** A long term retention backup for a managed database. */ +export interface ManagedInstanceLongTermRetentionBackup extends ProxyResource { /** - * SystemData of SecurityAlertPolicyResource. + * The managed instance that the backup database belongs to. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; - /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ - state?: SecurityAlertsPolicyState; - /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ - disabledAlerts?: string[]; - /** Specifies an array of e-mail addresses to which the alert is sent. */ - emailAddresses?: string[]; - /** Specifies that the alert is sent to the account administrators. */ - emailAccountAdmins?: boolean; - /** 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; - /** Specifies the identifier key of the Threat Detection audit storage account. */ - storageAccountAccessKey?: string; - /** Specifies the number of days to keep in the Threat Detection audit logs. */ - retentionDays?: number; + readonly managedInstanceName?: string; /** - * Specifies the UTC creation time of the policy. + * The create time of the instance. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationTime?: Date; + readonly managedInstanceCreateTime?: Date; + /** + * 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; + /** + * The delete time of the database + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseDeletionTime?: Date; + /** + * The time the backup was taken + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly backupTime?: Date; + /** + * 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; + /** + * The storage redundancy type of the backup + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly backupStorageRedundancy?: BackupStorageRedundancy; } -/** A server trust group. */ -export interface ServerTrustGroup extends ProxyResource { - /** Group members information for the server trust group. */ - groupMembers?: ServerInfo[]; - /** Trust scope of the server trust group. */ - trustScopes?: ServerTrustGroupPropertiesTrustScopesItem[]; +/** A long term retention policy. */ +export interface LongTermRetentionPolicy extends ProxyResource { + /** The weekly retention policy for an LTR backup in an ISO 8601 format. */ + weeklyRetention?: string; + /** The monthly retention policy for an LTR backup in an ISO 8601 format. */ + monthlyRetention?: string; + /** The yearly retention policy for an LTR backup in an ISO 8601 format. */ + yearlyRetention?: string; + /** The week of year to take the yearly backup in an ISO 8601 format. */ + weekOfYear?: number; } -/** A server vulnerability assessment. */ -export interface ServerVulnerabilityAssessment extends ProxyResource { - /** A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). */ - storageContainerPath?: string; - /** 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. Applies only if the storage account is not behind a Vnet or a firewall */ - storageContainerSasKey?: string; - /** Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall */ - storageAccountAccessKey?: string; - /** The recurring scans settings */ - recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +/** Maintenance window options. */ +export interface MaintenanceWindowOptions extends ProxyResource { + /** Whether maintenance windows are enabled for the database. */ + isEnabled?: boolean; + /** Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, 24*60}. */ + maintenanceWindowCycles?: MaintenanceWindowTimeRange[]; + /** Minimum duration of maintenance window. */ + minDurationInMinutes?: number; + /** Default duration for maintenance window. */ + defaultDurationInMinutes?: number; + /** Minimum number of maintenance windows cycles to be set on the database. */ + minCycles?: number; + /** Time granularity in minutes for maintenance windows. */ + timeGranularityInMinutes?: number; + /** Whether we allow multiple maintenance windows per cycle. */ + allowMultipleMaintenanceWindowsPerCycle?: boolean; } -/** A recoverable managed database resource. */ -export interface SqlAgentConfiguration extends ProxyResource { - /** The state of Sql Agent. */ - state?: SqlAgentConfigurationPropertiesState; +/** Maintenance windows. */ +export interface MaintenanceWindows extends ProxyResource { + timeRanges?: MaintenanceWindowTimeRange[]; } -/** Usage Metric of a Subscription in a Location. */ -export interface SubscriptionUsage extends ProxyResource { +/** A short term retention policy. */ +export interface ManagedBackupShortTermRetentionPolicy extends ProxyResource { + /** The backup retention period in days. This is how many days Point-in-Time Restore will be supported. */ + retentionDays?: number; +} + +/** A managed database Advanced Threat Protection. */ +export interface ManagedDatabaseAdvancedThreatProtection extends ProxyResource { /** - * User-readable name of the metric. + * SystemData of AdvancedThreatProtectionResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayName?: string; + readonly systemData?: SystemData; + /** Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. */ + state?: AdvancedThreatProtectionState; /** - * Current value of the metric. + * Specifies the UTC creation time of the policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentValue?: number; + readonly creationTime?: Date; +} + +/** A managed database move operation. */ +export interface ManagedDatabaseMoveOperationResult extends ProxyResource { /** - * Boundary value of the metric. + * The name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limit?: number; + readonly operation?: string; /** - * Unit of the metric. + * The friendly name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; -} - -/** An Azure SQL Database sync agent. */ -export interface SyncAgent extends ProxyResource { + readonly operationFriendlyName?: string; /** - * Name of the sync agent. + * The operation start time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly namePropertiesName?: string; - /** ARM resource id of the sync database in the sync agent. */ - syncDatabaseId?: string; + readonly startTime?: Date; /** - * Last alive time of the sync agent. + * The operation state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastAliveTime?: Date; + readonly state?: ManagementOperationState; /** - * State of the sync agent. + * Operation mode. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: SyncAgentState; + readonly operationMode?: MoveOperationMode; /** - * If the sync agent version is up to date. + * Source Managed Instance name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isUpToDate?: boolean; + readonly sourceManagedInstanceName?: string; /** - * Expiration time of the sync agent version. + * Target Managed Instance name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly expiryTime?: Date; + readonly targetManagedInstanceName?: string; /** - * Version of the sync agent. + * Source Managed Instance resource id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly version?: string; -} - -/** An Azure SQL Database sync agent linked database. */ -export interface SyncAgentLinkedDatabase extends ProxyResource { + readonly sourceManagedInstanceId?: string; /** - * Type of the sync agent linked database. + * Target Managed instance resource id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseType?: SyncMemberDbType; + readonly targetManagedInstanceId?: string; /** - * Id of the sync agent linked database. + * Source database name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseId?: string; + readonly sourceDatabaseName?: string; /** - * Description of the sync agent linked database. + * Target database name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; + readonly targetDatabaseName?: string; /** - * Server name of the sync agent linked database. + * Is move operation cancellable. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly isCancellable?: boolean; /** - * Database name of the sync agent linked database. + * The operation error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly errorCode?: number; /** - * User name of the sync agent linked database. + * The operation error description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly userName?: string; -} - -/** An Azure SQL Database sync group. */ -export interface SyncGroup extends ProxyResource { - /** The name and capacity of the SKU. */ - sku?: Sku; - /** Sync interval of the sync group. */ - interval?: number; + readonly errorDescription?: string; /** - * Last sync time of the sync group. + * The operation error severity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastSyncTime?: Date; - /** Conflict resolution policy of the sync group. */ - conflictResolutionPolicy?: SyncConflictResolutionPolicy; - /** ARM resource id of the sync database in the sync group. */ - syncDatabaseId?: string; - /** User name for the sync group hub database credential. */ - hubDatabaseUserName?: string; - /** Password for the sync group hub database credential. */ - hubDatabasePassword?: string; + readonly errorSeverity?: number; /** - * Sync state of the sync group. + * 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 syncState?: SyncGroupState; - /** Sync schema of the sync group. */ - schema?: SyncGroupSchema; - /** If conflict logging is enabled. */ - enableConflictLogging?: boolean; - /** Conflict logging retention period. */ - conflictLoggingRetentionInDays?: number; - /** If use private link connection is enabled. */ - usePrivateLinkConnection?: boolean; + readonly isUserError?: boolean; +} + +/** Database query. */ +export interface ManagedInstanceQuery extends ProxyResource { + /** Query text. */ + queryText?: string; +} + +export interface QueryStatistics extends ProxyResource { /** - * Private endpoint name of the sync group if use private link connection is enabled. + * Database name of the database in which this query was executed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointName?: string; -} - -/** An Azure SQL Database sync member. */ -export interface SyncMember extends ProxyResource { - /** Database type of the sync member. */ - databaseType?: SyncMemberDbType; - /** ARM resource id of the sync agent in the sync member. */ - syncAgentId?: string; - /** SQL Server database id of the sync member. */ - sqlServerDatabaseId?: string; - /** ARM resource id of the sync member logical database, for sync members in Azure. */ - syncMemberAzureDatabaseResourceId?: string; - /** Whether to use private link connection. */ - usePrivateLinkConnection?: boolean; - /** - * Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly privateEndpointName?: string; - /** Server name of the member database in the sync member */ - serverName?: string; - /** Database name of the member database in the sync member. */ - databaseName?: string; - /** User name of the member database in the sync member. */ - userName?: string; - /** Password of the member database in the sync member. */ - password?: string; - /** Sync direction of the sync member. */ - syncDirection?: SyncDirection; + readonly databaseName?: string; /** - * Sync state of the sync member. + * Unique query id (unique within one database). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly syncState?: SyncMemberState; -} - -/** Time Zone. */ -export interface TimeZone extends ProxyResource { + readonly queryId?: string; /** - * The time zone id + * 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 timeZoneId?: string; + readonly startTime?: string; /** - * The time zone display name + * 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 displayName?: string; + readonly endTime?: string; + /** List of intervals with appropriate metric data */ + intervals?: QueryMetricInterval[]; } -/** A recoverable managed database resource. */ -export interface UpdateManagedInstanceDnsServersOperation - extends ProxyResource { +/** A managed database restore details. */ +export interface ManagedDatabaseRestoreDetailsResult extends ProxyResource { /** - * The status of the DNS refresh operation. + * Restore type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: DnsRefreshConfigurationPropertiesStatus; -} - -/** A virtual network rule. */ -export interface VirtualNetworkRule extends ProxyResource { - /** The ARM resource id of the virtual network subnet. */ - virtualNetworkSubnetId?: string; - /** Create firewall rule before the virtual network has vnet service endpoint enabled. */ - ignoreMissingVnetServiceEndpoint?: boolean; + readonly typePropertiesType?: string; /** - * Virtual Network Rule State + * Restore status. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: VirtualNetworkRuleState; -} - -/** Workload classifier operations for a data warehouse */ -export interface WorkloadClassifier extends ProxyResource { - /** The workload classifier member name. */ - memberName?: string; - /** The workload classifier label. */ - label?: string; - /** The workload classifier context. */ - context?: string; - /** The workload classifier start time for classification. */ - startTime?: string; - /** The workload classifier end time for classification. */ - endTime?: string; - /** The workload classifier importance. */ - importance?: string; -} - -/** Workload group operations for a data warehouse */ -export interface WorkloadGroup extends ProxyResource { - /** The workload group minimum percentage resource. */ - minResourcePercent?: number; - /** The workload group cap percentage resource. */ - maxResourcePercent?: number; - /** The workload group request minimum grant percentage. */ - minResourcePercentPerRequest?: number; - /** The workload group request maximum grant percentage. */ - maxResourcePercentPerRequest?: number; - /** The workload group importance level. */ - importance?: string; - /** The workload group query execution timeout. */ - queryExecutionTimeout?: number; -} - -/** A logical database transparent data encryption state. */ -export interface LogicalDatabaseTransparentDataEncryption - extends ProxyResource { - /** Specifies the state of the transparent data encryption. */ - state?: TransparentDataEncryptionState; -} - -/** A short term retention policy. */ -export interface BackupShortTermRetentionPolicy extends ProxyResource { - /** The backup retention period in days. This is how many days Point-in-Time Restore will be supported. */ - retentionDays?: number; - /** The differential backup interval in hours. This is how many interval hours between each differential backup will be supported. This is only applicable to live databases but not dropped databases. */ - diffBackupIntervalInHours?: DiffBackupIntervalInHours; -} - -/** An export managed database operation result resource. */ -export interface DatabaseExtensions extends ProxyResource { - /** Operation Mode. */ - operationMode?: OperationMode; - /** Storage key type. */ - storageKeyType?: StorageKeyType; - /** Storage key. */ - storageKey?: string; - /** Storage Uri. */ - storageUri?: string; -} - -/** An Extension operation result resource. */ -export interface ImportExportExtensionsOperationResult extends ProxyResource { + readonly status?: string; /** - * Request Id. + * The reason why restore is in Blocked state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestId?: string; + readonly blockReason?: string; /** - * Request type. + * Last uploaded file name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestType?: string; + readonly lastUploadedFileName?: string; /** - * Last modified time. + * Last uploaded file time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastModifiedTime?: string; + readonly lastUploadedFileTime?: Date; /** - * Server name. + * Last restored file name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly lastRestoredFileName?: string; /** - * Database name. + * Last restored file time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly lastRestoredFileTime?: Date; /** - * Operation status. + * Percent completed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: string; + readonly percentCompleted?: number; /** - * Error message. + * Current restored size MB. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; -} - -/** A database operation. */ -export interface DatabaseOperation extends ProxyResource { + readonly currentRestoredSizeMB?: number; /** - * The name of the database the operation is being performed on. + * Current restore plan size MB. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly currentRestorePlanSizeMB?: number; /** - * The name of operation. + * Current backup type. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operation?: string; + readonly currentBackupType?: string; /** - * The friendly name of operation. + * Current restoring file name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationFriendlyName?: string; + readonly currentRestoringFileName?: string; /** - * The percentage of the operation completed. + * Number of files detected. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentComplete?: number; + readonly numberOfFilesDetected?: number; /** - * The name of the server. + * Number of files queued. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly numberOfFilesQueued?: number; /** - * The operation start time. + * Number of files skipped. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly numberOfFilesSkipped?: number; /** - * The operation state. + * Number of files restoring. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: ManagementOperationState; + readonly numberOfFilesRestoring?: number; /** - * The operation error code. + * Number of files restored. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorCode?: number; + readonly numberOfFilesRestored?: number; /** - * The operation error description. + * Number of files unrestorable. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorDescription?: string; + readonly numberOfFilesUnrestorable?: number; /** - * The operation error severity. + * Full backup sets. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorSeverity?: number; + readonly fullBackupSets?: ManagedDatabaseRestoreDetailsBackupSetProperties[]; /** - * Whether or not the error is a user error. + * Diff backup sets. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isUserError?: boolean; + readonly diffBackupSets?: ManagedDatabaseRestoreDetailsBackupSetProperties[]; /** - * The estimated completion time of the operation. + * Log backup sets. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly estimatedCompletionTime?: Date; + readonly logBackupSets?: ManagedDatabaseRestoreDetailsBackupSetProperties[]; /** - * The operation description. + * Unrestorable files. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly description?: string; + readonly unrestorableFiles?: ManagedDatabaseRestoreDetailsUnrestorableFileProperties[]; +} + +/** A managed database security alert policy. */ +export interface ManagedDatabaseSecurityAlertPolicy extends ProxyResource { + /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ + state?: SecurityAlertPolicyState; + /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ + disabledAlerts?: string[]; + /** Specifies an array of e-mail addresses to which the alert is sent. */ + emailAddresses?: string[]; + /** Specifies that the alert is sent to the account administrators. */ + emailAccountAdmins?: boolean; + /** 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; + /** Specifies the identifier key of the Threat Detection audit storage account. */ + storageAccountAccessKey?: string; + /** Specifies the number of days to keep in the Threat Detection audit logs. */ + retentionDays?: number; /** - * Whether the operation can be cancelled. + * Specifies the UTC creation time of the policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isCancellable?: boolean; + readonly creationTime?: Date; } -/** Usage metric of a database. */ -export interface DatabaseUsage extends ProxyResource { +/** A security event. */ +export interface SecurityEvent extends ProxyResource { /** - * User-readable name of the metric. + * The time when the security event occurred. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly displayName?: string; + readonly eventTime?: Date; /** - * Current value of the metric. + * The type of the security event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentValue?: number; + readonly securityEventType?: SecurityEventType; /** - * Boundary value of the metric. + * The subscription name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly limit?: number; + readonly subscription?: string; /** - * Unit of the metric. + * The server name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly unit?: string; -} - -/** Azure SQL Database ledger digest upload settings. */ -export interface LedgerDigestUploads extends ProxyResource { - /** The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. */ - digestStorageEndpoint?: string; + readonly server?: string; /** - * Specifies the state of ledger digest upload. + * The database name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: LedgerDigestUploadsState; -} - -/** An Azure SQL DB Server Outbound Firewall Rule. */ -export interface OutboundFirewallRule extends ProxyResource { + readonly database?: string; /** - * The state of the outbound rule. + * The IP address of the client who executed the statement. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; -} - -/** A replication link. */ -export interface ReplicationLink extends ProxyResource { + readonly clientIp?: string; /** - * Resource partner server. + * The application used to execute the statement. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partnerServer?: string; + readonly applicationName?: string; /** - * Resource partner database. + * The principal user who executed the statement * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partnerDatabase?: string; + readonly principalName?: string; /** - * Resource partner location. + * The sql injection additional properties, populated only if the type of the security event is sql injection. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partnerLocation?: string; - /** - * Local replication role. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly role?: ReplicationRole; + readonly securityEventSqlInjectionAdditionalProperties?: SecurityEventSqlInjectionAdditionalProperties; +} + +/** A sensitivity label. */ +export interface SensitivityLabel extends ProxyResource { /** - * Partner replication role. + * Resource that manages the sensitivity label. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partnerRole?: ReplicationRole; + readonly managedBy?: string; /** - * Replication mode. + * The schema name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly replicationMode?: string; + readonly schemaName?: string; /** - * Time at which the link was created. + * The table name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly startTime?: Date; + readonly tableName?: string; /** - * Seeding completion percentage for the link. + * The column name. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly percentComplete?: number; + readonly columnName?: string; + /** The label name. */ + labelName?: string; + /** The label ID. */ + labelId?: string; + /** The information type. */ + informationType?: string; + /** The information type ID. */ + informationTypeId?: string; /** - * Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). + * 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 replicationState?: ReplicationState; + readonly isDisabled?: boolean; + rank?: SensitivityLabelRank; +} + +/** A sensitivity label update operation. */ +export interface SensitivityLabelUpdate extends ProxyResource { + op?: SensitivityLabelUpdateKind; + /** Schema name of the column to update. */ + schema?: string; + /** Table name of the column to update. */ + table?: string; + /** Column name to update. */ + column?: string; + /** The sensitivity label information to apply on a column. */ + sensitivityLabel?: SensitivityLabel; +} + +/** A recommended sensitivity label update operation. */ +export interface RecommendedSensitivityLabelUpdate extends ProxyResource { + op?: RecommendedSensitivityLabelUpdateKind; + /** Schema name of the column to update. */ + schema?: string; + /** Table name of the column to update. */ + table?: string; + /** Column name to update. */ + column?: string; +} + +/** A managed database transparent data encryption state. */ +export interface ManagedTransparentDataEncryption extends ProxyResource { + /** Specifies the state of the transparent data encryption. */ + state?: TransparentDataEncryptionState; +} + +/** An Azure SQL managed instance administrator. */ +export interface ManagedInstanceAdministrator extends ProxyResource { + /** Type of the managed instance administrator. */ + administratorType?: ManagedInstanceAdministratorType; + /** Login name of the managed instance administrator. */ + login?: string; + /** SID (object ID) of the managed instance administrator. */ + sid?: string; + /** Tenant ID of the managed instance administrator. */ + tenantId?: string; +} + +/** A managed instance Advanced Threat Protection. */ +export interface ManagedInstanceAdvancedThreatProtection extends ProxyResource { /** - * Whether the user is currently allowed to terminate the link. + * SystemData of AdvancedThreatProtectionResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isTerminationAllowed?: boolean; + readonly systemData?: SystemData; + /** Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. */ + state?: AdvancedThreatProtectionState; /** - * Link type (GEO, NAMED). + * Specifies the UTC creation time of the policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly linkType?: ReplicationLinkType; + readonly creationTime?: Date; } -/** An ImportExport operation result resource. */ -export interface ImportExportOperationResult extends ProxyResource { +/** Azure Active Directory only authentication. */ +export interface ManagedInstanceAzureADOnlyAuthentication + extends ProxyResource { + /** Azure Active Directory only Authentication enabled. */ + azureADOnlyAuthentication?: boolean; +} + +/** SQL Managed Instance DTC */ +export interface ManagedInstanceDtc extends ProxyResource { + /** Active status of managed instance DTC. */ + dtcEnabled?: boolean; + /** Security settings of managed instance DTC. */ + securitySettings?: ManagedInstanceDtcSecuritySettings; + /** External dns suffix search list of managed instance DTC. */ + externalDnsSuffixSearchList?: string[]; /** - * Request Id. + * Host name dns suffix of managed instance DTC. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestId?: string; + readonly dtcHostNameDnsSuffix?: string; /** - * Request type. + * Provisioning state of managed instance DTC. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestType?: string; + readonly provisioningState?: ProvisioningState; +} + +/** The managed instance encryption protector. */ +export interface ManagedInstanceEncryptionProtector extends ProxyResource { /** - * Queued time. + * 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 queuedTime?: string; + readonly kind?: string; + /** The name of the managed instance key. */ + serverKeyName?: string; + /** The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. */ + serverKeyType?: ServerKeyType; /** - * Last modified time. + * The URI of the server key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastModifiedTime?: string; + readonly uri?: string; /** - * Blob Uri. + * Thumbprint of the server key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly blobUri?: string; + readonly thumbprint?: string; + /** Key auto rotation opt-in flag. Either true or false. */ + autoRotationEnabled?: boolean; +} + +/** A managed instance key. */ +export interface ManagedInstanceKey extends ProxyResource { /** - * Server name. + * 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 serverName?: string; + readonly kind?: string; + /** The key type like 'ServiceManaged', 'AzureKeyVault'. */ + serverKeyType?: ServerKeyType; + /** The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. */ + uri?: string; /** - * Database name. + * Thumbprint of the key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly thumbprint?: string; /** - * Operation status. + * The key creation date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: string; + readonly creationDate?: Date; /** - * Error message. + * Key auto rotation opt-in flag. Either true or false. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly errorMessage?: string; + readonly autoRotationEnabled?: boolean; +} + +/** A long term retention policy. */ +export interface ManagedInstanceLongTermRetentionPolicy extends ProxyResource { + /** The weekly retention policy for an LTR backup in an ISO 8601 format. */ + weeklyRetention?: string; + /** The monthly retention policy for an LTR backup in an ISO 8601 format. */ + monthlyRetention?: string; + /** The yearly retention policy for an LTR backup in an ISO 8601 format. */ + yearlyRetention?: string; + /** The week of year to take the yearly backup in an ISO 8601 format. */ + weekOfYear?: number; +} + +/** A managed instance operation. */ +export interface ManagedInstanceOperation extends ProxyResource { /** - * Gets the status of private endpoints associated with this request. + * The name of the managed instance the operation is being performed on. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: PrivateEndpointConnectionRequestStatus[]; -} - -/** A LongTermRetentionBackup operation result resource. */ -export interface LongTermRetentionBackupOperationResult extends ProxyResource { + readonly managedInstanceName?: string; /** - * Request Id. + * The name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestId?: string; + readonly operation?: string; /** - * Operation type. + * The friendly name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly operationType?: string; + readonly operationFriendlyName?: string; /** - * Source backup resource id + * The percentage of the operation completed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly fromBackupResourceId?: string; + readonly percentComplete?: number; /** - * Target backup resource id + * The operation start time. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly toBackupResourceId?: string; + readonly startTime?: Date; /** - * The storage redundancy type of the copied backup + * The operation state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly targetBackupStorageRedundancy?: BackupStorageRedundancy; + readonly state?: ManagementOperationState; /** - * Operation status + * The operation error code. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: string; + readonly errorCode?: number; /** - * Progress message + * The operation error description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly message?: string; -} - -/** A long term retention backup. */ -export interface LongTermRetentionBackup extends ProxyResource { + readonly errorDescription?: string; /** - * The server name that the backup database belong to. + * The operation error severity. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serverName?: string; + readonly errorSeverity?: number; /** - * The create time of the server. + * 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 serverCreateTime?: Date; + readonly isUserError?: boolean; /** - * The name of the database the backup belong to + * The estimated completion time of the operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly estimatedCompletionTime?: Date; /** - * The delete time of the database + * The operation description. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseDeletionTime?: Date; + readonly description?: string; /** - * The time the backup was taken + * Whether the operation can be cancelled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupTime?: Date; + readonly isCancellable?: boolean; /** - * The time the long term retention backup will expire. + * The operation parameters. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupExpirationTime?: Date; + readonly operationParameters?: ManagedInstanceOperationParametersPair; /** - * The storage redundancy type of the backup + * The operation steps. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupStorageRedundancy?: BackupStorageRedundancy; - /** The storage redundancy type of the backup */ - requestedBackupStorageRedundancy?: BackupStorageRedundancy; + readonly operationSteps?: ManagedInstanceOperationSteps; } -/** A long term retention backup for a managed database. */ -export interface ManagedInstanceLongTermRetentionBackup extends ProxyResource { +/** A private endpoint connection */ +export interface ManagedInstancePrivateEndpointConnection + extends ProxyResource { + /** Private endpoint which the connection belongs to. */ + privateEndpoint?: ManagedInstancePrivateEndpointProperty; + /** Connection State of the Private Endpoint Connection. */ + privateLinkServiceConnectionState?: ManagedInstancePrivateLinkServiceConnectionStateProperty; /** - * The managed instance that the backup database belongs to. + * State of the Private Endpoint Connection. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly managedInstanceName?: string; + readonly provisioningState?: string; +} + +/** A private link resource */ +export interface ManagedInstancePrivateLink extends ProxyResource { /** - * The create time of the instance. + * The private link resource group id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly managedInstanceCreateTime?: Date; + readonly properties?: ManagedInstancePrivateLinkProperties; +} + +/** A TDE certificate that can be uploaded into a server. */ +export interface TdeCertificate extends ProxyResource { + /** The base64 encoded certificate private blob. */ + privateBlob?: string; + /** The certificate password. */ + certPassword?: string; +} + +/** A managed instance vulnerability assessment. */ +export interface ManagedInstanceVulnerabilityAssessment extends ProxyResource { + /** A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). */ + storageContainerPath?: string; + /** 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. Applies only if the storage account is not behind a Vnet or a firewall */ + storageContainerSasKey?: string; + /** Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall */ + storageAccountAccessKey?: string; + /** The recurring scans settings */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** Azure SQL Database ledger digest upload settings. */ +export interface ManagedLedgerDigestUploads extends ProxyResource { + /** The digest storage endpoint, which must be either an Azure blob storage endpoint or an URI for Azure Confidential Ledger. */ + digestStorageEndpoint?: string; /** - * The name of the database the backup belong to + * Specifies the state of ledger digest upload. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly state?: ManagedLedgerDigestUploadsState; +} + +/** A managed server DNS alias. */ +export interface ManagedServerDnsAlias extends ProxyResource { /** - * The delete time of the database + * The fully qualified DNS record for managed server alias * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseDeletionTime?: Date; + readonly azureDnsRecord?: string; /** - * The time the backup was taken + * The fully qualified public DNS record for managed server alias * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupTime?: Date; + readonly publicAzureDnsRecord?: string; +} + +/** A managed server security alert policy. */ +export interface ManagedServerSecurityAlertPolicy extends ProxyResource { /** - * The time the long term retention backup will expire. + * SystemData of SecurityAlertPolicyResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupExpirationTime?: Date; + readonly systemData?: SystemData; + /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ + state?: SecurityAlertsPolicyState; + /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ + disabledAlerts?: string[]; + /** Specifies an array of e-mail addresses to which the alert is sent. */ + emailAddresses?: string[]; + /** Specifies that the alert is sent to the account administrators. */ + emailAccountAdmins?: boolean; + /** 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; + /** Specifies the identifier key of the Threat Detection audit storage account. */ + storageAccountAccessKey?: string; + /** Specifies the number of days to keep in the Threat Detection audit logs. */ + retentionDays?: number; /** - * The storage redundancy type of the backup + * Specifies the UTC creation time of the policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupStorageRedundancy?: BackupStorageRedundancy; + readonly creationTime?: Date; } -/** A restorable dropped database resource. */ -export interface RestorableDroppedDatabase extends ProxyResource { - /** The name and tier of the SKU. */ - sku?: Sku; - /** Resource location. */ - location?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; +/** An Azure SQL DB Server Outbound Firewall Rule. */ +export interface OutboundFirewallRule extends ProxyResource { /** - * The name of the database. + * The state of the outbound rule. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly provisioningState?: string; +} + +/** A private endpoint connection */ +export interface PrivateEndpointConnection extends ProxyResource { + /** Private endpoint which the connection belongs to. */ + privateEndpoint?: PrivateEndpointProperty; /** - * The max size of the database expressed in bytes. + * Group IDs. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxSizeBytes?: number; + readonly groupIds?: string[]; + /** Connection state of the private endpoint connection. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; /** - * The creation date of the database (ISO8601 format). + * State of the private endpoint connection. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly provisioningState?: PrivateEndpointProvisioningState; +} + +/** A private link resource */ +export interface PrivateLinkResource extends ProxyResource { /** - * The deletion date of the database (ISO8601 format). + * The private link resource group id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deletionDate?: Date; + readonly properties?: PrivateLinkResourceProperties; +} + +/** A recoverable database resource. */ +export interface RecoverableDatabase extends ProxyResource { /** - * The earliest restore date of the database (ISO8601 format). + * The edition of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly earliestRestoreDate?: Date; + readonly edition?: string; /** - * The storage account type used to store backups for this database. + * The service level objective name of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly backupStorageRedundancy?: BackupStorageRedundancy; -} - -/** A server connection policy */ -export interface ServerConnectionPolicy extends ProxyResource { + readonly serviceLevelObjective?: string; /** - * Resource location. + * The elastic pool name of the database * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly location?: string; + readonly elasticPoolName?: string; /** - * Metadata used for the Azure portal experience. + * The last available backup date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; - /** The server connection type. */ - connectionType?: ServerConnectionType; + readonly lastAvailableBackupDate?: Date; + /** The resource ids of the user assigned identities to use */ + keys?: { [propertyName: string]: DatabaseKey }; } -/** An elastic pool. */ -export interface ElasticPool extends TrackedResource { +/** A recoverable managed database resource. */ +export interface RecoverableManagedDatabase extends ProxyResource { /** - * The elastic pool SKU. - * - * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: - * - * ```azurecli - * az sql elastic-pool list-editions -l -o table - * ```` - * + * The last available backup date. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - sku?: Sku; + readonly lastAvailableBackupDate?: string; +} + +/** A replication link. */ +export interface ReplicationLink extends ProxyResource { /** - * Kind of elastic pool. This is metadata used for the Azure portal experience. + * Resource partner server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly partnerServer?: string; /** - * The state of the elastic pool. + * Resource partner database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: ElasticPoolState; + readonly partnerDatabase?: string; /** - * The creation date of the elastic pool (ISO8601 format). + * Resource partner database Id. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; - /** The storage limit for the database elastic pool in bytes. */ - maxSizeBytes?: number; - /** The per database settings for the elastic pool. */ - perDatabaseSettings?: ElasticPoolPerDatabaseSettings; - /** 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; - /** The license type to apply for this elastic pool. */ - licenseType?: ElasticPoolLicenseType; - /** Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. */ - maintenanceConfigurationId?: string; -} - -/** An Azure SQL instance pool. */ -export interface InstancePool extends TrackedResource { - /** The name and tier of the SKU. */ - sku?: Sku; - /** Resource ID of the subnet to place this instance pool in. */ - subnetId?: string; - /** Count of vCores belonging to this instance pool. */ - vCores?: number; - /** The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). */ - licenseType?: InstancePoolLicenseType; -} - -/** An Azure SQL job agent. */ -export interface JobAgent extends TrackedResource { - /** The name and tier of the SKU. */ - sku?: Sku; - /** Resource ID of the database to store job metadata in. */ - databaseId?: string; + readonly partnerDatabaseId?: string; /** - * The state of the job agent. + * Resource partner location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly state?: JobAgentState; -} - -/** A managed database resource. */ -export interface ManagedDatabase extends TrackedResource { - /** Collation of the managed database. */ - collation?: string; + readonly partnerLocation?: string; /** - * Status of the database. + * Local replication role. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: ManagedDatabaseStatus; + readonly role?: ReplicationRole; /** - * Creation date of the database. + * Partner replication role. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly partnerRole?: ReplicationRole; /** - * Earliest restore point in time for point in time restore. + * Replication mode. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly earliestRestorePoint?: Date; - /** 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; + readonly replicationMode?: string; /** - * Geo paired region. + * Time at which the link was created. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly defaultSecondaryLocation?: string; - /** Collation of the metadata catalog. */ - catalogCollation?: CatalogCollationType; - /** Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). */ - createMode?: ManagedDatabaseCreateMode; - /** 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; - /** The resource identifier of the source database associated with create operation of this database. */ - sourceDatabaseId?: string; - /** The restorable dropped database resource id to restore when creating this database. */ - restorableDroppedDatabaseId?: string; - /** Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. */ - storageContainerSasToken?: string; + readonly startTime?: Date; /** - * Instance Failover Group resource identifier that this managed database belongs to. + * Seeding completion percentage for the link. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly failoverGroupId?: string; - /** The resource identifier of the recoverable database associated with create operation of this database. */ - recoverableDatabaseId?: string; - /** The name of the Long Term Retention backup to be used for restore of this managed database. */ - longTermRetentionBackupResourceId?: string; - /** Whether to auto complete restore of this managed database. */ - autoCompleteRestore?: boolean; - /** Last backup file name for restore of this managed database. */ - lastBackupName?: string; -} - -/** An Azure SQL virtual cluster. */ -export interface VirtualCluster extends TrackedResource { + readonly percentComplete?: number; /** - * Subnet resource ID for the virtual cluster. + * Replication state (PENDING, SEEDING, CATCHUP, SUSPENDED). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly subnetId?: string; - /** If the service has different generations of hardware, for the same SKU, then that can be captured here. */ - family?: string; + readonly replicationState?: ReplicationState; /** - * List of resources in this virtual cluster. + * Whether the user is currently allowed to terminate the link. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly childResources?: string[]; - /** Specifies maintenance configuration id to apply to this virtual cluster. */ - maintenanceConfigurationId?: string; -} - -/** An Azure SQL Database server. */ -export interface Server extends TrackedResource { - /** The Azure Active Directory identity of the server. */ - identity?: ResourceIdentity; + readonly isTerminationAllowed?: boolean; /** - * Kind of sql server. This is metadata used for the Azure portal experience. + * Link type (GEO, NAMED, STANDBY). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; - /** Administrator username for the server. Once created it cannot be changed. */ - administratorLogin?: string; - /** The administrator login password (required for server creation). */ - administratorLoginPassword?: string; - /** The version of the server. */ - version?: string; - /** - * The state of the server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly state?: string; + readonly linkType?: ReplicationLinkType; +} + +/** A restorable dropped database resource. */ +export interface RestorableDroppedDatabase extends ProxyResource { + /** The name and tier of the SKU. */ + sku?: Sku; + /** Resource location. */ + location?: string; + /** Resource tags. */ + tags?: { [propertyName: string]: string }; /** - * The fully qualified domain name of the server. + * The name of the database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly fullyQualifiedDomainName?: string; + readonly databaseName?: string; /** - * List of private endpoint connections on a server + * The max size of the database expressed in bytes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; - /** Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' */ - minimalTlsVersion?: string; - /** Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' */ - publicNetworkAccess?: ServerNetworkAccessFlag; + readonly maxSizeBytes?: number; /** - * Whether or not existing server has a workspace created and if it allows connection from workspace + * The creation date of the database (ISO8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly workspaceFeature?: ServerWorkspaceFeature; - /** The resource id of a user assigned identity to be used by default. */ - primaryUserAssignedIdentityId?: string; - /** The Client id used for cross tenant CMK scenario */ - federatedClientId?: string; - /** A CMK URI of the key to use for encryption. */ - keyId?: string; - /** The Azure Active Directory identity of the server. */ - administrators?: ServerExternalAdministrator; - /** Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' */ - restrictOutboundNetworkAccess?: ServerNetworkAccessFlag; -} - -/** A database resource. */ -export interface Database extends TrackedResource { - /** - * The database SKU. - * - * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: - * - * ```azurecli - * az sql db list-editions -l -o table - * ```` - * - * ```powershell - * Get-AzSqlServerServiceObjective -Location - * ```` - * - */ - sku?: Sku; + readonly creationDate?: Date; /** - * Kind of database. This is metadata used for the Azure portal experience. + * The deletion date of the database (ISO8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly kind?: string; + readonly deletionDate?: Date; /** - * Resource that manages the database. + * 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 managedBy?: string; - /** The Azure Active Directory identity of the database. */ - identity?: DatabaseIdentity; - /** - * 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. - */ - createMode?: CreateMode; - /** The collation of the database. */ - collation?: string; - /** The max size of the database expressed in bytes. */ - maxSizeBytes?: number; - /** The name of the sample schema to apply when creating this database. */ - sampleName?: SampleName; - /** The resource identifier of the elastic pool containing this database. */ - elasticPoolId?: string; - /** The resource identifier of the source database associated with create operation of this database. */ - sourceDatabaseId?: string; + readonly earliestRestoreDate?: Date; /** - * The status of the database. + * The storage account type used to store backups for this database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: DatabaseStatus; + readonly backupStorageRedundancy?: BackupStorageRedundancy; + /** The resource ids of the user assigned identities to use */ + keys?: { [propertyName: string]: DatabaseKey }; +} + +/** Database restore points. */ +export interface RestorePoint extends ProxyResource { /** - * The ID of the database. + * Resource location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseId?: string; + readonly location?: string; /** - * The creation date of the database (ISO8601 format). + * The type of restore point * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly restorePointType?: RestorePointType; /** - * The current service level objective name of the database. + * 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 currentServiceObjectiveName?: string; + readonly earliestRestoreDate?: Date; /** - * The requested service level objective name of the database. + * The time the backup was taken * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requestedServiceObjectiveName?: string; + readonly restorePointCreationDate?: Date; /** - * The default secondary region for this database. + * 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 defaultSecondaryLocation?: string; + readonly restorePointLabel?: string; +} + +/** A server Advanced Threat Protection. */ +export interface ServerAdvancedThreatProtection extends ProxyResource { /** - * Failover Group resource identifier that this database belongs to. + * SystemData of AdvancedThreatProtectionResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly failoverGroupId?: string; - /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ - restorePointInTime?: Date; - /** Specifies the time that the database was deleted. */ - sourceDatabaseDeletionDate?: Date; - /** The resource identifier of the recovery point associated with create operation of this database. */ - recoveryServicesRecoveryPointId?: string; - /** The resource identifier of the long term retention backup associated with create operation of this database. */ - longTermRetentionBackupResourceId?: string; - /** The resource identifier of the recoverable database associated with create operation of this database. */ - recoverableDatabaseId?: string; - /** The resource identifier of the restorable dropped database associated with create operation of this database. */ - restorableDroppedDatabaseId?: string; - /** Collation of the metadata catalog. */ - catalogCollation?: CatalogCollationType; - /** Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. */ - zoneRedundant?: boolean; - /** The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. */ - licenseType?: DatabaseLicenseType; + readonly systemData?: SystemData; + /** Specifies the state of the Advanced Threat Protection, whether it is enabled or disabled or a state has not been applied yet on the specific database or server. */ + state?: AdvancedThreatProtectionState; /** - * The max log size for this database. + * Specifies the UTC creation time of the policy. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maxLogSizeBytes?: number; + readonly creationTime?: Date; +} + +/** Server-level Automatic Tuning. */ +export interface ServerAutomaticTuning extends ProxyResource { + /** Automatic tuning desired state. */ + desiredState?: AutomaticTuningServerMode; /** - * This records the earliest start date and time that restore is available for this database (ISO8601 format). + * Automatic tuning actual state. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly earliestRestoreDate?: Date; - /** 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. */ - readScale?: DatabaseReadScale; - /** The number of secondary replicas associated with the database that are used to provide high availability. */ - highAvailabilityReplicaCount?: number; - /** The secondary type of the database if it is a secondary. Valid values are Geo and Named. */ - secondaryType?: SecondaryType; + readonly actualState?: AutomaticTuningServerMode; + /** Automatic tuning options definition. */ + options?: { [propertyName: string]: AutomaticTuningServerOptions }; +} + +/** Azure Active Directory administrator. */ +export interface ServerAzureADAdministrator extends ProxyResource { + /** Type of the sever administrator. */ + administratorType?: AdministratorType; + /** Login name of the server administrator. */ + login?: string; + /** SID (object ID) of the server administrator. */ + sid?: string; + /** Tenant ID of the administrator. */ + tenantId?: string; /** - * The name and tier of the SKU. + * Azure Active Directory only Authentication enabled. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentSku?: Sku; - /** Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled */ - autoPauseDelay?: number; + readonly azureADOnlyAuthentication?: boolean; +} + +/** Azure Active Directory only authentication. */ +export interface ServerAzureADOnlyAuthentication extends ProxyResource { + /** Azure Active Directory only Authentication enabled. */ + azureADOnlyAuthentication?: boolean; +} + +/** A server configuration option */ +export interface ServerConfigurationOption extends ProxyResource { + /** Value of the server configuration option. */ + serverConfigurationOptionValue?: number; /** - * The storage account type used to store backups for this database. + * Provisioning state of server configuration option. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; - /** The storage account type to be used to store backups for this database. */ - requestedBackupStorageRedundancy?: BackupStorageRedundancy; - /** Minimal capacity that database will always have allocated, if not paused */ - minCapacity?: number; + readonly provisioningState?: ProvisioningState; +} + +/** A server connection policy */ +export interface ServerConnectionPolicy extends ProxyResource { /** - * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. + * Resource location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly pausedDate?: Date; + readonly location?: string; /** - * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. + * Metadata used for the Azure portal experience. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly resumedDate?: Date; - /** Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. */ - maintenanceConfigurationId?: string; - /** Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. */ - isLedgerOn?: boolean; + readonly kind?: string; + /** The server connection type. */ + connectionType?: ServerConnectionType; +} + +/** A server DevOps auditing settings. */ +export interface ServerDevOpsAuditingSettings extends ProxyResource { /** - * Infra encryption is enabled for this database. + * SystemData of ServerDevOpsAuditSettingsResource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly isInfraEncryptionEnabled?: boolean; - /** The Client id used for cross tenant per database CMK scenario */ - federatedClientId?: string; - /** The Primary Delegated Identity Client id used for per database CMK - for internal use only */ - primaryDelegatedIdentityClientId?: string; -} - -/** An Azure SQL managed instance. */ -export interface ManagedInstance extends TrackedResource { - /** The Azure Active Directory identity of the managed instance. */ - identity?: ResourceIdentity; - /** Managed instance SKU. Allowed values for sku.name: GP_Gen4, GP_Gen5, BC_Gen4, BC_Gen5 */ - sku?: Sku; - /** NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ManagedInstancePropertiesProvisioningState; + readonly systemData?: SystemData; /** - * Specifies the mode of database creation. + * Specifies whether DevOps audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true. * - * Default: Regular instance creation. + * When using REST API to configure DevOps audit, Diagnostic Settings with 'DevOpsOperationsAudit' diagnostic logs category on the master database should be also created. * - * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. - */ - managedInstanceCreateMode?: ManagedServerCreateMode; - /** - * The fully qualified domain name of the managed instance. + * Diagnostic Settings URI format: + * PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/master/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * 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; + /** Specifies whether Managed Identity is used to access blob storage */ + isManagedIdentityInUse?: boolean; + /** Specifies the state of the audit. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. */ + state?: BlobAuditingPolicyState; + /** Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. */ + storageEndpoint?: string; + /** + * Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + * For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + */ + storageAccountAccessKey?: string; + /** Specifies the blob storage subscription Id. */ + storageAccountSubscriptionId?: string; +} + +/** A server DNS alias. */ +export interface ServerDnsAlias extends ProxyResource { + /** + * The fully qualified DNS record for alias * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly fullyQualifiedDomainName?: string; - /** Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). */ - administratorLogin?: string; - /** The administrator login password (required for managed instance creation). */ - administratorLoginPassword?: string; - /** Subnet resource ID for the managed instance. */ - subnetId?: string; + readonly azureDnsRecord?: string; +} + +/** A server key. */ +export interface ServerKey extends ProxyResource { /** - * The state of the managed instance. + * 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 state?: string; - /** The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). */ - licenseType?: ManagedInstanceLicenseType; - /** The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ - vCores?: number; - /** Storage size in GB. Minimum value: 32. Maximum value: 8192. Increments of 32 GB allowed only. */ - storageSizeInGB?: number; - /** Collation of the managed instance. */ - collation?: string; + readonly kind?: string; /** - * The Dns Zone that the managed instance is in. + * Resource location. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly dnsZone?: string; - /** The resource id of another managed instance whose DNS zone this managed instance will share after creation. */ - dnsZonePartner?: string; - /** Whether or not the public data endpoint is enabled. */ - publicDataEndpointEnabled?: boolean; - /** The resource identifier of the source managed instance associated with create operation of this instance. */ - sourceManagedInstanceId?: string; - /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ - restorePointInTime?: Date; - /** Connection type used for connecting to the instance. */ - proxyOverride?: ManagedInstanceProxyOverride; + readonly location?: string; /** - * 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". + * Subregion of the server key. + * NOTE: This property will not be serialized. It can only be populated by the server. */ - timezoneId?: string; - /** The Id of the instance pool this managed server belongs to. */ - instancePoolId?: string; - /** Specifies maintenance configuration id to apply to this managed instance. */ - maintenanceConfigurationId?: string; + readonly subregion?: string; + /** The server key type like 'ServiceManaged', 'AzureKeyVault'. */ + serverKeyType?: ServerKeyType; + /** The URI of the server key. If the ServerKeyType is AzureKeyVault, then the URI is required. The AKV URI is required to be in this format: 'https://YourVaultName.vault.azure.net/keys/YourKeyName/YourKeyVersion' */ + uri?: string; /** - * List of private endpoint connections on a managed instance. + * Thumbprint of the server key. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: ManagedInstancePecProperty[]; - /** Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' */ - minimalTlsVersion?: string; + readonly thumbprint?: string; /** - * The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) + * The server key creation date. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; - /** The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) */ - requestedBackupStorageRedundancy?: BackupStorageRedundancy; - /** Whether or not the multi-az is enabled. */ - zoneRedundant?: boolean; - /** The resource id of a user assigned identity to be used by default. */ - primaryUserAssignedIdentityId?: string; - /** A CMK URI of the key to use for encryption. */ - keyId?: string; - /** The Azure Active Directory administrator of the server. */ - administrators?: ManagedInstanceExternalAdministrator; - /** The managed instance's service principal. */ - servicePrincipal?: ServicePrincipal; + readonly creationDate?: Date; + /** + * Key auto rotation opt-in flag. Either true or false. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly autoRotationEnabled?: boolean; } -/** A restorable dropped managed database resource. */ -export interface RestorableDroppedManagedDatabase extends TrackedResource { +/** A server operation. */ +export interface ServerOperation extends ProxyResource { /** - * The name of the database. + * The name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseName?: string; + readonly operation?: string; /** - * The creation date of the database (ISO8601 format). + * The friendly name of operation. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly creationDate?: Date; + readonly operationFriendlyName?: string; /** - * The deletion date of the database (ISO8601 format). + * The percentage of the operation completed. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deletionDate?: Date; + readonly percentComplete?: number; /** - * The earliest restore date of the database (ISO8601 format). + * The name of the server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly earliestRestoreDate?: Date; + readonly serverName?: string; + /** + * The operation start time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly startTime?: Date; + /** + * The operation state. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: ManagementOperationState; + /** + * The operation error code. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorCode?: number; + /** + * The operation error description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorDescription?: string; + /** + * The operation error severity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorSeverity?: number; + /** + * 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; + /** + * 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; + /** + * The operation description. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Whether the operation can be cancelled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isCancellable?: boolean; } -/** A server firewall rule. */ -export interface FirewallRule extends ProxyResourceWithWritableName { - /** The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. */ - startIpAddress?: string; - /** The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. */ - endIpAddress?: string; +/** A server security alert policy. */ +export interface ServerSecurityAlertPolicy extends ProxyResource { + /** + * SystemData of SecurityAlertPolicyResource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database. */ + state?: SecurityAlertsPolicyState; + /** Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force */ + disabledAlerts?: string[]; + /** Specifies an array of e-mail addresses to which the alert is sent. */ + emailAddresses?: string[]; + /** Specifies that the alert is sent to the account administrators. */ + emailAccountAdmins?: boolean; + /** 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; + /** Specifies the identifier key of the Threat Detection audit storage account. */ + storageAccountAccessKey?: string; + /** Specifies the number of days to keep in the Threat Detection audit logs. */ + retentionDays?: number; + /** + * 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; } -/** Known values of {@link GeoBackupPolicyName} that the service accepts. */ -export enum KnownGeoBackupPolicyName { - /** Default */ - Default = "Default" +/** Server trust certificate imported from box to enable connection between box and Sql Managed Instance. */ +export interface ServerTrustCertificate extends ProxyResource { + /** The certificate public blob */ + publicBlob?: string; + /** + * The certificate thumbprint + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly thumbprint?: string; + /** + * The certificate name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly certificateName?: string; } -/** - * Defines values for GeoBackupPolicyName. \ - * {@link KnownGeoBackupPolicyName} can be used interchangeably with GeoBackupPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** - */ -export type GeoBackupPolicyName = string; +/** A server trust group. */ +export interface ServerTrustGroup extends ProxyResource { + /** Group members information for the server trust group. */ + groupMembers?: ServerInfo[]; + /** Trust scope of the server trust group. */ + trustScopes?: ServerTrustGroupPropertiesTrustScopesItem[]; +} -/** Known values of {@link UnitType} that the service accepts. */ -export enum KnownUnitType { - /** Count */ - Count = "count", - /** Bytes */ - Bytes = "bytes", - /** Seconds */ - Seconds = "seconds", - /** Percent */ - Percent = "percent", - /** CountPerSecond */ - CountPerSecond = "countPerSecond", - /** BytesPerSecond */ - BytesPerSecond = "bytesPerSecond" +/** Usage metric of a server. */ +export interface ServerUsage extends ProxyResource { + /** + * User-readable name of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** + * Current value of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentValue?: number; + /** + * Boundary value of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly limit?: number; + /** + * Unit of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly unit?: string; } -/** - * Defines values for UnitType. \ - * {@link KnownUnitType} can be used interchangeably with UnitType, - * this enum contains the known values that the service supports. +/** A server vulnerability assessment. */ +export interface ServerVulnerabilityAssessment extends ProxyResource { + /** A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). */ + storageContainerPath?: string; + /** 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. Applies only if the storage account is not behind a Vnet or a firewall */ + storageContainerSasKey?: string; + /** Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall */ + storageAccountAccessKey?: string; + /** The recurring scans settings */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** An RefreshExternalGovernanceStatus operation result resource. */ +export interface RefreshExternalGovernanceStatusOperationResult + extends ProxyResource { + /** + * Request Id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requestId?: string; + /** + * Request type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requestType?: string; + /** + * Queued time. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly queuedTime?: string; + /** + * Server name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly serverName?: string; + /** + * Operation status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Error message. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly errorMessage?: string; +} + +/** A recoverable managed database resource. */ +export interface SqlAgentConfiguration extends ProxyResource { + /** The state of Sql Agent. */ + state?: SqlAgentConfigurationPropertiesState; +} + +/** Managed instance's Start/Stop schedule. */ +export interface StartStopManagedInstanceSchedule extends ProxyResource { + /** + * System data of the scheduled resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** The description of the schedule. */ + description?: string; + /** The time zone of the schedule. */ + timeZoneId?: string; + /** Schedule list. */ + scheduleList?: ScheduleItem[]; + /** + * Next action to be executed (Start or Stop) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextRunAction?: string; + /** + * Timestamp when the next action will be executed in the corresponding schedule time zone. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextExecutionTime?: string; +} + +/** Usage Metric of a Subscription in a Location. */ +export interface SubscriptionUsage extends ProxyResource { + /** + * User-readable name of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; + /** + * Current value of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentValue?: number; + /** + * Boundary value of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly limit?: number; + /** + * Unit of the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly unit?: string; +} + +/** Synapse link workspace resource */ +export interface SynapseLinkWorkspace extends ProxyResource { + /** List of all synapselink workspaces */ + workspaces?: SynapseLinkWorkspaceInfoProperties[]; +} + +/** An Azure SQL Database sync agent. */ +export interface SyncAgent extends ProxyResource { + /** + * Name of the sync agent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly namePropertiesName?: string; + /** ARM resource id of the sync database in the sync agent. */ + syncDatabaseId?: string; + /** + * 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; + /** + * State of the sync agent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: SyncAgentState; + /** + * 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; + /** + * 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; + /** + * Version of the sync agent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly version?: string; +} + +/** An Azure SQL Database sync agent linked database. */ +export interface SyncAgentLinkedDatabase extends ProxyResource { + /** + * Type of the sync agent linked database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseType?: SyncMemberDbType; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; +} + +/** An Azure SQL Database sync group. */ +export interface SyncGroup extends ProxyResource { + /** The name and capacity of the SKU. */ + sku?: Sku; + /** Sync interval of the sync group. */ + interval?: number; + /** + * 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; + /** Conflict resolution policy of the sync group. */ + conflictResolutionPolicy?: SyncConflictResolutionPolicy; + /** ARM resource id of the sync database in the sync group. */ + syncDatabaseId?: string; + /** User name for the sync group hub database credential. */ + hubDatabaseUserName?: string; + /** Password for the sync group hub database credential. */ + hubDatabasePassword?: string; + /** + * Sync state of the sync group. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly syncState?: SyncGroupState; + /** Sync schema of the sync group. */ + schema?: SyncGroupSchema; + /** If conflict logging is enabled. */ + enableConflictLogging?: boolean; + /** Conflict logging retention period. */ + conflictLoggingRetentionInDays?: number; + /** If use private link connection is enabled. */ + usePrivateLinkConnection?: boolean; + /** + * Private endpoint name of the sync group if use private link connection is enabled. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointName?: string; +} + +/** An Azure SQL Database sync member. */ +export interface SyncMember extends ProxyResource { + /** Database type of the sync member. */ + databaseType?: SyncMemberDbType; + /** ARM resource id of the sync agent in the sync member. */ + syncAgentId?: string; + /** SQL Server database id of the sync member. */ + sqlServerDatabaseId?: string; + /** ARM resource id of the sync member logical database, for sync members in Azure. */ + syncMemberAzureDatabaseResourceId?: string; + /** Whether to use private link connection. */ + usePrivateLinkConnection?: boolean; + /** + * Private endpoint name of the sync member if use private link connection is enabled, for sync members in Azure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointName?: string; + /** Server name of the member database in the sync member */ + serverName?: string; + /** Database name of the member database in the sync member. */ + databaseName?: string; + /** User name of the member database in the sync member. */ + userName?: string; + /** Password of the member database in the sync member. */ + password?: string; + /** Sync direction of the sync member. */ + syncDirection?: SyncDirection; + /** + * Sync state of the sync member. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly syncState?: SyncMemberState; +} + +/** Time Zone property. */ +export interface TimeZone extends ProxyResource { + /** + * The time zone id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeZoneId?: string; + /** + * The time zone display name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly displayName?: string; +} + +/** A logical database transparent data encryption state. */ +export interface LogicalDatabaseTransparentDataEncryption + extends ProxyResource { + /** Specifies the state of the transparent data encryption. */ + state?: TransparentDataEncryptionState; +} + +/** A refresh DNS servers operation. */ +export interface UpdateVirtualClusterDnsServersOperation extends ProxyResource { + /** + * The status of the DNS refresh operation. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: DNSRefreshOperationStatus; +} + +/** A virtual network rule. */ +export interface VirtualNetworkRule extends ProxyResource { + /** The ARM resource id of the virtual network subnet. */ + virtualNetworkSubnetId?: string; + /** Create firewall rule before the virtual network has vnet service endpoint enabled. */ + ignoreMissingVnetServiceEndpoint?: boolean; + /** + * Virtual Network Rule State + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: VirtualNetworkRuleState; +} + +/** Workload classifier operations for a data warehouse */ +export interface WorkloadClassifier extends ProxyResource { + /** The workload classifier member name. */ + memberName?: string; + /** The workload classifier label. */ + label?: string; + /** The workload classifier context. */ + context?: string; + /** The workload classifier start time for classification. */ + startTime?: string; + /** The workload classifier end time for classification. */ + endTime?: string; + /** The workload classifier importance. */ + importance?: string; +} + +/** Workload group operations for a data warehouse */ +export interface WorkloadGroup extends ProxyResource { + /** The workload group minimum percentage resource. */ + minResourcePercent?: number; + /** The workload group cap percentage resource. */ + maxResourcePercent?: number; + /** The workload group request minimum grant percentage. */ + minResourcePercentPerRequest?: number; + /** The workload group request maximum grant percentage. */ + maxResourcePercentPerRequest?: number; + /** The workload group importance level. */ + importance?: string; + /** The workload group query execution timeout. */ + queryExecutionTimeout?: number; +} + +/** A database resource. */ +export interface Database extends TrackedResource { + /** + * The database SKU. + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands: + * + * ```azurecli + * az sql db list-editions -l -o table + * ```` + * + * ```powershell + * Get-AzSqlServerServiceObjective -Location + * ```` + * + */ + sku?: Sku; + /** + * 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; + /** + * Resource that manages the database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly managedBy?: string; + /** The Azure Active Directory identity of the database. */ + identity?: DatabaseIdentity; + /** + * 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. + */ + createMode?: CreateMode; + /** The collation of the database. */ + collation?: string; + /** The max size of the database expressed in bytes. */ + maxSizeBytes?: number; + /** The name of the sample schema to apply when creating this database. */ + sampleName?: SampleName; + /** The resource identifier of the elastic pool containing this database. */ + elasticPoolId?: string; + /** The resource identifier of the source database associated with create operation of this database. */ + sourceDatabaseId?: string; + /** + * The status of the database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: DatabaseStatus; + /** + * The ID of the database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseId?: string; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** + * 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; + /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ + restorePointInTime?: Date; + /** Specifies the time that the database was deleted. */ + sourceDatabaseDeletionDate?: Date; + /** The resource identifier of the recovery point associated with create operation of this database. */ + recoveryServicesRecoveryPointId?: string; + /** The resource identifier of the long term retention backup associated with create operation of this database. */ + longTermRetentionBackupResourceId?: string; + /** The resource identifier of the recoverable database associated with create operation of this database. */ + recoverableDatabaseId?: string; + /** The resource identifier of the restorable dropped database associated with create operation of this database. */ + restorableDroppedDatabaseId?: string; + /** Collation of the metadata catalog. */ + catalogCollation?: CatalogCollationType; + /** Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. */ + zoneRedundant?: boolean; + /** The license type to apply for this database. `LicenseIncluded` if you need a license, or `BasePrice` if you have a license and are eligible for the Azure Hybrid Benefit. */ + licenseType?: DatabaseLicenseType; + /** + * 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; + /** + * 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; + /** 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. Not applicable to a Hyperscale database within an elastic pool. */ + readScale?: DatabaseReadScale; + /** The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. */ + highAvailabilityReplicaCount?: number; + /** The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. */ + secondaryType?: SecondaryType; + /** + * 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; + /** Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled */ + autoPauseDelay?: number; + /** + * The storage account type used to store backups for this database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; + /** The storage account type to be used to store backups for this database. */ + requestedBackupStorageRedundancy?: BackupStorageRedundancy; + /** Minimal capacity that database will always have allocated, if not paused */ + minCapacity?: number; + /** + * The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly pausedDate?: Date; + /** + * The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly resumedDate?: Date; + /** Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. */ + maintenanceConfigurationId?: string; + /** Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. */ + isLedgerOn?: boolean; + /** + * Infra encryption is enabled for this database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isInfraEncryptionEnabled?: boolean; + /** The Client id used for cross tenant per database CMK scenario */ + federatedClientId?: string; + /** The resource ids of the user assigned identities to use */ + keys?: { [propertyName: string]: DatabaseKey }; + /** The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. */ + encryptionProtector?: string; + /** Type of enclave requested on the database i.e. Default or VBS enclaves. */ + preferredEnclaveType?: AlwaysEncryptedEnclaveType; + /** + * The resource identifier of the source associated with the create operation of this database. + * + * This property is only supported for DataWarehouse edition and allows to restore across subscriptions. + * + * When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. + * + * When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified. + * + * When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool. + * + * When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. + * + * When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant + */ + sourceResourceId?: string; + /** + * Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier. + * + * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier. + * + * When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database. + * + * To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. + */ + manualCutover?: boolean; + /** + * To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress. + * + * This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter. + * + * This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress. + * + * When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. + */ + performCutover?: boolean; + /** Specifies the availability zone the database is pinned to. */ + availabilityZone?: AvailabilityZoneType; +} + +/** An elastic pool. */ +export interface ElasticPool extends TrackedResource { + /** + * The elastic pool SKU. + * + * The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command: + * + * ```azurecli + * az sql elastic-pool list-editions -l -o table + * ```` + * + */ + sku?: Sku; + /** + * 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; + /** + * The state of the elastic pool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: ElasticPoolState; + /** + * 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; + /** The storage limit for the database elastic pool in bytes. */ + maxSizeBytes?: number; + /** Minimal capacity that serverless pool will not shrink below, if not paused */ + minCapacity?: number; + /** The per database settings for the elastic pool. */ + perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + /** 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; + /** The license type to apply for this elastic pool. */ + licenseType?: ElasticPoolLicenseType; + /** Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. */ + maintenanceConfigurationId?: string; + /** The number of secondary replicas associated with the elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. */ + highAvailabilityReplicaCount?: number; + /** Type of enclave requested on the elastic pool. */ + preferredEnclaveType?: AlwaysEncryptedEnclaveType; + /** Specifies the availability zone the pool's primary replica is pinned to. */ + availabilityZone?: AvailabilityZoneType; +} + +/** An Azure SQL instance pool. */ +export interface InstancePool extends TrackedResource { + /** The name and tier of the SKU. */ + sku?: Sku; + /** Resource ID of the subnet to place this instance pool in. */ + subnetId?: string; + /** Count of vCores belonging to this instance pool. */ + vCores?: number; + /** The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price). */ + licenseType?: InstancePoolLicenseType; +} + +/** An Azure SQL job agent. */ +export interface JobAgent extends TrackedResource { + /** The name and tier of the SKU. */ + sku?: Sku; + /** Resource ID of the database to store job metadata in. */ + databaseId?: string; + /** + * The state of the job agent. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: JobAgentState; +} + +/** A managed database resource. */ +export interface ManagedDatabase extends TrackedResource { + /** Collation of the managed database. */ + collation?: string; + /** + * Status of the database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ManagedDatabaseStatus; + /** + * Creation date of the database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationDate?: Date; + /** + * 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; + /** 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; + /** + * Geo paired region. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly defaultSecondaryLocation?: string; + /** Collation of the metadata catalog. */ + catalogCollation?: CatalogCollationType; + /** Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). */ + createMode?: ManagedDatabaseCreateMode; + /** 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; + /** The resource identifier of the source database associated with create operation of this database. */ + sourceDatabaseId?: string; + /** The resource identifier of the cross-subscription source database associated with create operation of this database. */ + crossSubscriptionSourceDatabaseId?: string; + /** The restorable dropped database resource id to restore when creating this database. */ + restorableDroppedDatabaseId?: string; + /** The restorable cross-subscription dropped database resource id to restore when creating this database. */ + crossSubscriptionRestorableDroppedDatabaseId?: string; + /** Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. */ + storageContainerIdentity?: string; + /** Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. */ + storageContainerSasToken?: string; + /** + * 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; + /** The resource identifier of the recoverable database associated with create operation of this database. */ + recoverableDatabaseId?: string; + /** The name of the Long Term Retention backup to be used for restore of this managed database. */ + longTermRetentionBackupResourceId?: string; + /** Whether to auto complete restore of this managed database. */ + autoCompleteRestore?: boolean; + /** Last backup file name for restore of this managed database. */ + lastBackupName?: string; + /** Target managed instance id used in cross-subscription restore. */ + crossSubscriptionTargetManagedInstanceId?: string; + /** Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. */ + isLedgerOn?: boolean; +} + +/** An Azure SQL managed instance. */ +export interface ManagedInstance extends TrackedResource { + /** The Azure Active Directory identity of the managed instance. */ + identity?: ResourceIdentity; + /** Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH */ + sku?: Sku; + /** NOTE: This property will not be serialized. It can only be populated by the server. */ + readonly provisioningState?: ManagedInstancePropertiesProvisioningState; + /** + * Specifies the mode of database creation. + * + * Default: Regular instance creation. + * + * Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + */ + managedInstanceCreateMode?: ManagedServerCreateMode; + /** + * 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; + /** Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). */ + administratorLogin?: string; + /** The administrator login password (required for managed instance creation). */ + administratorLoginPassword?: string; + /** Subnet resource ID for the managed instance. */ + subnetId?: string; + /** + * The state of the managed instance. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: string; + /** The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). */ + licenseType?: ManagedInstanceLicenseType; + /** The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. */ + vCores?: number; + /** Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. */ + storageSizeInGB?: number; + /** Collation of the managed instance. */ + collation?: string; + /** + * 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; + /** The resource id of another managed instance whose DNS zone this managed instance will share after creation. */ + dnsZonePartner?: string; + /** Whether or not the public data endpoint is enabled. */ + publicDataEndpointEnabled?: boolean; + /** The resource identifier of the source managed instance associated with create operation of this instance. */ + sourceManagedInstanceId?: string; + /** Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. */ + restorePointInTime?: Date; + /** Connection type used for connecting to the instance. */ + proxyOverride?: ManagedInstanceProxyOverride; + /** + * 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; + /** The Id of the instance pool this managed server belongs to. */ + instancePoolId?: string; + /** Specifies maintenance configuration id to apply to this managed instance. */ + maintenanceConfigurationId?: string; + /** + * List of private endpoint connections on a managed instance. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: ManagedInstancePecProperty[]; + /** Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2' */ + minimalTlsVersion?: string; + /** + * The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly currentBackupStorageRedundancy?: BackupStorageRedundancy; + /** The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage) */ + requestedBackupStorageRedundancy?: BackupStorageRedundancy; + /** Whether or not the multi-az is enabled. */ + zoneRedundant?: boolean; + /** The resource id of a user assigned identity to be used by default. */ + primaryUserAssignedIdentityId?: string; + /** A CMK URI of the key to use for encryption. */ + keyId?: string; + /** The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. */ + administrators?: ManagedInstanceExternalAdministrator; + /** The managed instance's service principal. */ + servicePrincipal?: ServicePrincipal; +} + +/** A restorable dropped managed database resource. */ +export interface RestorableDroppedManagedDatabase extends TrackedResource { + /** + * The name of the database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseName?: string; + /** + * 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; + /** + * 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; + /** + * 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; +} + +/** An Azure SQL Database server. */ +export interface Server extends TrackedResource { + /** The Azure Active Directory identity of the server. */ + identity?: ResourceIdentity; + /** + * 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; + /** Administrator username for the server. Once created it cannot be changed. */ + administratorLogin?: string; + /** The administrator login password (required for server creation). */ + administratorLoginPassword?: string; + /** The version of the server. */ + version?: string; + /** + * The state of the server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly state?: string; + /** + * 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; + /** + * List of private endpoint connections on a server + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: ServerPrivateEndpointConnection[]; + /** Minimal TLS version. Allowed values: '1.0', '1.1', '1.2' */ + minimalTlsVersion?: string; + /** Whether or not public endpoint access is allowed for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' or 'SecuredByPerimeter' */ + publicNetworkAccess?: ServerPublicNetworkAccessFlag; + /** + * Whether or not existing server has a workspace created and if it allows connection from workspace + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly workspaceFeature?: ServerWorkspaceFeature; + /** The resource id of a user assigned identity to be used by default. */ + primaryUserAssignedIdentityId?: string; + /** The Client id used for cross tenant CMK scenario */ + federatedClientId?: string; + /** A CMK URI of the key to use for encryption. */ + keyId?: string; + /** The Azure Active Directory administrator of the server. This can only be used at server create time. If used for server update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. */ + administrators?: ServerExternalAdministrator; + /** Whether or not to restrict outbound network access for this server. Value is optional but if passed in, must be 'Enabled' or 'Disabled' */ + restrictOutboundNetworkAccess?: ServerNetworkAccessFlag; + /** + * Status of external governance. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly externalGovernanceStatus?: ExternalGovernanceStatus; +} + +/** An Azure SQL virtual cluster. */ +export interface VirtualCluster extends TrackedResource { + /** + * 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; + /** Virtual cluster version. */ + version?: string; + /** + * 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[]; +} + +/** A server firewall rule. */ +export interface FirewallRule extends ProxyResourceWithWritableName { + /** The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' for all Azure-internal IP addresses. */ + startIpAddress?: string; + /** The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to startIpAddress. Use value '0.0.0.0' for all Azure-internal IP addresses. */ + endIpAddress?: string; +} + +/** An IPv6 server firewall rule. */ +export interface IPv6FirewallRule extends ProxyResourceWithWritableName { + /** The start IP address of the firewall rule. Must be IPv6 format. */ + startIPv6Address?: string; + /** The end IP address of the firewall rule. Must be IPv6 format. Must be greater than or equal to startIpAddress. */ + endIPv6Address?: string; +} + +/** Known values of {@link DiffBackupIntervalInHours} that the service accepts. */ +export enum KnownDiffBackupIntervalInHours { + /** Twelve */ + Twelve = 12, + /** TwentyFour */ + TwentyFour = 24 +} + +/** + * Defines values for DiffBackupIntervalInHours. \ + * {@link KnownDiffBackupIntervalInHours} can be used interchangeably with DiffBackupIntervalInHours, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **12** \ + * **24** + */ +export type DiffBackupIntervalInHours = number; + +/** Known values of {@link ShortTermRetentionPolicyName} that the service accepts. */ +export enum KnownShortTermRetentionPolicyName { + /** Default */ + Default = "default" +} + +/** + * Defines values for ShortTermRetentionPolicyName. \ + * {@link KnownShortTermRetentionPolicyName} can be used interchangeably with ShortTermRetentionPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type ShortTermRetentionPolicyName = string; + +/** Known values of {@link DataMaskingPolicyName} that the service accepts. */ +export enum KnownDataMaskingPolicyName { + /** Default */ + Default = "Default" +} + +/** + * Defines values for DataMaskingPolicyName. \ + * {@link KnownDataMaskingPolicyName} can be used interchangeably with DataMaskingPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** + */ +export type DataMaskingPolicyName = string; + +/** Known values of {@link DataWarehouseUserActivityName} that the service accepts. */ +export enum KnownDataWarehouseUserActivityName { + /** Current */ + Current = "current" +} + +/** + * Defines values for DataWarehouseUserActivityName. \ + * {@link KnownDataWarehouseUserActivityName} can be used interchangeably with DataWarehouseUserActivityName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **current** + */ +export type DataWarehouseUserActivityName = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + /** User */ + User = "User", + /** Application */ + Application = "Application", + /** ManagedIdentity */ + ManagedIdentity = "ManagedIdentity", + /** Key */ + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link AdvancedThreatProtectionName} that the service accepts. */ +export enum KnownAdvancedThreatProtectionName { + /** Default */ + Default = "Default" +} + +/** + * Defines values for AdvancedThreatProtectionName. \ + * {@link KnownAdvancedThreatProtectionName} can be used interchangeably with AdvancedThreatProtectionName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** + */ +export type AdvancedThreatProtectionName = string; + +/** Known values of {@link RecommendedActionCurrentState} that the service accepts. */ +export enum KnownRecommendedActionCurrentState { + /** Active */ + Active = "Active", + /** Pending */ + Pending = "Pending", + /** Executing */ + Executing = "Executing", + /** Verifying */ + Verifying = "Verifying", + /** PendingRevert */ + PendingRevert = "PendingRevert", + /** RevertCancelled */ + RevertCancelled = "RevertCancelled", + /** Reverting */ + Reverting = "Reverting", + /** Reverted */ + Reverted = "Reverted", + /** Ignored */ + Ignored = "Ignored", + /** Expired */ + Expired = "Expired", + /** Monitoring */ + Monitoring = "Monitoring", + /** Resolved */ + Resolved = "Resolved", + /** Success */ + Success = "Success", + /** Error */ + Error = "Error" +} + +/** + * Defines values for RecommendedActionCurrentState. \ + * {@link KnownRecommendedActionCurrentState} can be used interchangeably with RecommendedActionCurrentState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Active** \ + * **Pending** \ + * **Executing** \ + * **Verifying** \ + * **PendingRevert** \ + * **RevertCancelled** \ + * **Reverting** \ + * **Reverted** \ + * **Ignored** \ + * **Expired** \ + * **Monitoring** \ + * **Resolved** \ + * **Success** \ + * **Error** + */ +export type RecommendedActionCurrentState = string; + +/** Known values of {@link ColumnDataType} that the service accepts. */ +export enum KnownColumnDataType { + /** Image */ + Image = "image", + /** Text */ + Text = "text", + /** Uniqueidentifier */ + Uniqueidentifier = "uniqueidentifier", + /** Date */ + Date = "date", + /** Time */ + Time = "time", + /** Datetime2 */ + Datetime2 = "datetime2", + /** Datetimeoffset */ + Datetimeoffset = "datetimeoffset", + /** Tinyint */ + Tinyint = "tinyint", + /** Smallint */ + Smallint = "smallint", + /** Int */ + Int = "int", + /** Smalldatetime */ + Smalldatetime = "smalldatetime", + /** Real */ + Real = "real", + /** Money */ + Money = "money", + /** Datetime */ + Datetime = "datetime", + /** Float */ + Float = "float", + /** SqlVariant */ + SqlVariant = "sql_variant", + /** Ntext */ + Ntext = "ntext", + /** Bit */ + Bit = "bit", + /** Decimal */ + Decimal = "decimal", + /** Numeric */ + Numeric = "numeric", + /** Smallmoney */ + Smallmoney = "smallmoney", + /** Bigint */ + Bigint = "bigint", + /** Hierarchyid */ + Hierarchyid = "hierarchyid", + /** Geometry */ + Geometry = "geometry", + /** Geography */ + Geography = "geography", + /** Varbinary */ + Varbinary = "varbinary", + /** Varchar */ + Varchar = "varchar", + /** Binary */ + Binary = "binary", + /** Char */ + Char = "char", + /** Timestamp */ + Timestamp = "timestamp", + /** Nvarchar */ + Nvarchar = "nvarchar", + /** Nchar */ + Nchar = "nchar", + /** Xml */ + Xml = "xml", + /** Sysname */ + Sysname = "sysname" +} + +/** + * Defines values for ColumnDataType. \ + * {@link KnownColumnDataType} can be used interchangeably with ColumnDataType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **image** \ + * **text** \ + * **uniqueidentifier** \ + * **date** \ + * **time** \ + * **datetime2** \ + * **datetimeoffset** \ + * **tinyint** \ + * **smallint** \ + * **int** \ + * **smalldatetime** \ + * **real** \ + * **money** \ + * **datetime** \ + * **float** \ + * **sql_variant** \ + * **ntext** \ + * **bit** \ + * **decimal** \ + * **numeric** \ + * **smallmoney** \ + * **bigint** \ + * **hierarchyid** \ + * **geometry** \ + * **geography** \ + * **varbinary** \ + * **varchar** \ + * **binary** \ + * **char** \ + * **timestamp** \ + * **nvarchar** \ + * **nchar** \ + * **xml** \ + * **sysname** + */ +export type ColumnDataType = string; + +/** Known values of {@link TableTemporalType} that the service accepts. */ +export enum KnownTableTemporalType { + /** NonTemporalTable */ + NonTemporalTable = "NonTemporalTable", + /** HistoryTable */ + HistoryTable = "HistoryTable", + /** SystemVersionedTemporalTable */ + SystemVersionedTemporalTable = "SystemVersionedTemporalTable" +} + +/** + * Defines values for TableTemporalType. \ + * {@link KnownTableTemporalType} can be used interchangeably with TableTemporalType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NonTemporalTable** \ + * **HistoryTable** \ + * **SystemVersionedTemporalTable** + */ +export type TableTemporalType = string; + +/** Known values of {@link EncryptionProtectorName} that the service accepts. */ +export enum KnownEncryptionProtectorName { + /** Current */ + Current = "current" +} + +/** + * Defines values for EncryptionProtectorName. \ + * {@link KnownEncryptionProtectorName} can be used interchangeably with EncryptionProtectorName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **current** + */ +export type EncryptionProtectorName = string; + +/** Known values of {@link OperationMode} that the service accepts. */ +export enum KnownOperationMode { + /** PolybaseImport */ + PolybaseImport = "PolybaseImport", + /** Import */ + Import = "Import", + /** Export */ + Export = "Export" +} + +/** + * Defines values for OperationMode. \ + * {@link KnownOperationMode} can be used interchangeably with OperationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PolybaseImport** \ + * **Import** \ + * **Export** + */ +export type OperationMode = string; + +/** Known values of {@link StorageKeyType} that the service accepts. */ +export enum KnownStorageKeyType { + /** SharedAccessKey */ + SharedAccessKey = "SharedAccessKey", + /** StorageAccessKey */ + StorageAccessKey = "StorageAccessKey" +} + +/** + * Defines values for StorageKeyType. \ + * {@link KnownStorageKeyType} can be used interchangeably with StorageKeyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SharedAccessKey** \ + * **StorageAccessKey** + */ +export type StorageKeyType = string; + +/** Known values of {@link ManagementOperationState} that the service accepts. */ +export enum KnownManagementOperationState { + /** Pending */ + Pending = "Pending", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** CancelInProgress */ + CancelInProgress = "CancelInProgress", + /** Cancelled */ + Cancelled = "Cancelled" +} + +/** + * Defines values for ManagementOperationState. \ + * {@link KnownManagementOperationState} can be used interchangeably with ManagementOperationState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pending** \ + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **CancelInProgress** \ + * **Cancelled** + */ +export type ManagementOperationState = string; + +/** Known values of {@link Phase} that the service accepts. */ +export enum KnownPhase { + /** Copying */ + Copying = "Copying", + /** Catchup */ + Catchup = "Catchup", + /** WaitingForCutover */ + WaitingForCutover = "WaitingForCutover", + /** CutoverInProgress */ + CutoverInProgress = "CutoverInProgress" +} + +/** + * Defines values for Phase. \ + * {@link KnownPhase} can be used interchangeably with Phase, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Copying** \ + * **Catchup** \ + * **WaitingForCutover** \ + * **CutoverInProgress** + */ +export type Phase = string; + +/** Known values of {@link SecurityAlertPolicyName} that the service accepts. */ +export enum KnownSecurityAlertPolicyName { + /** Default */ + Default = "default" +} + +/** + * Defines values for SecurityAlertPolicyName. \ + * {@link KnownSecurityAlertPolicyName} can be used interchangeably with SecurityAlertPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type SecurityAlertPolicyName = string; + +/** Known values of {@link VulnerabilityAssessmentName} that the service accepts. */ +export enum KnownVulnerabilityAssessmentName { + /** Default */ + Default = "default" +} + +/** + * Defines values for VulnerabilityAssessmentName. \ + * {@link KnownVulnerabilityAssessmentName} can be used interchangeably with VulnerabilityAssessmentName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type VulnerabilityAssessmentName = string; + +/** Known values of {@link BaselineName} that the service accepts. */ +export enum KnownBaselineName { + /** Default */ + Default = "default" +} + +/** + * Defines values for BaselineName. \ + * {@link KnownBaselineName} can be used interchangeably with BaselineName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type BaselineName = string; + +/** Known values of {@link SQLVulnerabilityAssessmentName} that the service accepts. */ +export enum KnownSQLVulnerabilityAssessmentName { + /** Default */ + Default = "default" +} + +/** + * Defines values for SQLVulnerabilityAssessmentName. \ + * {@link KnownSQLVulnerabilityAssessmentName} can be used interchangeably with SQLVulnerabilityAssessmentName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type SQLVulnerabilityAssessmentName = string; + +/** Known values of {@link RuleStatus} that the service accepts. */ +export enum KnownRuleStatus { + /** NonFinding */ + NonFinding = "NonFinding", + /** Finding */ + Finding = "Finding", + /** InternalError */ + InternalError = "InternalError" +} + +/** + * Defines values for RuleStatus. \ + * {@link KnownRuleStatus} can be used interchangeably with RuleStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NonFinding** \ + * **Finding** \ + * **InternalError** + */ +export type RuleStatus = string; + +/** Known values of {@link RuleSeverity} that the service accepts. */ +export enum KnownRuleSeverity { + /** High */ + High = "High", + /** Medium */ + Medium = "Medium", + /** Low */ + Low = "Low", + /** Informational */ + Informational = "Informational", + /** Obsolete */ + Obsolete = "Obsolete" +} + +/** + * Defines values for RuleSeverity. \ + * {@link KnownRuleSeverity} can be used interchangeably with RuleSeverity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **High** \ + * **Medium** \ + * **Low** \ + * **Informational** \ + * **Obsolete** + */ +export type RuleSeverity = string; + +/** Known values of {@link RuleType} that the service accepts. */ +export enum KnownRuleType { + /** Binary */ + Binary = "Binary", + /** BaselineExpected */ + BaselineExpected = "BaselineExpected", + /** PositiveList */ + PositiveList = "PositiveList", + /** NegativeList */ + NegativeList = "NegativeList" +} + +/** + * Defines values for RuleType. \ + * {@link KnownRuleType} can be used interchangeably with RuleType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Binary** \ + * **BaselineExpected** \ + * **PositiveList** \ + * **NegativeList** + */ +export type RuleType = string; + +/** Known values of {@link VulnerabilityAssessmentScanTriggerType} that the service accepts. */ +export enum KnownVulnerabilityAssessmentScanTriggerType { + /** OnDemand */ + OnDemand = "OnDemand", + /** Recurring */ + Recurring = "Recurring" +} + +/** + * Defines values for VulnerabilityAssessmentScanTriggerType. \ + * {@link KnownVulnerabilityAssessmentScanTriggerType} can be used interchangeably with VulnerabilityAssessmentScanTriggerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **OnDemand** \ + * **Recurring** + */ +export type VulnerabilityAssessmentScanTriggerType = string; + +/** Known values of {@link VulnerabilityAssessmentScanState} that the service accepts. */ +export enum KnownVulnerabilityAssessmentScanState { + /** Passed */ + Passed = "Passed", + /** Failed */ + Failed = "Failed", + /** FailedToRun */ + FailedToRun = "FailedToRun", + /** InProgress */ + InProgress = "InProgress" +} + +/** + * Defines values for VulnerabilityAssessmentScanState. \ + * {@link KnownVulnerabilityAssessmentScanState} can be used interchangeably with VulnerabilityAssessmentScanState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Passed** \ + * **Failed** \ + * **FailedToRun** \ + * **InProgress** + */ +export type VulnerabilityAssessmentScanState = string; + +/** Known values of {@link SqlVulnerabilityAssessmentName} that the service accepts. */ +export enum KnownSqlVulnerabilityAssessmentName { + /** Default */ + Default = "default" +} + +/** + * Defines values for SqlVulnerabilityAssessmentName. \ + * {@link KnownSqlVulnerabilityAssessmentName} can be used interchangeably with SqlVulnerabilityAssessmentName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type SqlVulnerabilityAssessmentName = string; + +/** Known values of {@link DatabaseIdentityType} that the service accepts. */ +export enum KnownDatabaseIdentityType { + /** None */ + None = "None", + /** UserAssigned */ + UserAssigned = "UserAssigned" +} + +/** + * Defines values for DatabaseIdentityType. \ + * {@link KnownDatabaseIdentityType} can be used interchangeably with DatabaseIdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **UserAssigned** + */ +export type DatabaseIdentityType = string; + +/** Known values of {@link CreateMode} that the service accepts. */ +export enum KnownCreateMode { + /** Default */ + Default = "Default", + /** Copy */ + Copy = "Copy", + /** Secondary */ + Secondary = "Secondary", + /** PointInTimeRestore */ + PointInTimeRestore = "PointInTimeRestore", + /** Restore */ + Restore = "Restore", + /** Recovery */ + Recovery = "Recovery", + /** RestoreExternalBackup */ + RestoreExternalBackup = "RestoreExternalBackup", + /** RestoreExternalBackupSecondary */ + RestoreExternalBackupSecondary = "RestoreExternalBackupSecondary", + /** RestoreLongTermRetentionBackup */ + RestoreLongTermRetentionBackup = "RestoreLongTermRetentionBackup", + /** OnlineSecondary */ + OnlineSecondary = "OnlineSecondary" +} + +/** + * Defines values for CreateMode. \ + * {@link KnownCreateMode} can be used interchangeably with CreateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **Copy** \ + * **Secondary** \ + * **PointInTimeRestore** \ + * **Restore** \ + * **Recovery** \ + * **RestoreExternalBackup** \ + * **RestoreExternalBackupSecondary** \ + * **RestoreLongTermRetentionBackup** \ + * **OnlineSecondary** + */ +export type CreateMode = string; + +/** Known values of {@link SampleName} that the service accepts. */ +export enum KnownSampleName { + /** AdventureWorksLT */ + AdventureWorksLT = "AdventureWorksLT", + /** WideWorldImportersStd */ + WideWorldImportersStd = "WideWorldImportersStd", + /** WideWorldImportersFull */ + WideWorldImportersFull = "WideWorldImportersFull" +} + +/** + * Defines values for SampleName. \ + * {@link KnownSampleName} can be used interchangeably with SampleName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AdventureWorksLT** \ + * **WideWorldImportersStd** \ + * **WideWorldImportersFull** + */ +export type SampleName = string; + +/** Known values of {@link DatabaseStatus} that the service accepts. */ +export enum KnownDatabaseStatus { + /** Online */ + Online = "Online", + /** Restoring */ + Restoring = "Restoring", + /** RecoveryPending */ + RecoveryPending = "RecoveryPending", + /** Recovering */ + Recovering = "Recovering", + /** Suspect */ + Suspect = "Suspect", + /** Offline */ + Offline = "Offline", + /** Standby */ + Standby = "Standby", + /** Shutdown */ + Shutdown = "Shutdown", + /** EmergencyMode */ + EmergencyMode = "EmergencyMode", + /** AutoClosed */ + AutoClosed = "AutoClosed", + /** Copying */ + Copying = "Copying", + /** Creating */ + Creating = "Creating", + /** Inaccessible */ + Inaccessible = "Inaccessible", + /** OfflineSecondary */ + OfflineSecondary = "OfflineSecondary", + /** Pausing */ + Pausing = "Pausing", + /** Paused */ + Paused = "Paused", + /** Resuming */ + Resuming = "Resuming", + /** Scaling */ + Scaling = "Scaling", + /** OfflineChangingDwPerformanceTiers */ + OfflineChangingDwPerformanceTiers = "OfflineChangingDwPerformanceTiers", + /** OnlineChangingDwPerformanceTiers */ + OnlineChangingDwPerformanceTiers = "OnlineChangingDwPerformanceTiers", + /** Disabled */ + Disabled = "Disabled", + /** Stopping */ + Stopping = "Stopping", + /** Stopped */ + Stopped = "Stopped", + /** Starting */ + Starting = "Starting" +} + +/** + * Defines values for DatabaseStatus. \ + * {@link KnownDatabaseStatus} can be used interchangeably with DatabaseStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Online** \ + * **Restoring** \ + * **RecoveryPending** \ + * **Recovering** \ + * **Suspect** \ + * **Offline** \ + * **Standby** \ + * **Shutdown** \ + * **EmergencyMode** \ + * **AutoClosed** \ + * **Copying** \ + * **Creating** \ + * **Inaccessible** \ + * **OfflineSecondary** \ + * **Pausing** \ + * **Paused** \ + * **Resuming** \ + * **Scaling** \ + * **OfflineChangingDwPerformanceTiers** \ + * **OnlineChangingDwPerformanceTiers** \ + * **Disabled** \ + * **Stopping** \ + * **Stopped** \ + * **Starting** + */ +export type DatabaseStatus = string; + +/** Known values of {@link CatalogCollationType} that the service accepts. */ +export enum KnownCatalogCollationType { + /** DatabaseDefault */ + DatabaseDefault = "DATABASE_DEFAULT", + /** SQLLatin1GeneralCP1CIAS */ + SQLLatin1GeneralCP1CIAS = "SQL_Latin1_General_CP1_CI_AS" +} + +/** + * Defines values for CatalogCollationType. \ + * {@link KnownCatalogCollationType} can be used interchangeably with CatalogCollationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DATABASE_DEFAULT** \ + * **SQL_Latin1_General_CP1_CI_AS** + */ +export type CatalogCollationType = string; + +/** Known values of {@link DatabaseLicenseType} that the service accepts. */ +export enum KnownDatabaseLicenseType { + /** LicenseIncluded */ + LicenseIncluded = "LicenseIncluded", + /** BasePrice */ + BasePrice = "BasePrice" +} + +/** + * Defines values for DatabaseLicenseType. \ + * {@link KnownDatabaseLicenseType} can be used interchangeably with DatabaseLicenseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LicenseIncluded** \ + * **BasePrice** + */ +export type DatabaseLicenseType = string; + +/** Known values of {@link DatabaseReadScale} that the service accepts. */ +export enum KnownDatabaseReadScale { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for DatabaseReadScale. \ + * {@link KnownDatabaseReadScale} can be used interchangeably with DatabaseReadScale, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type DatabaseReadScale = string; + +/** Known values of {@link SecondaryType} that the service accepts. */ +export enum KnownSecondaryType { + /** Geo */ + Geo = "Geo", + /** Named */ + Named = "Named", + /** Standby */ + Standby = "Standby" +} + +/** + * Defines values for SecondaryType. \ + * {@link KnownSecondaryType} can be used interchangeably with SecondaryType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Geo** \ + * **Named** \ + * **Standby** + */ +export type SecondaryType = string; + +/** Known values of {@link BackupStorageRedundancy} that the service accepts. */ +export enum KnownBackupStorageRedundancy { + /** Geo */ + Geo = "Geo", + /** Local */ + Local = "Local", + /** Zone */ + Zone = "Zone", + /** GeoZone */ + GeoZone = "GeoZone" +} + +/** + * Defines values for BackupStorageRedundancy. \ + * {@link KnownBackupStorageRedundancy} can be used interchangeably with BackupStorageRedundancy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Geo** \ + * **Local** \ + * **Zone** \ + * **GeoZone** + */ +export type BackupStorageRedundancy = string; + +/** Known values of {@link DatabaseKeyType} that the service accepts. */ +export enum KnownDatabaseKeyType { + /** AzureKeyVault */ + AzureKeyVault = "AzureKeyVault" +} + +/** + * Defines values for DatabaseKeyType. \ + * {@link KnownDatabaseKeyType} can be used interchangeably with DatabaseKeyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **AzureKeyVault** + */ +export type DatabaseKeyType = string; + +/** Known values of {@link AlwaysEncryptedEnclaveType} that the service accepts. */ +export enum KnownAlwaysEncryptedEnclaveType { + /** Default */ + Default = "Default", + /** VBS */ + VBS = "VBS" +} + +/** + * Defines values for AlwaysEncryptedEnclaveType. \ + * {@link KnownAlwaysEncryptedEnclaveType} can be used interchangeably with AlwaysEncryptedEnclaveType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **VBS** + */ +export type AlwaysEncryptedEnclaveType = string; + +/** Known values of {@link AvailabilityZoneType} that the service accepts. */ +export enum KnownAvailabilityZoneType { + /** NoPreference */ + NoPreference = "NoPreference", + /** One */ + One = "1", + /** Two */ + Two = "2", + /** Three */ + Three = "3" +} + +/** + * Defines values for AvailabilityZoneType. \ + * {@link KnownAvailabilityZoneType} can be used interchangeably with AvailabilityZoneType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NoPreference** \ + * **1** \ + * **2** \ + * **3** + */ +export type AvailabilityZoneType = string; + +/** Known values of {@link ReplicaType} that the service accepts. */ +export enum KnownReplicaType { + /** Primary */ + Primary = "Primary", + /** ReadableSecondary */ + ReadableSecondary = "ReadableSecondary" +} + +/** + * Defines values for ReplicaType. \ + * {@link KnownReplicaType} can be used interchangeably with ReplicaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **ReadableSecondary** + */ +export type ReplicaType = string; + +/** Known values of {@link ReplicationMode} that the service accepts. */ +export enum KnownReplicationMode { + /** Async */ + Async = "Async", + /** Sync */ + Sync = "Sync" +} + +/** + * Defines values for ReplicationMode. \ + * {@link KnownReplicationMode} can be used interchangeably with ReplicationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Async** \ + * **Sync** + */ +export type ReplicationMode = string; + +/** Known values of {@link InstanceRole} that the service accepts. */ +export enum KnownInstanceRole { + /** Primary */ + Primary = "Primary", + /** Secondary */ + Secondary = "Secondary" +} + +/** + * Defines values for InstanceRole. \ + * {@link KnownInstanceRole} can be used interchangeably with InstanceRole, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **Secondary** + */ +export type InstanceRole = string; + +/** Known values of {@link RoleChangeType} that the service accepts. */ +export enum KnownRoleChangeType { + /** Forced */ + Forced = "Forced", + /** Planned */ + Planned = "Planned" +} + +/** + * Defines values for RoleChangeType. \ + * {@link KnownRoleChangeType} can be used interchangeably with RoleChangeType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Forced** \ + * **Planned** + */ +export type RoleChangeType = string; + +/** Known values of {@link ElasticPoolState} that the service accepts. */ +export enum KnownElasticPoolState { + /** Creating */ + Creating = "Creating", + /** Ready */ + Ready = "Ready", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for ElasticPoolState. \ + * {@link KnownElasticPoolState} can be used interchangeably with ElasticPoolState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Ready** \ + * **Disabled** + */ +export type ElasticPoolState = string; + +/** Known values of {@link ElasticPoolLicenseType} that the service accepts. */ +export enum KnownElasticPoolLicenseType { + /** LicenseIncluded */ + LicenseIncluded = "LicenseIncluded", + /** BasePrice */ + BasePrice = "BasePrice" +} + +/** + * Defines values for ElasticPoolLicenseType. \ + * {@link KnownElasticPoolLicenseType} can be used interchangeably with ElasticPoolLicenseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LicenseIncluded** \ + * **BasePrice** + */ +export type ElasticPoolLicenseType = string; + +/** Known values of {@link ServerKeyType} that the service accepts. */ +export enum KnownServerKeyType { + /** ServiceManaged */ + ServiceManaged = "ServiceManaged", + /** AzureKeyVault */ + AzureKeyVault = "AzureKeyVault" +} + +/** + * Defines values for ServerKeyType. \ + * {@link KnownServerKeyType} can be used interchangeably with ServerKeyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ServiceManaged** \ + * **AzureKeyVault** + */ +export type ServerKeyType = string; + +/** Known values of {@link ReadWriteEndpointFailoverPolicy} that the service accepts. */ +export enum KnownReadWriteEndpointFailoverPolicy { + /** Manual */ + Manual = "Manual", + /** Automatic */ + Automatic = "Automatic" +} + +/** + * Defines values for ReadWriteEndpointFailoverPolicy. \ + * {@link KnownReadWriteEndpointFailoverPolicy} can be used interchangeably with ReadWriteEndpointFailoverPolicy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Manual** \ + * **Automatic** + */ +export type ReadWriteEndpointFailoverPolicy = string; + +/** Known values of {@link ReadOnlyEndpointFailoverPolicy} that the service accepts. */ +export enum KnownReadOnlyEndpointFailoverPolicy { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled" +} + +/** + * Defines values for ReadOnlyEndpointFailoverPolicy. \ + * {@link KnownReadOnlyEndpointFailoverPolicy} can be used interchangeably with ReadOnlyEndpointFailoverPolicy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** + */ +export type ReadOnlyEndpointFailoverPolicy = string; + +/** Known values of {@link FailoverGroupReplicationRole} that the service accepts. */ +export enum KnownFailoverGroupReplicationRole { + /** Primary */ + Primary = "Primary", + /** Secondary */ + Secondary = "Secondary" +} + +/** + * Defines values for FailoverGroupReplicationRole. \ + * {@link KnownFailoverGroupReplicationRole} can be used interchangeably with FailoverGroupReplicationRole, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **Secondary** + */ +export type FailoverGroupReplicationRole = string; + +/** Known values of {@link GeoBackupPolicyName} that the service accepts. */ +export enum KnownGeoBackupPolicyName { + /** Default */ + Default = "Default" +} + +/** + * Defines values for GeoBackupPolicyName. \ + * {@link KnownGeoBackupPolicyName} can be used interchangeably with GeoBackupPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** + */ +export type GeoBackupPolicyName = string; + +/** Known values of {@link SecondaryInstanceType} that the service accepts. */ +export enum KnownSecondaryInstanceType { + /** Geo */ + Geo = "Geo", + /** Standby */ + Standby = "Standby" +} + +/** + * Defines values for SecondaryInstanceType. \ + * {@link KnownSecondaryInstanceType} can be used interchangeably with SecondaryInstanceType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Geo** \ + * **Standby** + */ +export type SecondaryInstanceType = string; + +/** Known values of {@link InstanceFailoverGroupReplicationRole} that the service accepts. */ +export enum KnownInstanceFailoverGroupReplicationRole { + /** Primary */ + Primary = "Primary", + /** Secondary */ + Secondary = "Secondary" +} + +/** + * Defines values for InstanceFailoverGroupReplicationRole. \ + * {@link KnownInstanceFailoverGroupReplicationRole} can be used interchangeably with InstanceFailoverGroupReplicationRole, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Primary** \ + * **Secondary** + */ +export type InstanceFailoverGroupReplicationRole = string; + +/** Known values of {@link InstancePoolLicenseType} that the service accepts. */ +export enum KnownInstancePoolLicenseType { + /** LicenseIncluded */ + LicenseIncluded = "LicenseIncluded", + /** BasePrice */ + BasePrice = "BasePrice" +} + +/** + * Defines values for InstancePoolLicenseType. \ + * {@link KnownInstancePoolLicenseType} can be used interchangeably with InstancePoolLicenseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LicenseIncluded** \ + * **BasePrice** + */ +export type InstancePoolLicenseType = string; + +/** Known values of {@link JobAgentState} that the service accepts. */ +export enum KnownJobAgentState { + /** Creating */ + Creating = "Creating", + /** Ready */ + Ready = "Ready", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Disabled */ + Disabled = "Disabled" +} + +/** + * Defines values for JobAgentState. \ + * {@link KnownJobAgentState} can be used interchangeably with JobAgentState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Creating** \ + * **Ready** \ + * **Updating** \ + * **Deleting** \ + * **Disabled** + */ +export type JobAgentState = string; + +/** Known values of {@link JobExecutionLifecycle} that the service accepts. */ +export enum KnownJobExecutionLifecycle { + /** Created */ + Created = "Created", + /** InProgress */ + InProgress = "InProgress", + /** WaitingForChildJobExecutions */ + WaitingForChildJobExecutions = "WaitingForChildJobExecutions", + /** WaitingForRetry */ + WaitingForRetry = "WaitingForRetry", + /** Succeeded */ + Succeeded = "Succeeded", + /** SucceededWithSkipped */ + SucceededWithSkipped = "SucceededWithSkipped", + /** Failed */ + Failed = "Failed", + /** TimedOut */ + TimedOut = "TimedOut", + /** Canceled */ + Canceled = "Canceled", + /** Skipped */ + Skipped = "Skipped" +} + +/** + * Defines values for JobExecutionLifecycle. \ + * {@link KnownJobExecutionLifecycle} can be used interchangeably with JobExecutionLifecycle, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Created** \ + * **InProgress** \ + * **WaitingForChildJobExecutions** \ + * **WaitingForRetry** \ + * **Succeeded** \ + * **SucceededWithSkipped** \ + * **Failed** \ + * **TimedOut** \ + * **Canceled** \ + * **Skipped** + */ +export type JobExecutionLifecycle = string; + +/** Known values of {@link ProvisioningState} that the service accepts. */ +export enum KnownProvisioningState { + /** Created */ + Created = "Created", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for ProvisioningState. \ + * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Created** \ + * **InProgress** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** + */ +export type ProvisioningState = string; + +/** Known values of {@link JobTargetType} that the service accepts. */ +export enum KnownJobTargetType { + /** TargetGroup */ + TargetGroup = "TargetGroup", + /** SqlDatabase */ + SqlDatabase = "SqlDatabase", + /** SqlElasticPool */ + SqlElasticPool = "SqlElasticPool", + /** SqlShardMap */ + SqlShardMap = "SqlShardMap", + /** SqlServer */ + SqlServer = "SqlServer" +} + +/** + * Defines values for JobTargetType. \ + * {@link KnownJobTargetType} can be used interchangeably with JobTargetType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TargetGroup** \ + * **SqlDatabase** \ + * **SqlElasticPool** \ + * **SqlShardMap** \ + * **SqlServer** + */ +export type JobTargetType = string; + +/** Known values of {@link JobStepActionType} that the service accepts. */ +export enum KnownJobStepActionType { + /** TSql */ + TSql = "TSql" +} + +/** + * Defines values for JobStepActionType. \ + * {@link KnownJobStepActionType} can be used interchangeably with JobStepActionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **TSql** + */ +export type JobStepActionType = string; + +/** Known values of {@link JobStepActionSource} that the service accepts. */ +export enum KnownJobStepActionSource { + /** Inline */ + Inline = "Inline" +} + +/** + * Defines values for JobStepActionSource. \ + * {@link KnownJobStepActionSource} can be used interchangeably with JobStepActionSource, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inline** + */ +export type JobStepActionSource = string; + +/** Known values of {@link JobStepOutputType} that the service accepts. */ +export enum KnownJobStepOutputType { + /** SqlDatabase */ + SqlDatabase = "SqlDatabase" +} + +/** + * Defines values for JobStepOutputType. \ + * {@link KnownJobStepOutputType} can be used interchangeably with JobStepOutputType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **SqlDatabase** + */ +export type JobStepOutputType = string; + +/** Known values of {@link LedgerDigestUploadsName} that the service accepts. */ +export enum KnownLedgerDigestUploadsName { + /** Current */ + Current = "current" +} + +/** + * Defines values for LedgerDigestUploadsName. \ + * {@link KnownLedgerDigestUploadsName} can be used interchangeably with LedgerDigestUploadsName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **current** + */ +export type LedgerDigestUploadsName = string; + +/** Known values of {@link CapabilityGroup} that the service accepts. */ +export enum KnownCapabilityGroup { + /** SupportedEditions */ + SupportedEditions = "supportedEditions", + /** SupportedElasticPoolEditions */ + SupportedElasticPoolEditions = "supportedElasticPoolEditions", + /** SupportedManagedInstanceVersions */ + SupportedManagedInstanceVersions = "supportedManagedInstanceVersions", + /** SupportedInstancePoolEditions */ + SupportedInstancePoolEditions = "supportedInstancePoolEditions", + /** SupportedManagedInstanceEditions */ + SupportedManagedInstanceEditions = "supportedManagedInstanceEditions" +} + +/** + * Defines values for CapabilityGroup. \ + * {@link KnownCapabilityGroup} can be used interchangeably with CapabilityGroup, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **supportedEditions** \ + * **supportedElasticPoolEditions** \ + * **supportedManagedInstanceVersions** \ + * **supportedInstancePoolEditions** \ + * **supportedManagedInstanceEditions** + */ +export type CapabilityGroup = string; + +/** Known values of {@link MaxSizeUnit} that the service accepts. */ +export enum KnownMaxSizeUnit { + /** Megabytes */ + Megabytes = "Megabytes", + /** Gigabytes */ + Gigabytes = "Gigabytes", + /** Terabytes */ + Terabytes = "Terabytes", + /** Petabytes */ + Petabytes = "Petabytes" +} + +/** + * Defines values for MaxSizeUnit. \ + * {@link KnownMaxSizeUnit} can be used interchangeably with MaxSizeUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Megabytes** \ + * **Gigabytes** \ + * **Terabytes** \ + * **Petabytes** + */ +export type MaxSizeUnit = string; + +/** Known values of {@link LogSizeUnit} that the service accepts. */ +export enum KnownLogSizeUnit { + /** Megabytes */ + Megabytes = "Megabytes", + /** Gigabytes */ + Gigabytes = "Gigabytes", + /** Terabytes */ + Terabytes = "Terabytes", + /** Petabytes */ + Petabytes = "Petabytes", + /** Percent */ + Percent = "Percent" +} + +/** + * Defines values for LogSizeUnit. \ + * {@link KnownLogSizeUnit} can be used interchangeably with LogSizeUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Megabytes** \ + * **Gigabytes** \ + * **Terabytes** \ + * **Petabytes** \ + * **Percent** + */ +export type LogSizeUnit = string; + +/** Known values of {@link PerformanceLevelUnit} that the service accepts. */ +export enum KnownPerformanceLevelUnit { + /** DTU */ + DTU = "DTU", + /** VCores */ + VCores = "VCores" +} + +/** + * Defines values for PerformanceLevelUnit. \ + * {@link KnownPerformanceLevelUnit} can be used interchangeably with PerformanceLevelUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **DTU** \ + * **VCores** + */ +export type PerformanceLevelUnit = string; + +/** Known values of {@link PauseDelayTimeUnit} that the service accepts. */ +export enum KnownPauseDelayTimeUnit { + /** Minutes */ + Minutes = "Minutes" +} + +/** + * Defines values for PauseDelayTimeUnit. \ + * {@link KnownPauseDelayTimeUnit} can be used interchangeably with PauseDelayTimeUnit, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Minutes** + */ +export type PauseDelayTimeUnit = string; + +/** Known values of {@link StorageCapabilityStorageAccountType} that the service accepts. */ +export enum KnownStorageCapabilityStorageAccountType { + /** GRS */ + GRS = "GRS", + /** LRS */ + LRS = "LRS", + /** ZRS */ + ZRS = "ZRS", + /** Gzrs */ + Gzrs = "GZRS" +} + +/** + * Defines values for StorageCapabilityStorageAccountType. \ + * {@link KnownStorageCapabilityStorageAccountType} can be used interchangeably with StorageCapabilityStorageAccountType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GRS** \ + * **LRS** \ + * **ZRS** \ + * **GZRS** + */ +export type StorageCapabilityStorageAccountType = string; + +/** Known values of {@link DatabaseState} that the service accepts. */ +export enum KnownDatabaseState { + /** All */ + All = "All", + /** Live */ + Live = "Live", + /** Deleted */ + Deleted = "Deleted" +} + +/** + * Defines values for DatabaseState. \ + * {@link KnownDatabaseState} can be used interchangeably with DatabaseState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All** \ + * **Live** \ + * **Deleted** + */ +export type DatabaseState = string; + +/** Known values of {@link LongTermRetentionPolicyName} that the service accepts. */ +export enum KnownLongTermRetentionPolicyName { + /** Default */ + Default = "default" +} + +/** + * Defines values for LongTermRetentionPolicyName. \ + * {@link KnownLongTermRetentionPolicyName} can be used interchangeably with LongTermRetentionPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type LongTermRetentionPolicyName = string; + +/** Known values of {@link DayOfWeek} that the service accepts. */ +export enum KnownDayOfWeek { + /** Sunday */ + Sunday = "Sunday", + /** Monday */ + Monday = "Monday", + /** Tuesday */ + Tuesday = "Tuesday", + /** Wednesday */ + Wednesday = "Wednesday", + /** Thursday */ + Thursday = "Thursday", + /** Friday */ + Friday = "Friday", + /** Saturday */ + Saturday = "Saturday" +} + +/** + * Defines values for DayOfWeek. \ + * {@link KnownDayOfWeek} can be used interchangeably with DayOfWeek, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Sunday** \ + * **Monday** \ + * **Tuesday** \ + * **Wednesday** \ + * **Thursday** \ + * **Friday** \ + * **Saturday** + */ +export type DayOfWeek = string; + +/** Known values of {@link ManagedShortTermRetentionPolicyName} that the service accepts. */ +export enum KnownManagedShortTermRetentionPolicyName { + /** Default */ + Default = "default" +} + +/** + * Defines values for ManagedShortTermRetentionPolicyName. \ + * {@link KnownManagedShortTermRetentionPolicyName} can be used interchangeably with ManagedShortTermRetentionPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type ManagedShortTermRetentionPolicyName = string; + +/** Known values of {@link MoveOperationMode} that the service accepts. */ +export enum KnownMoveOperationMode { + /** Move */ + Move = "Move", + /** Copy */ + Copy = "Copy" +} + +/** + * Defines values for MoveOperationMode. \ + * {@link KnownMoveOperationMode} can be used interchangeably with MoveOperationMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Move** \ + * **Copy** + */ +export type MoveOperationMode = string; + +/** Known values of {@link QueryTimeGrainType} that the service accepts. */ +export enum KnownQueryTimeGrainType { + /** PT1H */ + PT1H = "PT1H", + /** P1D */ + P1D = "P1D" +} + +/** + * Defines values for QueryTimeGrainType. \ + * {@link KnownQueryTimeGrainType} can be used interchangeably with QueryTimeGrainType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PT1H** \ + * **P1D** + */ +export type QueryTimeGrainType = string; + +/** Known values of {@link QueryMetricUnitType} that the service accepts. */ +export enum KnownQueryMetricUnitType { + /** Percentage */ + Percentage = "percentage", + /** KB */ + KB = "KB", + /** Microseconds */ + Microseconds = "microseconds", + /** Count */ + Count = "count" +} + +/** + * Defines values for QueryMetricUnitType. \ + * {@link KnownQueryMetricUnitType} can be used interchangeably with QueryMetricUnitType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **percentage** \ + * **KB** \ + * **microseconds** \ + * **count** + */ +export type QueryMetricUnitType = string; + +/** Known values of {@link RestoreDetailsName} that the service accepts. */ +export enum KnownRestoreDetailsName { + /** Default */ + Default = "Default" +} + +/** + * Defines values for RestoreDetailsName. \ + * {@link KnownRestoreDetailsName} can be used interchangeably with RestoreDetailsName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** + */ +export type RestoreDetailsName = string; + +/** Known values of {@link TransparentDataEncryptionName} that the service accepts. */ +export enum KnownTransparentDataEncryptionName { + /** Current */ + Current = "current" +} + +/** + * Defines values for TransparentDataEncryptionName. \ + * {@link KnownTransparentDataEncryptionName} can be used interchangeably with TransparentDataEncryptionName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **current** + */ +export type TransparentDataEncryptionName = string; + +/** Known values of {@link ManagedDatabaseStatus} that the service accepts. */ +export enum KnownManagedDatabaseStatus { + /** Online */ + Online = "Online", + /** Offline */ + Offline = "Offline", + /** Shutdown */ + Shutdown = "Shutdown", + /** Creating */ + Creating = "Creating", + /** Inaccessible */ + Inaccessible = "Inaccessible", + /** Restoring */ + Restoring = "Restoring", + /** Updating */ + Updating = "Updating", + /** Stopping */ + Stopping = "Stopping", + /** Stopped */ + Stopped = "Stopped", + /** Starting */ + Starting = "Starting", + /** DbMoving */ + DbMoving = "DbMoving", + /** DbCopying */ + DbCopying = "DbCopying" +} + +/** + * Defines values for ManagedDatabaseStatus. \ + * {@link KnownManagedDatabaseStatus} can be used interchangeably with ManagedDatabaseStatus, + * this enum contains the known values that the service supports. * ### Known values supported by the service - * **count** \ - * **bytes** \ - * **seconds** \ - * **percent** \ - * **countPerSecond** \ - * **bytesPerSecond** + * **Online** \ + * **Offline** \ + * **Shutdown** \ + * **Creating** \ + * **Inaccessible** \ + * **Restoring** \ + * **Updating** \ + * **Stopping** \ + * **Stopped** \ + * **Starting** \ + * **DbMoving** \ + * **DbCopying** + */ +export type ManagedDatabaseStatus = string; + +/** Known values of {@link ManagedDatabaseCreateMode} that the service accepts. */ +export enum KnownManagedDatabaseCreateMode { + /** Default */ + Default = "Default", + /** RestoreExternalBackup */ + RestoreExternalBackup = "RestoreExternalBackup", + /** PointInTimeRestore */ + PointInTimeRestore = "PointInTimeRestore", + /** Recovery */ + Recovery = "Recovery", + /** RestoreLongTermRetentionBackup */ + RestoreLongTermRetentionBackup = "RestoreLongTermRetentionBackup" +} + +/** + * Defines values for ManagedDatabaseCreateMode. \ + * {@link KnownManagedDatabaseCreateMode} can be used interchangeably with ManagedDatabaseCreateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **RestoreExternalBackup** \ + * **PointInTimeRestore** \ + * **Recovery** \ + * **RestoreLongTermRetentionBackup** + */ +export type ManagedDatabaseCreateMode = string; + +/** Known values of {@link ManagedInstanceAdministratorType} that the service accepts. */ +export enum KnownManagedInstanceAdministratorType { + /** ActiveDirectory */ + ActiveDirectory = "ActiveDirectory" +} + +/** + * Defines values for ManagedInstanceAdministratorType. \ + * {@link KnownManagedInstanceAdministratorType} can be used interchangeably with ManagedInstanceAdministratorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ActiveDirectory** + */ +export type ManagedInstanceAdministratorType = string; + +/** Known values of {@link AdministratorName} that the service accepts. */ +export enum KnownAdministratorName { + /** ActiveDirectory */ + ActiveDirectory = "ActiveDirectory" +} + +/** + * Defines values for AdministratorName. \ + * {@link KnownAdministratorName} can be used interchangeably with AdministratorName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ActiveDirectory** + */ +export type AdministratorName = string; + +/** Known values of {@link AuthenticationName} that the service accepts. */ +export enum KnownAuthenticationName { + /** Default */ + Default = "Default" +} + +/** + * Defines values for AuthenticationName. \ + * {@link KnownAuthenticationName} can be used interchangeably with AuthenticationName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** + */ +export type AuthenticationName = string; + +/** Known values of {@link DtcName} that the service accepts. */ +export enum KnownDtcName { + /** Current */ + Current = "current" +} + +/** + * Defines values for DtcName. \ + * {@link KnownDtcName} can be used interchangeably with DtcName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **current** + */ +export type DtcName = string; + +/** Known values of {@link ManagedInstanceLongTermRetentionPolicyName} that the service accepts. */ +export enum KnownManagedInstanceLongTermRetentionPolicyName { + /** Default */ + Default = "default" +} + +/** + * Defines values for ManagedInstanceLongTermRetentionPolicyName. \ + * {@link KnownManagedInstanceLongTermRetentionPolicyName} can be used interchangeably with ManagedInstanceLongTermRetentionPolicyName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type ManagedInstanceLongTermRetentionPolicyName = string; + +/** Known values of {@link Status} that the service accepts. */ +export enum KnownStatus { + /** NotStarted */ + NotStarted = "NotStarted", + /** InProgress */ + InProgress = "InProgress", + /** SlowedDown */ + SlowedDown = "SlowedDown", + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled" +} + +/** + * Defines values for Status. \ + * {@link KnownStatus} can be used interchangeably with Status, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **NotStarted** \ + * **InProgress** \ + * **SlowedDown** \ + * **Completed** \ + * **Failed** \ + * **Canceled** */ -export type UnitType = string; +export type Status = string; -/** Known values of {@link PrimaryAggregationType} that the service accepts. */ -export enum KnownPrimaryAggregationType { +/** Known values of {@link IdentityType} that the service accepts. */ +export enum KnownIdentityType { /** None */ None = "None", - /** Average */ - Average = "Average", - /** Count */ - Count = "Count", - /** Minimum */ - Minimum = "Minimum", - /** Maximum */ - Maximum = "Maximum", - /** Total */ - Total = "Total" + /** SystemAssigned */ + SystemAssigned = "SystemAssigned", + /** UserAssigned */ + UserAssigned = "UserAssigned", + /** SystemAssignedUserAssigned */ + SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" } /** - * Defines values for PrimaryAggregationType. \ - * {@link KnownPrimaryAggregationType} can be used interchangeably with PrimaryAggregationType, + * Defines values for IdentityType. \ + * {@link KnownIdentityType} can be used interchangeably with IdentityType, * this enum contains the known values that the service supports. * ### Known values supported by the service * **None** \ - * **Average** \ - * **Count** \ - * **Minimum** \ - * **Maximum** \ - * **Total** + * **SystemAssigned** \ + * **UserAssigned** \ + * **SystemAssigned,UserAssigned** */ -export type PrimaryAggregationType = string; +export type IdentityType = string; -/** Known values of {@link UnitDefinitionType} that the service accepts. */ -export enum KnownUnitDefinitionType { - /** Count */ - Count = "Count", - /** Bytes */ - Bytes = "Bytes", - /** Seconds */ - Seconds = "Seconds", - /** Percent */ - Percent = "Percent", - /** CountPerSecond */ - CountPerSecond = "CountPerSecond", - /** BytesPerSecond */ - BytesPerSecond = "BytesPerSecond" +/** Known values of {@link ManagedInstancePropertiesProvisioningState} that the service accepts. */ +export enum KnownManagedInstancePropertiesProvisioningState { + /** Creating */ + Creating = "Creating", + /** Deleting */ + Deleting = "Deleting", + /** Updating */ + Updating = "Updating", + /** Unknown */ + Unknown = "Unknown", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Accepted */ + Accepted = "Accepted", + /** Created */ + Created = "Created", + /** Deleted */ + Deleted = "Deleted", + /** Unrecognized */ + Unrecognized = "Unrecognized", + /** Running */ + Running = "Running", + /** Canceled */ + Canceled = "Canceled", + /** NotSpecified */ + NotSpecified = "NotSpecified", + /** Registering */ + Registering = "Registering", + /** TimedOut */ + TimedOut = "TimedOut" } /** - * Defines values for UnitDefinitionType. \ - * {@link KnownUnitDefinitionType} can be used interchangeably with UnitDefinitionType, + * Defines values for ManagedInstancePropertiesProvisioningState. \ + * {@link KnownManagedInstancePropertiesProvisioningState} can be used interchangeably with ManagedInstancePropertiesProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Count** \ - * **Bytes** \ - * **Seconds** \ - * **Percent** \ - * **CountPerSecond** \ - * **BytesPerSecond** + * **Creating** \ + * **Deleting** \ + * **Updating** \ + * **Unknown** \ + * **Succeeded** \ + * **Failed** \ + * **Accepted** \ + * **Created** \ + * **Deleted** \ + * **Unrecognized** \ + * **Running** \ + * **Canceled** \ + * **NotSpecified** \ + * **Registering** \ + * **TimedOut** */ -export type UnitDefinitionType = string; +export type ManagedInstancePropertiesProvisioningState = string; -/** Known values of {@link RecommendedActionCurrentState} that the service accepts. */ -export enum KnownRecommendedActionCurrentState { - /** Active */ - Active = "Active", - /** Pending */ - Pending = "Pending", - /** Executing */ - Executing = "Executing", - /** Verifying */ - Verifying = "Verifying", - /** PendingRevert */ - PendingRevert = "PendingRevert", - /** RevertCancelled */ - RevertCancelled = "RevertCancelled", - /** Reverting */ - Reverting = "Reverting", - /** Reverted */ - Reverted = "Reverted", - /** Ignored */ - Ignored = "Ignored", - /** Expired */ - Expired = "Expired", - /** Monitoring */ - Monitoring = "Monitoring", - /** Resolved */ - Resolved = "Resolved", - /** Success */ - Success = "Success", - /** Error */ - Error = "Error" +/** Known values of {@link ManagedServerCreateMode} that the service accepts. */ +export enum KnownManagedServerCreateMode { + /** Default */ + Default = "Default", + /** PointInTimeRestore */ + PointInTimeRestore = "PointInTimeRestore" } /** - * Defines values for RecommendedActionCurrentState. \ - * {@link KnownRecommendedActionCurrentState} can be used interchangeably with RecommendedActionCurrentState, + * Defines values for ManagedServerCreateMode. \ + * {@link KnownManagedServerCreateMode} can be used interchangeably with ManagedServerCreateMode, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Active** \ - * **Pending** \ - * **Executing** \ - * **Verifying** \ - * **PendingRevert** \ - * **RevertCancelled** \ - * **Reverting** \ - * **Reverted** \ - * **Ignored** \ - * **Expired** \ - * **Monitoring** \ - * **Resolved** \ - * **Success** \ - * **Error** + * **Default** \ + * **PointInTimeRestore** + */ +export type ManagedServerCreateMode = string; + +/** Known values of {@link ManagedInstanceLicenseType} that the service accepts. */ +export enum KnownManagedInstanceLicenseType { + /** LicenseIncluded */ + LicenseIncluded = "LicenseIncluded", + /** BasePrice */ + BasePrice = "BasePrice" +} + +/** + * Defines values for ManagedInstanceLicenseType. \ + * {@link KnownManagedInstanceLicenseType} can be used interchangeably with ManagedInstanceLicenseType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LicenseIncluded** \ + * **BasePrice** + */ +export type ManagedInstanceLicenseType = string; + +/** Known values of {@link ManagedInstanceProxyOverride} that the service accepts. */ +export enum KnownManagedInstanceProxyOverride { + /** Proxy */ + Proxy = "Proxy", + /** Redirect */ + Redirect = "Redirect", + /** Default */ + Default = "Default" +} + +/** + * Defines values for ManagedInstanceProxyOverride. \ + * {@link KnownManagedInstanceProxyOverride} can be used interchangeably with ManagedInstanceProxyOverride, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Proxy** \ + * **Redirect** \ + * **Default** + */ +export type ManagedInstanceProxyOverride = string; + +/** Known values of {@link AdministratorType} that the service accepts. */ +export enum KnownAdministratorType { + /** ActiveDirectory */ + ActiveDirectory = "ActiveDirectory" +} + +/** + * Defines values for AdministratorType. \ + * {@link KnownAdministratorType} can be used interchangeably with AdministratorType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ActiveDirectory** + */ +export type AdministratorType = string; + +/** Known values of {@link PrincipalType} that the service accepts. */ +export enum KnownPrincipalType { + /** User */ + User = "User", + /** Group */ + Group = "Group", + /** Application */ + Application = "Application" +} + +/** + * Defines values for PrincipalType. \ + * {@link KnownPrincipalType} can be used interchangeably with PrincipalType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Group** \ + * **Application** + */ +export type PrincipalType = string; + +/** Known values of {@link ServicePrincipalType} that the service accepts. */ +export enum KnownServicePrincipalType { + /** None */ + None = "None", + /** SystemAssigned */ + SystemAssigned = "SystemAssigned" +} + +/** + * Defines values for ServicePrincipalType. \ + * {@link KnownServicePrincipalType} can be used interchangeably with ServicePrincipalType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemAssigned** + */ +export type ServicePrincipalType = string; + +/** Known values of {@link AggregationFunctionType} that the service accepts. */ +export enum KnownAggregationFunctionType { + /** Avg */ + Avg = "avg", + /** Min */ + Min = "min", + /** Max */ + Max = "max", + /** Stdev */ + Stdev = "stdev", + /** Sum */ + Sum = "sum" +} + +/** + * Defines values for AggregationFunctionType. \ + * {@link KnownAggregationFunctionType} can be used interchangeably with AggregationFunctionType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **avg** \ + * **min** \ + * **max** \ + * **stdev** \ + * **sum** + */ +export type AggregationFunctionType = string; + +/** Known values of {@link MetricType} that the service accepts. */ +export enum KnownMetricType { + /** Cpu */ + Cpu = "cpu", + /** Io */ + Io = "io", + /** LogIo */ + LogIo = "logIo", + /** Duration */ + Duration = "duration", + /** Dtu */ + Dtu = "dtu" +} + +/** + * Defines values for MetricType. \ + * {@link KnownMetricType} can be used interchangeably with MetricType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **cpu** \ + * **io** \ + * **logIo** \ + * **duration** \ + * **dtu** */ -export type RecommendedActionCurrentState = string; +export type MetricType = string; -/** Known values of {@link ColumnDataType} that the service accepts. */ -export enum KnownColumnDataType { - /** Image */ - Image = "image", - /** Text */ - Text = "text", - /** Uniqueidentifier */ - Uniqueidentifier = "uniqueidentifier", - /** Date */ - Date = "date", - /** Time */ - Time = "time", - /** Datetime2 */ - Datetime2 = "datetime2", - /** Datetimeoffset */ - Datetimeoffset = "datetimeoffset", - /** Tinyint */ - Tinyint = "tinyint", - /** Smallint */ - Smallint = "smallint", - /** Int */ - Int = "int", - /** Smalldatetime */ - Smalldatetime = "smalldatetime", - /** Real */ - Real = "real", - /** Money */ - Money = "money", - /** Datetime */ - Datetime = "datetime", - /** Float */ - Float = "float", - /** SqlVariant */ - SqlVariant = "sql_variant", - /** Ntext */ - Ntext = "ntext", - /** Bit */ - Bit = "bit", - /** Decimal */ - Decimal = "decimal", - /** Numeric */ - Numeric = "numeric", - /** Smallmoney */ - Smallmoney = "smallmoney", - /** Bigint */ - Bigint = "bigint", - /** Hierarchyid */ - Hierarchyid = "hierarchyid", - /** Geometry */ - Geometry = "geometry", - /** Geography */ - Geography = "geography", - /** Varbinary */ - Varbinary = "varbinary", - /** Varchar */ - Varchar = "varchar", - /** Binary */ - Binary = "binary", - /** Char */ - Char = "char", - /** Timestamp */ - Timestamp = "timestamp", - /** Nvarchar */ - Nvarchar = "nvarchar", - /** Nchar */ - Nchar = "nchar", - /** Xml */ - Xml = "xml", - /** Sysname */ - Sysname = "sysname" +/** Known values of {@link ManagedLedgerDigestUploadsState} that the service accepts. */ +export enum KnownManagedLedgerDigestUploadsState { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } /** - * Defines values for ColumnDataType. \ - * {@link KnownColumnDataType} can be used interchangeably with ColumnDataType, + * Defines values for ManagedLedgerDigestUploadsState. \ + * {@link KnownManagedLedgerDigestUploadsState} can be used interchangeably with ManagedLedgerDigestUploadsState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **image** \ - * **text** \ - * **uniqueidentifier** \ - * **date** \ - * **time** \ - * **datetime2** \ - * **datetimeoffset** \ - * **tinyint** \ - * **smallint** \ - * **int** \ - * **smalldatetime** \ - * **real** \ - * **money** \ - * **datetime** \ - * **float** \ - * **sql_variant** \ - * **ntext** \ - * **bit** \ - * **decimal** \ - * **numeric** \ - * **smallmoney** \ - * **bigint** \ - * **hierarchyid** \ - * **geometry** \ - * **geography** \ - * **varbinary** \ - * **varchar** \ - * **binary** \ - * **char** \ - * **timestamp** \ - * **nvarchar** \ - * **nchar** \ - * **xml** \ - * **sysname** + * **Enabled** \ + * **Disabled** */ -export type ColumnDataType = string; +export type ManagedLedgerDigestUploadsState = string; -/** Known values of {@link TableTemporalType} that the service accepts. */ -export enum KnownTableTemporalType { - /** NonTemporalTable */ - NonTemporalTable = "NonTemporalTable", - /** HistoryTable */ - HistoryTable = "HistoryTable", - /** SystemVersionedTemporalTable */ - SystemVersionedTemporalTable = "SystemVersionedTemporalTable" +/** Known values of {@link ManagedLedgerDigestUploadsName} that the service accepts. */ +export enum KnownManagedLedgerDigestUploadsName { + /** Current */ + Current = "current" } /** - * Defines values for TableTemporalType. \ - * {@link KnownTableTemporalType} can be used interchangeably with TableTemporalType, + * Defines values for ManagedLedgerDigestUploadsName. \ + * {@link KnownManagedLedgerDigestUploadsName} can be used interchangeably with ManagedLedgerDigestUploadsName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **NonTemporalTable** \ - * **HistoryTable** \ - * **SystemVersionedTemporalTable** + * **current** */ -export type TableTemporalType = string; +export type ManagedLedgerDigestUploadsName = string; -/** Known values of {@link SecurityAlertPolicyName} that the service accepts. */ -export enum KnownSecurityAlertPolicyName { +/** Known values of {@link SecurityAlertPolicyNameAutoGenerated} that the service accepts. */ +export enum KnownSecurityAlertPolicyNameAutoGenerated { /** Default */ Default = "Default" } /** - * Defines values for SecurityAlertPolicyName. \ - * {@link KnownSecurityAlertPolicyName} can be used interchangeably with SecurityAlertPolicyName, + * Defines values for SecurityAlertPolicyNameAutoGenerated. \ + * {@link KnownSecurityAlertPolicyNameAutoGenerated} can be used interchangeably with SecurityAlertPolicyNameAutoGenerated, * this enum contains the known values that the service supports. * ### Known values supported by the service * **Default** */ -export type SecurityAlertPolicyName = string; +export type SecurityAlertPolicyNameAutoGenerated = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { +/** Known values of {@link OperationOrigin} that the service accepts. */ +export enum KnownOperationOrigin { /** User */ - User = "User", - /** Application */ - Application = "Application", - /** ManagedIdentity */ - ManagedIdentity = "ManagedIdentity", - /** Key */ - Key = "Key" + User = "user", + /** System */ + System = "system" } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for OperationOrigin. \ + * {@link KnownOperationOrigin} can be used interchangeably with OperationOrigin, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **user** \ + * **system** */ -export type CreatedByType = string; +export type OperationOrigin = string; -/** Known values of {@link VulnerabilityAssessmentName} that the service accepts. */ -export enum KnownVulnerabilityAssessmentName { - /** Default */ - Default = "default" +/** Known values of {@link PrivateLinkServiceConnectionStateStatus} that the service accepts. */ +export enum KnownPrivateLinkServiceConnectionStateStatus { + /** Approved */ + Approved = "Approved", + /** Pending */ + Pending = "Pending", + /** Rejected */ + Rejected = "Rejected", + /** Disconnected */ + Disconnected = "Disconnected" } /** - * Defines values for VulnerabilityAssessmentName. \ - * {@link KnownVulnerabilityAssessmentName} can be used interchangeably with VulnerabilityAssessmentName, + * Defines values for PrivateLinkServiceConnectionStateStatus. \ + * {@link KnownPrivateLinkServiceConnectionStateStatus} can be used interchangeably with PrivateLinkServiceConnectionStateStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **default** + * **Approved** \ + * **Pending** \ + * **Rejected** \ + * **Disconnected** */ -export type VulnerabilityAssessmentName = string; +export type PrivateLinkServiceConnectionStateStatus = string; -/** Known values of {@link VulnerabilityAssessmentScanTriggerType} that the service accepts. */ -export enum KnownVulnerabilityAssessmentScanTriggerType { - /** OnDemand */ - OnDemand = "OnDemand", - /** Recurring */ - Recurring = "Recurring" +/** Known values of {@link PrivateLinkServiceConnectionStateActionsRequire} that the service accepts. */ +export enum KnownPrivateLinkServiceConnectionStateActionsRequire { + /** None */ + None = "None" } /** - * Defines values for VulnerabilityAssessmentScanTriggerType. \ - * {@link KnownVulnerabilityAssessmentScanTriggerType} can be used interchangeably with VulnerabilityAssessmentScanTriggerType, + * Defines values for PrivateLinkServiceConnectionStateActionsRequire. \ + * {@link KnownPrivateLinkServiceConnectionStateActionsRequire} can be used interchangeably with PrivateLinkServiceConnectionStateActionsRequire, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **OnDemand** \ - * **Recurring** + * **None** */ -export type VulnerabilityAssessmentScanTriggerType = string; +export type PrivateLinkServiceConnectionStateActionsRequire = string; -/** Known values of {@link VulnerabilityAssessmentScanState} that the service accepts. */ -export enum KnownVulnerabilityAssessmentScanState { - /** Passed */ - Passed = "Passed", +/** Known values of {@link PrivateEndpointProvisioningState} that the service accepts. */ +export enum KnownPrivateEndpointProvisioningState { + /** Approving */ + Approving = "Approving", + /** Ready */ + Ready = "Ready", + /** Dropping */ + Dropping = "Dropping", /** Failed */ Failed = "Failed", - /** FailedToRun */ - FailedToRun = "FailedToRun", - /** InProgress */ - InProgress = "InProgress" + /** Rejecting */ + Rejecting = "Rejecting" +} + +/** + * Defines values for PrivateEndpointProvisioningState. \ + * {@link KnownPrivateEndpointProvisioningState} can be used interchangeably with PrivateEndpointProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Approving** \ + * **Ready** \ + * **Dropping** \ + * **Failed** \ + * **Rejecting** + */ +export type PrivateEndpointProvisioningState = string; + +/** Known values of {@link ReplicationState} that the service accepts. */ +export enum KnownReplicationState { + /** Pending */ + Pending = "PENDING", + /** Seeding */ + Seeding = "SEEDING", + /** CatchUP */ + CatchUP = "CATCH_UP", + /** Suspended */ + Suspended = "SUSPENDED" } /** - * Defines values for VulnerabilityAssessmentScanState. \ - * {@link KnownVulnerabilityAssessmentScanState} can be used interchangeably with VulnerabilityAssessmentScanState, + * Defines values for ReplicationState. \ + * {@link KnownReplicationState} can be used interchangeably with ReplicationState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Passed** \ - * **Failed** \ - * **FailedToRun** \ - * **InProgress** + * **PENDING** \ + * **SEEDING** \ + * **CATCH_UP** \ + * **SUSPENDED** */ -export type VulnerabilityAssessmentScanState = string; +export type ReplicationState = string; -/** Known values of {@link DataWarehouseUserActivityName} that the service accepts. */ -export enum KnownDataWarehouseUserActivityName { - /** Current */ - Current = "current" +/** Known values of {@link ReplicationLinkType} that the service accepts. */ +export enum KnownReplicationLinkType { + /** GEO */ + GEO = "GEO", + /** Named */ + Named = "NAMED", + /** Standby */ + Standby = "STANDBY" } /** - * Defines values for DataWarehouseUserActivityName. \ - * {@link KnownDataWarehouseUserActivityName} can be used interchangeably with DataWarehouseUserActivityName, + * Defines values for ReplicationLinkType. \ + * {@link KnownReplicationLinkType} can be used interchangeably with ReplicationLinkType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **current** + * **GEO** \ + * **NAMED** \ + * **STANDBY** */ -export type DataWarehouseUserActivityName = string; +export type ReplicationLinkType = string; -/** Known values of {@link ElasticPoolState} that the service accepts. */ -export enum KnownElasticPoolState { - /** Creating */ - Creating = "Creating", - /** Ready */ - Ready = "Ready", - /** Disabled */ - Disabled = "Disabled" +/** Known values of {@link ServerConfigurationOptionName} that the service accepts. */ +export enum KnownServerConfigurationOptionName { + /** AllowPolybaseExport */ + AllowPolybaseExport = "allowPolybaseExport" } /** - * Defines values for ElasticPoolState. \ - * {@link KnownElasticPoolState} can be used interchangeably with ElasticPoolState, + * Defines values for ServerConfigurationOptionName. \ + * {@link KnownServerConfigurationOptionName} can be used interchangeably with ServerConfigurationOptionName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Creating** \ - * **Ready** \ - * **Disabled** + * **allowPolybaseExport** */ -export type ElasticPoolState = string; +export type ServerConfigurationOptionName = string; -/** Known values of {@link ElasticPoolLicenseType} that the service accepts. */ -export enum KnownElasticPoolLicenseType { - /** LicenseIncluded */ - LicenseIncluded = "LicenseIncluded", - /** BasePrice */ - BasePrice = "BasePrice" +/** Known values of {@link ServerConnectionType} that the service accepts. */ +export enum KnownServerConnectionType { + /** Default */ + Default = "Default", + /** Redirect */ + Redirect = "Redirect", + /** Proxy */ + Proxy = "Proxy" } /** - * Defines values for ElasticPoolLicenseType. \ - * {@link KnownElasticPoolLicenseType} can be used interchangeably with ElasticPoolLicenseType, + * Defines values for ServerConnectionType. \ + * {@link KnownServerConnectionType} can be used interchangeably with ServerConnectionType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **LicenseIncluded** \ - * **BasePrice** + * **Default** \ + * **Redirect** \ + * **Proxy** */ -export type ElasticPoolLicenseType = string; +export type ServerConnectionType = string; -/** Known values of {@link ServerKeyType} that the service accepts. */ -export enum KnownServerKeyType { - /** ServiceManaged */ - ServiceManaged = "ServiceManaged", - /** AzureKeyVault */ - AzureKeyVault = "AzureKeyVault" +/** Known values of {@link ConnectionPolicyName} that the service accepts. */ +export enum KnownConnectionPolicyName { + /** Default */ + Default = "default" } /** - * Defines values for ServerKeyType. \ - * {@link KnownServerKeyType} can be used interchangeably with ServerKeyType, + * Defines values for ConnectionPolicyName. \ + * {@link KnownConnectionPolicyName} can be used interchangeably with ConnectionPolicyName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **ServiceManaged** \ - * **AzureKeyVault** + * **default** */ -export type ServerKeyType = string; +export type ConnectionPolicyName = string; -/** Known values of {@link EncryptionProtectorName} that the service accepts. */ -export enum KnownEncryptionProtectorName { - /** Current */ - Current = "current" +/** Known values of {@link DevOpsAuditingSettingsName} that the service accepts. */ +export enum KnownDevOpsAuditingSettingsName { + /** Default */ + Default = "Default" } /** - * Defines values for EncryptionProtectorName. \ - * {@link KnownEncryptionProtectorName} can be used interchangeably with EncryptionProtectorName, + * Defines values for DevOpsAuditingSettingsName. \ + * {@link KnownDevOpsAuditingSettingsName} can be used interchangeably with DevOpsAuditingSettingsName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **current** + * **Default** */ -export type EncryptionProtectorName = string; +export type DevOpsAuditingSettingsName = string; -/** Known values of {@link ReadWriteEndpointFailoverPolicy} that the service accepts. */ -export enum KnownReadWriteEndpointFailoverPolicy { - /** Manual */ - Manual = "Manual", - /** Automatic */ - Automatic = "Automatic" +/** Known values of {@link ServerTrustGroupPropertiesTrustScopesItem} that the service accepts. */ +export enum KnownServerTrustGroupPropertiesTrustScopesItem { + /** GlobalTransactions */ + GlobalTransactions = "GlobalTransactions", + /** ServiceBroker */ + ServiceBroker = "ServiceBroker" } /** - * Defines values for ReadWriteEndpointFailoverPolicy. \ - * {@link KnownReadWriteEndpointFailoverPolicy} can be used interchangeably with ReadWriteEndpointFailoverPolicy, + * Defines values for ServerTrustGroupPropertiesTrustScopesItem. \ + * {@link KnownServerTrustGroupPropertiesTrustScopesItem} can be used interchangeably with ServerTrustGroupPropertiesTrustScopesItem, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Manual** \ - * **Automatic** + * **GlobalTransactions** \ + * **ServiceBroker** */ -export type ReadWriteEndpointFailoverPolicy = string; +export type ServerTrustGroupPropertiesTrustScopesItem = string; -/** Known values of {@link ReadOnlyEndpointFailoverPolicy} that the service accepts. */ -export enum KnownReadOnlyEndpointFailoverPolicy { +/** Known values of {@link ServerPublicNetworkAccessFlag} that the service accepts. */ +export enum KnownServerPublicNetworkAccessFlag { + /** Enabled */ + Enabled = "Enabled", /** Disabled */ Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled" + /** SecuredByPerimeter */ + SecuredByPerimeter = "SecuredByPerimeter" } /** - * Defines values for ReadOnlyEndpointFailoverPolicy. \ - * {@link KnownReadOnlyEndpointFailoverPolicy} can be used interchangeably with ReadOnlyEndpointFailoverPolicy, + * Defines values for ServerPublicNetworkAccessFlag. \ + * {@link KnownServerPublicNetworkAccessFlag} can be used interchangeably with ServerPublicNetworkAccessFlag, * this enum contains the known values that the service supports. * ### Known values supported by the service + * **Enabled** \ * **Disabled** \ - * **Enabled** + * **SecuredByPerimeter** */ -export type ReadOnlyEndpointFailoverPolicy = string; +export type ServerPublicNetworkAccessFlag = string; -/** Known values of {@link FailoverGroupReplicationRole} that the service accepts. */ -export enum KnownFailoverGroupReplicationRole { - /** Primary */ - Primary = "Primary", - /** Secondary */ - Secondary = "Secondary" +/** Known values of {@link ServerWorkspaceFeature} that the service accepts. */ +export enum KnownServerWorkspaceFeature { + /** Connected */ + Connected = "Connected", + /** Disconnected */ + Disconnected = "Disconnected" } /** - * Defines values for FailoverGroupReplicationRole. \ - * {@link KnownFailoverGroupReplicationRole} can be used interchangeably with FailoverGroupReplicationRole, + * Defines values for ServerWorkspaceFeature. \ + * {@link KnownServerWorkspaceFeature} can be used interchangeably with ServerWorkspaceFeature, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Primary** \ - * **Secondary** + * **Connected** \ + * **Disconnected** */ -export type FailoverGroupReplicationRole = string; +export type ServerWorkspaceFeature = string; -/** Known values of {@link InstanceFailoverGroupReplicationRole} that the service accepts. */ -export enum KnownInstanceFailoverGroupReplicationRole { - /** Primary */ - Primary = "Primary", - /** Secondary */ - Secondary = "Secondary" +/** Known values of {@link ServerNetworkAccessFlag} that the service accepts. */ +export enum KnownServerNetworkAccessFlag { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } /** - * Defines values for InstanceFailoverGroupReplicationRole. \ - * {@link KnownInstanceFailoverGroupReplicationRole} can be used interchangeably with InstanceFailoverGroupReplicationRole, + * Defines values for ServerNetworkAccessFlag. \ + * {@link KnownServerNetworkAccessFlag} can be used interchangeably with ServerNetworkAccessFlag, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Primary** \ - * **Secondary** + * **Enabled** \ + * **Disabled** */ -export type InstanceFailoverGroupReplicationRole = string; +export type ServerNetworkAccessFlag = string; -/** Known values of {@link InstancePoolLicenseType} that the service accepts. */ -export enum KnownInstancePoolLicenseType { - /** LicenseIncluded */ - LicenseIncluded = "LicenseIncluded", - /** BasePrice */ - BasePrice = "BasePrice" +/** Known values of {@link ExternalGovernanceStatus} that the service accepts. */ +export enum KnownExternalGovernanceStatus { + /** Enabled */ + Enabled = "Enabled", + /** Disabled */ + Disabled = "Disabled" } /** - * Defines values for InstancePoolLicenseType. \ - * {@link KnownInstancePoolLicenseType} can be used interchangeably with InstancePoolLicenseType, + * Defines values for ExternalGovernanceStatus. \ + * {@link KnownExternalGovernanceStatus} can be used interchangeably with ExternalGovernanceStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **LicenseIncluded** \ - * **BasePrice** + * **Enabled** \ + * **Disabled** */ -export type InstancePoolLicenseType = string; +export type ExternalGovernanceStatus = string; -/** Known values of {@link JobAgentState} that the service accepts. */ -export enum KnownJobAgentState { - /** Creating */ - Creating = "Creating", - /** Ready */ - Ready = "Ready", - /** Updating */ - Updating = "Updating", - /** Deleting */ - Deleting = "Deleting", +/** Known values of {@link SqlAgentConfigurationPropertiesState} that the service accepts. */ +export enum KnownSqlAgentConfigurationPropertiesState { + /** Enabled */ + Enabled = "Enabled", /** Disabled */ Disabled = "Disabled" } /** - * Defines values for JobAgentState. \ - * {@link KnownJobAgentState} can be used interchangeably with JobAgentState, + * Defines values for SqlAgentConfigurationPropertiesState. \ + * {@link KnownSqlAgentConfigurationPropertiesState} can be used interchangeably with SqlAgentConfigurationPropertiesState, * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Ready** \ - * **Updating** \ - * **Deleting** \ - * **Disabled** - */ -export type JobAgentState = string; - -/** Known values of {@link JobExecutionLifecycle} that the service accepts. */ -export enum KnownJobExecutionLifecycle { - /** Created */ - Created = "Created", - /** InProgress */ - InProgress = "InProgress", - /** WaitingForChildJobExecutions */ - WaitingForChildJobExecutions = "WaitingForChildJobExecutions", - /** WaitingForRetry */ - WaitingForRetry = "WaitingForRetry", - /** Succeeded */ - Succeeded = "Succeeded", - /** SucceededWithSkipped */ - SucceededWithSkipped = "SucceededWithSkipped", - /** Failed */ - Failed = "Failed", - /** TimedOut */ - TimedOut = "TimedOut", - /** Canceled */ - Canceled = "Canceled", - /** Skipped */ - Skipped = "Skipped" + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type SqlAgentConfigurationPropertiesState = string; + +/** Known values of {@link StartStopScheduleName} that the service accepts. */ +export enum KnownStartStopScheduleName { + /** Default */ + Default = "default" } /** - * Defines values for JobExecutionLifecycle. \ - * {@link KnownJobExecutionLifecycle} can be used interchangeably with JobExecutionLifecycle, + * Defines values for StartStopScheduleName. \ + * {@link KnownStartStopScheduleName} can be used interchangeably with StartStopScheduleName, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Created** \ - * **InProgress** \ - * **WaitingForChildJobExecutions** \ - * **WaitingForRetry** \ - * **Succeeded** \ - * **SucceededWithSkipped** \ - * **Failed** \ - * **TimedOut** \ - * **Canceled** \ - * **Skipped** + * **default** */ -export type JobExecutionLifecycle = string; +export type StartStopScheduleName = string; -/** Known values of {@link ProvisioningState} that the service accepts. */ -export enum KnownProvisioningState { - /** Created */ - Created = "Created", - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled" +/** Known values of {@link SyncAgentState} that the service accepts. */ +export enum KnownSyncAgentState { + /** Online */ + Online = "Online", + /** Offline */ + Offline = "Offline", + /** NeverConnected */ + NeverConnected = "NeverConnected" } /** - * Defines values for ProvisioningState. \ - * {@link KnownProvisioningState} can be used interchangeably with ProvisioningState, + * Defines values for SyncAgentState. \ + * {@link KnownSyncAgentState} can be used interchangeably with SyncAgentState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Created** \ - * **InProgress** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** + * **Online** \ + * **Offline** \ + * **NeverConnected** */ -export type ProvisioningState = string; +export type SyncAgentState = string; -/** Known values of {@link JobTargetType} that the service accepts. */ -export enum KnownJobTargetType { - /** TargetGroup */ - TargetGroup = "TargetGroup", - /** SqlDatabase */ - SqlDatabase = "SqlDatabase", - /** SqlElasticPool */ - SqlElasticPool = "SqlElasticPool", - /** SqlShardMap */ - SqlShardMap = "SqlShardMap", - /** SqlServer */ - SqlServer = "SqlServer" +/** Known values of {@link SyncMemberDbType} that the service accepts. */ +export enum KnownSyncMemberDbType { + /** AzureSqlDatabase */ + AzureSqlDatabase = "AzureSqlDatabase", + /** SqlServerDatabase */ + SqlServerDatabase = "SqlServerDatabase" } /** - * Defines values for JobTargetType. \ - * {@link KnownJobTargetType} can be used interchangeably with JobTargetType, + * Defines values for SyncMemberDbType. \ + * {@link KnownSyncMemberDbType} can be used interchangeably with SyncMemberDbType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **TargetGroup** \ - * **SqlDatabase** \ - * **SqlElasticPool** \ - * **SqlShardMap** \ - * **SqlServer** + * **AzureSqlDatabase** \ + * **SqlServerDatabase** */ -export type JobTargetType = string; +export type SyncMemberDbType = string; -/** Known values of {@link JobStepActionType} that the service accepts. */ -export enum KnownJobStepActionType { - /** TSql */ - TSql = "TSql" +/** Known values of {@link SyncConflictResolutionPolicy} that the service accepts. */ +export enum KnownSyncConflictResolutionPolicy { + /** HubWin */ + HubWin = "HubWin", + /** MemberWin */ + MemberWin = "MemberWin" } /** - * Defines values for JobStepActionType. \ - * {@link KnownJobStepActionType} can be used interchangeably with JobStepActionType, + * Defines values for SyncConflictResolutionPolicy. \ + * {@link KnownSyncConflictResolutionPolicy} can be used interchangeably with SyncConflictResolutionPolicy, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **TSql** + * **HubWin** \ + * **MemberWin** */ -export type JobStepActionType = string; +export type SyncConflictResolutionPolicy = string; -/** Known values of {@link JobStepActionSource} that the service accepts. */ -export enum KnownJobStepActionSource { - /** Inline */ - Inline = "Inline" +/** Known values of {@link SyncGroupState} that the service accepts. */ +export enum KnownSyncGroupState { + /** NotReady */ + NotReady = "NotReady", + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning", + /** Progressing */ + Progressing = "Progressing", + /** Good */ + Good = "Good" } /** - * Defines values for JobStepActionSource. \ - * {@link KnownJobStepActionSource} can be used interchangeably with JobStepActionSource, + * Defines values for SyncGroupState. \ + * {@link KnownSyncGroupState} can be used interchangeably with SyncGroupState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Inline** + * **NotReady** \ + * **Error** \ + * **Warning** \ + * **Progressing** \ + * **Good** */ -export type JobStepActionSource = string; +export type SyncGroupState = string; -/** Known values of {@link JobStepOutputType} that the service accepts. */ -export enum KnownJobStepOutputType { - /** SqlDatabase */ - SqlDatabase = "SqlDatabase" +/** Known values of {@link SyncGroupsType} that the service accepts. */ +export enum KnownSyncGroupsType { + /** All */ + All = "All", + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning", + /** Success */ + Success = "Success" } /** - * Defines values for JobStepOutputType. \ - * {@link KnownJobStepOutputType} can be used interchangeably with JobStepOutputType, + * Defines values for SyncGroupsType. \ + * {@link KnownSyncGroupsType} can be used interchangeably with SyncGroupsType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **SqlDatabase** + * **All** \ + * **Error** \ + * **Warning** \ + * **Success** */ -export type JobStepOutputType = string; +export type SyncGroupsType = string; -/** Known values of {@link CapabilityGroup} that the service accepts. */ -export enum KnownCapabilityGroup { - /** SupportedEditions */ - SupportedEditions = "supportedEditions", - /** SupportedElasticPoolEditions */ - SupportedElasticPoolEditions = "supportedElasticPoolEditions", - /** SupportedManagedInstanceVersions */ - SupportedManagedInstanceVersions = "supportedManagedInstanceVersions", - /** SupportedInstancePoolEditions */ - SupportedInstancePoolEditions = "supportedInstancePoolEditions", - /** SupportedManagedInstanceEditions */ - SupportedManagedInstanceEditions = "supportedManagedInstanceEditions" +/** Known values of {@link SyncGroupLogType} that the service accepts. */ +export enum KnownSyncGroupLogType { + /** All */ + All = "All", + /** Error */ + Error = "Error", + /** Warning */ + Warning = "Warning", + /** Success */ + Success = "Success" } /** - * Defines values for CapabilityGroup. \ - * {@link KnownCapabilityGroup} can be used interchangeably with CapabilityGroup, + * Defines values for SyncGroupLogType. \ + * {@link KnownSyncGroupLogType} can be used interchangeably with SyncGroupLogType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **supportedEditions** \ - * **supportedElasticPoolEditions** \ - * **supportedManagedInstanceVersions** \ - * **supportedInstancePoolEditions** \ - * **supportedManagedInstanceEditions** + * **All** \ + * **Error** \ + * **Warning** \ + * **Success** */ -export type CapabilityGroup = string; +export type SyncGroupLogType = string; -/** Known values of {@link MaxSizeUnit} that the service accepts. */ -export enum KnownMaxSizeUnit { - /** Megabytes */ - Megabytes = "Megabytes", - /** Gigabytes */ - Gigabytes = "Gigabytes", - /** Terabytes */ - Terabytes = "Terabytes", - /** Petabytes */ - Petabytes = "Petabytes" +/** Known values of {@link SyncDirection} that the service accepts. */ +export enum KnownSyncDirection { + /** Bidirectional */ + Bidirectional = "Bidirectional", + /** OneWayMemberToHub */ + OneWayMemberToHub = "OneWayMemberToHub", + /** OneWayHubToMember */ + OneWayHubToMember = "OneWayHubToMember" +} + +/** + * Defines values for SyncDirection. \ + * {@link KnownSyncDirection} can be used interchangeably with SyncDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Bidirectional** \ + * **OneWayMemberToHub** \ + * **OneWayHubToMember** + */ +export type SyncDirection = string; + +/** Known values of {@link SyncMemberState} that the service accepts. */ +export enum KnownSyncMemberState { + /** SyncInProgress */ + SyncInProgress = "SyncInProgress", + /** SyncSucceeded */ + SyncSucceeded = "SyncSucceeded", + /** SyncFailed */ + SyncFailed = "SyncFailed", + /** DisabledTombstoneCleanup */ + DisabledTombstoneCleanup = "DisabledTombstoneCleanup", + /** DisabledBackupRestore */ + DisabledBackupRestore = "DisabledBackupRestore", + /** SyncSucceededWithWarnings */ + SyncSucceededWithWarnings = "SyncSucceededWithWarnings", + /** SyncCancelling */ + SyncCancelling = "SyncCancelling", + /** SyncCancelled */ + SyncCancelled = "SyncCancelled", + /** UnProvisioned */ + UnProvisioned = "UnProvisioned", + /** Provisioning */ + Provisioning = "Provisioning", + /** Provisioned */ + Provisioned = "Provisioned", + /** ProvisionFailed */ + ProvisionFailed = "ProvisionFailed", + /** DeProvisioning */ + DeProvisioning = "DeProvisioning", + /** DeProvisioned */ + DeProvisioned = "DeProvisioned", + /** DeProvisionFailed */ + DeProvisionFailed = "DeProvisionFailed", + /** Reprovisioning */ + Reprovisioning = "Reprovisioning", + /** ReprovisionFailed */ + ReprovisionFailed = "ReprovisionFailed", + /** UnReprovisioned */ + UnReprovisioned = "UnReprovisioned" } /** - * Defines values for MaxSizeUnit. \ - * {@link KnownMaxSizeUnit} can be used interchangeably with MaxSizeUnit, + * Defines values for SyncMemberState. \ + * {@link KnownSyncMemberState} can be used interchangeably with SyncMemberState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Megabytes** \ - * **Gigabytes** \ - * **Terabytes** \ - * **Petabytes** + * **SyncInProgress** \ + * **SyncSucceeded** \ + * **SyncFailed** \ + * **DisabledTombstoneCleanup** \ + * **DisabledBackupRestore** \ + * **SyncSucceededWithWarnings** \ + * **SyncCancelling** \ + * **SyncCancelled** \ + * **UnProvisioned** \ + * **Provisioning** \ + * **Provisioned** \ + * **ProvisionFailed** \ + * **DeProvisioning** \ + * **DeProvisioned** \ + * **DeProvisionFailed** \ + * **Reprovisioning** \ + * **ReprovisionFailed** \ + * **UnReprovisioned** */ -export type MaxSizeUnit = string; +export type SyncMemberState = string; -/** Known values of {@link LogSizeUnit} that the service accepts. */ -export enum KnownLogSizeUnit { - /** Megabytes */ - Megabytes = "Megabytes", - /** Gigabytes */ - Gigabytes = "Gigabytes", - /** Terabytes */ - Terabytes = "Terabytes", - /** Petabytes */ - Petabytes = "Petabytes", - /** Percent */ - Percent = "Percent" +/** Known values of {@link DNSRefreshOperationStatus} that the service accepts. */ +export enum KnownDNSRefreshOperationStatus { + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** InProgress */ + InProgress = "InProgress" } /** - * Defines values for LogSizeUnit. \ - * {@link KnownLogSizeUnit} can be used interchangeably with LogSizeUnit, + * Defines values for DNSRefreshOperationStatus. \ + * {@link KnownDNSRefreshOperationStatus} can be used interchangeably with DNSRefreshOperationStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Megabytes** \ - * **Gigabytes** \ - * **Terabytes** \ - * **Petabytes** \ - * **Percent** + * **Succeeded** \ + * **Failed** \ + * **InProgress** */ -export type LogSizeUnit = string; +export type DNSRefreshOperationStatus = string; -/** Known values of {@link PerformanceLevelUnit} that the service accepts. */ -export enum KnownPerformanceLevelUnit { - /** DTU */ - DTU = "DTU", - /** VCores */ - VCores = "VCores" +/** Known values of {@link VirtualNetworkRuleState} that the service accepts. */ +export enum KnownVirtualNetworkRuleState { + /** Initializing */ + Initializing = "Initializing", + /** InProgress */ + InProgress = "InProgress", + /** Ready */ + Ready = "Ready", + /** Failed */ + Failed = "Failed", + /** Deleting */ + Deleting = "Deleting", + /** Unknown */ + Unknown = "Unknown" } /** - * Defines values for PerformanceLevelUnit. \ - * {@link KnownPerformanceLevelUnit} can be used interchangeably with PerformanceLevelUnit, + * Defines values for VirtualNetworkRuleState. \ + * {@link KnownVirtualNetworkRuleState} can be used interchangeably with VirtualNetworkRuleState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **DTU** \ - * **VCores** + * **Initializing** \ + * **InProgress** \ + * **Ready** \ + * **Failed** \ + * **Deleting** \ + * **Unknown** */ -export type PerformanceLevelUnit = string; +export type VirtualNetworkRuleState = string; +/** Defines values for BlobAuditingPolicyState. */ +export type BlobAuditingPolicyState = "Enabled" | "Disabled"; +/** Defines values for DataMaskingState. */ +export type DataMaskingState = "Enabled" | "Disabled"; +/** Defines values for DataMaskingRuleState. */ +export type DataMaskingRuleState = "Enabled" | "Disabled"; +/** Defines values for DataMaskingFunction. */ +export type DataMaskingFunction = + | "Default" + | "CCN" + | "Email" + | "Number" + | "SSN" + | "Text"; +/** Defines values for AdvancedThreatProtectionState. */ +export type AdvancedThreatProtectionState = "New" | "Enabled" | "Disabled"; +/** Defines values for AdvisorStatus. */ +export type AdvisorStatus = + | "GA" + | "PublicPreview" + | "LimitedPublicPreview" + | "PrivatePreview"; +/** Defines values for AutoExecuteStatus. */ +export type AutoExecuteStatus = "Enabled" | "Disabled" | "Default"; +/** Defines values for AutoExecuteStatusInheritedFrom. */ +export type AutoExecuteStatusInheritedFrom = + | "Default" + | "Subscription" + | "Server" + | "ElasticPool" + | "Database"; +/** Defines values for RecommendedActionInitiatedBy. */ +export type RecommendedActionInitiatedBy = "User" | "System"; +/** Defines values for ImplementationMethod. */ +export type ImplementationMethod = "TSql" | "AzurePowerShell"; +/** Defines values for IsRetryable. */ +export type IsRetryable = "Yes" | "No"; +/** Defines values for AutomaticTuningMode. */ +export type AutomaticTuningMode = "Inherit" | "Custom" | "Auto" | "Unspecified"; +/** Defines values for AutomaticTuningOptionModeDesired. */ +export type AutomaticTuningOptionModeDesired = "Off" | "On" | "Default"; +/** Defines values for AutomaticTuningOptionModeActual. */ +export type AutomaticTuningOptionModeActual = "Off" | "On"; +/** Defines values for AutomaticTuningDisabledReason. */ +export type AutomaticTuningDisabledReason = + | "Default" + | "Disabled" + | "AutoConfigured" + | "InheritedFromServer" + | "QueryStoreOff" + | "QueryStoreReadOnly" + | "NotSupported"; +/** Defines values for SecurityAlertsPolicyState. */ +export type SecurityAlertsPolicyState = "Enabled" | "Disabled"; +/** Defines values for SqlVulnerabilityAssessmentState. */ +export type SqlVulnerabilityAssessmentState = "Enabled" | "Disabled"; +/** Defines values for VulnerabilityAssessmentPolicyBaselineName. */ +export type VulnerabilityAssessmentPolicyBaselineName = "master" | "default"; +/** Defines values for GeoBackupPolicyState. */ +export type GeoBackupPolicyState = "Enabled" | "Disabled"; +/** Defines values for JobTargetGroupMembershipType. */ +export type JobTargetGroupMembershipType = "Include" | "Exclude"; +/** Defines values for JobScheduleType. */ +export type JobScheduleType = "Once" | "Recurring"; +/** Defines values for LedgerDigestUploadsState. */ +export type LedgerDigestUploadsState = "Enabled" | "Disabled"; +/** Defines values for CapabilityStatus. */ +export type CapabilityStatus = "Visible" | "Available" | "Default" | "Disabled"; +/** Defines values for SecurityAlertPolicyState. */ +export type SecurityAlertPolicyState = "New" | "Enabled" | "Disabled"; +/** Defines values for SecurityEventType. */ +export type SecurityEventType = + | "Undefined" + | "SqlInjectionVulnerability" + | "SqlInjectionExploit"; +/** Defines values for SensitivityLabelRank. */ +export type SensitivityLabelRank = + | "None" + | "Low" + | "Medium" + | "High" + | "Critical"; +/** Defines values for SensitivityLabelUpdateKind. */ +export type SensitivityLabelUpdateKind = "set" | "remove"; +/** Defines values for RecommendedSensitivityLabelUpdateKind. */ +export type RecommendedSensitivityLabelUpdateKind = "enable" | "disable"; +/** Defines values for SensitivityLabelSource. */ +export type SensitivityLabelSource = "current" | "recommended"; +/** Defines values for TransparentDataEncryptionState. */ +export type TransparentDataEncryptionState = "Enabled" | "Disabled"; +/** Defines values for ReplicationRole. */ +export type ReplicationRole = + | "Primary" + | "Secondary" + | "NonReadableSecondary" + | "Source" + | "Copy"; +/** Defines values for RestorePointType. */ +export type RestorePointType = "CONTINUOUS" | "DISCRETE"; +/** Defines values for AutomaticTuningServerMode. */ +export type AutomaticTuningServerMode = "Custom" | "Auto" | "Unspecified"; +/** Defines values for AutomaticTuningServerReason. */ +export type AutomaticTuningServerReason = + | "Default" + | "Disabled" + | "AutoConfigured"; +/** Defines values for CheckNameAvailabilityReason. */ +export type CheckNameAvailabilityReason = "Invalid" | "AlreadyExists"; -/** Known values of {@link PauseDelayTimeUnit} that the service accepts. */ -export enum KnownPauseDelayTimeUnit { - /** Minutes */ - Minutes = "Minutes" +/** Optional parameters. */ +export interface BackupShortTermRetentionPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type BackupShortTermRetentionPoliciesListByDatabaseResponse = BackupShortTermRetentionPolicyListResult; + +/** Optional parameters. */ +export interface BackupShortTermRetentionPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type BackupShortTermRetentionPoliciesGetResponse = BackupShortTermRetentionPolicy; + +/** Optional parameters. */ +export interface BackupShortTermRetentionPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for PauseDelayTimeUnit. \ - * {@link KnownPauseDelayTimeUnit} can be used interchangeably with PauseDelayTimeUnit, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Minutes** - */ -export type PauseDelayTimeUnit = string; +/** Contains response data for the createOrUpdate operation. */ +export type BackupShortTermRetentionPoliciesCreateOrUpdateResponse = BackupShortTermRetentionPolicy; -/** Known values of {@link StorageCapabilityStorageAccountType} that the service accepts. */ -export enum KnownStorageCapabilityStorageAccountType { - /** GRS */ - GRS = "GRS", - /** LRS */ - LRS = "LRS", - /** ZRS */ - ZRS = "ZRS" +/** Optional parameters. */ +export interface BackupShortTermRetentionPoliciesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for StorageCapabilityStorageAccountType. \ - * {@link KnownStorageCapabilityStorageAccountType} can be used interchangeably with StorageCapabilityStorageAccountType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GRS** \ - * **LRS** \ - * **ZRS** - */ -export type StorageCapabilityStorageAccountType = string; +/** Contains response data for the update operation. */ +export type BackupShortTermRetentionPoliciesUpdateResponse = BackupShortTermRetentionPolicy; + +/** Optional parameters. */ +export interface BackupShortTermRetentionPoliciesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseNext operation. */ +export type BackupShortTermRetentionPoliciesListByDatabaseNextResponse = BackupShortTermRetentionPolicyListResult; + +/** Optional parameters. */ +export interface ServerBlobAuditingPoliciesListByServerOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServer operation. */ +export type ServerBlobAuditingPoliciesListByServerResponse = ServerBlobAuditingPolicyListResult; -/** Known values of {@link LongTermRetentionPolicyName} that the service accepts. */ -export enum KnownLongTermRetentionPolicyName { - /** Default */ - Default = "default" -} +/** Optional parameters. */ +export interface ServerBlobAuditingPoliciesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for LongTermRetentionPolicyName. \ - * {@link KnownLongTermRetentionPolicyName} can be used interchangeably with LongTermRetentionPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **default** - */ -export type LongTermRetentionPolicyName = string; +/** Contains response data for the get operation. */ +export type ServerBlobAuditingPoliciesGetResponse = ServerBlobAuditingPolicy; -/** Known values of {@link DayOfWeek} that the service accepts. */ -export enum KnownDayOfWeek { - /** Sunday */ - Sunday = "Sunday", - /** Monday */ - Monday = "Monday", - /** Tuesday */ - Tuesday = "Tuesday", - /** Wednesday */ - Wednesday = "Wednesday", - /** Thursday */ - Thursday = "Thursday", - /** Friday */ - Friday = "Friday", - /** Saturday */ - Saturday = "Saturday" +/** Optional parameters. */ +export interface ServerBlobAuditingPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for DayOfWeek. \ - * {@link KnownDayOfWeek} can be used interchangeably with DayOfWeek, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Sunday** \ - * **Monday** \ - * **Tuesday** \ - * **Wednesday** \ - * **Thursday** \ - * **Friday** \ - * **Saturday** - */ -export type DayOfWeek = string; +/** Contains response data for the createOrUpdate operation. */ +export type ServerBlobAuditingPoliciesCreateOrUpdateResponse = ServerBlobAuditingPolicy; -/** Known values of {@link ManagedShortTermRetentionPolicyName} that the service accepts. */ -export enum KnownManagedShortTermRetentionPolicyName { - /** Default */ - Default = "default" -} +/** Optional parameters. */ +export interface ServerBlobAuditingPoliciesListByServerNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedShortTermRetentionPolicyName. \ - * {@link KnownManagedShortTermRetentionPolicyName} can be used interchangeably with ManagedShortTermRetentionPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **default** - */ -export type ManagedShortTermRetentionPolicyName = string; +/** Contains response data for the listByServerNext operation. */ +export type ServerBlobAuditingPoliciesListByServerNextResponse = ServerBlobAuditingPolicyListResult; -/** Known values of {@link QueryTimeGrainType} that the service accepts. */ -export enum KnownQueryTimeGrainType { - /** PT1H */ - PT1H = "PT1H", - /** P1D */ - P1D = "P1D" -} +/** Optional parameters. */ +export interface DatabaseBlobAuditingPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for QueryTimeGrainType. \ - * {@link KnownQueryTimeGrainType} can be used interchangeably with QueryTimeGrainType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PT1H** \ - * **P1D** - */ -export type QueryTimeGrainType = string; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseBlobAuditingPoliciesListByDatabaseResponse = DatabaseBlobAuditingPolicyListResult; -/** Known values of {@link QueryMetricUnitType} that the service accepts. */ -export enum KnownQueryMetricUnitType { - /** Percentage */ - Percentage = "percentage", - /** KB */ - KB = "KB", - /** Microseconds */ - Microseconds = "microseconds", - /** Count */ - Count = "count" -} +/** Optional parameters. */ +export interface DatabaseBlobAuditingPoliciesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for QueryMetricUnitType. \ - * {@link KnownQueryMetricUnitType} can be used interchangeably with QueryMetricUnitType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **percentage** \ - * **KB** \ - * **microseconds** \ - * **count** - */ -export type QueryMetricUnitType = string; +/** Contains response data for the get operation. */ +export type DatabaseBlobAuditingPoliciesGetResponse = DatabaseBlobAuditingPolicy; -/** Known values of {@link RestoreDetailsName} that the service accepts. */ -export enum KnownRestoreDetailsName { - /** Default */ - Default = "Default" -} +/** Optional parameters. */ +export interface DatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for RestoreDetailsName. \ - * {@link KnownRestoreDetailsName} can be used interchangeably with RestoreDetailsName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** - */ -export type RestoreDetailsName = string; +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseBlobAuditingPoliciesCreateOrUpdateResponse = DatabaseBlobAuditingPolicy; -/** Known values of {@link ManagedDatabaseStatus} that the service accepts. */ -export enum KnownManagedDatabaseStatus { - /** Online */ - Online = "Online", - /** Offline */ - Offline = "Offline", - /** Shutdown */ - Shutdown = "Shutdown", - /** Creating */ - Creating = "Creating", - /** Inaccessible */ - Inaccessible = "Inaccessible", - /** Restoring */ - Restoring = "Restoring", - /** Updating */ - Updating = "Updating" -} +/** Optional parameters. */ +export interface DatabaseBlobAuditingPoliciesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedDatabaseStatus. \ - * {@link KnownManagedDatabaseStatus} can be used interchangeably with ManagedDatabaseStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Online** \ - * **Offline** \ - * **Shutdown** \ - * **Creating** \ - * **Inaccessible** \ - * **Restoring** \ - * **Updating** - */ -export type ManagedDatabaseStatus = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseBlobAuditingPoliciesListByDatabaseNextResponse = DatabaseBlobAuditingPolicyListResult; -/** Known values of {@link CatalogCollationType} that the service accepts. */ -export enum KnownCatalogCollationType { - /** DatabaseDefault */ - DatabaseDefault = "DATABASE_DEFAULT", - /** SQLLatin1GeneralCP1CIAS */ - SQLLatin1GeneralCP1CIAS = "SQL_Latin1_General_CP1_CI_AS" -} +/** Optional parameters. */ +export interface ExtendedDatabaseBlobAuditingPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for CatalogCollationType. \ - * {@link KnownCatalogCollationType} can be used interchangeably with CatalogCollationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **DATABASE_DEFAULT** \ - * **SQL_Latin1_General_CP1_CI_AS** - */ -export type CatalogCollationType = string; +/** Contains response data for the listByDatabase operation. */ +export type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseResponse = ExtendedDatabaseBlobAuditingPolicyListResult; -/** Known values of {@link ManagedDatabaseCreateMode} that the service accepts. */ -export enum KnownManagedDatabaseCreateMode { - /** Default */ - Default = "Default", - /** RestoreExternalBackup */ - RestoreExternalBackup = "RestoreExternalBackup", - /** PointInTimeRestore */ - PointInTimeRestore = "PointInTimeRestore", - /** Recovery */ - Recovery = "Recovery", - /** RestoreLongTermRetentionBackup */ - RestoreLongTermRetentionBackup = "RestoreLongTermRetentionBackup" -} +/** Optional parameters. */ +export interface ExtendedDatabaseBlobAuditingPoliciesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedDatabaseCreateMode. \ - * {@link KnownManagedDatabaseCreateMode} can be used interchangeably with ManagedDatabaseCreateMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **RestoreExternalBackup** \ - * **PointInTimeRestore** \ - * **Recovery** \ - * **RestoreLongTermRetentionBackup** - */ -export type ManagedDatabaseCreateMode = string; +/** Contains response data for the get operation. */ +export type ExtendedDatabaseBlobAuditingPoliciesGetResponse = ExtendedDatabaseBlobAuditingPolicy; -/** Known values of {@link TransparentDataEncryptionName} that the service accepts. */ -export enum KnownTransparentDataEncryptionName { - /** Current */ - Current = "current" -} +/** Optional parameters. */ +export interface ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for TransparentDataEncryptionName. \ - * {@link KnownTransparentDataEncryptionName} can be used interchangeably with TransparentDataEncryptionName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **current** - */ -export type TransparentDataEncryptionName = string; +/** Contains response data for the createOrUpdate operation. */ +export type ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateResponse = ExtendedDatabaseBlobAuditingPolicy; -/** Known values of {@link ManagedInstanceAdministratorType} that the service accepts. */ -export enum KnownManagedInstanceAdministratorType { - /** ActiveDirectory */ - ActiveDirectory = "ActiveDirectory" -} +/** Optional parameters. */ +export interface ExtendedDatabaseBlobAuditingPoliciesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedInstanceAdministratorType. \ - * {@link KnownManagedInstanceAdministratorType} can be used interchangeably with ManagedInstanceAdministratorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ActiveDirectory** - */ -export type ManagedInstanceAdministratorType = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseNextResponse = ExtendedDatabaseBlobAuditingPolicyListResult; -/** Known values of {@link AdministratorName} that the service accepts. */ -export enum KnownAdministratorName { - /** ActiveDirectory */ - ActiveDirectory = "ActiveDirectory" -} +/** Optional parameters. */ +export interface ExtendedServerBlobAuditingPoliciesListByServerOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for AdministratorName. \ - * {@link KnownAdministratorName} can be used interchangeably with AdministratorName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ActiveDirectory** - */ -export type AdministratorName = string; +/** Contains response data for the listByServer operation. */ +export type ExtendedServerBlobAuditingPoliciesListByServerResponse = ExtendedServerBlobAuditingPolicyListResult; -/** Known values of {@link AuthenticationName} that the service accepts. */ -export enum KnownAuthenticationName { - /** Default */ - Default = "Default" -} +/** Optional parameters. */ +export interface ExtendedServerBlobAuditingPoliciesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for AuthenticationName. \ - * {@link KnownAuthenticationName} can be used interchangeably with AuthenticationName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** - */ -export type AuthenticationName = string; +/** Contains response data for the get operation. */ +export type ExtendedServerBlobAuditingPoliciesGetResponse = ExtendedServerBlobAuditingPolicy; -/** Known values of {@link ManagedInstanceLongTermRetentionPolicyName} that the service accepts. */ -export enum KnownManagedInstanceLongTermRetentionPolicyName { - /** Default */ - Default = "default" +/** Optional parameters. */ +export interface ExtendedServerBlobAuditingPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for ManagedInstanceLongTermRetentionPolicyName. \ - * {@link KnownManagedInstanceLongTermRetentionPolicyName} can be used interchangeably with ManagedInstanceLongTermRetentionPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **default** - */ -export type ManagedInstanceLongTermRetentionPolicyName = string; +/** Contains response data for the createOrUpdate operation. */ +export type ExtendedServerBlobAuditingPoliciesCreateOrUpdateResponse = ExtendedServerBlobAuditingPolicy; -/** Known values of {@link ManagementOperationState} that the service accepts. */ -export enum KnownManagementOperationState { - /** Pending */ - Pending = "Pending", - /** InProgress */ - InProgress = "InProgress", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** CancelInProgress */ - CancelInProgress = "CancelInProgress", - /** Cancelled */ - Cancelled = "Cancelled" -} +/** Optional parameters. */ +export interface ExtendedServerBlobAuditingPoliciesListByServerNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagementOperationState. \ - * {@link KnownManagementOperationState} can be used interchangeably with ManagementOperationState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pending** \ - * **InProgress** \ - * **Succeeded** \ - * **Failed** \ - * **CancelInProgress** \ - * **Cancelled** - */ -export type ManagementOperationState = string; +/** Contains response data for the listByServerNext operation. */ +export type ExtendedServerBlobAuditingPoliciesListByServerNextResponse = ExtendedServerBlobAuditingPolicyListResult; -/** Known values of {@link UpsertManagedServerOperationStepStatus} that the service accepts. */ -export enum KnownUpsertManagedServerOperationStepStatus { - /** NotStarted */ - NotStarted = "NotStarted", - /** InProgress */ - InProgress = "InProgress", - /** SlowedDown */ - SlowedDown = "SlowedDown", - /** Completed */ - Completed = "Completed", - /** Failed */ - Failed = "Failed", - /** Canceled */ - Canceled = "Canceled" -} +/** Optional parameters. */ +export interface DataMaskingPoliciesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for UpsertManagedServerOperationStepStatus. \ - * {@link KnownUpsertManagedServerOperationStepStatus} can be used interchangeably with UpsertManagedServerOperationStepStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotStarted** \ - * **InProgress** \ - * **SlowedDown** \ - * **Completed** \ - * **Failed** \ - * **Canceled** - */ -export type UpsertManagedServerOperationStepStatus = string; +/** Contains response data for the get operation. */ +export type DataMaskingPoliciesGetResponse = DataMaskingPolicy; -/** Known values of {@link OperationOrigin} that the service accepts. */ -export enum KnownOperationOrigin { - /** User */ - User = "user", - /** System */ - System = "system" -} +/** Optional parameters. */ +export interface DataMaskingPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for OperationOrigin. \ - * {@link KnownOperationOrigin} can be used interchangeably with OperationOrigin, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **user** \ - * **system** - */ -export type OperationOrigin = string; +/** Contains response data for the createOrUpdate operation. */ +export type DataMaskingPoliciesCreateOrUpdateResponse = DataMaskingPolicy; -/** Known values of {@link PrivateLinkServiceConnectionStateStatus} that the service accepts. */ -export enum KnownPrivateLinkServiceConnectionStateStatus { - /** Approved */ - Approved = "Approved", - /** Pending */ - Pending = "Pending", - /** Rejected */ - Rejected = "Rejected", - /** Disconnected */ - Disconnected = "Disconnected" -} +/** Optional parameters. */ +export interface DataMaskingRulesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for PrivateLinkServiceConnectionStateStatus. \ - * {@link KnownPrivateLinkServiceConnectionStateStatus} can be used interchangeably with PrivateLinkServiceConnectionStateStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Approved** \ - * **Pending** \ - * **Rejected** \ - * **Disconnected** - */ -export type PrivateLinkServiceConnectionStateStatus = string; +/** Contains response data for the listByDatabase operation. */ +export type DataMaskingRulesListByDatabaseResponse = DataMaskingRuleListResult; -/** Known values of {@link PrivateLinkServiceConnectionStateActionsRequire} that the service accepts. */ -export enum KnownPrivateLinkServiceConnectionStateActionsRequire { - /** None */ - None = "None" -} +/** Optional parameters. */ +export interface DataMaskingRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for PrivateLinkServiceConnectionStateActionsRequire. \ - * {@link KnownPrivateLinkServiceConnectionStateActionsRequire} can be used interchangeably with PrivateLinkServiceConnectionStateActionsRequire, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** - */ -export type PrivateLinkServiceConnectionStateActionsRequire = string; +/** Contains response data for the createOrUpdate operation. */ +export type DataMaskingRulesCreateOrUpdateResponse = DataMaskingRule; -/** Known values of {@link PrivateEndpointProvisioningState} that the service accepts. */ -export enum KnownPrivateEndpointProvisioningState { - /** Approving */ - Approving = "Approving", - /** Ready */ - Ready = "Ready", - /** Dropping */ - Dropping = "Dropping", - /** Failed */ - Failed = "Failed", - /** Rejecting */ - Rejecting = "Rejecting" -} +/** Optional parameters. */ +export interface DataMaskingRulesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for PrivateEndpointProvisioningState. \ - * {@link KnownPrivateEndpointProvisioningState} can be used interchangeably with PrivateEndpointProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Approving** \ - * **Ready** \ - * **Dropping** \ - * **Failed** \ - * **Rejecting** - */ -export type PrivateEndpointProvisioningState = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DataMaskingRulesListByDatabaseNextResponse = DataMaskingRuleListResult; -/** Known values of {@link AdministratorType} that the service accepts. */ -export enum KnownAdministratorType { - /** ActiveDirectory */ - ActiveDirectory = "ActiveDirectory" -} +/** Optional parameters. */ +export interface DataWarehouseUserActivitiesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for AdministratorType. \ - * {@link KnownAdministratorType} can be used interchangeably with AdministratorType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ActiveDirectory** - */ -export type AdministratorType = string; +/** Contains response data for the listByDatabase operation. */ +export type DataWarehouseUserActivitiesListByDatabaseResponse = DataWarehouseUserActivitiesListResult; + +/** Optional parameters. */ +export interface DataWarehouseUserActivitiesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DataWarehouseUserActivitiesGetResponse = DataWarehouseUserActivities; -/** Known values of {@link ServerTrustGroupPropertiesTrustScopesItem} that the service accepts. */ -export enum KnownServerTrustGroupPropertiesTrustScopesItem { - /** GlobalTransactions */ - GlobalTransactions = "GlobalTransactions", - /** ServiceBroker */ - ServiceBroker = "ServiceBroker" -} +/** Optional parameters. */ +export interface DataWarehouseUserActivitiesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ServerTrustGroupPropertiesTrustScopesItem. \ - * {@link KnownServerTrustGroupPropertiesTrustScopesItem} can be used interchangeably with ServerTrustGroupPropertiesTrustScopesItem, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GlobalTransactions** \ - * **ServiceBroker** - */ -export type ServerTrustGroupPropertiesTrustScopesItem = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DataWarehouseUserActivitiesListByDatabaseNextResponse = DataWarehouseUserActivitiesListResult; -/** Known values of {@link SqlAgentConfigurationPropertiesState} that the service accepts. */ -export enum KnownSqlAgentConfigurationPropertiesState { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" -} +/** Optional parameters. */ +export interface DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SqlAgentConfigurationPropertiesState. \ - * {@link KnownSqlAgentConfigurationPropertiesState} can be used interchangeably with SqlAgentConfigurationPropertiesState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type SqlAgentConfigurationPropertiesState = string; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse = DatabaseAdvancedThreatProtectionListResult; -/** Known values of {@link SyncAgentState} that the service accepts. */ -export enum KnownSyncAgentState { - /** Online */ - Online = "Online", - /** Offline */ - Offline = "Offline", - /** NeverConnected */ - NeverConnected = "NeverConnected" -} +/** Optional parameters. */ +export interface DatabaseAdvancedThreatProtectionSettingsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SyncAgentState. \ - * {@link KnownSyncAgentState} can be used interchangeably with SyncAgentState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Online** \ - * **Offline** \ - * **NeverConnected** - */ -export type SyncAgentState = string; +/** Contains response data for the get operation. */ +export type DatabaseAdvancedThreatProtectionSettingsGetResponse = DatabaseAdvancedThreatProtection; -/** Known values of {@link SyncMemberDbType} that the service accepts. */ -export enum KnownSyncMemberDbType { - /** AzureSqlDatabase */ - AzureSqlDatabase = "AzureSqlDatabase", - /** SqlServerDatabase */ - SqlServerDatabase = "SqlServerDatabase" -} +/** Optional parameters. */ +export interface DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SyncMemberDbType. \ - * {@link KnownSyncMemberDbType} can be used interchangeably with SyncMemberDbType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AzureSqlDatabase** \ - * **SqlServerDatabase** - */ -export type SyncMemberDbType = string; +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse = DatabaseAdvancedThreatProtection; -/** Known values of {@link Enum60} that the service accepts. */ -export enum KnownEnum60 { - /** All */ - All = "All", - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning", - /** Success */ - Success = "Success" -} +/** Optional parameters. */ +export interface DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for Enum60. \ - * {@link KnownEnum60} can be used interchangeably with Enum60, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **All** \ - * **Error** \ - * **Warning** \ - * **Success** - */ -export type Enum60 = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse = DatabaseAdvancedThreatProtectionListResult; -/** Known values of {@link SyncGroupLogType} that the service accepts. */ -export enum KnownSyncGroupLogType { - /** All */ - All = "All", - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning", - /** Success */ - Success = "Success" +/** Optional parameters. */ +export interface DatabaseAdvisorsListByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; } -/** - * Defines values for SyncGroupLogType. \ - * {@link KnownSyncGroupLogType} can be used interchangeably with SyncGroupLogType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **All** \ - * **Error** \ - * **Warning** \ - * **Success** - */ -export type SyncGroupLogType = string; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseAdvisorsListByDatabaseResponse = Advisor[]; -/** Known values of {@link SyncConflictResolutionPolicy} that the service accepts. */ -export enum KnownSyncConflictResolutionPolicy { - /** HubWin */ - HubWin = "HubWin", - /** MemberWin */ - MemberWin = "MemberWin" -} +/** Optional parameters. */ +export interface DatabaseAdvisorsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SyncConflictResolutionPolicy. \ - * {@link KnownSyncConflictResolutionPolicy} can be used interchangeably with SyncConflictResolutionPolicy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **HubWin** \ - * **MemberWin** - */ -export type SyncConflictResolutionPolicy = string; +/** Contains response data for the get operation. */ +export type DatabaseAdvisorsGetResponse = Advisor; -/** Known values of {@link SyncGroupState} that the service accepts. */ -export enum KnownSyncGroupState { - /** NotReady */ - NotReady = "NotReady", - /** Error */ - Error = "Error", - /** Warning */ - Warning = "Warning", - /** Progressing */ - Progressing = "Progressing", - /** Good */ - Good = "Good" -} +/** Optional parameters. */ +export interface DatabaseAdvisorsUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SyncGroupState. \ - * {@link KnownSyncGroupState} can be used interchangeably with SyncGroupState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **NotReady** \ - * **Error** \ - * **Warning** \ - * **Progressing** \ - * **Good** - */ -export type SyncGroupState = string; +/** Contains response data for the update operation. */ +export type DatabaseAdvisorsUpdateResponse = Advisor; -/** Known values of {@link SyncDirection} that the service accepts. */ -export enum KnownSyncDirection { - /** Bidirectional */ - Bidirectional = "Bidirectional", - /** OneWayMemberToHub */ - OneWayMemberToHub = "OneWayMemberToHub", - /** OneWayHubToMember */ - OneWayHubToMember = "OneWayHubToMember" -} +/** Optional parameters. */ +export interface DatabaseAutomaticTuningGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SyncDirection. \ - * {@link KnownSyncDirection} can be used interchangeably with SyncDirection, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Bidirectional** \ - * **OneWayMemberToHub** \ - * **OneWayHubToMember** - */ -export type SyncDirection = string; +/** Contains response data for the get operation. */ +export type DatabaseAutomaticTuningGetResponse = DatabaseAutomaticTuning; -/** Known values of {@link SyncMemberState} that the service accepts. */ -export enum KnownSyncMemberState { - /** SyncInProgress */ - SyncInProgress = "SyncInProgress", - /** SyncSucceeded */ - SyncSucceeded = "SyncSucceeded", - /** SyncFailed */ - SyncFailed = "SyncFailed", - /** DisabledTombstoneCleanup */ - DisabledTombstoneCleanup = "DisabledTombstoneCleanup", - /** DisabledBackupRestore */ - DisabledBackupRestore = "DisabledBackupRestore", - /** SyncSucceededWithWarnings */ - SyncSucceededWithWarnings = "SyncSucceededWithWarnings", - /** SyncCancelling */ - SyncCancelling = "SyncCancelling", - /** SyncCancelled */ - SyncCancelled = "SyncCancelled", - /** UnProvisioned */ - UnProvisioned = "UnProvisioned", - /** Provisioning */ - Provisioning = "Provisioning", - /** Provisioned */ - Provisioned = "Provisioned", - /** ProvisionFailed */ - ProvisionFailed = "ProvisionFailed", - /** DeProvisioning */ - DeProvisioning = "DeProvisioning", - /** DeProvisioned */ - DeProvisioned = "DeProvisioned", - /** DeProvisionFailed */ - DeProvisionFailed = "DeProvisionFailed", - /** Reprovisioning */ - Reprovisioning = "Reprovisioning", - /** ReprovisionFailed */ - ReprovisionFailed = "ReprovisionFailed", - /** UnReprovisioned */ - UnReprovisioned = "UnReprovisioned" +/** Optional parameters. */ +export interface DatabaseAutomaticTuningUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type DatabaseAutomaticTuningUpdateResponse = DatabaseAutomaticTuning; + +/** Optional parameters. */ +export interface DatabaseColumnsListByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Array of Get3ItemsItem */ + schema?: string[]; + /** Array of Get4ItemsItem */ + table?: string[]; + /** Array of Get5ItemsItem */ + column?: string[]; + /** Array of Get6ItemsItem */ + orderBy?: string[]; + /** An opaque token that identifies a starting point in the collection. */ + skiptoken?: string; } -/** - * Defines values for SyncMemberState. \ - * {@link KnownSyncMemberState} can be used interchangeably with SyncMemberState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SyncInProgress** \ - * **SyncSucceeded** \ - * **SyncFailed** \ - * **DisabledTombstoneCleanup** \ - * **DisabledBackupRestore** \ - * **SyncSucceededWithWarnings** \ - * **SyncCancelling** \ - * **SyncCancelled** \ - * **UnProvisioned** \ - * **Provisioning** \ - * **Provisioned** \ - * **ProvisionFailed** \ - * **DeProvisioning** \ - * **DeProvisioned** \ - * **DeProvisionFailed** \ - * **Reprovisioning** \ - * **ReprovisionFailed** \ - * **UnReprovisioned** - */ -export type SyncMemberState = string; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseColumnsListByDatabaseResponse = DatabaseColumnListResult; -/** Known values of {@link DnsRefreshConfigurationPropertiesStatus} that the service accepts. */ -export enum KnownDnsRefreshConfigurationPropertiesStatus { - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed" +/** Optional parameters. */ +export interface DatabaseColumnsListByTableOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; } -/** - * Defines values for DnsRefreshConfigurationPropertiesStatus. \ - * {@link KnownDnsRefreshConfigurationPropertiesStatus} can be used interchangeably with DnsRefreshConfigurationPropertiesStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Succeeded** \ - * **Failed** - */ -export type DnsRefreshConfigurationPropertiesStatus = string; +/** Contains response data for the listByTable operation. */ +export type DatabaseColumnsListByTableResponse = DatabaseColumnListResult; -/** Known values of {@link VirtualNetworkRuleState} that the service accepts. */ -export enum KnownVirtualNetworkRuleState { - /** Initializing */ - Initializing = "Initializing", - /** InProgress */ - InProgress = "InProgress", - /** Ready */ - Ready = "Ready", - /** Failed */ - Failed = "Failed", - /** Deleting */ - Deleting = "Deleting", - /** Unknown */ - Unknown = "Unknown" -} +/** Optional parameters. */ +export interface DatabaseColumnsGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for VirtualNetworkRuleState. \ - * {@link KnownVirtualNetworkRuleState} can be used interchangeably with VirtualNetworkRuleState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Initializing** \ - * **InProgress** \ - * **Ready** \ - * **Failed** \ - * **Deleting** \ - * **Unknown** - */ -export type VirtualNetworkRuleState = string; +/** Contains response data for the get operation. */ +export type DatabaseColumnsGetResponse = DatabaseColumn; -/** Known values of {@link ShortTermRetentionPolicyName} that the service accepts. */ -export enum KnownShortTermRetentionPolicyName { - /** Default */ - Default = "default" -} +/** Optional parameters. */ +export interface DatabaseColumnsListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ShortTermRetentionPolicyName. \ - * {@link KnownShortTermRetentionPolicyName} can be used interchangeably with ShortTermRetentionPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **default** - */ -export type ShortTermRetentionPolicyName = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseColumnsListByDatabaseNextResponse = DatabaseColumnListResult; -/** Known values of {@link DiffBackupIntervalInHours} that the service accepts. */ -export enum KnownDiffBackupIntervalInHours { - /** Twelve */ - Twelve = 12, - /** TwentyFour */ - TwentyFour = 24 -} +/** Optional parameters. */ +export interface DatabaseColumnsListByTableNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DiffBackupIntervalInHours. \ - * {@link KnownDiffBackupIntervalInHours} can be used interchangeably with DiffBackupIntervalInHours, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **12** \ - * **24** - */ -export type DiffBackupIntervalInHours = number; +/** Contains response data for the listByTableNext operation. */ +export type DatabaseColumnsListByTableNextResponse = DatabaseColumnListResult; -/** Known values of {@link OperationMode} that the service accepts. */ -export enum KnownOperationMode { - /** PolybaseImport */ - PolybaseImport = "PolybaseImport" +/** Optional parameters. */ +export interface DatabaseEncryptionProtectorsRevalidateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for OperationMode. \ - * {@link KnownOperationMode} can be used interchangeably with OperationMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PolybaseImport** - */ -export type OperationMode = string; - -/** Known values of {@link StorageKeyType} that the service accepts. */ -export enum KnownStorageKeyType { - /** SharedAccessKey */ - SharedAccessKey = "SharedAccessKey", - /** StorageAccessKey */ - StorageAccessKey = "StorageAccessKey" +/** Optional parameters. */ +export interface DatabaseEncryptionProtectorsRevertOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for StorageKeyType. \ - * {@link KnownStorageKeyType} can be used interchangeably with StorageKeyType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SharedAccessKey** \ - * **StorageAccessKey** - */ -export type StorageKeyType = string; +/** Optional parameters. */ +export interface DatabaseExtensionsListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link LedgerDigestUploadsName} that the service accepts. */ -export enum KnownLedgerDigestUploadsName { - /** Current */ - Current = "current" -} +/** Contains response data for the listByDatabase operation. */ +export type DatabaseExtensionsListByDatabaseResponse = ImportExportExtensionsOperationListResult; -/** - * Defines values for LedgerDigestUploadsName. \ - * {@link KnownLedgerDigestUploadsName} can be used interchangeably with LedgerDigestUploadsName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **current** - */ -export type LedgerDigestUploadsName = string; +/** Optional parameters. */ +export interface DatabaseExtensionsGetOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link ReplicationState} that the service accepts. */ -export enum KnownReplicationState { - /** Pending */ - Pending = "PENDING", - /** Seeding */ - Seeding = "SEEDING", - /** CatchUP */ - CatchUP = "CATCH_UP", - /** Suspended */ - Suspended = "SUSPENDED" +/** Optional parameters. */ +export interface DatabaseExtensionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for ReplicationState. \ - * {@link KnownReplicationState} can be used interchangeably with ReplicationState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **PENDING** \ - * **SEEDING** \ - * **CATCH_UP** \ - * **SUSPENDED** - */ -export type ReplicationState = string; +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseExtensionsCreateOrUpdateResponse = ImportExportExtensionsOperationResult; + +/** Optional parameters. */ +export interface DatabaseExtensionsListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseExtensionsListByDatabaseNextResponse = ImportExportExtensionsOperationListResult; + +/** Optional parameters. */ +export interface DatabaseOperationsListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type DatabaseOperationsListByDatabaseResponse = DatabaseOperationListResult; + +/** Optional parameters. */ +export interface DatabaseOperationsCancelOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DatabaseOperationsListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseOperationsListByDatabaseNextResponse = DatabaseOperationListResult; + +/** Optional parameters. */ +export interface DatabaseRecommendedActionsListByDatabaseAdvisorOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseAdvisor operation. */ +export type DatabaseRecommendedActionsListByDatabaseAdvisorResponse = RecommendedAction[]; + +/** Optional parameters. */ +export interface DatabaseRecommendedActionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DatabaseRecommendedActionsGetResponse = RecommendedAction; + +/** Optional parameters. */ +export interface DatabaseRecommendedActionsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type DatabaseRecommendedActionsUpdateResponse = RecommendedAction; -/** Known values of {@link ReplicationLinkType} that the service accepts. */ -export enum KnownReplicationLinkType { - /** GEO */ - GEO = "GEO", - /** Named */ - Named = "NAMED" +/** Optional parameters. */ +export interface DatabaseSchemasListByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; } -/** - * Defines values for ReplicationLinkType. \ - * {@link KnownReplicationLinkType} can be used interchangeably with ReplicationLinkType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **GEO** \ - * **NAMED** - */ -export type ReplicationLinkType = string; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseSchemasListByDatabaseResponse = DatabaseSchemaListResult; -/** Known values of {@link IdentityType} that the service accepts. */ -export enum KnownIdentityType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned", - /** UserAssigned */ - UserAssigned = "UserAssigned", - /** SystemAssignedUserAssigned */ - SystemAssignedUserAssigned = "SystemAssigned,UserAssigned" -} +/** Optional parameters. */ +export interface DatabaseSchemasGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for IdentityType. \ - * {@link KnownIdentityType} can be used interchangeably with IdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** \ - * **UserAssigned** \ - * **SystemAssigned,UserAssigned** - */ -export type IdentityType = string; +/** Contains response data for the get operation. */ +export type DatabaseSchemasGetResponse = DatabaseSchema; -/** Known values of {@link ServerNetworkAccessFlag} that the service accepts. */ -export enum KnownServerNetworkAccessFlag { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" -} +/** Optional parameters. */ +export interface DatabaseSchemasListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ServerNetworkAccessFlag. \ - * {@link KnownServerNetworkAccessFlag} can be used interchangeably with ServerNetworkAccessFlag, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type ServerNetworkAccessFlag = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseSchemasListByDatabaseNextResponse = DatabaseSchemaListResult; -/** Known values of {@link ServerWorkspaceFeature} that the service accepts. */ -export enum KnownServerWorkspaceFeature { - /** Connected */ - Connected = "Connected", - /** Disconnected */ - Disconnected = "Disconnected" -} +/** Optional parameters. */ +export interface DatabaseSecurityAlertPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ServerWorkspaceFeature. \ - * {@link KnownServerWorkspaceFeature} can be used interchangeably with ServerWorkspaceFeature, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Connected** \ - * **Disconnected** - */ -export type ServerWorkspaceFeature = string; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseSecurityAlertPoliciesListByDatabaseResponse = DatabaseSecurityAlertListResult; -/** Known values of {@link PrincipalType} that the service accepts. */ -export enum KnownPrincipalType { - /** User */ - User = "User", - /** Group */ - Group = "Group", - /** Application */ - Application = "Application" -} +/** Optional parameters. */ +export interface DatabaseSecurityAlertPoliciesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for PrincipalType. \ - * {@link KnownPrincipalType} can be used interchangeably with PrincipalType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **User** \ - * **Group** \ - * **Application** - */ -export type PrincipalType = string; +/** Contains response data for the get operation. */ +export type DatabaseSecurityAlertPoliciesGetResponse = DatabaseSecurityAlertPolicy; -/** Known values of {@link DatabaseIdentityType} that the service accepts. */ -export enum KnownDatabaseIdentityType { - /** None */ - None = "None", - /** UserAssigned */ - UserAssigned = "UserAssigned" -} +/** Optional parameters. */ +export interface DatabaseSecurityAlertPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DatabaseIdentityType. \ - * {@link KnownDatabaseIdentityType} can be used interchangeably with DatabaseIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **UserAssigned** - */ -export type DatabaseIdentityType = string; +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseSecurityAlertPoliciesCreateOrUpdateResponse = DatabaseSecurityAlertPolicy; -/** Known values of {@link CreateMode} that the service accepts. */ -export enum KnownCreateMode { - /** Default */ - Default = "Default", - /** Copy */ - Copy = "Copy", - /** Secondary */ - Secondary = "Secondary", - /** PointInTimeRestore */ - PointInTimeRestore = "PointInTimeRestore", - /** Restore */ - Restore = "Restore", - /** Recovery */ - Recovery = "Recovery", - /** RestoreExternalBackup */ - RestoreExternalBackup = "RestoreExternalBackup", - /** RestoreExternalBackupSecondary */ - RestoreExternalBackupSecondary = "RestoreExternalBackupSecondary", - /** RestoreLongTermRetentionBackup */ - RestoreLongTermRetentionBackup = "RestoreLongTermRetentionBackup", - /** OnlineSecondary */ - OnlineSecondary = "OnlineSecondary" -} +/** Optional parameters. */ +export interface DatabaseSecurityAlertPoliciesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for CreateMode. \ - * {@link KnownCreateMode} can be used interchangeably with CreateMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **Copy** \ - * **Secondary** \ - * **PointInTimeRestore** \ - * **Restore** \ - * **Recovery** \ - * **RestoreExternalBackup** \ - * **RestoreExternalBackupSecondary** \ - * **RestoreLongTermRetentionBackup** \ - * **OnlineSecondary** - */ -export type CreateMode = string; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseSecurityAlertPoliciesListByDatabaseNextResponse = DatabaseSecurityAlertListResult; -/** Known values of {@link SampleName} that the service accepts. */ -export enum KnownSampleName { - /** AdventureWorksLT */ - AdventureWorksLT = "AdventureWorksLT", - /** WideWorldImportersStd */ - WideWorldImportersStd = "WideWorldImportersStd", - /** WideWorldImportersFull */ - WideWorldImportersFull = "WideWorldImportersFull" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SampleName. \ - * {@link KnownSampleName} can be used interchangeably with SampleName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **AdventureWorksLT** \ - * **WideWorldImportersStd** \ - * **WideWorldImportersFull** - */ -export type SampleName = string; +/** Contains response data for the listBySqlVulnerabilityAssessment operation. */ +export type DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; -/** Known values of {@link DatabaseStatus} that the service accepts. */ -export enum KnownDatabaseStatus { - /** Online */ - Online = "Online", - /** Restoring */ - Restoring = "Restoring", - /** RecoveryPending */ - RecoveryPending = "RecoveryPending", - /** Recovering */ - Recovering = "Recovering", - /** Suspect */ - Suspect = "Suspect", - /** Offline */ - Offline = "Offline", - /** Standby */ - Standby = "Standby", - /** Shutdown */ - Shutdown = "Shutdown", - /** EmergencyMode */ - EmergencyMode = "EmergencyMode", - /** AutoClosed */ - AutoClosed = "AutoClosed", - /** Copying */ - Copying = "Copying", - /** Creating */ - Creating = "Creating", - /** Inaccessible */ - Inaccessible = "Inaccessible", - /** OfflineSecondary */ - OfflineSecondary = "OfflineSecondary", - /** Pausing */ - Pausing = "Pausing", - /** Paused */ - Paused = "Paused", - /** Resuming */ - Resuming = "Resuming", - /** Scaling */ - Scaling = "Scaling", - /** OfflineChangingDwPerformanceTiers */ - OfflineChangingDwPerformanceTiers = "OfflineChangingDwPerformanceTiers", - /** OnlineChangingDwPerformanceTiers */ - OnlineChangingDwPerformanceTiers = "OnlineChangingDwPerformanceTiers", - /** Disabled */ - Disabled = "Disabled", - /** Stopping */ - Stopping = "Stopping", - /** Stopped */ - Stopped = "Stopped", - /** Starting */ - Starting = "Starting" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DatabaseSqlVulnerabilityAssessmentBaselinesGetResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; + +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DatabaseStatus. \ - * {@link KnownDatabaseStatus} can be used interchangeably with DatabaseStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Online** \ - * **Restoring** \ - * **RecoveryPending** \ - * **Recovering** \ - * **Suspect** \ - * **Offline** \ - * **Standby** \ - * **Shutdown** \ - * **EmergencyMode** \ - * **AutoClosed** \ - * **Copying** \ - * **Creating** \ - * **Inaccessible** \ - * **OfflineSecondary** \ - * **Pausing** \ - * **Paused** \ - * **Resuming** \ - * **Scaling** \ - * **OfflineChangingDwPerformanceTiers** \ - * **OnlineChangingDwPerformanceTiers** \ - * **Disabled** \ - * **Stopping** \ - * **Stopped** \ - * **Starting** - */ -export type DatabaseStatus = string; +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; -/** Known values of {@link DatabaseLicenseType} that the service accepts. */ -export enum KnownDatabaseLicenseType { - /** LicenseIncluded */ - LicenseIncluded = "LicenseIncluded", - /** BasePrice */ - BasePrice = "BasePrice" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DatabaseLicenseType. \ - * {@link KnownDatabaseLicenseType} can be used interchangeably with DatabaseLicenseType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LicenseIncluded** \ - * **BasePrice** - */ -export type DatabaseLicenseType = string; +/** Contains response data for the listBySqlVulnerabilityAssessmentNext operation. */ +export type DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; -/** Known values of {@link DatabaseReadScale} that the service accepts. */ -export enum KnownDatabaseReadScale { - /** Enabled */ - Enabled = "Enabled", - /** Disabled */ - Disabled = "Disabled" +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for DatabaseReadScale. \ - * {@link KnownDatabaseReadScale} can be used interchangeably with DatabaseReadScale, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Enabled** \ - * **Disabled** - */ -export type DatabaseReadScale = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link SecondaryType} that the service accepts. */ -export enum KnownSecondaryType { - /** Geo */ - Geo = "Geo", - /** Named */ - Named = "Named" -} +/** Contains response data for the listByBaseline operation. */ +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; -/** - * Defines values for SecondaryType. \ - * {@link KnownSecondaryType} can be used interchangeably with SecondaryType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Geo** \ - * **Named** - */ -export type SecondaryType = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link BackupStorageRedundancy} that the service accepts. */ -export enum KnownBackupStorageRedundancy { - /** Geo */ - Geo = "Geo", - /** Local */ - Local = "Local", - /** Zone */ - Zone = "Zone", - /** GeoZone */ - GeoZone = "GeoZone" -} +/** Contains response data for the get operation. */ +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; -/** - * Defines values for BackupStorageRedundancy. \ - * {@link KnownBackupStorageRedundancy} can be used interchangeably with BackupStorageRedundancy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Geo** \ - * **Local** \ - * **Zone** \ - * **GeoZone** - */ -export type BackupStorageRedundancy = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link ReplicaType} that the service accepts. */ -export enum KnownReplicaType { - /** Primary */ - Primary = "Primary", - /** ReadableSecondary */ - ReadableSecondary = "ReadableSecondary" -} +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; -/** - * Defines values for ReplicaType. \ - * {@link KnownReplicaType} can be used interchangeably with ReplicaType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Primary** \ - * **ReadableSecondary** - */ -export type ReplicaType = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link DatabaseState} that the service accepts. */ -export enum KnownDatabaseState { - /** All */ - All = "All", - /** Live */ - Live = "Live", - /** Deleted */ - Deleted = "Deleted" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DatabaseState. \ - * {@link KnownDatabaseState} can be used interchangeably with DatabaseState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **All** \ - * **Live** \ - * **Deleted** - */ -export type DatabaseState = string; +/** Contains response data for the listByBaselineNext operation. */ +export type DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; -/** Known values of {@link ManagedInstancePropertiesProvisioningState} that the service accepts. */ -export enum KnownManagedInstancePropertiesProvisioningState { - /** Creating */ - Creating = "Creating", - /** Deleting */ - Deleting = "Deleting", - /** Updating */ - Updating = "Updating", - /** Unknown */ - Unknown = "Unknown", - /** Succeeded */ - Succeeded = "Succeeded", - /** Failed */ - Failed = "Failed", - /** Accepted */ - Accepted = "Accepted", - /** Created */ - Created = "Created", - /** Deleted */ - Deleted = "Deleted", - /** Unrecognized */ - Unrecognized = "Unrecognized", - /** Running */ - Running = "Running", - /** Canceled */ - Canceled = "Canceled", - /** NotSpecified */ - NotSpecified = "NotSpecified", - /** Registering */ - Registering = "Registering", - /** TimedOut */ - TimedOut = "TimedOut" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedInstancePropertiesProvisioningState. \ - * {@link KnownManagedInstancePropertiesProvisioningState} can be used interchangeably with ManagedInstancePropertiesProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Deleting** \ - * **Updating** \ - * **Unknown** \ - * **Succeeded** \ - * **Failed** \ - * **Accepted** \ - * **Created** \ - * **Deleted** \ - * **Unrecognized** \ - * **Running** \ - * **Canceled** \ - * **NotSpecified** \ - * **Registering** \ - * **TimedOut** - */ -export type ManagedInstancePropertiesProvisioningState = string; +/** Contains response data for the listByScan operation. */ +export type DatabaseSqlVulnerabilityAssessmentScanResultListByScanResponse = SQLVulnerabilityAssessmentScanListResult; -/** Known values of {@link ManagedServerCreateMode} that the service accepts. */ -export enum KnownManagedServerCreateMode { - /** Default */ - Default = "Default", - /** PointInTimeRestore */ - PointInTimeRestore = "PointInTimeRestore" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedServerCreateMode. \ - * {@link KnownManagedServerCreateMode} can be used interchangeably with ManagedServerCreateMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **PointInTimeRestore** - */ -export type ManagedServerCreateMode = string; +/** Contains response data for the get operation. */ +export type DatabaseSqlVulnerabilityAssessmentScanResultGetResponse = SqlVulnerabilityAssessmentScanResults; -/** Known values of {@link ManagedInstanceLicenseType} that the service accepts. */ -export enum KnownManagedInstanceLicenseType { - /** LicenseIncluded */ - LicenseIncluded = "LicenseIncluded", - /** BasePrice */ - BasePrice = "BasePrice" -} +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedInstanceLicenseType. \ - * {@link KnownManagedInstanceLicenseType} can be used interchangeably with ManagedInstanceLicenseType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LicenseIncluded** \ - * **BasePrice** - */ -export type ManagedInstanceLicenseType = string; +/** Contains response data for the listByScanNext operation. */ +export type DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextResponse = SQLVulnerabilityAssessmentScanListResult; + +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBySqlVulnerabilityAssessments operation. */ +export type DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse = SqlVulnerabilityAssessmentScanRecordListResult; + +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link ManagedInstanceProxyOverride} that the service accepts. */ -export enum KnownManagedInstanceProxyOverride { - /** Proxy */ - Proxy = "Proxy", - /** Redirect */ - Redirect = "Redirect", - /** Default */ - Default = "Default" -} +/** Contains response data for the get operation. */ +export type DatabaseSqlVulnerabilityAssessmentScansGetResponse = SqlVulnerabilityAssessmentScanRecord; -/** - * Defines values for ManagedInstanceProxyOverride. \ - * {@link KnownManagedInstanceProxyOverride} can be used interchangeably with ManagedInstanceProxyOverride, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Proxy** \ - * **Redirect** \ - * **Default** - */ -export type ManagedInstanceProxyOverride = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link ServicePrincipalType} that the service accepts. */ -export enum KnownServicePrincipalType { - /** None */ - None = "None", - /** SystemAssigned */ - SystemAssigned = "SystemAssigned" -} +/** Contains response data for the listBySqlVulnerabilityAssessmentsNext operation. */ +export type DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse = SqlVulnerabilityAssessmentScanRecordListResult; -/** - * Defines values for ServicePrincipalType. \ - * {@link KnownServicePrincipalType} can be used interchangeably with ServicePrincipalType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **SystemAssigned** - */ -export type ServicePrincipalType = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link AggregationFunctionType} that the service accepts. */ -export enum KnownAggregationFunctionType { - /** Avg */ - Avg = "avg", - /** Min */ - Min = "min", - /** Max */ - Max = "max", - /** Stdev */ - Stdev = "stdev", - /** Sum */ - Sum = "sum" -} +/** Contains response data for the listByDatabase operation. */ +export type DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseResponse = SqlVulnerabilityAssessmentListResult; -/** - * Defines values for AggregationFunctionType. \ - * {@link KnownAggregationFunctionType} can be used interchangeably with AggregationFunctionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **avg** \ - * **min** \ - * **max** \ - * **stdev** \ - * **sum** - */ -export type AggregationFunctionType = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link MetricType} that the service accepts. */ -export enum KnownMetricType { - /** Cpu */ - Cpu = "cpu", - /** Io */ - Io = "io", - /** LogIo */ - LogIo = "logIo", - /** Duration */ - Duration = "duration", - /** Dtu */ - Dtu = "dtu" -} +/** Contains response data for the get operation. */ +export type DatabaseSqlVulnerabilityAssessmentsSettingsGetResponse = SqlVulnerabilityAssessment; -/** - * Defines values for MetricType. \ - * {@link KnownMetricType} can be used interchangeably with MetricType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **cpu** \ - * **io** \ - * **logIo** \ - * **duration** \ - * **dtu** - */ -export type MetricType = string; +/** Optional parameters. */ +export interface DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link ConnectionPolicyName} that the service accepts. */ -export enum KnownConnectionPolicyName { - /** Default */ - Default = "default" +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextResponse = SqlVulnerabilityAssessmentListResult; + +/** Optional parameters. */ +export interface DatabaseTablesListBySchemaOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; } -/** - * Defines values for ConnectionPolicyName. \ - * {@link KnownConnectionPolicyName} can be used interchangeably with ConnectionPolicyName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **default** - */ -export type ConnectionPolicyName = string; +/** Contains response data for the listBySchema operation. */ +export type DatabaseTablesListBySchemaResponse = DatabaseTableListResult; -/** Known values of {@link ServerConnectionType} that the service accepts. */ -export enum KnownServerConnectionType { - /** Default */ - Default = "Default", - /** Redirect */ - Redirect = "Redirect", - /** Proxy */ - Proxy = "Proxy" -} +/** Optional parameters. */ +export interface DatabaseTablesGetOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ServerConnectionType. \ - * {@link KnownServerConnectionType} can be used interchangeably with ServerConnectionType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Default** \ - * **Redirect** \ - * **Proxy** - */ -export type ServerConnectionType = string; +/** Contains response data for the get operation. */ +export type DatabaseTablesGetResponse = DatabaseTable; -/** Known values of {@link ServiceObjectiveName} that the service accepts. */ -export enum KnownServiceObjectiveName { - /** System */ - System = "System", - /** System0 */ - System0 = "System0", - /** System1 */ - System1 = "System1", - /** System2 */ - System2 = "System2", - /** System3 */ - System3 = "System3", - /** System4 */ - System4 = "System4", - /** System2L */ - System2L = "System2L", - /** System3L */ - System3L = "System3L", - /** System4L */ - System4L = "System4L", - /** Free */ - Free = "Free", - /** Basic */ - Basic = "Basic", - /** S0 */ - S0 = "S0", - /** S1 */ - S1 = "S1", - /** S2 */ - S2 = "S2", - /** S3 */ - S3 = "S3", - /** S4 */ - S4 = "S4", - /** S6 */ - S6 = "S6", - /** S7 */ - S7 = "S7", - /** S9 */ - S9 = "S9", - /** S12 */ - S12 = "S12", - /** P1 */ - P1 = "P1", - /** P2 */ - P2 = "P2", - /** P3 */ - P3 = "P3", - /** P4 */ - P4 = "P4", - /** P6 */ - P6 = "P6", - /** P11 */ - P11 = "P11", - /** P15 */ - P15 = "P15", - /** PRS1 */ - PRS1 = "PRS1", - /** PRS2 */ - PRS2 = "PRS2", - /** PRS4 */ - PRS4 = "PRS4", - /** PRS6 */ - PRS6 = "PRS6", - /** DW100 */ - DW100 = "DW100", - /** DW200 */ - DW200 = "DW200", - /** DW300 */ - DW300 = "DW300", - /** DW400 */ - DW400 = "DW400", - /** DW500 */ - DW500 = "DW500", - /** DW600 */ - DW600 = "DW600", - /** DW1000 */ - DW1000 = "DW1000", - /** DW1200 */ - DW1200 = "DW1200", - /** DW1000C */ - DW1000C = "DW1000c", - /** DW1500 */ - DW1500 = "DW1500", - /** DW1500C */ - DW1500C = "DW1500c", - /** DW2000 */ - DW2000 = "DW2000", - /** DW2000C */ - DW2000C = "DW2000c", - /** DW3000 */ - DW3000 = "DW3000", - /** DW2500C */ - DW2500C = "DW2500c", - /** DW3000C */ - DW3000C = "DW3000c", - /** DW6000 */ - DW6000 = "DW6000", - /** DW5000C */ - DW5000C = "DW5000c", - /** DW6000C */ - DW6000C = "DW6000c", - /** DW7500C */ - DW7500C = "DW7500c", - /** DW10000C */ - DW10000C = "DW10000c", - /** DW15000C */ - DW15000C = "DW15000c", - /** DW30000C */ - DW30000C = "DW30000c", - /** DS100 */ - DS100 = "DS100", - /** DS200 */ - DS200 = "DS200", - /** DS300 */ - DS300 = "DS300", - /** DS400 */ - DS400 = "DS400", - /** DS500 */ - DS500 = "DS500", - /** DS600 */ - DS600 = "DS600", - /** DS1000 */ - DS1000 = "DS1000", - /** DS1200 */ - DS1200 = "DS1200", - /** DS1500 */ - DS1500 = "DS1500", - /** DS2000 */ - DS2000 = "DS2000", - /** ElasticPool */ - ElasticPool = "ElasticPool" -} +/** Optional parameters. */ +export interface DatabaseTablesListBySchemaNextOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ServiceObjectiveName. \ - * {@link KnownServiceObjectiveName} can be used interchangeably with ServiceObjectiveName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **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** - */ -export type ServiceObjectiveName = string; -/** Defines values for DataMaskingState. */ -export type DataMaskingState = "Disabled" | "Enabled"; -/** Defines values for DataMaskingRuleState. */ -export type DataMaskingRuleState = "Disabled" | "Enabled"; -/** Defines values for DataMaskingFunction. */ -export type DataMaskingFunction = - | "Default" - | "CCN" - | "Email" - | "Number" - | "SSN" - | "Text"; -/** Defines values for GeoBackupPolicyState. */ -export type GeoBackupPolicyState = "Disabled" | "Enabled"; -/** Defines values for BlobAuditingPolicyState. */ -export type BlobAuditingPolicyState = "Enabled" | "Disabled"; -/** Defines values for AdvisorStatus. */ -export type AdvisorStatus = - | "GA" - | "PublicPreview" - | "LimitedPublicPreview" - | "PrivatePreview"; -/** Defines values for AutoExecuteStatus. */ -export type AutoExecuteStatus = "Enabled" | "Disabled" | "Default"; -/** Defines values for AutoExecuteStatusInheritedFrom. */ -export type AutoExecuteStatusInheritedFrom = - | "Default" - | "Subscription" - | "Server" - | "ElasticPool" - | "Database"; -/** Defines values for RecommendedActionInitiatedBy. */ -export type RecommendedActionInitiatedBy = "User" | "System"; -/** Defines values for ImplementationMethod. */ -export type ImplementationMethod = "TSql" | "AzurePowerShell"; -/** Defines values for IsRetryable. */ -export type IsRetryable = "Yes" | "No"; -/** Defines values for AutomaticTuningMode. */ -export type AutomaticTuningMode = "Inherit" | "Custom" | "Auto" | "Unspecified"; -/** Defines values for AutomaticTuningOptionModeDesired. */ -export type AutomaticTuningOptionModeDesired = "Off" | "On" | "Default"; -/** Defines values for AutomaticTuningOptionModeActual. */ -export type AutomaticTuningOptionModeActual = "Off" | "On"; -/** Defines values for AutomaticTuningDisabledReason. */ -export type AutomaticTuningDisabledReason = - | "Default" - | "Disabled" - | "AutoConfigured" - | "InheritedFromServer" - | "QueryStoreOff" - | "QueryStoreReadOnly" - | "NotSupported"; -/** Defines values for SecurityAlertsPolicyState. */ -export type SecurityAlertsPolicyState = "Enabled" | "Disabled"; -/** Defines values for VulnerabilityAssessmentPolicyBaselineName. */ -export type VulnerabilityAssessmentPolicyBaselineName = "master" | "default"; -/** Defines values for JobScheduleType. */ -export type JobScheduleType = "Once" | "Recurring"; -/** Defines values for JobTargetGroupMembershipType. */ -export type JobTargetGroupMembershipType = "Include" | "Exclude"; -/** Defines values for CapabilityStatus. */ -export type CapabilityStatus = "Visible" | "Available" | "Default" | "Disabled"; -/** Defines values for SecurityAlertPolicyState. */ -export type SecurityAlertPolicyState = "New" | "Enabled" | "Disabled"; -/** Defines values for SecurityEventType. */ -export type SecurityEventType = - | "Undefined" - | "SqlInjectionVulnerability" - | "SqlInjectionExploit"; -/** Defines values for SensitivityLabelSource. */ -export type SensitivityLabelSource = "current" | "recommended"; -/** Defines values for SensitivityLabelRank. */ -export type SensitivityLabelRank = - | "None" - | "Low" - | "Medium" - | "High" - | "Critical"; -/** Defines values for SensitivityLabelUpdateKind. */ -export type SensitivityLabelUpdateKind = "set" | "remove"; -/** Defines values for RecommendedSensitivityLabelUpdateKind. */ -export type RecommendedSensitivityLabelUpdateKind = "enable" | "disable"; -/** Defines values for TransparentDataEncryptionState. */ -export type TransparentDataEncryptionState = "Enabled" | "Disabled"; -/** Defines values for RestorePointType. */ -export type RestorePointType = "CONTINUOUS" | "DISCRETE"; -/** Defines values for AutomaticTuningServerMode. */ -export type AutomaticTuningServerMode = "Custom" | "Auto" | "Unspecified"; -/** Defines values for AutomaticTuningServerReason. */ -export type AutomaticTuningServerReason = - | "Default" - | "Disabled" - | "AutoConfigured"; -/** Defines values for LedgerDigestUploadsState. */ -export type LedgerDigestUploadsState = "Enabled" | "Disabled"; -/** Defines values for ReplicationRole. */ -export type ReplicationRole = - | "Primary" - | "Secondary" - | "NonReadableSecondary" - | "Source" - | "Copy"; -/** Defines values for CheckNameAvailabilityReason. */ -export type CheckNameAvailabilityReason = "Invalid" | "AlreadyExists"; +/** Contains response data for the listBySchemaNext operation. */ +export type DatabaseTablesListBySchemaNextResponse = DatabaseTableListResult; + +/** Optional parameters. */ +export interface DatabaseUsagesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type DatabaseUsagesListByDatabaseResponse = DatabaseUsageListResult; /** Optional parameters. */ -export interface RecoverableDatabasesGetOptionalParams +export interface DatabaseUsagesListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type RecoverableDatabasesGetResponse = RecoverableDatabase; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseUsagesListByDatabaseNextResponse = DatabaseUsageListResult; /** Optional parameters. */ -export interface RecoverableDatabasesListByServerOptionalParams +export interface DatabaseVulnerabilityAssessmentRuleBaselinesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type RecoverableDatabasesListByServerResponse = RecoverableDatabaseListResult; +/** Contains response data for the get operation. */ +export type DatabaseVulnerabilityAssessmentRuleBaselinesGetResponse = DatabaseVulnerabilityAssessmentRuleBaseline; /** Optional parameters. */ -export interface DataMaskingPoliciesCreateOrUpdateOptionalParams +export interface DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type DataMaskingPoliciesCreateOrUpdateResponse = DataMaskingPolicy; +export type DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse = DatabaseVulnerabilityAssessmentRuleBaseline; /** Optional parameters. */ -export interface DataMaskingPoliciesGetOptionalParams +export interface DatabaseVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type DatabaseVulnerabilityAssessmentScansListByDatabaseResponse = VulnerabilityAssessmentScanRecordListResult; + +/** Optional parameters. */ +export interface DatabaseVulnerabilityAssessmentScansGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DataMaskingPoliciesGetResponse = DataMaskingPolicy; +export type DatabaseVulnerabilityAssessmentScansGetResponse = VulnerabilityAssessmentScanRecord; /** Optional parameters. */ -export interface DataMaskingRulesCreateOrUpdateOptionalParams +export interface DatabaseVulnerabilityAssessmentScansExportOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type DataMaskingRulesCreateOrUpdateResponse = DataMaskingRule; +/** Contains response data for the export operation. */ +export type DatabaseVulnerabilityAssessmentScansExportResponse = DatabaseVulnerabilityAssessmentScansExport; /** Optional parameters. */ -export interface DataMaskingRulesListByDatabaseOptionalParams +export interface DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseVulnerabilityAssessmentScansListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DataMaskingRulesListByDatabaseResponse = DataMaskingRuleListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse = VulnerabilityAssessmentScanRecordListResult; /** Optional parameters. */ -export interface GeoBackupPoliciesCreateOrUpdateOptionalParams +export interface DatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type GeoBackupPoliciesCreateOrUpdateResponse = GeoBackupPolicy; +/** Contains response data for the listByDatabase operation. */ +export type DatabaseVulnerabilityAssessmentsListByDatabaseResponse = DatabaseVulnerabilityAssessmentListResult; /** Optional parameters. */ -export interface GeoBackupPoliciesGetOptionalParams +export interface DatabaseVulnerabilityAssessmentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type GeoBackupPoliciesGetResponse = GeoBackupPolicy; +export type DatabaseVulnerabilityAssessmentsGetResponse = DatabaseVulnerabilityAssessment; /** Optional parameters. */ -export interface GeoBackupPoliciesListByDatabaseOptionalParams +export interface DatabaseVulnerabilityAssessmentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type GeoBackupPoliciesListByDatabaseResponse = GeoBackupPolicyListResult; +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseVulnerabilityAssessmentsCreateOrUpdateResponse = DatabaseVulnerabilityAssessment; /** Optional parameters. */ -export interface DatabasesListMetricsOptionalParams +export interface DatabaseVulnerabilityAssessmentsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type DatabasesListMetricsResponse = MetricListResult; - /** Optional parameters. */ -export interface DatabasesListMetricDefinitionsOptionalParams +export interface DatabaseVulnerabilityAssessmentsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetricDefinitions operation. */ -export type DatabasesListMetricDefinitionsResponse = MetricDefinitionListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type DatabaseVulnerabilityAssessmentsListByDatabaseNextResponse = DatabaseVulnerabilityAssessmentListResult; /** Optional parameters. */ export interface DatabasesListByServerOptionalParams @@ -10130,7 +11984,12 @@ export type DatabasesListByServerResponse = DatabaseListResult; /** Optional parameters. */ export interface DatabasesGetOptionalParams - extends coreClient.OperationOptions {} + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; + /** An OData filter expression that filters elements in the collection. */ + filter?: string; +} /** Contains response data for the get operation. */ export type DatabasesGetResponse = Database; @@ -10169,11 +12028,16 @@ export interface DatabasesUpdateOptionalParams export type DatabasesUpdateResponse = Database; /** Optional parameters. */ -export interface DatabasesListByElasticPoolOptionalParams - extends coreClient.OperationOptions {} +export interface DatabasesExportOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByElasticPool operation. */ -export type DatabasesListByElasticPoolResponse = DatabaseListResult; +/** Contains response data for the export operation. */ +export type DatabasesExportResponse = ImportExportOperationResult; /** Optional parameters. */ export interface DatabasesFailoverOptionalParams @@ -10187,11 +12051,20 @@ export interface DatabasesFailoverOptionalParams } /** Optional parameters. */ -export interface DatabasesListInaccessibleByServerOptionalParams - extends coreClient.OperationOptions {} +export interface DatabasesImportOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listInaccessibleByServer operation. */ -export type DatabasesListInaccessibleByServerResponse = DatabaseListResult; +/** Contains response data for the import operation. */ +export type DatabasesImportResponse = ImportExportOperationResult; + +/** Optional parameters. */ +export interface DatabasesRenameOptionalParams + extends coreClient.OperationOptions {} /** Optional parameters. */ export interface DatabasesPauseOptionalParams @@ -10227,32 +12100,18 @@ export interface DatabasesUpgradeDataWarehouseOptionalParams } /** Optional parameters. */ -export interface DatabasesRenameOptionalParams +export interface DatabasesListByElasticPoolOptionalParams extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface DatabasesImportOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the import operation. */ -export type DatabasesImportResponse = ImportExportOperationResult; +/** Contains response data for the listByElasticPool operation. */ +export type DatabasesListByElasticPoolResponse = DatabaseListResult; /** Optional parameters. */ -export interface DatabasesExportOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface DatabasesListInaccessibleByServerOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the export operation. */ -export type DatabasesExportResponse = ImportExportOperationResult; +/** Contains response data for the listInaccessibleByServer operation. */ +export type DatabasesListInaccessibleByServerResponse = DatabaseListResult; /** Optional parameters. */ export interface DatabasesListByServerNextOptionalParams @@ -10276,109 +12135,28 @@ export interface DatabasesListInaccessibleByServerNextOptionalParams export type DatabasesListInaccessibleByServerNextResponse = DatabaseListResult; /** Optional parameters. */ -export interface ElasticPoolsListMetricsOptionalParams +export interface DeletedServersListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type ElasticPoolsListMetricsResponse = MetricListResult; +/** Contains response data for the list operation. */ +export type DeletedServersListResponse = DeletedServerListResult; /** Optional parameters. */ -export interface ElasticPoolsListMetricDefinitionsOptionalParams +export interface DeletedServersListByLocationOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetricDefinitions operation. */ -export type ElasticPoolsListMetricDefinitionsResponse = MetricDefinitionListResult; - -/** Optional parameters. */ -export interface ElasticPoolsListByServerOptionalParams - extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; -} - -/** Contains response data for the listByServer operation. */ -export type ElasticPoolsListByServerResponse = ElasticPoolListResult; +/** Contains response data for the listByLocation operation. */ +export type DeletedServersListByLocationResponse = DeletedServerListResult; /** Optional parameters. */ -export interface ElasticPoolsGetOptionalParams +export interface DeletedServersGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ElasticPoolsGetResponse = ElasticPool; - -/** Optional parameters. */ -export interface ElasticPoolsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ElasticPoolsCreateOrUpdateResponse = ElasticPool; - -/** Optional parameters. */ -export interface ElasticPoolsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ElasticPoolsUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type ElasticPoolsUpdateResponse = ElasticPool; - -/** Optional parameters. */ -export interface ElasticPoolsFailoverOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ElasticPoolsListByServerNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServerNext operation. */ -export type ElasticPoolsListByServerNextResponse = ElasticPoolListResult; - -/** Optional parameters. */ -export interface ReplicationLinksDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ReplicationLinksFailoverOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ReplicationLinksFailoverAllowDataLossOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export type DeletedServersGetResponse = DeletedServer; /** Optional parameters. */ -export interface ReplicationLinksUnlinkOptionalParams +export interface DeletedServersRecoverOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10386,54 +12164,39 @@ export interface ReplicationLinksUnlinkOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface ReplicationLinksListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type ReplicationLinksListByDatabaseResponse = ReplicationLinkListResult; - -/** Optional parameters. */ -export interface ReplicationLinksGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ReplicationLinksGetResponse = ReplicationLink; - -/** Optional parameters. */ -export interface ReplicationLinksListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type ReplicationLinksListByServerResponse = ReplicationLinkListResult; +/** Contains response data for the recover operation. */ +export type DeletedServersRecoverResponse = DeletedServer; /** Optional parameters. */ -export interface ReplicationLinksListByDatabaseNextOptionalParams +export interface DeletedServersListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type ReplicationLinksListByDatabaseNextResponse = ReplicationLinkListResult; +/** Contains response data for the listNext operation. */ +export type DeletedServersListNextResponse = DeletedServerListResult; /** Optional parameters. */ -export interface ReplicationLinksListByServerNextOptionalParams +export interface DeletedServersListByLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type ReplicationLinksListByServerNextResponse = ReplicationLinkListResult; +/** Contains response data for the listByLocationNext operation. */ +export type DeletedServersListByLocationNextResponse = DeletedServerListResult; /** Optional parameters. */ -export interface ServerCommunicationLinksDeleteOptionalParams +export interface DistributedAvailabilityGroupsListByInstanceOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByInstance operation. */ +export type DistributedAvailabilityGroupsListByInstanceResponse = DistributedAvailabilityGroupsListResult; + /** Optional parameters. */ -export interface ServerCommunicationLinksGetOptionalParams +export interface DistributedAvailabilityGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServerCommunicationLinksGetResponse = ServerCommunicationLink; +export type DistributedAvailabilityGroupsGetResponse = DistributedAvailabilityGroup; /** Optional parameters. */ -export interface ServerCommunicationLinksCreateOrUpdateOptionalParams +export interface DistributedAvailabilityGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10442,87 +12205,106 @@ export interface ServerCommunicationLinksCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ServerCommunicationLinksCreateOrUpdateResponse = ServerCommunicationLink; +export type DistributedAvailabilityGroupsCreateOrUpdateResponse = DistributedAvailabilityGroup; /** Optional parameters. */ -export interface ServerCommunicationLinksListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type ServerCommunicationLinksListByServerResponse = ServerCommunicationLinkListResult; +export interface DistributedAvailabilityGroupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface ServiceObjectivesGetOptionalParams - extends coreClient.OperationOptions {} +export interface DistributedAvailabilityGroupsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the get operation. */ -export type ServiceObjectivesGetResponse = ServiceObjective; +/** Contains response data for the update operation. */ +export type DistributedAvailabilityGroupsUpdateResponse = DistributedAvailabilityGroup; /** Optional parameters. */ -export interface ServiceObjectivesListByServerOptionalParams - extends coreClient.OperationOptions {} +export interface DistributedAvailabilityGroupsSetRoleOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByServer operation. */ -export type ServiceObjectivesListByServerResponse = ServiceObjectiveListResult; +/** Contains response data for the setRole operation. */ +export type DistributedAvailabilityGroupsSetRoleResponse = DistributedAvailabilityGroup; /** Optional parameters. */ -export interface ElasticPoolActivitiesListByElasticPoolOptionalParams +export interface DistributedAvailabilityGroupsListByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByElasticPool operation. */ -export type ElasticPoolActivitiesListByElasticPoolResponse = ElasticPoolActivityListResult; +/** Contains response data for the listByInstanceNext operation. */ +export type DistributedAvailabilityGroupsListByInstanceNextResponse = DistributedAvailabilityGroupsListResult; /** Optional parameters. */ -export interface ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams +export interface ElasticPoolOperationsListByElasticPoolOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByElasticPool operation. */ -export type ElasticPoolDatabaseActivitiesListByElasticPoolResponse = ElasticPoolDatabaseActivityListResult; +export type ElasticPoolOperationsListByElasticPoolResponse = ElasticPoolOperationListResult; /** Optional parameters. */ -export interface ServerUsagesListByServerOptionalParams +export interface ElasticPoolOperationsCancelOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerUsagesListByServerResponse = ServerUsageListResult; - /** Optional parameters. */ -export interface ExtendedDatabaseBlobAuditingPoliciesGetOptionalParams +export interface ElasticPoolOperationsListByElasticPoolNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ExtendedDatabaseBlobAuditingPoliciesGetResponse = ExtendedDatabaseBlobAuditingPolicy; +/** Contains response data for the listByElasticPoolNext operation. */ +export type ElasticPoolOperationsListByElasticPoolNextResponse = ElasticPoolOperationListResult; /** Optional parameters. */ -export interface ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface ElasticPoolsListByServerOptionalParams + extends coreClient.OperationOptions { + /** The number of elements in the collection to skip. */ + skip?: number; +} -/** Contains response data for the createOrUpdate operation. */ -export type ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateResponse = ExtendedDatabaseBlobAuditingPolicy; +/** Contains response data for the listByServer operation. */ +export type ElasticPoolsListByServerResponse = ElasticPoolListResult; /** Optional parameters. */ -export interface ExtendedDatabaseBlobAuditingPoliciesListByDatabaseOptionalParams +export interface ElasticPoolsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseResponse = ExtendedDatabaseBlobAuditingPolicyListResult; +/** Contains response data for the get operation. */ +export type ElasticPoolsGetResponse = ElasticPool; /** Optional parameters. */ -export interface ExtendedDatabaseBlobAuditingPoliciesListByDatabaseNextOptionalParams - extends coreClient.OperationOptions {} +export interface ElasticPoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByDatabaseNext operation. */ -export type ExtendedDatabaseBlobAuditingPoliciesListByDatabaseNextResponse = ExtendedDatabaseBlobAuditingPolicyListResult; +/** Contains response data for the createOrUpdate operation. */ +export type ElasticPoolsCreateOrUpdateResponse = ElasticPool; /** Optional parameters. */ -export interface ExtendedServerBlobAuditingPoliciesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ExtendedServerBlobAuditingPoliciesGetResponse = ExtendedServerBlobAuditingPolicy; +export interface ElasticPoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface ExtendedServerBlobAuditingPoliciesCreateOrUpdateOptionalParams +export interface ElasticPoolsUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10530,32 +12312,41 @@ export interface ExtendedServerBlobAuditingPoliciesCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type ExtendedServerBlobAuditingPoliciesCreateOrUpdateResponse = ExtendedServerBlobAuditingPolicy; +/** Contains response data for the update operation. */ +export type ElasticPoolsUpdateResponse = ElasticPool; /** Optional parameters. */ -export interface ExtendedServerBlobAuditingPoliciesListByServerOptionalParams +export interface ElasticPoolsFailoverOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ElasticPoolsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ExtendedServerBlobAuditingPoliciesListByServerResponse = ExtendedServerBlobAuditingPolicyListResult; +/** Contains response data for the listByServerNext operation. */ +export type ElasticPoolsListByServerNextResponse = ElasticPoolListResult; /** Optional parameters. */ -export interface ExtendedServerBlobAuditingPoliciesListByServerNextOptionalParams +export interface EncryptionProtectorsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type ExtendedServerBlobAuditingPoliciesListByServerNextResponse = ExtendedServerBlobAuditingPolicyListResult; +/** Contains response data for the listByServer operation. */ +export type EncryptionProtectorsListByServerResponse = EncryptionProtectorListResult; /** Optional parameters. */ -export interface ServerBlobAuditingPoliciesGetOptionalParams +export interface EncryptionProtectorsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServerBlobAuditingPoliciesGetResponse = ServerBlobAuditingPolicy; +export type EncryptionProtectorsGetResponse = EncryptionProtector; /** Optional parameters. */ -export interface ServerBlobAuditingPoliciesCreateOrUpdateOptionalParams +export interface EncryptionProtectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10564,286 +12355,271 @@ export interface ServerBlobAuditingPoliciesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ServerBlobAuditingPoliciesCreateOrUpdateResponse = ServerBlobAuditingPolicy; +export type EncryptionProtectorsCreateOrUpdateResponse = EncryptionProtector; /** Optional parameters. */ -export interface ServerBlobAuditingPoliciesListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type ServerBlobAuditingPoliciesListByServerResponse = ServerBlobAuditingPolicyListResult; +export interface EncryptionProtectorsRevalidateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface ServerBlobAuditingPoliciesListByServerNextOptionalParams +export interface EncryptionProtectorsListByServerNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServerNext operation. */ -export type ServerBlobAuditingPoliciesListByServerNextResponse = ServerBlobAuditingPolicyListResult; +export type EncryptionProtectorsListByServerNextResponse = EncryptionProtectorListResult; /** Optional parameters. */ -export interface DatabaseBlobAuditingPoliciesGetOptionalParams +export interface EndpointCertificatesListByInstanceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DatabaseBlobAuditingPoliciesGetResponse = DatabaseBlobAuditingPolicy; +/** Contains response data for the listByInstance operation. */ +export type EndpointCertificatesListByInstanceResponse = EndpointCertificateListResult; /** Optional parameters. */ -export interface DatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams +export interface EndpointCertificatesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type DatabaseBlobAuditingPoliciesCreateOrUpdateResponse = DatabaseBlobAuditingPolicy; +/** Contains response data for the get operation. */ +export type EndpointCertificatesGetResponse = EndpointCertificate; /** Optional parameters. */ -export interface DatabaseBlobAuditingPoliciesListByDatabaseOptionalParams +export interface EndpointCertificatesListByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DatabaseBlobAuditingPoliciesListByDatabaseResponse = DatabaseBlobAuditingPolicyListResult; +/** Contains response data for the listByInstanceNext operation. */ +export type EndpointCertificatesListByInstanceNextResponse = EndpointCertificateListResult; /** Optional parameters. */ -export interface DatabaseBlobAuditingPoliciesListByDatabaseNextOptionalParams +export interface FailoverGroupsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseBlobAuditingPoliciesListByDatabaseNextResponse = DatabaseBlobAuditingPolicyListResult; - -/** Optional parameters. */ -export interface DatabaseAdvisorsListByDatabaseOptionalParams - extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} - -/** Contains response data for the listByDatabase operation. */ -export type DatabaseAdvisorsListByDatabaseResponse = Advisor[]; +/** Contains response data for the listByServer operation. */ +export type FailoverGroupsListByServerResponse = FailoverGroupListResult; /** Optional parameters. */ -export interface DatabaseAdvisorsGetOptionalParams +export interface FailoverGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DatabaseAdvisorsGetResponse = Advisor; +export type FailoverGroupsGetResponse = FailoverGroup; /** Optional parameters. */ -export interface DatabaseAdvisorsUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface FailoverGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the update operation. */ -export type DatabaseAdvisorsUpdateResponse = Advisor; +/** Contains response data for the createOrUpdate operation. */ +export type FailoverGroupsCreateOrUpdateResponse = FailoverGroup; /** Optional parameters. */ -export interface DatabaseAutomaticTuningGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DatabaseAutomaticTuningGetResponse = DatabaseAutomaticTuning; +export interface FailoverGroupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface DatabaseAutomaticTuningUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface FailoverGroupsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the update operation. */ -export type DatabaseAutomaticTuningUpdateResponse = DatabaseAutomaticTuning; +export type FailoverGroupsUpdateResponse = FailoverGroup; /** Optional parameters. */ -export interface DatabaseColumnsListByDatabaseOptionalParams +export interface FailoverGroupsFailoverOptionalParams extends coreClient.OperationOptions { - /** Array of Get3ItemsItem */ - schema?: string[]; - /** Array of Get4ItemsItem */ - table?: string[]; - /** Array of Get5ItemsItem */ - column?: string[]; - /** Array of Get6ItemsItem */ - orderBy?: string[]; - /** An opaque token that identifies a starting point in the collection. */ - skiptoken?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByDatabase operation. */ -export type DatabaseColumnsListByDatabaseResponse = DatabaseColumnListResult; +/** Contains response data for the failover operation. */ +export type FailoverGroupsFailoverResponse = FailoverGroup; /** Optional parameters. */ -export interface DatabaseColumnsListByTableOptionalParams +export interface FailoverGroupsForceFailoverAllowDataLossOptionalParams extends coreClient.OperationOptions { - /** An OData filter expression that filters elements in the collection. */ - filter?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByTable operation. */ -export type DatabaseColumnsListByTableResponse = DatabaseColumnListResult; - -/** Optional parameters. */ -export interface DatabaseColumnsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DatabaseColumnsGetResponse = DatabaseColumn; +/** Contains response data for the forceFailoverAllowDataLoss operation. */ +export type FailoverGroupsForceFailoverAllowDataLossResponse = FailoverGroup; /** Optional parameters. */ -export interface DatabaseColumnsListByDatabaseNextOptionalParams +export interface FailoverGroupsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseColumnsListByDatabaseNextResponse = DatabaseColumnListResult; +/** Contains response data for the listByServerNext operation. */ +export type FailoverGroupsListByServerNextResponse = FailoverGroupListResult; /** Optional parameters. */ -export interface DatabaseColumnsListByTableNextOptionalParams +export interface FirewallRulesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByTableNext operation. */ -export type DatabaseColumnsListByTableNextResponse = DatabaseColumnListResult; +/** Contains response data for the listByServer operation. */ +export type FirewallRulesListByServerResponse = FirewallRuleListResult; /** Optional parameters. */ -export interface DatabaseRecommendedActionsListByDatabaseAdvisorOptionalParams +export interface FirewallRulesReplaceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseAdvisor operation. */ -export type DatabaseRecommendedActionsListByDatabaseAdvisorResponse = RecommendedAction[]; +/** Contains response data for the replace operation. */ +export type FirewallRulesReplaceResponse = FirewallRule; /** Optional parameters. */ -export interface DatabaseRecommendedActionsGetOptionalParams +export interface FirewallRulesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DatabaseRecommendedActionsGetResponse = RecommendedAction; +export type FirewallRulesGetResponse = FirewallRule; /** Optional parameters. */ -export interface DatabaseRecommendedActionsUpdateOptionalParams +export interface FirewallRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type DatabaseRecommendedActionsUpdateResponse = RecommendedAction; +/** Contains response data for the createOrUpdate operation. */ +export type FirewallRulesCreateOrUpdateResponse = FirewallRule; /** Optional parameters. */ -export interface DatabaseSchemasListByDatabaseOptionalParams - extends coreClient.OperationOptions { - /** An OData filter expression that filters elements in the collection. */ - filter?: string; -} - -/** Contains response data for the listByDatabase operation. */ -export type DatabaseSchemasListByDatabaseResponse = DatabaseSchemaListResult; +export interface FirewallRulesDeleteOptionalParams + extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface DatabaseSchemasGetOptionalParams +export interface FirewallRulesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DatabaseSchemasGetResponse = DatabaseSchema; +/** Contains response data for the listByServerNext operation. */ +export type FirewallRulesListByServerNextResponse = FirewallRuleListResult; /** Optional parameters. */ -export interface DatabaseSchemasListByDatabaseNextOptionalParams +export interface GeoBackupPoliciesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseSchemasListByDatabaseNextResponse = DatabaseSchemaListResult; +/** Contains response data for the list operation. */ +export type GeoBackupPoliciesListResponse = GeoBackupPolicyListResult; /** Optional parameters. */ -export interface DatabaseSecurityAlertPoliciesGetOptionalParams +export interface GeoBackupPoliciesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DatabaseSecurityAlertPoliciesGetResponse = DatabaseSecurityAlertPolicy; +export type GeoBackupPoliciesGetResponse = GeoBackupPolicy; /** Optional parameters. */ -export interface DatabaseSecurityAlertPoliciesCreateOrUpdateOptionalParams +export interface GeoBackupPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type DatabaseSecurityAlertPoliciesCreateOrUpdateResponse = DatabaseSecurityAlertPolicy; +export type GeoBackupPoliciesCreateOrUpdateResponse = GeoBackupPolicy; /** Optional parameters. */ -export interface DatabaseSecurityAlertPoliciesListByDatabaseOptionalParams +export interface GeoBackupPoliciesListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DatabaseSecurityAlertPoliciesListByDatabaseResponse = DatabaseSecurityAlertListResult; +/** Contains response data for the listNext operation. */ +export type GeoBackupPoliciesListNextResponse = GeoBackupPolicyListResult; /** Optional parameters. */ -export interface DatabaseSecurityAlertPoliciesListByDatabaseNextOptionalParams +export interface IPv6FirewallRulesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseSecurityAlertPoliciesListByDatabaseNextResponse = DatabaseSecurityAlertListResult; - -/** Optional parameters. */ -export interface DatabaseTablesListBySchemaOptionalParams - extends coreClient.OperationOptions { - /** An OData filter expression that filters elements in the collection. */ - filter?: string; -} - -/** Contains response data for the listBySchema operation. */ -export type DatabaseTablesListBySchemaResponse = DatabaseTableListResult; +/** Contains response data for the listByServer operation. */ +export type IPv6FirewallRulesListByServerResponse = IPv6FirewallRuleListResult; /** Optional parameters. */ -export interface DatabaseTablesGetOptionalParams +export interface IPv6FirewallRulesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DatabaseTablesGetResponse = DatabaseTable; +export type IPv6FirewallRulesGetResponse = IPv6FirewallRule; /** Optional parameters. */ -export interface DatabaseTablesListBySchemaNextOptionalParams +export interface IPv6FirewallRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySchemaNext operation. */ -export type DatabaseTablesListBySchemaNextResponse = DatabaseTableListResult; +/** Contains response data for the createOrUpdate operation. */ +export type IPv6FirewallRulesCreateOrUpdateResponse = IPv6FirewallRule; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentRuleBaselinesGetOptionalParams +export interface IPv6FirewallRulesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DatabaseVulnerabilityAssessmentRuleBaselinesGetResponse = DatabaseVulnerabilityAssessmentRuleBaseline; - /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams +export interface IPv6FirewallRulesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type DatabaseVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse = DatabaseVulnerabilityAssessmentRuleBaseline; +/** Contains response data for the listByServerNext operation. */ +export type IPv6FirewallRulesListByServerNextResponse = IPv6FirewallRuleListResult; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams +export interface InstanceFailoverGroupsListByLocationOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByLocation operation. */ +export type InstanceFailoverGroupsListByLocationResponse = InstanceFailoverGroupListResult; + /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentsGetOptionalParams +export interface InstanceFailoverGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DatabaseVulnerabilityAssessmentsGetResponse = DatabaseVulnerabilityAssessment; +export type InstanceFailoverGroupsGetResponse = InstanceFailoverGroup; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface InstanceFailoverGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Contains response data for the createOrUpdate operation. */ -export type DatabaseVulnerabilityAssessmentsCreateOrUpdateResponse = DatabaseVulnerabilityAssessment; - -/** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentsDeleteOptionalParams - extends coreClient.OperationOptions {} +export type InstanceFailoverGroupsCreateOrUpdateResponse = InstanceFailoverGroup; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type DatabaseVulnerabilityAssessmentsListByDatabaseResponse = DatabaseVulnerabilityAssessmentListResult; +export interface InstanceFailoverGroupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentsListByDatabaseNextOptionalParams - extends coreClient.OperationOptions {} +export interface InstanceFailoverGroupsFailoverOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseVulnerabilityAssessmentsListByDatabaseNextResponse = DatabaseVulnerabilityAssessmentListResult; +/** Contains response data for the failover operation. */ +export type InstanceFailoverGroupsFailoverResponse = InstanceFailoverGroup; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams +export interface InstanceFailoverGroupsForceFailoverAllowDataLossOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10851,78 +12627,121 @@ export interface DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams resumeFrom?: string; } +/** Contains response data for the forceFailoverAllowDataLoss operation. */ +export type InstanceFailoverGroupsForceFailoverAllowDataLossResponse = InstanceFailoverGroup; + /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams +export interface InstanceFailoverGroupsListByLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DatabaseVulnerabilityAssessmentScansListByDatabaseResponse = VulnerabilityAssessmentScanRecordListResult; +/** Contains response data for the listByLocationNext operation. */ +export type InstanceFailoverGroupsListByLocationNextResponse = InstanceFailoverGroupListResult; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentScansGetOptionalParams +export interface InstancePoolsListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DatabaseVulnerabilityAssessmentScansGetResponse = VulnerabilityAssessmentScanRecord; +/** Contains response data for the list operation. */ +export type InstancePoolsListResponse = InstancePoolListResult; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentScansExportOptionalParams +export interface InstancePoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the export operation. */ -export type DatabaseVulnerabilityAssessmentScansExportResponse = DatabaseVulnerabilityAssessmentScansExport; +/** Contains response data for the listByResourceGroup operation. */ +export type InstancePoolsListByResourceGroupResponse = InstancePoolListResult; /** Optional parameters. */ -export interface DatabaseVulnerabilityAssessmentScansListByDatabaseNextOptionalParams +export interface InstancePoolsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse = VulnerabilityAssessmentScanRecordListResult; +/** Contains response data for the get operation. */ +export type InstancePoolsGetResponse = InstancePool; /** Optional parameters. */ -export interface DataWarehouseUserActivitiesGetOptionalParams - extends coreClient.OperationOptions {} +export interface InstancePoolsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the get operation. */ -export type DataWarehouseUserActivitiesGetResponse = DataWarehouseUserActivities; +/** Contains response data for the createOrUpdate operation. */ +export type InstancePoolsCreateOrUpdateResponse = InstancePool; /** Optional parameters. */ -export interface DataWarehouseUserActivitiesListByDatabaseOptionalParams +export interface InstancePoolsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface InstancePoolsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type InstancePoolsUpdateResponse = InstancePool; + +/** Optional parameters. */ +export interface InstancePoolsListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DataWarehouseUserActivitiesListByDatabaseResponse = DataWarehouseUserActivitiesListResult; +/** Contains response data for the listNext operation. */ +export type InstancePoolsListNextResponse = InstancePoolListResult; /** Optional parameters. */ -export interface DataWarehouseUserActivitiesListByDatabaseNextOptionalParams +export interface InstancePoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DataWarehouseUserActivitiesListByDatabaseNextResponse = DataWarehouseUserActivitiesListResult; +/** Contains response data for the listByResourceGroupNext operation. */ +export type InstancePoolsListByResourceGroupNextResponse = InstancePoolListResult; /** Optional parameters. */ -export interface DeletedServersListOptionalParams +export interface JobAgentsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type DeletedServersListResponse = DeletedServerListResult; +/** Contains response data for the listByServer operation. */ +export type JobAgentsListByServerResponse = JobAgentListResult; /** Optional parameters. */ -export interface DeletedServersGetOptionalParams +export interface JobAgentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type DeletedServersGetResponse = DeletedServer; +export type JobAgentsGetResponse = JobAgent; /** Optional parameters. */ -export interface DeletedServersListByLocationOptionalParams - extends coreClient.OperationOptions {} +export interface JobAgentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByLocation operation. */ -export type DeletedServersListByLocationResponse = DeletedServerListResult; +/** Contains response data for the createOrUpdate operation. */ +export type JobAgentsCreateOrUpdateResponse = JobAgent; /** Optional parameters. */ -export interface DeletedServersRecoverOptionalParams +export interface JobAgentsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface JobAgentsUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10930,57 +12749,101 @@ export interface DeletedServersRecoverOptionalParams resumeFrom?: string; } -/** Contains response data for the recover operation. */ -export type DeletedServersRecoverResponse = DeletedServer; +/** Contains response data for the update operation. */ +export type JobAgentsUpdateResponse = JobAgent; + +/** Optional parameters. */ +export interface JobAgentsListByServerNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServerNext operation. */ +export type JobAgentsListByServerNextResponse = JobAgentListResult; + +/** Optional parameters. */ +export interface JobCredentialsListByAgentOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByAgent operation. */ +export type JobCredentialsListByAgentResponse = JobCredentialListResult; /** Optional parameters. */ -export interface DeletedServersListNextOptionalParams +export interface JobCredentialsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type DeletedServersListNextResponse = DeletedServerListResult; +/** Contains response data for the get operation. */ +export type JobCredentialsGetResponse = JobCredential; /** Optional parameters. */ -export interface DeletedServersListByLocationNextOptionalParams +export interface JobCredentialsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type DeletedServersListByLocationNextResponse = DeletedServerListResult; +/** Contains response data for the createOrUpdate operation. */ +export type JobCredentialsCreateOrUpdateResponse = JobCredential; /** Optional parameters. */ -export interface ElasticPoolOperationsCancelOptionalParams +export interface JobCredentialsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ElasticPoolOperationsListByElasticPoolOptionalParams +export interface JobCredentialsListByAgentNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByElasticPool operation. */ -export type ElasticPoolOperationsListByElasticPoolResponse = ElasticPoolOperationListResult; +/** Contains response data for the listByAgentNext operation. */ +export type JobCredentialsListByAgentNextResponse = JobCredentialListResult; /** Optional parameters. */ -export interface ElasticPoolOperationsListByElasticPoolNextOptionalParams - extends coreClient.OperationOptions {} +export interface JobExecutionsListByAgentOptionalParams + extends coreClient.OperationOptions { + /** The number of elements in the collection to skip. */ + skip?: number; + /** If specified, only job executions created at or after the specified time are included. */ + createTimeMin?: Date; + /** If specified, only job executions created before the specified time are included. */ + createTimeMax?: Date; + /** If specified, only job executions completed at or after the specified time are included. */ + endTimeMin?: Date; + /** If specified, only job executions completed before the specified time are included. */ + endTimeMax?: Date; + /** If specified, only active or only completed job executions are included. */ + isActive?: boolean; + /** The number of elements to return from the collection. */ + top?: number; +} -/** Contains response data for the listByElasticPoolNext operation. */ -export type ElasticPoolOperationsListByElasticPoolNextResponse = ElasticPoolOperationListResult; +/** Contains response data for the listByAgent operation. */ +export type JobExecutionsListByAgentResponse = JobExecutionListResult; /** Optional parameters. */ -export interface EncryptionProtectorsListByServerOptionalParams - extends coreClient.OperationOptions {} +export interface JobExecutionsListByJobOptionalParams + extends coreClient.OperationOptions { + /** The number of elements in the collection to skip. */ + skip?: number; + /** If specified, only job executions created at or after the specified time are included. */ + createTimeMin?: Date; + /** If specified, only job executions created before the specified time are included. */ + createTimeMax?: Date; + /** If specified, only job executions completed at or after the specified time are included. */ + endTimeMin?: Date; + /** If specified, only job executions completed before the specified time are included. */ + endTimeMax?: Date; + /** If specified, only active or only completed job executions are included. */ + isActive?: boolean; + /** The number of elements to return from the collection. */ + top?: number; +} -/** Contains response data for the listByServer operation. */ -export type EncryptionProtectorsListByServerResponse = EncryptionProtectorListResult; +/** Contains response data for the listByJob operation. */ +export type JobExecutionsListByJobResponse = JobExecutionListResult; /** Optional parameters. */ -export interface EncryptionProtectorsGetOptionalParams +export interface JobExecutionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type EncryptionProtectorsGetResponse = EncryptionProtector; +export type JobExecutionsGetResponse = JobExecution; /** Optional parameters. */ -export interface EncryptionProtectorsCreateOrUpdateOptionalParams +export interface JobExecutionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -10989,10 +12852,14 @@ export interface EncryptionProtectorsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type EncryptionProtectorsCreateOrUpdateResponse = EncryptionProtector; +export type JobExecutionsCreateOrUpdateResponse = JobExecution; /** Optional parameters. */ -export interface EncryptionProtectorsRevalidateOptionalParams +export interface JobExecutionsCancelOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface JobExecutionsCreateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -11000,280 +12867,276 @@ export interface EncryptionProtectorsRevalidateOptionalParams resumeFrom?: string; } +/** Contains response data for the create operation. */ +export type JobExecutionsCreateResponse = JobExecution; + /** Optional parameters. */ -export interface EncryptionProtectorsListByServerNextOptionalParams +export interface JobExecutionsListByAgentNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type EncryptionProtectorsListByServerNextResponse = EncryptionProtectorListResult; +/** Contains response data for the listByAgentNext operation. */ +export type JobExecutionsListByAgentNextResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FailoverGroupsGetOptionalParams +export interface JobExecutionsListByJobNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type FailoverGroupsGetResponse = FailoverGroup; +/** Contains response data for the listByJobNext operation. */ +export type JobExecutionsListByJobNextResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FailoverGroupsCreateOrUpdateOptionalParams +export interface JobStepExecutionsListByJobExecutionOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** The number of elements in the collection to skip. */ + skip?: number; + /** If specified, only job executions created at or after the specified time are included. */ + createTimeMin?: Date; + /** If specified, only job executions created before the specified time are included. */ + createTimeMax?: Date; + /** If specified, only job executions completed at or after the specified time are included. */ + endTimeMin?: Date; + /** If specified, only job executions completed before the specified time are included. */ + endTimeMax?: Date; + /** If specified, only active or only completed job executions are included. */ + isActive?: boolean; + /** The number of elements to return from the collection. */ + top?: number; } -/** Contains response data for the createOrUpdate operation. */ -export type FailoverGroupsCreateOrUpdateResponse = FailoverGroup; +/** Contains response data for the listByJobExecution operation. */ +export type JobStepExecutionsListByJobExecutionResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FailoverGroupsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobStepExecutionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JobStepExecutionsGetResponse = JobExecution; /** Optional parameters. */ -export interface FailoverGroupsUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobStepExecutionsListByJobExecutionNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type FailoverGroupsUpdateResponse = FailoverGroup; +/** Contains response data for the listByJobExecutionNext operation. */ +export type JobStepExecutionsListByJobExecutionNextResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FailoverGroupsListByServerOptionalParams +export interface JobStepsListByJobOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type FailoverGroupsListByServerResponse = FailoverGroupListResult; +/** Contains response data for the listByJob operation. */ +export type JobStepsListByJobResponse = JobStepListResult; /** Optional parameters. */ -export interface FailoverGroupsFailoverOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobStepsGetOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the failover operation. */ -export type FailoverGroupsFailoverResponse = FailoverGroup; +/** Contains response data for the get operation. */ +export type JobStepsGetResponse = JobStep; /** Optional parameters. */ -export interface FailoverGroupsForceFailoverAllowDataLossOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobStepsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the forceFailoverAllowDataLoss operation. */ -export type FailoverGroupsForceFailoverAllowDataLossResponse = FailoverGroup; +/** Contains response data for the createOrUpdate operation. */ +export type JobStepsCreateOrUpdateResponse = JobStep; /** Optional parameters. */ -export interface FailoverGroupsListByServerNextOptionalParams +export interface JobStepsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type FailoverGroupsListByServerNextResponse = FailoverGroupListResult; +/** Optional parameters. */ +export interface JobStepsListByVersionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVersion operation. */ +export type JobStepsListByVersionResponse = JobStepListResult; /** Optional parameters. */ -export interface FirewallRulesGetOptionalParams +export interface JobStepsGetByVersionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type FirewallRulesGetResponse = FirewallRule; +/** Contains response data for the getByVersion operation. */ +export type JobStepsGetByVersionResponse = JobStep; /** Optional parameters. */ -export interface FirewallRulesCreateOrUpdateOptionalParams +export interface JobStepsListByJobNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type FirewallRulesCreateOrUpdateResponse = FirewallRule; +/** Contains response data for the listByJobNext operation. */ +export type JobStepsListByJobNextResponse = JobStepListResult; + +/** Optional parameters. */ +export interface JobStepsListByVersionNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByVersionNext operation. */ +export type JobStepsListByVersionNextResponse = JobStepListResult; + +/** Optional parameters. */ +export interface JobTargetExecutionsListByStepOptionalParams + extends coreClient.OperationOptions { + /** The number of elements in the collection to skip. */ + skip?: number; + /** If specified, only job executions created at or after the specified time are included. */ + createTimeMin?: Date; + /** If specified, only job executions created before the specified time are included. */ + createTimeMax?: Date; + /** If specified, only job executions completed at or after the specified time are included. */ + endTimeMin?: Date; + /** If specified, only job executions completed before the specified time are included. */ + endTimeMax?: Date; + /** If specified, only active or only completed job executions are included. */ + isActive?: boolean; + /** The number of elements to return from the collection. */ + top?: number; +} + +/** Contains response data for the listByStep operation. */ +export type JobTargetExecutionsListByStepResponse = JobExecutionListResult; + +/** Optional parameters. */ +export interface JobTargetExecutionsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type JobTargetExecutionsGetResponse = JobExecution; + +/** Optional parameters. */ +export interface JobTargetExecutionsListByJobExecutionOptionalParams + extends coreClient.OperationOptions { + /** The number of elements in the collection to skip. */ + skip?: number; + /** If specified, only job executions created at or after the specified time are included. */ + createTimeMin?: Date; + /** If specified, only job executions created before the specified time are included. */ + createTimeMax?: Date; + /** If specified, only job executions completed at or after the specified time are included. */ + endTimeMin?: Date; + /** If specified, only job executions completed before the specified time are included. */ + endTimeMax?: Date; + /** If specified, only active or only completed job executions are included. */ + isActive?: boolean; + /** The number of elements to return from the collection. */ + top?: number; +} -/** Optional parameters. */ -export interface FirewallRulesDeleteOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the listByJobExecution operation. */ +export type JobTargetExecutionsListByJobExecutionResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FirewallRulesListByServerOptionalParams +export interface JobTargetExecutionsListByStepNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type FirewallRulesListByServerResponse = FirewallRuleListResult; +/** Contains response data for the listByStepNext operation. */ +export type JobTargetExecutionsListByStepNextResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FirewallRulesReplaceOptionalParams +export interface JobTargetExecutionsListByJobExecutionNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the replace operation. */ -export type FirewallRulesReplaceResponse = FirewallRule; +/** Contains response data for the listByJobExecutionNext operation. */ +export type JobTargetExecutionsListByJobExecutionNextResponse = JobExecutionListResult; /** Optional parameters. */ -export interface FirewallRulesListByServerNextOptionalParams +export interface JobTargetGroupsListByAgentOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type FirewallRulesListByServerNextResponse = FirewallRuleListResult; +/** Contains response data for the listByAgent operation. */ +export type JobTargetGroupsListByAgentResponse = JobTargetGroupListResult; /** Optional parameters. */ -export interface InstanceFailoverGroupsGetOptionalParams +export interface JobTargetGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type InstanceFailoverGroupsGetResponse = InstanceFailoverGroup; +export type JobTargetGroupsGetResponse = JobTargetGroup; /** Optional parameters. */ -export interface InstanceFailoverGroupsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobTargetGroupsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type InstanceFailoverGroupsCreateOrUpdateResponse = InstanceFailoverGroup; - -/** Optional parameters. */ -export interface InstanceFailoverGroupsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export type JobTargetGroupsCreateOrUpdateResponse = JobTargetGroup; /** Optional parameters. */ -export interface InstanceFailoverGroupsListByLocationOptionalParams +export interface JobTargetGroupsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocation operation. */ -export type InstanceFailoverGroupsListByLocationResponse = InstanceFailoverGroupListResult; - -/** Optional parameters. */ -export interface InstanceFailoverGroupsFailoverOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the failover operation. */ -export type InstanceFailoverGroupsFailoverResponse = InstanceFailoverGroup; - /** Optional parameters. */ -export interface InstanceFailoverGroupsForceFailoverAllowDataLossOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobTargetGroupsListByAgentNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the forceFailoverAllowDataLoss operation. */ -export type InstanceFailoverGroupsForceFailoverAllowDataLossResponse = InstanceFailoverGroup; +/** Contains response data for the listByAgentNext operation. */ +export type JobTargetGroupsListByAgentNextResponse = JobTargetGroupListResult; /** Optional parameters. */ -export interface InstanceFailoverGroupsListByLocationNextOptionalParams +export interface JobVersionsListByJobOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type InstanceFailoverGroupsListByLocationNextResponse = InstanceFailoverGroupListResult; +/** Contains response data for the listByJob operation. */ +export type JobVersionsListByJobResponse = JobVersionListResult; /** Optional parameters. */ -export interface InstancePoolsGetOptionalParams +export interface JobVersionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type InstancePoolsGetResponse = InstancePool; +export type JobVersionsGetResponse = JobVersion; /** Optional parameters. */ -export interface InstancePoolsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type InstancePoolsCreateOrUpdateResponse = InstancePool; +export interface JobVersionsListByJobNextOptionalParams + extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface InstancePoolsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +/** Contains response data for the listByJobNext operation. */ +export type JobVersionsListByJobNextResponse = JobVersionListResult; /** Optional parameters. */ -export interface InstancePoolsUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface JobsListByAgentOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type InstancePoolsUpdateResponse = InstancePool; +/** Contains response data for the listByAgent operation. */ +export type JobsListByAgentResponse = JobListResult; /** Optional parameters. */ -export interface InstancePoolsListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} +export interface JobsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type InstancePoolsListByResourceGroupResponse = InstancePoolListResult; +/** Contains response data for the get operation. */ +export type JobsGetResponse = Job; /** Optional parameters. */ -export interface InstancePoolsListOptionalParams +export interface JobsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type InstancePoolsListResponse = InstancePoolListResult; +/** Contains response data for the createOrUpdate operation. */ +export type JobsCreateOrUpdateResponse = Job; /** Optional parameters. */ -export interface InstancePoolsListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroupNext operation. */ -export type InstancePoolsListByResourceGroupNextResponse = InstancePoolListResult; +export interface JobsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface InstancePoolsListNextOptionalParams +export interface JobsListByAgentNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type InstancePoolsListNextResponse = InstancePoolListResult; +/** Contains response data for the listByAgentNext operation. */ +export type JobsListByAgentNextResponse = JobListResult; /** Optional parameters. */ -export interface JobAgentsListByServerOptionalParams +export interface LedgerDigestUploadsListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type JobAgentsListByServerResponse = JobAgentListResult; +/** Contains response data for the listByDatabase operation. */ +export type LedgerDigestUploadsListByDatabaseResponse = LedgerDigestUploadsListResult; /** Optional parameters. */ -export interface JobAgentsGetOptionalParams +export interface LedgerDigestUploadsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type JobAgentsGetResponse = JobAgent; +export type LedgerDigestUploadsGetResponse = LedgerDigestUploads; /** Optional parameters. */ -export interface JobAgentsCreateOrUpdateOptionalParams +export interface LedgerDigestUploadsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -11282,19 +13145,10 @@ export interface JobAgentsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type JobAgentsCreateOrUpdateResponse = JobAgent; - -/** Optional parameters. */ -export interface JobAgentsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export type LedgerDigestUploadsCreateOrUpdateResponse = LedgerDigestUploads; /** Optional parameters. */ -export interface JobAgentsUpdateOptionalParams +export interface LedgerDigestUploadsDisableOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -11302,76 +13156,71 @@ export interface JobAgentsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type JobAgentsUpdateResponse = JobAgent; - -/** Optional parameters. */ -export interface JobAgentsListByServerNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServerNext operation. */ -export type JobAgentsListByServerNextResponse = JobAgentListResult; +/** Contains response data for the disable operation. */ +export type LedgerDigestUploadsDisableResponse = LedgerDigestUploads; /** Optional parameters. */ -export interface JobCredentialsListByAgentOptionalParams +export interface LedgerDigestUploadsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByAgent operation. */ -export type JobCredentialsListByAgentResponse = JobCredentialListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type LedgerDigestUploadsListByDatabaseNextResponse = LedgerDigestUploadsListResult; /** Optional parameters. */ -export interface JobCredentialsGetOptionalParams - extends coreClient.OperationOptions {} +export interface CapabilitiesListByLocationOptionalParams + extends coreClient.OperationOptions { + /** If specified, restricts the response to only include the selected item. */ + include?: CapabilityGroup; +} -/** Contains response data for the get operation. */ -export type JobCredentialsGetResponse = JobCredential; +/** Contains response data for the listByLocation operation. */ +export type CapabilitiesListByLocationResponse = LocationCapabilities; /** Optional parameters. */ -export interface JobCredentialsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type JobCredentialsCreateOrUpdateResponse = JobCredential; +export interface LongTermRetentionBackupsListByLocationOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Optional parameters. */ -export interface JobCredentialsDeleteOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the listByLocation operation. */ +export type LongTermRetentionBackupsListByLocationResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobCredentialsListByAgentNextOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionBackupsListByServerOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the listByAgentNext operation. */ -export type JobCredentialsListByAgentNextResponse = JobCredentialListResult; +/** Contains response data for the listByServer operation. */ +export type LongTermRetentionBackupsListByServerResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobExecutionsListByAgentOptionalParams +export interface LongTermRetentionBackupsListByDatabaseOptionalParams extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; - /** If specified, only job executions created at or after the specified time are included. */ - createTimeMin?: Date; - /** If specified, only job executions created before the specified time are included. */ - createTimeMax?: Date; - /** If specified, only job executions completed at or after the specified time are included. */ - endTimeMin?: Date; - /** If specified, only job executions completed before the specified time are included. */ - endTimeMax?: Date; - /** If specified, only active or only completed job executions are included. */ - isActive?: boolean; - /** The number of elements to return from the collection. */ - top?: number; + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; } -/** Contains response data for the listByAgent operation. */ -export type JobExecutionsListByAgentResponse = JobExecutionListResult; +/** Contains response data for the listByDatabase operation. */ +export type LongTermRetentionBackupsListByDatabaseResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobExecutionsCancelOptionalParams +export interface LongTermRetentionBackupsGetOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the get operation. */ +export type LongTermRetentionBackupsGetResponse = LongTermRetentionBackup; + /** Optional parameters. */ -export interface JobExecutionsCreateOptionalParams +export interface LongTermRetentionBackupsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -11379,40 +13228,20 @@ export interface JobExecutionsCreateOptionalParams resumeFrom?: string; } -/** Contains response data for the create operation. */ -export type JobExecutionsCreateResponse = JobExecution; - /** Optional parameters. */ -export interface JobExecutionsListByJobOptionalParams +export interface LongTermRetentionBackupsCopyOptionalParams extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; - /** If specified, only job executions created at or after the specified time are included. */ - createTimeMin?: Date; - /** If specified, only job executions created before the specified time are included. */ - createTimeMax?: Date; - /** If specified, only job executions completed at or after the specified time are included. */ - endTimeMin?: Date; - /** If specified, only job executions completed before the specified time are included. */ - endTimeMax?: Date; - /** If specified, only active or only completed job executions are included. */ - isActive?: boolean; - /** The number of elements to return from the collection. */ - top?: number; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByJob operation. */ -export type JobExecutionsListByJobResponse = JobExecutionListResult; - -/** Optional parameters. */ -export interface JobExecutionsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type JobExecutionsGetResponse = JobExecution; +/** Contains response data for the copy operation. */ +export type LongTermRetentionBackupsCopyResponse = LongTermRetentionBackupOperationResult; /** Optional parameters. */ -export interface JobExecutionsCreateOrUpdateOptionalParams +export interface LongTermRetentionBackupsUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -11420,269 +13249,279 @@ export interface JobExecutionsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type JobExecutionsCreateOrUpdateResponse = JobExecution; - -/** Optional parameters. */ -export interface JobExecutionsListByAgentNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAgentNext operation. */ -export type JobExecutionsListByAgentNextResponse = JobExecutionListResult; +/** Contains response data for the update operation. */ +export type LongTermRetentionBackupsUpdateResponse = LongTermRetentionBackupOperationResult; /** Optional parameters. */ -export interface JobExecutionsListByJobNextOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionBackupsListByResourceGroupLocationOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the listByJobNext operation. */ -export type JobExecutionsListByJobNextResponse = JobExecutionListResult; +/** Contains response data for the listByResourceGroupLocation operation. */ +export type LongTermRetentionBackupsListByResourceGroupLocationResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobsListByAgentOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionBackupsListByResourceGroupServerOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the listByAgent operation. */ -export type JobsListByAgentResponse = JobListResult; +/** Contains response data for the listByResourceGroupServer operation. */ +export type LongTermRetentionBackupsListByResourceGroupServerResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobsGetOptionalParams extends coreClient.OperationOptions {} +export interface LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the get operation. */ -export type JobsGetResponse = Job; +/** Contains response data for the listByResourceGroupDatabase operation. */ +export type LongTermRetentionBackupsListByResourceGroupDatabaseResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobsCreateOrUpdateOptionalParams +export interface LongTermRetentionBackupsGetByResourceGroupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type JobsCreateOrUpdateResponse = Job; +/** Contains response data for the getByResourceGroup operation. */ +export type LongTermRetentionBackupsGetByResourceGroupResponse = LongTermRetentionBackup; /** Optional parameters. */ -export interface JobsDeleteOptionalParams extends coreClient.OperationOptions {} +export interface LongTermRetentionBackupsDeleteByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface JobsListByAgentNextOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionBackupsCopyByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByAgentNext operation. */ -export type JobsListByAgentNextResponse = JobListResult; +/** Contains response data for the copyByResourceGroup operation. */ +export type LongTermRetentionBackupsCopyByResourceGroupResponse = LongTermRetentionBackupOperationResult; /** Optional parameters. */ -export interface JobStepExecutionsListByJobExecutionOptionalParams +export interface LongTermRetentionBackupsUpdateByResourceGroupOptionalParams extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; - /** If specified, only job executions created at or after the specified time are included. */ - createTimeMin?: Date; - /** If specified, only job executions created before the specified time are included. */ - createTimeMax?: Date; - /** If specified, only job executions completed at or after the specified time are included. */ - endTimeMin?: Date; - /** If specified, only job executions completed before the specified time are included. */ - endTimeMax?: Date; - /** If specified, only active or only completed job executions are included. */ - isActive?: boolean; - /** The number of elements to return from the collection. */ - top?: number; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByJobExecution operation. */ -export type JobStepExecutionsListByJobExecutionResponse = JobExecutionListResult; +/** Contains response data for the updateByResourceGroup operation. */ +export type LongTermRetentionBackupsUpdateByResourceGroupResponse = LongTermRetentionBackupOperationResult; /** Optional parameters. */ -export interface JobStepExecutionsGetOptionalParams +export interface LongTermRetentionBackupsListByLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type JobStepExecutionsGetResponse = JobExecution; +/** Contains response data for the listByLocationNext operation. */ +export type LongTermRetentionBackupsListByLocationNextResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepExecutionsListByJobExecutionNextOptionalParams +export interface LongTermRetentionBackupsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByJobExecutionNext operation. */ -export type JobStepExecutionsListByJobExecutionNextResponse = JobExecutionListResult; +/** Contains response data for the listByServerNext operation. */ +export type LongTermRetentionBackupsListByServerNextResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsListByVersionOptionalParams +export interface LongTermRetentionBackupsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByVersion operation. */ -export type JobStepsListByVersionResponse = JobStepListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type LongTermRetentionBackupsListByDatabaseNextResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsGetByVersionOptionalParams +export interface LongTermRetentionBackupsListByResourceGroupLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getByVersion operation. */ -export type JobStepsGetByVersionResponse = JobStep; +/** Contains response data for the listByResourceGroupLocationNext operation. */ +export type LongTermRetentionBackupsListByResourceGroupLocationNextResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsListByJobOptionalParams +export interface LongTermRetentionBackupsListByResourceGroupServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByJob operation. */ -export type JobStepsListByJobResponse = JobStepListResult; +/** Contains response data for the listByResourceGroupServerNext operation. */ +export type LongTermRetentionBackupsListByResourceGroupServerNextResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsGetOptionalParams +export interface LongTermRetentionBackupsListByResourceGroupDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type JobStepsGetResponse = JobStep; +/** Contains response data for the listByResourceGroupDatabaseNext operation. */ +export type LongTermRetentionBackupsListByResourceGroupDatabaseNextResponse = LongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type JobStepsCreateOrUpdateResponse = JobStep; +export interface LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Optional parameters. */ -export interface JobStepsDeleteOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the listByLocation operation. */ +export type LongTermRetentionManagedInstanceBackupsListByLocationResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsListByVersionNextOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionManagedInstanceBackupsListByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the listByVersionNext operation. */ -export type JobStepsListByVersionNextResponse = JobStepListResult; +/** Contains response data for the listByDatabase operation. */ +export type LongTermRetentionManagedInstanceBackupsListByDatabaseResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobStepsListByJobNextOptionalParams +export interface LongTermRetentionManagedInstanceBackupsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByJobNext operation. */ -export type JobStepsListByJobNextResponse = JobStepListResult; +/** Contains response data for the get operation. */ +export type LongTermRetentionManagedInstanceBackupsGetResponse = ManagedInstanceLongTermRetentionBackup; /** Optional parameters. */ -export interface JobTargetExecutionsListByJobExecutionOptionalParams +export interface LongTermRetentionManagedInstanceBackupsDeleteOptionalParams extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; - /** If specified, only job executions created at or after the specified time are included. */ - createTimeMin?: Date; - /** If specified, only job executions created before the specified time are included. */ - createTimeMax?: Date; - /** If specified, only job executions completed at or after the specified time are included. */ - endTimeMin?: Date; - /** If specified, only job executions completed before the specified time are included. */ - endTimeMax?: Date; - /** If specified, only active or only completed job executions are included. */ - isActive?: boolean; - /** The number of elements to return from the collection. */ - top?: number; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByJobExecution operation. */ -export type JobTargetExecutionsListByJobExecutionResponse = JobExecutionListResult; - /** Optional parameters. */ -export interface JobTargetExecutionsListByStepOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByInstanceOptionalParams extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; - /** If specified, only job executions created at or after the specified time are included. */ - createTimeMin?: Date; - /** If specified, only job executions created before the specified time are included. */ - createTimeMax?: Date; - /** If specified, only job executions completed at or after the specified time are included. */ - endTimeMin?: Date; - /** If specified, only job executions completed before the specified time are included. */ - endTimeMax?: Date; - /** If specified, only active or only completed job executions are included. */ - isActive?: boolean; - /** The number of elements to return from the collection. */ - top?: number; + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; } -/** Contains response data for the listByStep operation. */ -export type JobTargetExecutionsListByStepResponse = JobExecutionListResult; +/** Contains response data for the listByInstance operation. */ +export type LongTermRetentionManagedInstanceBackupsListByInstanceResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobTargetExecutionsGetOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the get operation. */ -export type JobTargetExecutionsGetResponse = JobExecution; +/** Contains response data for the listByResourceGroupLocation operation. */ +export type LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobTargetExecutionsListByJobExecutionNextOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the listByJobExecutionNext operation. */ -export type JobTargetExecutionsListByJobExecutionNextResponse = JobExecutionListResult; +/** Contains response data for the listByResourceGroupDatabase operation. */ +export type LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobTargetExecutionsListByStepNextOptionalParams +export interface LongTermRetentionManagedInstanceBackupsGetByResourceGroupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByStepNext operation. */ -export type JobTargetExecutionsListByStepNextResponse = JobExecutionListResult; +/** Contains response data for the getByResourceGroup operation. */ +export type LongTermRetentionManagedInstanceBackupsGetByResourceGroupResponse = ManagedInstanceLongTermRetentionBackup; /** Optional parameters. */ -export interface JobTargetGroupsListByAgentOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByAgent operation. */ -export type JobTargetGroupsListByAgentResponse = JobTargetGroupListResult; +export interface LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface JobTargetGroupsGetOptionalParams - extends coreClient.OperationOptions {} +export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceOptionalParams + extends coreClient.OperationOptions { + /** Whether or not to only get the latest backup for each database. */ + onlyLatestPerDatabase?: boolean; + /** Whether to query against just live databases, just deleted databases, or all databases. */ + databaseState?: DatabaseState; +} -/** Contains response data for the get operation. */ -export type JobTargetGroupsGetResponse = JobTargetGroup; +/** Contains response data for the listByResourceGroupInstance operation. */ +export type LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobTargetGroupsCreateOrUpdateOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type JobTargetGroupsCreateOrUpdateResponse = JobTargetGroup; +/** Contains response data for the listByLocationNext operation. */ +export type LongTermRetentionManagedInstanceBackupsListByLocationNextResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobTargetGroupsDeleteOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByDatabaseNext operation. */ +export type LongTermRetentionManagedInstanceBackupsListByDatabaseNextResponse = ManagedInstanceLongTermRetentionBackupListResult; + /** Optional parameters. */ -export interface JobTargetGroupsListByAgentNextOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByAgentNext operation. */ -export type JobTargetGroupsListByAgentNextResponse = JobTargetGroupListResult; +/** Contains response data for the listByInstanceNext operation. */ +export type LongTermRetentionManagedInstanceBackupsListByInstanceNextResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobVersionsListByJobOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByJob operation. */ -export type JobVersionsListByJobResponse = JobVersionListResult; +/** Contains response data for the listByResourceGroupLocationNext operation. */ +export type LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobVersionsGetOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type JobVersionsGetResponse = JobVersion; +/** Contains response data for the listByResourceGroupDatabaseNext operation. */ +export type LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseNextResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface JobVersionsListByJobNextOptionalParams +export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByJobNext operation. */ -export type JobVersionsListByJobNextResponse = JobVersionListResult; +/** Contains response data for the listByResourceGroupInstanceNext operation. */ +export type LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextResponse = ManagedInstanceLongTermRetentionBackupListResult; /** Optional parameters. */ -export interface CapabilitiesListByLocationOptionalParams - extends coreClient.OperationOptions { - /** If specified, restricts the response to only include the selected item. */ - include?: CapabilityGroup; -} +export interface LongTermRetentionPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByLocation operation. */ -export type CapabilitiesListByLocationResponse = LocationCapabilities; +/** Contains response data for the listByDatabase operation. */ +export type LongTermRetentionPoliciesListByDatabaseResponse = LongTermRetentionPolicyListResult; /** Optional parameters. */ export interface LongTermRetentionPoliciesGetOptionalParams @@ -11703,13 +13542,6 @@ export interface LongTermRetentionPoliciesCreateOrUpdateOptionalParams /** Contains response data for the createOrUpdate operation. */ export type LongTermRetentionPoliciesCreateOrUpdateResponse = LongTermRetentionPolicy; -/** Optional parameters. */ -export interface LongTermRetentionPoliciesListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type LongTermRetentionPoliciesListByDatabaseResponse = LongTermRetentionPolicyListResult; - /** Optional parameters. */ export interface LongTermRetentionPoliciesListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} @@ -11735,6 +13567,13 @@ export type MaintenanceWindowsGetResponse = MaintenanceWindows; export interface MaintenanceWindowsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} +/** Optional parameters. */ +export interface ManagedBackupShortTermRetentionPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type ManagedBackupShortTermRetentionPoliciesListByDatabaseResponse = ManagedBackupShortTermRetentionPolicyListResult; + /** Optional parameters. */ export interface ManagedBackupShortTermRetentionPoliciesGetOptionalParams extends coreClient.OperationOptions {} @@ -11767,18 +13606,39 @@ export interface ManagedBackupShortTermRetentionPoliciesUpdateOptionalParams export type ManagedBackupShortTermRetentionPoliciesUpdateResponse = ManagedBackupShortTermRetentionPolicy; /** Optional parameters. */ -export interface ManagedBackupShortTermRetentionPoliciesListByDatabaseOptionalParams +export interface ManagedBackupShortTermRetentionPoliciesListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseNext operation. */ +export type ManagedBackupShortTermRetentionPoliciesListByDatabaseNextResponse = ManagedBackupShortTermRetentionPolicyListResult; + +/** Optional parameters. */ +export interface ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByDatabase operation. */ -export type ManagedBackupShortTermRetentionPoliciesListByDatabaseResponse = ManagedBackupShortTermRetentionPolicyListResult; +export type ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse = ManagedDatabaseAdvancedThreatProtectionListResult; /** Optional parameters. */ -export interface ManagedBackupShortTermRetentionPoliciesListByDatabaseNextOptionalParams +export interface ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedDatabaseAdvancedThreatProtectionSettingsGetResponse = ManagedDatabaseAdvancedThreatProtection; + +/** Optional parameters. */ +export interface ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse = ManagedDatabaseAdvancedThreatProtection; + +/** Optional parameters. */ +export interface ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByDatabaseNext operation. */ -export type ManagedBackupShortTermRetentionPoliciesListByDatabaseNextResponse = ManagedBackupShortTermRetentionPolicyListResult; +export type ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse = ManagedDatabaseAdvancedThreatProtectionListResult; /** Optional parameters. */ export interface ManagedDatabaseColumnsListByDatabaseOptionalParams @@ -11829,6 +13689,32 @@ export interface ManagedDatabaseColumnsListByTableNextOptionalParams /** Contains response data for the listByTableNext operation. */ export type ManagedDatabaseColumnsListByTableNextResponse = DatabaseColumnListResult; +/** Optional parameters. */ +export interface ManagedDatabaseMoveOperationsListByLocationOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; + /** Whether or not to only get the latest operation for each database. Has higher priority than $filter. */ + onlyLatestPerDatabase?: boolean; +} + +/** Contains response data for the listByLocation operation. */ +export type ManagedDatabaseMoveOperationsListByLocationResponse = ManagedDatabaseMoveOperationListResult; + +/** Optional parameters. */ +export interface ManagedDatabaseMoveOperationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedDatabaseMoveOperationsGetResponse = ManagedDatabaseMoveOperationResult; + +/** Optional parameters. */ +export interface ManagedDatabaseMoveOperationsListByLocationNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocationNext operation. */ +export type ManagedDatabaseMoveOperationsListByLocationNextResponse = ManagedDatabaseMoveOperationListResult; + /** Optional parameters. */ export interface ManagedDatabaseQueriesGetOptionalParams extends coreClient.OperationOptions {} @@ -11864,83 +13750,6 @@ export interface ManagedDatabaseRestoreDetailsGetOptionalParams /** Contains response data for the get operation. */ export type ManagedDatabaseRestoreDetailsGetResponse = ManagedDatabaseRestoreDetailsResult; -/** Optional parameters. */ -export interface ManagedDatabasesListByInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByInstance operation. */ -export type ManagedDatabasesListByInstanceResponse = ManagedDatabaseListResult; - -/** Optional parameters. */ -export interface ManagedDatabasesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ManagedDatabasesGetResponse = ManagedDatabase; - -/** Optional parameters. */ -export interface ManagedDatabasesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ManagedDatabasesCreateOrUpdateResponse = ManagedDatabase; - -/** Optional parameters. */ -export interface ManagedDatabasesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ManagedDatabasesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the update operation. */ -export type ManagedDatabasesUpdateResponse = ManagedDatabase; - -/** Optional parameters. */ -export interface ManagedDatabasesCompleteRestoreOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Optional parameters. */ -export interface ManagedDatabasesListInaccessibleByInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listInaccessibleByInstance operation. */ -export type ManagedDatabasesListInaccessibleByInstanceResponse = ManagedDatabaseListResult; - -/** Optional parameters. */ -export interface ManagedDatabasesListByInstanceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByInstanceNext operation. */ -export type ManagedDatabasesListByInstanceNextResponse = ManagedDatabaseListResult; - -/** Optional parameters. */ -export interface ManagedDatabasesListInaccessibleByInstanceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listInaccessibleByInstanceNext operation. */ -export type ManagedDatabasesListInaccessibleByInstanceNextResponse = ManagedDatabaseListResult; - /** Optional parameters. */ export interface ManagedDatabaseSchemasListByDatabaseOptionalParams extends coreClient.OperationOptions { @@ -11965,6 +13774,13 @@ export interface ManagedDatabaseSchemasListByDatabaseNextOptionalParams /** Contains response data for the listByDatabaseNext operation. */ export type ManagedDatabaseSchemasListByDatabaseNextResponse = DatabaseSchemaListResult; +/** Optional parameters. */ +export interface ManagedDatabaseSecurityAlertPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type ManagedDatabaseSecurityAlertPoliciesListByDatabaseResponse = ManagedDatabaseSecurityAlertPolicyListResult; + /** Optional parameters. */ export interface ManagedDatabaseSecurityAlertPoliciesGetOptionalParams extends coreClient.OperationOptions {} @@ -11977,14 +13793,7 @@ export interface ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateOptionalParam extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateResponse = ManagedDatabaseSecurityAlertPolicy; - -/** Optional parameters. */ -export interface ManagedDatabaseSecurityAlertPoliciesListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type ManagedDatabaseSecurityAlertPoliciesListByDatabaseResponse = ManagedDatabaseSecurityAlertPolicyListResult; +export type ManagedDatabaseSecurityAlertPoliciesCreateOrUpdateResponse = ManagedDatabaseSecurityAlertPolicy; /** Optional parameters. */ export interface ManagedDatabaseSecurityAlertPoliciesListByDatabaseNextOptionalParams @@ -11996,12 +13805,12 @@ export type ManagedDatabaseSecurityAlertPoliciesListByDatabaseNextResponse = Man /** Optional parameters. */ export interface ManagedDatabaseSecurityEventsListByDatabaseOptionalParams extends coreClient.OperationOptions { - /** The number of elements in the collection to skip. */ - skip?: number; /** An opaque token that identifies a starting point in the collection. */ skiptoken?: string; /** An OData filter expression that filters elements in the collection. */ filter?: string; + /** The number of elements in the collection to skip. */ + skip?: number; /** The number of elements to return from the collection. */ top?: number; } @@ -12016,6 +13825,35 @@ export interface ManagedDatabaseSecurityEventsListByDatabaseNextOptionalParams /** Contains response data for the listByDatabaseNext operation. */ export type ManagedDatabaseSecurityEventsListByDatabaseNextResponse = SecurityEventCollection; +/** Optional parameters. */ +export interface ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; + skipToken?: string; + count?: boolean; +} + +/** Contains response data for the listCurrentByDatabase operation. */ +export type ManagedDatabaseSensitivityLabelsListCurrentByDatabaseResponse = SensitivityLabelListResult; + +/** Optional parameters. */ +export interface ManagedDatabaseSensitivityLabelsUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; + skipToken?: string; + /** Specifies whether to include disabled recommendations or not. */ + includeDisabledRecommendations?: boolean; +} + +/** Contains response data for the listRecommendedByDatabase operation. */ +export type ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseResponse = SensitivityLabelListResult; + /** Optional parameters. */ export interface ManagedDatabaseSensitivityLabelsGetOptionalParams extends coreClient.OperationOptions {} @@ -12043,33 +13881,14 @@ export interface ManagedDatabaseSensitivityLabelsEnableRecommendationOptionalPar extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams - extends coreClient.OperationOptions { - skipToken?: string; - /** An OData filter expression that filters elements in the collection. */ - filter?: string; - count?: boolean; -} - -/** Contains response data for the listCurrentByDatabase operation. */ -export type ManagedDatabaseSensitivityLabelsListCurrentByDatabaseResponse = SensitivityLabelListResult; - -/** Optional parameters. */ -export interface ManagedDatabaseSensitivityLabelsUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams +export interface ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams extends coreClient.OperationOptions { - skipToken?: string; /** An OData filter expression that filters elements in the collection. */ filter?: string; - /** Specifies whether to include disabled recommendations or not. */ - includeDisabledRecommendations?: boolean; } -/** Contains response data for the listRecommendedByDatabase operation. */ -export type ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseResponse = SensitivityLabelListResult; +/** Contains response data for the listByDatabase operation. */ +export type ManagedDatabaseSensitivityLabelsListByDatabaseResponse = SensitivityLabelListResult; /** Optional parameters. */ export interface ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextOptionalParams @@ -12085,6 +13904,13 @@ export interface ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextOp /** Contains response data for the listRecommendedByDatabaseNext operation. */ export type ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextResponse = SensitivityLabelListResult; +/** Optional parameters. */ +export interface ManagedDatabaseSensitivityLabelsListByDatabaseNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseNext operation. */ +export type ManagedDatabaseSensitivityLabelsListByDatabaseNextResponse = SensitivityLabelListResult; + /** Optional parameters. */ export interface ManagedDatabaseRecommendedSensitivityLabelsUpdateOptionalParams extends coreClient.OperationOptions {} @@ -12113,6 +13939,13 @@ export interface ManagedDatabaseTablesListBySchemaNextOptionalParams /** Contains response data for the listBySchemaNext operation. */ export type ManagedDatabaseTablesListBySchemaNextResponse = DatabaseTableListResult; +/** Optional parameters. */ +export interface ManagedDatabaseTransparentDataEncryptionListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type ManagedDatabaseTransparentDataEncryptionListByDatabaseResponse = ManagedTransparentDataEncryptionListResult; + /** Optional parameters. */ export interface ManagedDatabaseTransparentDataEncryptionGetOptionalParams extends coreClient.OperationOptions {} @@ -12127,13 +13960,6 @@ export interface ManagedDatabaseTransparentDataEncryptionCreateOrUpdateOptionalP /** Contains response data for the createOrUpdate operation. */ export type ManagedDatabaseTransparentDataEncryptionCreateOrUpdateResponse = ManagedTransparentDataEncryption; -/** Optional parameters. */ -export interface ManagedDatabaseTransparentDataEncryptionListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type ManagedDatabaseTransparentDataEncryptionListByDatabaseResponse = ManagedTransparentDataEncryptionListResult; - /** Optional parameters. */ export interface ManagedDatabaseTransparentDataEncryptionListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} @@ -12160,23 +13986,42 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselinesDeleteOption extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentsGetOptionalParams +export interface ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseResponse = VulnerabilityAssessmentScanRecordListResult; + +/** Optional parameters. */ +export interface ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ManagedDatabaseVulnerabilityAssessmentsGetResponse = DatabaseVulnerabilityAssessment; +export type ManagedDatabaseVulnerabilityAssessmentScansGetResponse = VulnerabilityAssessmentScanRecord; /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateOptionalParams +export interface ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateResponse = DatabaseVulnerabilityAssessment; +/** Contains response data for the export operation. */ +export type ManagedDatabaseVulnerabilityAssessmentScansExportResponse = DatabaseVulnerabilityAssessmentScansExport; /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentsDeleteOptionalParams +export interface ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByDatabaseNext operation. */ +export type ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse = VulnerabilityAssessmentScanRecordListResult; + /** Optional parameters. */ export interface ManagedDatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams extends coreClient.OperationOptions {} @@ -12184,6 +14029,24 @@ export interface ManagedDatabaseVulnerabilityAssessmentsListByDatabaseOptionalPa /** Contains response data for the listByDatabase operation. */ export type ManagedDatabaseVulnerabilityAssessmentsListByDatabaseResponse = DatabaseVulnerabilityAssessmentListResult; +/** Optional parameters. */ +export interface ManagedDatabaseVulnerabilityAssessmentsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedDatabaseVulnerabilityAssessmentsGetResponse = DatabaseVulnerabilityAssessment; + +/** Optional parameters. */ +export interface ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedDatabaseVulnerabilityAssessmentsCreateOrUpdateResponse = DatabaseVulnerabilityAssessment; + +/** Optional parameters. */ +export interface ManagedDatabaseVulnerabilityAssessmentsDeleteOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface ManagedDatabaseVulnerabilityAssessmentsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} @@ -12192,7 +14055,21 @@ export interface ManagedDatabaseVulnerabilityAssessmentsListByDatabaseNextOption export type ManagedDatabaseVulnerabilityAssessmentsListByDatabaseNextResponse = DatabaseVulnerabilityAssessmentListResult; /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams +export interface ManagedDatabasesListByInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstance operation. */ +export type ManagedDatabasesListByInstanceResponse = ManagedDatabaseListResult; + +/** Optional parameters. */ +export interface ManagedDatabasesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedDatabasesGetResponse = ManagedDatabase; + +/** Optional parameters. */ +export interface ManagedDatabasesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12200,33 +14077,86 @@ export interface ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptional resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type ManagedDatabasesCreateOrUpdateResponse = ManagedDatabase; + /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams - extends coreClient.OperationOptions {} +export interface ManagedDatabasesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the export operation. */ -export type ManagedDatabaseVulnerabilityAssessmentScansExportResponse = DatabaseVulnerabilityAssessmentScansExport; +/** Optional parameters. */ +export interface ManagedDatabasesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ManagedDatabasesUpdateResponse = ManagedDatabase; /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams +export interface ManagedDatabasesCancelMoveOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedDatabasesCompleteMoveOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedDatabasesCompleteRestoreOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedDatabasesStartMoveOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedDatabasesListInaccessibleByInstanceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseResponse = VulnerabilityAssessmentScanRecordListResult; +/** Contains response data for the listInaccessibleByInstance operation. */ +export type ManagedDatabasesListInaccessibleByInstanceResponse = ManagedDatabaseListResult; /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams +export interface ManagedDatabasesListByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ManagedDatabaseVulnerabilityAssessmentScansGetResponse = VulnerabilityAssessmentScanRecord; +/** Contains response data for the listByInstanceNext operation. */ +export type ManagedDatabasesListByInstanceNextResponse = ManagedDatabaseListResult; /** Optional parameters. */ -export interface ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextOptionalParams +export interface ManagedDatabasesListInaccessibleByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse = VulnerabilityAssessmentScanRecordListResult; +/** Contains response data for the listInaccessibleByInstanceNext operation. */ +export type ManagedDatabasesListInaccessibleByInstanceNextResponse = ManagedDatabaseListResult; /** Optional parameters. */ export interface ManagedInstanceAdministratorsListByInstanceOptionalParams @@ -12270,6 +14200,46 @@ export interface ManagedInstanceAdministratorsListByInstanceNextOptionalParams /** Contains response data for the listByInstanceNext operation. */ export type ManagedInstanceAdministratorsListByInstanceNextResponse = ManagedInstanceAdministratorListResult; +/** Optional parameters. */ +export interface ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstance operation. */ +export type ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceResponse = ManagedInstanceAdvancedThreatProtectionListResult; + +/** Optional parameters. */ +export interface ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedInstanceAdvancedThreatProtectionSettingsGetResponse = ManagedInstanceAdvancedThreatProtection; + +/** Optional parameters. */ +export interface ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse = ManagedInstanceAdvancedThreatProtection; + +/** Optional parameters. */ +export interface ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstanceNext operation. */ +export type ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextResponse = ManagedInstanceAdvancedThreatProtectionListResult; + +/** Optional parameters. */ +export interface ManagedInstanceAzureADOnlyAuthenticationsListByInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstance operation. */ +export type ManagedInstanceAzureADOnlyAuthenticationsListByInstanceResponse = ManagedInstanceAzureADOnlyAuthListResult; + /** Optional parameters. */ export interface ManagedInstanceAzureADOnlyAuthenticationsGetOptionalParams extends coreClient.OperationOptions {} @@ -12299,21 +14269,28 @@ export interface ManagedInstanceAzureADOnlyAuthenticationsDeleteOptionalParams } /** Optional parameters. */ -export interface ManagedInstanceAzureADOnlyAuthenticationsListByInstanceOptionalParams +export interface ManagedInstanceAzureADOnlyAuthenticationsListByInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstanceNext operation. */ +export type ManagedInstanceAzureADOnlyAuthenticationsListByInstanceNextResponse = ManagedInstanceAzureADOnlyAuthListResult; + +/** Optional parameters. */ +export interface ManagedInstanceDtcsListByManagedInstanceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstance operation. */ -export type ManagedInstanceAzureADOnlyAuthenticationsListByInstanceResponse = ManagedInstanceAzureADOnlyAuthListResult; +/** Contains response data for the listByManagedInstance operation. */ +export type ManagedInstanceDtcsListByManagedInstanceResponse = ManagedInstanceDtcListResult; /** Optional parameters. */ -export interface ManagedInstanceAzureADOnlyAuthenticationsListByInstanceNextOptionalParams +export interface ManagedInstanceDtcsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstanceNext operation. */ -export type ManagedInstanceAzureADOnlyAuthenticationsListByInstanceNextResponse = ManagedInstanceAzureADOnlyAuthListResult; +/** Contains response data for the get operation. */ +export type ManagedInstanceDtcsGetResponse = ManagedInstanceDtc; /** Optional parameters. */ -export interface ManagedInstanceEncryptionProtectorsRevalidateOptionalParams +export interface ManagedInstanceDtcsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12321,6 +14298,16 @@ export interface ManagedInstanceEncryptionProtectorsRevalidateOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type ManagedInstanceDtcsCreateOrUpdateResponse = ManagedInstanceDtc; + +/** Optional parameters. */ +export interface ManagedInstanceDtcsListByManagedInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByManagedInstanceNext operation. */ +export type ManagedInstanceDtcsListByManagedInstanceNextResponse = ManagedInstanceDtcListResult; + /** Optional parameters. */ export interface ManagedInstanceEncryptionProtectorsListByInstanceOptionalParams extends coreClient.OperationOptions {} @@ -12347,6 +14334,15 @@ export interface ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams /** Contains response data for the createOrUpdate operation. */ export type ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse = ManagedInstanceEncryptionProtector; +/** Optional parameters. */ +export interface ManagedInstanceEncryptionProtectorsRevalidateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + /** Optional parameters. */ export interface ManagedInstanceEncryptionProtectorsListByInstanceNextOptionalParams extends coreClient.OperationOptions {} @@ -12399,6 +14395,13 @@ export interface ManagedInstanceKeysListByInstanceNextOptionalParams /** Contains response data for the listByInstanceNext operation. */ export type ManagedInstanceKeysListByInstanceNextResponse = ManagedInstanceKeyListResult; +/** Optional parameters. */ +export interface ManagedInstanceLongTermRetentionPoliciesListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type ManagedInstanceLongTermRetentionPoliciesListByDatabaseResponse = ManagedInstanceLongTermRetentionPolicyListResult; + /** Optional parameters. */ export interface ManagedInstanceLongTermRetentionPoliciesGetOptionalParams extends coreClient.OperationOptions {} @@ -12419,11 +14422,16 @@ export interface ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalP export type ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateResponse = ManagedInstanceLongTermRetentionPolicy; /** Optional parameters. */ -export interface ManagedInstanceLongTermRetentionPoliciesListByDatabaseOptionalParams - extends coreClient.OperationOptions {} +export interface ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByDatabase operation. */ -export type ManagedInstanceLongTermRetentionPoliciesListByDatabaseResponse = ManagedInstanceLongTermRetentionPolicyListResult; +/** Contains response data for the delete operation. */ +export type ManagedInstanceLongTermRetentionPoliciesDeleteResponse = ManagedInstanceLongTermRetentionPolicy; /** Optional parameters. */ export interface ManagedInstanceLongTermRetentionPoliciesListByDatabaseNextOptionalParams @@ -12457,6 +14465,13 @@ export interface ManagedInstanceOperationsListByManagedInstanceNextOptionalParam /** Contains response data for the listByManagedInstanceNext operation. */ export type ManagedInstanceOperationsListByManagedInstanceNextResponse = ManagedInstanceOperationListResult; +/** Optional parameters. */ +export interface ManagedInstancePrivateEndpointConnectionsListByManagedInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByManagedInstance operation. */ +export type ManagedInstancePrivateEndpointConnectionsListByManagedInstanceResponse = ManagedInstancePrivateEndpointConnectionListResult; + /** Optional parameters. */ export interface ManagedInstancePrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions {} @@ -12485,13 +14500,6 @@ export interface ManagedInstancePrivateEndpointConnectionsDeleteOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface ManagedInstancePrivateEndpointConnectionsListByManagedInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByManagedInstance operation. */ -export type ManagedInstancePrivateEndpointConnectionsListByManagedInstanceResponse = ManagedInstancePrivateEndpointConnectionListResult; - /** Optional parameters. */ export interface ManagedInstancePrivateEndpointConnectionsListByManagedInstanceNextOptionalParams extends coreClient.OperationOptions {} @@ -12529,6 +14537,13 @@ export interface ManagedInstanceTdeCertificatesCreateOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ManagedInstanceVulnerabilityAssessmentsListByInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstance operation. */ +export type ManagedInstanceVulnerabilityAssessmentsListByInstanceResponse = ManagedInstanceVulnerabilityAssessmentListResult; + /** Optional parameters. */ export interface ManagedInstanceVulnerabilityAssessmentsGetOptionalParams extends coreClient.OperationOptions {} @@ -12548,18 +14563,229 @@ export interface ManagedInstanceVulnerabilityAssessmentsDeleteOptionalParams extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ManagedInstanceVulnerabilityAssessmentsListByInstanceOptionalParams +export interface ManagedInstanceVulnerabilityAssessmentsListByInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstanceNext operation. */ +export type ManagedInstanceVulnerabilityAssessmentsListByInstanceNextResponse = ManagedInstanceVulnerabilityAssessmentListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} + +/** Contains response data for the list operation. */ +export type ManagedInstancesListResponse = ManagedInstanceListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListByInstancePoolOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} + +/** Contains response data for the listByInstancePool operation. */ +export type ManagedInstancesListByInstancePoolResponse = ManagedInstanceListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type ManagedInstancesListByResourceGroupResponse = ManagedInstanceListResult; + +/** Optional parameters. */ +export interface ManagedInstancesGetOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} + +/** Contains response data for the get operation. */ +export type ManagedInstancesGetResponse = ManagedInstance; + +/** Optional parameters. */ +export interface ManagedInstancesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedInstancesCreateOrUpdateResponse = ManagedInstance; + +/** Optional parameters. */ +export interface ManagedInstancesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedInstancesUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type ManagedInstancesUpdateResponse = ManagedInstance; + +/** Optional parameters. */ +export interface ManagedInstancesFailoverOptionalParams + extends coreClient.OperationOptions { + /** The type of replica to be failed over. */ + replicaType?: ReplicaType; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOutboundNetworkDependenciesByManagedInstance operation. */ +export type ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceResponse = OutboundEnvironmentEndpointCollection; + +/** Optional parameters. */ +export interface ManagedInstancesStartOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedInstancesStopOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedInstancesListByManagedInstanceOptionalParams + extends coreClient.OperationOptions { + /** Start time for observed period. */ + startTime?: string; + /** End time for observed period. */ + endTime?: string; + /** The time step to be used to summarize the metric values. Default value is PT1H */ + interval?: QueryTimeGrainType; + /** How many 'top queries' to return. Default is 5. */ + numberOfQueries?: number; + /** Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. */ + databases?: string; + /** Aggregation function to be used, default value is 'sum' */ + aggregationFunction?: AggregationFunctionType; + /** Metric to be used for ranking top queries. Default is 'cpu' */ + observationMetric?: MetricType; +} + +/** Contains response data for the listByManagedInstance operation. */ +export type ManagedInstancesListByManagedInstanceResponse = TopQueriesListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ManagedInstancesListNextResponse = ManagedInstanceListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListByInstancePoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstancePoolNext operation. */ +export type ManagedInstancesListByInstancePoolNextResponse = ManagedInstanceListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ManagedInstancesListByResourceGroupNextResponse = ManagedInstanceListResult; + +/** Optional parameters. */ +export interface ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listOutboundNetworkDependenciesByManagedInstanceNext operation. */ +export type ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextResponse = OutboundEnvironmentEndpointCollection; + +/** Optional parameters. */ +export interface ManagedInstancesListByManagedInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByManagedInstanceNext operation. */ +export type ManagedInstancesListByManagedInstanceNextResponse = TopQueriesListResult; + +/** Optional parameters. */ +export interface ManagedLedgerDigestUploadsListByDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabase operation. */ +export type ManagedLedgerDigestUploadsListByDatabaseResponse = ManagedLedgerDigestUploadsListResult; + +/** Optional parameters. */ +export interface ManagedLedgerDigestUploadsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedLedgerDigestUploadsGetResponse = ManagedLedgerDigestUploads; + +/** Optional parameters. */ +export interface ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedLedgerDigestUploadsCreateOrUpdateResponse = ManagedLedgerDigestUploads; + +/** Optional parameters. */ +export interface ManagedLedgerDigestUploadsDisableOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the disable operation. */ +export type ManagedLedgerDigestUploadsDisableResponse = ManagedLedgerDigestUploads; + +/** Optional parameters. */ +export interface ManagedLedgerDigestUploadsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstance operation. */ -export type ManagedInstanceVulnerabilityAssessmentsListByInstanceResponse = ManagedInstanceVulnerabilityAssessmentListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type ManagedLedgerDigestUploadsListByDatabaseNextResponse = ManagedLedgerDigestUploadsListResult; /** Optional parameters. */ -export interface ManagedInstanceVulnerabilityAssessmentsListByInstanceNextOptionalParams +export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstanceNext operation. */ -export type ManagedInstanceVulnerabilityAssessmentsListByInstanceNextResponse = ManagedInstanceVulnerabilityAssessmentListResult; +/** Contains response data for the listByRestorableDroppedDatabase operation. */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseResponse = ManagedBackupShortTermRetentionPolicyListResult; /** Optional parameters. */ export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesGetOptionalParams @@ -12593,28 +14819,28 @@ export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicie export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesUpdateResponse = ManagedBackupShortTermRetentionPolicy; /** Optional parameters. */ -export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseOptionalParams +export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByRestorableDroppedDatabase operation. */ -export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseResponse = ManagedBackupShortTermRetentionPolicyListResult; +/** Contains response data for the listByRestorableDroppedDatabaseNext operation. */ +export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseNextResponse = ManagedBackupShortTermRetentionPolicyListResult; /** Optional parameters. */ -export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseNextOptionalParams +export interface ManagedServerDnsAliasesListByManagedInstanceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByRestorableDroppedDatabaseNext operation. */ -export type ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseNextResponse = ManagedBackupShortTermRetentionPolicyListResult; +/** Contains response data for the listByManagedInstance operation. */ +export type ManagedServerDnsAliasesListByManagedInstanceResponse = ManagedServerDnsAliasListResult; /** Optional parameters. */ -export interface ManagedServerSecurityAlertPoliciesGetOptionalParams +export interface ManagedServerDnsAliasesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ManagedServerSecurityAlertPoliciesGetResponse = ManagedServerSecurityAlertPolicy; +export type ManagedServerDnsAliasesGetResponse = ManagedServerDnsAlias; /** Optional parameters. */ -export interface ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams +export interface ManagedServerDnsAliasesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12623,7 +14849,35 @@ export interface ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ManagedServerSecurityAlertPoliciesCreateOrUpdateResponse = ManagedServerSecurityAlertPolicy; +export type ManagedServerDnsAliasesCreateOrUpdateResponse = ManagedServerDnsAlias; + +/** Optional parameters. */ +export interface ManagedServerDnsAliasesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface ManagedServerDnsAliasesAcquireOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the acquire operation. */ +export type ManagedServerDnsAliasesAcquireResponse = ManagedServerDnsAlias; + +/** Optional parameters. */ +export interface ManagedServerDnsAliasesListByManagedInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByManagedInstanceNext operation. */ +export type ManagedServerDnsAliasesListByManagedInstanceNextResponse = ManagedServerDnsAliasListResult; /** Optional parameters. */ export interface ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams @@ -12632,6 +14886,25 @@ export interface ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams /** Contains response data for the listByInstance operation. */ export type ManagedServerSecurityAlertPoliciesListByInstanceResponse = ManagedServerSecurityAlertPolicyListResult; +/** Optional parameters. */ +export interface ManagedServerSecurityAlertPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ManagedServerSecurityAlertPoliciesGetResponse = ManagedServerSecurityAlertPolicy; + +/** Optional parameters. */ +export interface ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ManagedServerSecurityAlertPoliciesCreateOrUpdateResponse = ManagedServerSecurityAlertPolicy; + /** Optional parameters. */ export interface ManagedServerSecurityAlertPoliciesListByInstanceNextOptionalParams extends coreClient.OperationOptions {} @@ -12654,28 +14927,21 @@ export interface OperationsListNextOptionalParams export type OperationsListNextResponse = OperationListResult; /** Optional parameters. */ -export interface OperationsHealthListByLocationOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByLocation operation. */ -export type OperationsHealthListByLocationResponse = OperationsHealthListResult; - -/** Optional parameters. */ -export interface OperationsHealthListByLocationNextOptionalParams +export interface OutboundFirewallRulesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type OperationsHealthListByLocationNextResponse = OperationsHealthListResult; +/** Contains response data for the listByServer operation. */ +export type OutboundFirewallRulesListByServerResponse = OutboundFirewallRuleListResult; /** Optional parameters. */ -export interface PrivateEndpointConnectionsGetOptionalParams +export interface OutboundFirewallRulesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; +export type OutboundFirewallRulesGetResponse = OutboundFirewallRule; /** Optional parameters. */ -export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams +export interface OutboundFirewallRulesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12684,10 +14950,10 @@ export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; +export type OutboundFirewallRulesCreateOrUpdateResponse = OutboundFirewallRule; /** Optional parameters. */ -export interface PrivateEndpointConnectionsDeleteOptionalParams +export interface OutboundFirewallRulesDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12696,70 +14962,28 @@ export interface PrivateEndpointConnectionsDeleteOptionalParams } /** Optional parameters. */ -export interface PrivateEndpointConnectionsListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult; - -/** Optional parameters. */ -export interface PrivateEndpointConnectionsListByServerNextOptionalParams +export interface OutboundFirewallRulesListByServerNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServerNext operation. */ -export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult; +export type OutboundFirewallRulesListByServerNextResponse = OutboundFirewallRuleListResult; /** Optional parameters. */ -export interface PrivateLinkResourcesListByServerOptionalParams +export interface PrivateEndpointConnectionsListByServerOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServer operation. */ -export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult; - -/** Optional parameters. */ -export interface PrivateLinkResourcesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type PrivateLinkResourcesGetResponse = PrivateLinkResource; - -/** Optional parameters. */ -export interface PrivateLinkResourcesListByServerNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServerNext operation. */ -export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult; - -/** Optional parameters. */ -export interface RecoverableManagedDatabasesListByInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByInstance operation. */ -export type RecoverableManagedDatabasesListByInstanceResponse = RecoverableManagedDatabaseListResult; +export type PrivateEndpointConnectionsListByServerResponse = PrivateEndpointConnectionListResult; /** Optional parameters. */ -export interface RecoverableManagedDatabasesGetOptionalParams +export interface PrivateEndpointConnectionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type RecoverableManagedDatabasesGetResponse = RecoverableManagedDatabase; - -/** Optional parameters. */ -export interface RecoverableManagedDatabasesListByInstanceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByInstanceNext operation. */ -export type RecoverableManagedDatabasesListByInstanceNextResponse = RecoverableManagedDatabaseListResult; - -/** Optional parameters. */ -export interface RestorePointsListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type RestorePointsListByDatabaseResponse = RestorePointListResult; +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection; /** Optional parameters. */ -export interface RestorePointsCreateOptionalParams +export interface PrivateEndpointConnectionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12767,147 +14991,109 @@ export interface RestorePointsCreateOptionalParams resumeFrom?: string; } -/** Contains response data for the create operation. */ -export type RestorePointsCreateResponse = RestorePoint; - -/** Optional parameters. */ -export interface RestorePointsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type RestorePointsGetResponse = RestorePoint; - -/** Optional parameters. */ -export interface RestorePointsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface RestorePointsListByDatabaseNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabaseNext operation. */ -export type RestorePointsListByDatabaseNextResponse = RestorePointListResult; +/** Contains response data for the createOrUpdate operation. */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection; /** Optional parameters. */ -export interface SensitivityLabelsListCurrentByDatabaseOptionalParams +export interface PrivateEndpointConnectionsDeleteOptionalParams extends coreClient.OperationOptions { - skipToken?: string; - /** An OData filter expression that filters elements in the collection. */ - filter?: string; - count?: boolean; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listCurrentByDatabase operation. */ -export type SensitivityLabelsListCurrentByDatabaseResponse = SensitivityLabelListResult; - /** Optional parameters. */ -export interface SensitivityLabelsUpdateOptionalParams +export interface PrivateEndpointConnectionsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface SensitivityLabelsListRecommendedByDatabaseOptionalParams - extends coreClient.OperationOptions { - skipToken?: string; - /** An OData filter expression that filters elements in the collection. */ - filter?: string; - /** Specifies whether to include disabled recommendations or not. */ - includeDisabledRecommendations?: boolean; -} - -/** Contains response data for the listRecommendedByDatabase operation. */ -export type SensitivityLabelsListRecommendedByDatabaseResponse = SensitivityLabelListResult; +/** Contains response data for the listByServerNext operation. */ +export type PrivateEndpointConnectionsListByServerNextResponse = PrivateEndpointConnectionListResult; /** Optional parameters. */ -export interface SensitivityLabelsEnableRecommendationOptionalParams +export interface PrivateLinkResourcesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface SensitivityLabelsDisableRecommendationOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the listByServer operation. */ +export type PrivateLinkResourcesListByServerResponse = PrivateLinkResourceListResult; /** Optional parameters. */ -export interface SensitivityLabelsGetOptionalParams +export interface PrivateLinkResourcesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SensitivityLabelsGetResponse = SensitivityLabel; - -/** Optional parameters. */ -export interface SensitivityLabelsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SensitivityLabelsCreateOrUpdateResponse = SensitivityLabel; - -/** Optional parameters. */ -export interface SensitivityLabelsDeleteOptionalParams - extends coreClient.OperationOptions {} +export type PrivateLinkResourcesGetResponse = PrivateLinkResource; /** Optional parameters. */ -export interface SensitivityLabelsListCurrentByDatabaseNextOptionalParams +export interface PrivateLinkResourcesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listCurrentByDatabaseNext operation. */ -export type SensitivityLabelsListCurrentByDatabaseNextResponse = SensitivityLabelListResult; +/** Contains response data for the listByServerNext operation. */ +export type PrivateLinkResourcesListByServerNextResponse = PrivateLinkResourceListResult; /** Optional parameters. */ -export interface SensitivityLabelsListRecommendedByDatabaseNextOptionalParams +export interface RecoverableDatabasesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listRecommendedByDatabaseNext operation. */ -export type SensitivityLabelsListRecommendedByDatabaseNextResponse = SensitivityLabelListResult; - -/** Optional parameters. */ -export interface RecommendedSensitivityLabelsUpdateOptionalParams - extends coreClient.OperationOptions {} +/** Contains response data for the listByServer operation. */ +export type RecoverableDatabasesListByServerResponse = RecoverableDatabaseListResult; /** Optional parameters. */ -export interface ServerAdvisorsListByServerOptionalParams +export interface RecoverableDatabasesGetOptionalParams extends coreClient.OperationOptions { /** The child resources to include in the response. */ expand?: string; + /** An OData filter expression that filters elements in the collection. */ + filter?: string; } -/** Contains response data for the listByServer operation. */ -export type ServerAdvisorsListByServerResponse = Advisor[]; +/** Contains response data for the get operation. */ +export type RecoverableDatabasesGetResponse = RecoverableDatabase; /** Optional parameters. */ -export interface ServerAdvisorsGetOptionalParams +export interface RecoverableDatabasesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ServerAdvisorsGetResponse = Advisor; +/** Contains response data for the listByServerNext operation. */ +export type RecoverableDatabasesListByServerNextResponse = RecoverableDatabaseListResult; /** Optional parameters. */ -export interface ServerAdvisorsUpdateOptionalParams +export interface RecoverableManagedDatabasesListByInstanceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ServerAdvisorsUpdateResponse = Advisor; +/** Contains response data for the listByInstance operation. */ +export type RecoverableManagedDatabasesListByInstanceResponse = RecoverableManagedDatabaseListResult; + +/** Optional parameters. */ +export interface RecoverableManagedDatabasesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type RecoverableManagedDatabasesGetResponse = RecoverableManagedDatabase; /** Optional parameters. */ -export interface ServerAutomaticTuningGetOptionalParams +export interface RecoverableManagedDatabasesListByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ServerAutomaticTuningGetResponse = ServerAutomaticTuning; +/** Contains response data for the listByInstanceNext operation. */ +export type RecoverableManagedDatabasesListByInstanceNextResponse = RecoverableManagedDatabaseListResult; /** Optional parameters. */ -export interface ServerAutomaticTuningUpdateOptionalParams +export interface ReplicationLinksListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ServerAutomaticTuningUpdateResponse = ServerAutomaticTuning; +/** Contains response data for the listByDatabase operation. */ +export type ReplicationLinksListByDatabaseResponse = ReplicationLinkListResult; /** Optional parameters. */ -export interface ServerAzureADAdministratorsGetOptionalParams +export interface ReplicationLinksGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServerAzureADAdministratorsGetResponse = ServerAzureADAdministrator; +export type ReplicationLinksGetResponse = ReplicationLink; /** Optional parameters. */ -export interface ServerAzureADAdministratorsCreateOrUpdateOptionalParams +export interface ReplicationLinksDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12915,11 +15101,8 @@ export interface ServerAzureADAdministratorsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type ServerAzureADAdministratorsCreateOrUpdateResponse = ServerAzureADAdministrator; - /** Optional parameters. */ -export interface ServerAzureADAdministratorsDeleteOptionalParams +export interface ReplicationLinksFailoverOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12927,29 +15110,11 @@ export interface ServerAzureADAdministratorsDeleteOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface ServerAzureADAdministratorsListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type ServerAzureADAdministratorsListByServerResponse = AdministratorListResult; - -/** Optional parameters. */ -export interface ServerAzureADAdministratorsListByServerNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServerNext operation. */ -export type ServerAzureADAdministratorsListByServerNextResponse = AdministratorListResult; - -/** Optional parameters. */ -export interface ServerAzureADOnlyAuthenticationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type ServerAzureADOnlyAuthenticationsGetResponse = ServerAzureADOnlyAuthentication; +/** Contains response data for the failover operation. */ +export type ReplicationLinksFailoverResponse = ReplicationLink; /** Optional parameters. */ -export interface ServerAzureADOnlyAuthenticationsCreateOrUpdateOptionalParams +export interface ReplicationLinksFailoverAllowDataLossOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -12957,102 +15122,86 @@ export interface ServerAzureADOnlyAuthenticationsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type ServerAzureADOnlyAuthenticationsCreateOrUpdateResponse = ServerAzureADOnlyAuthentication; +/** Contains response data for the failoverAllowDataLoss operation. */ +export type ReplicationLinksFailoverAllowDataLossResponse = ReplicationLink; /** Optional parameters. */ -export interface ServerAzureADOnlyAuthenticationsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface ReplicationLinksListByServerOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServer operation. */ +export type ReplicationLinksListByServerResponse = ReplicationLinkListResult; /** Optional parameters. */ -export interface ServerAzureADOnlyAuthenticationsListByServerOptionalParams +export interface ReplicationLinksListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerAzureADOnlyAuthenticationsListByServerResponse = AzureADOnlyAuthListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type ReplicationLinksListByDatabaseNextResponse = ReplicationLinkListResult; /** Optional parameters. */ -export interface ServerAzureADOnlyAuthenticationsListByServerNextOptionalParams +export interface ReplicationLinksListByServerNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServerNext operation. */ -export type ServerAzureADOnlyAuthenticationsListByServerNextResponse = AzureADOnlyAuthListResult; +export type ReplicationLinksListByServerNextResponse = ReplicationLinkListResult; /** Optional parameters. */ -export interface ServerDevOpsAuditSettingsGetOptionalParams +export interface RestorableDroppedDatabasesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ServerDevOpsAuditSettingsGetResponse = ServerDevOpsAuditingSettings; +/** Contains response data for the listByServer operation. */ +export type RestorableDroppedDatabasesListByServerResponse = RestorableDroppedDatabaseListResult; /** Optional parameters. */ -export interface ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams +export interface RestorableDroppedDatabasesGetOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** The child resources to include in the response. */ + expand?: string; + /** An OData filter expression that filters elements in the collection. */ + filter?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type ServerDevOpsAuditSettingsCreateOrUpdateResponse = ServerDevOpsAuditingSettings; +/** Contains response data for the get operation. */ +export type RestorableDroppedDatabasesGetResponse = RestorableDroppedDatabase; /** Optional parameters. */ -export interface ServerDevOpsAuditSettingsListByServerOptionalParams +export interface RestorableDroppedDatabasesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerDevOpsAuditSettingsListByServerResponse = ServerDevOpsAuditSettingsListResult; +/** Contains response data for the listByServerNext operation. */ +export type RestorableDroppedDatabasesListByServerNextResponse = RestorableDroppedDatabaseListResult; /** Optional parameters. */ -export interface ServerDevOpsAuditSettingsListByServerNextOptionalParams +export interface RestorableDroppedManagedDatabasesListByInstanceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type ServerDevOpsAuditSettingsListByServerNextResponse = ServerDevOpsAuditSettingsListResult; +/** Contains response data for the listByInstance operation. */ +export type RestorableDroppedManagedDatabasesListByInstanceResponse = RestorableDroppedManagedDatabaseListResult; /** Optional parameters. */ -export interface ServerDnsAliasesGetOptionalParams +export interface RestorableDroppedManagedDatabasesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServerDnsAliasesGetResponse = ServerDnsAlias; +export type RestorableDroppedManagedDatabasesGetResponse = RestorableDroppedManagedDatabase; /** Optional parameters. */ -export interface ServerDnsAliasesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ServerDnsAliasesCreateOrUpdateResponse = ServerDnsAlias; +export interface RestorableDroppedManagedDatabasesListByInstanceNextOptionalParams + extends coreClient.OperationOptions {} -/** Optional parameters. */ -export interface ServerDnsAliasesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +/** Contains response data for the listByInstanceNext operation. */ +export type RestorableDroppedManagedDatabasesListByInstanceNextResponse = RestorableDroppedManagedDatabaseListResult; /** Optional parameters. */ -export interface ServerDnsAliasesListByServerOptionalParams +export interface RestorePointsListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerDnsAliasesListByServerResponse = ServerDnsAliasListResult; +/** Contains response data for the listByDatabase operation. */ +export type RestorePointsListByDatabaseResponse = RestorePointListResult; /** Optional parameters. */ -export interface ServerDnsAliasesAcquireOptionalParams +export interface RestorePointsCreateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13060,237 +15209,204 @@ export interface ServerDnsAliasesAcquireOptionalParams resumeFrom?: string; } -/** Contains response data for the acquire operation. */ -export type ServerDnsAliasesAcquireResponse = ServerDnsAlias; +/** Contains response data for the create operation. */ +export type RestorePointsCreateResponse = RestorePoint; /** Optional parameters. */ -export interface ServerDnsAliasesListByServerNextOptionalParams +export interface RestorePointsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type ServerDnsAliasesListByServerNextResponse = ServerDnsAliasListResult; +/** Contains response data for the get operation. */ +export type RestorePointsGetResponse = RestorePoint; /** Optional parameters. */ -export interface ServerKeysListByServerOptionalParams +export interface RestorePointsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerKeysListByServerResponse = ServerKeyListResult; - /** Optional parameters. */ -export interface ServerKeysGetOptionalParams +export interface RestorePointsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ServerKeysGetResponse = ServerKey; - -/** Optional parameters. */ -export interface ServerKeysCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type ServerKeysCreateOrUpdateResponse = ServerKey; +/** Contains response data for the listByDatabaseNext operation. */ +export type RestorePointsListByDatabaseNextResponse = RestorePointListResult; /** Optional parameters. */ -export interface ServerKeysDeleteOptionalParams +export interface SensitivityLabelsListCurrentByDatabaseOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** An OData filter expression that filters elements in the collection. */ + filter?: string; + skipToken?: string; + count?: boolean; } -/** Optional parameters. */ -export interface ServerKeysListByServerNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServerNext operation. */ -export type ServerKeysListByServerNextResponse = ServerKeyListResult; +/** Contains response data for the listCurrentByDatabase operation. */ +export type SensitivityLabelsListCurrentByDatabaseResponse = SensitivityLabelListResult; /** Optional parameters. */ -export interface ServerOperationsListByServerOptionalParams +export interface SensitivityLabelsUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerOperationsListByServerResponse = ServerOperationListResult; - /** Optional parameters. */ -export interface ServerOperationsListByServerNextOptionalParams - extends coreClient.OperationOptions {} +export interface SensitivityLabelsListRecommendedByDatabaseOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that filters elements in the collection. */ + filter?: string; + skipToken?: string; + /** Specifies whether to include disabled recommendations or not. */ + includeDisabledRecommendations?: boolean; +} -/** Contains response data for the listByServerNext operation. */ -export type ServerOperationsListByServerNextResponse = ServerOperationListResult; +/** Contains response data for the listRecommendedByDatabase operation. */ +export type SensitivityLabelsListRecommendedByDatabaseResponse = SensitivityLabelListResult; /** Optional parameters. */ -export interface ServerSecurityAlertPoliciesGetOptionalParams +export interface SensitivityLabelsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy; +export type SensitivityLabelsGetResponse = SensitivityLabel; /** Optional parameters. */ -export interface ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SensitivityLabelsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy; +export type SensitivityLabelsCreateOrUpdateResponse = SensitivityLabel; /** Optional parameters. */ -export interface ServerSecurityAlertPoliciesListByServerOptionalParams +export interface SensitivityLabelsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerSecurityAlertPoliciesListByServerResponse = LogicalServerSecurityAlertPolicyListResult; - /** Optional parameters. */ -export interface ServerSecurityAlertPoliciesListByServerNextOptionalParams +export interface SensitivityLabelsDisableRecommendationOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type ServerSecurityAlertPoliciesListByServerNextResponse = LogicalServerSecurityAlertPolicyListResult; - /** Optional parameters. */ -export interface ServerTrustGroupsGetOptionalParams +export interface SensitivityLabelsEnableRecommendationOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ServerTrustGroupsGetResponse = ServerTrustGroup; - /** Optional parameters. */ -export interface ServerTrustGroupsCreateOrUpdateOptionalParams +export interface SensitivityLabelsListByDatabaseOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** An OData filter expression that filters elements in the collection. */ + filter?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type ServerTrustGroupsCreateOrUpdateResponse = ServerTrustGroup; - -/** Optional parameters. */ -export interface ServerTrustGroupsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +/** Contains response data for the listByDatabase operation. */ +export type SensitivityLabelsListByDatabaseResponse = SensitivityLabelListResult; /** Optional parameters. */ -export interface ServerTrustGroupsListByLocationOptionalParams +export interface SensitivityLabelsListCurrentByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocation operation. */ -export type ServerTrustGroupsListByLocationResponse = ServerTrustGroupListResult; +/** Contains response data for the listCurrentByDatabaseNext operation. */ +export type SensitivityLabelsListCurrentByDatabaseNextResponse = SensitivityLabelListResult; /** Optional parameters. */ -export interface ServerTrustGroupsListByInstanceOptionalParams +export interface SensitivityLabelsListRecommendedByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstance operation. */ -export type ServerTrustGroupsListByInstanceResponse = ServerTrustGroupListResult; +/** Contains response data for the listRecommendedByDatabaseNext operation. */ +export type SensitivityLabelsListRecommendedByDatabaseNextResponse = SensitivityLabelListResult; /** Optional parameters. */ -export interface ServerTrustGroupsListByLocationNextOptionalParams +export interface SensitivityLabelsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type ServerTrustGroupsListByLocationNextResponse = ServerTrustGroupListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type SensitivityLabelsListByDatabaseNextResponse = SensitivityLabelListResult; /** Optional parameters. */ -export interface ServerTrustGroupsListByInstanceNextOptionalParams +export interface RecommendedSensitivityLabelsUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstanceNext operation. */ -export type ServerTrustGroupsListByInstanceNextResponse = ServerTrustGroupListResult; - /** Optional parameters. */ -export interface ServerVulnerabilityAssessmentsGetOptionalParams +export interface ServerAdvancedThreatProtectionSettingsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type ServerVulnerabilityAssessmentsGetResponse = ServerVulnerabilityAssessment; +/** Contains response data for the listByServer operation. */ +export type ServerAdvancedThreatProtectionSettingsListByServerResponse = LogicalServerAdvancedThreatProtectionListResult; /** Optional parameters. */ -export interface ServerVulnerabilityAssessmentsCreateOrUpdateOptionalParams +export interface ServerAdvancedThreatProtectionSettingsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type ServerVulnerabilityAssessmentsCreateOrUpdateResponse = ServerVulnerabilityAssessment; +/** Contains response data for the get operation. */ +export type ServerAdvancedThreatProtectionSettingsGetResponse = ServerAdvancedThreatProtection; /** Optional parameters. */ -export interface ServerVulnerabilityAssessmentsDeleteOptionalParams - extends coreClient.OperationOptions {} +export interface ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse = ServerAdvancedThreatProtection; /** Optional parameters. */ -export interface ServerVulnerabilityAssessmentsListByServerOptionalParams +export interface ServerAdvancedThreatProtectionSettingsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type ServerVulnerabilityAssessmentsListByServerResponse = ServerVulnerabilityAssessmentListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerAdvancedThreatProtectionSettingsListByServerNextResponse = LogicalServerAdvancedThreatProtectionListResult; /** Optional parameters. */ -export interface ServerVulnerabilityAssessmentsListByServerNextOptionalParams - extends coreClient.OperationOptions {} +export interface ServerAdvisorsListByServerOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} -/** Contains response data for the listByServerNext operation. */ -export type ServerVulnerabilityAssessmentsListByServerNextResponse = ServerVulnerabilityAssessmentListResult; +/** Contains response data for the listByServer operation. */ +export type ServerAdvisorsListByServerResponse = Advisor[]; /** Optional parameters. */ -export interface SqlAgentGetOptionalParams +export interface ServerAdvisorsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SqlAgentGetResponse = SqlAgentConfiguration; +export type ServerAdvisorsGetResponse = Advisor; /** Optional parameters. */ -export interface SqlAgentCreateOrUpdateOptionalParams +export interface ServerAdvisorsUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type SqlAgentCreateOrUpdateResponse = SqlAgentConfiguration; +/** Contains response data for the update operation. */ +export type ServerAdvisorsUpdateResponse = Advisor; /** Optional parameters. */ -export interface SubscriptionUsagesListByLocationOptionalParams +export interface ServerAutomaticTuningGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocation operation. */ -export type SubscriptionUsagesListByLocationResponse = SubscriptionUsageListResult; +/** Contains response data for the get operation. */ +export type ServerAutomaticTuningGetResponse = ServerAutomaticTuning; /** Optional parameters. */ -export interface SubscriptionUsagesGetOptionalParams +export interface ServerAutomaticTuningUpdateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type SubscriptionUsagesGetResponse = SubscriptionUsage; +/** Contains response data for the update operation. */ +export type ServerAutomaticTuningUpdateResponse = ServerAutomaticTuning; /** Optional parameters. */ -export interface SubscriptionUsagesListByLocationNextOptionalParams +export interface ServerAzureADAdministratorsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type SubscriptionUsagesListByLocationNextResponse = SubscriptionUsageListResult; +/** Contains response data for the listByServer operation. */ +export type ServerAzureADAdministratorsListByServerResponse = AdministratorListResult; /** Optional parameters. */ -export interface SyncAgentsGetOptionalParams +export interface ServerAzureADAdministratorsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SyncAgentsGetResponse = SyncAgent; +export type ServerAzureADAdministratorsGetResponse = ServerAzureADAdministrator; /** Optional parameters. */ -export interface SyncAgentsCreateOrUpdateOptionalParams +export interface ServerAzureADAdministratorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13299,10 +15415,10 @@ export interface SyncAgentsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type SyncAgentsCreateOrUpdateResponse = SyncAgent; +export type ServerAzureADAdministratorsCreateOrUpdateResponse = ServerAzureADAdministrator; /** Optional parameters. */ -export interface SyncAgentsDeleteOptionalParams +export interface ServerAzureADAdministratorsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13311,49 +15427,28 @@ export interface SyncAgentsDeleteOptionalParams } /** Optional parameters. */ -export interface SyncAgentsListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type SyncAgentsListByServerResponse = SyncAgentListResult; - -/** Optional parameters. */ -export interface SyncAgentsGenerateKeyOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the generateKey operation. */ -export type SyncAgentsGenerateKeyResponse = SyncAgentKeyProperties; - -/** Optional parameters. */ -export interface SyncAgentsListLinkedDatabasesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listLinkedDatabases operation. */ -export type SyncAgentsListLinkedDatabasesResponse = SyncAgentLinkedDatabaseListResult; - -/** Optional parameters. */ -export interface SyncAgentsListByServerNextOptionalParams +export interface ServerAzureADAdministratorsListByServerNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServerNext operation. */ -export type SyncAgentsListByServerNextResponse = SyncAgentListResult; +export type ServerAzureADAdministratorsListByServerNextResponse = AdministratorListResult; /** Optional parameters. */ -export interface SyncAgentsListLinkedDatabasesNextOptionalParams +export interface ServerAzureADOnlyAuthenticationsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listLinkedDatabasesNext operation. */ -export type SyncAgentsListLinkedDatabasesNextResponse = SyncAgentLinkedDatabaseListResult; +/** Contains response data for the listByServer operation. */ +export type ServerAzureADOnlyAuthenticationsListByServerResponse = AzureADOnlyAuthListResult; /** Optional parameters. */ -export interface SyncGroupsListSyncDatabaseIdsOptionalParams +export interface ServerAzureADOnlyAuthenticationsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSyncDatabaseIds operation. */ -export type SyncGroupsListSyncDatabaseIdsResponse = SyncDatabaseIdListResult; +/** Contains response data for the get operation. */ +export type ServerAzureADOnlyAuthenticationsGetResponse = ServerAzureADOnlyAuthentication; /** Optional parameters. */ -export interface SyncGroupsRefreshHubSchemaOptionalParams +export interface ServerAzureADOnlyAuthenticationsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13361,40 +15456,41 @@ export interface SyncGroupsRefreshHubSchemaOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface SyncGroupsListHubSchemasOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listHubSchemas operation. */ -export type SyncGroupsListHubSchemasResponse = SyncFullSchemaPropertiesListResult; +/** Contains response data for the createOrUpdate operation. */ +export type ServerAzureADOnlyAuthenticationsCreateOrUpdateResponse = ServerAzureADOnlyAuthentication; /** Optional parameters. */ -export interface SyncGroupsListLogsOptionalParams +export interface ServerAzureADOnlyAuthenticationsDeleteOptionalParams extends coreClient.OperationOptions { - /** The continuation token for this operation. */ - continuationToken?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listLogs operation. */ -export type SyncGroupsListLogsResponse = SyncGroupLogListResult; - /** Optional parameters. */ -export interface SyncGroupsCancelSyncOptionalParams +export interface ServerAzureADOnlyAuthenticationsListByServerNextOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByServerNext operation. */ +export type ServerAzureADOnlyAuthenticationsListByServerNextResponse = AzureADOnlyAuthListResult; + /** Optional parameters. */ -export interface SyncGroupsTriggerSyncOptionalParams +export interface ServerConfigurationOptionsListByManagedInstanceOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the listByManagedInstance operation. */ +export type ServerConfigurationOptionsListByManagedInstanceResponse = ServerConfigurationOptionListResult; + /** Optional parameters. */ -export interface SyncGroupsGetOptionalParams +export interface ServerConfigurationOptionsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SyncGroupsGetResponse = SyncGroup; +export type ServerConfigurationOptionsGetResponse = ServerConfigurationOption; /** Optional parameters. */ -export interface SyncGroupsCreateOrUpdateOptionalParams +export interface ServerConfigurationOptionsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13403,19 +15499,31 @@ export interface SyncGroupsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type SyncGroupsCreateOrUpdateResponse = SyncGroup; +export type ServerConfigurationOptionsCreateOrUpdateResponse = ServerConfigurationOption; /** Optional parameters. */ -export interface SyncGroupsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface ServerConfigurationOptionsListByManagedInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByManagedInstanceNext operation. */ +export type ServerConfigurationOptionsListByManagedInstanceNextResponse = ServerConfigurationOptionListResult; /** Optional parameters. */ -export interface SyncGroupsUpdateOptionalParams +export interface ServerConnectionPoliciesListByServerOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServer operation. */ +export type ServerConnectionPoliciesListByServerResponse = ServerConnectionPolicyListResult; + +/** Optional parameters. */ +export interface ServerConnectionPoliciesGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ServerConnectionPoliciesGetResponse = ServerConnectionPolicy; + +/** Optional parameters. */ +export interface ServerConnectionPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13423,53 +15531,65 @@ export interface SyncGroupsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type SyncGroupsUpdateResponse = SyncGroup; +/** Contains response data for the createOrUpdate operation. */ +export type ServerConnectionPoliciesCreateOrUpdateResponse = ServerConnectionPolicy; /** Optional parameters. */ -export interface SyncGroupsListByDatabaseOptionalParams +export interface ServerConnectionPoliciesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type SyncGroupsListByDatabaseResponse = SyncGroupListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerConnectionPoliciesListByServerNextResponse = ServerConnectionPolicyListResult; /** Optional parameters. */ -export interface SyncGroupsListSyncDatabaseIdsNextOptionalParams +export interface ServerDevOpsAuditSettingsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSyncDatabaseIdsNext operation. */ -export type SyncGroupsListSyncDatabaseIdsNextResponse = SyncDatabaseIdListResult; +/** Contains response data for the listByServer operation. */ +export type ServerDevOpsAuditSettingsListByServerResponse = ServerDevOpsAuditSettingsListResult; /** Optional parameters. */ -export interface SyncGroupsListHubSchemasNextOptionalParams +export interface ServerDevOpsAuditSettingsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listHubSchemasNext operation. */ -export type SyncGroupsListHubSchemasNextResponse = SyncFullSchemaPropertiesListResult; +/** Contains response data for the get operation. */ +export type ServerDevOpsAuditSettingsGetResponse = ServerDevOpsAuditingSettings; /** Optional parameters. */ -export interface SyncGroupsListLogsNextOptionalParams +export interface ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ServerDevOpsAuditSettingsCreateOrUpdateResponse = ServerDevOpsAuditingSettings; + +/** Optional parameters. */ +export interface ServerDevOpsAuditSettingsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listLogsNext operation. */ -export type SyncGroupsListLogsNextResponse = SyncGroupLogListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerDevOpsAuditSettingsListByServerNextResponse = ServerDevOpsAuditSettingsListResult; /** Optional parameters. */ -export interface SyncGroupsListByDatabaseNextOptionalParams +export interface ServerDnsAliasesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type SyncGroupsListByDatabaseNextResponse = SyncGroupListResult; +/** Contains response data for the listByServer operation. */ +export type ServerDnsAliasesListByServerResponse = ServerDnsAliasListResult; /** Optional parameters. */ -export interface SyncMembersGetOptionalParams +export interface ServerDnsAliasesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type SyncMembersGetResponse = SyncMember; +export type ServerDnsAliasesGetResponse = ServerDnsAlias; /** Optional parameters. */ -export interface SyncMembersCreateOrUpdateOptionalParams +export interface ServerDnsAliasesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13478,10 +15598,10 @@ export interface SyncMembersCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type SyncMembersCreateOrUpdateResponse = SyncMember; +export type ServerDnsAliasesCreateOrUpdateResponse = ServerDnsAlias; /** Optional parameters. */ -export interface SyncMembersDeleteOptionalParams +export interface ServerDnsAliasesDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13490,7 +15610,7 @@ export interface SyncMembersDeleteOptionalParams } /** Optional parameters. */ -export interface SyncMembersUpdateOptionalParams +export interface ServerDnsAliasesAcquireOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13498,25 +15618,32 @@ export interface SyncMembersUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type SyncMembersUpdateResponse = SyncMember; +/** Contains response data for the acquire operation. */ +export type ServerDnsAliasesAcquireResponse = ServerDnsAlias; + +/** Optional parameters. */ +export interface ServerDnsAliasesListByServerNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServerNext operation. */ +export type ServerDnsAliasesListByServerNextResponse = ServerDnsAliasListResult; /** Optional parameters. */ -export interface SyncMembersListBySyncGroupOptionalParams +export interface ServerKeysListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listBySyncGroup operation. */ -export type SyncMembersListBySyncGroupResponse = SyncMemberListResult; +/** Contains response data for the listByServer operation. */ +export type ServerKeysListByServerResponse = ServerKeyListResult; /** Optional parameters. */ -export interface SyncMembersListMemberSchemasOptionalParams +export interface ServerKeysGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMemberSchemas operation. */ -export type SyncMembersListMemberSchemasResponse = SyncFullSchemaPropertiesListResult; +/** Contains response data for the get operation. */ +export type ServerKeysGetResponse = ServerKey; /** Optional parameters. */ -export interface SyncMembersRefreshMemberSchemaOptionalParams +export interface ServerKeysCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13524,22 +15651,11 @@ export interface SyncMembersRefreshMemberSchemaOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface SyncMembersListBySyncGroupNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySyncGroupNext operation. */ -export type SyncMembersListBySyncGroupNextResponse = SyncMemberListResult; - -/** Optional parameters. */ -export interface SyncMembersListMemberSchemasNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listMemberSchemasNext operation. */ -export type SyncMembersListMemberSchemasNextResponse = SyncFullSchemaPropertiesListResult; +/** Contains response data for the createOrUpdate operation. */ +export type ServerKeysCreateOrUpdateResponse = ServerKey; /** Optional parameters. */ -export interface TdeCertificatesCreateOptionalParams +export interface ServerKeysDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13548,56 +15664,75 @@ export interface TdeCertificatesCreateOptionalParams } /** Optional parameters. */ -export interface TimeZonesListByLocationOptionalParams +export interface ServerKeysListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocation operation. */ -export type TimeZonesListByLocationResponse = TimeZoneListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerKeysListByServerNextResponse = ServerKeyListResult; /** Optional parameters. */ -export interface TimeZonesGetOptionalParams +export interface ServerOperationsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type TimeZonesGetResponse = TimeZone; +/** Contains response data for the listByServer operation. */ +export type ServerOperationsListByServerResponse = ServerOperationListResult; /** Optional parameters. */ -export interface TimeZonesListByLocationNextOptionalParams +export interface ServerOperationsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type TimeZonesListByLocationNextResponse = TimeZoneListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerOperationsListByServerNextResponse = ServerOperationListResult; /** Optional parameters. */ -export interface VirtualClustersUpdateDnsServersOptionalParams +export interface ServerSecurityAlertPoliciesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the updateDnsServers operation. */ -export type VirtualClustersUpdateDnsServersResponse = UpdateManagedInstanceDnsServersOperation; +/** Contains response data for the listByServer operation. */ +export type ServerSecurityAlertPoliciesListByServerResponse = LogicalServerSecurityAlertPolicyListResult; /** Optional parameters. */ -export interface VirtualClustersListOptionalParams +export interface ServerSecurityAlertPoliciesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type VirtualClustersListResponse = VirtualClusterListResult; +/** Contains response data for the get operation. */ +export type ServerSecurityAlertPoliciesGetResponse = ServerSecurityAlertPolicy; /** Optional parameters. */ -export interface VirtualClustersListByResourceGroupOptionalParams +export interface ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type ServerSecurityAlertPoliciesCreateOrUpdateResponse = ServerSecurityAlertPolicy; + +/** Optional parameters. */ +export interface ServerSecurityAlertPoliciesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type VirtualClustersListByResourceGroupResponse = VirtualClusterListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerSecurityAlertPoliciesListByServerNextResponse = LogicalServerSecurityAlertPolicyListResult; /** Optional parameters. */ -export interface VirtualClustersGetOptionalParams +export interface ServerTrustCertificatesListByInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstance operation. */ +export type ServerTrustCertificatesListByInstanceResponse = ServerTrustCertificatesListResult; + +/** Optional parameters. */ +export interface ServerTrustCertificatesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type VirtualClustersGetResponse = VirtualCluster; +export type ServerTrustCertificatesGetResponse = ServerTrustCertificate; /** Optional parameters. */ -export interface VirtualClustersDeleteOptionalParams +export interface ServerTrustCertificatesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13605,8 +15740,11 @@ export interface VirtualClustersDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the createOrUpdate operation. */ +export type ServerTrustCertificatesCreateOrUpdateResponse = ServerTrustCertificate; + /** Optional parameters. */ -export interface VirtualClustersUpdateOptionalParams +export interface ServerTrustCertificatesDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13614,32 +15752,29 @@ export interface VirtualClustersUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type VirtualClustersUpdateResponse = VirtualCluster; - /** Optional parameters. */ -export interface VirtualClustersListNextOptionalParams +export interface ServerTrustCertificatesListByInstanceNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type VirtualClustersListNextResponse = VirtualClusterListResult; +/** Contains response data for the listByInstanceNext operation. */ +export type ServerTrustCertificatesListByInstanceNextResponse = ServerTrustCertificatesListResult; /** Optional parameters. */ -export interface VirtualClustersListByResourceGroupNextOptionalParams +export interface ServerTrustGroupsListByLocationOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type VirtualClustersListByResourceGroupNextResponse = VirtualClusterListResult; +/** Contains response data for the listByLocation operation. */ +export type ServerTrustGroupsListByLocationResponse = ServerTrustGroupListResult; /** Optional parameters. */ -export interface VirtualNetworkRulesGetOptionalParams +export interface ServerTrustGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type VirtualNetworkRulesGetResponse = VirtualNetworkRule; +export type ServerTrustGroupsGetResponse = ServerTrustGroup; /** Optional parameters. */ -export interface VirtualNetworkRulesCreateOrUpdateOptionalParams +export interface ServerTrustGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13648,10 +15783,10 @@ export interface VirtualNetworkRulesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule; +export type ServerTrustGroupsCreateOrUpdateResponse = ServerTrustGroup; /** Optional parameters. */ -export interface VirtualNetworkRulesDeleteOptionalParams +export interface ServerTrustGroupsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13660,70 +15795,109 @@ export interface VirtualNetworkRulesDeleteOptionalParams } /** Optional parameters. */ -export interface VirtualNetworkRulesListByServerOptionalParams +export interface ServerTrustGroupsListByInstanceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstance operation. */ +export type ServerTrustGroupsListByInstanceResponse = ServerTrustGroupListResult; + +/** Optional parameters. */ +export interface ServerTrustGroupsListByLocationNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByLocationNext operation. */ +export type ServerTrustGroupsListByLocationNextResponse = ServerTrustGroupListResult; + +/** Optional parameters. */ +export interface ServerTrustGroupsListByInstanceNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstanceNext operation. */ +export type ServerTrustGroupsListByInstanceNextResponse = ServerTrustGroupListResult; + +/** Optional parameters. */ +export interface ServerUsagesListByServerOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServer operation. */ -export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult; +export type ServerUsagesListByServerResponse = ServerUsageListResult; /** Optional parameters. */ -export interface VirtualNetworkRulesListByServerNextOptionalParams +export interface ServerUsagesListByServerNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByServerNext operation. */ -export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult; +export type ServerUsagesListByServerNextResponse = ServerUsageListResult; /** Optional parameters. */ -export interface WorkloadClassifiersGetOptionalParams +export interface ServerVulnerabilityAssessmentsListByServerOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByServer operation. */ +export type ServerVulnerabilityAssessmentsListByServerResponse = ServerVulnerabilityAssessmentListResult; + +/** Optional parameters. */ +export interface ServerVulnerabilityAssessmentsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type WorkloadClassifiersGetResponse = WorkloadClassifier; +export type ServerVulnerabilityAssessmentsGetResponse = ServerVulnerabilityAssessment; /** Optional parameters. */ -export interface WorkloadClassifiersCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface ServerVulnerabilityAssessmentsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type WorkloadClassifiersCreateOrUpdateResponse = WorkloadClassifier; +export type ServerVulnerabilityAssessmentsCreateOrUpdateResponse = ServerVulnerabilityAssessment; /** Optional parameters. */ -export interface WorkloadClassifiersDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface ServerVulnerabilityAssessmentsDeleteOptionalParams + extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface WorkloadClassifiersListByWorkloadGroupOptionalParams +export interface ServerVulnerabilityAssessmentsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByWorkloadGroup operation. */ -export type WorkloadClassifiersListByWorkloadGroupResponse = WorkloadClassifierListResult; +/** Contains response data for the listByServerNext operation. */ +export type ServerVulnerabilityAssessmentsListByServerNextResponse = ServerVulnerabilityAssessmentListResult; /** Optional parameters. */ -export interface WorkloadClassifiersListByWorkloadGroupNextOptionalParams +export interface ServersCheckNameAvailabilityOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByWorkloadGroupNext operation. */ -export type WorkloadClassifiersListByWorkloadGroupNextResponse = WorkloadClassifierListResult; +/** Contains response data for the checkNameAvailability operation. */ +export type ServersCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; /** Optional parameters. */ -export interface WorkloadGroupsGetOptionalParams - extends coreClient.OperationOptions {} +export interface ServersListOptionalParams extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} + +/** Contains response data for the list operation. */ +export type ServersListResponse = ServerListResult; + +/** Optional parameters. */ +export interface ServersListByResourceGroupOptionalParams + extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} + +/** Contains response data for the listByResourceGroup operation. */ +export type ServersListByResourceGroupResponse = ServerListResult; + +/** Optional parameters. */ +export interface ServersGetOptionalParams extends coreClient.OperationOptions { + /** The child resources to include in the response. */ + expand?: string; +} /** Contains response data for the get operation. */ -export type WorkloadGroupsGetResponse = WorkloadGroup; +export type ServersGetResponse = Server; /** Optional parameters. */ -export interface WorkloadGroupsCreateOrUpdateOptionalParams +export interface ServersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13732,10 +15906,10 @@ export interface WorkloadGroupsCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type WorkloadGroupsCreateOrUpdateResponse = WorkloadGroup; +export type ServersCreateOrUpdateResponse = Server; /** Optional parameters. */ -export interface WorkloadGroupsDeleteOptionalParams +export interface ServersDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13744,98 +15918,99 @@ export interface WorkloadGroupsDeleteOptionalParams } /** Optional parameters. */ -export interface WorkloadGroupsListByDatabaseOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByDatabase operation. */ -export type WorkloadGroupsListByDatabaseResponse = WorkloadGroupListResult; - -/** Optional parameters. */ -export interface WorkloadGroupsListByDatabaseNextOptionalParams - extends coreClient.OperationOptions {} +export interface ServersUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByDatabaseNext operation. */ -export type WorkloadGroupsListByDatabaseNextResponse = WorkloadGroupListResult; +/** Contains response data for the update operation. */ +export type ServersUpdateResponse = Server; /** Optional parameters. */ -export interface TransparentDataEncryptionsGetOptionalParams - extends coreClient.OperationOptions {} +export interface ServersImportDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the get operation. */ -export type TransparentDataEncryptionsGetResponse = LogicalDatabaseTransparentDataEncryption; +/** Contains response data for the importDatabase operation. */ +export type ServersImportDatabaseResponse = ImportExportOperationResult; /** Optional parameters. */ -export interface TransparentDataEncryptionsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} +export interface ServersRefreshStatusOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the createOrUpdate operation. */ -export type TransparentDataEncryptionsCreateOrUpdateResponse = LogicalDatabaseTransparentDataEncryption; +/** Contains response data for the refreshStatus operation. */ +export type ServersRefreshStatusResponse = RefreshExternalGovernanceStatusOperationResult; /** Optional parameters. */ -export interface TransparentDataEncryptionsListByDatabaseOptionalParams +export interface ServersListNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type TransparentDataEncryptionsListByDatabaseResponse = LogicalDatabaseTransparentDataEncryptionListResult; +/** Contains response data for the listNext operation. */ +export type ServersListNextResponse = ServerListResult; /** Optional parameters. */ -export interface TransparentDataEncryptionsListByDatabaseNextOptionalParams +export interface ServersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type TransparentDataEncryptionsListByDatabaseNextResponse = LogicalDatabaseTransparentDataEncryptionListResult; +/** Contains response data for the listByResourceGroupNext operation. */ +export type ServersListByResourceGroupNextResponse = ServerListResult; /** Optional parameters. */ -export interface BackupShortTermRetentionPoliciesGetOptionalParams +export interface SqlAgentGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type BackupShortTermRetentionPoliciesGetResponse = BackupShortTermRetentionPolicy; +export type SqlAgentGetResponse = SqlAgentConfiguration; /** Optional parameters. */ -export interface BackupShortTermRetentionPoliciesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SqlAgentCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type BackupShortTermRetentionPoliciesCreateOrUpdateResponse = BackupShortTermRetentionPolicy; +export type SqlAgentCreateOrUpdateResponse = SqlAgentConfiguration; /** Optional parameters. */ -export interface BackupShortTermRetentionPoliciesUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type BackupShortTermRetentionPoliciesUpdateResponse = BackupShortTermRetentionPolicy; +/** Contains response data for the listBySqlVulnerabilityAssessment operation. */ +export type SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; /** Optional parameters. */ -export interface BackupShortTermRetentionPoliciesListByDatabaseOptionalParams +export interface SqlVulnerabilityAssessmentBaselineGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type BackupShortTermRetentionPoliciesListByDatabaseResponse = BackupShortTermRetentionPolicyListResult; +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentBaselineGetResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; /** Optional parameters. */ -export interface BackupShortTermRetentionPoliciesListByDatabaseNextOptionalParams +export interface SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type BackupShortTermRetentionPoliciesListByDatabaseNextResponse = BackupShortTermRetentionPolicyListResult; +/** Contains response data for the listBySqlVulnerabilityAssessmentNext operation. */ +export type SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextResponse = DatabaseSqlVulnerabilityAssessmentBaselineSetListResult; /** Optional parameters. */ -export interface DatabaseExtensionsGetOptionalParams +export interface SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the createOrUpdate operation. */ +export type SqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentBaselineSet; + /** Optional parameters. */ -export interface DatabaseExtensionsCreateOrUpdateOptionalParams +export interface SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -13843,255 +16018,195 @@ export interface DatabaseExtensionsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type DatabaseExtensionsCreateOrUpdateResponse = ImportExportExtensionsOperationResult; - /** Optional parameters. */ -export interface DatabaseExtensionsListByDatabaseOptionalParams +export interface SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DatabaseExtensionsListByDatabaseResponse = ImportExportExtensionsOperationListResult; +/** Contains response data for the listByBaseline operation. */ +export type SqlVulnerabilityAssessmentRuleBaselineListByBaselineResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; /** Optional parameters. */ -export interface DatabaseExtensionsListByDatabaseNextOptionalParams +export interface SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseExtensionsListByDatabaseNextResponse = ImportExportExtensionsOperationListResult; +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentRuleBaselineGetResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; /** Optional parameters. */ -export interface DatabaseOperationsCancelOptionalParams +export interface SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams extends coreClient.OperationOptions {} +/** Contains response data for the createOrUpdate operation. */ +export type SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateResponse = DatabaseSqlVulnerabilityAssessmentRuleBaseline; + /** Optional parameters. */ -export interface DatabaseOperationsListByDatabaseOptionalParams +export interface SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DatabaseOperationsListByDatabaseResponse = DatabaseOperationListResult; +/** Contains response data for the listByBaselineNext operation. */ +export type SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextResponse = DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult; /** Optional parameters. */ -export interface DatabaseOperationsListByDatabaseNextOptionalParams +export interface SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseOperationsListByDatabaseNextResponse = DatabaseOperationListResult; - /** Optional parameters. */ -export interface DatabaseUsagesListByDatabaseOptionalParams +export interface SqlVulnerabilityAssessmentScanResultListByScanOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type DatabaseUsagesListByDatabaseResponse = DatabaseUsageListResult; +/** Contains response data for the listByScan operation. */ +export type SqlVulnerabilityAssessmentScanResultListByScanResponse = SQLVulnerabilityAssessmentScanListResult; /** Optional parameters. */ -export interface DatabaseUsagesListByDatabaseNextOptionalParams +export interface SqlVulnerabilityAssessmentScanResultGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type DatabaseUsagesListByDatabaseNextResponse = DatabaseUsageListResult; +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentScanResultGetResponse = SqlVulnerabilityAssessmentScanResults; /** Optional parameters. */ -export interface LedgerDigestUploadsGetOptionalParams +export interface SqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type LedgerDigestUploadsGetResponse = LedgerDigestUploads; +/** Contains response data for the listByScanNext operation. */ +export type SqlVulnerabilityAssessmentScanResultListByScanNextResponse = SQLVulnerabilityAssessmentScanListResult; /** Optional parameters. */ -export interface LedgerDigestUploadsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the createOrUpdate operation. */ -export type LedgerDigestUploadsCreateOrUpdateResponse = LedgerDigestUploads; +/** Contains response data for the listBySqlVulnerabilityAssessments operation. */ +export type SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse = SqlVulnerabilityAssessmentScanRecordListResult; /** Optional parameters. */ -export interface LedgerDigestUploadsListByDatabaseOptionalParams +export interface SqlVulnerabilityAssessmentScansGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type LedgerDigestUploadsListByDatabaseResponse = LedgerDigestUploadsListResult; +/** Contains response data for the get operation. */ +export type SqlVulnerabilityAssessmentScansGetResponse = SqlVulnerabilityAssessmentScanRecord; /** Optional parameters. */ -export interface LedgerDigestUploadsDisableOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the disable operation. */ -export type LedgerDigestUploadsDisableResponse = LedgerDigestUploads; +/** Contains response data for the listBySqlVulnerabilityAssessmentsNext operation. */ +export type SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse = SqlVulnerabilityAssessmentScanRecordListResult; /** Optional parameters. */ -export interface LedgerDigestUploadsListByDatabaseNextOptionalParams +export interface SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type LedgerDigestUploadsListByDatabaseNextResponse = LedgerDigestUploadsListResult; +/** Contains response data for the listByServer operation. */ +export type SqlVulnerabilityAssessmentsSettingsListByServerResponse = SqlVulnerabilityAssessmentListResult; /** Optional parameters. */ -export interface OutboundFirewallRulesGetOptionalParams +export interface SqlVulnerabilityAssessmentsSettingsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type OutboundFirewallRulesGetResponse = OutboundFirewallRule; +export type SqlVulnerabilityAssessmentsSettingsGetResponse = SqlVulnerabilityAssessment; /** Optional parameters. */ -export interface OutboundFirewallRulesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type OutboundFirewallRulesCreateOrUpdateResponse = OutboundFirewallRule; - -/** Optional parameters. */ -export interface OutboundFirewallRulesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export type SqlVulnerabilityAssessmentsSettingsCreateOrUpdateResponse = SqlVulnerabilityAssessment; /** Optional parameters. */ -export interface OutboundFirewallRulesListByServerOptionalParams +export interface SqlVulnerabilityAssessmentsSettingsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type OutboundFirewallRulesListByServerResponse = OutboundFirewallRuleListResult; +/** Contains response data for the listByServerNext operation. */ +export type SqlVulnerabilityAssessmentsSettingsListByServerNextResponse = SqlVulnerabilityAssessmentListResult; /** Optional parameters. */ -export interface OutboundFirewallRulesListByServerNextOptionalParams +export interface SqlVulnerabilityAssessmentsDeleteOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type OutboundFirewallRulesListByServerNextResponse = OutboundFirewallRuleListResult; - /** Optional parameters. */ -export interface ServersListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} +export interface StartStopManagedInstanceSchedulesListByInstanceOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type ServersListByResourceGroupResponse = ServerListResult; +/** Contains response data for the listByInstance operation. */ +export type StartStopManagedInstanceSchedulesListByInstanceResponse = StartStopManagedInstanceScheduleListResult; /** Optional parameters. */ -export interface ServersGetOptionalParams extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} +export interface StartStopManagedInstanceSchedulesGetOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServersGetResponse = Server; +export type StartStopManagedInstanceSchedulesGetResponse = StartStopManagedInstanceSchedule; /** Optional parameters. */ -export interface ServersCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the createOrUpdate operation. */ -export type ServersCreateOrUpdateResponse = Server; +export type StartStopManagedInstanceSchedulesCreateOrUpdateResponse = StartStopManagedInstanceSchedule; /** Optional parameters. */ -export interface ServersDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface StartStopManagedInstanceSchedulesDeleteOptionalParams + extends coreClient.OperationOptions {} /** Optional parameters. */ -export interface ServersUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface StartStopManagedInstanceSchedulesListByInstanceNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the update operation. */ -export type ServersUpdateResponse = Server; +/** Contains response data for the listByInstanceNext operation. */ +export type StartStopManagedInstanceSchedulesListByInstanceNextResponse = StartStopManagedInstanceScheduleListResult; /** Optional parameters. */ -export interface ServersListOptionalParams extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} +export interface SubscriptionUsagesListByLocationOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type ServersListResponse = ServerListResult; +/** Contains response data for the listByLocation operation. */ +export type SubscriptionUsagesListByLocationResponse = SubscriptionUsageListResult; /** Optional parameters. */ -export interface ServersImportDatabaseOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SubscriptionUsagesGetOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the importDatabase operation. */ -export type ServersImportDatabaseResponse = ImportExportOperationResult; +/** Contains response data for the get operation. */ +export type SubscriptionUsagesGetResponse = SubscriptionUsage; /** Optional parameters. */ -export interface ServersCheckNameAvailabilityOptionalParams +export interface SubscriptionUsagesListByLocationNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the checkNameAvailability operation. */ -export type ServersCheckNameAvailabilityResponse = CheckNameAvailabilityResponse; +/** Contains response data for the listByLocationNext operation. */ +export type SubscriptionUsagesListByLocationNextResponse = SubscriptionUsageListResult; /** Optional parameters. */ -export interface ServersListByResourceGroupNextOptionalParams +export interface SynapseLinkWorkspacesListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ServersListByResourceGroupNextResponse = ServerListResult; +/** Contains response data for the listByDatabase operation. */ +export type SynapseLinkWorkspacesListByDatabaseResponse = SynapseLinkWorkspaceListResult; /** Optional parameters. */ -export interface ServersListNextOptionalParams +export interface SynapseLinkWorkspacesListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type ServersListNextResponse = ServerListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type SynapseLinkWorkspacesListByDatabaseNextResponse = SynapseLinkWorkspaceListResult; /** Optional parameters. */ -export interface UsagesListByInstancePoolOptionalParams - extends coreClient.OperationOptions { - /** Optional request parameter to include managed instance usages within the instance pool. */ - expandChildren?: boolean; -} +export interface SyncAgentsListByServerOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByInstancePool operation. */ -export type UsagesListByInstancePoolResponse = UsageListResult; +/** Contains response data for the listByServer operation. */ +export type SyncAgentsListByServerResponse = SyncAgentListResult; /** Optional parameters. */ -export interface UsagesListByInstancePoolNextOptionalParams +export interface SyncAgentsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstancePoolNext operation. */ -export type UsagesListByInstancePoolNextResponse = UsageListResult; +/** Contains response data for the get operation. */ +export type SyncAgentsGetResponse = SyncAgent; /** Optional parameters. */ -export interface LongTermRetentionBackupsCopyOptionalParams +export interface SyncAgentsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14099,11 +16214,11 @@ export interface LongTermRetentionBackupsCopyOptionalParams resumeFrom?: string; } -/** Contains response data for the copy operation. */ -export type LongTermRetentionBackupsCopyResponse = LongTermRetentionBackupOperationResult; +/** Contains response data for the createOrUpdate operation. */ +export type SyncAgentsCreateOrUpdateResponse = SyncAgent; /** Optional parameters. */ -export interface LongTermRetentionBackupsUpdateOptionalParams +export interface SyncAgentsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14111,63 +16226,57 @@ export interface LongTermRetentionBackupsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type LongTermRetentionBackupsUpdateResponse = LongTermRetentionBackupOperationResult; +/** Optional parameters. */ +export interface SyncAgentsGenerateKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the generateKey operation. */ +export type SyncAgentsGenerateKeyResponse = SyncAgentKeyProperties; + +/** Optional parameters. */ +export interface SyncAgentsListLinkedDatabasesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listLinkedDatabases operation. */ +export type SyncAgentsListLinkedDatabasesResponse = SyncAgentLinkedDatabaseListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsGetOptionalParams +export interface SyncAgentsListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type LongTermRetentionBackupsGetResponse = LongTermRetentionBackup; +/** Contains response data for the listByServerNext operation. */ +export type SyncAgentsListByServerNextResponse = SyncAgentListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface SyncAgentsListLinkedDatabasesNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listLinkedDatabasesNext operation. */ +export type SyncAgentsListLinkedDatabasesNextResponse = SyncAgentLinkedDatabaseListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByDatabaseOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} +export interface SyncGroupsListSyncDatabaseIdsOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabase operation. */ -export type LongTermRetentionBackupsListByDatabaseResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listSyncDatabaseIds operation. */ +export type SyncGroupsListSyncDatabaseIdsResponse = SyncDatabaseIdListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByLocationOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} +export interface SyncGroupsListByDatabaseOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByLocation operation. */ -export type LongTermRetentionBackupsListByLocationResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listByDatabase operation. */ +export type SyncGroupsListByDatabaseResponse = SyncGroupListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByServerOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} +export interface SyncGroupsGetOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type LongTermRetentionBackupsListByServerResponse = LongTermRetentionBackupListResult; +/** Contains response data for the get operation. */ +export type SyncGroupsGetResponse = SyncGroup; /** Optional parameters. */ -export interface LongTermRetentionBackupsCopyByResourceGroupOptionalParams +export interface SyncGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14175,11 +16284,11 @@ export interface LongTermRetentionBackupsCopyByResourceGroupOptionalParams resumeFrom?: string; } -/** Contains response data for the copyByResourceGroup operation. */ -export type LongTermRetentionBackupsCopyByResourceGroupResponse = LongTermRetentionBackupOperationResult; +/** Contains response data for the createOrUpdate operation. */ +export type SyncGroupsCreateOrUpdateResponse = SyncGroup; /** Optional parameters. */ -export interface LongTermRetentionBackupsUpdateByResourceGroupOptionalParams +export interface SyncGroupsDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14187,18 +16296,8 @@ export interface LongTermRetentionBackupsUpdateByResourceGroupOptionalParams resumeFrom?: string; } -/** Contains response data for the updateByResourceGroup operation. */ -export type LongTermRetentionBackupsUpdateByResourceGroupResponse = LongTermRetentionBackupOperationResult; - -/** Optional parameters. */ -export interface LongTermRetentionBackupsGetByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByResourceGroup operation. */ -export type LongTermRetentionBackupsGetByResourceGroupResponse = LongTermRetentionBackup; - /** Optional parameters. */ -export interface LongTermRetentionBackupsDeleteByResourceGroupOptionalParams +export interface SyncGroupsUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14206,93 +16305,87 @@ export interface LongTermRetentionBackupsDeleteByResourceGroupOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type SyncGroupsUpdateResponse = SyncGroup; + /** Optional parameters. */ -export interface LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} +export interface SyncGroupsCancelSyncOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupDatabase operation. */ -export type LongTermRetentionBackupsListByResourceGroupDatabaseResponse = LongTermRetentionBackupListResult; +/** Optional parameters. */ +export interface SyncGroupsListHubSchemasOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listHubSchemas operation. */ +export type SyncGroupsListHubSchemasResponse = SyncFullSchemaPropertiesListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByResourceGroupLocationOptionalParams +export interface SyncGroupsListLogsOptionalParams extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; + /** The continuation token for this operation. */ + continuationToken?: string; } -/** Contains response data for the listByResourceGroupLocation operation. */ -export type LongTermRetentionBackupsListByResourceGroupLocationResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listLogs operation. */ +export type SyncGroupsListLogsResponse = SyncGroupLogListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByResourceGroupServerOptionalParams +export interface SyncGroupsRefreshHubSchemaOptionalParams extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByResourceGroupServer operation. */ -export type LongTermRetentionBackupsListByResourceGroupServerResponse = LongTermRetentionBackupListResult; - /** Optional parameters. */ -export interface LongTermRetentionBackupsListByDatabaseNextOptionalParams +export interface SyncGroupsTriggerSyncOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type LongTermRetentionBackupsListByDatabaseNextResponse = LongTermRetentionBackupListResult; - /** Optional parameters. */ -export interface LongTermRetentionBackupsListByLocationNextOptionalParams +export interface SyncGroupsListSyncDatabaseIdsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByLocationNext operation. */ -export type LongTermRetentionBackupsListByLocationNextResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listSyncDatabaseIdsNext operation. */ +export type SyncGroupsListSyncDatabaseIdsNextResponse = SyncDatabaseIdListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByServerNextOptionalParams +export interface SyncGroupsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type LongTermRetentionBackupsListByServerNextResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type SyncGroupsListByDatabaseNextResponse = SyncGroupListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByResourceGroupDatabaseNextOptionalParams +export interface SyncGroupsListHubSchemasNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupDatabaseNext operation. */ -export type LongTermRetentionBackupsListByResourceGroupDatabaseNextResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listHubSchemasNext operation. */ +export type SyncGroupsListHubSchemasNextResponse = SyncFullSchemaPropertiesListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByResourceGroupLocationNextOptionalParams +export interface SyncGroupsListLogsNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupLocationNext operation. */ -export type LongTermRetentionBackupsListByResourceGroupLocationNextResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listLogsNext operation. */ +export type SyncGroupsListLogsNextResponse = SyncGroupLogListResult; /** Optional parameters. */ -export interface LongTermRetentionBackupsListByResourceGroupServerNextOptionalParams +export interface SyncMembersListBySyncGroupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupServerNext operation. */ -export type LongTermRetentionBackupsListByResourceGroupServerNextResponse = LongTermRetentionBackupListResult; +/** Contains response data for the listBySyncGroup operation. */ +export type SyncMembersListBySyncGroupResponse = SyncMemberListResult; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsGetOptionalParams +export interface SyncMembersGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type LongTermRetentionManagedInstanceBackupsGetResponse = ManagedInstanceLongTermRetentionBackup; +export type SyncMembersGetResponse = SyncMember; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsDeleteOptionalParams +export interface SyncMembersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14300,51 +16393,32 @@ export interface LongTermRetentionManagedInstanceBackupsDeleteOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByDatabaseOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} - -/** Contains response data for the listByDatabase operation. */ -export type LongTermRetentionManagedInstanceBackupsListByDatabaseResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the createOrUpdate operation. */ +export type SyncMembersCreateOrUpdateResponse = SyncMember; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByInstanceOptionalParams +export interface SyncMembersDeleteOptionalParams extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByInstance operation. */ -export type LongTermRetentionManagedInstanceBackupsListByInstanceResponse = ManagedInstanceLongTermRetentionBackupListResult; - /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams +export interface SyncMembersUpdateOptionalParams extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByLocation operation. */ -export type LongTermRetentionManagedInstanceBackupsListByLocationResponse = ManagedInstanceLongTermRetentionBackupListResult; - -/** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsGetByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getByResourceGroup operation. */ -export type LongTermRetentionManagedInstanceBackupsGetByResourceGroupResponse = ManagedInstanceLongTermRetentionBackup; +/** Contains response data for the update operation. */ +export type SyncMembersUpdateResponse = SyncMember; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupOptionalParams +export interface SyncMembersRefreshMemberSchemaOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14353,125 +16427,129 @@ export interface LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupOpt } /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} +export interface SyncMembersListMemberSchemasOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupDatabase operation. */ -export type LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the listMemberSchemas operation. */ +export type SyncMembersListMemberSchemasResponse = SyncFullSchemaPropertiesListResult; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceOptionalParams - extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; -} +export interface SyncMembersListBySyncGroupNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupInstance operation. */ -export type LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the listBySyncGroupNext operation. */ +export type SyncMembersListBySyncGroupNextResponse = SyncMemberListResult; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams +export interface SyncMembersListMemberSchemasNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMemberSchemasNext operation. */ +export type SyncMembersListMemberSchemasNextResponse = SyncFullSchemaPropertiesListResult; + +/** Optional parameters. */ +export interface TdeCertificatesCreateOptionalParams extends coreClient.OperationOptions { - /** Whether or not to only get the latest backup for each database. */ - onlyLatestPerDatabase?: boolean; - /** Whether to query against just live databases, just deleted databases, or all databases. */ - databaseState?: DatabaseState; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listByResourceGroupLocation operation. */ -export type LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse = ManagedInstanceLongTermRetentionBackupListResult; - /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByDatabaseNextOptionalParams +export interface TimeZonesListByLocationOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByDatabaseNext operation. */ -export type LongTermRetentionManagedInstanceBackupsListByDatabaseNextResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the listByLocation operation. */ +export type TimeZonesListByLocationResponse = TimeZoneListResult; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByInstanceNextOptionalParams +export interface TimeZonesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstanceNext operation. */ -export type LongTermRetentionManagedInstanceBackupsListByInstanceNextResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the get operation. */ +export type TimeZonesGetResponse = TimeZone; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByLocationNextOptionalParams +export interface TimeZonesListByLocationNextOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the listByLocationNext operation. */ -export type LongTermRetentionManagedInstanceBackupsListByLocationNextResponse = ManagedInstanceLongTermRetentionBackupListResult; +export type TimeZonesListByLocationNextResponse = TimeZoneListResult; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseNextOptionalParams +export interface TransparentDataEncryptionsListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupDatabaseNext operation. */ -export type LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseNextResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the listByDatabase operation. */ +export type TransparentDataEncryptionsListByDatabaseResponse = LogicalDatabaseTransparentDataEncryptionListResult; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextOptionalParams +export interface TransparentDataEncryptionsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupInstanceNext operation. */ -export type LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the get operation. */ +export type TransparentDataEncryptionsGetResponse = LogicalDatabaseTransparentDataEncryption; /** Optional parameters. */ -export interface LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextOptionalParams +export interface TransparentDataEncryptionsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type TransparentDataEncryptionsCreateOrUpdateResponse = LogicalDatabaseTransparentDataEncryption; + +/** Optional parameters. */ +export interface TransparentDataEncryptionsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupLocationNext operation. */ -export type LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextResponse = ManagedInstanceLongTermRetentionBackupListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type TransparentDataEncryptionsListByDatabaseNextResponse = LogicalDatabaseTransparentDataEncryptionListResult; /** Optional parameters. */ -export interface ManagedInstancesListByInstancePoolOptionalParams +export interface UsagesListByInstancePoolOptionalParams extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; + /** Optional request parameter to include managed instance usages within the instance pool. */ + expandChildren?: boolean; } /** Contains response data for the listByInstancePool operation. */ -export type ManagedInstancesListByInstancePoolResponse = ManagedInstanceListResult; +export type UsagesListByInstancePoolResponse = UsageListResult; /** Optional parameters. */ -export interface ManagedInstancesListOptionalParams - extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} +export interface UsagesListByInstancePoolNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByInstancePoolNext operation. */ +export type UsagesListByInstancePoolNextResponse = UsageListResult; + +/** Optional parameters. */ +export interface VirtualClustersListOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the list operation. */ -export type ManagedInstancesListResponse = ManagedInstanceListResult; +export type VirtualClustersListResponse = VirtualClusterListResult; /** Optional parameters. */ -export interface ManagedInstancesListByResourceGroupOptionalParams - extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} +export interface VirtualClustersListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the listByResourceGroup operation. */ -export type ManagedInstancesListByResourceGroupResponse = ManagedInstanceListResult; +export type VirtualClustersListByResourceGroupResponse = VirtualClusterListResult; /** Optional parameters. */ -export interface ManagedInstancesGetOptionalParams - extends coreClient.OperationOptions { - /** The child resources to include in the response. */ - expand?: string; -} +export interface VirtualClustersGetOptionalParams + extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ManagedInstancesGetResponse = ManagedInstance; +export type VirtualClustersGetResponse = VirtualCluster; /** Optional parameters. */ -export interface ManagedInstancesCreateOrUpdateOptionalParams +export interface VirtualClustersDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14479,11 +16557,8 @@ export interface ManagedInstancesCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type ManagedInstancesCreateOrUpdateResponse = ManagedInstance; - /** Optional parameters. */ -export interface ManagedInstancesDeleteOptionalParams +export interface VirtualClustersUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14491,8 +16566,11 @@ export interface ManagedInstancesDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type VirtualClustersUpdateResponse = VirtualCluster; + /** Optional parameters. */ -export interface ManagedInstancesUpdateOptionalParams +export interface VirtualClustersUpdateDnsServersOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14500,121 +16578,123 @@ export interface ManagedInstancesUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type ManagedInstancesUpdateResponse = ManagedInstance; +/** Contains response data for the updateDnsServers operation. */ +export type VirtualClustersUpdateDnsServersResponse = UpdateVirtualClusterDnsServersOperation; /** Optional parameters. */ -export interface ManagedInstancesListByManagedInstanceOptionalParams - extends coreClient.OperationOptions { - /** Start time for observed period. */ - startTime?: string; - /** End time for observed period. */ - endTime?: string; - /** The time step to be used to summarize the metric values. Default value is PT1H */ - interval?: QueryTimeGrainType; - /** How many 'top queries' to return. Default is 5. */ - numberOfQueries?: number; - /** Comma separated list of databases to be included into search. All DB's are included if this parameter is not specified. */ - databases?: string; - /** Aggregation function to be used, default value is 'sum' */ - aggregationFunction?: AggregationFunctionType; - /** Metric to be used for ranking top queries. Default is 'cpu' */ - observationMetric?: MetricType; -} +export interface VirtualClustersListNextOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the listByManagedInstance operation. */ -export type ManagedInstancesListByManagedInstanceResponse = TopQueriesListResult; +/** Contains response data for the listNext operation. */ +export type VirtualClustersListNextResponse = VirtualClusterListResult; /** Optional parameters. */ -export interface ManagedInstancesFailoverOptionalParams - extends coreClient.OperationOptions { - /** The type of replica to be failed over. */ - replicaType?: ReplicaType; - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface VirtualClustersListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type VirtualClustersListByResourceGroupNextResponse = VirtualClusterListResult; /** Optional parameters. */ -export interface ManagedInstancesListByInstancePoolNextOptionalParams +export interface VirtualNetworkRulesListByServerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstancePoolNext operation. */ -export type ManagedInstancesListByInstancePoolNextResponse = ManagedInstanceListResult; +/** Contains response data for the listByServer operation. */ +export type VirtualNetworkRulesListByServerResponse = VirtualNetworkRuleListResult; /** Optional parameters. */ -export interface ManagedInstancesListNextOptionalParams +export interface VirtualNetworkRulesGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listNext operation. */ -export type ManagedInstancesListNextResponse = ManagedInstanceListResult; +/** Contains response data for the get operation. */ +export type VirtualNetworkRulesGetResponse = VirtualNetworkRule; /** Optional parameters. */ -export interface ManagedInstancesListByResourceGroupNextOptionalParams - extends coreClient.OperationOptions {} +export interface VirtualNetworkRulesCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ManagedInstancesListByResourceGroupNextResponse = ManagedInstanceListResult; +/** Contains response data for the createOrUpdate operation. */ +export type VirtualNetworkRulesCreateOrUpdateResponse = VirtualNetworkRule; /** Optional parameters. */ -export interface ManagedInstancesListByManagedInstanceNextOptionalParams +export interface VirtualNetworkRulesDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface VirtualNetworkRulesListByServerNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByManagedInstanceNext operation. */ -export type ManagedInstancesListByManagedInstanceNextResponse = TopQueriesListResult; +/** Contains response data for the listByServerNext operation. */ +export type VirtualNetworkRulesListByServerNextResponse = VirtualNetworkRuleListResult; /** Optional parameters. */ -export interface RestorableDroppedDatabasesListByServerOptionalParams +export interface WorkloadClassifiersListByWorkloadGroupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServer operation. */ -export type RestorableDroppedDatabasesListByServerResponse = RestorableDroppedDatabaseListResult; +/** Contains response data for the listByWorkloadGroup operation. */ +export type WorkloadClassifiersListByWorkloadGroupResponse = WorkloadClassifierListResult; /** Optional parameters. */ -export interface RestorableDroppedDatabasesGetOptionalParams +export interface WorkloadClassifiersGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type RestorableDroppedDatabasesGetResponse = RestorableDroppedDatabase; +export type WorkloadClassifiersGetResponse = WorkloadClassifier; /** Optional parameters. */ -export interface RestorableDroppedDatabasesListByServerNextOptionalParams - extends coreClient.OperationOptions {} +export interface WorkloadClassifiersCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listByServerNext operation. */ -export type RestorableDroppedDatabasesListByServerNextResponse = RestorableDroppedDatabaseListResult; +/** Contains response data for the createOrUpdate operation. */ +export type WorkloadClassifiersCreateOrUpdateResponse = WorkloadClassifier; /** Optional parameters. */ -export interface RestorableDroppedManagedDatabasesListByInstanceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByInstance operation. */ -export type RestorableDroppedManagedDatabasesListByInstanceResponse = RestorableDroppedManagedDatabaseListResult; +export interface WorkloadClassifiersDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface RestorableDroppedManagedDatabasesGetOptionalParams +export interface WorkloadClassifiersListByWorkloadGroupNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type RestorableDroppedManagedDatabasesGetResponse = RestorableDroppedManagedDatabase; +/** Contains response data for the listByWorkloadGroupNext operation. */ +export type WorkloadClassifiersListByWorkloadGroupNextResponse = WorkloadClassifierListResult; /** Optional parameters. */ -export interface RestorableDroppedManagedDatabasesListByInstanceNextOptionalParams +export interface WorkloadGroupsListByDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByInstanceNext operation. */ -export type RestorableDroppedManagedDatabasesListByInstanceNextResponse = RestorableDroppedManagedDatabaseListResult; +/** Contains response data for the listByDatabase operation. */ +export type WorkloadGroupsListByDatabaseResponse = WorkloadGroupListResult; /** Optional parameters. */ -export interface ServerConnectionPoliciesGetOptionalParams +export interface WorkloadGroupsGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ServerConnectionPoliciesGetResponse = ServerConnectionPolicy; +export type WorkloadGroupsGetResponse = WorkloadGroup; /** Optional parameters. */ -export interface ServerConnectionPoliciesCreateOrUpdateOptionalParams +export interface WorkloadGroupsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -14623,27 +16703,31 @@ export interface ServerConnectionPoliciesCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ServerConnectionPoliciesCreateOrUpdateResponse = ServerConnectionPolicy; +export type WorkloadGroupsCreateOrUpdateResponse = WorkloadGroup; /** Optional parameters. */ -export interface ServerConnectionPoliciesListByServerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByServer operation. */ -export type ServerConnectionPoliciesListByServerResponse = ServerConnectionPolicyListResult; +export interface WorkloadGroupsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface ServerConnectionPoliciesListByServerNextOptionalParams +export interface WorkloadGroupsListByDatabaseNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByServerNext operation. */ -export type ServerConnectionPoliciesListByServerNextResponse = ServerConnectionPolicyListResult; +/** Contains response data for the listByDatabaseNext operation. */ +export type WorkloadGroupsListByDatabaseNextResponse = WorkloadGroupListResult; /** Optional parameters. */ export interface SqlManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; + /** Api Version */ + apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/sql/arm-sql/src/models/mappers.ts b/sdk/sql/arm-sql/src/models/mappers.ts index 936dbed08279..bf0244d01c32 100644 --- a/sdk/sql/arm-sql/src/models/mappers.ts +++ b/sdk/sql/arm-sql/src/models/mappers.ts @@ -8,6 +8,35 @@ import * as coreClient from "@azure/core-client"; +export const BackupShortTermRetentionPolicyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupShortTermRetentionPolicyListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupShortTermRetentionPolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -38,163 +67,200 @@ export const Resource: coreClient.CompositeMapper = { } }; -export const RecoverableDatabaseListResult: coreClient.CompositeMapper = { +export const ServerBlobAuditingPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecoverableDatabaseListResult", + className: "ServerBlobAuditingPolicyListResult", modelProperties: { value: { serializedName: "value", - required: true, + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RecoverableDatabase" + className: "ServerBlobAuditingPolicy" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const DataMaskingRuleListResult: coreClient.CompositeMapper = { +export const DatabaseBlobAuditingPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataMaskingRuleListResult", + className: "DatabaseBlobAuditingPolicyListResult", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DataMaskingRule" + className: "DatabaseBlobAuditingPolicy" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const GeoBackupPolicyListResult: coreClient.CompositeMapper = { +export const ExtendedDatabaseBlobAuditingPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GeoBackupPolicyListResult", + className: "ExtendedDatabaseBlobAuditingPolicyListResult", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "GeoBackupPolicy" + className: "ExtendedDatabaseBlobAuditingPolicy" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const MetricListResult: coreClient.CompositeMapper = { +export const ExtendedServerBlobAuditingPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricListResult", + className: "ExtendedServerBlobAuditingPolicyListResult", modelProperties: { value: { serializedName: "value", - required: true, + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Metric" + className: "ExtendedServerBlobAuditingPolicy" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const Metric: coreClient.CompositeMapper = { +export const DataMaskingRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Metric", + className: "DataMaskingRuleListResult", modelProperties: { - startTime: { - serializedName: "startTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - endTime: { - serializedName: "endTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - timeGrain: { - serializedName: "timeGrain", + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataMaskingRule" + } + } } }, - unit: { - serializedName: "unit", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "MetricName" - } - }, - metricValues: { - serializedName: "metricValues", + } + } + } +}; + +export const DataWarehouseUserActivitiesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataWarehouseUserActivitiesListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MetricValue" + className: "DataWarehouseUserActivities" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const MetricName: coreClient.CompositeMapper = { +export const DatabaseAdvancedThreatProtectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricName", + className: "DatabaseAdvancedThreatProtectionListResult", modelProperties: { value: { serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseAdvancedThreatProtection" + } + } } }, - localizedValue: { - serializedName: "localizedValue", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" @@ -204,143 +270,97 @@ export const MetricName: coreClient.CompositeMapper = { } }; -export const MetricValue: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricValue", + className: "SystemData", modelProperties: { - count: { - serializedName: "count", - readOnly: true, + createdBy: { + serializedName: "createdBy", type: { - name: "Number" + name: "String" } }, - average: { - serializedName: "average", - readOnly: true, + createdByType: { + serializedName: "createdByType", type: { - name: "Number" + name: "String" } }, - maximum: { - serializedName: "maximum", - readOnly: true, + createdAt: { + serializedName: "createdAt", type: { - name: "Number" + name: "DateTime" } }, - minimum: { - serializedName: "minimum", - readOnly: true, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { - name: "Number" + name: "String" } }, - timestamp: { - serializedName: "timestamp", - readOnly: true, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { - name: "DateTime" + name: "String" } }, - total: { - serializedName: "total", - readOnly: true, + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "Number" + name: "DateTime" } } } } }; -export const MetricDefinitionListResult: coreClient.CompositeMapper = { +export const RecommendedActionStateInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricDefinitionListResult", + className: "RecommendedActionStateInfo", modelProperties: { - value: { - serializedName: "value", + currentValue: { + serializedName: "currentValue", required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricDefinition" - } - } - } - } - } - } -}; - -export const MetricDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricDefinition", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "Composite", - className: "MetricName" - } - }, - primaryAggregationType: { - serializedName: "primaryAggregationType", - readOnly: true, - type: { - name: "String" - } - }, - resourceUri: { - serializedName: "resourceUri", - readOnly: true, type: { name: "String" } }, - unit: { - serializedName: "unit", + actionInitiatedBy: { + serializedName: "actionInitiatedBy", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["User", "System"] } }, - metricAvailabilities: { - serializedName: "metricAvailabilities", + lastModified: { + serializedName: "lastModified", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MetricAvailability" - } - } + name: "DateTime" } } } } }; -export const MetricAvailability: coreClient.CompositeMapper = { +export const RecommendedActionImplementationInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricAvailability", + className: "RecommendedActionImplementationInfo", modelProperties: { - retention: { - serializedName: "retention", + method: { + serializedName: "method", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["TSql", "AzurePowerShell"] } }, - timeGrain: { - serializedName: "timeGrain", + script: { + serializedName: "script", readOnly: true, type: { name: "String" @@ -350,192 +370,331 @@ export const MetricAvailability: coreClient.CompositeMapper = { } }; -export const UnlinkParameters: coreClient.CompositeMapper = { +export const RecommendedActionErrorInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UnlinkParameters", + className: "RecommendedActionErrorInfo", modelProperties: { - forcedTermination: { - serializedName: "forcedTermination", + errorCode: { + serializedName: "errorCode", + readOnly: true, type: { - name: "Boolean" + name: "String" + } + }, + isRetryable: { + serializedName: "isRetryable", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Yes", "No"] } } } } }; -export const ServerCommunicationLinkListResult: coreClient.CompositeMapper = { +export const RecommendedActionImpactRecord: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerCommunicationLinkListResult", + className: "RecommendedActionImpactRecord", modelProperties: { - value: { - serializedName: "value", + dimensionName: { + serializedName: "dimensionName", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerCommunicationLink" - } - } + name: "String" + } + }, + unit: { + serializedName: "unit", + readOnly: true, + type: { + name: "String" + } + }, + absoluteValue: { + serializedName: "absoluteValue", + readOnly: true, + type: { + name: "Number" + } + }, + changeValueAbsolute: { + serializedName: "changeValueAbsolute", + readOnly: true, + type: { + name: "Number" + } + }, + changeValueRelative: { + serializedName: "changeValueRelative", + readOnly: true, + type: { + name: "Number" } } } } }; -export const ServiceObjectiveListResult: coreClient.CompositeMapper = { +export const RecommendedActionMetricInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceObjectiveListResult", + className: "RecommendedActionMetricInfo", modelProperties: { + metricName: { + serializedName: "metricName", + readOnly: true, + type: { + name: "String" + } + }, + unit: { + serializedName: "unit", + readOnly: true, + type: { + name: "String" + } + }, + timeGrain: { + serializedName: "timeGrain", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, value: { serializedName: "value", - required: true, + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceObjective" - } - } + name: "Number" } } } } }; -export const ElasticPoolActivityListResult: coreClient.CompositeMapper = { +export const AutomaticTuningOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolActivityListResult", + className: "AutomaticTuningOptions", modelProperties: { - value: { - serializedName: "value", - required: true, + desiredState: { + serializedName: "desiredState", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ElasticPoolActivity" - } - } + name: "Enum", + allowedValues: ["Off", "On", "Default"] + } + }, + actualState: { + serializedName: "actualState", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Off", "On"] + } + }, + reasonCode: { + serializedName: "reasonCode", + readOnly: true, + type: { + name: "Number" + } + }, + reasonDesc: { + serializedName: "reasonDesc", + readOnly: true, + type: { + name: "Enum", + allowedValues: [ + "Default", + "Disabled", + "AutoConfigured", + "InheritedFromServer", + "QueryStoreOff", + "QueryStoreReadOnly", + "NotSupported" + ] } } } } }; -export const ElasticPoolDatabaseActivityListResult: coreClient.CompositeMapper = { +export const DatabaseColumnListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolDatabaseActivityListResult", + className: "DatabaseColumnListResult", modelProperties: { value: { serializedName: "value", - required: true, + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ElasticPoolDatabaseActivity" + className: "DatabaseColumn" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const ServerUsageListResult: coreClient.CompositeMapper = { +export const ImportExportExtensionsOperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerUsageListResult", + className: "ImportExportExtensionsOperationListResult", modelProperties: { value: { serializedName: "value", - required: true, + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServerUsage" + className: "ImportExportExtensionsOperationResult" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const ServerUsage: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionRequestStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerUsage", + className: "PrivateEndpointConnectionRequestStatus", modelProperties: { - name: { - serializedName: "name", + privateLinkServiceId: { + serializedName: "privateLinkServiceId", readOnly: true, type: { name: "String" } }, - resourceName: { - serializedName: "resourceName", + privateEndpointConnectionName: { + serializedName: "privateEndpointConnectionName", readOnly: true, type: { name: "String" } }, - displayName: { - serializedName: "displayName", + status: { + serializedName: "status", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const NetworkIsolationSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkIsolationSettings", + modelProperties: { + storageAccountResourceId: { + serializedName: "storageAccountResourceId", + type: { + name: "String" + } }, - currentValue: { - serializedName: "currentValue", + sqlServerResourceId: { + serializedName: "sqlServerResourceId", + type: { + name: "String" + } + } + } + } +}; + +export const DatabaseOperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseOperationListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseOperation" + } + } } }, - limit: { - serializedName: "limit", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Number" + name: "String" } - }, - unit: { - serializedName: "unit", + } + } + } +}; + +export const PhaseDetails: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhaseDetails", + modelProperties: { + phase: { + serializedName: "phase", readOnly: true, type: { name: "String" } }, - nextResetTime: { - serializedName: "nextResetTime", + phaseInformation: { + serializedName: "phaseInformation", readOnly: true, type: { - name: "DateTime" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const ExtendedDatabaseBlobAuditingPolicyListResult: coreClient.CompositeMapper = { +export const DatabaseSchemaListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedDatabaseBlobAuditingPolicyListResult", + className: "DatabaseSchemaListResult", modelProperties: { value: { serializedName: "value", @@ -545,7 +704,7 @@ export const ExtendedDatabaseBlobAuditingPolicyListResult: coreClient.CompositeM element: { type: { name: "Composite", - className: "ExtendedDatabaseBlobAuditingPolicy" + className: "DatabaseSchema" } } } @@ -561,10 +720,10 @@ export const ExtendedDatabaseBlobAuditingPolicyListResult: coreClient.CompositeM } }; -export const ExtendedServerBlobAuditingPolicyListResult: coreClient.CompositeMapper = { +export const DatabaseSecurityAlertListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedServerBlobAuditingPolicyListResult", + className: "DatabaseSecurityAlertListResult", modelProperties: { value: { serializedName: "value", @@ -574,7 +733,7 @@ export const ExtendedServerBlobAuditingPolicyListResult: coreClient.CompositeMap element: { type: { name: "Composite", - className: "ExtendedServerBlobAuditingPolicy" + className: "DatabaseSecurityAlertPolicy" } } } @@ -590,10 +749,10 @@ export const ExtendedServerBlobAuditingPolicyListResult: coreClient.CompositeMap } }; -export const ServerBlobAuditingPolicyListResult: coreClient.CompositeMapper = { +export const DatabaseSqlVulnerabilityAssessmentBaselineSetListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerBlobAuditingPolicyListResult", + className: "DatabaseSqlVulnerabilityAssessmentBaselineSetListResult", modelProperties: { value: { serializedName: "value", @@ -603,7 +762,7 @@ export const ServerBlobAuditingPolicyListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerBlobAuditingPolicy" + className: "DatabaseSqlVulnerabilityAssessmentBaselineSet" } } } @@ -619,10 +778,10 @@ export const ServerBlobAuditingPolicyListResult: coreClient.CompositeMapper = { } }; -export const DatabaseBlobAuditingPolicyListResult: coreClient.CompositeMapper = { +export const DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseBlobAuditingPolicyListResult", + className: "DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult", modelProperties: { value: { serializedName: "value", @@ -632,7 +791,7 @@ export const DatabaseBlobAuditingPolicyListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "DatabaseBlobAuditingPolicy" + className: "DatabaseSqlVulnerabilityAssessmentRuleBaseline" } } } @@ -648,52 +807,68 @@ export const DatabaseBlobAuditingPolicyListResult: coreClient.CompositeMapper = } }; -export const RecommendedActionStateInfo: coreClient.CompositeMapper = { +export const SQLVulnerabilityAssessmentScanListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecommendedActionStateInfo", + className: "SQLVulnerabilityAssessmentScanListResult", modelProperties: { - currentValue: { - serializedName: "currentValue", - required: true, - type: { - name: "String" - } - }, - actionInitiatedBy: { - serializedName: "actionInitiatedBy", + value: { + serializedName: "value", readOnly: true, type: { - name: "Enum", - allowedValues: ["User", "System"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlVulnerabilityAssessmentScanResults" + } + } } }, - lastModified: { - serializedName: "lastModified", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "DateTime" + name: "String" } } } } }; -export const RecommendedActionImplementationInfo: coreClient.CompositeMapper = { +export const Remediation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecommendedActionImplementationInfo", + className: "Remediation", modelProperties: { - method: { - serializedName: "method", + description: { + serializedName: "description", readOnly: true, type: { - name: "Enum", - allowedValues: ["TSql", "AzurePowerShell"] + name: "String" } }, - script: { - serializedName: "script", + scripts: { + serializedName: "scripts", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + automated: { + serializedName: "automated", + readOnly: true, + type: { + name: "Boolean" + } + }, + portalLink: { + serializedName: "portalLink", readOnly: true, type: { name: "String" @@ -703,185 +878,233 @@ export const RecommendedActionImplementationInfo: coreClient.CompositeMapper = { } }; -export const RecommendedActionErrorInfo: coreClient.CompositeMapper = { +export const BaselineAdjustedResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecommendedActionErrorInfo", + className: "BaselineAdjustedResult", modelProperties: { - errorCode: { - serializedName: "errorCode", + baseline: { + serializedName: "baseline", + type: { + name: "Composite", + className: "Baseline" + } + }, + status: { + serializedName: "status", readOnly: true, type: { name: "String" } }, - isRetryable: { - serializedName: "isRetryable", + resultsNotInBaseline: { + serializedName: "resultsNotInBaseline", readOnly: true, type: { - name: "Enum", - allowedValues: ["Yes", "No"] + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + }, + resultsOnlyInBaseline: { + serializedName: "resultsOnlyInBaseline", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } } } } }; -export const RecommendedActionImpactRecord: coreClient.CompositeMapper = { +export const Baseline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecommendedActionImpactRecord", + className: "Baseline", modelProperties: { - dimensionName: { - serializedName: "dimensionName", + expectedResults: { + serializedName: "expectedResults", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - unit: { - serializedName: "unit", + updatedTime: { + serializedName: "updatedTime", + readOnly: true, + type: { + name: "DateTime" + } + } + } + } +}; + +export const VaRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VaRule", + modelProperties: { + ruleId: { + serializedName: "ruleId", readOnly: true, type: { name: "String" } }, - absoluteValue: { - serializedName: "absoluteValue", + severity: { + serializedName: "severity", readOnly: true, type: { - name: "Number" + name: "String" } }, - changeValueAbsolute: { - serializedName: "changeValueAbsolute", + category: { + serializedName: "category", readOnly: true, type: { - name: "Number" + name: "String" } }, - changeValueRelative: { - serializedName: "changeValueRelative", + ruleType: { + serializedName: "ruleType", readOnly: true, type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const RecommendedActionMetricInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecommendedActionMetricInfo", - modelProperties: { - metricName: { - serializedName: "metricName", + }, + title: { + serializedName: "title", readOnly: true, type: { name: "String" } }, - unit: { - serializedName: "unit", + description: { + serializedName: "description", readOnly: true, type: { name: "String" } }, - timeGrain: { - serializedName: "timeGrain", + rationale: { + serializedName: "rationale", readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "startTime", - readOnly: true, + queryCheck: { + serializedName: "queryCheck", type: { - name: "DateTime" + name: "Composite", + className: "QueryCheck" } }, - value: { - serializedName: "value", + benchmarkReferences: { + serializedName: "benchmarkReferences", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BenchmarkReference" + } + } } } } } }; -export const AutomaticTuningOptions: coreClient.CompositeMapper = { +export const QueryCheck: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutomaticTuningOptions", + className: "QueryCheck", modelProperties: { - desiredState: { - serializedName: "desiredState", - type: { - name: "Enum", - allowedValues: ["Off", "On", "Default"] - } - }, - actualState: { - serializedName: "actualState", + query: { + serializedName: "query", readOnly: true, type: { - name: "Enum", - allowedValues: ["Off", "On"] + name: "String" } }, - reasonCode: { - serializedName: "reasonCode", + expectedResult: { + serializedName: "expectedResult", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - reasonDesc: { - serializedName: "reasonDesc", + columnNames: { + serializedName: "columnNames", readOnly: true, type: { - name: "Enum", - allowedValues: [ - "Default", - "Disabled", - "AutoConfigured", - "InheritedFromServer", - "QueryStoreOff", - "QueryStoreReadOnly", - "NotSupported" - ] + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const DatabaseColumnListResult: coreClient.CompositeMapper = { +export const BenchmarkReference: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseColumnListResult", + className: "BenchmarkReference", modelProperties: { - value: { - serializedName: "value", + benchmark: { + serializedName: "benchmark", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseColumn" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + reference: { + serializedName: "reference", readOnly: true, type: { name: "String" @@ -891,10 +1114,10 @@ export const DatabaseColumnListResult: coreClient.CompositeMapper = { } }; -export const DatabaseSchemaListResult: coreClient.CompositeMapper = { +export const SqlVulnerabilityAssessmentScanRecordListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseSchemaListResult", + className: "SqlVulnerabilityAssessmentScanRecordListResult", modelProperties: { value: { serializedName: "value", @@ -904,7 +1127,7 @@ export const DatabaseSchemaListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DatabaseSchema" + className: "SqlVulnerabilityAssessmentScanRecord" } } } @@ -920,55 +1143,33 @@ export const DatabaseSchemaListResult: coreClient.CompositeMapper = { } }; -export const SystemData: coreClient.CompositeMapper = { +export const SqlVulnerabilityAssessmentScanError: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SystemData", + className: "SqlVulnerabilityAssessmentScanError", modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String" - } - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String" - } - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime" - } - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", + code: { + serializedName: "code", + readOnly: true, type: { name: "String" } }, - lastModifiedByType: { - serializedName: "lastModifiedByType", + message: { + serializedName: "message", + readOnly: true, type: { name: "String" } - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime" - } } } } }; -export const DatabaseSecurityAlertListResult: coreClient.CompositeMapper = { +export const SqlVulnerabilityAssessmentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseSecurityAlertListResult", + className: "SqlVulnerabilityAssessmentListResult", modelProperties: { value: { serializedName: "value", @@ -978,7 +1179,7 @@ export const DatabaseSecurityAlertListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DatabaseSecurityAlertPolicy" + className: "SqlVulnerabilityAssessment" } } } @@ -1023,84 +1224,51 @@ export const DatabaseTableListResult: coreClient.CompositeMapper = { } }; -export const DatabaseVulnerabilityAssessmentRuleBaselineItem: coreClient.CompositeMapper = { +export const DatabaseUsageListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseVulnerabilityAssessmentRuleBaselineItem", + className: "DatabaseUsageListResult", modelProperties: { - result: { - serializedName: "result", - required: true, + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "DatabaseUsage" } } } - } - } - } -}; - -export const VulnerabilityAssessmentRecurringScansProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VulnerabilityAssessmentRecurringScansProperties", - modelProperties: { - isEnabled: { - serializedName: "isEnabled", - type: { - name: "Boolean" - } - }, - emailSubscriptionAdmins: { - defaultValue: true, - serializedName: "emailSubscriptionAdmins", - type: { - name: "Boolean" - } }, - emails: { - serializedName: "emails", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const DatabaseVulnerabilityAssessmentListResult: coreClient.CompositeMapper = { +export const DatabaseVulnerabilityAssessmentRuleBaselineItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseVulnerabilityAssessmentListResult", + className: "DatabaseVulnerabilityAssessmentRuleBaselineItem", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + result: { + serializedName: "result", + required: true, type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DatabaseVulnerabilityAssessment" + name: "String" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } @@ -1158,10 +1326,10 @@ export const VulnerabilityAssessmentScanError: coreClient.CompositeMapper = { } }; -export const DataWarehouseUserActivitiesListResult: coreClient.CompositeMapper = { +export const DatabaseVulnerabilityAssessmentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataWarehouseUserActivitiesListResult", + className: "DatabaseVulnerabilityAssessmentListResult", modelProperties: { value: { serializedName: "value", @@ -1171,7 +1339,7 @@ export const DataWarehouseUserActivitiesListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "DataWarehouseUserActivities" + className: "DatabaseVulnerabilityAssessment" } } } @@ -1187,68 +1355,43 @@ export const DataWarehouseUserActivitiesListResult: coreClient.CompositeMapper = } }; -export const DeletedServerListResult: coreClient.CompositeMapper = { +export const VulnerabilityAssessmentRecurringScansProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DeletedServerListResult", + className: "VulnerabilityAssessmentRecurringScansProperties", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + isEnabled: { + serializedName: "isEnabled", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DeletedServer" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + emailSubscriptionAdmins: { + defaultValue: true, + serializedName: "emailSubscriptionAdmins", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const ElasticPoolOperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ElasticPoolOperationListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + emails: { + serializedName: "emails", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ElasticPoolOperation" + name: "String" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const ElasticPoolListResult: coreClient.CompositeMapper = { +export const DatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolListResult", + className: "DatabaseListResult", modelProperties: { value: { serializedName: "value", @@ -1258,7 +1401,7 @@ export const ElasticPoolListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ElasticPool" + className: "Database" } } } @@ -1314,139 +1457,89 @@ export const Sku: coreClient.CompositeMapper = { } }; -export const ElasticPoolPerDatabaseSettings: coreClient.CompositeMapper = { +export const DatabaseIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolPerDatabaseSettings", + className: "DatabaseIdentity", modelProperties: { - minCapacity: { - serializedName: "minCapacity", + type: { + serializedName: "type", type: { - name: "Number" + name: "String" } }, - maxCapacity: { - serializedName: "maxCapacity", - type: { - name: "Number" - } - } - } - } -}; - -export const ElasticPoolUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ElasticPoolUpdate", - modelProperties: { - sku: { - serializedName: "sku", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { - name: "Composite", - className: "Sku" + name: "Uuid" } }, - tags: { - serializedName: "tags", + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { name: "Dictionary", - value: { type: { name: "String" } } - } - }, - 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" - } - }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", - type: { - name: "String" + value: { + type: { name: "Composite", className: "DatabaseUserIdentity" } + } } } } } }; -export const EncryptionProtectorListResult: coreClient.CompositeMapper = { +export const DatabaseUserIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EncryptionProtectorListResult", + className: "DatabaseUserIdentity", modelProperties: { - value: { - serializedName: "value", + principalId: { + serializedName: "principalId", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EncryptionProtector" - } - } + name: "Uuid" } }, - nextLink: { - serializedName: "nextLink", + clientId: { + serializedName: "clientId", readOnly: true, type: { - name: "String" + name: "Uuid" } } } } }; -export const FailoverGroupReadWriteEndpoint: coreClient.CompositeMapper = { +export const DatabaseKey: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FailoverGroupReadWriteEndpoint", + className: "DatabaseKey", modelProperties: { - failoverPolicy: { - serializedName: "failoverPolicy", - required: true, + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - failoverWithDataLossGracePeriodMinutes: { - serializedName: "failoverWithDataLossGracePeriodMinutes", + thumbprint: { + serializedName: "thumbprint", + readOnly: true, type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const FailoverGroupReadOnlyEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FailoverGroupReadOnlyEndpoint", - modelProperties: { - failoverPolicy: { - serializedName: "failoverPolicy", + }, + creationDate: { + serializedName: "creationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + subregion: { + serializedName: "subregion", + readOnly: true, type: { name: "String" } @@ -1455,28 +1548,1410 @@ export const FailoverGroupReadOnlyEndpoint: coreClient.CompositeMapper = { } }; -export const PartnerInfo: coreClient.CompositeMapper = { +export const DatabaseUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PartnerInfo", + className: "DatabaseUpdate", modelProperties: { - id: { - serializedName: "id", - required: true, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "DatabaseIdentity" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { 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: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + databaseId: { + serializedName: "properties.databaseId", + readOnly: true, + type: { + name: "Uuid" + } + }, + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + currentServiceObjectiveName: { + serializedName: "properties.currentServiceObjectiveName", + readOnly: true, + type: { + name: "String" + } + }, + requestedServiceObjectiveName: { + serializedName: "properties.requestedServiceObjectiveName", + readOnly: true, + type: { + name: "String" + } + }, + defaultSecondaryLocation: { + serializedName: "properties.defaultSecondaryLocation", + readOnly: true, + type: { + name: "String" + } + }, + failoverGroupId: { + serializedName: "properties.failoverGroupId", + readOnly: true, + 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: { + serializedName: "properties.maxLogSizeBytes", + readOnly: true, + type: { + name: "Number" + } + }, + earliestRestoreDate: { + serializedName: "properties.earliestRestoreDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + readScale: { + serializedName: "properties.readScale", + type: { + name: "String" + } + }, + highAvailabilityReplicaCount: { + serializedName: "properties.highAvailabilityReplicaCount", + type: { + name: "Number" + } + }, + secondaryType: { + serializedName: "properties.secondaryType", + type: { + name: "String" + } + }, + currentSku: { + serializedName: "properties.currentSku", + type: { + name: "Composite", + className: "Sku" + } + }, + autoPauseDelay: { + serializedName: "properties.autoPauseDelay", + type: { + name: "Number" + } + }, + currentBackupStorageRedundancy: { + serializedName: "properties.currentBackupStorageRedundancy", + readOnly: true, + type: { + name: "String" + } + }, + requestedBackupStorageRedundancy: { + serializedName: "properties.requestedBackupStorageRedundancy", + type: { + name: "String" + } + }, + minCapacity: { + serializedName: "properties.minCapacity", + type: { + name: "Number" + } + }, + pausedDate: { + serializedName: "properties.pausedDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + resumedDate: { + serializedName: "properties.resumedDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + maintenanceConfigurationId: { + serializedName: "properties.maintenanceConfigurationId", + type: { + name: "String" + } + }, + isLedgerOn: { + serializedName: "properties.isLedgerOn", + type: { + name: "Boolean" + } + }, + isInfraEncryptionEnabled: { + serializedName: "properties.isInfraEncryptionEnabled", + readOnly: true, + type: { + name: "Boolean" + } + }, + federatedClientId: { + serializedName: "properties.federatedClientId", + type: { + name: "Uuid" + } + }, + keys: { + serializedName: "properties.keys", + type: { + name: "Dictionary", + value: { type: { name: "Composite", className: "DatabaseKey" } } + } + }, + encryptionProtector: { + serializedName: "properties.encryptionProtector", + type: { + name: "String" + } + }, + preferredEnclaveType: { + serializedName: "properties.preferredEnclaveType", + type: { + name: "String" + } + }, + manualCutover: { + serializedName: "properties.manualCutover", + type: { + name: "Boolean" + } + }, + performCutover: { + serializedName: "properties.performCutover", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ExportDatabaseDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExportDatabaseDefinition", + modelProperties: { + storageKeyType: { + serializedName: "storageKeyType", + required: true, + type: { + name: "String" + } + }, + storageKey: { + serializedName: "storageKey", + required: true, + type: { + name: "String" + } + }, + storageUri: { + serializedName: "storageUri", + required: true, + type: { + name: "String" + } + }, + administratorLogin: { + serializedName: "administratorLogin", + required: true, + type: { + name: "String" + } + }, + administratorLoginPassword: { + serializedName: "administratorLoginPassword", + required: true, + type: { + name: "String" + } + }, + authenticationType: { + serializedName: "authenticationType", + type: { + name: "String" + } + }, + networkIsolation: { + serializedName: "networkIsolation", + type: { + name: "Composite", + className: "NetworkIsolationSettings" + } + } + } + } +}; + +export const ImportExistingDatabaseDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportExistingDatabaseDefinition", + modelProperties: { + storageKeyType: { + serializedName: "storageKeyType", + required: true, + type: { + name: "String" + } + }, + storageKey: { + serializedName: "storageKey", + required: true, + type: { + name: "String" + } + }, + storageUri: { + serializedName: "storageUri", + required: true, + type: { + name: "String" + } + }, + administratorLogin: { + serializedName: "administratorLogin", + required: true, + type: { + name: "String" + } + }, + administratorLoginPassword: { + serializedName: "administratorLoginPassword", + required: true, + type: { + name: "String" + } + }, + authenticationType: { + serializedName: "authenticationType", + type: { + name: "String" + } + }, + networkIsolation: { + serializedName: "networkIsolation", + type: { + name: "Composite", + className: "NetworkIsolationSettings" + } + } + } + } +}; + +export const ResourceMoveDefinition: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceMoveDefinition", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const DeletedServerListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeletedServerListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DeletedServer" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DistributedAvailabilityGroupsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DistributedAvailabilityGroupsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DistributedAvailabilityGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const DistributedAvailabilityGroupSetRole: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DistributedAvailabilityGroupSetRole", + modelProperties: { + instanceRole: { + serializedName: "instanceRole", + required: true, + type: { + name: "String" + } + }, + roleChangeType: { + serializedName: "roleChangeType", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolOperationListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ElasticPoolOperationListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolOperation" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ElasticPoolListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ElasticPoolPerDatabaseSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseSettings", + modelProperties: { + minCapacity: { + serializedName: "minCapacity", + type: { + name: "Number" + } + }, + maxCapacity: { + serializedName: "maxCapacity", + type: { + name: "Number" + } + } + } + } +}; + +export const ElasticPoolUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ElasticPoolUpdate", + modelProperties: { + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", + type: { + name: "Number" + } + }, + minCapacity: { + serializedName: "properties.minCapacity", + 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" + } + }, + maintenanceConfigurationId: { + serializedName: "properties.maintenanceConfigurationId", + type: { + name: "String" + } + }, + highAvailabilityReplicaCount: { + serializedName: "properties.highAvailabilityReplicaCount", + type: { + name: "Number" + } + }, + preferredEnclaveType: { + serializedName: "properties.preferredEnclaveType", + type: { + name: "String" + } + }, + availabilityZone: { + serializedName: "properties.availabilityZone", + type: { + name: "String" + } + } + } + } +}; + +export const EncryptionProtectorListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncryptionProtectorListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EncryptionProtector" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const EndpointCertificateListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointCertificateListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EndpointCertificate" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FailoverGroupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FailoverGroupListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FailoverGroupReadWriteEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FailoverGroupReadWriteEndpoint", + modelProperties: { + failoverPolicy: { + serializedName: "failoverPolicy", + required: true, + type: { + name: "String" + } + }, + failoverWithDataLossGracePeriodMinutes: { + serializedName: "failoverWithDataLossGracePeriodMinutes", + type: { + name: "Number" + } + } + } + } +}; + +export const FailoverGroupReadOnlyEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FailoverGroupReadOnlyEndpoint", + modelProperties: { + failoverPolicy: { + serializedName: "failoverPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const PartnerInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PartnerInfo", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + readOnly: true, + type: { + name: "String" + } + }, + replicationRole: { + serializedName: "replicationRole", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FailoverGroupUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FailoverGroupUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + 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" + } + } + } + } + } + } +}; + +export const FirewallRuleListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallRuleListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirewallRule" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ResourceWithWritableName: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceWithWritableName", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const FirewallRuleList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FirewallRuleList", + modelProperties: { + values: { + serializedName: "values", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FirewallRule" + } + } + } + } + } + } +}; + +export const GeoBackupPolicyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GeoBackupPolicyListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GeoBackupPolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const IPv6FirewallRuleListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPv6FirewallRuleListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IPv6FirewallRule" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const InstanceFailoverGroupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstanceFailoverGroupListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstanceFailoverGroup" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const InstanceFailoverGroupReadWriteEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstanceFailoverGroupReadWriteEndpoint", + modelProperties: { + failoverPolicy: { + serializedName: "failoverPolicy", + required: true, + type: { + name: "String" + } + }, + failoverWithDataLossGracePeriodMinutes: { + serializedName: "failoverWithDataLossGracePeriodMinutes", + type: { + name: "Number" + } + } + } + } +}; + +export const InstanceFailoverGroupReadOnlyEndpoint: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstanceFailoverGroupReadOnlyEndpoint", + modelProperties: { + failoverPolicy: { + serializedName: "failoverPolicy", + type: { + name: "String" + } + } + } + } +}; + +export const PartnerRegionInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PartnerRegionInfo", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + replicationRole: { + serializedName: "replicationRole", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstancePairInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstancePairInfo", + modelProperties: { + primaryManagedInstanceId: { + serializedName: "primaryManagedInstanceId", + type: { + name: "String" + } + }, + partnerManagedInstanceId: { + serializedName: "partnerManagedInstanceId", + type: { + name: "String" + } + } + } + } +}; + +export const InstancePoolListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstancePoolListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstancePool" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const InstancePoolUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstancePoolUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const JobAgentListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobAgentListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobAgent" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobAgentUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobAgentUpdate", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const JobCredentialListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobCredentialListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobCredential" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobExecutionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobExecution" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobExecutionTarget: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobExecutionTarget", + modelProperties: { + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + serverName: { + serializedName: "serverName", + readOnly: true, + type: { + name: "String" + } + }, + databaseName: { + serializedName: "databaseName", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobStepListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobStepListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "JobStep" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobStepAction: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobStepAction", + modelProperties: { + type: { + defaultValue: "TSql", + serializedName: "type", + type: { + name: "String" + } + }, + source: { + defaultValue: "Inline", + serializedName: "source", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const JobStepOutput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobStepOutput", + modelProperties: { + type: { + defaultValue: "SqlDatabase", + serializedName: "type", + type: { + name: "String" + } + }, + subscriptionId: { + serializedName: "subscriptionId", + type: { + name: "Uuid" + } + }, + resourceGroupName: { + serializedName: "resourceGroupName", + type: { + name: "String" + } + }, + serverName: { + serializedName: "serverName", + required: true, + type: { + name: "String" + } + }, + databaseName: { + serializedName: "databaseName", + required: true, + type: { + name: "String" + } + }, + schemaName: { + defaultValue: "dbo", + serializedName: "schemaName", type: { name: "String" } }, - location: { - serializedName: "location", - readOnly: true, + tableName: { + serializedName: "tableName", + required: true, type: { name: "String" } }, - replicationRole: { - serializedName: "replicationRole", - readOnly: true, + credential: { + serializedName: "credential", + required: true, type: { name: "String" } @@ -1485,51 +2960,54 @@ export const PartnerInfo: coreClient.CompositeMapper = { } }; -export const FailoverGroupUpdate: coreClient.CompositeMapper = { +export const JobStepExecutionOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FailoverGroupUpdate", + className: "JobStepExecutionOptions", modelProperties: { - tags: { - serializedName: "tags", + timeoutSeconds: { + defaultValue: 43200, + serializedName: "timeoutSeconds", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Number" } }, - readWriteEndpoint: { - serializedName: "properties.readWriteEndpoint", + retryAttempts: { + defaultValue: 10, + serializedName: "retryAttempts", type: { - name: "Composite", - className: "FailoverGroupReadWriteEndpoint" + name: "Number" } }, - readOnlyEndpoint: { - serializedName: "properties.readOnlyEndpoint", + initialRetryIntervalSeconds: { + defaultValue: 1, + serializedName: "initialRetryIntervalSeconds", type: { - name: "Composite", - className: "FailoverGroupReadOnlyEndpoint" + name: "Number" } }, - databases: { - serializedName: "properties.databases", + maximumRetryIntervalSeconds: { + defaultValue: 120, + serializedName: "maximumRetryIntervalSeconds", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" + } + }, + retryIntervalBackoffMultiplier: { + defaultValue: 2, + serializedName: "retryIntervalBackoffMultiplier", + type: { + name: "Number" } } } } }; -export const FailoverGroupListResult: coreClient.CompositeMapper = { +export const JobTargetGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FailoverGroupListResult", + className: "JobTargetGroupListResult", modelProperties: { value: { serializedName: "value", @@ -1539,7 +3017,7 @@ export const FailoverGroupListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "FailoverGroup" + className: "JobTargetGroup" } } } @@ -1555,27 +3033,52 @@ export const FailoverGroupListResult: coreClient.CompositeMapper = { } }; -export const ResourceWithWritableName: coreClient.CompositeMapper = { +export const JobTarget: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceWithWritableName", + className: "JobTarget", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + membershipType: { + defaultValue: "Include", + serializedName: "membershipType", + type: { + name: "Enum", + allowedValues: ["Include", "Exclude"] + } + }, + type: { + serializedName: "type", + required: true, type: { name: "String" } }, - name: { - serializedName: "name", + serverName: { + serializedName: "serverName", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + databaseName: { + serializedName: "databaseName", + type: { + name: "String" + } + }, + elasticPoolName: { + serializedName: "elasticPoolName", + type: { + name: "String" + } + }, + shardMapName: { + serializedName: "shardMapName", + type: { + name: "String" + } + }, + refreshCredential: { + serializedName: "refreshCredential", type: { name: "String" } @@ -1584,10 +3087,10 @@ export const ResourceWithWritableName: coreClient.CompositeMapper = { } }; -export const FirewallRuleListResult: coreClient.CompositeMapper = { +export const JobVersionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FirewallRuleListResult", + className: "JobVersionListResult", modelProperties: { value: { serializedName: "value", @@ -1597,7 +3100,7 @@ export const FirewallRuleListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "FirewallRule" + className: "JobVersion" } } } @@ -1613,56 +3116,27 @@ export const FirewallRuleListResult: coreClient.CompositeMapper = { } }; -export const FirewallRuleList: coreClient.CompositeMapper = { +export const JobListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "FirewallRuleList", + className: "JobListResult", modelProperties: { - values: { - serializedName: "values", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "FirewallRule" + className: "Job" } } } - } - } - } -}; - -export const InstanceFailoverGroupReadWriteEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InstanceFailoverGroupReadWriteEndpoint", - modelProperties: { - failoverPolicy: { - serializedName: "failoverPolicy", - required: true, - type: { - name: "String" - } }, - failoverWithDataLossGracePeriodMinutes: { - serializedName: "failoverWithDataLossGracePeriodMinutes", - type: { - name: "Number" - } - } - } - } -}; - -export const InstanceFailoverGroupReadOnlyEndpoint: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InstanceFailoverGroupReadOnlyEndpoint", - modelProperties: { - failoverPolicy: { - serializedName: "failoverPolicy", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -1671,70 +3145,41 @@ export const InstanceFailoverGroupReadOnlyEndpoint: coreClient.CompositeMapper = } }; -export const PartnerRegionInfo: coreClient.CompositeMapper = { +export const JobSchedule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PartnerRegionInfo", + className: "JobSchedule", modelProperties: { - location: { - serializedName: "location", + startTime: { + defaultValue: "0001-01-01T16:00:00-08:00", + serializedName: "startTime", type: { - name: "String" + name: "DateTime" } }, - replicationRole: { - serializedName: "replicationRole", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ManagedInstancePairInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstancePairInfo", - modelProperties: { - primaryManagedInstanceId: { - serializedName: "primaryManagedInstanceId", + endTime: { + defaultValue: "9999-12-31T03:59:59-08:00", + serializedName: "endTime", type: { - name: "String" + name: "DateTime" } }, - partnerManagedInstanceId: { - serializedName: "partnerManagedInstanceId", + type: { + defaultValue: "Once", + serializedName: "type", type: { - name: "String" + name: "Enum", + allowedValues: ["Once", "Recurring"] } - } - } - } -}; - -export const InstanceFailoverGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InstanceFailoverGroupListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + enabled: { + serializedName: "enabled", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstanceFailoverGroup" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + interval: { + serializedName: "interval", type: { name: "String" } @@ -1743,26 +3188,10 @@ export const InstanceFailoverGroupListResult: coreClient.CompositeMapper = { } }; -export const InstancePoolUpdate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InstancePoolUpdate", - modelProperties: { - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - } - } - } -}; - -export const InstancePoolListResult: coreClient.CompositeMapper = { +export const LedgerDigestUploadsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InstancePoolListResult", + className: "LedgerDigestUploadsListResult", modelProperties: { value: { serializedName: "value", @@ -1772,7 +3201,7 @@ export const InstancePoolListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "InstancePool" + className: "LedgerDigestUploads" } } } @@ -1788,27 +3217,54 @@ export const InstancePoolListResult: coreClient.CompositeMapper = { } }; -export const JobAgentListResult: coreClient.CompositeMapper = { +export const LocationCapabilities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobAgentListResult", + className: "LocationCapabilities", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + supportedServerVersions: { + serializedName: "supportedServerVersions", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobAgent" + className: "ServerVersionCapability" } } } }, - nextLink: { - serializedName: "nextLink", + supportedManagedInstanceVersions: { + serializedName: "supportedManagedInstanceVersions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceVersionCapability" + } + } + } + }, + status: { + serializedName: "status", readOnly: true, + type: { + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] + } + }, + reason: { + serializedName: "reason", type: { name: "String" } @@ -1817,43 +3273,54 @@ export const JobAgentListResult: coreClient.CompositeMapper = { } }; -export const JobAgentUpdate: coreClient.CompositeMapper = { +export const ServerVersionCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobAgentUpdate", + className: "ServerVersionCapability", modelProperties: { - tags: { - serializedName: "tags", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } - } - } - } -}; - -export const JobCredentialListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobCredentialListResult", - modelProperties: { - value: { - serializedName: "value", + }, + supportedEditions: { + serializedName: "supportedEditions", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobCredential" + className: "EditionCapability" } } } }, - nextLink: { - serializedName: "nextLink", + supportedElasticPoolEditions: { + serializedName: "supportedElasticPoolEditions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolEditionCapability" + } + } + } + }, + status: { + serializedName: "status", readOnly: true, + type: { + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] + } + }, + reason: { + serializedName: "reason", type: { name: "String" } @@ -1862,57 +3329,75 @@ export const JobCredentialListResult: coreClient.CompositeMapper = { } }; -export const JobExecutionListResult: coreClient.CompositeMapper = { +export const EditionCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobExecutionListResult", + className: "EditionCapability", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + supportedServiceLevelObjectives: { + serializedName: "supportedServiceLevelObjectives", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobExecution" + className: "ServiceObjectiveCapability" } } } }, - nextLink: { - serializedName: "nextLink", + zoneRedundant: { + serializedName: "zoneRedundant", readOnly: true, type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const JobExecutionTarget: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobExecutionTarget", - modelProperties: { - type: { - serializedName: "type", + }, + readScale: { + serializedName: "readScale", + type: { + name: "Composite", + className: "ReadScaleCapability" + } + }, + supportedStorageCapabilities: { + serializedName: "supportedStorageCapabilities", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageCapability" + } + } } }, - serverName: { - serializedName: "serverName", + zonePinning: { + serializedName: "zonePinning", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - databaseName: { - serializedName: "databaseName", + status: { + serializedName: "status", readOnly: true, + type: { + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] + } + }, + reason: { + serializedName: "reason", type: { name: "String" } @@ -1921,129 +3406,136 @@ export const JobExecutionTarget: coreClient.CompositeMapper = { } }; -export const JobListResult: coreClient.CompositeMapper = { +export const ServiceObjectiveCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobListResult", + className: "ServiceObjectiveCapability", modelProperties: { - value: { - serializedName: "value", + id: { + serializedName: "id", + readOnly: true, + type: { + name: "Uuid" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + supportedMaxSizes: { + serializedName: "supportedMaxSizes", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Job" + className: "MaxSizeRangeCapability" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + performanceLevel: { + serializedName: "performanceLevel", type: { - name: "String" + name: "Composite", + className: "PerformanceLevelCapability" } - } - } - } -}; - -export const JobSchedule: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobSchedule", - modelProperties: { - startTime: { - defaultValue: "0001-01-01T00:00:00+00:00", - serializedName: "startTime", + }, + sku: { + serializedName: "sku", type: { - name: "DateTime" + name: "Composite", + className: "Sku" } }, - endTime: { - defaultValue: "9999-12-31T11:59:59+00:00", - serializedName: "endTime", + supportedLicenseTypes: { + serializedName: "supportedLicenseTypes", + readOnly: true, type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LicenseTypeCapability" + } + } } }, - type: { - defaultValue: "Once", - serializedName: "type", + includedMaxSize: { + serializedName: "includedMaxSize", type: { - name: "Enum", - allowedValues: ["Once", "Recurring"] + name: "Composite", + className: "MaxSizeCapability" } }, - enabled: { - serializedName: "enabled", + zoneRedundant: { + serializedName: "zoneRedundant", + readOnly: true, type: { name: "Boolean" } }, - interval: { - serializedName: "interval", + supportedAutoPauseDelay: { + serializedName: "supportedAutoPauseDelay", + type: { + name: "Composite", + className: "AutoPauseDelayTimeRange" + } + }, + supportedMinCapacities: { + serializedName: "supportedMinCapacities", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MinCapacityCapability" + } + } + } + }, + computeModel: { + serializedName: "computeModel", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const JobStepListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobStepListResult", - modelProperties: { - value: { - serializedName: "value", + }, + supportedMaintenanceConfigurations: { + serializedName: "supportedMaintenanceConfigurations", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "JobStep" + className: "MaintenanceConfigurationCapability" } } } }, - nextLink: { - serializedName: "nextLink", + zonePinning: { + serializedName: "zonePinning", readOnly: true, type: { - name: "String" - } - } - } - } -}; - -export const JobStepAction: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobStepAction", - modelProperties: { - type: { - defaultValue: "TSql", - serializedName: "type", - type: { - name: "String" + name: "Boolean" } }, - source: { - defaultValue: "Inline", - serializedName: "source", + status: { + serializedName: "status", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - value: { - serializedName: "value", - required: true, + reason: { + serializedName: "reason", type: { name: "String" } @@ -2052,61 +3544,49 @@ export const JobStepAction: coreClient.CompositeMapper = { } }; -export const JobStepOutput: coreClient.CompositeMapper = { +export const MaxSizeRangeCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobStepOutput", + className: "MaxSizeRangeCapability", modelProperties: { - type: { - defaultValue: "SqlDatabase", - serializedName: "type", - type: { - name: "String" - } - }, - subscriptionId: { - serializedName: "subscriptionId", - type: { - name: "Uuid" - } - }, - resourceGroupName: { - serializedName: "resourceGroupName", + minValue: { + serializedName: "minValue", type: { - name: "String" + name: "Composite", + className: "MaxSizeCapability" } }, - serverName: { - serializedName: "serverName", - required: true, + maxValue: { + serializedName: "maxValue", type: { - name: "String" + name: "Composite", + className: "MaxSizeCapability" } }, - databaseName: { - serializedName: "databaseName", - required: true, + scaleSize: { + serializedName: "scaleSize", type: { - name: "String" + name: "Composite", + className: "MaxSizeCapability" } }, - schemaName: { - defaultValue: "dbo", - serializedName: "schemaName", + logSize: { + serializedName: "logSize", type: { - name: "String" + name: "Composite", + className: "LogSizeCapability" } }, - tableName: { - serializedName: "tableName", - required: true, + status: { + serializedName: "status", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - credential: { - serializedName: "credential", - required: true, + reason: { + serializedName: "reason", type: { name: "String" } @@ -2115,70 +3595,66 @@ export const JobStepOutput: coreClient.CompositeMapper = { } }; -export const JobStepExecutionOptions: coreClient.CompositeMapper = { +export const MaxSizeCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobStepExecutionOptions", + className: "MaxSizeCapability", modelProperties: { - timeoutSeconds: { - defaultValue: 43200, - serializedName: "timeoutSeconds", - type: { - name: "Number" - } - }, - retryAttempts: { - defaultValue: 10, - serializedName: "retryAttempts", + limit: { + serializedName: "limit", + readOnly: true, type: { name: "Number" } }, - initialRetryIntervalSeconds: { - defaultValue: 1, - serializedName: "initialRetryIntervalSeconds", + unit: { + serializedName: "unit", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - maximumRetryIntervalSeconds: { - defaultValue: 120, - serializedName: "maximumRetryIntervalSeconds", + } + } + } +}; + +export const LogSizeCapability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogSizeCapability", + modelProperties: { + limit: { + serializedName: "limit", + readOnly: true, type: { name: "Number" } }, - retryIntervalBackoffMultiplier: { - defaultValue: 2, - serializedName: "retryIntervalBackoffMultiplier", + unit: { + serializedName: "unit", + readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const JobTargetGroupListResult: coreClient.CompositeMapper = { +export const PerformanceLevelCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobTargetGroupListResult", + className: "PerformanceLevelCapability", modelProperties: { value: { serializedName: "value", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobTargetGroup" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + unit: { + serializedName: "unit", readOnly: true, type: { name: "String" @@ -2188,81 +3664,109 @@ export const JobTargetGroupListResult: coreClient.CompositeMapper = { } }; -export const JobTarget: coreClient.CompositeMapper = { +export const LicenseTypeCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobTarget", + className: "LicenseTypeCapability", modelProperties: { - membershipType: { - defaultValue: "Include", - serializedName: "membershipType", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, type: { name: "Enum", - allowedValues: ["Include", "Exclude"] + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - type: { - serializedName: "type", - required: true, + reason: { + serializedName: "reason", type: { name: "String" } + } + } + } +}; + +export const AutoPauseDelayTimeRange: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AutoPauseDelayTimeRange", + modelProperties: { + minValue: { + serializedName: "minValue", + readOnly: true, + type: { + name: "Number" + } }, - serverName: { - serializedName: "serverName", + maxValue: { + serializedName: "maxValue", + readOnly: true, type: { - name: "String" + name: "Number" } }, - databaseName: { - serializedName: "databaseName", + stepSize: { + serializedName: "stepSize", + readOnly: true, type: { - name: "String" + name: "Number" } }, - elasticPoolName: { - serializedName: "elasticPoolName", + default: { + serializedName: "default", + readOnly: true, type: { - name: "String" + name: "Number" } }, - shardMapName: { - serializedName: "shardMapName", + unit: { + serializedName: "unit", + readOnly: true, type: { name: "String" } }, - refreshCredential: { - serializedName: "refreshCredential", + doNotPauseValue: { + serializedName: "doNotPauseValue", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const JobVersionListResult: coreClient.CompositeMapper = { +export const MinCapacityCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobVersionListResult", + className: "MinCapacityCapability", modelProperties: { value: { serializedName: "value", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobVersion" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + status: { + serializedName: "status", readOnly: true, + type: { + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] + } + }, + reason: { + serializedName: "reason", type: { name: "String" } @@ -2271,10 +3775,10 @@ export const JobVersionListResult: coreClient.CompositeMapper = { } }; -export const LocationCapabilities: coreClient.CompositeMapper = { +export const MaintenanceConfigurationCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationCapabilities", + className: "MaintenanceConfigurationCapability", modelProperties: { name: { serializedName: "name", @@ -2283,30 +3787,11 @@ export const LocationCapabilities: coreClient.CompositeMapper = { name: "String" } }, - supportedServerVersions: { - serializedName: "supportedServerVersions", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerVersionCapability" - } - } - } - }, - supportedManagedInstanceVersions: { - serializedName: "supportedManagedInstanceVersions", + zoneRedundant: { + serializedName: "zoneRedundant", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedInstanceVersionCapability" - } - } + name: "Boolean" } }, status: { @@ -2327,42 +3812,46 @@ export const LocationCapabilities: coreClient.CompositeMapper = { } }; -export const ServerVersionCapability: coreClient.CompositeMapper = { +export const ReadScaleCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerVersionCapability", + className: "ReadScaleCapability", modelProperties: { - name: { - serializedName: "name", + maxNumberOfReplicas: { + serializedName: "maxNumberOfReplicas", readOnly: true, type: { - name: "String" + name: "Number" } }, - supportedEditions: { - serializedName: "supportedEditions", + status: { + serializedName: "status", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "EditionCapability" - } - } + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - supportedElasticPoolEditions: { - serializedName: "supportedElasticPoolEditions", + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const StorageCapability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "StorageCapability", + modelProperties: { + storageAccountType: { + serializedName: "storageAccountType", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ElasticPoolEditionCapability" - } - } + name: "String" } }, status: { @@ -2383,10 +3872,10 @@ export const ServerVersionCapability: coreClient.CompositeMapper = { } }; -export const EditionCapability: coreClient.CompositeMapper = { +export const ElasticPoolEditionCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "EditionCapability", + className: "ElasticPoolEditionCapability", modelProperties: { name: { serializedName: "name", @@ -2395,15 +3884,15 @@ export const EditionCapability: coreClient.CompositeMapper = { name: "String" } }, - supportedServiceLevelObjectives: { - serializedName: "supportedServiceLevelObjectives", + supportedElasticPoolPerformanceLevels: { + serializedName: "supportedElasticPoolPerformanceLevels", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServiceObjectiveCapability" + className: "ElasticPoolPerformanceLevelCapability" } } } @@ -2415,24 +3904,11 @@ export const EditionCapability: coreClient.CompositeMapper = { name: "Boolean" } }, - readScale: { - serializedName: "readScale", - type: { - name: "Composite", - className: "ReadScaleCapability" - } - }, - supportedStorageCapabilities: { - serializedName: "supportedStorageCapabilities", + zonePinning: { + serializedName: "zonePinning", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageCapability" - } - } + name: "Boolean" } }, status: { @@ -2453,38 +3929,11 @@ export const EditionCapability: coreClient.CompositeMapper = { } }; -export const ServiceObjectiveCapability: coreClient.CompositeMapper = { +export const ElasticPoolPerformanceLevelCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceObjectiveCapability", + className: "ElasticPoolPerformanceLevelCapability", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "Uuid" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - supportedMaxSizes: { - serializedName: "supportedMaxSizes", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaxSizeRangeCapability" - } - } - } - }, performanceLevel: { serializedName: "performanceLevel", type: { @@ -2512,109 +3961,77 @@ export const ServiceObjectiveCapability: coreClient.CompositeMapper = { } } }, - includedMaxSize: { - serializedName: "includedMaxSize", - type: { - name: "Composite", - className: "MaxSizeCapability" - } - }, - zoneRedundant: { - serializedName: "zoneRedundant", + maxDatabaseCount: { + serializedName: "maxDatabaseCount", readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - supportedAutoPauseDelay: { - serializedName: "supportedAutoPauseDelay", + includedMaxSize: { + serializedName: "includedMaxSize", type: { name: "Composite", - className: "AutoPauseDelayTimeRange" + className: "MaxSizeCapability" } }, - supportedMinCapacities: { - serializedName: "supportedMinCapacities", + supportedMaxSizes: { + serializedName: "supportedMaxSizes", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MinCapacityCapability" + className: "MaxSizeRangeCapability" } } } }, - computeModel: { - serializedName: "computeModel", + supportedPerDatabaseMaxSizes: { + serializedName: "supportedPerDatabaseMaxSizes", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaxSizeRangeCapability" + } + } } }, - supportedMaintenanceConfigurations: { - serializedName: "supportedMaintenanceConfigurations", + supportedPerDatabaseMaxPerformanceLevels: { + serializedName: "supportedPerDatabaseMaxPerformanceLevels", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MaintenanceConfigurationCapability" + className: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability" } } } }, - status: { - serializedName: "status", + zoneRedundant: { + serializedName: "zoneRedundant", readOnly: true, type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] - } - }, - reason: { - serializedName: "reason", - type: { - name: "String" - } - } - } - } -}; - -export const MaxSizeRangeCapability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MaxSizeRangeCapability", - modelProperties: { - minValue: { - serializedName: "minValue", - type: { - name: "Composite", - className: "MaxSizeCapability" - } - }, - maxValue: { - serializedName: "maxValue", - type: { - name: "Composite", - className: "MaxSizeCapability" - } - }, - scaleSize: { - serializedName: "scaleSize", - type: { - name: "Composite", - className: "MaxSizeCapability" + name: "Boolean" } }, - logSize: { - serializedName: "logSize", + supportedMaintenanceConfigurations: { + serializedName: "supportedMaintenanceConfigurations", + readOnly: true, type: { - name: "Composite", - className: "LogSizeCapability" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaintenanceConfigurationCapability" + } + } } }, status: { @@ -2635,10 +4052,10 @@ export const MaxSizeRangeCapability: coreClient.CompositeMapper = { } }; -export const MaxSizeCapability: coreClient.CompositeMapper = { +export const ElasticPoolPerDatabaseMaxPerformanceLevelCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaxSizeCapability", + className: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability", modelProperties: { limit: { serializedName: "limit", @@ -2653,15 +4070,42 @@ export const MaxSizeCapability: coreClient.CompositeMapper = { type: { name: "String" } + }, + supportedPerDatabaseMinPerformanceLevels: { + serializedName: "supportedPerDatabaseMinPerformanceLevels", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ElasticPoolPerDatabaseMinPerformanceLevelCapability" + } + } + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] + } + }, + reason: { + serializedName: "reason", + type: { + name: "String" + } } } } }; -export const LogSizeCapability: coreClient.CompositeMapper = { +export const ElasticPoolPerDatabaseMinPerformanceLevelCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogSizeCapability", + className: "ElasticPoolPerDatabaseMinPerformanceLevelCapability", modelProperties: { limit: { serializedName: "limit", @@ -2676,26 +4120,17 @@ export const LogSizeCapability: coreClient.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const PerformanceLevelCapability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PerformanceLevelCapability", - modelProperties: { - value: { - serializedName: "value", + }, + status: { + serializedName: "status", readOnly: true, type: { - name: "Number" + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - unit: { - serializedName: "unit", - readOnly: true, + reason: { + serializedName: "reason", type: { name: "String" } @@ -2704,10 +4139,10 @@ export const PerformanceLevelCapability: coreClient.CompositeMapper = { } }; -export const LicenseTypeCapability: coreClient.CompositeMapper = { +export const ManagedInstanceVersionCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LicenseTypeCapability", + className: "ManagedInstanceVersionCapability", modelProperties: { name: { serializedName: "name", @@ -2716,6 +4151,32 @@ export const LicenseTypeCapability: coreClient.CompositeMapper = { name: "String" } }, + supportedEditions: { + serializedName: "supportedEditions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceEditionCapability" + } + } + } + }, + supportedInstancePoolEditions: { + serializedName: "supportedInstancePoolEditions", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "InstancePoolEditionCapability" + } + } + } + }, status: { serializedName: "status", readOnly: true, @@ -2734,67 +4195,112 @@ export const LicenseTypeCapability: coreClient.CompositeMapper = { } }; -export const AutoPauseDelayTimeRange: coreClient.CompositeMapper = { +export const ManagedInstanceEditionCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutoPauseDelayTimeRange", + className: "ManagedInstanceEditionCapability", modelProperties: { - minValue: { - serializedName: "minValue", + name: { + serializedName: "name", readOnly: true, type: { - name: "Number" + name: "String" } }, - maxValue: { - serializedName: "maxValue", + supportedFamilies: { + serializedName: "supportedFamilies", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceFamilyCapability" + } + } } }, - stepSize: { - serializedName: "stepSize", + supportedStorageCapabilities: { + serializedName: "supportedStorageCapabilities", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StorageCapability" + } + } } }, - default: { - serializedName: "default", + zoneRedundant: { + serializedName: "zoneRedundant", readOnly: true, type: { - name: "Number" + name: "Boolean" } }, - unit: { - serializedName: "unit", + status: { + serializedName: "status", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - doNotPauseValue: { - serializedName: "doNotPauseValue", - readOnly: true, + reason: { + serializedName: "reason", type: { - name: "Number" + name: "String" } } } } }; -export const MinCapacityCapability: coreClient.CompositeMapper = { +export const ManagedInstanceFamilyCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MinCapacityCapability", + className: "ManagedInstanceFamilyCapability", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", readOnly: true, type: { - name: "Number" + name: "String" + } + }, + sku: { + serializedName: "sku", + readOnly: true, + type: { + name: "String" + } + }, + supportedLicenseTypes: { + serializedName: "supportedLicenseTypes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LicenseTypeCapability" + } + } + } + }, + supportedVcoresValues: { + serializedName: "supportedVcoresValues", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceVcoresCapability" + } + } } }, status: { @@ -2815,10 +4321,10 @@ export const MinCapacityCapability: coreClient.CompositeMapper = { } }; -export const MaintenanceConfigurationCapability: coreClient.CompositeMapper = { +export const ManagedInstanceVcoresCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaintenanceConfigurationCapability", + className: "ManagedInstanceVcoresCapability", modelProperties: { name: { serializedName: "name", @@ -2827,41 +4333,58 @@ export const MaintenanceConfigurationCapability: coreClient.CompositeMapper = { name: "String" } }, - zoneRedundant: { - serializedName: "zoneRedundant", + value: { + serializedName: "value", readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - status: { - serializedName: "status", + includedMaxSize: { + serializedName: "includedMaxSize", + type: { + name: "Composite", + className: "MaxSizeCapability" + } + }, + supportedStorageSizes: { + serializedName: "supportedStorageSizes", readOnly: true, type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaxSizeRangeCapability" + } + } } }, - reason: { - serializedName: "reason", + instancePoolSupported: { + serializedName: "instancePoolSupported", + readOnly: true, type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const ReadScaleCapability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ReadScaleCapability", - modelProperties: { - maxNumberOfReplicas: { - serializedName: "maxNumberOfReplicas", + }, + standaloneSupported: { + serializedName: "standaloneSupported", + readOnly: true, + type: { + name: "Boolean" + } + }, + supportedMaintenanceConfigurations: { + serializedName: "supportedMaintenanceConfigurations", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceMaintenanceConfigurationCapability" + } + } } }, status: { @@ -2882,13 +4405,13 @@ export const ReadScaleCapability: coreClient.CompositeMapper = { } }; -export const StorageCapability: coreClient.CompositeMapper = { +export const ManagedInstanceMaintenanceConfigurationCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageCapability", + className: "ManagedInstanceMaintenanceConfigurationCapability", modelProperties: { - storageAccountType: { - serializedName: "storageAccountType", + name: { + serializedName: "name", readOnly: true, type: { name: "String" @@ -2912,10 +4435,10 @@ export const StorageCapability: coreClient.CompositeMapper = { } }; -export const ElasticPoolEditionCapability: coreClient.CompositeMapper = { +export const InstancePoolEditionCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolEditionCapability", + className: "InstancePoolEditionCapability", modelProperties: { name: { serializedName: "name", @@ -2924,26 +4447,19 @@ export const ElasticPoolEditionCapability: coreClient.CompositeMapper = { name: "String" } }, - supportedElasticPoolPerformanceLevels: { - serializedName: "supportedElasticPoolPerformanceLevels", + supportedFamilies: { + serializedName: "supportedFamilies", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ElasticPoolPerformanceLevelCapability" + className: "InstancePoolFamilyCapability" } } } }, - zoneRedundant: { - serializedName: "zoneRedundant", - readOnly: true, - type: { - name: "Boolean" - } - }, status: { serializedName: "status", readOnly: true, @@ -2962,23 +4478,16 @@ export const ElasticPoolEditionCapability: coreClient.CompositeMapper = { } }; -export const ElasticPoolPerformanceLevelCapability: coreClient.CompositeMapper = { +export const InstancePoolFamilyCapability: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolPerformanceLevelCapability", + className: "InstancePoolFamilyCapability", modelProperties: { - performanceLevel: { - serializedName: "performanceLevel", - type: { - name: "Composite", - className: "PerformanceLevelCapability" - } - }, - sku: { - serializedName: "sku", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "Sku" + name: "String" } }, supportedLicenseTypes: { @@ -2994,77 +4503,61 @@ export const ElasticPoolPerformanceLevelCapability: coreClient.CompositeMapper = } } }, - maxDatabaseCount: { - serializedName: "maxDatabaseCount", - readOnly: true, - type: { - name: "Number" - } - }, - includedMaxSize: { - serializedName: "includedMaxSize", - type: { - name: "Composite", - className: "MaxSizeCapability" - } - }, - supportedMaxSizes: { - serializedName: "supportedMaxSizes", + supportedVcoresValues: { + serializedName: "supportedVcoresValues", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MaxSizeRangeCapability" + className: "InstancePoolVcoresCapability" } } } }, - supportedPerDatabaseMaxSizes: { - serializedName: "supportedPerDatabaseMaxSizes", + status: { + serializedName: "status", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaxSizeRangeCapability" - } - } + name: "Enum", + allowedValues: ["Visible", "Available", "Default", "Disabled"] } }, - supportedPerDatabaseMaxPerformanceLevels: { - serializedName: "supportedPerDatabaseMaxPerformanceLevels", + reason: { + serializedName: "reason", + type: { + name: "String" + } + } + } + } +}; + +export const InstancePoolVcoresCapability: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstancePoolVcoresCapability", + modelProperties: { + name: { + serializedName: "name", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability" - } - } + name: "String" } }, - zoneRedundant: { - serializedName: "zoneRedundant", + value: { + serializedName: "value", readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - supportedMaintenanceConfigurations: { - serializedName: "supportedMaintenanceConfigurations", - readOnly: true, + storageLimit: { + serializedName: "storageLimit", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaintenanceConfigurationCapability" - } - } + name: "Composite", + className: "MaxSizeCapability" } }, status: { @@ -3085,48 +4578,27 @@ export const ElasticPoolPerformanceLevelCapability: coreClient.CompositeMapper = } }; -export const ElasticPoolPerDatabaseMaxPerformanceLevelCapability: coreClient.CompositeMapper = { +export const LongTermRetentionBackupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolPerDatabaseMaxPerformanceLevelCapability", + className: "LongTermRetentionBackupListResult", modelProperties: { - limit: { - serializedName: "limit", - readOnly: true, - type: { - name: "Number" - } - }, - unit: { - serializedName: "unit", - readOnly: true, - type: { - name: "String" - } - }, - supportedPerDatabaseMinPerformanceLevels: { - serializedName: "supportedPerDatabaseMinPerformanceLevels", + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ElasticPoolPerDatabaseMinPerformanceLevelCapability" + className: "LongTermRetentionBackup" } } } }, - status: { - serializedName: "status", + nextLink: { + serializedName: "nextLink", readOnly: true, - type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] - } - }, - reason: { - serializedName: "reason", type: { name: "String" } @@ -3135,35 +4607,43 @@ export const ElasticPoolPerDatabaseMaxPerformanceLevelCapability: coreClient.Com } }; -export const ElasticPoolPerDatabaseMinPerformanceLevelCapability: coreClient.CompositeMapper = { +export const CopyLongTermRetentionBackupParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolPerDatabaseMinPerformanceLevelCapability", + className: "CopyLongTermRetentionBackupParameters", modelProperties: { - limit: { - serializedName: "limit", - readOnly: true, + targetSubscriptionId: { + serializedName: "properties.targetSubscriptionId", type: { - name: "Number" + name: "String" } }, - unit: { - serializedName: "unit", - readOnly: true, + targetResourceGroup: { + serializedName: "properties.targetResourceGroup", type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + targetServerResourceId: { + serializedName: "properties.targetServerResourceId", type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "String" } }, - reason: { - serializedName: "reason", + targetServerFullyQualifiedDomainName: { + serializedName: "properties.targetServerFullyQualifiedDomainName", + type: { + name: "String" + } + }, + targetDatabaseName: { + serializedName: "properties.targetDatabaseName", + type: { + name: "String" + } + }, + targetBackupStorageRedundancy: { + serializedName: "properties.targetBackupStorageRedundancy", type: { name: "String" } @@ -3172,54 +4652,98 @@ export const ElasticPoolPerDatabaseMinPerformanceLevelCapability: coreClient.Com } }; -export const ManagedInstanceVersionCapability: coreClient.CompositeMapper = { +export const UpdateLongTermRetentionBackupParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceVersionCapability", + className: "UpdateLongTermRetentionBackupParameters", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + requestedBackupStorageRedundancy: { + serializedName: "properties.requestedBackupStorageRedundancy", type: { name: "String" } + } + } + } +}; + +export const ManagedInstanceLongTermRetentionBackupListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceLongTermRetentionBackupListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstanceLongTermRetentionBackup" + } + } + } }, - supportedEditions: { - serializedName: "supportedEditions", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const LongTermRetentionPolicyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LongTermRetentionPolicyListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagedInstanceEditionCapability" + className: "LongTermRetentionPolicy" } } } }, - supportedInstancePoolEditions: { - serializedName: "supportedInstancePoolEditions", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstancePoolEditionCapability" - } - } + name: "String" + } + } + } + } +}; + +export const MaintenanceWindowTimeRange: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaintenanceWindowTimeRange", + modelProperties: { + dayOfWeek: { + serializedName: "dayOfWeek", + type: { + name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + startTime: { + serializedName: "startTime", type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "String" } }, - reason: { - serializedName: "reason", + duration: { + serializedName: "duration", type: { name: "String" } @@ -3228,61 +4752,56 @@ export const ManagedInstanceVersionCapability: coreClient.CompositeMapper = { } }; -export const ManagedInstanceEditionCapability: coreClient.CompositeMapper = { +export const ManagedBackupShortTermRetentionPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceEditionCapability", + className: "ManagedBackupShortTermRetentionPolicyListResult", modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - supportedFamilies: { - serializedName: "supportedFamilies", + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagedInstanceFamilyCapability" + className: "ManagedBackupShortTermRetentionPolicy" } } } }, - supportedStorageCapabilities: { - serializedName: "supportedStorageCapabilities", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedDatabaseAdvancedThreatProtectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedDatabaseAdvancedThreatProtectionListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "StorageCapability" + className: "ManagedDatabaseAdvancedThreatProtection" } } } }, - zoneRedundant: { - serializedName: "zoneRedundant", - readOnly: true, - type: { - name: "Boolean" - } - }, - status: { - serializedName: "status", + nextLink: { + serializedName: "nextLink", readOnly: true, - type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] - } - }, - reason: { - serializedName: "reason", type: { name: "String" } @@ -3291,61 +4810,56 @@ export const ManagedInstanceEditionCapability: coreClient.CompositeMapper = { } }; -export const ManagedInstanceFamilyCapability: coreClient.CompositeMapper = { +export const ManagedDatabaseMoveOperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceFamilyCapability", + className: "ManagedDatabaseMoveOperationListResult", modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - sku: { - serializedName: "sku", - readOnly: true, - type: { - name: "String" - } - }, - supportedLicenseTypes: { - serializedName: "supportedLicenseTypes", + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "LicenseTypeCapability" + className: "ManagedDatabaseMoveOperationResult" } } } }, - supportedVcoresValues: { - serializedName: "supportedVcoresValues", + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ManagedInstanceQueryStatistics: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceQueryStatistics", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagedInstanceVcoresCapability" + className: "QueryStatistics" } } } }, - status: { - serializedName: "status", + nextLink: { + serializedName: "nextLink", readOnly: true, - type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] - } - }, - reason: { - serializedName: "reason", type: { name: "String" } @@ -3354,124 +4868,101 @@ export const ManagedInstanceFamilyCapability: coreClient.CompositeMapper = { } }; -export const ManagedInstanceVcoresCapability: coreClient.CompositeMapper = { +export const QueryStatisticsProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceVcoresCapability", + className: "QueryStatisticsProperties", modelProperties: { - name: { - serializedName: "name", + databaseName: { + serializedName: "databaseName", readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Number" - } - }, - includedMaxSize: { - serializedName: "includedMaxSize", - type: { - name: "Composite", - className: "MaxSizeCapability" - } - }, - supportedStorageSizes: { - serializedName: "supportedStorageSizes", + queryId: { + serializedName: "queryId", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaxSizeRangeCapability" - } - } + name: "String" } }, - instancePoolSupported: { - serializedName: "instancePoolSupported", + startTime: { + serializedName: "startTime", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - standaloneSupported: { - serializedName: "standaloneSupported", + endTime: { + serializedName: "endTime", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - supportedMaintenanceConfigurations: { - serializedName: "supportedMaintenanceConfigurations", - readOnly: true, + intervals: { + serializedName: "intervals", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagedInstanceMaintenanceConfigurationCapability" + className: "QueryMetricInterval" } } } - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] - } - }, - reason: { - serializedName: "reason", - type: { - name: "String" - } } } } }; -export const ManagedInstanceMaintenanceConfigurationCapability: coreClient.CompositeMapper = { +export const QueryMetricInterval: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceMaintenanceConfigurationCapability", + className: "QueryMetricInterval", modelProperties: { - name: { - serializedName: "name", + intervalStartTime: { + serializedName: "intervalStartTime", readOnly: true, type: { name: "String" } }, - status: { - serializedName: "status", + intervalType: { + serializedName: "intervalType", readOnly: true, type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "String" } }, - reason: { - serializedName: "reason", + executionCount: { + serializedName: "executionCount", + readOnly: true, type: { - name: "String" + name: "Number" + } + }, + metrics: { + serializedName: "metrics", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueryMetricProperties" + } + } } } } } }; -export const InstancePoolEditionCapability: coreClient.CompositeMapper = { +export const QueryMetricProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InstancePoolEditionCapability", + className: "QueryMetricProperties", modelProperties: { name: { serializedName: "name", @@ -3480,185 +4971,125 @@ export const InstancePoolEditionCapability: coreClient.CompositeMapper = { name: "String" } }, - supportedFamilies: { - serializedName: "supportedFamilies", + displayName: { + serializedName: "displayName", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstancePoolFamilyCapability" - } - } + name: "String" } }, - status: { - serializedName: "status", + unit: { + serializedName: "unit", readOnly: true, type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "String" } }, - reason: { - serializedName: "reason", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const InstancePoolFamilyCapability: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "InstancePoolFamilyCapability", - modelProperties: { - name: { - serializedName: "name", + }, + min: { + serializedName: "min", readOnly: true, type: { - name: "String" + name: "Number" } }, - supportedLicenseTypes: { - serializedName: "supportedLicenseTypes", + max: { + serializedName: "max", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LicenseTypeCapability" - } - } + name: "Number" } }, - supportedVcoresValues: { - serializedName: "supportedVcoresValues", + avg: { + serializedName: "avg", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "InstancePoolVcoresCapability" - } - } + name: "Number" } }, - status: { - serializedName: "status", + sum: { + serializedName: "sum", readOnly: true, type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "Number" } }, - reason: { - serializedName: "reason", + stdev: { + serializedName: "stdev", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const InstancePoolVcoresCapability: coreClient.CompositeMapper = { +export const ManagedDatabaseRestoreDetailsBackupSetProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InstancePoolVcoresCapability", + className: "ManagedDatabaseRestoreDetailsBackupSetProperties", modelProperties: { - name: { - serializedName: "name", + status: { + serializedName: "status", readOnly: true, type: { name: "String" } }, - value: { - serializedName: "value", + firstStripeName: { + serializedName: "firstStripeName", readOnly: true, type: { - name: "Number" + name: "String" } }, - storageLimit: { - serializedName: "storageLimit", + numberOfStripes: { + serializedName: "numberOfStripes", + readOnly: true, type: { - name: "Composite", - className: "MaxSizeCapability" + name: "Number" } }, - status: { - serializedName: "status", + backupSizeMB: { + serializedName: "backupSizeMB", readOnly: true, type: { - name: "Enum", - allowedValues: ["Visible", "Available", "Default", "Disabled"] + name: "Number" } }, - reason: { - serializedName: "reason", - type: { - name: "String" - } - } - } - } -}; - -export const LongTermRetentionPolicyListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LongTermRetentionPolicyListResult", - modelProperties: { - value: { - serializedName: "value", + restoreStartedTimestampUtc: { + serializedName: "restoreStartedTimestampUtc", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LongTermRetentionPolicy" - } - } + name: "DateTime" } }, - nextLink: { - serializedName: "nextLink", + restoreFinishedTimestampUtc: { + serializedName: "restoreFinishedTimestampUtc", readOnly: true, type: { - name: "String" + name: "DateTime" } } } } }; -export const MaintenanceWindowTimeRange: coreClient.CompositeMapper = { +export const ManagedDatabaseRestoreDetailsUnrestorableFileProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaintenanceWindowTimeRange", + className: "ManagedDatabaseRestoreDetailsUnrestorableFileProperties", modelProperties: { - dayOfWeek: { - serializedName: "dayOfWeek", - type: { - name: "String" - } - }, - startTime: { - serializedName: "startTime", - type: { - name: "String" - } - }, - duration: { - serializedName: "duration", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } @@ -3667,10 +5098,10 @@ export const MaintenanceWindowTimeRange: coreClient.CompositeMapper = { } }; -export const ManagedBackupShortTermRetentionPolicyListResult: coreClient.CompositeMapper = { +export const ManagedDatabaseSecurityAlertPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedBackupShortTermRetentionPolicyListResult", + className: "ManagedDatabaseSecurityAlertPolicyListResult", modelProperties: { value: { serializedName: "value", @@ -3680,7 +5111,7 @@ export const ManagedBackupShortTermRetentionPolicyListResult: coreClient.Composi element: { type: { name: "Composite", - className: "ManagedBackupShortTermRetentionPolicy" + className: "ManagedDatabaseSecurityAlertPolicy" } } } @@ -3696,10 +5127,10 @@ export const ManagedBackupShortTermRetentionPolicyListResult: coreClient.Composi } }; -export const ManagedInstanceQueryStatistics: coreClient.CompositeMapper = { +export const SecurityEventCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceQueryStatistics", + className: "SecurityEventCollection", modelProperties: { value: { serializedName: "value", @@ -3709,7 +5140,7 @@ export const ManagedInstanceQueryStatistics: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "QueryStatistics" + className: "SecurityEvent" } } } @@ -3725,89 +5156,127 @@ export const ManagedInstanceQueryStatistics: coreClient.CompositeMapper = { } }; -export const QueryStatisticsProperties: coreClient.CompositeMapper = { +export const SecurityEventSqlInjectionAdditionalProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueryStatisticsProperties", + className: "SecurityEventSqlInjectionAdditionalProperties", modelProperties: { - databaseName: { - serializedName: "databaseName", + threatId: { + serializedName: "threatId", readOnly: true, type: { name: "String" } }, - queryId: { - serializedName: "queryId", + statement: { + serializedName: "statement", readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "startTime", + statementHighlightOffset: { + serializedName: "statementHighlightOffset", readOnly: true, type: { - name: "String" + name: "Number" } }, - endTime: { - serializedName: "endTime", + statementHighlightLength: { + serializedName: "statementHighlightLength", readOnly: true, type: { - name: "String" + name: "Number" } }, - intervals: { - serializedName: "intervals", + errorCode: { + serializedName: "errorCode", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QueryMetricInterval" - } - } + name: "Number" + } + }, + errorSeverity: { + serializedName: "errorSeverity", + readOnly: true, + type: { + name: "Number" + } + }, + errorMessage: { + serializedName: "errorMessage", + readOnly: true, + type: { + name: "String" } } } } }; -export const QueryMetricInterval: coreClient.CompositeMapper = { +export const SensitivityLabelListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueryMetricInterval", + className: "SensitivityLabelListResult", modelProperties: { - intervalStartTime: { - serializedName: "intervalStartTime", + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SensitivityLabel" + } + } } }, - intervalType: { - serializedName: "intervalType", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" } - }, - executionCount: { - serializedName: "executionCount", - readOnly: true, + } + } + } +}; + +export const SensitivityLabelUpdateList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SensitivityLabelUpdateList", + modelProperties: { + operations: { + serializedName: "operations", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SensitivityLabelUpdate" + } + } } - }, - metrics: { - serializedName: "metrics", + } + } + } +}; + +export const RecommendedSensitivityLabelUpdateList: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecommendedSensitivityLabelUpdateList", + modelProperties: { + operations: { + serializedName: "operations", type: { name: "Sequence", element: { type: { name: "Composite", - className: "QueryMetricProperties" + className: "RecommendedSensitivityLabelUpdate" } } } @@ -3816,72 +5285,29 @@ export const QueryMetricInterval: coreClient.CompositeMapper = { } }; -export const QueryMetricProperties: coreClient.CompositeMapper = { +export const ManagedTransparentDataEncryptionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueryMetricProperties", + className: "ManagedTransparentDataEncryptionListResult", modelProperties: { - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - readOnly: true, - type: { - name: "String" - } - }, - unit: { - serializedName: "unit", - readOnly: true, - type: { - name: "String" - } - }, value: { serializedName: "value", readOnly: true, type: { - name: "Number" - } - }, - min: { - serializedName: "min", - readOnly: true, - type: { - name: "Number" - } - }, - max: { - serializedName: "max", - readOnly: true, - type: { - name: "Number" - } - }, - avg: { - serializedName: "avg", - readOnly: true, - type: { - name: "Number" - } - }, - sum: { - serializedName: "sum", - readOnly: true, - type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedTransparentDataEncryption" + } + } } }, - stdev: { - serializedName: "stdev", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Number" + name: "String" } } } @@ -3993,12 +5419,31 @@ export const ManagedDatabaseUpdate: coreClient.CompositeMapper = { name: "String" } }, + crossSubscriptionSourceDatabaseId: { + serializedName: "properties.crossSubscriptionSourceDatabaseId", + type: { + name: "String" + } + }, restorableDroppedDatabaseId: { serializedName: "properties.restorableDroppedDatabaseId", type: { name: "String" } }, + crossSubscriptionRestorableDroppedDatabaseId: { + serializedName: + "properties.crossSubscriptionRestorableDroppedDatabaseId", + type: { + name: "String" + } + }, + storageContainerIdentity: { + serializedName: "properties.storageContainerIdentity", + type: { + name: "String" + } + }, storageContainerSasToken: { serializedName: "properties.storageContainerSasToken", type: { @@ -4035,48 +5480,31 @@ export const ManagedDatabaseUpdate: coreClient.CompositeMapper = { type: { name: "String" } - } - } - } -}; - -export const CompleteDatabaseRestoreDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CompleteDatabaseRestoreDefinition", - modelProperties: { - lastBackupName: { - serializedName: "lastBackupName", - required: true, + }, + crossSubscriptionTargetManagedInstanceId: { + serializedName: "properties.crossSubscriptionTargetManagedInstanceId", type: { name: "String" } + }, + isLedgerOn: { + serializedName: "properties.isLedgerOn", + type: { + name: "Boolean" + } } } } }; -export const ManagedDatabaseSecurityAlertPolicyListResult: coreClient.CompositeMapper = { +export const ManagedDatabaseMoveDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedDatabaseSecurityAlertPolicyListResult", + className: "ManagedDatabaseMoveDefinition", modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedDatabaseSecurityAlertPolicy" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + destinationManagedDatabaseId: { + serializedName: "destinationManagedDatabaseId", + required: true, type: { name: "String" } @@ -4085,27 +5513,14 @@ export const ManagedDatabaseSecurityAlertPolicyListResult: coreClient.CompositeM } }; -export const SecurityEventCollection: coreClient.CompositeMapper = { +export const CompleteDatabaseRestoreDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityEventCollection", + className: "CompleteDatabaseRestoreDefinition", modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SecurityEvent" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + lastBackupName: { + serializedName: "lastBackupName", + required: true, type: { name: "String" } @@ -4114,56 +5529,20 @@ export const SecurityEventCollection: coreClient.CompositeMapper = { } }; -export const SecurityEventSqlInjectionAdditionalProperties: coreClient.CompositeMapper = { +export const ManagedDatabaseStartMoveDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityEventSqlInjectionAdditionalProperties", + className: "ManagedDatabaseStartMoveDefinition", modelProperties: { - threatId: { - serializedName: "threatId", - readOnly: true, - type: { - name: "String" - } - }, - statement: { - serializedName: "statement", - readOnly: true, + destinationManagedDatabaseId: { + serializedName: "destinationManagedDatabaseId", + required: true, type: { name: "String" } }, - statementHighlightOffset: { - serializedName: "statementHighlightOffset", - readOnly: true, - type: { - name: "Number" - } - }, - statementHighlightLength: { - serializedName: "statementHighlightLength", - readOnly: true, - type: { - name: "Number" - } - }, - errorCode: { - serializedName: "errorCode", - readOnly: true, - type: { - name: "Number" - } - }, - errorSeverity: { - serializedName: "errorSeverity", - readOnly: true, - type: { - name: "Number" - } - }, - errorMessage: { - serializedName: "errorMessage", - readOnly: true, + operationMode: { + serializedName: "operationMode", type: { name: "String" } @@ -4172,10 +5551,10 @@ export const SecurityEventSqlInjectionAdditionalProperties: coreClient.Composite } }; -export const SensitivityLabelListResult: coreClient.CompositeMapper = { +export const ManagedInstanceAdministratorListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SensitivityLabelListResult", + className: "ManagedInstanceAdministratorListResult", modelProperties: { value: { serializedName: "value", @@ -4185,68 +5564,26 @@ export const SensitivityLabelListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SensitivityLabel" + className: "ManagedInstanceAdministrator" } } } }, nextLink: { serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const SensitivityLabelUpdateList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SensitivityLabelUpdateList", - modelProperties: { - operations: { - serializedName: "operations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SensitivityLabelUpdate" - } - } - } - } - } - } -}; - -export const RecommendedSensitivityLabelUpdateList: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecommendedSensitivityLabelUpdateList", - modelProperties: { - operations: { - serializedName: "operations", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecommendedSensitivityLabelUpdate" - } - } + readOnly: true, + type: { + name: "String" } } } } }; -export const ManagedTransparentDataEncryptionListResult: coreClient.CompositeMapper = { +export const ManagedInstanceAdvancedThreatProtectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedTransparentDataEncryptionListResult", + className: "ManagedInstanceAdvancedThreatProtectionListResult", modelProperties: { value: { serializedName: "value", @@ -4256,7 +5593,7 @@ export const ManagedTransparentDataEncryptionListResult: coreClient.CompositeMap element: { type: { name: "Composite", - className: "ManagedTransparentDataEncryption" + className: "ManagedInstanceAdvancedThreatProtection" } } } @@ -4272,10 +5609,10 @@ export const ManagedTransparentDataEncryptionListResult: coreClient.CompositeMap } }; -export const ManagedInstanceAdministratorListResult: coreClient.CompositeMapper = { +export const ManagedInstanceAzureADOnlyAuthListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceAdministratorListResult", + className: "ManagedInstanceAzureADOnlyAuthListResult", modelProperties: { value: { serializedName: "value", @@ -4285,7 +5622,7 @@ export const ManagedInstanceAdministratorListResult: coreClient.CompositeMapper element: { type: { name: "Composite", - className: "ManagedInstanceAdministrator" + className: "ManagedInstanceAzureADOnlyAuthentication" } } } @@ -4301,10 +5638,10 @@ export const ManagedInstanceAdministratorListResult: coreClient.CompositeMapper } }; -export const ManagedInstanceAzureADOnlyAuthListResult: coreClient.CompositeMapper = { +export const ManagedInstanceDtcListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceAzureADOnlyAuthListResult", + className: "ManagedInstanceDtcListResult", modelProperties: { value: { serializedName: "value", @@ -4314,7 +5651,7 @@ export const ManagedInstanceAzureADOnlyAuthListResult: coreClient.CompositeMappe element: { type: { name: "Composite", - className: "ManagedInstanceAzureADOnlyAuthentication" + className: "ManagedInstanceDtc" } } } @@ -4330,6 +5667,73 @@ export const ManagedInstanceAzureADOnlyAuthListResult: coreClient.CompositeMappe } }; +export const ManagedInstanceDtcSecuritySettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceDtcSecuritySettings", + modelProperties: { + transactionManagerCommunicationSettings: { + serializedName: "transactionManagerCommunicationSettings", + type: { + name: "Composite", + className: "ManagedInstanceDtcTransactionManagerCommunicationSettings" + } + }, + xaTransactionsEnabled: { + serializedName: "xaTransactionsEnabled", + type: { + name: "Boolean" + } + }, + snaLu6Point2TransactionsEnabled: { + serializedName: "snaLu6point2TransactionsEnabled", + type: { + name: "Boolean" + } + }, + xaTransactionsDefaultTimeout: { + serializedName: "xaTransactionsDefaultTimeout", + type: { + name: "Number" + } + }, + xaTransactionsMaximumTimeout: { + serializedName: "xaTransactionsMaximumTimeout", + type: { + name: "Number" + } + } + } + } +}; + +export const ManagedInstanceDtcTransactionManagerCommunicationSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceDtcTransactionManagerCommunicationSettings", + modelProperties: { + allowInboundEnabled: { + serializedName: "allowInboundEnabled", + type: { + name: "Boolean" + } + }, + allowOutboundEnabled: { + serializedName: "allowOutboundEnabled", + type: { + name: "Boolean" + } + }, + authentication: { + serializedName: "authentication", + type: { + name: "String" + } + } + } + } +}; + export const ManagedInstanceEncryptionProtectorListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4529,7 +5933,8 @@ export const ManagedInstanceOperationSteps: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "UpsertManagedServerOperationStep" + className: + "UpsertManagedServerOperationStepWithEstimatesAndDuration" } } } @@ -4538,11 +5943,29 @@ export const ManagedInstanceOperationSteps: coreClient.CompositeMapper = { } }; -export const UpsertManagedServerOperationStep: coreClient.CompositeMapper = { +export const UpsertManagedServerOperationStepWithEstimatesAndDuration: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpsertManagedServerOperationStep", + className: "UpsertManagedServerOperationStepWithEstimatesAndDuration", modelProperties: { + stepStartTime: { + serializedName: "stepStartTime", + type: { + name: "DateTime" + } + }, + stepEndTime: { + serializedName: "stepEndTime", + type: { + name: "DateTime" + } + }, + timeElapsed: { + serializedName: "timeElapsed", + type: { + name: "String" + } + }, order: { serializedName: "order", type: { @@ -4565,6 +5988,35 @@ export const UpsertManagedServerOperationStep: coreClient.CompositeMapper = { } }; +export const ManagedInstancePrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstancePrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedInstancePrivateEndpointConnection" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const ManagedInstancePrivateEndpointConnectionProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4640,35 +6092,6 @@ export const ManagedInstancePrivateLinkServiceConnectionStateProperty: coreClien } }; -export const ManagedInstancePrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstancePrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ManagedInstancePrivateEndpointConnection" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const ManagedInstancePrivateLinkListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4721,6 +6144,18 @@ export const ManagedInstancePrivateLinkProperties: coreClient.CompositeMapper = } } } + }, + requiredZoneNames: { + serializedName: "requiredZoneNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -4755,10 +6190,10 @@ export const ManagedInstanceVulnerabilityAssessmentListResult: coreClient.Compos } }; -export const ManagedServerSecurityAlertPolicyListResult: coreClient.CompositeMapper = { +export const ManagedInstanceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServerSecurityAlertPolicyListResult", + className: "ManagedInstanceListResult", modelProperties: { value: { serializedName: "value", @@ -4768,7 +6203,7 @@ export const ManagedServerSecurityAlertPolicyListResult: coreClient.CompositeMap element: { type: { name: "Composite", - className: "ManagedServerSecurityAlertPolicy" + className: "ManagedInstance" } } } @@ -4784,104 +6219,161 @@ export const ManagedServerSecurityAlertPolicyListResult: coreClient.CompositeMap } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const ResourceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "ResourceIdentity", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "Dictionary", + value: { type: { name: "Composite", className: "UserIdentity" } } } }, - nextLink: { - serializedName: "nextLink", + principalId: { + serializedName: "principalId", readOnly: true, + type: { + name: "Uuid" + } + }, + type: { + serializedName: "type", type: { name: "String" } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "Uuid" + } } } } }; -export const Operation: coreClient.CompositeMapper = { +export const UserIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "UserIdentity", modelProperties: { - name: { - serializedName: "name", + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "Uuid" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "Uuid" + } + } + } + } +}; + +export const ManagedInstancePecProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstancePecProperty", + modelProperties: { + id: { + serializedName: "id", readOnly: true, type: { name: "String" } }, - display: { - serializedName: "display", + properties: { + serializedName: "properties", type: { name: "Composite", - className: "OperationDisplay" + className: "ManagedInstancePrivateEndpointConnectionProperties" + } + } + } + } +}; + +export const ManagedInstanceExternalAdministrator: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceExternalAdministrator", + modelProperties: { + administratorType: { + serializedName: "administratorType", + type: { + name: "String" } }, - origin: { - serializedName: "origin", - readOnly: true, + principalType: { + serializedName: "principalType", + type: { + name: "String" + } + }, + login: { + serializedName: "login", + type: { + name: "String" + } + }, + sid: { + serializedName: "sid", + type: { + name: "Uuid" + } + }, + tenantId: { + serializedName: "tenantId", type: { - name: "String" + name: "Uuid" } }, - properties: { - serializedName: "properties", - readOnly: true, + azureADOnlyAuthentication: { + serializedName: "azureADOnlyAuthentication", type: { - name: "Dictionary", - value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } + name: "Boolean" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const ServicePrincipal: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "ServicePrincipal", modelProperties: { - provider: { - serializedName: "provider", + principalId: { + serializedName: "principalId", readOnly: true, type: { name: "String" } }, - resource: { - serializedName: "resource", + clientId: { + serializedName: "clientId", readOnly: true, type: { name: "String" } }, - operation: { - serializedName: "operation", + tenantId: { + serializedName: "tenantId", readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", - readOnly: true, + type: { + serializedName: "type", type: { name: "String" } @@ -4890,354 +6382,228 @@ export const OperationDisplay: coreClient.CompositeMapper = { } }; -export const OperationsHealthListResult: coreClient.CompositeMapper = { +export const ManagedInstanceUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationsHealthListResult", + className: "ManagedInstanceUpdate", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + sku: { + serializedName: "sku", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "OperationsHealth" - } - } + name: "Composite", + className: "Sku" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionProperties", - modelProperties: { - privateEndpoint: { - serializedName: "privateEndpoint", + identity: { + serializedName: "identity", type: { name: "Composite", - className: "PrivateEndpointProperty" + className: "ResourceIdentity" } }, - privateLinkServiceConnectionState: { - serializedName: "privateLinkServiceConnectionState", + tags: { + serializedName: "tags", type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty" + name: "Dictionary", + value: { type: { name: "String" } } } }, provisioningState: { - serializedName: "provisioningState", + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PrivateEndpointProperty: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointProperty", - modelProperties: { - id: { - serializedName: "id", + }, + managedInstanceCreateMode: { + serializedName: "properties.managedInstanceCreateMode", type: { name: "String" } - } - } - } -}; - -export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", - modelProperties: { - status: { - serializedName: "status", - required: true, + }, + fullyQualifiedDomainName: { + serializedName: "properties.fullyQualifiedDomainName", + readOnly: true, type: { name: "String" } }, - description: { - serializedName: "description", - required: true, + administratorLogin: { + serializedName: "properties.administratorLogin", type: { name: "String" } }, - actionsRequired: { - serializedName: "actionsRequired", - readOnly: true, + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", type: { name: "String" } - } - } - } -}; - -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnectionListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + subnetId: { + serializedName: "properties.subnetId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + state: { + serializedName: "properties.state", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + licenseType: { + serializedName: "properties.licenseType", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + vCores: { + serializedName: "properties.vCores", + type: { + name: "Number" + } + }, + storageSizeInGB: { + serializedName: "properties.storageSizeInGB", + type: { + name: "Number" + } + }, + collation: { + serializedName: "properties.collation", type: { name: "String" } - } - } - } -}; - -export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceProperties", - modelProperties: { - groupId: { - serializedName: "groupId", + }, + dnsZone: { + serializedName: "properties.dnsZone", readOnly: true, type: { name: "String" } }, - requiredMembers: { - serializedName: "requiredMembers", - readOnly: true, + dnsZonePartner: { + serializedName: "properties.dnsZonePartner", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - requiredZoneNames: { - serializedName: "requiredZoneNames", - readOnly: true, + publicDataEndpointEnabled: { + serializedName: "properties.publicDataEndpointEnabled", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Boolean" + } + }, + sourceManagedInstanceId: { + serializedName: "properties.sourceManagedInstanceId", + type: { + name: "String" + } + }, + restorePointInTime: { + serializedName: "properties.restorePointInTime", + type: { + name: "DateTime" + } + }, + proxyOverride: { + serializedName: "properties.proxyOverride", + type: { + name: "String" + } + }, + timezoneId: { + serializedName: "properties.timezoneId", + type: { + name: "String" } - } - } - } -}; - -export const RecoverableManagedDatabaseListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecoverableManagedDatabaseListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + instancePoolId: { + serializedName: "properties.instancePoolId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecoverableManagedDatabase" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + maintenanceConfigurationId: { + serializedName: "properties.maintenanceConfigurationId", type: { name: "String" } - } - } - } -}; - -export const RestorePointListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorePointListResult", - modelProperties: { - value: { - serializedName: "value", + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorePoint" + className: "ManagedInstancePecProperty" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", type: { name: "String" } - } - } - } -}; - -export const CreateDatabaseRestorePointDefinition: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CreateDatabaseRestorePointDefinition", - modelProperties: { - restorePointLabel: { - serializedName: "restorePointLabel", - required: true, + }, + currentBackupStorageRedundancy: { + serializedName: "properties.currentBackupStorageRedundancy", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const AutomaticTuningServerOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AutomaticTuningServerOptions", - modelProperties: { - desiredState: { - serializedName: "desiredState", + }, + requestedBackupStorageRedundancy: { + serializedName: "properties.requestedBackupStorageRedundancy", type: { - name: "Enum", - allowedValues: ["Off", "On", "Default"] + name: "String" } }, - actualState: { - serializedName: "actualState", - readOnly: true, + zoneRedundant: { + serializedName: "properties.zoneRedundant", type: { - name: "Enum", - allowedValues: ["Off", "On"] + name: "Boolean" } }, - reasonCode: { - serializedName: "reasonCode", - readOnly: true, + primaryUserAssignedIdentityId: { + serializedName: "properties.primaryUserAssignedIdentityId", type: { - name: "Number" + name: "String" } }, - reasonDesc: { - serializedName: "reasonDesc", - readOnly: true, + keyId: { + serializedName: "properties.keyId", type: { - name: "Enum", - allowedValues: ["Default", "Disabled", "AutoConfigured"] + name: "String" } - } - } - } -}; - -export const AdministratorListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AdministratorListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + administrators: { + serializedName: "properties.administrators", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerAzureADAdministrator" - } - } + name: "Composite", + className: "ManagedInstanceExternalAdministrator" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + servicePrincipal: { + serializedName: "properties.servicePrincipal", type: { - name: "String" + name: "Composite", + className: "ServicePrincipal" } } } } }; -export const AzureADOnlyAuthListResult: coreClient.CompositeMapper = { +export const OutboundEnvironmentEndpointCollection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AzureADOnlyAuthListResult", + className: "OutboundEnvironmentEndpointCollection", modelProperties: { value: { serializedName: "value", @@ -5247,7 +6613,7 @@ export const AzureADOnlyAuthListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerAzureADOnlyAuthentication" + className: "OutboundEnvironmentEndpoint" } } } @@ -5263,84 +6629,84 @@ export const AzureADOnlyAuthListResult: coreClient.CompositeMapper = { } }; -export const ServerDevOpsAuditSettingsListResult: coreClient.CompositeMapper = { +export const OutboundEnvironmentEndpoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerDevOpsAuditSettingsListResult", + className: "OutboundEnvironmentEndpoint", modelProperties: { - value: { - serializedName: "value", + category: { + serializedName: "category", + readOnly: true, + type: { + name: "String" + } + }, + endpoints: { + serializedName: "endpoints", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServerDevOpsAuditingSettings" + className: "EndpointDependency" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const ServerDnsAliasListResult: coreClient.CompositeMapper = { +export const EndpointDependency: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerDnsAliasListResult", + className: "EndpointDependency", modelProperties: { - value: { - serializedName: "value", + domainName: { + serializedName: "domainName", + readOnly: true, + type: { + name: "String" + } + }, + endpointDetails: { + serializedName: "endpointDetails", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServerDnsAlias" + className: "EndpointDetail" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const ServerDnsAliasAcquisition: coreClient.CompositeMapper = { +export const EndpointDetail: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerDnsAliasAcquisition", + className: "EndpointDetail", modelProperties: { - oldServerDnsAliasId: { - serializedName: "oldServerDnsAliasId", - required: true, + port: { + serializedName: "port", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const ServerKeyListResult: coreClient.CompositeMapper = { +export const TopQueriesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerKeyListResult", + className: "TopQueriesListResult", modelProperties: { value: { serializedName: "value", @@ -5350,7 +6716,7 @@ export const ServerKeyListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServerKey" + className: "TopQueries" } } } @@ -5366,113 +6732,73 @@ export const ServerKeyListResult: coreClient.CompositeMapper = { } }; -export const ServerOperationListResult: coreClient.CompositeMapper = { +export const TopQueries: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerOperationListResult", + className: "TopQueries", modelProperties: { - value: { - serializedName: "value", + numberOfQueries: { + serializedName: "numberOfQueries", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerOperation" - } - } + name: "Number" } }, - nextLink: { - serializedName: "nextLink", + aggregationFunction: { + serializedName: "aggregationFunction", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const LogicalServerSecurityAlertPolicyListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LogicalServerSecurityAlertPolicyListResult", - modelProperties: { - value: { - serializedName: "value", + }, + observationMetric: { + serializedName: "observationMetric", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerSecurityAlertPolicy" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + intervalType: { + serializedName: "intervalType", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ServerInfo: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerInfo", - modelProperties: { - serverId: { - serializedName: "serverId", - required: true, + }, + startTime: { + serializedName: "startTime", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ServerTrustGroupListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerTrustGroupListResult", - modelProperties: { - value: { - serializedName: "value", + }, + endTime: { + serializedName: "endTime", readOnly: true, + type: { + name: "String" + } + }, + queries: { + serializedName: "queries", type: { name: "Sequence", element: { type: { name: "Composite", - className: "ServerTrustGroup" + className: "QueryStatisticsProperties" } } } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } } } } }; -export const ServerVulnerabilityAssessmentListResult: coreClient.CompositeMapper = { +export const ManagedLedgerDigestUploadsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerVulnerabilityAssessmentListResult", + className: "ManagedLedgerDigestUploadsListResult", modelProperties: { value: { serializedName: "value", @@ -5482,7 +6808,7 @@ export const ServerVulnerabilityAssessmentListResult: coreClient.CompositeMapper element: { type: { name: "Composite", - className: "ServerVulnerabilityAssessment" + className: "ManagedLedgerDigestUploads" } } } @@ -5498,10 +6824,10 @@ export const ServerVulnerabilityAssessmentListResult: coreClient.CompositeMapper } }; -export const SubscriptionUsageListResult: coreClient.CompositeMapper = { +export const ManagedServerDnsAliasListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SubscriptionUsageListResult", + className: "ManagedServerDnsAliasListResult", modelProperties: { value: { serializedName: "value", @@ -5511,7 +6837,7 @@ export const SubscriptionUsageListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SubscriptionUsage" + className: "ManagedServerDnsAlias" } } } @@ -5527,43 +6853,30 @@ export const SubscriptionUsageListResult: coreClient.CompositeMapper = { } }; -export const SyncAgentListResult: coreClient.CompositeMapper = { +export const ManagedServerDnsAliasCreation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncAgentListResult", + className: "ManagedServerDnsAliasCreation", modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SyncAgent" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + createDnsRecord: { + defaultValue: true, + serializedName: "createDnsRecord", type: { - name: "String" + name: "Boolean" } } } } }; -export const SyncAgentKeyProperties: coreClient.CompositeMapper = { +export const ManagedServerDnsAliasAcquisition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncAgentKeyProperties", + className: "ManagedServerDnsAliasAcquisition", modelProperties: { - syncAgentKey: { - serializedName: "syncAgentKey", - readOnly: true, + oldManagedServerDnsAliasResourceId: { + serializedName: "oldManagedServerDnsAliasResourceId", + required: true, type: { name: "String" } @@ -5572,10 +6885,10 @@ export const SyncAgentKeyProperties: coreClient.CompositeMapper = { } }; -export const SyncAgentLinkedDatabaseListResult: coreClient.CompositeMapper = { +export const ManagedServerSecurityAlertPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncAgentLinkedDatabaseListResult", + className: "ManagedServerSecurityAlertPolicyListResult", modelProperties: { value: { serializedName: "value", @@ -5585,7 +6898,7 @@ export const SyncAgentLinkedDatabaseListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SyncAgentLinkedDatabase" + className: "ManagedServerSecurityAlertPolicy" } } } @@ -5601,10 +6914,10 @@ export const SyncAgentLinkedDatabaseListResult: coreClient.CompositeMapper = { } }; -export const SyncDatabaseIdListResult: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncDatabaseIdListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", @@ -5614,7 +6927,7 @@ export const SyncDatabaseIdListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SyncDatabaseIdProperties" + className: "Operation" } } } @@ -5630,42 +6943,74 @@ export const SyncDatabaseIdListResult: coreClient.CompositeMapper = { } }; -export const SyncDatabaseIdProperties: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncDatabaseIdProperties", + className: "Operation", modelProperties: { - id: { - serializedName: "id", + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + }, + origin: { + serializedName: "origin", readOnly: true, type: { name: "String" } + }, + properties: { + serializedName: "properties", + readOnly: true, + type: { + name: "Dictionary", + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } + } } } } }; -export const SyncFullSchemaPropertiesListResult: coreClient.CompositeMapper = { +export const OperationDisplay: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncFullSchemaPropertiesListResult", + className: "OperationDisplay", modelProperties: { - value: { - serializedName: "value", + provider: { + serializedName: "provider", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SyncFullSchemaProperties" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", + resource: { + serializedName: "resource", + readOnly: true, + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + readOnly: true, + type: { + name: "String" + } + }, + description: { + serializedName: "description", readOnly: true, type: { name: "String" @@ -5675,76 +7020,97 @@ export const SyncFullSchemaPropertiesListResult: coreClient.CompositeMapper = { } }; -export const SyncFullSchemaProperties: coreClient.CompositeMapper = { +export const OutboundFirewallRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncFullSchemaProperties", + className: "OutboundFirewallRuleListResult", modelProperties: { - tables: { - serializedName: "tables", + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SyncFullSchemaTable" + className: "OutboundFirewallRule" } } } }, - lastUpdateTime: { - serializedName: "lastUpdateTime", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "DateTime" + name: "String" } } } } }; -export const SyncFullSchemaTable: coreClient.CompositeMapper = { +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncFullSchemaTable", + className: "PrivateEndpointConnectionListResult", modelProperties: { - columns: { - serializedName: "columns", + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SyncFullSchemaTableColumn" + className: "PrivateEndpointConnection" } } } }, - errorId: { - serializedName: "errorId", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const PrivateEndpointConnectionProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionProperties", + modelProperties: { + privateEndpoint: { + serializedName: "privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } }, - hasError: { - serializedName: "hasError", + groupIds: { + serializedName: "groupIds", readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - name: { - serializedName: "name", - readOnly: true, + privateLinkServiceConnectionState: { + serializedName: "privateLinkServiceConnectionState", type: { - name: "String" + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" } }, - quotedName: { - serializedName: "quotedName", + provisioningState: { + serializedName: "provisioningState", readOnly: true, type: { name: "String" @@ -5754,55 +7120,42 @@ export const SyncFullSchemaTable: coreClient.CompositeMapper = { } }; -export const SyncFullSchemaTableColumn: coreClient.CompositeMapper = { +export const PrivateEndpointProperty: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncFullSchemaTableColumn", + className: "PrivateEndpointProperty", modelProperties: { - dataSize: { - serializedName: "dataSize", - readOnly: true, - type: { - name: "String" - } - }, - dataType: { - serializedName: "dataType", - readOnly: true, - type: { - name: "String" - } - }, - errorId: { - serializedName: "errorId", - readOnly: true, + id: { + serializedName: "id", type: { name: "String" } - }, - hasError: { - serializedName: "hasError", - readOnly: true, - type: { - name: "Boolean" - } - }, - isPrimaryKey: { - serializedName: "isPrimaryKey", - readOnly: true, + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + serializedName: "status", + required: true, type: { - name: "Boolean" + name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + description: { + serializedName: "description", + required: true, type: { name: "String" } }, - quotedName: { - serializedName: "quotedName", + actionsRequired: { + serializedName: "actionsRequired", readOnly: true, type: { name: "String" @@ -5812,10 +7165,10 @@ export const SyncFullSchemaTableColumn: coreClient.CompositeMapper = { } }; -export const SyncGroupLogListResult: coreClient.CompositeMapper = { +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupLogListResult", + className: "PrivateLinkResourceListResult", modelProperties: { value: { serializedName: "value", @@ -5825,7 +7178,7 @@ export const SyncGroupLogListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SyncGroupLogProperties" + className: "PrivateLinkResource" } } } @@ -5841,76 +7194,67 @@ export const SyncGroupLogListResult: coreClient.CompositeMapper = { } }; -export const SyncGroupLogProperties: coreClient.CompositeMapper = { +export const PrivateLinkResourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupLogProperties", + className: "PrivateLinkResourceProperties", modelProperties: { - timestamp: { - serializedName: "timestamp", - readOnly: true, - type: { - name: "DateTime" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - source: { - serializedName: "source", - readOnly: true, - type: { - name: "String" - } - }, - details: { - serializedName: "details", + groupId: { + serializedName: "groupId", readOnly: true, type: { name: "String" } }, - tracingId: { - serializedName: "tracingId", + requiredMembers: { + serializedName: "requiredMembers", readOnly: true, type: { - name: "Uuid" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - operationStatus: { - serializedName: "operationStatus", + requiredZoneNames: { + serializedName: "requiredZoneNames", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const SyncGroupSchema: coreClient.CompositeMapper = { +export const RecoverableDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupSchema", + className: "RecoverableDatabaseListResult", modelProperties: { - tables: { - serializedName: "tables", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SyncGroupSchemaTable" + className: "RecoverableDatabase" } } } }, - masterSyncMemberName: { - serializedName: "masterSyncMemberName", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -5919,25 +7263,27 @@ export const SyncGroupSchema: coreClient.CompositeMapper = { } }; -export const SyncGroupSchemaTable: coreClient.CompositeMapper = { +export const RecoverableManagedDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupSchemaTable", + className: "RecoverableManagedDatabaseListResult", modelProperties: { - columns: { - serializedName: "columns", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SyncGroupSchemaTableColumn" + className: "RecoverableManagedDatabase" } } } }, - quotedName: { - serializedName: "quotedName", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -5946,25 +7292,27 @@ export const SyncGroupSchemaTable: coreClient.CompositeMapper = { } }; -export const SyncGroupSchemaTableColumn: coreClient.CompositeMapper = { +export const ReplicationLinkListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupSchemaTableColumn", + className: "ReplicationLinkListResult", modelProperties: { - quotedName: { - serializedName: "quotedName", - type: { - name: "String" - } - }, - dataSize: { - serializedName: "dataSize", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ReplicationLink" + } + } } }, - dataType: { - serializedName: "dataType", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -5973,10 +7321,10 @@ export const SyncGroupSchemaTableColumn: coreClient.CompositeMapper = { } }; -export const SyncGroupListResult: coreClient.CompositeMapper = { +export const RestorableDroppedDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroupListResult", + className: "RestorableDroppedDatabaseListResult", modelProperties: { value: { serializedName: "value", @@ -5986,7 +7334,7 @@ export const SyncGroupListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SyncGroup" + className: "RestorableDroppedDatabase" } } } @@ -6002,10 +7350,10 @@ export const SyncGroupListResult: coreClient.CompositeMapper = { } }; -export const SyncMemberListResult: coreClient.CompositeMapper = { +export const RestorableDroppedManagedDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncMemberListResult", + className: "RestorableDroppedManagedDatabaseListResult", modelProperties: { value: { serializedName: "value", @@ -6015,7 +7363,7 @@ export const SyncMemberListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SyncMember" + className: "RestorableDroppedManagedDatabase" } } } @@ -6031,10 +7379,10 @@ export const SyncMemberListResult: coreClient.CompositeMapper = { } }; -export const TimeZoneListResult: coreClient.CompositeMapper = { +export const RestorePointListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TimeZoneListResult", + className: "RestorePointListResult", modelProperties: { value: { serializedName: "value", @@ -6044,7 +7392,7 @@ export const TimeZoneListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "TimeZone" + className: "RestorePoint" } } } @@ -6060,10 +7408,26 @@ export const TimeZoneListResult: coreClient.CompositeMapper = { } }; -export const VirtualClusterListResult: coreClient.CompositeMapper = { +export const CreateDatabaseRestorePointDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualClusterListResult", + className: "CreateDatabaseRestorePointDefinition", + modelProperties: { + restorePointLabel: { + serializedName: "restorePointLabel", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const LogicalServerAdvancedThreatProtectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalServerAdvancedThreatProtectionListResult", modelProperties: { value: { serializedName: "value", @@ -6073,7 +7437,7 @@ export const VirtualClusterListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualCluster" + className: "ServerAdvancedThreatProtection" } } } @@ -6089,45 +7453,66 @@ export const VirtualClusterListResult: coreClient.CompositeMapper = { } }; -export const VirtualClusterUpdate: coreClient.CompositeMapper = { +export const AutomaticTuningServerOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualClusterUpdate", + className: "AutomaticTuningServerOptions", modelProperties: { - tags: { - serializedName: "tags", + desiredState: { + serializedName: "desiredState", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Enum", + allowedValues: ["Off", "On", "Default"] } }, - subnetId: { - serializedName: "properties.subnetId", + actualState: { + serializedName: "actualState", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Off", "On"] } }, - family: { - serializedName: "properties.family", + reasonCode: { + serializedName: "reasonCode", + readOnly: true, type: { - name: "String" + name: "Number" } }, - childResources: { - serializedName: "properties.childResources", + reasonDesc: { + serializedName: "reasonDesc", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["Default", "Disabled", "AutoConfigured"] + } + } + } + } +}; + +export const AdministratorListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AdministratorListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ServerAzureADAdministrator" } } } }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -6136,10 +7521,10 @@ export const VirtualClusterUpdate: coreClient.CompositeMapper = { } }; -export const VirtualNetworkRuleListResult: coreClient.CompositeMapper = { +export const AzureADOnlyAuthListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworkRuleListResult", + className: "AzureADOnlyAuthListResult", modelProperties: { value: { serializedName: "value", @@ -6149,7 +7534,7 @@ export const VirtualNetworkRuleListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "VirtualNetworkRule" + className: "ServerAzureADOnlyAuthentication" } } } @@ -6165,10 +7550,39 @@ export const VirtualNetworkRuleListResult: coreClient.CompositeMapper = { } }; -export const WorkloadClassifierListResult: coreClient.CompositeMapper = { +export const ServerConfigurationOptionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadClassifierListResult", + className: "ServerConfigurationOptionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerConfigurationOption" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServerConnectionPolicyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerConnectionPolicyListResult", modelProperties: { value: { serializedName: "value", @@ -6178,7 +7592,7 @@ export const WorkloadClassifierListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "WorkloadClassifier" + className: "ServerConnectionPolicy" } } } @@ -6194,10 +7608,10 @@ export const WorkloadClassifierListResult: coreClient.CompositeMapper = { } }; -export const WorkloadGroupListResult: coreClient.CompositeMapper = { +export const ServerDevOpsAuditSettingsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadGroupListResult", + className: "ServerDevOpsAuditSettingsListResult", modelProperties: { value: { serializedName: "value", @@ -6207,7 +7621,7 @@ export const WorkloadGroupListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "WorkloadGroup" + className: "ServerDevOpsAuditingSettings" } } } @@ -6223,10 +7637,10 @@ export const WorkloadGroupListResult: coreClient.CompositeMapper = { } }; -export const LogicalDatabaseTransparentDataEncryptionListResult: coreClient.CompositeMapper = { +export const ServerDnsAliasListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogicalDatabaseTransparentDataEncryptionListResult", + className: "ServerDnsAliasListResult", modelProperties: { value: { serializedName: "value", @@ -6236,7 +7650,7 @@ export const LogicalDatabaseTransparentDataEncryptionListResult: coreClient.Comp element: { type: { name: "Composite", - className: "LogicalDatabaseTransparentDataEncryption" + className: "ServerDnsAlias" } } } @@ -6252,10 +7666,26 @@ export const LogicalDatabaseTransparentDataEncryptionListResult: coreClient.Comp } }; -export const BackupShortTermRetentionPolicyListResult: coreClient.CompositeMapper = { +export const ServerDnsAliasAcquisition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupShortTermRetentionPolicyListResult", + className: "ServerDnsAliasAcquisition", + modelProperties: { + oldServerDnsAliasId: { + serializedName: "oldServerDnsAliasId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServerKeyListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerKeyListResult", modelProperties: { value: { serializedName: "value", @@ -6265,7 +7695,7 @@ export const BackupShortTermRetentionPolicyListResult: coreClient.CompositeMappe element: { type: { name: "Composite", - className: "BackupShortTermRetentionPolicy" + className: "ServerKey" } } } @@ -6281,10 +7711,10 @@ export const BackupShortTermRetentionPolicyListResult: coreClient.CompositeMappe } }; -export const ImportExportExtensionsOperationListResult: coreClient.CompositeMapper = { +export const ServerOperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportExportExtensionsOperationListResult", + className: "ServerOperationListResult", modelProperties: { value: { serializedName: "value", @@ -6294,7 +7724,7 @@ export const ImportExportExtensionsOperationListResult: coreClient.CompositeMapp element: { type: { name: "Composite", - className: "ImportExportExtensionsOperationResult" + className: "ServerOperation" } } } @@ -6310,10 +7740,10 @@ export const ImportExportExtensionsOperationListResult: coreClient.CompositeMapp } }; -export const DatabaseOperationListResult: coreClient.CompositeMapper = { +export const LogicalServerSecurityAlertPolicyListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseOperationListResult", + className: "LogicalServerSecurityAlertPolicyListResult", modelProperties: { value: { serializedName: "value", @@ -6323,7 +7753,7 @@ export const DatabaseOperationListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DatabaseOperation" + className: "ServerSecurityAlertPolicy" } } } @@ -6339,10 +7769,10 @@ export const DatabaseOperationListResult: coreClient.CompositeMapper = { } }; -export const DatabaseUsageListResult: coreClient.CompositeMapper = { +export const ServerTrustCertificatesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseUsageListResult", + className: "ServerTrustCertificatesListResult", modelProperties: { value: { serializedName: "value", @@ -6352,7 +7782,7 @@ export const DatabaseUsageListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DatabaseUsage" + className: "ServerTrustCertificate" } } } @@ -6368,10 +7798,10 @@ export const DatabaseUsageListResult: coreClient.CompositeMapper = { } }; -export const LedgerDigestUploadsListResult: coreClient.CompositeMapper = { +export const ServerTrustGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LedgerDigestUploadsListResult", + className: "ServerTrustGroupListResult", modelProperties: { value: { serializedName: "value", @@ -6381,7 +7811,7 @@ export const LedgerDigestUploadsListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LedgerDigestUploads" + className: "ServerTrustGroup" } } } @@ -6397,10 +7827,26 @@ export const LedgerDigestUploadsListResult: coreClient.CompositeMapper = { } }; -export const OutboundFirewallRuleListResult: coreClient.CompositeMapper = { +export const ServerInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OutboundFirewallRuleListResult", + className: "ServerInfo", + modelProperties: { + serverId: { + serializedName: "serverId", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServerUsageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerUsageListResult", modelProperties: { value: { serializedName: "value", @@ -6410,7 +7856,7 @@ export const OutboundFirewallRuleListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "OutboundFirewallRule" + className: "ServerUsage" } } } @@ -6426,10 +7872,10 @@ export const OutboundFirewallRuleListResult: coreClient.CompositeMapper = { } }; -export const ReplicationLinkListResult: coreClient.CompositeMapper = { +export const ServerVulnerabilityAssessmentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicationLinkListResult", + className: "ServerVulnerabilityAssessmentListResult", modelProperties: { value: { serializedName: "value", @@ -6439,7 +7885,7 @@ export const ReplicationLinkListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ReplicationLink" + className: "ServerVulnerabilityAssessment" } } } @@ -6455,27 +7901,22 @@ export const ReplicationLinkListResult: coreClient.CompositeMapper = { } }; -export const ServerListResult: coreClient.CompositeMapper = { +export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerListResult", + className: "CheckNameAvailabilityRequest", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + name: { + serializedName: "name", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Server" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + type: { + defaultValue: "Microsoft.Sql/servers", + isConstant: true, + serializedName: "type", type: { name: "String" } @@ -6484,59 +7925,67 @@ export const ServerListResult: coreClient.CompositeMapper = { } }; -export const ResourceIdentity: coreClient.CompositeMapper = { +export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceIdentity", + className: "CheckNameAvailabilityResponse", modelProperties: { - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "UserIdentity" } } + name: "String" } }, - principalId: { - serializedName: "principalId", + available: { + serializedName: "available", readOnly: true, type: { - name: "Uuid" + name: "Boolean" } }, - type: { - serializedName: "type", + reason: { + serializedName: "reason", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["Invalid", "AlreadyExists"] } }, - tenantId: { - serializedName: "tenantId", + message: { + serializedName: "message", readOnly: true, type: { - name: "Uuid" + name: "String" } } } } }; -export const UserIdentity: coreClient.CompositeMapper = { +export const ServerListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserIdentity", + className: "ServerListResult", modelProperties: { - principalId: { - serializedName: "principalId", + value: { + serializedName: "value", readOnly: true, type: { - name: "Uuid" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Server" + } + } } }, - clientId: { - serializedName: "clientId", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Uuid" + name: "String" } } } @@ -6724,6 +8173,13 @@ export const ServerUpdate: coreClient.CompositeMapper = { type: { name: "String" } + }, + externalGovernanceStatus: { + serializedName: "properties.externalGovernanceStatus", + readOnly: true, + type: { + name: "String" + } } } } @@ -6810,48 +8266,26 @@ export const ImportNewDatabaseDefinition: coreClient.CompositeMapper = { } }; -export const NetworkIsolationSettings: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NetworkIsolationSettings", - modelProperties: { - storageAccountResourceId: { - serializedName: "storageAccountResourceId", - type: { - name: "String" - } - }, - sqlServerResourceId: { - serializedName: "sqlServerResourceId", - type: { - name: "String" - } - } - } - } -}; - -export const PrivateEndpointConnectionRequestStatus: coreClient.CompositeMapper = { +export const StartStopManagedInstanceScheduleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionRequestStatus", + className: "StartStopManagedInstanceScheduleListResult", modelProperties: { - privateLinkServiceId: { - serializedName: "privateLinkServiceId", - readOnly: true, - type: { - name: "String" - } - }, - privateEndpointConnectionName: { - serializedName: "privateEndpointConnectionName", + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "StartStopManagedInstanceSchedule" + } + } } }, - status: { - serializedName: "status", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" @@ -6861,60 +8295,35 @@ export const PrivateEndpointConnectionRequestStatus: coreClient.CompositeMapper } }; -export const CheckNameAvailabilityRequest: coreClient.CompositeMapper = { +export const ScheduleItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CheckNameAvailabilityRequest", + className: "ScheduleItem", modelProperties: { - name: { - serializedName: "name", + startDay: { + serializedName: "startDay", required: true, type: { name: "String" } }, - type: { - defaultValue: "Microsoft.Sql/servers", - isConstant: true, - serializedName: "type", - type: { - name: "String" - } - } - } - } -}; - -export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CheckNameAvailabilityResponse", - modelProperties: { - name: { - serializedName: "name", - readOnly: true, + startTime: { + serializedName: "startTime", + required: true, type: { name: "String" } }, - available: { - serializedName: "available", - readOnly: true, - type: { - name: "Boolean" - } - }, - reason: { - serializedName: "reason", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["Invalid", "AlreadyExists"] + stopDay: { + serializedName: "stopDay", + required: true, + type: { + name: "String" } }, - message: { - serializedName: "message", - readOnly: true, + stopTime: { + serializedName: "stopTime", + required: true, type: { name: "String" } @@ -6923,10 +8332,10 @@ export const CheckNameAvailabilityResponse: coreClient.CompositeMapper = { } }; -export const UsageListResult: coreClient.CompositeMapper = { +export const SubscriptionUsageListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UsageListResult", + className: "SubscriptionUsageListResult", modelProperties: { value: { serializedName: "value", @@ -6936,7 +8345,7 @@ export const UsageListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Usage" + className: "SubscriptionUsage" } } } @@ -6952,77 +8361,48 @@ export const UsageListResult: coreClient.CompositeMapper = { } }; -export const Usage: coreClient.CompositeMapper = { +export const SynapseLinkWorkspaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Usage", + className: "SynapseLinkWorkspaceListResult", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - type: { - name: "Composite", - className: "Name" - } - }, - type: { - serializedName: "type", + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SynapseLinkWorkspace" + } + } } }, - unit: { - serializedName: "unit", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { name: "String" } - }, - currentValue: { - serializedName: "currentValue", - readOnly: true, - type: { - name: "Number" - } - }, - limit: { - serializedName: "limit", - readOnly: true, - type: { - name: "Number" - } - }, - requestedLimit: { - serializedName: "requestedLimit", - readOnly: true, - type: { - name: "Number" - } } } } }; -export const Name: coreClient.CompositeMapper = { +export const SynapseLinkWorkspaceInfoProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Name", + className: "SynapseLinkWorkspaceInfoProperties", modelProperties: { - value: { - serializedName: "value", + workspaceId: { + serializedName: "workspaceId", type: { name: "String" } }, - localizedValue: { - serializedName: "localizedValue", + linkConnectionName: { + serializedName: "linkConnectionName", type: { name: "String" } @@ -7031,10 +8411,10 @@ export const Name: coreClient.CompositeMapper = { } }; -export const DatabaseListResult: coreClient.CompositeMapper = { +export const SyncAgentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseListResult", + className: "SyncAgentListResult", modelProperties: { value: { serializedName: "value", @@ -7044,7 +8424,7 @@ export const DatabaseListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "Database" + className: "SyncAgent" } } } @@ -7060,375 +8440,473 @@ export const DatabaseListResult: coreClient.CompositeMapper = { } }; -export const DatabaseIdentity: coreClient.CompositeMapper = { +export const SyncAgentKeyProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseIdentity", + className: "SyncAgentKeyProperties", modelProperties: { - type: { - serializedName: "type", + syncAgentKey: { + serializedName: "syncAgentKey", + readOnly: true, type: { name: "String" } - }, - tenantId: { - serializedName: "tenantId", + } + } + } +}; + +export const SyncAgentLinkedDatabaseListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncAgentLinkedDatabaseListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { - name: "Uuid" - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "DatabaseUserIdentity" } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncAgentLinkedDatabase" + } } } }, - delegatedResources: { - serializedName: "delegatedResources", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "Composite", className: "Delegation" } } + name: "String" } } } } }; -export const DatabaseUserIdentity: coreClient.CompositeMapper = { +export const SyncDatabaseIdListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseUserIdentity", + className: "SyncDatabaseIdListResult", modelProperties: { - principalId: { - serializedName: "principalId", + value: { + serializedName: "value", readOnly: true, type: { - name: "Uuid" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncDatabaseIdProperties" + } + } } }, - clientId: { - serializedName: "clientId", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Uuid" + name: "String" } } } } }; -export const Delegation: coreClient.CompositeMapper = { +export const SyncDatabaseIdProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Delegation", + className: "SyncDatabaseIdProperties", modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", + id: { + serializedName: "id", readOnly: true, type: { - name: "Uuid" + name: "String" } } } } }; -export const DatabaseUpdate: coreClient.CompositeMapper = { +export const SyncGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseUpdate", + className: "SyncGroupListResult", modelProperties: { - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - identity: { - serializedName: "identity", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "DatabaseIdentity" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroup" + } + } } }, - tags: { - serializedName: "tags", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } - }, - createMode: { - serializedName: "properties.createMode", + } + } + } +}; + +export const SyncGroupSchema: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncGroupSchema", + modelProperties: { + tables: { + serializedName: "tables", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroupSchemaTable" + } + } } }, - collation: { - serializedName: "properties.collation", + masterSyncMemberName: { + serializedName: "masterSyncMemberName", type: { name: "String" } - }, - maxSizeBytes: { - serializedName: "properties.maxSizeBytes", + } + } + } +}; + +export const SyncGroupSchemaTable: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncGroupSchemaTable", + modelProperties: { + columns: { + serializedName: "columns", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroupSchemaTableColumn" + } + } } }, - sampleName: { - serializedName: "properties.sampleName", + quotedName: { + serializedName: "quotedName", type: { name: "String" } - }, - elasticPoolId: { - serializedName: "properties.elasticPoolId", + } + } + } +}; + +export const SyncGroupSchemaTableColumn: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncGroupSchemaTableColumn", + modelProperties: { + quotedName: { + serializedName: "quotedName", type: { name: "String" } }, - sourceDatabaseId: { - serializedName: "properties.sourceDatabaseId", + dataSize: { + serializedName: "dataSize", type: { name: "String" } }, - status: { - serializedName: "properties.status", - readOnly: true, + dataType: { + serializedName: "dataType", type: { name: "String" } - }, - databaseId: { - serializedName: "properties.databaseId", + } + } + } +}; + +export const SyncFullSchemaPropertiesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncFullSchemaPropertiesListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { - name: "Uuid" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncFullSchemaProperties" + } + } } }, - creationDate: { - serializedName: "properties.creationDate", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "DateTime" + name: "String" } - }, - currentServiceObjectiveName: { - serializedName: "properties.currentServiceObjectiveName", + } + } + } +}; + +export const SyncFullSchemaProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncFullSchemaProperties", + modelProperties: { + tables: { + serializedName: "tables", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncFullSchemaTable" + } + } } }, - requestedServiceObjectiveName: { - serializedName: "properties.requestedServiceObjectiveName", + lastUpdateTime: { + serializedName: "lastUpdateTime", readOnly: true, type: { - name: "String" + name: "DateTime" } - }, - defaultSecondaryLocation: { - serializedName: "properties.defaultSecondaryLocation", + } + } + } +}; + +export const SyncFullSchemaTable: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncFullSchemaTable", + modelProperties: { + columns: { + serializedName: "columns", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncFullSchemaTableColumn" + } + } } }, - failoverGroupId: { - serializedName: "properties.failoverGroupId", + errorId: { + serializedName: "errorId", readOnly: true, type: { name: "String" } }, - restorePointInTime: { - serializedName: "properties.restorePointInTime", - type: { - name: "DateTime" - } - }, - sourceDatabaseDeletionDate: { - serializedName: "properties.sourceDatabaseDeletionDate", + hasError: { + serializedName: "hasError", + readOnly: true, type: { - name: "DateTime" + name: "Boolean" } }, - recoveryServicesRecoveryPointId: { - serializedName: "properties.recoveryServicesRecoveryPointId", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - longTermRetentionBackupResourceId: { - serializedName: "properties.longTermRetentionBackupResourceId", + quotedName: { + serializedName: "quotedName", + readOnly: true, type: { name: "String" } - }, - recoverableDatabaseId: { - serializedName: "properties.recoverableDatabaseId", + } + } + } +}; + +export const SyncFullSchemaTableColumn: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncFullSchemaTableColumn", + modelProperties: { + dataSize: { + serializedName: "dataSize", + readOnly: true, type: { name: "String" } }, - restorableDroppedDatabaseId: { - serializedName: "properties.restorableDroppedDatabaseId", + dataType: { + serializedName: "dataType", + readOnly: true, type: { name: "String" } }, - catalogCollation: { - serializedName: "properties.catalogCollation", + errorId: { + serializedName: "errorId", + readOnly: true, type: { name: "String" } }, - zoneRedundant: { - serializedName: "properties.zoneRedundant", + hasError: { + serializedName: "hasError", + readOnly: true, type: { name: "Boolean" } }, - licenseType: { - serializedName: "properties.licenseType", - type: { - name: "String" - } - }, - maxLogSizeBytes: { - serializedName: "properties.maxLogSizeBytes", + isPrimaryKey: { + serializedName: "isPrimaryKey", readOnly: true, type: { - name: "Number" + name: "Boolean" } }, - earliestRestoreDate: { - serializedName: "properties.earliestRestoreDate", + name: { + serializedName: "name", readOnly: true, - type: { - name: "DateTime" - } - }, - readScale: { - serializedName: "properties.readScale", type: { name: "String" } }, - highAvailabilityReplicaCount: { - serializedName: "properties.highAvailabilityReplicaCount", - type: { - name: "Number" - } - }, - secondaryType: { - serializedName: "properties.secondaryType", + quotedName: { + serializedName: "quotedName", + readOnly: true, type: { name: "String" } - }, - currentSku: { - serializedName: "properties.currentSku", - type: { - name: "Composite", - className: "Sku" - } - }, - autoPauseDelay: { - serializedName: "properties.autoPauseDelay", - type: { - name: "Number" - } - }, - currentBackupStorageRedundancy: { - serializedName: "properties.currentBackupStorageRedundancy", + } + } + } +}; + +export const SyncGroupLogListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncGroupLogListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncGroupLogProperties" + } + } } }, - requestedBackupStorageRedundancy: { - serializedName: "properties.requestedBackupStorageRedundancy", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - minCapacity: { - serializedName: "properties.minCapacity", - type: { - name: "Number" - } - }, - pausedDate: { - serializedName: "properties.pausedDate", + } + } + } +}; + +export const SyncGroupLogProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncGroupLogProperties", + modelProperties: { + timestamp: { + serializedName: "timestamp", readOnly: true, type: { name: "DateTime" } }, - resumedDate: { - serializedName: "properties.resumedDate", + type: { + serializedName: "type", readOnly: true, - type: { - name: "DateTime" - } - }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", type: { name: "String" } }, - isLedgerOn: { - serializedName: "properties.isLedgerOn", + source: { + serializedName: "source", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - isInfraEncryptionEnabled: { - serializedName: "properties.isInfraEncryptionEnabled", + details: { + serializedName: "details", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - federatedClientId: { - serializedName: "properties.federatedClientId", + tracingId: { + serializedName: "tracingId", + readOnly: true, type: { name: "Uuid" } }, - primaryDelegatedIdentityClientId: { - serializedName: "properties.primaryDelegatedIdentityClientId", + operationStatus: { + serializedName: "operationStatus", + readOnly: true, type: { - name: "Uuid" + name: "String" } } } } }; -export const ResourceMoveDefinition: coreClient.CompositeMapper = { +export const SyncMemberListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ResourceMoveDefinition", + className: "SyncMemberListResult", modelProperties: { - id: { - serializedName: "id", - required: true, + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SyncMember" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -7437,157 +8915,193 @@ export const ResourceMoveDefinition: coreClient.CompositeMapper = { } }; -export const ImportExistingDatabaseDefinition: coreClient.CompositeMapper = { +export const TimeZoneListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportExistingDatabaseDefinition", + className: "TimeZoneListResult", modelProperties: { - storageKeyType: { - serializedName: "storageKeyType", - required: true, + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "TimeZone" + } + } } }, - storageKey: { - serializedName: "storageKey", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - storageUri: { - serializedName: "storageUri", - required: true, + } + } + } +}; + +export const LogicalDatabaseTransparentDataEncryptionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalDatabaseTransparentDataEncryptionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogicalDatabaseTransparentDataEncryption" + } + } } }, - administratorLogin: { - serializedName: "administratorLogin", - required: true, + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - administratorLoginPassword: { - serializedName: "administratorLoginPassword", - required: true, + } + } + } +}; + +export const UsageListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UsageListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Usage" + } + } } }, - authenticationType: { - serializedName: "authenticationType", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } - }, - networkIsolation: { - serializedName: "networkIsolation", - type: { - name: "Composite", - className: "NetworkIsolationSettings" - } } } } }; -export const ExportDatabaseDefinition: coreClient.CompositeMapper = { +export const Usage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExportDatabaseDefinition", + className: "Usage", modelProperties: { - storageKeyType: { - serializedName: "storageKeyType", - required: true, + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - storageKey: { - serializedName: "storageKey", - required: true, + name: { + serializedName: "name", type: { - name: "String" + name: "Composite", + className: "Name" } }, - storageUri: { - serializedName: "storageUri", - required: true, + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - administratorLogin: { - serializedName: "administratorLogin", - required: true, + unit: { + serializedName: "unit", + readOnly: true, type: { name: "String" } }, - administratorLoginPassword: { - serializedName: "administratorLoginPassword", - required: true, + currentValue: { + serializedName: "currentValue", + readOnly: true, type: { - name: "String" + name: "Number" } }, - authenticationType: { - serializedName: "authenticationType", + limit: { + serializedName: "limit", + readOnly: true, type: { - name: "String" + name: "Number" } }, - networkIsolation: { - serializedName: "networkIsolation", + requestedLimit: { + serializedName: "requestedLimit", + readOnly: true, type: { - name: "Composite", - className: "NetworkIsolationSettings" + name: "Number" } } } } }; -export const CopyLongTermRetentionBackupParameters: coreClient.CompositeMapper = { +export const Name: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CopyLongTermRetentionBackupParameters", + className: "Name", modelProperties: { - targetSubscriptionId: { - serializedName: "properties.targetSubscriptionId", - type: { - name: "String" - } - }, - targetResourceGroup: { - serializedName: "properties.targetResourceGroup", - type: { - name: "String" - } - }, - targetServerResourceId: { - serializedName: "properties.targetServerResourceId", + value: { + serializedName: "value", type: { name: "String" } }, - targetServerFullyQualifiedDomainName: { - serializedName: "properties.targetServerFullyQualifiedDomainName", + localizedValue: { + serializedName: "localizedValue", type: { name: "String" } - }, - targetDatabaseName: { - serializedName: "properties.targetDatabaseName", + } + } + } +}; + +export const VirtualClusterListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualClusterListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualCluster" + } + } } }, - targetBackupStorageRedundancy: { - serializedName: "properties.targetBackupStorageRedundancy", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { name: "String" } @@ -7596,25 +9110,51 @@ export const CopyLongTermRetentionBackupParameters: coreClient.CompositeMapper = } }; -export const UpdateLongTermRetentionBackupParameters: coreClient.CompositeMapper = { +export const VirtualClusterUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpdateLongTermRetentionBackupParameters", + className: "VirtualClusterUpdate", modelProperties: { - requestedBackupStorageRedundancy: { - serializedName: "properties.requestedBackupStorageRedundancy", + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + subnetId: { + serializedName: "properties.subnetId", + readOnly: true, + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", type: { name: "String" } + }, + childResources: { + serializedName: "properties.childResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } }; -export const LongTermRetentionBackupListResult: coreClient.CompositeMapper = { +export const VirtualNetworkRuleListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LongTermRetentionBackupListResult", + className: "VirtualNetworkRuleListResult", modelProperties: { value: { serializedName: "value", @@ -7624,7 +9164,7 @@ export const LongTermRetentionBackupListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "LongTermRetentionBackup" + className: "VirtualNetworkRule" } } } @@ -7640,10 +9180,10 @@ export const LongTermRetentionBackupListResult: coreClient.CompositeMapper = { } }; -export const ManagedInstanceLongTermRetentionBackupListResult: coreClient.CompositeMapper = { +export const WorkloadClassifierListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceLongTermRetentionBackupListResult", + className: "WorkloadClassifierListResult", modelProperties: { value: { serializedName: "value", @@ -7653,7 +9193,7 @@ export const ManagedInstanceLongTermRetentionBackupListResult: coreClient.Compos element: { type: { name: "Composite", - className: "ManagedInstanceLongTermRetentionBackup" + className: "WorkloadClassifier" } } } @@ -7669,10 +9209,10 @@ export const ManagedInstanceLongTermRetentionBackupListResult: coreClient.Compos } }; -export const ManagedInstanceListResult: coreClient.CompositeMapper = { +export const WorkloadGroupListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceListResult", + className: "WorkloadGroupListResult", modelProperties: { value: { serializedName: "value", @@ -7682,7 +9222,7 @@ export const ManagedInstanceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ManagedInstance" + className: "WorkloadGroup" } } } @@ -7698,671 +9238,422 @@ export const ManagedInstanceListResult: coreClient.CompositeMapper = { } }; -export const ManagedInstancePecProperty: coreClient.CompositeMapper = { +export const SecurityEventsFilterParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstancePecProperty", + className: "SecurityEventsFilterParameters", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + eventTime: { + serializedName: "eventTime", type: { - name: "String" + name: "DateTime" } }, - properties: { - serializedName: "properties", + showServerRecords: { + serializedName: "showServerRecords", type: { - name: "Composite", - className: "ManagedInstancePrivateEndpointConnectionProperties" + name: "Boolean" } } } } }; -export const ManagedInstanceExternalAdministrator: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceExternalAdministrator", + className: "ProxyResource", modelProperties: { - administratorType: { - serializedName: "administratorType", - type: { - name: "String" - } - }, - principalType: { - serializedName: "principalType", - type: { - name: "String" - } - }, - login: { - serializedName: "login", - type: { - name: "String" - } - }, - sid: { - serializedName: "sid", - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "tenantId", - type: { - name: "Uuid" - } - }, - azureADOnlyAuthentication: { - serializedName: "azureADOnlyAuthentication", - type: { - name: "Boolean" - } - } + ...Resource.type.modelProperties } } }; -export const ServicePrincipal: coreClient.CompositeMapper = { +export const TrackedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServicePrincipal", + className: "TrackedResource", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + ...Resource.type.modelProperties, + location: { + serializedName: "location", + required: true, type: { name: "String" } }, - type: { - serializedName: "type", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const ManagedInstanceUpdate: coreClient.CompositeMapper = { +export const ProxyResourceWithWritableName: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceUpdate", - modelProperties: { - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ResourceIdentity" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, - type: { - name: "String" - } - }, - managedInstanceCreateMode: { - serializedName: "properties.managedInstanceCreateMode", - type: { - name: "String" - } - }, - fullyQualifiedDomainName: { - serializedName: "properties.fullyQualifiedDomainName", - readOnly: true, - 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: { - serializedName: "properties.state", - readOnly: true, - 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: { - serializedName: "properties.dnsZone", - readOnly: true, - type: { - name: "String" - } - }, - dnsZonePartner: { - serializedName: "properties.dnsZonePartner", - type: { - name: "String" - } - }, - publicDataEndpointEnabled: { - serializedName: "properties.publicDataEndpointEnabled", - type: { - name: "Boolean" - } - }, - sourceManagedInstanceId: { - serializedName: "properties.sourceManagedInstanceId", - type: { - name: "String" - } - }, - restorePointInTime: { - serializedName: "properties.restorePointInTime", - type: { - name: "DateTime" - } - }, - proxyOverride: { - serializedName: "properties.proxyOverride", + className: "ProxyResourceWithWritableName", + modelProperties: { + ...ResourceWithWritableName.type.modelProperties + } + } +}; + +export const BackupShortTermRetentionPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupShortTermRetentionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + retentionDays: { + serializedName: "properties.retentionDays", type: { - name: "String" + name: "Number" } }, - timezoneId: { - serializedName: "properties.timezoneId", + diffBackupIntervalInHours: { + serializedName: "properties.diffBackupIntervalInHours", type: { - name: "String" + name: "Number" } - }, - instancePoolId: { - serializedName: "properties.instancePoolId", + } + } + } +}; + +export const ServerBlobAuditingPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerBlobAuditingPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + isDevopsAuditEnabled: { + serializedName: "properties.isDevopsAuditEnabled", type: { - name: "String" + name: "Boolean" } }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", + retentionDays: { + serializedName: "properties.retentionDays", type: { - name: "String" + name: "Number" } }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", - readOnly: true, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ManagedInstancePecProperty" + name: "String" } } } }, - minimalTlsVersion: { - serializedName: "properties.minimalTlsVersion", + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", type: { - name: "String" + name: "Boolean" } }, - currentBackupStorageRedundancy: { - serializedName: "properties.currentBackupStorageRedundancy", - readOnly: true, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", type: { - name: "String" + name: "Boolean" } }, - requestedBackupStorageRedundancy: { - serializedName: "properties.requestedBackupStorageRedundancy", + queueDelayMs: { + serializedName: "properties.queueDelayMs", type: { - name: "String" + name: "Number" } }, - zoneRedundant: { - serializedName: "properties.zoneRedundant", + isManagedIdentityInUse: { + serializedName: "properties.isManagedIdentityInUse", type: { name: "Boolean" } }, - primaryUserAssignedIdentityId: { - serializedName: "properties.primaryUserAssignedIdentityId", + state: { + serializedName: "properties.state", type: { - name: "String" + name: "Enum", + allowedValues: ["Enabled", "Disabled"] } }, - keyId: { - serializedName: "properties.keyId", + storageEndpoint: { + serializedName: "properties.storageEndpoint", type: { name: "String" } }, - administrators: { - serializedName: "properties.administrators", + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { - name: "Composite", - className: "ManagedInstanceExternalAdministrator" + name: "String" } }, - servicePrincipal: { - serializedName: "properties.servicePrincipal", + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", type: { - name: "Composite", - className: "ServicePrincipal" + name: "Uuid" } } } } }; -export const TopQueriesListResult: coreClient.CompositeMapper = { +export const DatabaseBlobAuditingPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TopQueriesListResult", + className: "DatabaseBlobAuditingPolicy", modelProperties: { - value: { - serializedName: "value", + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", readOnly: true, + type: { + name: "String" + } + }, + retentionDays: { + serializedName: "properties.retentionDays", + type: { + name: "Number" + } + }, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "TopQueries" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const TopQueries: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TopQueries", - modelProperties: { - numberOfQueries: { - serializedName: "numberOfQueries", - readOnly: true, + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", type: { - name: "Number" + name: "Boolean" } }, - aggregationFunction: { - serializedName: "aggregationFunction", - readOnly: true, + queueDelayMs: { + serializedName: "properties.queueDelayMs", type: { - name: "String" + name: "Number" } }, - observationMetric: { - serializedName: "observationMetric", - readOnly: true, + isManagedIdentityInUse: { + serializedName: "properties.isManagedIdentityInUse", type: { - name: "String" + name: "Boolean" } }, - intervalType: { - serializedName: "intervalType", - readOnly: true, + state: { + serializedName: "properties.state", type: { - name: "String" + name: "Enum", + allowedValues: ["Enabled", "Disabled"] } }, - startTime: { - serializedName: "startTime", - readOnly: true, + storageEndpoint: { + serializedName: "properties.storageEndpoint", type: { name: "String" } }, - endTime: { - serializedName: "endTime", - readOnly: true, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { name: "String" } }, - queries: { - serializedName: "queries", + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QueryStatisticsProperties" - } - } + name: "Uuid" } } } } }; -export const RestorableDroppedDatabaseListResult: coreClient.CompositeMapper = { +export const ExtendedDatabaseBlobAuditingPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableDroppedDatabaseListResult", + className: "ExtendedDatabaseBlobAuditingPolicy", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + ...ProxyResource.type.modelProperties, + predicateExpression: { + serializedName: "properties.predicateExpression", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableDroppedDatabase" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + retentionDays: { + serializedName: "properties.retentionDays", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const RestorableDroppedManagedDatabaseListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableDroppedManagedDatabaseListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "RestorableDroppedManagedDatabase" + name: "String" } } } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const ServerConnectionPolicyListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServerConnectionPolicyListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerConnectionPolicy" - } - } + name: "Boolean" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + queueDelayMs: { + serializedName: "properties.queueDelayMs", type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const SloUsageMetric: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SloUsageMetric", - modelProperties: { - serviceLevelObjective: { - serializedName: "serviceLevelObjective", - readOnly: true, + }, + isManagedIdentityInUse: { + serializedName: "properties.isManagedIdentityInUse", + type: { + name: "Boolean" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled"] + } + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", type: { name: "String" } }, - serviceLevelObjectiveId: { - serializedName: "serviceLevelObjectiveId", - readOnly: true, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { - name: "Uuid" + name: "String" } }, - inRangeTimeRatio: { - serializedName: "inRangeTimeRatio", - readOnly: true, + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", type: { - name: "Number" + name: "Uuid" } } } } }; -export const OperationImpact: coreClient.CompositeMapper = { +export const ExtendedServerBlobAuditingPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationImpact", + className: "ExtendedServerBlobAuditingPolicy", modelProperties: { - name: { - serializedName: "name", - readOnly: true, + ...ProxyResource.type.modelProperties, + isDevopsAuditEnabled: { + serializedName: "properties.isDevopsAuditEnabled", type: { - name: "String" + name: "Boolean" } }, - unit: { - serializedName: "unit", - readOnly: true, + predicateExpression: { + serializedName: "properties.predicateExpression", type: { name: "String" } }, - changeValueAbsolute: { - serializedName: "changeValueAbsolute", - readOnly: true, + retentionDays: { + serializedName: "properties.retentionDays", type: { name: "Number" } }, - changeValueRelative: { - serializedName: "changeValueRelative", - readOnly: true, + auditActionsAndGroups: { + serializedName: "properties.auditActionsAndGroups", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } - } - } - } -}; - -export const SecurityEventsFilterParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SecurityEventsFilterParameters", - modelProperties: { - eventTime: { - serializedName: "eventTime", + }, + isStorageSecondaryKeyInUse: { + serializedName: "properties.isStorageSecondaryKeyInUse", type: { - name: "DateTime" + name: "Boolean" } }, - showServerRecords: { - serializedName: "showServerRecords", + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", type: { name: "Boolean" } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - location: { - serializedName: "location", - required: true, + }, + queueDelayMs: { + serializedName: "properties.queueDelayMs", type: { - name: "String" + name: "Number" } }, - tags: { - serializedName: "tags", + isManagedIdentityInUse: { + serializedName: "properties.isManagedIdentityInUse", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Boolean" } - } - } - } -}; - -export const ProxyResourceWithWritableName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResourceWithWritableName", - modelProperties: { - ...ResourceWithWritableName.type.modelProperties - } - } -}; - -export const RecoverableDatabase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RecoverableDatabase", - modelProperties: { - ...ProxyResource.type.modelProperties, - edition: { - serializedName: "properties.edition", - readOnly: true, + }, + state: { + serializedName: "properties.state", type: { - name: "String" + name: "Enum", + allowedValues: ["Enabled", "Disabled"] } }, - serviceLevelObjective: { - serializedName: "properties.serviceLevelObjective", - readOnly: true, + storageEndpoint: { + serializedName: "properties.storageEndpoint", type: { name: "String" } }, - elasticPoolName: { - serializedName: "properties.elasticPoolName", - readOnly: true, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { name: "String" } }, - lastAvailableBackupDate: { - serializedName: "properties.lastAvailableBackupDate", - readOnly: true, + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", type: { - name: "DateTime" + name: "Uuid" } } } @@ -8393,7 +9684,7 @@ export const DataMaskingPolicy: coreClient.CompositeMapper = { serializedName: "properties.dataMaskingState", type: { name: "Enum", - allowedValues: ["Disabled", "Enabled"] + allowedValues: ["Enabled", "Disabled"] } }, exemptPrincipals: { @@ -8447,17 +9738,11 @@ export const DataMaskingRule: coreClient.CompositeMapper = { name: "String" } }, - aliasName: { - serializedName: "properties.aliasName", - type: { - name: "String" - } - }, ruleState: { serializedName: "properties.ruleState", type: { name: "Enum", - allowedValues: ["Disabled", "Enabled"] + allowedValues: ["Enabled", "Disabled"] } }, schemaName: { @@ -8478,6 +9763,12 @@ export const DataMaskingRule: coreClient.CompositeMapper = { name: "String" } }, + aliasName: { + serializedName: "properties.aliasName", + type: { + name: "String" + } + }, maskingFunction: { serializedName: "properties.maskingFunction", type: { @@ -8519,582 +9810,730 @@ export const DataMaskingRule: coreClient.CompositeMapper = { } }; -export const GeoBackupPolicy: coreClient.CompositeMapper = { +export const DataWarehouseUserActivities: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GeoBackupPolicy", + className: "DataWarehouseUserActivities", modelProperties: { ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", + activeQueriesCount: { + serializedName: "properties.activeQueriesCount", readOnly: true, type: { - name: "String" + name: "Number" } - }, - location: { - serializedName: "location", - readOnly: true, + } + } + } +}; + +export const DatabaseAdvancedThreatProtection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAdvancedThreatProtection", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, state: { serializedName: "properties.state", - required: true, type: { name: "Enum", - allowedValues: ["Disabled", "Enabled"] + allowedValues: ["New", "Enabled", "Disabled"] } }, - storageType: { - serializedName: "properties.storageType", + creationTime: { + serializedName: "properties.creationTime", readOnly: true, type: { - name: "String" + name: "DateTime" } } } } }; -export const ServerCommunicationLink: coreClient.CompositeMapper = { +export const RecommendedAction: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerCommunicationLink", + className: "RecommendedAction", modelProperties: { ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", + readOnly: true, + type: { + name: "String" + } + }, location: { serializedName: "location", readOnly: true, type: { - name: "String" + name: "String" + } + }, + recommendationReason: { + serializedName: "properties.recommendationReason", + readOnly: true, + type: { + name: "String" + } + }, + validSince: { + serializedName: "properties.validSince", + readOnly: true, + type: { + name: "DateTime" } }, - kind: { - serializedName: "kind", + lastRefresh: { + serializedName: "properties.lastRefresh", readOnly: true, type: { - name: "String" + name: "DateTime" } }, state: { serializedName: "properties.state", - readOnly: true, type: { - name: "String" + name: "Composite", + className: "RecommendedActionStateInfo" } }, - partnerServer: { - serializedName: "properties.partnerServer", - type: { - name: "String" - } - } - } - } -}; - -export const ServiceObjective: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceObjective", - modelProperties: { - ...ProxyResource.type.modelProperties, - serviceObjectiveName: { - serializedName: "properties.serviceObjectiveName", + isExecutableAction: { + serializedName: "properties.isExecutableAction", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - isDefault: { - serializedName: "properties.isDefault", + isRevertableAction: { + serializedName: "properties.isRevertableAction", readOnly: true, type: { name: "Boolean" } }, - isSystem: { - serializedName: "properties.isSystem", + isArchivedAction: { + serializedName: "properties.isArchivedAction", readOnly: true, type: { name: "Boolean" } }, - description: { - serializedName: "properties.description", + executeActionStartTime: { + serializedName: "properties.executeActionStartTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - enabled: { - serializedName: "properties.enabled", + executeActionDuration: { + serializedName: "properties.executeActionDuration", readOnly: true, type: { - name: "Boolean" - } - } - } - } -}; - -export const ElasticPoolActivity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ElasticPoolActivity", - modelProperties: { - ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - type: { - name: "String" + name: "TimeSpan" } }, - endTime: { - serializedName: "properties.endTime", + revertActionStartTime: { + serializedName: "properties.revertActionStartTime", readOnly: true, type: { name: "DateTime" } }, - errorCode: { - serializedName: "properties.errorCode", + revertActionDuration: { + serializedName: "properties.revertActionDuration", readOnly: true, type: { - name: "Number" + name: "TimeSpan" } }, - errorMessage: { - serializedName: "properties.errorMessage", + executeActionInitiatedBy: { + serializedName: "properties.executeActionInitiatedBy", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["User", "System"] } }, - errorSeverity: { - serializedName: "properties.errorSeverity", + executeActionInitiatedTime: { + serializedName: "properties.executeActionInitiatedTime", readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - operation: { - serializedName: "properties.operation", + revertActionInitiatedBy: { + serializedName: "properties.revertActionInitiatedBy", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: ["User", "System"] } }, - operationId: { - serializedName: "properties.operationId", + revertActionInitiatedTime: { + serializedName: "properties.revertActionInitiatedTime", readOnly: true, type: { - name: "Uuid" + name: "DateTime" } }, - percentComplete: { - serializedName: "properties.percentComplete", + score: { + serializedName: "properties.score", readOnly: true, type: { name: "Number" } }, - requestedDatabaseDtuMax: { - serializedName: "properties.requestedDatabaseDtuMax", - readOnly: true, + implementationDetails: { + serializedName: "properties.implementationDetails", type: { - name: "Number" + name: "Composite", + className: "RecommendedActionImplementationInfo" + } + }, + errorDetails: { + serializedName: "properties.errorDetails", + type: { + name: "Composite", + className: "RecommendedActionErrorInfo" } }, - requestedDatabaseDtuMin: { - serializedName: "properties.requestedDatabaseDtuMin", + estimatedImpact: { + serializedName: "properties.estimatedImpact", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedActionImpactRecord" + } + } } }, - requestedDtu: { - serializedName: "properties.requestedDtu", + observedImpact: { + serializedName: "properties.observedImpact", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedActionImpactRecord" + } + } } }, - requestedElasticPoolName: { - serializedName: "properties.requestedElasticPoolName", + timeSeries: { + serializedName: "properties.timeSeries", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedActionMetricInfo" + } + } } }, - requestedStorageLimitInGB: { - serializedName: "properties.requestedStorageLimitInGB", + linkedObjects: { + serializedName: "properties.linkedObjects", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - elasticPoolName: { - serializedName: "properties.elasticPoolName", + details: { + serializedName: "properties.details", + readOnly: true, + type: { + name: "Dictionary", + value: { + type: { name: "Dictionary", value: { type: { name: "any" } } } + } + } + } + } + } +}; + +export const Advisor: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Advisor", + modelProperties: { + ...ProxyResource.type.modelProperties, + kind: { + serializedName: "kind", readOnly: true, type: { name: "String" } }, - serverName: { - serializedName: "properties.serverName", + location: { + serializedName: "location", readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "properties.startTime", + advisorStatus: { + serializedName: "properties.advisorStatus", readOnly: true, type: { - name: "DateTime" + name: "Enum", + allowedValues: [ + "GA", + "PublicPreview", + "LimitedPublicPreview", + "PrivatePreview" + ] } }, - state: { - serializedName: "properties.state", + autoExecuteStatus: { + serializedName: "properties.autoExecuteStatus", + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled", "Default"] + } + }, + autoExecuteStatusInheritedFrom: { + serializedName: "properties.autoExecuteStatusInheritedFrom", readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Default", + "Subscription", + "Server", + "ElasticPool", + "Database" + ] } }, - requestedStorageLimitInMB: { - serializedName: "properties.requestedStorageLimitInMB", + recommendationsStatus: { + serializedName: "properties.recommendationsStatus", readOnly: true, type: { - name: "Number" + name: "String" } }, - requestedDatabaseDtuGuarantee: { - serializedName: "properties.requestedDatabaseDtuGuarantee", + lastChecked: { + serializedName: "properties.lastChecked", readOnly: true, type: { - name: "Number" + name: "DateTime" } }, - requestedDatabaseDtuCap: { - serializedName: "properties.requestedDatabaseDtuCap", + recommendedActions: { + serializedName: "properties.recommendedActions", readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RecommendedAction" + } + } + } + } + } + } +}; + +export const DatabaseAutomaticTuning: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAutomaticTuning", + modelProperties: { + ...ProxyResource.type.modelProperties, + desiredState: { + serializedName: "properties.desiredState", + type: { + name: "Enum", + allowedValues: ["Inherit", "Custom", "Auto", "Unspecified"] } }, - requestedDtuGuarantee: { - serializedName: "properties.requestedDtuGuarantee", + actualState: { + serializedName: "properties.actualState", readOnly: true, type: { - name: "Number" + name: "Enum", + allowedValues: ["Inherit", "Custom", "Auto", "Unspecified"] + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Dictionary", + value: { + type: { name: "Composite", className: "AutomaticTuningOptions" } + } } } } } }; -export const ElasticPoolDatabaseActivity: coreClient.CompositeMapper = { +export const DatabaseColumn: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPoolDatabaseActivity", + className: "DatabaseColumn", modelProperties: { ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", + columnType: { + serializedName: "properties.columnType", type: { name: "String" } }, - databaseName: { - serializedName: "properties.databaseName", - readOnly: true, + temporalType: { + serializedName: "properties.temporalType", type: { name: "String" } }, - endTime: { - serializedName: "properties.endTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - errorCode: { - serializedName: "properties.errorCode", - readOnly: true, + memoryOptimized: { + serializedName: "properties.memoryOptimized", type: { - name: "Number" + name: "Boolean" } }, - errorMessage: { - serializedName: "properties.errorMessage", - readOnly: true, + isComputed: { + serializedName: "properties.isComputed", type: { - name: "String" + name: "Boolean" } - }, - errorSeverity: { - serializedName: "properties.errorSeverity", + } + } + } +}; + +export const ImportExportExtensionsOperationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImportExportExtensionsOperationResult", + modelProperties: { + ...ProxyResource.type.modelProperties, + requestId: { + serializedName: "properties.requestId", readOnly: true, type: { - name: "Number" + name: "Uuid" } }, - operation: { - serializedName: "properties.operation", + requestType: { + serializedName: "properties.requestType", readOnly: true, type: { name: "String" } }, - operationId: { - serializedName: "properties.operationId", - readOnly: true, - type: { - name: "Uuid" - } - }, - percentComplete: { - serializedName: "properties.percentComplete", + lastModifiedTime: { + serializedName: "properties.lastModifiedTime", readOnly: true, type: { - name: "Number" + name: "String" } }, - requestedElasticPoolName: { - serializedName: "properties.requestedElasticPoolName", + serverName: { + serializedName: "properties.serverName", readOnly: true, type: { name: "String" } }, - currentElasticPoolName: { - serializedName: "properties.currentElasticPoolName", + databaseName: { + serializedName: "properties.databaseName", readOnly: true, type: { name: "String" } }, - currentServiceObjective: { - serializedName: "properties.currentServiceObjective", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String" } }, - requestedServiceObjective: { - serializedName: "properties.requestedServiceObjective", + errorMessage: { + serializedName: "properties.errorMessage", readOnly: true, type: { name: "String" } }, - serverName: { - serializedName: "properties.serverName", + queuedTime: { + serializedName: "properties.queuedTime", readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "properties.startTime", + blobUri: { + serializedName: "properties.blobUri", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - state: { - serializedName: "properties.state", + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnectionRequestStatus" + } + } } } } } }; -export const ExtendedDatabaseBlobAuditingPolicy: coreClient.CompositeMapper = { +export const DatabaseExtensions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedDatabaseBlobAuditingPolicy", + className: "DatabaseExtensions", modelProperties: { ...ProxyResource.type.modelProperties, - predicateExpression: { - serializedName: "properties.predicateExpression", + operationMode: { + serializedName: "properties.operationMode", type: { name: "String" } }, - retentionDays: { - serializedName: "properties.retentionDays", + storageKeyType: { + serializedName: "properties.storageKeyType", type: { - name: "Number" + name: "String" } }, - auditActionsAndGroups: { - serializedName: "properties.auditActionsAndGroups", + storageKey: { + serializedName: "properties.storageKey", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - isStorageSecondaryKeyInUse: { - serializedName: "properties.isStorageSecondaryKeyInUse", + storageUri: { + serializedName: "properties.storageUri", type: { - name: "Boolean" + name: "String" } }, - isAzureMonitorTargetEnabled: { - serializedName: "properties.isAzureMonitorTargetEnabled", + administratorLogin: { + serializedName: "properties.administratorLogin", type: { - name: "Boolean" + name: "String" } }, - queueDelayMs: { - serializedName: "properties.queueDelayMs", + administratorLoginPassword: { + serializedName: "properties.administratorLoginPassword", type: { - name: "Number" + name: "String" } }, - state: { - serializedName: "properties.state", + authenticationType: { + serializedName: "properties.authenticationType", type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] + name: "String" } }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", + databaseEdition: { + serializedName: "properties.databaseEdition", type: { name: "String" } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + serviceObjectiveName: { + serializedName: "properties.serviceObjectiveName", type: { name: "String" } }, - storageAccountSubscriptionId: { - serializedName: "properties.storageAccountSubscriptionId", + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", type: { - name: "Uuid" + name: "String" + } + }, + networkIsolation: { + serializedName: "properties.networkIsolation", + type: { + name: "Composite", + className: "NetworkIsolationSettings" } } } } }; -export const ExtendedServerBlobAuditingPolicy: coreClient.CompositeMapper = { +export const DatabaseOperation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedServerBlobAuditingPolicy", + className: "DatabaseOperation", modelProperties: { ...ProxyResource.type.modelProperties, - isDevopsAuditEnabled: { - serializedName: "properties.isDevopsAuditEnabled", + databaseName: { + serializedName: "properties.databaseName", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - predicateExpression: { - serializedName: "properties.predicateExpression", + operation: { + serializedName: "properties.operation", + readOnly: true, type: { name: "String" } }, - retentionDays: { - serializedName: "properties.retentionDays", + operationFriendlyName: { + serializedName: "properties.operationFriendlyName", + readOnly: true, + type: { + name: "String" + } + }, + percentComplete: { + serializedName: "properties.percentComplete", + readOnly: true, type: { name: "Number" } }, - auditActionsAndGroups: { - serializedName: "properties.auditActionsAndGroups", + serverName: { + serializedName: "properties.serverName", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - isStorageSecondaryKeyInUse: { - serializedName: "properties.isStorageSecondaryKeyInUse", + startTime: { + serializedName: "properties.startTime", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, - isAzureMonitorTargetEnabled: { - serializedName: "properties.isAzureMonitorTargetEnabled", + state: { + serializedName: "properties.state", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - queueDelayMs: { - serializedName: "properties.queueDelayMs", + errorCode: { + serializedName: "properties.errorCode", + readOnly: true, type: { name: "Number" } }, - state: { - serializedName: "properties.state", + errorDescription: { + serializedName: "properties.errorDescription", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] + name: "String" } }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", + errorSeverity: { + serializedName: "properties.errorSeverity", + readOnly: true, + type: { + name: "Number" + } + }, + isUserError: { + serializedName: "properties.isUserError", + readOnly: true, + type: { + name: "Boolean" + } + }, + estimatedCompletionTime: { + serializedName: "properties.estimatedCompletionTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + description: { + serializedName: "properties.description", + readOnly: true, type: { name: "String" } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + isCancellable: { + serializedName: "properties.isCancellable", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - storageAccountSubscriptionId: { - serializedName: "properties.storageAccountSubscriptionId", + operationPhaseDetails: { + serializedName: "properties.operationPhaseDetails", type: { - name: "Uuid" + name: "Composite", + className: "PhaseDetails" } } } } }; -export const ServerBlobAuditingPolicy: coreClient.CompositeMapper = { +export const DatabaseSchema: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerBlobAuditingPolicy", + className: "DatabaseSchema", + modelProperties: { + ...ProxyResource.type.modelProperties + } + } +}; + +export const DatabaseSecurityAlertPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseSecurityAlertPolicy", modelProperties: { ...ProxyResource.type.modelProperties, - isDevopsAuditEnabled: { - serializedName: "properties.isDevopsAuditEnabled", + systemData: { + serializedName: "systemData", type: { - name: "Boolean" + name: "Composite", + className: "SystemData" } }, - retentionDays: { - serializedName: "properties.retentionDays", + state: { + serializedName: "properties.state", type: { - name: "Number" + name: "Enum", + allowedValues: ["Enabled", "Disabled"] } }, - auditActionsAndGroups: { - serializedName: "properties.auditActionsAndGroups", + disabledAlerts: { + serializedName: "properties.disabledAlerts", type: { name: "Sequence", element: { @@ -9104,31 +10543,23 @@ export const ServerBlobAuditingPolicy: coreClient.CompositeMapper = { } } }, - isStorageSecondaryKeyInUse: { - serializedName: "properties.isStorageSecondaryKeyInUse", + emailAddresses: { + serializedName: "properties.emailAddresses", type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - isAzureMonitorTargetEnabled: { - serializedName: "properties.isAzureMonitorTargetEnabled", + emailAccountAdmins: { + serializedName: "properties.emailAccountAdmins", type: { name: "Boolean" } }, - queueDelayMs: { - serializedName: "properties.queueDelayMs", - type: { - name: "Number" - } - }, - state: { - serializedName: "properties.state", - type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] - } - }, storageEndpoint: { serializedName: "properties.storageEndpoint", type: { @@ -9141,585 +10572,584 @@ export const ServerBlobAuditingPolicy: coreClient.CompositeMapper = { name: "String" } }, - storageAccountSubscriptionId: { - serializedName: "properties.storageAccountSubscriptionId", + retentionDays: { + serializedName: "properties.retentionDays", type: { - name: "Uuid" + name: "Number" + } + }, + creationTime: { + serializedName: "properties.creationTime", + readOnly: true, + type: { + name: "DateTime" } } } } }; -export const DatabaseBlobAuditingPolicy: coreClient.CompositeMapper = { +export const DatabaseSqlVulnerabilityAssessmentBaselineSet: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseBlobAuditingPolicy", + className: "DatabaseSqlVulnerabilityAssessmentBaselineSet", modelProperties: { ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", - readOnly: true, - type: { - name: "String" - } - }, - retentionDays: { - serializedName: "properties.retentionDays", + systemData: { + serializedName: "systemData", type: { - name: "Number" + name: "Composite", + className: "SystemData" } }, - auditActionsAndGroups: { - serializedName: "properties.auditActionsAndGroups", + results: { + serializedName: "properties.results", type: { - name: "Sequence", - element: { + name: "Dictionary", + value: { type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + } } } } - }, - isStorageSecondaryKeyInUse: { - serializedName: "properties.isStorageSecondaryKeyInUse", + } + } + } +}; + +export const DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "Boolean" + name: "Composite", + className: "SystemData" } }, - isAzureMonitorTargetEnabled: { - serializedName: "properties.isAzureMonitorTargetEnabled", + latestScan: { + serializedName: "properties.latestScan", type: { name: "Boolean" } }, - queueDelayMs: { - serializedName: "properties.queueDelayMs", - type: { - name: "Number" - } - }, - state: { - serializedName: "properties.state", - type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] - } - }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", - type: { - name: "String" - } - }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", - type: { - name: "String" - } - }, - storageAccountSubscriptionId: { - serializedName: "properties.storageAccountSubscriptionId", + results: { + serializedName: "properties.results", type: { - name: "Uuid" + name: "Dictionary", + value: { + type: { + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { type: { name: "String" } } + } + } + } + } } } } } }; -export const RecommendedAction: coreClient.CompositeMapper = { +export const DatabaseSqlVulnerabilityAssessmentRuleBaseline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecommendedAction", + className: "DatabaseSqlVulnerabilityAssessmentRuleBaseline", modelProperties: { ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", - readOnly: true, + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - location: { - serializedName: "location", - readOnly: true, + results: { + serializedName: "properties.results", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } - }, - recommendationReason: { - serializedName: "properties.recommendationReason", - readOnly: true, + } + } + } +}; + +export const DatabaseSqlVulnerabilityAssessmentRuleBaselineInput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseSqlVulnerabilityAssessmentRuleBaselineInput", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } }, - validSince: { - serializedName: "properties.validSince", - readOnly: true, + latestScan: { + serializedName: "properties.latestScan", type: { - name: "DateTime" + name: "Boolean" } }, - lastRefresh: { - serializedName: "properties.lastRefresh", - readOnly: true, + results: { + serializedName: "properties.results", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } - }, - state: { - serializedName: "properties.state", + } + } + } +}; + +export const SqlVulnerabilityAssessmentScanResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlVulnerabilityAssessmentScanResults", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "RecommendedActionStateInfo" - } - }, - isExecutableAction: { - serializedName: "properties.isExecutableAction", - readOnly: true, - type: { - name: "Boolean" - } - }, - isRevertableAction: { - serializedName: "properties.isRevertableAction", - readOnly: true, - type: { - name: "Boolean" + className: "SystemData" } }, - isArchivedAction: { - serializedName: "properties.isArchivedAction", + ruleId: { + serializedName: "properties.ruleId", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - executeActionStartTime: { - serializedName: "properties.executeActionStartTime", + status: { + serializedName: "properties.status", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - executeActionDuration: { - serializedName: "properties.executeActionDuration", + errorMessage: { + serializedName: "properties.errorMessage", readOnly: true, type: { name: "String" } }, - revertActionStartTime: { - serializedName: "properties.revertActionStartTime", + isTrimmed: { + serializedName: "properties.isTrimmed", readOnly: true, type: { - name: "DateTime" + name: "Boolean" } }, - revertActionDuration: { - serializedName: "properties.revertActionDuration", + queryResults: { + serializedName: "properties.queryResults", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } } }, - executeActionInitiatedBy: { - serializedName: "properties.executeActionInitiatedBy", - readOnly: true, + remediation: { + serializedName: "properties.remediation", type: { - name: "Enum", - allowedValues: ["User", "System"] + name: "Composite", + className: "Remediation" } }, - executeActionInitiatedTime: { - serializedName: "properties.executeActionInitiatedTime", - readOnly: true, + baselineAdjustedResult: { + serializedName: "properties.baselineAdjustedResult", type: { - name: "DateTime" + name: "Composite", + className: "BaselineAdjustedResult" } }, - revertActionInitiatedBy: { - serializedName: "properties.revertActionInitiatedBy", - readOnly: true, + ruleMetadata: { + serializedName: "properties.ruleMetadata", type: { - name: "Enum", - allowedValues: ["User", "System"] + name: "Composite", + className: "VaRule" + } + } + } + } +}; + +export const SqlVulnerabilityAssessmentScanRecord: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlVulnerabilityAssessmentScanRecord", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" } }, - revertActionInitiatedTime: { - serializedName: "properties.revertActionInitiatedTime", + scanId: { + serializedName: "properties.scanId", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - score: { - serializedName: "properties.score", + triggerType: { + serializedName: "properties.triggerType", readOnly: true, type: { - name: "Number" + name: "String" } }, - implementationDetails: { - serializedName: "properties.implementationDetails", + state: { + serializedName: "properties.state", + readOnly: true, type: { - name: "Composite", - className: "RecommendedActionImplementationInfo" + name: "String" } }, - errorDetails: { - serializedName: "properties.errorDetails", + startTime: { + serializedName: "properties.startTime", + readOnly: true, type: { - name: "Composite", - className: "RecommendedActionErrorInfo" + name: "DateTime" } }, - estimatedImpact: { - serializedName: "properties.estimatedImpact", + endTime: { + serializedName: "properties.endTime", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecommendedActionImpactRecord" - } - } + name: "DateTime" } }, - observedImpact: { - serializedName: "properties.observedImpact", + errors: { + serializedName: "properties.errors", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RecommendedActionImpactRecord" + className: "SqlVulnerabilityAssessmentScanError" } } } }, - timeSeries: { - serializedName: "properties.timeSeries", + server: { + serializedName: "properties.server", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecommendedActionMetricInfo" - } - } + name: "String" } }, - linkedObjects: { - serializedName: "properties.linkedObjects", + database: { + serializedName: "properties.database", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } }, - details: { - serializedName: "properties.details", + sqlVersion: { + serializedName: "properties.sqlVersion", readOnly: true, type: { - name: "Dictionary", - value: { - type: { name: "Dictionary", value: { type: { name: "any" } } } - } + name: "String" } - } - } - } -}; - -export const Advisor: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Advisor", - modelProperties: { - ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", + }, + highSeverityFailedRulesCount: { + serializedName: "properties.highSeverityFailedRulesCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - location: { - serializedName: "location", + mediumSeverityFailedRulesCount: { + serializedName: "properties.mediumSeverityFailedRulesCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - advisorStatus: { - serializedName: "properties.advisorStatus", + lowSeverityFailedRulesCount: { + serializedName: "properties.lowSeverityFailedRulesCount", readOnly: true, type: { - name: "Enum", - allowedValues: [ - "GA", - "PublicPreview", - "LimitedPublicPreview", - "PrivatePreview" - ] + name: "Number" } }, - autoExecuteStatus: { - serializedName: "properties.autoExecuteStatus", + totalPassedRulesCount: { + serializedName: "properties.totalPassedRulesCount", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled", "Default"] + name: "Number" } }, - autoExecuteStatusInheritedFrom: { - serializedName: "properties.autoExecuteStatusInheritedFrom", + totalFailedRulesCount: { + serializedName: "properties.totalFailedRulesCount", readOnly: true, type: { - name: "Enum", - allowedValues: [ - "Default", - "Subscription", - "Server", - "ElasticPool", - "Database" - ] + name: "Number" } }, - recommendationsStatus: { - serializedName: "properties.recommendationsStatus", + totalRulesCount: { + serializedName: "properties.totalRulesCount", readOnly: true, type: { - name: "String" + name: "Number" } }, - lastChecked: { - serializedName: "properties.lastChecked", + isBaselineApplied: { + serializedName: "properties.isBaselineApplied", readOnly: true, type: { - name: "DateTime" + name: "Boolean" } }, - recommendedActions: { - serializedName: "properties.recommendedActions", + lastScanTime: { + serializedName: "properties.lastScanTime", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RecommendedAction" - } - } + name: "DateTime" } } } } }; -export const DatabaseAutomaticTuning: coreClient.CompositeMapper = { +export const SqlVulnerabilityAssessment: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAutomaticTuning", + className: "SqlVulnerabilityAssessment", modelProperties: { ...ProxyResource.type.modelProperties, - desiredState: { - serializedName: "properties.desiredState", + systemData: { + serializedName: "systemData", type: { - name: "Enum", - allowedValues: ["Inherit", "Custom", "Auto", "Unspecified"] + name: "Composite", + className: "SystemData" } }, - actualState: { - serializedName: "properties.actualState", - readOnly: true, + state: { + serializedName: "properties.state", type: { name: "Enum", - allowedValues: ["Inherit", "Custom", "Auto", "Unspecified"] + allowedValues: ["Enabled", "Disabled"] + } + } + } + } +}; + +export const DatabaseTable: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseTable", + modelProperties: { + ...ProxyResource.type.modelProperties, + temporalType: { + serializedName: "properties.temporalType", + type: { + name: "String" } }, - options: { - serializedName: "properties.options", + memoryOptimized: { + serializedName: "properties.memoryOptimized", type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "AutomaticTuningOptions" } - } + name: "Boolean" } } } } }; -export const DatabaseColumn: coreClient.CompositeMapper = { +export const DatabaseUsage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseColumn", + className: "DatabaseUsage", modelProperties: { ...ProxyResource.type.modelProperties, - columnType: { - serializedName: "properties.columnType", + displayName: { + serializedName: "properties.displayName", + readOnly: true, type: { name: "String" } }, - temporalType: { - serializedName: "properties.temporalType", + currentValue: { + serializedName: "properties.currentValue", + readOnly: true, type: { - name: "String" + name: "Number" } }, - memoryOptimized: { - serializedName: "properties.memoryOptimized", + limit: { + serializedName: "properties.limit", + readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - isComputed: { - serializedName: "properties.isComputed", + unit: { + serializedName: "properties.unit", + readOnly: true, type: { - name: "Boolean" + name: "String" } } } } }; -export const DatabaseSchema: coreClient.CompositeMapper = { +export const DatabaseVulnerabilityAssessmentRuleBaseline: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseSchema", + className: "DatabaseVulnerabilityAssessmentRuleBaseline", modelProperties: { - ...ProxyResource.type.modelProperties + ...ProxyResource.type.modelProperties, + baselineResults: { + serializedName: "properties.baselineResults", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + } } } }; -export const DatabaseSecurityAlertPolicy: coreClient.CompositeMapper = { +export const VulnerabilityAssessmentScanRecord: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseSecurityAlertPolicy", + className: "VulnerabilityAssessmentScanRecord", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + scanId: { + serializedName: "properties.scanId", + readOnly: true, type: { - name: "Composite", - className: "SystemData" + name: "String" + } + }, + triggerType: { + serializedName: "properties.triggerType", + readOnly: true, + type: { + name: "String" } }, state: { serializedName: "properties.state", + readOnly: true, type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] + name: "String" } }, - disabledAlerts: { - serializedName: "properties.disabledAlerts", + startTime: { + serializedName: "properties.startTime", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "DateTime" } }, - emailAddresses: { - serializedName: "properties.emailAddresses", + endTime: { + serializedName: "properties.endTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + errors: { + serializedName: "properties.errors", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "VulnerabilityAssessmentScanError" } } } }, - emailAccountAdmins: { - serializedName: "properties.emailAccountAdmins", - type: { - name: "Boolean" - } - }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", - type: { - name: "String" - } - }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + storageContainerPath: { + serializedName: "properties.storageContainerPath", + readOnly: true, type: { name: "String" } }, - retentionDays: { - serializedName: "properties.retentionDays", - type: { - name: "Number" - } - }, - creationTime: { - serializedName: "properties.creationTime", + numberOfFailedSecurityChecks: { + serializedName: "properties.numberOfFailedSecurityChecks", readOnly: true, type: { - name: "DateTime" + name: "Number" } } } } }; -export const DatabaseTable: coreClient.CompositeMapper = { +export const DatabaseVulnerabilityAssessmentScansExport: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseTable", + className: "DatabaseVulnerabilityAssessmentScansExport", modelProperties: { ...ProxyResource.type.modelProperties, - temporalType: { - serializedName: "properties.temporalType", + exportedReportLocation: { + serializedName: "properties.exportedReportLocation", + readOnly: true, type: { name: "String" } - }, - memoryOptimized: { - serializedName: "properties.memoryOptimized", - type: { - name: "Boolean" - } - } - } - } -}; - -export const DatabaseVulnerabilityAssessmentRuleBaseline: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseVulnerabilityAssessmentRuleBaseline", - modelProperties: { - ...ProxyResource.type.modelProperties, - baselineResults: { - serializedName: "properties.baselineResults", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseVulnerabilityAssessmentRuleBaselineItem" - } - } - } } } } @@ -9760,141 +11190,203 @@ export const DatabaseVulnerabilityAssessment: coreClient.CompositeMapper = { } }; -export const VulnerabilityAssessmentScanRecord: coreClient.CompositeMapper = { +export const ImportExportOperationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VulnerabilityAssessmentScanRecord", + className: "ImportExportOperationResult", modelProperties: { ...ProxyResource.type.modelProperties, - scanId: { - serializedName: "properties.scanId", + requestId: { + serializedName: "properties.requestId", + readOnly: true, + type: { + name: "Uuid" + } + }, + requestType: { + serializedName: "properties.requestType", readOnly: true, type: { name: "String" } }, - triggerType: { - serializedName: "properties.triggerType", + queuedTime: { + serializedName: "properties.queuedTime", readOnly: true, type: { name: "String" } }, - state: { - serializedName: "properties.state", + lastModifiedTime: { + serializedName: "properties.lastModifiedTime", readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "properties.startTime", + blobUri: { + serializedName: "properties.blobUri", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - endTime: { - serializedName: "properties.endTime", + serverName: { + serializedName: "properties.serverName", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - errors: { - serializedName: "properties.errors", + databaseName: { + serializedName: "properties.databaseName", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + errorMessage: { + serializedName: "properties.errorMessage", + readOnly: true, + type: { + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "VulnerabilityAssessmentScanError" + className: "PrivateEndpointConnectionRequestStatus" } } } + } + } + } +}; + +export const DeletedServer: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DeletedServer", + modelProperties: { + ...ProxyResource.type.modelProperties, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "String" + } }, - storageContainerPath: { - serializedName: "properties.storageContainerPath", + deletionTime: { + serializedName: "properties.deletionTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + originalId: { + serializedName: "properties.originalId", readOnly: true, type: { name: "String" } }, - numberOfFailedSecurityChecks: { - serializedName: "properties.numberOfFailedSecurityChecks", + fullyQualifiedDomainName: { + serializedName: "properties.fullyQualifiedDomainName", readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const DatabaseVulnerabilityAssessmentScansExport: coreClient.CompositeMapper = { +export const DistributedAvailabilityGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseVulnerabilityAssessmentScansExport", + className: "DistributedAvailabilityGroup", modelProperties: { ...ProxyResource.type.modelProperties, - exportedReportLocation: { - serializedName: "properties.exportedReportLocation", + targetDatabase: { + serializedName: "properties.targetDatabase", + type: { + name: "String" + } + }, + sourceEndpoint: { + serializedName: "properties.sourceEndpoint", + type: { + name: "String" + } + }, + primaryAvailabilityGroupName: { + serializedName: "properties.primaryAvailabilityGroupName", + type: { + name: "String" + } + }, + secondaryAvailabilityGroupName: { + serializedName: "properties.secondaryAvailabilityGroupName", + type: { + name: "String" + } + }, + replicationMode: { + serializedName: "properties.replicationMode", + type: { + name: "String" + } + }, + distributedAvailabilityGroupId: { + serializedName: "properties.distributedAvailabilityGroupId", readOnly: true, type: { - name: "String" + name: "Uuid" } - } - } - } -}; - -export const DataWarehouseUserActivities: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataWarehouseUserActivities", - modelProperties: { - ...ProxyResource.type.modelProperties, - activeQueriesCount: { - serializedName: "properties.activeQueriesCount", + }, + sourceReplicaId: { + serializedName: "properties.sourceReplicaId", readOnly: true, type: { - name: "Number" + name: "Uuid" } - } - } - } -}; - -export const DeletedServer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DeletedServer", - modelProperties: { - ...ProxyResource.type.modelProperties, - version: { - serializedName: "properties.version", + }, + targetReplicaId: { + serializedName: "properties.targetReplicaId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - deletionTime: { - serializedName: "properties.deletionTime", + linkState: { + serializedName: "properties.linkState", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - originalId: { - serializedName: "properties.originalId", + lastHardenedLsn: { + serializedName: "properties.lastHardenedLsn", readOnly: true, type: { name: "String" } }, - fullyQualifiedDomainName: { - serializedName: "properties.fullyQualifiedDomainName", + instanceRole: { + serializedName: "properties.instanceRole", readOnly: true, type: { name: "String" @@ -10075,6 +11567,22 @@ export const EncryptionProtector: coreClient.CompositeMapper = { } }; +export const EndpointCertificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EndpointCertificate", + modelProperties: { + ...ProxyResource.type.modelProperties, + publicBlob: { + serializedName: "properties.publicBlob", + type: { + name: "String" + } + } + } + } +}; + export const FailoverGroup: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10150,12 +11658,56 @@ export const FailoverGroup: coreClient.CompositeMapper = { } }; +export const GeoBackupPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GeoBackupPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + readOnly: true, + type: { + name: "String" + } + }, + kind: { + serializedName: "kind", + readOnly: true, + type: { + name: "String" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled"] + } + }, + storageType: { + serializedName: "properties.storageType", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + export const InstanceFailoverGroup: coreClient.CompositeMapper = { type: { name: "Composite", className: "InstanceFailoverGroup", modelProperties: { ...ProxyResource.type.modelProperties, + secondaryType: { + serializedName: "properties.secondaryType", + type: { + name: "String" + } + }, readWriteEndpoint: { serializedName: "properties.readWriteEndpoint", type: { @@ -10334,37 +11886,6 @@ export const JobExecution: coreClient.CompositeMapper = { } }; -export const Job: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Job", - modelProperties: { - ...ProxyResource.type.modelProperties, - description: { - defaultValue: "", - serializedName: "properties.description", - type: { - name: "String" - } - }, - version: { - serializedName: "properties.version", - readOnly: true, - type: { - name: "Number" - } - }, - schedule: { - serializedName: "properties.schedule", - type: { - name: "Composite", - className: "JobSchedule" - } - } - } - } -}; - export const JobStep: coreClient.CompositeMapper = { type: { name: "Composite", @@ -10406,152 +11927,28 @@ export const JobStep: coreClient.CompositeMapper = { executionOptions: { serializedName: "properties.executionOptions", type: { - name: "Composite", - className: "JobStepExecutionOptions" - } - } - } - } -}; - -export const JobTargetGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobTargetGroup", - modelProperties: { - ...ProxyResource.type.modelProperties, - members: { - serializedName: "properties.members", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "JobTarget" - } - } - } - } - } - } -}; - -export const JobVersion: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "JobVersion", - modelProperties: { - ...ProxyResource.type.modelProperties - } - } -}; - -export const LongTermRetentionPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LongTermRetentionPolicy", - 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 MaintenanceWindowOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MaintenanceWindowOptions", - modelProperties: { - ...ProxyResource.type.modelProperties, - isEnabled: { - serializedName: "properties.isEnabled", - type: { - name: "Boolean" - } - }, - maintenanceWindowCycles: { - serializedName: "properties.maintenanceWindowCycles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaintenanceWindowTimeRange" - } - } - } - }, - minDurationInMinutes: { - serializedName: "properties.minDurationInMinutes", - type: { - name: "Number" - } - }, - defaultDurationInMinutes: { - serializedName: "properties.defaultDurationInMinutes", - type: { - name: "Number" - } - }, - minCycles: { - serializedName: "properties.minCycles", - type: { - name: "Number" - } - }, - timeGranularityInMinutes: { - serializedName: "properties.timeGranularityInMinutes", - type: { - name: "Number" - } - }, - allowMultipleMaintenanceWindowsPerCycle: { - serializedName: "properties.allowMultipleMaintenanceWindowsPerCycle", - type: { - name: "Boolean" + name: "Composite", + className: "JobStepExecutionOptions" } } } } }; -export const MaintenanceWindows: coreClient.CompositeMapper = { +export const JobTargetGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaintenanceWindows", + className: "JobTargetGroup", modelProperties: { ...ProxyResource.type.modelProperties, - timeRanges: { - serializedName: "properties.timeRanges", + members: { + serializedName: "properties.members", type: { name: "Sequence", element: { type: { name: "Composite", - className: "MaintenanceWindowTimeRange" + className: "JobTarget" } } } @@ -10560,632 +11957,528 @@ export const MaintenanceWindows: coreClient.CompositeMapper = { } }; -export const ManagedBackupShortTermRetentionPolicy: coreClient.CompositeMapper = { +export const JobVersion: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedBackupShortTermRetentionPolicy", + className: "JobVersion", modelProperties: { - ...ProxyResource.type.modelProperties, - retentionDays: { - serializedName: "properties.retentionDays", - type: { - name: "Number" - } - } + ...ProxyResource.type.modelProperties } } }; -export const ManagedInstanceQuery: coreClient.CompositeMapper = { +export const Job: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceQuery", + className: "Job", modelProperties: { ...ProxyResource.type.modelProperties, - queryText: { - serializedName: "properties.queryText", + description: { + defaultValue: "", + serializedName: "properties.description", type: { name: "String" } + }, + version: { + serializedName: "properties.version", + readOnly: true, + type: { + name: "Number" + } + }, + schedule: { + serializedName: "properties.schedule", + type: { + name: "Composite", + className: "JobSchedule" + } } } } }; -export const QueryStatistics: coreClient.CompositeMapper = { +export const LedgerDigestUploads: coreClient.CompositeMapper = { type: { name: "Composite", - className: "QueryStatistics", + className: "LedgerDigestUploads", modelProperties: { ...ProxyResource.type.modelProperties, - databaseName: { - serializedName: "properties.databaseName", - readOnly: true, - type: { - name: "String" - } - }, - queryId: { - serializedName: "properties.queryId", - readOnly: true, - type: { - name: "String" - } - }, - startTime: { - serializedName: "properties.startTime", - readOnly: true, + digestStorageEndpoint: { + serializedName: "properties.digestStorageEndpoint", type: { name: "String" } }, - endTime: { - serializedName: "properties.endTime", + state: { + serializedName: "properties.state", readOnly: true, type: { - name: "String" - } - }, - intervals: { - serializedName: "properties.intervals", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "QueryMetricInterval" - } - } + name: "Enum", + allowedValues: ["Enabled", "Disabled"] } } } } }; -export const ManagedDatabaseRestoreDetailsResult: coreClient.CompositeMapper = { +export const LongTermRetentionBackup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedDatabaseRestoreDetailsResult", + className: "LongTermRetentionBackup", modelProperties: { ...ProxyResource.type.modelProperties, - status: { - serializedName: "properties.status", + serverName: { + serializedName: "properties.serverName", readOnly: true, type: { name: "String" } }, - currentRestoringFileName: { - serializedName: "properties.currentRestoringFileName", + serverCreateTime: { + serializedName: "properties.serverCreateTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - lastRestoredFileName: { - serializedName: "properties.lastRestoredFileName", + databaseName: { + serializedName: "properties.databaseName", readOnly: true, type: { name: "String" } }, - lastRestoredFileTime: { - serializedName: "properties.lastRestoredFileTime", + databaseDeletionTime: { + serializedName: "properties.databaseDeletionTime", readOnly: true, type: { name: "DateTime" } }, - percentCompleted: { - serializedName: "properties.percentCompleted", - readOnly: true, - type: { - name: "Number" - } - }, - unrestorableFiles: { - serializedName: "properties.unrestorableFiles", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - numberOfFilesDetected: { - serializedName: "properties.numberOfFilesDetected", - readOnly: true, - type: { - name: "Number" - } - }, - lastUploadedFileName: { - serializedName: "properties.lastUploadedFileName", + backupTime: { + serializedName: "properties.backupTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - lastUploadedFileTime: { - serializedName: "properties.lastUploadedFileTime", + backupExpirationTime: { + serializedName: "properties.backupExpirationTime", readOnly: true, type: { name: "DateTime" } }, - blockReason: { - serializedName: "properties.blockReason", + backupStorageRedundancy: { + serializedName: "properties.backupStorageRedundancy", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ManagedDatabaseSecurityAlertPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedDatabaseSecurityAlertPolicy", - modelProperties: { - ...ProxyResource.type.modelProperties, - state: { - 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", + requestedBackupStorageRedundancy: { + serializedName: "properties.requestedBackupStorageRedundancy", type: { name: "String" } - }, - retentionDays: { - serializedName: "properties.retentionDays", - type: { - name: "Number" - } - }, - creationTime: { - serializedName: "properties.creationTime", - readOnly: true, - type: { - name: "DateTime" - } } } } }; -export const SecurityEvent: coreClient.CompositeMapper = { +export const LongTermRetentionBackupOperationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SecurityEvent", + className: "LongTermRetentionBackupOperationResult", modelProperties: { ...ProxyResource.type.modelProperties, - eventTime: { - serializedName: "properties.eventTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - securityEventType: { - serializedName: "properties.securityEventType", - readOnly: true, - type: { - name: "Enum", - allowedValues: [ - "Undefined", - "SqlInjectionVulnerability", - "SqlInjectionExploit" - ] - } - }, - subscription: { - serializedName: "properties.subscription", + requestId: { + serializedName: "properties.requestId", readOnly: true, type: { - name: "String" + name: "Uuid" } }, - server: { - serializedName: "properties.server", + operationType: { + serializedName: "properties.operationType", readOnly: true, type: { name: "String" } }, - database: { - serializedName: "properties.database", + fromBackupResourceId: { + serializedName: "properties.fromBackupResourceId", readOnly: true, type: { name: "String" } }, - clientIp: { - serializedName: "properties.clientIp", + toBackupResourceId: { + serializedName: "properties.toBackupResourceId", readOnly: true, type: { name: "String" } }, - applicationName: { - serializedName: "properties.applicationName", + targetBackupStorageRedundancy: { + serializedName: "properties.targetBackupStorageRedundancy", readOnly: true, type: { name: "String" } }, - principalName: { - serializedName: "properties.principalName", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String" } }, - securityEventSqlInjectionAdditionalProperties: { - serializedName: - "properties.securityEventSqlInjectionAdditionalProperties", + message: { + serializedName: "properties.message", + readOnly: true, type: { - name: "Composite", - className: "SecurityEventSqlInjectionAdditionalProperties" + name: "String" } } } } }; -export const SensitivityLabel: coreClient.CompositeMapper = { +export const ManagedInstanceLongTermRetentionBackup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SensitivityLabel", + className: "ManagedInstanceLongTermRetentionBackup", modelProperties: { ...ProxyResource.type.modelProperties, - managedBy: { - serializedName: "managedBy", + managedInstanceName: { + serializedName: "properties.managedInstanceName", readOnly: true, type: { name: "String" } }, - schemaName: { - serializedName: "properties.schemaName", + managedInstanceCreateTime: { + serializedName: "properties.managedInstanceCreateTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - tableName: { - serializedName: "properties.tableName", + databaseName: { + serializedName: "properties.databaseName", readOnly: true, type: { name: "String" } }, - columnName: { - serializedName: "properties.columnName", + databaseDeletionTime: { + serializedName: "properties.databaseDeletionTime", readOnly: true, type: { - name: "String" - } - }, - labelName: { - serializedName: "properties.labelName", - type: { - name: "String" - } - }, - labelId: { - serializedName: "properties.labelId", - type: { - name: "String" - } - }, - informationType: { - serializedName: "properties.informationType", - type: { - name: "String" + name: "DateTime" } }, - informationTypeId: { - serializedName: "properties.informationTypeId", + backupTime: { + serializedName: "properties.backupTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - isDisabled: { - serializedName: "properties.isDisabled", + backupExpirationTime: { + serializedName: "properties.backupExpirationTime", readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, - rank: { - serializedName: "properties.rank", + backupStorageRedundancy: { + serializedName: "properties.backupStorageRedundancy", + readOnly: true, type: { - name: "Enum", - allowedValues: ["None", "Low", "Medium", "High", "Critical"] + name: "String" } } } } }; -export const SensitivityLabelUpdate: coreClient.CompositeMapper = { +export const LongTermRetentionPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SensitivityLabelUpdate", + className: "LongTermRetentionPolicy", modelProperties: { ...ProxyResource.type.modelProperties, - op: { - serializedName: "properties.op", - type: { - name: "Enum", - allowedValues: ["set", "remove"] - } - }, - schema: { - serializedName: "properties.schema", + weeklyRetention: { + serializedName: "properties.weeklyRetention", type: { name: "String" } }, - table: { - serializedName: "properties.table", + monthlyRetention: { + serializedName: "properties.monthlyRetention", type: { name: "String" } }, - column: { - serializedName: "properties.column", + yearlyRetention: { + serializedName: "properties.yearlyRetention", type: { name: "String" } }, - sensitivityLabel: { - serializedName: "properties.sensitivityLabel", + weekOfYear: { + serializedName: "properties.weekOfYear", type: { - name: "Composite", - className: "SensitivityLabel" + name: "Number" } } } } }; -export const RecommendedSensitivityLabelUpdate: coreClient.CompositeMapper = { +export const MaintenanceWindowOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecommendedSensitivityLabelUpdate", + className: "MaintenanceWindowOptions", modelProperties: { ...ProxyResource.type.modelProperties, - op: { - serializedName: "properties.op", + isEnabled: { + serializedName: "properties.isEnabled", type: { - name: "Enum", - allowedValues: ["enable", "disable"] + name: "Boolean" } }, - schema: { - serializedName: "properties.schema", + maintenanceWindowCycles: { + serializedName: "properties.maintenanceWindowCycles", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaintenanceWindowTimeRange" + } + } } }, - table: { - serializedName: "properties.table", + minDurationInMinutes: { + serializedName: "properties.minDurationInMinutes", type: { - name: "String" + name: "Number" } }, - column: { - serializedName: "properties.column", + defaultDurationInMinutes: { + serializedName: "properties.defaultDurationInMinutes", type: { - name: "String" + name: "Number" + } + }, + minCycles: { + serializedName: "properties.minCycles", + type: { + name: "Number" + } + }, + timeGranularityInMinutes: { + serializedName: "properties.timeGranularityInMinutes", + type: { + name: "Number" + } + }, + allowMultipleMaintenanceWindowsPerCycle: { + serializedName: "properties.allowMultipleMaintenanceWindowsPerCycle", + type: { + name: "Boolean" } } } } }; -export const ManagedTransparentDataEncryption: coreClient.CompositeMapper = { +export const MaintenanceWindows: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedTransparentDataEncryption", + className: "MaintenanceWindows", modelProperties: { ...ProxyResource.type.modelProperties, - state: { - serializedName: "properties.state", + timeRanges: { + serializedName: "properties.timeRanges", type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaintenanceWindowTimeRange" + } + } } } } } }; -export const ManagedInstanceAdministrator: coreClient.CompositeMapper = { +export const ManagedBackupShortTermRetentionPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceAdministrator", + className: "ManagedBackupShortTermRetentionPolicy", modelProperties: { ...ProxyResource.type.modelProperties, - administratorType: { - serializedName: "properties.administratorType", - type: { - name: "String" - } - }, - login: { - serializedName: "properties.login", - type: { - name: "String" - } - }, - sid: { - serializedName: "properties.sid", - type: { - name: "Uuid" - } - }, - tenantId: { - serializedName: "properties.tenantId", + retentionDays: { + serializedName: "properties.retentionDays", type: { - name: "Uuid" + name: "Number" } } } } }; -export const ManagedInstanceAzureADOnlyAuthentication: coreClient.CompositeMapper = { +export const ManagedDatabaseAdvancedThreatProtection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceAzureADOnlyAuthentication", + className: "ManagedDatabaseAdvancedThreatProtection", modelProperties: { ...ProxyResource.type.modelProperties, - azureADOnlyAuthentication: { - serializedName: "properties.azureADOnlyAuthentication", + systemData: { + serializedName: "systemData", type: { - name: "Boolean" + name: "Composite", + className: "SystemData" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["New", "Enabled", "Disabled"] + } + }, + creationTime: { + serializedName: "properties.creationTime", + readOnly: true, + type: { + name: "DateTime" } } } } }; -export const ManagedInstanceEncryptionProtector: coreClient.CompositeMapper = { +export const ManagedDatabaseMoveOperationResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceEncryptionProtector", + className: "ManagedDatabaseMoveOperationResult", modelProperties: { ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", + operation: { + serializedName: "properties.operation", + readOnly: true, + type: { + name: "String" + } + }, + operationFriendlyName: { + serializedName: "properties.operationFriendlyName", + readOnly: true, + type: { + name: "String" + } + }, + startTime: { + serializedName: "properties.startTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + state: { + serializedName: "properties.state", readOnly: true, type: { name: "String" } }, - serverKeyName: { - serializedName: "properties.serverKeyName", + operationMode: { + serializedName: "properties.operationMode", + readOnly: true, type: { name: "String" } }, - serverKeyType: { - serializedName: "properties.serverKeyType", + sourceManagedInstanceName: { + serializedName: "properties.sourceManagedInstanceName", + readOnly: true, type: { name: "String" } }, - uri: { - serializedName: "properties.uri", + targetManagedInstanceName: { + serializedName: "properties.targetManagedInstanceName", readOnly: true, type: { name: "String" } }, - thumbprint: { - serializedName: "properties.thumbprint", + sourceManagedInstanceId: { + serializedName: "properties.sourceManagedInstanceId", readOnly: true, type: { name: "String" } }, - autoRotationEnabled: { - serializedName: "properties.autoRotationEnabled", + targetManagedInstanceId: { + serializedName: "properties.targetManagedInstanceId", + readOnly: true, type: { - name: "Boolean" + name: "String" } - } - } - } -}; - -export const ManagedInstanceKey: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstanceKey", - modelProperties: { - ...ProxyResource.type.modelProperties, - kind: { - serializedName: "kind", + }, + sourceDatabaseName: { + serializedName: "properties.sourceDatabaseName", readOnly: true, type: { name: "String" } }, - serverKeyType: { - serializedName: "properties.serverKeyType", + targetDatabaseName: { + serializedName: "properties.targetDatabaseName", + readOnly: true, type: { name: "String" } }, - uri: { - serializedName: "properties.uri", + isCancellable: { + serializedName: "properties.isCancellable", + readOnly: true, type: { - name: "String" + name: "Boolean" } }, - thumbprint: { - serializedName: "properties.thumbprint", + errorCode: { + serializedName: "properties.errorCode", + readOnly: true, + type: { + name: "Number" + } + }, + errorDescription: { + serializedName: "properties.errorDescription", readOnly: true, type: { name: "String" } }, - creationDate: { - serializedName: "properties.creationDate", + errorSeverity: { + serializedName: "properties.errorSeverity", readOnly: true, type: { - name: "DateTime" + name: "Number" } }, - autoRotationEnabled: { - serializedName: "properties.autoRotationEnabled", + isUserError: { + serializedName: "properties.isUserError", readOnly: true, type: { name: "Boolean" @@ -11195,278 +12488,272 @@ export const ManagedInstanceKey: coreClient.CompositeMapper = { } }; -export const ManagedInstanceLongTermRetentionPolicy: coreClient.CompositeMapper = { +export const ManagedInstanceQuery: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceLongTermRetentionPolicy", + className: "ManagedInstanceQuery", modelProperties: { ...ProxyResource.type.modelProperties, - weeklyRetention: { - serializedName: "properties.weeklyRetention", - type: { - name: "String" - } - }, - monthlyRetention: { - serializedName: "properties.monthlyRetention", - type: { - name: "String" - } - }, - yearlyRetention: { - serializedName: "properties.yearlyRetention", + queryText: { + serializedName: "properties.queryText", type: { name: "String" } - }, - weekOfYear: { - serializedName: "properties.weekOfYear", - type: { - name: "Number" - } } } } }; -export const ManagedInstanceOperation: coreClient.CompositeMapper = { +export const QueryStatistics: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedInstanceOperation", + className: "QueryStatistics", modelProperties: { ...ProxyResource.type.modelProperties, - managedInstanceName: { - serializedName: "properties.managedInstanceName", + databaseName: { + serializedName: "properties.databaseName", readOnly: true, type: { name: "String" } }, - operation: { - serializedName: "properties.operation", + queryId: { + serializedName: "properties.queryId", readOnly: true, type: { name: "String" } }, - operationFriendlyName: { - serializedName: "properties.operationFriendlyName", + startTime: { + serializedName: "properties.startTime", readOnly: true, type: { name: "String" } }, - percentComplete: { - serializedName: "properties.percentComplete", + endTime: { + serializedName: "properties.endTime", readOnly: true, type: { - name: "Number" + name: "String" } }, - startTime: { - serializedName: "properties.startTime", - readOnly: true, + intervals: { + serializedName: "properties.intervals", type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "QueryMetricInterval" + } + } } - }, - state: { - serializedName: "properties.state", + } + } + } +}; + +export const ManagedDatabaseRestoreDetailsResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedDatabaseRestoreDetailsResult", + modelProperties: { + ...ProxyResource.type.modelProperties, + typePropertiesType: { + serializedName: "properties.type", readOnly: true, type: { name: "String" } }, - errorCode: { - serializedName: "properties.errorCode", - readOnly: true, - type: { - name: "Number" - } - }, - errorDescription: { - serializedName: "properties.errorDescription", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String" } }, - errorSeverity: { - serializedName: "properties.errorSeverity", + blockReason: { + serializedName: "properties.blockReason", readOnly: true, type: { - name: "Number" + name: "String" } }, - isUserError: { - serializedName: "properties.isUserError", + lastUploadedFileName: { + serializedName: "properties.lastUploadedFileName", readOnly: true, type: { - name: "Boolean" + name: "String" } }, - estimatedCompletionTime: { - serializedName: "properties.estimatedCompletionTime", + lastUploadedFileTime: { + serializedName: "properties.lastUploadedFileTime", readOnly: true, type: { name: "DateTime" } }, - description: { - serializedName: "properties.description", + lastRestoredFileName: { + serializedName: "properties.lastRestoredFileName", readOnly: true, type: { name: "String" } }, - isCancellable: { - serializedName: "properties.isCancellable", + lastRestoredFileTime: { + serializedName: "properties.lastRestoredFileTime", readOnly: true, type: { - name: "Boolean" - } - }, - operationParameters: { - serializedName: "properties.operationParameters", - type: { - name: "Composite", - className: "ManagedInstanceOperationParametersPair" + name: "DateTime" } }, - operationSteps: { - serializedName: "properties.operationSteps", - type: { - name: "Composite", - className: "ManagedInstanceOperationSteps" - } - } - } - } -}; - -export const ManagedInstancePrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstancePrivateEndpointConnection", - modelProperties: { - ...ProxyResource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", + percentCompleted: { + serializedName: "properties.percentCompleted", + readOnly: true, type: { - name: "Composite", - className: "ManagedInstancePrivateEndpointProperty" + name: "Number" } }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", + currentRestoredSizeMB: { + serializedName: "properties.currentRestoredSizeMB", + readOnly: true, type: { - name: "Composite", - className: "ManagedInstancePrivateLinkServiceConnectionStateProperty" + name: "Number" } }, - provisioningState: { - serializedName: "properties.provisioningState", + currentRestorePlanSizeMB: { + serializedName: "properties.currentRestorePlanSizeMB", readOnly: true, type: { - name: "String" - } - } - } - } -}; - -export const ManagedInstancePrivateLink: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstancePrivateLink", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ManagedInstancePrivateLinkProperties" + name: "Number" } - } - } - } -}; - -export const TdeCertificate: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TdeCertificate", - modelProperties: { - ...ProxyResource.type.modelProperties, - privateBlob: { - serializedName: "properties.privateBlob", + }, + currentBackupType: { + serializedName: "properties.currentBackupType", + readOnly: true, type: { name: "String" } }, - certPassword: { - serializedName: "properties.certPassword", + currentRestoringFileName: { + serializedName: "properties.currentRestoringFileName", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ManagedInstanceVulnerabilityAssessment: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstanceVulnerabilityAssessment", - modelProperties: { - ...ProxyResource.type.modelProperties, - storageContainerPath: { - serializedName: "properties.storageContainerPath", + }, + numberOfFilesDetected: { + serializedName: "properties.numberOfFilesDetected", + readOnly: true, type: { - name: "String" + name: "Number" } }, - storageContainerSasKey: { - serializedName: "properties.storageContainerSasKey", + numberOfFilesQueued: { + serializedName: "properties.numberOfFilesQueued", + readOnly: true, type: { - name: "String" + name: "Number" } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + numberOfFilesSkipped: { + serializedName: "properties.numberOfFilesSkipped", + readOnly: true, type: { - name: "String" + name: "Number" } }, - recurringScans: { - serializedName: "properties.recurringScans", + numberOfFilesRestoring: { + serializedName: "properties.numberOfFilesRestoring", + readOnly: true, type: { - name: "Composite", - className: "VulnerabilityAssessmentRecurringScansProperties" + name: "Number" + } + }, + numberOfFilesRestored: { + serializedName: "properties.numberOfFilesRestored", + readOnly: true, + type: { + name: "Number" + } + }, + numberOfFilesUnrestorable: { + serializedName: "properties.numberOfFilesUnrestorable", + readOnly: true, + type: { + name: "Number" + } + }, + fullBackupSets: { + serializedName: "properties.fullBackupSets", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedDatabaseRestoreDetailsBackupSetProperties" + } + } + } + }, + diffBackupSets: { + serializedName: "properties.diffBackupSets", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedDatabaseRestoreDetailsBackupSetProperties" + } + } + } + }, + logBackupSets: { + serializedName: "properties.logBackupSets", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedDatabaseRestoreDetailsBackupSetProperties" + } + } + } + }, + unrestorableFiles: { + serializedName: "properties.unrestorableFiles", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "ManagedDatabaseRestoreDetailsUnrestorableFileProperties" + } + } } } } } }; -export const ManagedServerSecurityAlertPolicy: coreClient.CompositeMapper = { +export const ManagedDatabaseSecurityAlertPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedServerSecurityAlertPolicy", + className: "ManagedDatabaseSecurityAlertPolicy", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, state: { serializedName: "properties.state", type: { name: "Enum", - allowedValues: ["Enabled", "Disabled"] + allowedValues: ["New", "Enabled", "Disabled"] } }, disabledAlerts: { @@ -11526,189 +12813,259 @@ export const ManagedServerSecurityAlertPolicy: coreClient.CompositeMapper = { } }; -export const OperationsHealth: coreClient.CompositeMapper = { +export const SecurityEvent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationsHealth", + className: "SecurityEvent", modelProperties: { ...ProxyResource.type.modelProperties, - namePropertiesName: { - serializedName: "properties.name", + eventTime: { + serializedName: "properties.eventTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + securityEventType: { + serializedName: "properties.securityEventType", + readOnly: true, + type: { + name: "Enum", + allowedValues: [ + "Undefined", + "SqlInjectionVulnerability", + "SqlInjectionExploit" + ] + } + }, + subscription: { + serializedName: "properties.subscription", readOnly: true, type: { name: "String" } }, - health: { - serializedName: "properties.health", + server: { + serializedName: "properties.server", readOnly: true, type: { name: "String" } }, - description: { - serializedName: "properties.description", + database: { + serializedName: "properties.database", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...ProxyResource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", + }, + clientIp: { + serializedName: "properties.clientIp", + readOnly: true, type: { - name: "Composite", - className: "PrivateEndpointProperty" + name: "String" } }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", + applicationName: { + serializedName: "properties.applicationName", + readOnly: true, type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty" + name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + principalName: { + serializedName: "properties.principalName", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PrivateLinkResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResource", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + }, + securityEventSqlInjectionAdditionalProperties: { + serializedName: + "properties.securityEventSqlInjectionAdditionalProperties", type: { name: "Composite", - className: "PrivateLinkResourceProperties" + className: "SecurityEventSqlInjectionAdditionalProperties" } } } } }; -export const RecoverableManagedDatabase: coreClient.CompositeMapper = { +export const SensitivityLabel: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RecoverableManagedDatabase", + className: "SensitivityLabel", modelProperties: { ...ProxyResource.type.modelProperties, - lastAvailableBackupDate: { - serializedName: "properties.lastAvailableBackupDate", + managedBy: { + serializedName: "managedBy", + readOnly: true, + type: { + name: "String" + } + }, + schemaName: { + serializedName: "properties.schemaName", + readOnly: true, + type: { + name: "String" + } + }, + tableName: { + serializedName: "properties.tableName", + readOnly: true, + type: { + name: "String" + } + }, + columnName: { + serializedName: "properties.columnName", readOnly: true, type: { name: "String" } + }, + 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: { + serializedName: "properties.isDisabled", + readOnly: true, + type: { + name: "Boolean" + } + }, + rank: { + serializedName: "properties.rank", + type: { + name: "Enum", + allowedValues: ["None", "Low", "Medium", "High", "Critical"] + } } } } }; -export const RestorePoint: coreClient.CompositeMapper = { +export const SensitivityLabelUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorePoint", + className: "SensitivityLabelUpdate", modelProperties: { ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", - readOnly: true, + op: { + serializedName: "properties.op", type: { - name: "String" + name: "Enum", + allowedValues: ["set", "remove"] } }, - restorePointType: { - serializedName: "properties.restorePointType", - readOnly: true, + schema: { + serializedName: "properties.schema", type: { - name: "Enum", - allowedValues: ["CONTINUOUS", "DISCRETE"] + name: "String" } }, - earliestRestoreDate: { - serializedName: "properties.earliestRestoreDate", - readOnly: true, + table: { + serializedName: "properties.table", type: { - name: "DateTime" + name: "String" } }, - restorePointCreationDate: { - serializedName: "properties.restorePointCreationDate", - readOnly: true, + column: { + serializedName: "properties.column", type: { - name: "DateTime" + name: "String" } }, - restorePointLabel: { - serializedName: "properties.restorePointLabel", - readOnly: true, + sensitivityLabel: { + serializedName: "properties.sensitivityLabel", type: { - name: "String" + name: "Composite", + className: "SensitivityLabel" } } } } }; -export const ServerAutomaticTuning: coreClient.CompositeMapper = { +export const RecommendedSensitivityLabelUpdate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerAutomaticTuning", + className: "RecommendedSensitivityLabelUpdate", modelProperties: { ...ProxyResource.type.modelProperties, - desiredState: { - serializedName: "properties.desiredState", + op: { + serializedName: "properties.op", type: { name: "Enum", - allowedValues: ["Custom", "Auto", "Unspecified"] + allowedValues: ["enable", "disable"] } }, - actualState: { - serializedName: "properties.actualState", - readOnly: true, + schema: { + serializedName: "properties.schema", type: { - name: "Enum", - allowedValues: ["Custom", "Auto", "Unspecified"] + name: "String" } }, - options: { - serializedName: "properties.options", + table: { + serializedName: "properties.table", type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: "AutomaticTuningServerOptions" - } - } + name: "String" + } + }, + column: { + serializedName: "properties.column", + type: { + name: "String" } } } } }; -export const ServerAzureADAdministrator: coreClient.CompositeMapper = { +export const ManagedTransparentDataEncryption: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerAzureADAdministrator", + className: "ManagedTransparentDataEncryption", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled"] + } + } + } + } +}; + +export const ManagedInstanceAdministrator: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceAdministrator", modelProperties: { ...ProxyResource.type.modelProperties, administratorType: { @@ -11734,22 +13091,46 @@ export const ServerAzureADAdministrator: coreClient.CompositeMapper = { type: { name: "Uuid" } + } + } + } +}; + +export const ManagedInstanceAdvancedThreatProtection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceAdvancedThreatProtection", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } }, - azureADOnlyAuthentication: { - serializedName: "properties.azureADOnlyAuthentication", + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["New", "Enabled", "Disabled"] + } + }, + creationTime: { + serializedName: "properties.creationTime", readOnly: true, type: { - name: "Boolean" + name: "DateTime" } } } } }; -export const ServerAzureADOnlyAuthentication: coreClient.CompositeMapper = { +export const ManagedInstanceAzureADOnlyAuthentication: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerAzureADOnlyAuthentication", + className: "ManagedInstanceAzureADOnlyAuthentication", modelProperties: { ...ProxyResource.type.modelProperties, azureADOnlyAuthentication: { @@ -11762,75 +13143,107 @@ export const ServerAzureADOnlyAuthentication: coreClient.CompositeMapper = { } }; -export const ServerDevOpsAuditingSettings: coreClient.CompositeMapper = { +export const ManagedInstanceDtc: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerDevOpsAuditingSettings", + className: "ManagedInstanceDtc", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", - type: { - name: "Composite", - className: "SystemData" - } - }, - isAzureMonitorTargetEnabled: { - serializedName: "properties.isAzureMonitorTargetEnabled", + dtcEnabled: { + serializedName: "properties.dtcEnabled", type: { name: "Boolean" } }, - state: { - serializedName: "properties.state", + securitySettings: { + serializedName: "properties.securitySettings", type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] + name: "Composite", + className: "ManagedInstanceDtcSecuritySettings" } }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", + externalDnsSuffixSearchList: { + serializedName: "properties.externalDnsSuffixSearchList", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + dtcHostNameDnsSuffix: { + serializedName: "properties.dtcHostNameDnsSuffix", + readOnly: true, type: { name: "String" } }, - storageAccountSubscriptionId: { - serializedName: "properties.storageAccountSubscriptionId", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Uuid" + name: "String" } } } } }; -export const ServerDnsAlias: coreClient.CompositeMapper = { +export const ManagedInstanceEncryptionProtector: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerDnsAlias", + className: "ManagedInstanceEncryptionProtector", modelProperties: { ...ProxyResource.type.modelProperties, - azureDnsRecord: { - serializedName: "properties.azureDnsRecord", + kind: { + serializedName: "kind", + readOnly: true, + type: { + name: "String" + } + }, + serverKeyName: { + serializedName: "properties.serverKeyName", + type: { + name: "String" + } + }, + serverKeyType: { + serializedName: "properties.serverKeyType", + type: { + name: "String" + } + }, + uri: { + serializedName: "properties.uri", + readOnly: true, + type: { + name: "String" + } + }, + thumbprint: { + serializedName: "properties.thumbprint", readOnly: true, type: { name: "String" } + }, + autoRotationEnabled: { + serializedName: "properties.autoRotationEnabled", + type: { + name: "Boolean" + } } } } }; -export const ServerKey: coreClient.CompositeMapper = { +export const ManagedInstanceKey: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerKey", + className: "ManagedInstanceKey", modelProperties: { ...ProxyResource.type.modelProperties, kind: { @@ -11840,63 +13253,90 @@ export const ServerKey: coreClient.CompositeMapper = { name: "String" } }, - location: { - serializedName: "location", - readOnly: true, + serverKeyType: { + serializedName: "properties.serverKeyType", type: { name: "String" } }, - subregion: { - serializedName: "properties.subregion", - readOnly: true, + uri: { + serializedName: "properties.uri", type: { name: "String" } }, - serverKeyType: { - serializedName: "properties.serverKeyType", + thumbprint: { + serializedName: "properties.thumbprint", + readOnly: true, type: { name: "String" } }, - uri: { - serializedName: "properties.uri", + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - thumbprint: { - serializedName: "properties.thumbprint", + autoRotationEnabled: { + serializedName: "properties.autoRotationEnabled", readOnly: true, + type: { + name: "Boolean" + } + } + } + } +}; + +export const ManagedInstanceLongTermRetentionPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstanceLongTermRetentionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + weeklyRetention: { + serializedName: "properties.weeklyRetention", + type: { + name: "String" + } + }, + monthlyRetention: { + serializedName: "properties.monthlyRetention", type: { name: "String" } }, - creationDate: { - serializedName: "properties.creationDate", - readOnly: true, + yearlyRetention: { + serializedName: "properties.yearlyRetention", type: { - name: "DateTime" + name: "String" } }, - autoRotationEnabled: { - serializedName: "properties.autoRotationEnabled", - readOnly: true, + weekOfYear: { + serializedName: "properties.weekOfYear", type: { - name: "Boolean" + name: "Number" } } } } }; -export const ServerOperation: coreClient.CompositeMapper = { +export const ManagedInstanceOperation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerOperation", + className: "ManagedInstanceOperation", modelProperties: { ...ProxyResource.type.modelProperties, + managedInstanceName: { + serializedName: "properties.managedInstanceName", + readOnly: true, + type: { + name: "String" + } + }, operation: { serializedName: "properties.operation", readOnly: true, @@ -11918,13 +13358,6 @@ export const ServerOperation: coreClient.CompositeMapper = { name: "Number" } }, - serverName: { - serializedName: "properties.serverName", - readOnly: true, - type: { - name: "String" - } - }, startTime: { serializedName: "properties.startTime", readOnly: true, @@ -11987,125 +13420,99 @@ export const ServerOperation: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + operationParameters: { + serializedName: "properties.operationParameters", + type: { + name: "Composite", + className: "ManagedInstanceOperationParametersPair" + } + }, + operationSteps: { + serializedName: "properties.operationSteps", + type: { + name: "Composite", + className: "ManagedInstanceOperationSteps" + } } } } }; -export const ServerSecurityAlertPolicy: coreClient.CompositeMapper = { +export const ManagedInstancePrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerSecurityAlertPolicy", + className: "ManagedInstancePrivateEndpointConnection", modelProperties: { ...ProxyResource.type.modelProperties, - systemData: { - serializedName: "systemData", + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "SystemData" - } - }, - state: { - serializedName: "properties.state", - type: { - name: "Enum", - allowedValues: ["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" + className: "ManagedInstancePrivateEndpointProperty" } }, - storageEndpoint: { - serializedName: "properties.storageEndpoint", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "String" + name: "Composite", + className: "ManagedInstancePrivateLinkServiceConnectionStateProperty" } }, - storageAccountAccessKey: { - serializedName: "properties.storageAccountAccessKey", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } - }, - retentionDays: { - serializedName: "properties.retentionDays", - type: { - name: "Number" - } - }, - creationTime: { - serializedName: "properties.creationTime", - readOnly: true, + } + } + } +}; + +export const ManagedInstancePrivateLink: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedInstancePrivateLink", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "DateTime" + name: "Composite", + className: "ManagedInstancePrivateLinkProperties" } } } } }; -export const ServerTrustGroup: coreClient.CompositeMapper = { +export const TdeCertificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerTrustGroup", + className: "TdeCertificate", modelProperties: { ...ProxyResource.type.modelProperties, - groupMembers: { - serializedName: "properties.groupMembers", + privateBlob: { + serializedName: "properties.privateBlob", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerInfo" - } - } + name: "String" } }, - trustScopes: { - serializedName: "properties.trustScopes", + certPassword: { + serializedName: "properties.certPassword", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const ServerVulnerabilityAssessment: coreClient.CompositeMapper = { +export const ManagedInstanceVulnerabilityAssessment: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerVulnerabilityAssessment", + className: "ManagedInstanceVulnerabilityAssessment", modelProperties: { ...ProxyResource.type.modelProperties, storageContainerPath: { @@ -12137,14 +13544,21 @@ export const ServerVulnerabilityAssessment: coreClient.CompositeMapper = { } }; -export const SqlAgentConfiguration: coreClient.CompositeMapper = { +export const ManagedLedgerDigestUploads: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlAgentConfiguration", + className: "ManagedLedgerDigestUploads", modelProperties: { ...ProxyResource.type.modelProperties, + digestStorageEndpoint: { + serializedName: "properties.digestStorageEndpoint", + type: { + name: "String" + } + }, state: { serializedName: "properties.state", + readOnly: true, type: { name: "String" } @@ -12153,145 +13567,237 @@ export const SqlAgentConfiguration: coreClient.CompositeMapper = { } }; -export const SubscriptionUsage: coreClient.CompositeMapper = { +export const ManagedServerDnsAlias: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SubscriptionUsage", + className: "ManagedServerDnsAlias", modelProperties: { ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", + azureDnsRecord: { + serializedName: "properties.azureDnsRecord", readOnly: true, type: { name: "String" } }, - currentValue: { - serializedName: "properties.currentValue", + publicAzureDnsRecord: { + serializedName: "properties.publicAzureDnsRecord", readOnly: true, type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const ManagedServerSecurityAlertPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServerSecurityAlertPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" } }, - limit: { - serializedName: "properties.limit", - readOnly: true, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["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" } }, - unit: { - serializedName: "properties.unit", + creationTime: { + serializedName: "properties.creationTime", readOnly: true, type: { - name: "String" + name: "DateTime" } } } } }; -export const SyncAgent: coreClient.CompositeMapper = { +export const OutboundFirewallRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncAgent", + className: "OutboundFirewallRule", modelProperties: { ...ProxyResource.type.modelProperties, - namePropertiesName: { - serializedName: "properties.name", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" } - }, - syncDatabaseId: { - serializedName: "properties.syncDatabaseId", - type: { - name: "String" - } - }, - lastAliveTime: { - serializedName: "properties.lastAliveTime", - readOnly: true, + } + } + } +}; + +export const PrivateEndpointConnection: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { - name: "DateTime" + name: "Composite", + className: "PrivateEndpointProperty" } }, - state: { - serializedName: "properties.state", + groupIds: { + serializedName: "properties.groupIds", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - isUpToDate: { - serializedName: "properties.isUpToDate", - readOnly: true, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { - name: "Boolean" + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" } }, - expiryTime: { - serializedName: "properties.expiryTime", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { - name: "DateTime" + name: "String" } - }, - version: { - serializedName: "properties.version", - readOnly: true, + } + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String" + name: "Composite", + className: "PrivateLinkResourceProperties" } } } } }; -export const SyncAgentLinkedDatabase: coreClient.CompositeMapper = { +export const RecoverableDatabase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncAgentLinkedDatabase", + className: "RecoverableDatabase", modelProperties: { ...ProxyResource.type.modelProperties, - databaseType: { - serializedName: "properties.databaseType", + edition: { + serializedName: "properties.edition", readOnly: true, type: { name: "String" } }, - databaseId: { - serializedName: "properties.databaseId", + serviceLevelObjective: { + serializedName: "properties.serviceLevelObjective", readOnly: true, type: { name: "String" } }, - description: { - serializedName: "properties.description", + elasticPoolName: { + serializedName: "properties.elasticPoolName", readOnly: true, type: { name: "String" } }, - serverName: { - serializedName: "properties.serverName", + lastAvailableBackupDate: { + serializedName: "properties.lastAvailableBackupDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - databaseName: { - serializedName: "properties.databaseName", - readOnly: true, + keys: { + serializedName: "properties.keys", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "Composite", className: "DatabaseKey" } } } - }, - userName: { - serializedName: "properties.userName", + } + } + } +}; + +export const RecoverableManagedDatabase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RecoverableManagedDatabase", + modelProperties: { + ...ProxyResource.type.modelProperties, + lastAvailableBackupDate: { + serializedName: "properties.lastAvailableBackupDate", readOnly: true, type: { name: "String" @@ -12301,90 +13807,105 @@ export const SyncAgentLinkedDatabase: coreClient.CompositeMapper = { } }; -export const SyncGroup: coreClient.CompositeMapper = { +export const ReplicationLink: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncGroup", + className: "ReplicationLink", modelProperties: { ...ProxyResource.type.modelProperties, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "Sku" - } - }, - interval: { - serializedName: "properties.interval", + partnerServer: { + serializedName: "properties.partnerServer", + readOnly: true, type: { - name: "Number" + name: "String" } }, - lastSyncTime: { - serializedName: "properties.lastSyncTime", + partnerDatabase: { + serializedName: "properties.partnerDatabase", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - conflictResolutionPolicy: { - serializedName: "properties.conflictResolutionPolicy", + partnerDatabaseId: { + serializedName: "properties.partnerDatabaseId", + readOnly: true, type: { name: "String" } }, - syncDatabaseId: { - serializedName: "properties.syncDatabaseId", + partnerLocation: { + serializedName: "properties.partnerLocation", + readOnly: true, type: { name: "String" } }, - hubDatabaseUserName: { - serializedName: "properties.hubDatabaseUserName", + role: { + serializedName: "properties.role", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ] } }, - hubDatabasePassword: { - serializedName: "properties.hubDatabasePassword", + partnerRole: { + serializedName: "properties.partnerRole", + readOnly: true, type: { - name: "String" + name: "Enum", + allowedValues: [ + "Primary", + "Secondary", + "NonReadableSecondary", + "Source", + "Copy" + ] } }, - syncState: { - serializedName: "properties.syncState", + replicationMode: { + serializedName: "properties.replicationMode", readOnly: true, type: { name: "String" } }, - schema: { - serializedName: "properties.schema", + startTime: { + serializedName: "properties.startTime", + readOnly: true, type: { - name: "Composite", - className: "SyncGroupSchema" + name: "DateTime" } }, - enableConflictLogging: { - serializedName: "properties.enableConflictLogging", + percentComplete: { + serializedName: "properties.percentComplete", + readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - conflictLoggingRetentionInDays: { - serializedName: "properties.conflictLoggingRetentionInDays", + replicationState: { + serializedName: "properties.replicationState", + readOnly: true, type: { - name: "Number" + name: "String" } }, - usePrivateLinkConnection: { - serializedName: "properties.usePrivateLinkConnection", + isTerminationAllowed: { + serializedName: "properties.isTerminationAllowed", + readOnly: true, type: { name: "Boolean" } }, - privateEndpointName: { - serializedName: "properties.privateEndpointName", + linkType: { + serializedName: "properties.linkType", readOnly: true, type: { name: "String" @@ -12394,105 +13915,122 @@ export const SyncGroup: coreClient.CompositeMapper = { } }; -export const SyncMember: coreClient.CompositeMapper = { +export const RestorableDroppedDatabase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SyncMember", + className: "RestorableDroppedDatabase", modelProperties: { ...ProxyResource.type.modelProperties, - databaseType: { - serializedName: "properties.databaseType", - type: { - name: "String" - } - }, - syncAgentId: { - serializedName: "properties.syncAgentId", - type: { - name: "String" - } - }, - sqlServerDatabaseId: { - serializedName: "properties.sqlServerDatabaseId", + sku: { + serializedName: "sku", type: { - name: "Uuid" + name: "Composite", + className: "Sku" } }, - syncMemberAzureDatabaseResourceId: { - serializedName: "properties.syncMemberAzureDatabaseResourceId", + location: { + serializedName: "location", type: { name: "String" } }, - usePrivateLinkConnection: { - serializedName: "properties.usePrivateLinkConnection", + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { type: { name: "String" } } } }, - privateEndpointName: { - serializedName: "properties.privateEndpointName", + databaseName: { + serializedName: "properties.databaseName", readOnly: true, type: { name: "String" } }, - serverName: { - serializedName: "properties.serverName", + maxSizeBytes: { + serializedName: "properties.maxSizeBytes", + readOnly: true, type: { - name: "String" + name: "Number" } }, - databaseName: { - serializedName: "properties.databaseName", + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - userName: { - serializedName: "properties.userName", + deletionDate: { + serializedName: "properties.deletionDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - password: { - serializedName: "properties.password", + earliestRestoreDate: { + serializedName: "properties.earliestRestoreDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - syncDirection: { - serializedName: "properties.syncDirection", + backupStorageRedundancy: { + serializedName: "properties.backupStorageRedundancy", + readOnly: true, type: { name: "String" } }, - syncState: { - serializedName: "properties.syncState", - readOnly: true, + keys: { + serializedName: "properties.keys", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "Composite", className: "DatabaseKey" } } } } } } }; -export const TimeZone: coreClient.CompositeMapper = { +export const RestorePoint: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TimeZone", + className: "RestorePoint", modelProperties: { ...ProxyResource.type.modelProperties, - timeZoneId: { - serializedName: "properties.timeZoneId", + location: { + serializedName: "location", readOnly: true, type: { name: "String" } }, - displayName: { - serializedName: "properties.displayName", + restorePointType: { + serializedName: "properties.restorePointType", + readOnly: true, + type: { + name: "Enum", + allowedValues: ["CONTINUOUS", "DISCRETE"] + } + }, + earliestRestoreDate: { + serializedName: "properties.earliestRestoreDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + restorePointCreationDate: { + serializedName: "properties.restorePointCreationDate", + readOnly: true, + type: { + name: "DateTime" + } + }, + restorePointLabel: { + serializedName: "properties.restorePointLabel", readOnly: true, type: { name: "String" @@ -12502,209 +14040,247 @@ export const TimeZone: coreClient.CompositeMapper = { } }; -export const UpdateManagedInstanceDnsServersOperation: coreClient.CompositeMapper = { +export const ServerAdvancedThreatProtection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UpdateManagedInstanceDnsServersOperation", + className: "ServerAdvancedThreatProtection", modelProperties: { ...ProxyResource.type.modelProperties, - status: { - serializedName: "properties.status", + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["New", "Enabled", "Disabled"] + } + }, + creationTime: { + serializedName: "properties.creationTime", readOnly: true, type: { - name: "String" + name: "DateTime" } } } } }; -export const VirtualNetworkRule: coreClient.CompositeMapper = { +export const ServerAutomaticTuning: coreClient.CompositeMapper = { type: { name: "Composite", - className: "VirtualNetworkRule", + className: "ServerAutomaticTuning", modelProperties: { ...ProxyResource.type.modelProperties, - virtualNetworkSubnetId: { - serializedName: "properties.virtualNetworkSubnetId", + desiredState: { + serializedName: "properties.desiredState", type: { - name: "String" + name: "Enum", + allowedValues: ["Custom", "Auto", "Unspecified"] } }, - ignoreMissingVnetServiceEndpoint: { - serializedName: "properties.ignoreMissingVnetServiceEndpoint", + actualState: { + serializedName: "properties.actualState", + readOnly: true, type: { - name: "Boolean" + name: "Enum", + allowedValues: ["Custom", "Auto", "Unspecified"] } }, - state: { - serializedName: "properties.state", - readOnly: true, + options: { + serializedName: "properties.options", type: { - name: "String" + name: "Dictionary", + value: { + type: { + name: "Composite", + className: "AutomaticTuningServerOptions" + } + } } } } } }; -export const WorkloadClassifier: coreClient.CompositeMapper = { +export const ServerAzureADAdministrator: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadClassifier", + className: "ServerAzureADAdministrator", modelProperties: { ...ProxyResource.type.modelProperties, - memberName: { - serializedName: "properties.memberName", - type: { - name: "String" - } - }, - label: { - serializedName: "properties.label", + administratorType: { + serializedName: "properties.administratorType", type: { name: "String" } }, - context: { - serializedName: "properties.context", + login: { + serializedName: "properties.login", type: { name: "String" } }, - startTime: { - serializedName: "properties.startTime", + sid: { + serializedName: "properties.sid", type: { - name: "String" + name: "Uuid" } }, - endTime: { - serializedName: "properties.endTime", + tenantId: { + serializedName: "properties.tenantId", type: { - name: "String" + name: "Uuid" } }, - importance: { - serializedName: "properties.importance", + azureADOnlyAuthentication: { + serializedName: "properties.azureADOnlyAuthentication", + readOnly: true, type: { - name: "String" + name: "Boolean" } } } } }; -export const WorkloadGroup: coreClient.CompositeMapper = { +export const ServerAzureADOnlyAuthentication: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkloadGroup", + className: "ServerAzureADOnlyAuthentication", modelProperties: { ...ProxyResource.type.modelProperties, - minResourcePercent: { - serializedName: "properties.minResourcePercent", + azureADOnlyAuthentication: { + serializedName: "properties.azureADOnlyAuthentication", type: { - name: "Number" + name: "Boolean" } - }, - maxResourcePercent: { - serializedName: "properties.maxResourcePercent", + } + } + } +}; + +export const ServerConfigurationOption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerConfigurationOption", + modelProperties: { + ...ProxyResource.type.modelProperties, + serverConfigurationOptionValue: { + serializedName: "properties.serverConfigurationOptionValue", type: { name: "Number" } }, - minResourcePercentPerRequest: { - serializedName: "properties.minResourcePercentPerRequest", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - maxResourcePercentPerRequest: { - serializedName: "properties.maxResourcePercentPerRequest", + } + } + } +}; + +export const ServerConnectionPolicy: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerConnectionPolicy", + modelProperties: { + ...ProxyResource.type.modelProperties, + location: { + serializedName: "location", + readOnly: true, type: { - name: "Number" + name: "String" } }, - importance: { - serializedName: "properties.importance", + kind: { + serializedName: "kind", + readOnly: true, type: { name: "String" } }, - queryExecutionTimeout: { - serializedName: "properties.queryExecutionTimeout", + connectionType: { + serializedName: "properties.connectionType", type: { - name: "Number" + name: "String" } } } } }; -export const LogicalDatabaseTransparentDataEncryption: coreClient.CompositeMapper = { +export const ServerDevOpsAuditingSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LogicalDatabaseTransparentDataEncryption", + className: "ServerDevOpsAuditingSettings", modelProperties: { ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + isAzureMonitorTargetEnabled: { + serializedName: "properties.isAzureMonitorTargetEnabled", + type: { + name: "Boolean" + } + }, + isManagedIdentityInUse: { + serializedName: "properties.isManagedIdentityInUse", + type: { + name: "Boolean" + } + }, state: { serializedName: "properties.state", type: { name: "Enum", allowedValues: ["Enabled", "Disabled"] } - } - } - } -}; - -export const BackupShortTermRetentionPolicy: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackupShortTermRetentionPolicy", - modelProperties: { - ...ProxyResource.type.modelProperties, - retentionDays: { - serializedName: "properties.retentionDays", + }, + storageEndpoint: { + serializedName: "properties.storageEndpoint", + type: { + name: "String" + } + }, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { - name: "Number" + name: "String" } }, - diffBackupIntervalInHours: { - serializedName: "properties.diffBackupIntervalInHours", + storageAccountSubscriptionId: { + serializedName: "properties.storageAccountSubscriptionId", type: { - name: "Number" + name: "Uuid" } } } } }; -export const DatabaseExtensions: coreClient.CompositeMapper = { +export const ServerDnsAlias: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseExtensions", + className: "ServerDnsAlias", modelProperties: { ...ProxyResource.type.modelProperties, - operationMode: { - serializedName: "properties.operationMode", - type: { - name: "String" - } - }, - storageKeyType: { - serializedName: "properties.storageKeyType", - type: { - name: "String" - } - }, - storageKey: { - serializedName: "properties.storageKey", - type: { - name: "String" - } - }, - storageUri: { - serializedName: "properties.storageUri", + azureDnsRecord: { + serializedName: "properties.azureDnsRecord", + readOnly: true, type: { name: "String" } @@ -12713,78 +14289,76 @@ export const DatabaseExtensions: coreClient.CompositeMapper = { } }; -export const ImportExportExtensionsOperationResult: coreClient.CompositeMapper = { +export const ServerKey: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportExportExtensionsOperationResult", + className: "ServerKey", modelProperties: { ...ProxyResource.type.modelProperties, - requestId: { - serializedName: "properties.requestId", + kind: { + serializedName: "kind", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - requestType: { - serializedName: "properties.requestType", + location: { + serializedName: "location", readOnly: true, type: { name: "String" } }, - lastModifiedTime: { - serializedName: "properties.lastModifiedTime", + subregion: { + serializedName: "properties.subregion", readOnly: true, type: { name: "String" } }, - serverName: { - serializedName: "properties.serverName", - readOnly: true, + serverKeyType: { + serializedName: "properties.serverKeyType", type: { name: "String" } }, - databaseName: { - serializedName: "properties.databaseName", - readOnly: true, + uri: { + serializedName: "properties.uri", type: { name: "String" } }, - status: { - serializedName: "properties.status", + thumbprint: { + serializedName: "properties.thumbprint", readOnly: true, type: { name: "String" } }, - errorMessage: { - serializedName: "properties.errorMessage", + creationDate: { + serializedName: "properties.creationDate", readOnly: true, type: { - name: "String" + name: "DateTime" + } + }, + autoRotationEnabled: { + serializedName: "properties.autoRotationEnabled", + readOnly: true, + type: { + name: "Boolean" } } } } }; -export const DatabaseOperation: coreClient.CompositeMapper = { +export const ServerOperation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseOperation", + className: "ServerOperation", modelProperties: { ...ProxyResource.type.modelProperties, - databaseName: { - serializedName: "properties.databaseName", - readOnly: true, - type: { - name: "String" - } - }, operation: { serializedName: "properties.operation", readOnly: true, @@ -12880,178 +14454,279 @@ export const DatabaseOperation: coreClient.CompositeMapper = { } }; -export const DatabaseUsage: coreClient.CompositeMapper = { +export const ServerSecurityAlertPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseUsage", + className: "ServerSecurityAlertPolicy", modelProperties: { ...ProxyResource.type.modelProperties, - displayName: { - serializedName: "properties.displayName", - readOnly: true, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["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" } }, - currentValue: { - serializedName: "properties.currentValue", - readOnly: true, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { - name: "Number" + name: "String" } }, - limit: { - serializedName: "properties.limit", - readOnly: true, + retentionDays: { + serializedName: "properties.retentionDays", type: { name: "Number" } }, - unit: { - serializedName: "properties.unit", + creationTime: { + serializedName: "properties.creationTime", readOnly: true, type: { - name: "String" + name: "DateTime" } } } } }; -export const LedgerDigestUploads: coreClient.CompositeMapper = { +export const ServerTrustCertificate: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LedgerDigestUploads", + className: "ServerTrustCertificate", modelProperties: { ...ProxyResource.type.modelProperties, - digestStorageEndpoint: { - serializedName: "properties.digestStorageEndpoint", + publicBlob: { + serializedName: "properties.publicBlob", type: { name: "String" } }, - state: { - serializedName: "properties.state", + thumbprint: { + serializedName: "properties.thumbprint", readOnly: true, type: { - name: "Enum", - allowedValues: ["Enabled", "Disabled"] + name: "String" + } + }, + certificateName: { + serializedName: "properties.certificateName", + readOnly: true, + type: { + name: "String" } } } } }; -export const OutboundFirewallRule: coreClient.CompositeMapper = { +export const ServerTrustGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OutboundFirewallRule", + className: "ServerTrustGroup", modelProperties: { ...ProxyResource.type.modelProperties, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + groupMembers: { + serializedName: "properties.groupMembers", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerInfo" + } + } + } + }, + trustScopes: { + serializedName: "properties.trustScopes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const ReplicationLink: coreClient.CompositeMapper = { +export const ServerUsage: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ReplicationLink", + className: "ServerUsage", modelProperties: { ...ProxyResource.type.modelProperties, - partnerServer: { - serializedName: "properties.partnerServer", + displayName: { + serializedName: "properties.displayName", readOnly: true, type: { name: "String" } }, - partnerDatabase: { - serializedName: "properties.partnerDatabase", + currentValue: { + serializedName: "properties.currentValue", + readOnly: true, + type: { + name: "Number" + } + }, + limit: { + serializedName: "properties.limit", + readOnly: true, + type: { + name: "Number" + } + }, + unit: { + serializedName: "properties.unit", readOnly: true, type: { name: "String" } + } + } + } +}; + +export const ServerVulnerabilityAssessment: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServerVulnerabilityAssessment", + modelProperties: { + ...ProxyResource.type.modelProperties, + storageContainerPath: { + serializedName: "properties.storageContainerPath", + type: { + name: "String" + } + }, + storageContainerSasKey: { + serializedName: "properties.storageContainerSasKey", + type: { + name: "String" + } }, - partnerLocation: { - serializedName: "properties.partnerLocation", - readOnly: true, + storageAccountAccessKey: { + serializedName: "properties.storageAccountAccessKey", type: { name: "String" } }, - role: { - serializedName: "properties.role", - readOnly: true, + recurringScans: { + serializedName: "properties.recurringScans", type: { - name: "Enum", - allowedValues: [ - "Primary", - "Secondary", - "NonReadableSecondary", - "Source", - "Copy" - ] + name: "Composite", + className: "VulnerabilityAssessmentRecurringScansProperties" } - }, - partnerRole: { - serializedName: "properties.partnerRole", + } + } + } +}; + +export const RefreshExternalGovernanceStatusOperationResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RefreshExternalGovernanceStatusOperationResult", + modelProperties: { + ...ProxyResource.type.modelProperties, + requestId: { + serializedName: "properties.requestId", readOnly: true, type: { - name: "Enum", - allowedValues: [ - "Primary", - "Secondary", - "NonReadableSecondary", - "Source", - "Copy" - ] + name: "Uuid" } }, - replicationMode: { - serializedName: "properties.replicationMode", + requestType: { + serializedName: "properties.requestType", readOnly: true, type: { name: "String" } }, - startTime: { - serializedName: "properties.startTime", + queuedTime: { + serializedName: "properties.queuedTime", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - percentComplete: { - serializedName: "properties.percentComplete", + serverName: { + serializedName: "properties.serverName", readOnly: true, type: { - name: "Number" + name: "String" } }, - replicationState: { - serializedName: "properties.replicationState", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String" } }, - isTerminationAllowed: { - serializedName: "properties.isTerminationAllowed", + errorMessage: { + serializedName: "properties.errorMessage", readOnly: true, type: { - name: "Boolean" + name: "String" } - }, - linkType: { - serializedName: "properties.linkType", - readOnly: true, + } + } + } +}; + +export const SqlAgentConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlAgentConfiguration", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + serializedName: "properties.state", type: { name: "String" } @@ -13060,84 +14735,115 @@ export const ReplicationLink: coreClient.CompositeMapper = { } }; -export const ImportExportOperationResult: coreClient.CompositeMapper = { +export const StartStopManagedInstanceSchedule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ImportExportOperationResult", + className: "StartStopManagedInstanceSchedule", modelProperties: { ...ProxyResource.type.modelProperties, - requestId: { - serializedName: "properties.requestId", - readOnly: true, + systemData: { + serializedName: "systemData", type: { - name: "Uuid" + name: "Composite", + className: "SystemData" } }, - requestType: { - serializedName: "properties.requestType", - readOnly: true, + description: { + defaultValue: "", + serializedName: "properties.description", type: { name: "String" } }, - queuedTime: { - serializedName: "properties.queuedTime", - readOnly: true, + timeZoneId: { + defaultValue: "UTC", + serializedName: "properties.timeZoneId", type: { name: "String" } }, - lastModifiedTime: { - serializedName: "properties.lastModifiedTime", - readOnly: true, + scheduleList: { + serializedName: "properties.scheduleList", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ScheduleItem" + } + } } }, - blobUri: { - serializedName: "properties.blobUri", + nextRunAction: { + serializedName: "properties.nextRunAction", readOnly: true, type: { name: "String" } }, - serverName: { - serializedName: "properties.serverName", + nextExecutionTime: { + serializedName: "properties.nextExecutionTime", readOnly: true, type: { name: "String" } - }, - databaseName: { - serializedName: "properties.databaseName", + } + } + } +}; + +export const SubscriptionUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SubscriptionUsage", + modelProperties: { + ...ProxyResource.type.modelProperties, + displayName: { + serializedName: "properties.displayName", readOnly: true, type: { name: "String" } }, - status: { - serializedName: "properties.status", + currentValue: { + serializedName: "properties.currentValue", readOnly: true, type: { - name: "String" + name: "Number" } }, - errorMessage: { - serializedName: "properties.errorMessage", + limit: { + serializedName: "properties.limit", readOnly: true, type: { - name: "String" + name: "Number" } }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", + unit: { + serializedName: "properties.unit", readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SynapseLinkWorkspace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SynapseLinkWorkspace", + modelProperties: { + ...ProxyResource.type.modelProperties, + workspaces: { + serializedName: "properties.workspaces", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateEndpointConnectionRequestStatus" + className: "SynapseLinkWorkspaceInfoProperties" } } } @@ -13146,56 +14852,55 @@ export const ImportExportOperationResult: coreClient.CompositeMapper = { } }; -export const LongTermRetentionBackupOperationResult: coreClient.CompositeMapper = { +export const SyncAgent: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LongTermRetentionBackupOperationResult", + className: "SyncAgent", modelProperties: { ...ProxyResource.type.modelProperties, - requestId: { - serializedName: "properties.requestId", + namePropertiesName: { + serializedName: "properties.name", readOnly: true, type: { - name: "Uuid" + name: "String" } }, - operationType: { - serializedName: "properties.operationType", - readOnly: true, + syncDatabaseId: { + serializedName: "properties.syncDatabaseId", type: { name: "String" } }, - fromBackupResourceId: { - serializedName: "properties.fromBackupResourceId", + lastAliveTime: { + serializedName: "properties.lastAliveTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - toBackupResourceId: { - serializedName: "properties.toBackupResourceId", + state: { + serializedName: "properties.state", readOnly: true, type: { name: "String" } }, - targetBackupStorageRedundancy: { - serializedName: "properties.targetBackupStorageRedundancy", + isUpToDate: { + serializedName: "properties.isUpToDate", readOnly: true, type: { - name: "String" + name: "Boolean" } }, - status: { - serializedName: "properties.status", + expiryTime: { + serializedName: "properties.expiryTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - message: { - serializedName: "properties.message", + version: { + serializedName: "properties.version", readOnly: true, type: { name: "String" @@ -13205,24 +14910,38 @@ export const LongTermRetentionBackupOperationResult: coreClient.CompositeMapper } }; -export const LongTermRetentionBackup: coreClient.CompositeMapper = { +export const SyncAgentLinkedDatabase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LongTermRetentionBackup", + className: "SyncAgentLinkedDatabase", modelProperties: { ...ProxyResource.type.modelProperties, - serverName: { - serializedName: "properties.serverName", + databaseType: { + serializedName: "properties.databaseType", readOnly: true, type: { name: "String" } }, - serverCreateTime: { - serializedName: "properties.serverCreateTime", + databaseId: { + serializedName: "properties.databaseId", readOnly: true, type: { - name: "DateTime" + name: "String" + } + }, + description: { + serializedName: "properties.description", + readOnly: true, + type: { + name: "String" + } + }, + serverName: { + serializedName: "properties.serverName", + readOnly: true, + type: { + name: "String" } }, databaseName: { @@ -13232,94 +14951,101 @@ export const LongTermRetentionBackup: coreClient.CompositeMapper = { name: "String" } }, - databaseDeletionTime: { - serializedName: "properties.databaseDeletionTime", + userName: { + serializedName: "properties.userName", readOnly: true, type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const SyncGroup: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SyncGroup", + modelProperties: { + ...ProxyResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" } }, - backupTime: { - serializedName: "properties.backupTime", - readOnly: true, + interval: { + serializedName: "properties.interval", type: { - name: "DateTime" + name: "Number" } }, - backupExpirationTime: { - serializedName: "properties.backupExpirationTime", + lastSyncTime: { + serializedName: "properties.lastSyncTime", readOnly: true, type: { name: "DateTime" } }, - backupStorageRedundancy: { - serializedName: "properties.backupStorageRedundancy", - readOnly: true, + conflictResolutionPolicy: { + serializedName: "properties.conflictResolutionPolicy", type: { name: "String" } }, - requestedBackupStorageRedundancy: { - serializedName: "properties.requestedBackupStorageRedundancy", + syncDatabaseId: { + serializedName: "properties.syncDatabaseId", type: { name: "String" } - } - } - } -}; - -export const ManagedInstanceLongTermRetentionBackup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedInstanceLongTermRetentionBackup", - modelProperties: { - ...ProxyResource.type.modelProperties, - managedInstanceName: { - serializedName: "properties.managedInstanceName", - readOnly: true, + }, + hubDatabaseUserName: { + serializedName: "properties.hubDatabaseUserName", type: { name: "String" } }, - managedInstanceCreateTime: { - serializedName: "properties.managedInstanceCreateTime", - readOnly: true, + hubDatabasePassword: { + serializedName: "properties.hubDatabasePassword", type: { - name: "DateTime" + name: "String" } }, - databaseName: { - serializedName: "properties.databaseName", + syncState: { + serializedName: "properties.syncState", readOnly: true, type: { name: "String" } }, - databaseDeletionTime: { - serializedName: "properties.databaseDeletionTime", - readOnly: true, + schema: { + serializedName: "properties.schema", type: { - name: "DateTime" + name: "Composite", + className: "SyncGroupSchema" } }, - backupTime: { - serializedName: "properties.backupTime", - readOnly: true, + enableConflictLogging: { + serializedName: "properties.enableConflictLogging", type: { - name: "DateTime" + name: "Boolean" } }, - backupExpirationTime: { - serializedName: "properties.backupExpirationTime", - readOnly: true, + conflictLoggingRetentionInDays: { + serializedName: "properties.conflictLoggingRetentionInDays", type: { - name: "DateTime" + name: "Number" } }, - backupStorageRedundancy: { - serializedName: "properties.backupStorageRedundancy", + usePrivateLinkConnection: { + serializedName: "properties.usePrivateLinkConnection", + type: { + name: "Boolean" + } + }, + privateEndpointName: { + serializedName: "properties.privateEndpointName", readOnly: true, type: { name: "String" @@ -13329,69 +15055,81 @@ export const ManagedInstanceLongTermRetentionBackup: coreClient.CompositeMapper } }; -export const RestorableDroppedDatabase: coreClient.CompositeMapper = { +export const SyncMember: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableDroppedDatabase", + className: "SyncMember", modelProperties: { ...ProxyResource.type.modelProperties, - sku: { - serializedName: "sku", + databaseType: { + serializedName: "properties.databaseType", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - location: { - serializedName: "location", + syncAgentId: { + serializedName: "properties.syncAgentId", type: { name: "String" } }, - tags: { - serializedName: "tags", + sqlServerDatabaseId: { + serializedName: "properties.sqlServerDatabaseId", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Uuid" } }, - databaseName: { - serializedName: "properties.databaseName", - readOnly: true, + syncMemberAzureDatabaseResourceId: { + serializedName: "properties.syncMemberAzureDatabaseResourceId", type: { name: "String" } }, - maxSizeBytes: { - serializedName: "properties.maxSizeBytes", - readOnly: true, + usePrivateLinkConnection: { + serializedName: "properties.usePrivateLinkConnection", type: { - name: "Number" + name: "Boolean" } }, - creationDate: { - serializedName: "properties.creationDate", + privateEndpointName: { + serializedName: "properties.privateEndpointName", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - deletionDate: { - serializedName: "properties.deletionDate", - readOnly: true, + serverName: { + serializedName: "properties.serverName", type: { - name: "DateTime" + name: "String" } }, - earliestRestoreDate: { - serializedName: "properties.earliestRestoreDate", - readOnly: true, + databaseName: { + serializedName: "properties.databaseName", type: { - name: "DateTime" + name: "String" } }, - backupStorageRedundancy: { - serializedName: "properties.backupStorageRedundancy", + userName: { + serializedName: "properties.userName", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + type: { + name: "String" + } + }, + syncDirection: { + serializedName: "properties.syncDirection", + type: { + name: "String" + } + }, + syncState: { + serializedName: "properties.syncState", readOnly: true, type: { name: "String" @@ -13401,28 +15139,56 @@ export const RestorableDroppedDatabase: coreClient.CompositeMapper = { } }; -export const ServerConnectionPolicy: coreClient.CompositeMapper = { +export const TimeZone: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServerConnectionPolicy", + className: "TimeZone", modelProperties: { ...ProxyResource.type.modelProperties, - location: { - serializedName: "location", + timeZoneId: { + serializedName: "properties.timeZoneId", readOnly: true, type: { name: "String" } }, - kind: { - serializedName: "kind", + displayName: { + serializedName: "properties.displayName", readOnly: true, type: { name: "String" } - }, - connectionType: { - serializedName: "properties.connectionType", + } + } + } +}; + +export const LogicalDatabaseTransparentDataEncryption: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogicalDatabaseTransparentDataEncryption", + modelProperties: { + ...ProxyResource.type.modelProperties, + state: { + serializedName: "properties.state", + type: { + name: "Enum", + allowedValues: ["Enabled", "Disabled"] + } + } + } + } +}; + +export const UpdateVirtualClusterDnsServersOperation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "UpdateVirtualClusterDnsServersOperation", + modelProperties: { + ...ProxyResource.type.modelProperties, + status: { + serializedName: "properties.status", + readOnly: true, type: { name: "String" } @@ -13431,24 +15197,22 @@ export const ServerConnectionPolicy: coreClient.CompositeMapper = { } }; -export const ElasticPool: coreClient.CompositeMapper = { +export const VirtualNetworkRule: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ElasticPool", + className: "VirtualNetworkRule", modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", + ...ProxyResource.type.modelProperties, + virtualNetworkSubnetId: { + serializedName: "properties.virtualNetworkSubnetId", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - kind: { - serializedName: "kind", - readOnly: true, + ignoreMissingVnetServiceEndpoint: { + serializedName: "properties.ignoreMissingVnetServiceEndpoint", type: { - name: "String" + name: "Boolean" } }, state: { @@ -13457,41 +15221,49 @@ export const ElasticPool: coreClient.CompositeMapper = { type: { name: "String" } - }, - creationDate: { - serializedName: "properties.creationDate", - readOnly: true, + } + } + } +}; + +export const WorkloadClassifier: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkloadClassifier", + modelProperties: { + ...ProxyResource.type.modelProperties, + memberName: { + serializedName: "properties.memberName", type: { - name: "DateTime" + name: "String" } }, - maxSizeBytes: { - serializedName: "properties.maxSizeBytes", + label: { + serializedName: "properties.label", type: { - name: "Number" + name: "String" } }, - perDatabaseSettings: { - serializedName: "properties.perDatabaseSettings", + context: { + serializedName: "properties.context", type: { - name: "Composite", - className: "ElasticPoolPerDatabaseSettings" + name: "String" } }, - zoneRedundant: { - serializedName: "properties.zoneRedundant", + startTime: { + serializedName: "properties.startTime", type: { - name: "Boolean" + name: "String" } }, - licenseType: { - serializedName: "properties.licenseType", + endTime: { + serializedName: "properties.endTime", type: { name: "String" } }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", + importance: { + serializedName: "properties.importance", type: { name: "String" } @@ -13500,45 +15272,56 @@ export const ElasticPool: coreClient.CompositeMapper = { } }; -export const InstancePool: coreClient.CompositeMapper = { +export const WorkloadGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "InstancePool", + className: "WorkloadGroup", modelProperties: { - ...TrackedResource.type.modelProperties, - sku: { - serializedName: "sku", + ...ProxyResource.type.modelProperties, + minResourcePercent: { + serializedName: "properties.minResourcePercent", type: { - name: "Composite", - className: "Sku" + name: "Number" } }, - subnetId: { - serializedName: "properties.subnetId", + maxResourcePercent: { + serializedName: "properties.maxResourcePercent", type: { - name: "String" + name: "Number" } }, - vCores: { - serializedName: "properties.vCores", + minResourcePercentPerRequest: { + serializedName: "properties.minResourcePercentPerRequest", type: { name: "Number" } }, - licenseType: { - serializedName: "properties.licenseType", + maxResourcePercentPerRequest: { + serializedName: "properties.maxResourcePercentPerRequest", + type: { + name: "Number" + } + }, + importance: { + serializedName: "properties.importance", type: { name: "String" } + }, + queryExecutionTimeout: { + serializedName: "properties.queryExecutionTimeout", + type: { + name: "Number" + } } } } }; -export const JobAgent: coreClient.CompositeMapper = { +export const Database: coreClient.CompositeMapper = { type: { name: "Composite", - className: "JobAgent", + className: "Database", modelProperties: { ...TrackedResource.type.modelProperties, sku: { @@ -13548,35 +15331,63 @@ export const JobAgent: coreClient.CompositeMapper = { className: "Sku" } }, - databaseId: { - serializedName: "properties.databaseId", + kind: { + serializedName: "kind", + readOnly: true, type: { name: "String" } }, - state: { - serializedName: "properties.state", + managedBy: { + serializedName: "managedBy", readOnly: true, type: { name: "String" } - } - } - } -}; - -export const ManagedDatabase: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedDatabase", - modelProperties: { - ...TrackedResource.type.modelProperties, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "DatabaseIdentity" + } + }, + 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: { serializedName: "properties.status", readOnly: true, @@ -13584,6 +15395,13 @@ export const ManagedDatabase: coreClient.CompositeMapper = { name: "String" } }, + databaseId: { + serializedName: "properties.databaseId", + readOnly: true, + type: { + name: "Uuid" + } + }, creationDate: { serializedName: "properties.creationDate", readOnly: true, @@ -13591,17 +15409,18 @@ export const ManagedDatabase: coreClient.CompositeMapper = { name: "DateTime" } }, - earliestRestorePoint: { - serializedName: "properties.earliestRestorePoint", + currentServiceObjectiveName: { + serializedName: "properties.currentServiceObjectiveName", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - restorePointInTime: { - serializedName: "properties.restorePointInTime", + requestedServiceObjectiveName: { + serializedName: "properties.requestedServiceObjectiveName", + readOnly: true, type: { - name: "DateTime" + name: "String" } }, defaultSecondaryLocation: { @@ -13611,229 +15430,209 @@ export const ManagedDatabase: coreClient.CompositeMapper = { name: "String" } }, - catalogCollation: { - serializedName: "properties.catalogCollation", + failoverGroupId: { + serializedName: "properties.failoverGroupId", + readOnly: true, type: { name: "String" } }, - createMode: { - serializedName: "properties.createMode", + restorePointInTime: { + serializedName: "properties.restorePointInTime", type: { - name: "String" + name: "DateTime" } }, - storageContainerUri: { - serializedName: "properties.storageContainerUri", + sourceDatabaseDeletionDate: { + serializedName: "properties.sourceDatabaseDeletionDate", type: { - name: "String" + name: "DateTime" } }, - sourceDatabaseId: { - serializedName: "properties.sourceDatabaseId", + recoveryServicesRecoveryPointId: { + serializedName: "properties.recoveryServicesRecoveryPointId", type: { name: "String" } }, - restorableDroppedDatabaseId: { - serializedName: "properties.restorableDroppedDatabaseId", + longTermRetentionBackupResourceId: { + serializedName: "properties.longTermRetentionBackupResourceId", type: { name: "String" } }, - storageContainerSasToken: { - serializedName: "properties.storageContainerSasToken", + recoverableDatabaseId: { + serializedName: "properties.recoverableDatabaseId", type: { name: "String" } }, - failoverGroupId: { - serializedName: "properties.failoverGroupId", - readOnly: true, + restorableDroppedDatabaseId: { + serializedName: "properties.restorableDroppedDatabaseId", type: { name: "String" } }, - recoverableDatabaseId: { - serializedName: "properties.recoverableDatabaseId", + catalogCollation: { + serializedName: "properties.catalogCollation", type: { name: "String" } }, - longTermRetentionBackupResourceId: { - serializedName: "properties.longTermRetentionBackupResourceId", + zoneRedundant: { + serializedName: "properties.zoneRedundant", type: { - name: "String" + name: "Boolean" } }, - autoCompleteRestore: { - serializedName: "properties.autoCompleteRestore", + licenseType: { + serializedName: "properties.licenseType", type: { - name: "Boolean" + name: "String" } }, - lastBackupName: { - serializedName: "properties.lastBackupName", + maxLogSizeBytes: { + serializedName: "properties.maxLogSizeBytes", + readOnly: true, type: { - name: "String" + name: "Number" } - } - } - } -}; - -export const VirtualCluster: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "VirtualCluster", - modelProperties: { - ...TrackedResource.type.modelProperties, - subnetId: { - serializedName: "properties.subnetId", + }, + earliestRestoreDate: { + serializedName: "properties.earliestRestoreDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - family: { - serializedName: "properties.family", + readScale: { + serializedName: "properties.readScale", type: { name: "String" } }, - childResources: { - serializedName: "properties.childResources", - readOnly: true, + highAvailabilityReplicaCount: { + serializedName: "properties.highAvailabilityReplicaCount", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", + secondaryType: { + serializedName: "properties.secondaryType", type: { name: "String" } - } - } - } -}; - -export const Server: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Server", - modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + }, + currentSku: { + serializedName: "properties.currentSku", type: { name: "Composite", - className: "ResourceIdentity" + className: "Sku" } }, - kind: { - serializedName: "kind", - readOnly: true, + autoPauseDelay: { + serializedName: "properties.autoPauseDelay", type: { - name: "String" + name: "Number" } }, - administratorLogin: { - serializedName: "properties.administratorLogin", + currentBackupStorageRedundancy: { + serializedName: "properties.currentBackupStorageRedundancy", + readOnly: true, type: { name: "String" } }, - administratorLoginPassword: { - serializedName: "properties.administratorLoginPassword", + requestedBackupStorageRedundancy: { + serializedName: "properties.requestedBackupStorageRedundancy", type: { name: "String" } }, - version: { - serializedName: "properties.version", + minCapacity: { + serializedName: "properties.minCapacity", type: { - name: "String" + name: "Number" } }, - state: { - serializedName: "properties.state", + pausedDate: { + serializedName: "properties.pausedDate", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - fullyQualifiedDomainName: { - serializedName: "properties.fullyQualifiedDomainName", + resumedDate: { + serializedName: "properties.resumedDate", readOnly: true, + type: { + name: "DateTime" + } + }, + maintenanceConfigurationId: { + serializedName: "properties.maintenanceConfigurationId", type: { name: "String" } }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", + isLedgerOn: { + serializedName: "properties.isLedgerOn", + type: { + name: "Boolean" + } + }, + isInfraEncryptionEnabled: { + serializedName: "properties.isInfraEncryptionEnabled", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServerPrivateEndpointConnection" - } - } + name: "Boolean" } }, - minimalTlsVersion: { - serializedName: "properties.minimalTlsVersion", + federatedClientId: { + serializedName: "properties.federatedClientId", type: { - name: "String" + name: "Uuid" } }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", + keys: { + serializedName: "properties.keys", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "Composite", className: "DatabaseKey" } } } }, - workspaceFeature: { - serializedName: "properties.workspaceFeature", - readOnly: true, + encryptionProtector: { + serializedName: "properties.encryptionProtector", type: { name: "String" } }, - primaryUserAssignedIdentityId: { - serializedName: "properties.primaryUserAssignedIdentityId", + preferredEnclaveType: { + serializedName: "properties.preferredEnclaveType", type: { name: "String" } }, - federatedClientId: { - serializedName: "properties.federatedClientId", + sourceResourceId: { + serializedName: "properties.sourceResourceId", type: { - name: "Uuid" + name: "String" } }, - keyId: { - serializedName: "properties.keyId", + manualCutover: { + serializedName: "properties.manualCutover", type: { - name: "String" + name: "Boolean" } }, - administrators: { - serializedName: "properties.administrators", + performCutover: { + serializedName: "properties.performCutover", type: { - name: "Composite", - className: "ServerExternalAdministrator" + name: "Boolean" } }, - restrictOutboundNetworkAccess: { - serializedName: "properties.restrictOutboundNetworkAccess", + availabilityZone: { + serializedName: "properties.availabilityZone", type: { name: "String" } @@ -13842,10 +15641,10 @@ export const Server: coreClient.CompositeMapper = { } }; -export const Database: coreClient.CompositeMapper = { +export const ElasticPool: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Database", + className: "ElasticPool", modelProperties: { ...TrackedResource.type.modelProperties, sku: { @@ -13862,30 +15661,18 @@ export const Database: coreClient.CompositeMapper = { name: "String" } }, - managedBy: { - serializedName: "managedBy", + state: { + serializedName: "properties.state", readOnly: true, type: { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "DatabaseIdentity" - } - }, - createMode: { - serializedName: "properties.createMode", - type: { - name: "String" - } - }, - collation: { - serializedName: "properties.collation", + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, maxSizeBytes: { @@ -13894,234 +15681,266 @@ export const Database: coreClient.CompositeMapper = { name: "Number" } }, - sampleName: { - serializedName: "properties.sampleName", + minCapacity: { + serializedName: "properties.minCapacity", type: { - name: "String" + name: "Number" } }, - elasticPoolId: { - serializedName: "properties.elasticPoolId", + perDatabaseSettings: { + serializedName: "properties.perDatabaseSettings", type: { - name: "String" + name: "Composite", + className: "ElasticPoolPerDatabaseSettings" } }, - sourceDatabaseId: { - serializedName: "properties.sourceDatabaseId", + zoneRedundant: { + serializedName: "properties.zoneRedundant", type: { - name: "String" + name: "Boolean" } }, - status: { - serializedName: "properties.status", - readOnly: true, + licenseType: { + serializedName: "properties.licenseType", type: { name: "String" } }, - databaseId: { - serializedName: "properties.databaseId", - readOnly: true, + maintenanceConfigurationId: { + serializedName: "properties.maintenanceConfigurationId", type: { - name: "Uuid" + name: "String" } }, - creationDate: { - serializedName: "properties.creationDate", - readOnly: true, + highAvailabilityReplicaCount: { + serializedName: "properties.highAvailabilityReplicaCount", type: { - name: "DateTime" + name: "Number" } }, - currentServiceObjectiveName: { - serializedName: "properties.currentServiceObjectiveName", - readOnly: true, + preferredEnclaveType: { + serializedName: "properties.preferredEnclaveType", type: { name: "String" } }, - requestedServiceObjectiveName: { - serializedName: "properties.requestedServiceObjectiveName", - readOnly: true, + availabilityZone: { + serializedName: "properties.availabilityZone", type: { name: "String" } - }, - defaultSecondaryLocation: { - serializedName: "properties.defaultSecondaryLocation", - readOnly: true, + } + } + } +}; + +export const InstancePool: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "InstancePool", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", type: { - name: "String" + name: "Composite", + className: "Sku" } }, - failoverGroupId: { - serializedName: "properties.failoverGroupId", - readOnly: true, + subnetId: { + serializedName: "properties.subnetId", type: { name: "String" } }, - restorePointInTime: { - serializedName: "properties.restorePointInTime", + vCores: { + serializedName: "properties.vCores", type: { - name: "DateTime" + name: "Number" } }, - sourceDatabaseDeletionDate: { - serializedName: "properties.sourceDatabaseDeletionDate", + licenseType: { + serializedName: "properties.licenseType", type: { - name: "DateTime" + name: "String" + } + } + } + } +}; + +export const JobAgent: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "JobAgent", + modelProperties: { + ...TrackedResource.type.modelProperties, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" } }, - recoveryServicesRecoveryPointId: { - serializedName: "properties.recoveryServicesRecoveryPointId", + databaseId: { + serializedName: "properties.databaseId", type: { name: "String" } }, - longTermRetentionBackupResourceId: { - serializedName: "properties.longTermRetentionBackupResourceId", + state: { + serializedName: "properties.state", + readOnly: true, type: { name: "String" } - }, - recoverableDatabaseId: { - serializedName: "properties.recoverableDatabaseId", + } + } + } +}; + +export const ManagedDatabase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedDatabase", + modelProperties: { + ...TrackedResource.type.modelProperties, + collation: { + serializedName: "properties.collation", type: { name: "String" } }, - restorableDroppedDatabaseId: { - serializedName: "properties.restorableDroppedDatabaseId", + status: { + serializedName: "properties.status", + readOnly: true, type: { name: "String" } }, - catalogCollation: { - serializedName: "properties.catalogCollation", + creationDate: { + serializedName: "properties.creationDate", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - zoneRedundant: { - serializedName: "properties.zoneRedundant", + earliestRestorePoint: { + serializedName: "properties.earliestRestorePoint", + readOnly: true, type: { - name: "Boolean" + name: "DateTime" } }, - licenseType: { - serializedName: "properties.licenseType", + restorePointInTime: { + serializedName: "properties.restorePointInTime", type: { - name: "String" + name: "DateTime" } }, - maxLogSizeBytes: { - serializedName: "properties.maxLogSizeBytes", + defaultSecondaryLocation: { + serializedName: "properties.defaultSecondaryLocation", readOnly: true, type: { - name: "Number" + name: "String" } }, - earliestRestoreDate: { - serializedName: "properties.earliestRestoreDate", - readOnly: true, + catalogCollation: { + serializedName: "properties.catalogCollation", type: { - name: "DateTime" + name: "String" } }, - readScale: { - serializedName: "properties.readScale", + createMode: { + serializedName: "properties.createMode", type: { name: "String" } }, - highAvailabilityReplicaCount: { - serializedName: "properties.highAvailabilityReplicaCount", + storageContainerUri: { + serializedName: "properties.storageContainerUri", type: { - name: "Number" + name: "String" } }, - secondaryType: { - serializedName: "properties.secondaryType", + sourceDatabaseId: { + serializedName: "properties.sourceDatabaseId", type: { name: "String" } }, - currentSku: { - serializedName: "properties.currentSku", + crossSubscriptionSourceDatabaseId: { + serializedName: "properties.crossSubscriptionSourceDatabaseId", type: { - name: "Composite", - className: "Sku" + name: "String" } }, - autoPauseDelay: { - serializedName: "properties.autoPauseDelay", + restorableDroppedDatabaseId: { + serializedName: "properties.restorableDroppedDatabaseId", type: { - name: "Number" + name: "String" } }, - currentBackupStorageRedundancy: { - serializedName: "properties.currentBackupStorageRedundancy", - readOnly: true, + crossSubscriptionRestorableDroppedDatabaseId: { + serializedName: + "properties.crossSubscriptionRestorableDroppedDatabaseId", type: { name: "String" } }, - requestedBackupStorageRedundancy: { - serializedName: "properties.requestedBackupStorageRedundancy", + storageContainerIdentity: { + serializedName: "properties.storageContainerIdentity", type: { name: "String" } }, - minCapacity: { - serializedName: "properties.minCapacity", + storageContainerSasToken: { + serializedName: "properties.storageContainerSasToken", type: { - name: "Number" + name: "String" } }, - pausedDate: { - serializedName: "properties.pausedDate", + failoverGroupId: { + serializedName: "properties.failoverGroupId", readOnly: true, type: { - name: "DateTime" + name: "String" } }, - resumedDate: { - serializedName: "properties.resumedDate", - readOnly: true, + recoverableDatabaseId: { + serializedName: "properties.recoverableDatabaseId", type: { - name: "DateTime" + name: "String" } }, - maintenanceConfigurationId: { - serializedName: "properties.maintenanceConfigurationId", + longTermRetentionBackupResourceId: { + serializedName: "properties.longTermRetentionBackupResourceId", type: { name: "String" } }, - isLedgerOn: { - serializedName: "properties.isLedgerOn", + autoCompleteRestore: { + serializedName: "properties.autoCompleteRestore", type: { name: "Boolean" } }, - isInfraEncryptionEnabled: { - serializedName: "properties.isInfraEncryptionEnabled", - readOnly: true, + lastBackupName: { + serializedName: "properties.lastBackupName", type: { - name: "Boolean" + name: "String" } }, - federatedClientId: { - serializedName: "properties.federatedClientId", + crossSubscriptionTargetManagedInstanceId: { + serializedName: "properties.crossSubscriptionTargetManagedInstanceId", type: { - name: "Uuid" + name: "String" } }, - primaryDelegatedIdentityClientId: { - serializedName: "properties.primaryDelegatedIdentityClientId", + isLedgerOn: { + serializedName: "properties.isLedgerOn", type: { - name: "Uuid" + name: "Boolean" } } } @@ -14378,6 +16197,167 @@ export const RestorableDroppedManagedDatabase: coreClient.CompositeMapper = { } }; +export const Server: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Server", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ResourceIdentity" + } + }, + kind: { + serializedName: "kind", + readOnly: true, + 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: { + serializedName: "properties.state", + readOnly: true, + type: { + name: "String" + } + }, + fullyQualifiedDomainName: { + serializedName: "properties.fullyQualifiedDomainName", + readOnly: true, + type: { + name: "String" + } + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServerPrivateEndpointConnection" + } + } + } + }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String" + } + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String" + } + }, + workspaceFeature: { + serializedName: "properties.workspaceFeature", + readOnly: true, + type: { + name: "String" + } + }, + primaryUserAssignedIdentityId: { + serializedName: "properties.primaryUserAssignedIdentityId", + type: { + name: "String" + } + }, + federatedClientId: { + serializedName: "properties.federatedClientId", + type: { + name: "Uuid" + } + }, + keyId: { + serializedName: "properties.keyId", + type: { + name: "String" + } + }, + administrators: { + serializedName: "properties.administrators", + type: { + name: "Composite", + className: "ServerExternalAdministrator" + } + }, + restrictOutboundNetworkAccess: { + serializedName: "properties.restrictOutboundNetworkAccess", + type: { + name: "String" + } + }, + externalGovernanceStatus: { + serializedName: "properties.externalGovernanceStatus", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const VirtualCluster: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "VirtualCluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + subnetId: { + serializedName: "properties.subnetId", + readOnly: true, + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + childResources: { + serializedName: "properties.childResources", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const FirewallRule: coreClient.CompositeMapper = { type: { name: "Composite", @@ -14399,3 +16379,25 @@ export const FirewallRule: coreClient.CompositeMapper = { } } }; + +export const IPv6FirewallRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "IPv6FirewallRule", + modelProperties: { + ...ProxyResourceWithWritableName.type.modelProperties, + startIPv6Address: { + serializedName: "properties.startIPv6Address", + type: { + name: "String" + } + }, + endIPv6Address: { + serializedName: "properties.endIPv6Address", + type: { + name: "String" + } + } + } + } +}; diff --git a/sdk/sql/arm-sql/src/models/parameters.ts b/sdk/sql/arm-sql/src/models/parameters.ts index 05db327b8b26..7c3499556a4b 100644 --- a/sdk/sql/arm-sql/src/models/parameters.ts +++ b/sdk/sql/arm-sql/src/models/parameters.ts @@ -12,95 +12,111 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - DataMaskingPolicy as DataMaskingPolicyMapper, - DataMaskingRule as DataMaskingRuleMapper, - GeoBackupPolicy as GeoBackupPolicyMapper, - Database as DatabaseMapper, - DatabaseUpdate as DatabaseUpdateMapper, - ResourceMoveDefinition as ResourceMoveDefinitionMapper, - ImportExistingDatabaseDefinition as ImportExistingDatabaseDefinitionMapper, - ExportDatabaseDefinition as ExportDatabaseDefinitionMapper, - ElasticPool as ElasticPoolMapper, - ElasticPoolUpdate as ElasticPoolUpdateMapper, - UnlinkParameters as UnlinkParametersMapper, - ServerCommunicationLink as ServerCommunicationLinkMapper, - ExtendedDatabaseBlobAuditingPolicy as ExtendedDatabaseBlobAuditingPolicyMapper, - ExtendedServerBlobAuditingPolicy as ExtendedServerBlobAuditingPolicyMapper, + BackupShortTermRetentionPolicy as BackupShortTermRetentionPolicyMapper, ServerBlobAuditingPolicy as ServerBlobAuditingPolicyMapper, DatabaseBlobAuditingPolicy as DatabaseBlobAuditingPolicyMapper, + ExtendedDatabaseBlobAuditingPolicy as ExtendedDatabaseBlobAuditingPolicyMapper, + ExtendedServerBlobAuditingPolicy as ExtendedServerBlobAuditingPolicyMapper, + DataMaskingPolicy as DataMaskingPolicyMapper, + DataMaskingRule as DataMaskingRuleMapper, + DatabaseAdvancedThreatProtection as DatabaseAdvancedThreatProtectionMapper, Advisor as AdvisorMapper, DatabaseAutomaticTuning as DatabaseAutomaticTuningMapper, + DatabaseExtensions as DatabaseExtensionsMapper, RecommendedAction as RecommendedActionMapper, DatabaseSecurityAlertPolicy as DatabaseSecurityAlertPolicyMapper, + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput as DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputMapper, + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput as DatabaseSqlVulnerabilityAssessmentRuleBaselineInputMapper, DatabaseVulnerabilityAssessmentRuleBaseline as DatabaseVulnerabilityAssessmentRuleBaselineMapper, DatabaseVulnerabilityAssessment as DatabaseVulnerabilityAssessmentMapper, + Database as DatabaseMapper, + DatabaseUpdate as DatabaseUpdateMapper, + ExportDatabaseDefinition as ExportDatabaseDefinitionMapper, + ImportExistingDatabaseDefinition as ImportExistingDatabaseDefinitionMapper, + ResourceMoveDefinition as ResourceMoveDefinitionMapper, + DistributedAvailabilityGroup as DistributedAvailabilityGroupMapper, + DistributedAvailabilityGroupSetRole as DistributedAvailabilityGroupSetRoleMapper, + ElasticPool as ElasticPoolMapper, + ElasticPoolUpdate as ElasticPoolUpdateMapper, EncryptionProtector as EncryptionProtectorMapper, FailoverGroup as FailoverGroupMapper, FailoverGroupUpdate as FailoverGroupUpdateMapper, - FirewallRule as FirewallRuleMapper, FirewallRuleList as FirewallRuleListMapper, + FirewallRule as FirewallRuleMapper, + GeoBackupPolicy as GeoBackupPolicyMapper, + IPv6FirewallRule as IPv6FirewallRuleMapper, InstanceFailoverGroup as InstanceFailoverGroupMapper, InstancePool as InstancePoolMapper, InstancePoolUpdate as InstancePoolUpdateMapper, JobAgent as JobAgentMapper, JobAgentUpdate as JobAgentUpdateMapper, JobCredential as JobCredentialMapper, - Job as JobMapper, JobStep as JobStepMapper, JobTargetGroup as JobTargetGroupMapper, + Job as JobMapper, + LedgerDigestUploads as LedgerDigestUploadsMapper, + CopyLongTermRetentionBackupParameters as CopyLongTermRetentionBackupParametersMapper, + UpdateLongTermRetentionBackupParameters as UpdateLongTermRetentionBackupParametersMapper, LongTermRetentionPolicy as LongTermRetentionPolicyMapper, MaintenanceWindows as MaintenanceWindowsMapper, ManagedBackupShortTermRetentionPolicy as ManagedBackupShortTermRetentionPolicyMapper, - ManagedDatabase as ManagedDatabaseMapper, - ManagedDatabaseUpdate as ManagedDatabaseUpdateMapper, - CompleteDatabaseRestoreDefinition as CompleteDatabaseRestoreDefinitionMapper, + ManagedDatabaseAdvancedThreatProtection as ManagedDatabaseAdvancedThreatProtectionMapper, ManagedDatabaseSecurityAlertPolicy as ManagedDatabaseSecurityAlertPolicyMapper, - SensitivityLabel as SensitivityLabelMapper, SensitivityLabelUpdateList as SensitivityLabelUpdateListMapper, + SensitivityLabel as SensitivityLabelMapper, RecommendedSensitivityLabelUpdateList as RecommendedSensitivityLabelUpdateListMapper, ManagedTransparentDataEncryption as ManagedTransparentDataEncryptionMapper, + ManagedDatabase as ManagedDatabaseMapper, + ManagedDatabaseUpdate as ManagedDatabaseUpdateMapper, + ManagedDatabaseMoveDefinition as ManagedDatabaseMoveDefinitionMapper, + CompleteDatabaseRestoreDefinition as CompleteDatabaseRestoreDefinitionMapper, + ManagedDatabaseStartMoveDefinition as ManagedDatabaseStartMoveDefinitionMapper, ManagedInstanceAdministrator as ManagedInstanceAdministratorMapper, + ManagedInstanceAdvancedThreatProtection as ManagedInstanceAdvancedThreatProtectionMapper, ManagedInstanceAzureADOnlyAuthentication as ManagedInstanceAzureADOnlyAuthenticationMapper, + ManagedInstanceDtc as ManagedInstanceDtcMapper, ManagedInstanceEncryptionProtector as ManagedInstanceEncryptionProtectorMapper, ManagedInstanceKey as ManagedInstanceKeyMapper, ManagedInstanceLongTermRetentionPolicy as ManagedInstanceLongTermRetentionPolicyMapper, ManagedInstancePrivateEndpointConnection as ManagedInstancePrivateEndpointConnectionMapper, TdeCertificate as TdeCertificateMapper, ManagedInstanceVulnerabilityAssessment as ManagedInstanceVulnerabilityAssessmentMapper, + ManagedInstance as ManagedInstanceMapper, + ManagedInstanceUpdate as ManagedInstanceUpdateMapper, + ManagedLedgerDigestUploads as ManagedLedgerDigestUploadsMapper, + ManagedServerDnsAliasCreation as ManagedServerDnsAliasCreationMapper, + ManagedServerDnsAliasAcquisition as ManagedServerDnsAliasAcquisitionMapper, ManagedServerSecurityAlertPolicy as ManagedServerSecurityAlertPolicyMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, CreateDatabaseRestorePointDefinition as CreateDatabaseRestorePointDefinitionMapper, + ServerAdvancedThreatProtection as ServerAdvancedThreatProtectionMapper, ServerAutomaticTuning as ServerAutomaticTuningMapper, ServerAzureADAdministrator as ServerAzureADAdministratorMapper, ServerAzureADOnlyAuthentication as ServerAzureADOnlyAuthenticationMapper, + ServerConfigurationOption as ServerConfigurationOptionMapper, + ServerConnectionPolicy as ServerConnectionPolicyMapper, ServerDevOpsAuditingSettings as ServerDevOpsAuditingSettingsMapper, ServerDnsAliasAcquisition as ServerDnsAliasAcquisitionMapper, ServerKey as ServerKeyMapper, ServerSecurityAlertPolicy as ServerSecurityAlertPolicyMapper, + ServerTrustCertificate as ServerTrustCertificateMapper, ServerTrustGroup as ServerTrustGroupMapper, ServerVulnerabilityAssessment as ServerVulnerabilityAssessmentMapper, + CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, + Server as ServerMapper, + ServerUpdate as ServerUpdateMapper, + ImportNewDatabaseDefinition as ImportNewDatabaseDefinitionMapper, SqlAgentConfiguration as SqlAgentConfigurationMapper, + SqlVulnerabilityAssessment as SqlVulnerabilityAssessmentMapper, + StartStopManagedInstanceSchedule as StartStopManagedInstanceScheduleMapper, SyncAgent as SyncAgentMapper, SyncGroup as SyncGroupMapper, SyncMember as SyncMemberMapper, + LogicalDatabaseTransparentDataEncryption as LogicalDatabaseTransparentDataEncryptionMapper, VirtualClusterUpdate as VirtualClusterUpdateMapper, VirtualNetworkRule as VirtualNetworkRuleMapper, WorkloadClassifier as WorkloadClassifierMapper, - WorkloadGroup as WorkloadGroupMapper, - LogicalDatabaseTransparentDataEncryption as LogicalDatabaseTransparentDataEncryptionMapper, - BackupShortTermRetentionPolicy as BackupShortTermRetentionPolicyMapper, - DatabaseExtensions as DatabaseExtensionsMapper, - LedgerDigestUploads as LedgerDigestUploadsMapper, - OutboundFirewallRule as OutboundFirewallRuleMapper, - Server as ServerMapper, - ServerUpdate as ServerUpdateMapper, - ImportNewDatabaseDefinition as ImportNewDatabaseDefinitionMapper, - CheckNameAvailabilityRequest as CheckNameAvailabilityRequestMapper, - CopyLongTermRetentionBackupParameters as CopyLongTermRetentionBackupParametersMapper, - UpdateLongTermRetentionBackupParameters as UpdateLongTermRetentionBackupParametersMapper, - ManagedInstance as ManagedInstanceMapper, - ManagedInstanceUpdate as ManagedInstanceUpdateMapper, - ServerConnectionPolicy as ServerConnectionPolicyMapper + WorkloadGroup as WorkloadGroupMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -127,29 +143,6 @@ export const $host: OperationURLParameter = { skipEncoding: true }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2014-04-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const subscriptionId: OperationURLParameter = { - parameterPath: "subscriptionId", - mapper: { - serializedName: "subscriptionId", - required: true, - type: { - name: "String" - } - } -}; - export const resourceGroupName: OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { @@ -183,44 +176,33 @@ export const databaseName: OperationURLParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], +export const subscriptionId: OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", + serializedName: "subscriptionId", + required: true, type: { name: "String" } } }; -export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: DataMaskingPolicyMapper -}; - -export const dataMaskingPolicyName: OperationURLParameter = { - parameterPath: "dataMaskingPolicyName", +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", mapper: { - defaultValue: "Default", + defaultValue: "2022-11-01-preview", isConstant: true, - serializedName: "dataMaskingPolicyName", + serializedName: "api-version", type: { name: "String" } } }; -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: DataMaskingRuleMapper -}; - -export const dataMaskingRuleName: OperationURLParameter = { - parameterPath: "dataMaskingRuleName", +export const policyName: OperationURLParameter = { + parameterPath: "policyName", mapper: { - serializedName: "dataMaskingRuleName", + serializedName: "policyName", required: true, type: { name: "String" @@ -228,69 +210,71 @@ export const dataMaskingRuleName: OperationURLParameter = { } }; -export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: GeoBackupPolicyMapper -}; - -export const geoBackupPolicyName: OperationURLParameter = { - parameterPath: "geoBackupPolicyName", +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], mapper: { - serializedName: "geoBackupPolicyName", - required: true, + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", type: { name: "String" } } }; -export const filter: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - type: { - name: "String" - } - } +export const parameters: OperationParameter = { + parameterPath: "parameters", + mapper: BackupShortTermRetentionPolicyMapper }; -export const skipToken: OperationQueryParameter = { - parameterPath: ["options", "skipToken"], +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", mapper: { - serializedName: "$skipToken", + serializedName: "nextLink", + required: true, type: { name: "String" } - } + }, + skipEncoding: true }; -export const apiVersion1: OperationQueryParameter = { - parameterPath: "apiVersion", +export const blobAuditingPolicyName: OperationURLParameter = { + parameterPath: "blobAuditingPolicyName", mapper: { - defaultValue: "2021-05-01-preview", + defaultValue: "default", isConstant: true, - serializedName: "api-version", + serializedName: "blobAuditingPolicyName", type: { name: "String" } } }; +export const parameters1: OperationParameter = { + parameterPath: "parameters", + mapper: ServerBlobAuditingPolicyMapper +}; + +export const parameters2: OperationParameter = { + parameterPath: "parameters", + mapper: DatabaseBlobAuditingPolicyMapper +}; + export const parameters3: OperationParameter = { parameterPath: "parameters", - mapper: DatabaseMapper + mapper: ExtendedDatabaseBlobAuditingPolicyMapper }; export const parameters4: OperationParameter = { parameterPath: "parameters", - mapper: DatabaseUpdateMapper + mapper: ExtendedServerBlobAuditingPolicyMapper }; -export const elasticPoolName: OperationURLParameter = { - parameterPath: "elasticPoolName", +export const dataMaskingPolicyName: OperationURLParameter = { + parameterPath: "dataMaskingPolicyName", mapper: { - serializedName: "elasticPoolName", + serializedName: "dataMaskingPolicyName", required: true, type: { name: "String" @@ -298,79 +282,42 @@ export const elasticPoolName: OperationURLParameter = { } }; -export const replicaType: OperationQueryParameter = { - parameterPath: ["options", "replicaType"], - mapper: { - serializedName: "replicaType", - type: { - name: "String" - } - } -}; - export const parameters5: OperationParameter = { parameterPath: "parameters", - mapper: ResourceMoveDefinitionMapper + mapper: DataMaskingPolicyMapper }; export const parameters6: OperationParameter = { parameterPath: "parameters", - mapper: ImportExistingDatabaseDefinitionMapper -}; - -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ExportDatabaseDefinitionMapper + mapper: DataMaskingRuleMapper }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", +export const dataMaskingRuleName: OperationURLParameter = { + parameterPath: "dataMaskingRuleName", mapper: { - serializedName: "nextLink", + serializedName: "dataMaskingRuleName", required: true, type: { name: "String" } - }, - skipEncoding: true -}; - -export const skip: OperationQueryParameter = { - parameterPath: ["options", "skip"], - mapper: { - serializedName: "$skip", - type: { - name: "Number" - } } }; -export const apiVersion2: OperationQueryParameter = { - parameterPath: "apiVersion", +export const dataWarehouseUserActivityName: OperationURLParameter = { + parameterPath: "dataWarehouseUserActivityName", mapper: { - defaultValue: "2020-11-01-preview", - isConstant: true, - serializedName: "api-version", + serializedName: "dataWarehouseUserActivityName", + required: true, type: { name: "String" } } }; -export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: ElasticPoolMapper -}; - -export const parameters9: OperationParameter = { - parameterPath: "parameters", - mapper: ElasticPoolUpdateMapper -}; - -export const linkId: OperationURLParameter = { - parameterPath: "linkId", +export const advancedThreatProtectionName: OperationURLParameter = { + parameterPath: "advancedThreatProtectionName", mapper: { - serializedName: "linkId", + serializedName: "advancedThreatProtectionName", required: true, type: { name: "String" @@ -378,27 +325,25 @@ export const linkId: OperationURLParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", - mapper: UnlinkParametersMapper + mapper: DatabaseAdvancedThreatProtectionMapper }; -export const apiVersion3: OperationQueryParameter = { - parameterPath: "apiVersion", +export const expand: OperationQueryParameter = { + parameterPath: ["options", "expand"], mapper: { - defaultValue: "2021-02-01-preview", - isConstant: true, - serializedName: "api-version", + serializedName: "$expand", type: { name: "String" } } }; -export const communicationLinkName: OperationURLParameter = { - parameterPath: "communicationLinkName", +export const advisorName: OperationURLParameter = { + parameterPath: "advisorName", mapper: { - serializedName: "communicationLinkName", + serializedName: "advisorName", required: true, type: { name: "String" @@ -406,83 +351,14 @@ export const communicationLinkName: OperationURLParameter = { } }; -export const parameters11: OperationParameter = { +export const parameters8: OperationParameter = { parameterPath: "parameters", - mapper: ServerCommunicationLinkMapper + mapper: AdvisorMapper }; -export const serviceObjectiveName: OperationURLParameter = { - parameterPath: "serviceObjectiveName", - mapper: { - serializedName: "serviceObjectiveName", - required: true, - type: { - name: "String" - } - } -}; - -export const blobAuditingPolicyName: OperationURLParameter = { - parameterPath: "blobAuditingPolicyName", - mapper: { - defaultValue: "default", - isConstant: true, - serializedName: "blobAuditingPolicyName", - type: { - name: "String" - } - } -}; - -export const parameters12: OperationParameter = { - parameterPath: "parameters", - mapper: ExtendedDatabaseBlobAuditingPolicyMapper -}; - -export const parameters13: OperationParameter = { - parameterPath: "parameters", - mapper: ExtendedServerBlobAuditingPolicyMapper -}; - -export const parameters14: OperationParameter = { - parameterPath: "parameters", - mapper: ServerBlobAuditingPolicyMapper -}; - -export const parameters15: OperationParameter = { - parameterPath: "parameters", - mapper: DatabaseBlobAuditingPolicyMapper -}; - -export const expand: OperationQueryParameter = { - parameterPath: ["options", "expand"], - mapper: { - serializedName: "$expand", - type: { - name: "String" - } - } -}; - -export const advisorName: OperationURLParameter = { - parameterPath: "advisorName", - mapper: { - serializedName: "advisorName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters16: OperationParameter = { - parameterPath: "parameters", - mapper: AdvisorMapper -}; - -export const parameters17: OperationParameter = { - parameterPath: "parameters", - mapper: DatabaseAutomaticTuningMapper +export const parameters9: OperationParameter = { + parameterPath: "parameters", + mapper: DatabaseAutomaticTuningMapper }; export const schema: OperationQueryParameter = { @@ -581,7 +457,7 @@ export const tableName: OperationURLParameter = { } }; -export const filter1: OperationQueryParameter = { +export const filter: OperationQueryParameter = { parameterPath: ["options", "filter"], mapper: { serializedName: "$filter", @@ -602,6 +478,44 @@ export const columnName: OperationURLParameter = { } }; +export const encryptionProtectorName: OperationURLParameter = { + parameterPath: "encryptionProtectorName", + mapper: { + serializedName: "encryptionProtectorName", + required: true, + type: { + name: "String" + } + } +}; + +export const extensionName: OperationURLParameter = { + parameterPath: "extensionName", + mapper: { + serializedName: "extensionName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: DatabaseExtensionsMapper +}; + +export const operationId: OperationURLParameter = { + parameterPath: "operationId", + mapper: { + serializedName: "operationId", + required: true, + type: { + name: "Uuid" + } + } +}; + export const recommendedActionName: OperationURLParameter = { parameterPath: "recommendedActionName", mapper: { @@ -613,7 +527,7 @@ export const recommendedActionName: OperationURLParameter = { } }; -export const parameters18: OperationParameter = { +export const parameters11: OperationParameter = { parameterPath: "parameters", mapper: RecommendedActionMapper }; @@ -629,7 +543,7 @@ export const securityAlertPolicyName: OperationURLParameter = { } }; -export const parameters19: OperationParameter = { +export const parameters12: OperationParameter = { parameterPath: "parameters", mapper: DatabaseSecurityAlertPolicyMapper }; @@ -645,43 +559,26 @@ export const vulnerabilityAssessmentName: OperationURLParameter = { } }; -export const ruleId: OperationURLParameter = { - parameterPath: "ruleId", - mapper: { - serializedName: "ruleId", - required: true, - type: { - name: "String" - } - } -}; - export const baselineName: OperationURLParameter = { parameterPath: "baselineName", mapper: { serializedName: "baselineName", required: true, type: { - name: "Enum", - allowedValues: ["master", "default"] + name: "String" } } }; -export const parameters20: OperationParameter = { - parameterPath: "parameters", - mapper: DatabaseVulnerabilityAssessmentRuleBaselineMapper -}; - -export const parameters21: OperationParameter = { +export const parameters13: OperationParameter = { parameterPath: "parameters", - mapper: DatabaseVulnerabilityAssessmentMapper + mapper: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInputMapper }; -export const scanId: OperationURLParameter = { - parameterPath: "scanId", +export const ruleId: OperationURLParameter = { + parameterPath: "ruleId", mapper: { - serializedName: "scanId", + serializedName: "ruleId", required: true, type: { name: "String" @@ -689,21 +586,15 @@ export const scanId: OperationURLParameter = { } }; -export const dataWarehouseUserActivityName: OperationURLParameter = { - parameterPath: "dataWarehouseUserActivityName", - mapper: { - serializedName: "dataWarehouseUserActivityName", - required: true, - type: { - name: "String" - } - } +export const parameters14: OperationParameter = { + parameterPath: "parameters", + mapper: DatabaseSqlVulnerabilityAssessmentRuleBaselineInputMapper }; -export const locationName: OperationURLParameter = { - parameterPath: "locationName", +export const vulnerabilityAssessmentName1: OperationURLParameter = { + parameterPath: "vulnerabilityAssessmentName", mapper: { - serializedName: "locationName", + serializedName: "vulnerabilityAssessmentName", required: true, type: { name: "String" @@ -711,10 +602,10 @@ export const locationName: OperationURLParameter = { } }; -export const deletedServerName: OperationURLParameter = { - parameterPath: "deletedServerName", +export const scanId: OperationURLParameter = { + parameterPath: "scanId", mapper: { - serializedName: "deletedServerName", + serializedName: "scanId", required: true, type: { name: "String" @@ -722,21 +613,21 @@ export const deletedServerName: OperationURLParameter = { } }; -export const operationId: OperationURLParameter = { - parameterPath: "operationId", +export const scanResultId: OperationURLParameter = { + parameterPath: "scanResultId", mapper: { - serializedName: "operationId", + serializedName: "scanResultId", required: true, type: { - name: "Uuid" + name: "String" } } }; -export const encryptionProtectorName: OperationURLParameter = { - parameterPath: "encryptionProtectorName", +export const vulnerabilityAssessmentName2: OperationURLParameter = { + parameterPath: "vulnerabilityAssessmentName", mapper: { - serializedName: "encryptionProtectorName", + serializedName: "vulnerabilityAssessmentName", required: true, type: { name: "String" @@ -744,83 +635,77 @@ export const encryptionProtectorName: OperationURLParameter = { } }; -export const parameters22: OperationParameter = { - parameterPath: "parameters", - mapper: EncryptionProtectorMapper -}; - -export const failoverGroupName: OperationURLParameter = { - parameterPath: "failoverGroupName", +export const baselineName1: OperationURLParameter = { + parameterPath: "baselineName", mapper: { - serializedName: "failoverGroupName", + serializedName: "baselineName", required: true, type: { - name: "String" + name: "Enum", + allowedValues: ["master", "default"] } } }; -export const parameters23: OperationParameter = { +export const parameters15: OperationParameter = { parameterPath: "parameters", - mapper: FailoverGroupMapper + mapper: DatabaseVulnerabilityAssessmentRuleBaselineMapper }; -export const parameters24: OperationParameter = { +export const parameters16: OperationParameter = { parameterPath: "parameters", - mapper: FailoverGroupUpdateMapper + mapper: DatabaseVulnerabilityAssessmentMapper }; -export const firewallRuleName: OperationURLParameter = { - parameterPath: "firewallRuleName", +export const skipToken: OperationQueryParameter = { + parameterPath: ["options", "skipToken"], mapper: { - serializedName: "firewallRuleName", - required: true, + serializedName: "$skipToken", type: { name: "String" } } }; -export const parameters25: OperationParameter = { +export const parameters17: OperationParameter = { parameterPath: "parameters", - mapper: FirewallRuleMapper + mapper: DatabaseMapper }; -export const parameters26: OperationParameter = { +export const parameters18: OperationParameter = { parameterPath: "parameters", - mapper: FirewallRuleListMapper + mapper: DatabaseUpdateMapper }; -export const parameters27: OperationParameter = { +export const parameters19: OperationParameter = { parameterPath: "parameters", - mapper: InstanceFailoverGroupMapper + mapper: ExportDatabaseDefinitionMapper }; -export const instancePoolName: OperationURLParameter = { - parameterPath: "instancePoolName", +export const replicaType: OperationQueryParameter = { + parameterPath: ["options", "replicaType"], mapper: { - serializedName: "instancePoolName", - required: true, + serializedName: "replicaType", type: { name: "String" } } }; -export const parameters28: OperationParameter = { +export const parameters20: OperationParameter = { parameterPath: "parameters", - mapper: InstancePoolMapper + mapper: ImportExistingDatabaseDefinitionMapper }; -export const parameters29: OperationParameter = { +export const parameters21: OperationParameter = { parameterPath: "parameters", - mapper: InstancePoolUpdateMapper + mapper: ResourceMoveDefinitionMapper }; -export const jobAgentName: OperationURLParameter = { - parameterPath: "jobAgentName", +export const elasticPoolName: OperationURLParameter = { + parameterPath: "elasticPoolName", mapper: { - serializedName: "jobAgentName", + serializedName: "elasticPoolName", required: true, type: { name: "String" @@ -828,20 +713,10 @@ export const jobAgentName: OperationURLParameter = { } }; -export const parameters30: OperationParameter = { - parameterPath: "parameters", - mapper: JobAgentMapper -}; - -export const parameters31: OperationParameter = { - parameterPath: "parameters", - mapper: JobAgentUpdateMapper -}; - -export const credentialName: OperationURLParameter = { - parameterPath: "credentialName", +export const locationName: OperationURLParameter = { + parameterPath: "locationName", mapper: { - serializedName: "credentialName", + serializedName: "locationName", required: true, type: { name: "String" @@ -849,23 +724,223 @@ export const credentialName: OperationURLParameter = { } }; -export const parameters32: OperationParameter = { - parameterPath: "parameters", - mapper: JobCredentialMapper -}; - -export const createTimeMin: OperationQueryParameter = { - parameterPath: ["options", "createTimeMin"], +export const deletedServerName: OperationURLParameter = { + parameterPath: "deletedServerName", mapper: { - serializedName: "createTimeMin", + serializedName: "deletedServerName", + required: true, type: { - name: "DateTime" + name: "String" } } }; -export const createTimeMax: OperationQueryParameter = { - parameterPath: ["options", "createTimeMax"], +export const managedInstanceName: OperationURLParameter = { + parameterPath: "managedInstanceName", + mapper: { + serializedName: "managedInstanceName", + required: true, + type: { + name: "String" + } + } +}; + +export const distributedAvailabilityGroupName: OperationURLParameter = { + parameterPath: "distributedAvailabilityGroupName", + mapper: { + serializedName: "distributedAvailabilityGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters22: OperationParameter = { + parameterPath: "parameters", + mapper: DistributedAvailabilityGroupMapper +}; + +export const parameters23: OperationParameter = { + parameterPath: "parameters", + mapper: DistributedAvailabilityGroupSetRoleMapper +}; + +export const skip: OperationQueryParameter = { + parameterPath: ["options", "skip"], + mapper: { + serializedName: "$skip", + type: { + name: "Number" + } + } +}; + +export const parameters24: OperationParameter = { + parameterPath: "parameters", + mapper: ElasticPoolMapper +}; + +export const parameters25: OperationParameter = { + parameterPath: "parameters", + mapper: ElasticPoolUpdateMapper +}; + +export const parameters26: OperationParameter = { + parameterPath: "parameters", + mapper: EncryptionProtectorMapper +}; + +export const endpointType: OperationURLParameter = { + parameterPath: "endpointType", + mapper: { + serializedName: "endpointType", + required: true, + type: { + name: "String" + } + } +}; + +export const failoverGroupName: OperationURLParameter = { + parameterPath: "failoverGroupName", + mapper: { + serializedName: "failoverGroupName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters27: OperationParameter = { + parameterPath: "parameters", + mapper: FailoverGroupMapper +}; + +export const parameters28: OperationParameter = { + parameterPath: "parameters", + mapper: FailoverGroupUpdateMapper +}; + +export const parameters29: OperationParameter = { + parameterPath: "parameters", + mapper: FirewallRuleListMapper +}; + +export const firewallRuleName: OperationURLParameter = { + parameterPath: "firewallRuleName", + mapper: { + serializedName: "firewallRuleName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters30: OperationParameter = { + parameterPath: "parameters", + mapper: FirewallRuleMapper +}; + +export const geoBackupPolicyName: OperationURLParameter = { + parameterPath: "geoBackupPolicyName", + mapper: { + serializedName: "geoBackupPolicyName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters31: OperationParameter = { + parameterPath: "parameters", + mapper: GeoBackupPolicyMapper +}; + +export const parameters32: OperationParameter = { + parameterPath: "parameters", + mapper: IPv6FirewallRuleMapper +}; + +export const parameters33: OperationParameter = { + parameterPath: "parameters", + mapper: InstanceFailoverGroupMapper +}; + +export const instancePoolName: OperationURLParameter = { + parameterPath: "instancePoolName", + mapper: { + serializedName: "instancePoolName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters34: OperationParameter = { + parameterPath: "parameters", + mapper: InstancePoolMapper +}; + +export const parameters35: OperationParameter = { + parameterPath: "parameters", + mapper: InstancePoolUpdateMapper +}; + +export const jobAgentName: OperationURLParameter = { + parameterPath: "jobAgentName", + mapper: { + serializedName: "jobAgentName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters36: OperationParameter = { + parameterPath: "parameters", + mapper: JobAgentMapper +}; + +export const parameters37: OperationParameter = { + parameterPath: "parameters", + mapper: JobAgentUpdateMapper +}; + +export const credentialName: OperationURLParameter = { + parameterPath: "credentialName", + mapper: { + serializedName: "credentialName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters38: OperationParameter = { + parameterPath: "parameters", + mapper: JobCredentialMapper +}; + +export const createTimeMin: OperationQueryParameter = { + parameterPath: ["options", "createTimeMin"], + mapper: { + serializedName: "createTimeMin", + type: { + name: "DateTime" + } + } +}; + +export const createTimeMax: OperationQueryParameter = { + parameterPath: ["options", "createTimeMax"], mapper: { serializedName: "createTimeMax", type: { @@ -936,11 +1011,6 @@ export const jobExecutionId: OperationURLParameter = { } }; -export const parameters33: OperationParameter = { - parameterPath: "parameters", - mapper: JobMapper -}; - export const stepName: OperationURLParameter = { parameterPath: "stepName", mapper: { @@ -952,6 +1022,11 @@ export const stepName: OperationURLParameter = { } }; +export const parameters39: OperationParameter = { + parameterPath: "parameters", + mapper: JobStepMapper +}; + export const jobVersion: OperationURLParameter = { parameterPath: "jobVersion", mapper: { @@ -963,11 +1038,6 @@ export const jobVersion: OperationURLParameter = { } }; -export const parameters34: OperationParameter = { - parameterPath: "parameters", - mapper: JobStepMapper -}; - export const targetId: OperationURLParameter = { parameterPath: "targetId", mapper: { @@ -990,11 +1060,32 @@ export const targetGroupName: OperationURLParameter = { } }; -export const parameters35: OperationParameter = { +export const parameters40: OperationParameter = { parameterPath: "parameters", mapper: JobTargetGroupMapper }; +export const parameters41: OperationParameter = { + parameterPath: "parameters", + mapper: JobMapper +}; + +export const ledgerDigestUploads: OperationURLParameter = { + parameterPath: "ledgerDigestUploads", + mapper: { + serializedName: "ledgerDigestUploads", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters42: OperationParameter = { + parameterPath: "parameters", + mapper: LedgerDigestUploadsMapper +}; + export const include: OperationQueryParameter = { parameterPath: ["options", "include"], mapper: { @@ -1005,7 +1096,70 @@ export const include: OperationQueryParameter = { } }; -export const policyName: OperationURLParameter = { +export const onlyLatestPerDatabase: OperationQueryParameter = { + parameterPath: ["options", "onlyLatestPerDatabase"], + mapper: { + serializedName: "onlyLatestPerDatabase", + type: { + name: "Boolean" + } + } +}; + +export const databaseState: OperationQueryParameter = { + parameterPath: ["options", "databaseState"], + mapper: { + serializedName: "databaseState", + type: { + name: "String" + } + } +}; + +export const longTermRetentionServerName: OperationURLParameter = { + parameterPath: "longTermRetentionServerName", + mapper: { + serializedName: "longTermRetentionServerName", + required: true, + type: { + name: "String" + } + } +}; + +export const longTermRetentionDatabaseName: OperationURLParameter = { + parameterPath: "longTermRetentionDatabaseName", + mapper: { + serializedName: "longTermRetentionDatabaseName", + required: true, + type: { + name: "String" + } + } +}; + +export const backupName: OperationURLParameter = { + parameterPath: "backupName", + mapper: { + serializedName: "backupName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters43: OperationParameter = { + parameterPath: "parameters", + mapper: CopyLongTermRetentionBackupParametersMapper +}; + +export const parameters44: OperationParameter = { + parameterPath: "parameters", + mapper: UpdateLongTermRetentionBackupParametersMapper +}; + +export const policyName1: OperationURLParameter = { parameterPath: "policyName", mapper: { serializedName: "policyName", @@ -1016,7 +1170,7 @@ export const policyName: OperationURLParameter = { } }; -export const parameters36: OperationParameter = { +export const parameters45: OperationParameter = { parameterPath: "parameters", mapper: LongTermRetentionPolicyMapper }; @@ -1043,23 +1197,12 @@ export const maintenanceWindowName: OperationQueryParameter = { } }; -export const parameters37: OperationParameter = { +export const parameters46: OperationParameter = { parameterPath: "parameters", mapper: MaintenanceWindowsMapper }; -export const managedInstanceName: OperationURLParameter = { - parameterPath: "managedInstanceName", - mapper: { - serializedName: "managedInstanceName", - required: true, - type: { - name: "String" - } - } -}; - -export const policyName1: OperationURLParameter = { +export const policyName2: OperationURLParameter = { parameterPath: "policyName", mapper: { serializedName: "policyName", @@ -1070,11 +1213,16 @@ export const policyName1: OperationURLParameter = { } }; -export const parameters38: OperationParameter = { +export const parameters47: OperationParameter = { parameterPath: "parameters", mapper: ManagedBackupShortTermRetentionPolicyMapper }; +export const parameters48: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedDatabaseAdvancedThreatProtectionMapper +}; + export const queryId: OperationURLParameter = { parameterPath: "queryId", mapper: { @@ -1127,24 +1275,34 @@ export const restoreDetailsName: OperationURLParameter = { } }; -export const parameters39: OperationParameter = { +export const parameters49: OperationParameter = { parameterPath: "parameters", - mapper: ManagedDatabaseMapper + mapper: ManagedDatabaseSecurityAlertPolicyMapper }; -export const parameters40: OperationParameter = { - parameterPath: "parameters", - mapper: ManagedDatabaseUpdateMapper +export const count: OperationQueryParameter = { + parameterPath: ["options", "count"], + mapper: { + serializedName: "$count", + type: { + name: "Boolean" + } + } }; -export const parameters41: OperationParameter = { +export const parameters50: OperationParameter = { parameterPath: "parameters", - mapper: CompleteDatabaseRestoreDefinitionMapper + mapper: SensitivityLabelUpdateListMapper }; -export const parameters42: OperationParameter = { - parameterPath: "parameters", - mapper: ManagedDatabaseSecurityAlertPolicyMapper +export const includeDisabledRecommendations: OperationQueryParameter = { + parameterPath: ["options", "includeDisabledRecommendations"], + mapper: { + serializedName: "includeDisabledRecommendations", + type: { + name: "Boolean" + } + } }; export const sensitivityLabelSource: OperationURLParameter = { @@ -1159,7 +1317,7 @@ export const sensitivityLabelSource: OperationURLParameter = { } }; -export const parameters43: OperationParameter = { +export const parameters51: OperationParameter = { parameterPath: "parameters", mapper: SensitivityLabelMapper }; @@ -1175,45 +1333,20 @@ export const sensitivityLabelSource1: OperationURLParameter = { } } }; - -export const sensitivityLabelSource2: OperationURLParameter = { - parameterPath: "sensitivityLabelSource", - mapper: { - defaultValue: "recommended", - isConstant: true, - serializedName: "sensitivityLabelSource", - type: { - name: "String" - } - } -}; - -export const count: OperationQueryParameter = { - parameterPath: ["options", "count"], - mapper: { - serializedName: "$count", - type: { - name: "Boolean" - } - } -}; - -export const parameters44: OperationParameter = { - parameterPath: "parameters", - mapper: SensitivityLabelUpdateListMapper -}; - -export const includeDisabledRecommendations: OperationQueryParameter = { - parameterPath: ["options", "includeDisabledRecommendations"], + +export const sensitivityLabelSource2: OperationURLParameter = { + parameterPath: "sensitivityLabelSource", mapper: { - serializedName: "includeDisabledRecommendations", + defaultValue: "recommended", + isConstant: true, + serializedName: "sensitivityLabelSource", type: { - name: "Boolean" + name: "String" } } }; -export const parameters45: OperationParameter = { +export const parameters52: OperationParameter = { parameterPath: "parameters", mapper: RecommendedSensitivityLabelUpdateListMapper }; @@ -1229,11 +1362,36 @@ export const tdeName: OperationURLParameter = { } }; -export const parameters46: OperationParameter = { +export const parameters53: OperationParameter = { parameterPath: "parameters", mapper: ManagedTransparentDataEncryptionMapper }; +export const parameters54: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedDatabaseMapper +}; + +export const parameters55: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedDatabaseUpdateMapper +}; + +export const parameters56: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedDatabaseMoveDefinitionMapper +}; + +export const parameters57: OperationParameter = { + parameterPath: "parameters", + mapper: CompleteDatabaseRestoreDefinitionMapper +}; + +export const parameters58: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedDatabaseStartMoveDefinitionMapper +}; + export const administratorName: OperationURLParameter = { parameterPath: "administratorName", mapper: { @@ -1245,11 +1403,16 @@ export const administratorName: OperationURLParameter = { } }; -export const parameters47: OperationParameter = { +export const parameters59: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstanceAdministratorMapper }; +export const parameters60: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedInstanceAdvancedThreatProtectionMapper +}; + export const authenticationName: OperationURLParameter = { parameterPath: "authenticationName", mapper: { @@ -1261,12 +1424,28 @@ export const authenticationName: OperationURLParameter = { } }; -export const parameters48: OperationParameter = { +export const parameters61: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstanceAzureADOnlyAuthenticationMapper }; -export const parameters49: OperationParameter = { +export const dtcName: OperationURLParameter = { + parameterPath: "dtcName", + mapper: { + serializedName: "dtcName", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters62: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedInstanceDtcMapper +}; + +export const parameters63: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstanceEncryptionProtectorMapper }; @@ -1282,12 +1461,12 @@ export const keyName: OperationURLParameter = { } }; -export const parameters50: OperationParameter = { +export const parameters64: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstanceKeyMapper }; -export const policyName2: OperationURLParameter = { +export const policyName3: OperationURLParameter = { parameterPath: "policyName", mapper: { serializedName: "policyName", @@ -1298,7 +1477,7 @@ export const policyName2: OperationURLParameter = { } }; -export const parameters51: OperationParameter = { +export const parameters65: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstanceLongTermRetentionPolicyMapper }; @@ -1314,7 +1493,7 @@ export const privateEndpointConnectionName: OperationURLParameter = { } }; -export const parameters52: OperationParameter = { +export const parameters66: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstancePrivateEndpointConnectionMapper }; @@ -1330,83 +1509,70 @@ export const groupName: OperationURLParameter = { } }; -export const parameters53: OperationParameter = { +export const parameters67: OperationParameter = { parameterPath: "parameters", mapper: TdeCertificateMapper }; -export const parameters54: OperationParameter = { +export const parameters68: OperationParameter = { parameterPath: "parameters", mapper: ManagedInstanceVulnerabilityAssessmentMapper }; -export const restorableDroppedDatabaseId: OperationURLParameter = { - parameterPath: "restorableDroppedDatabaseId", - mapper: { - serializedName: "restorableDroppedDatabaseId", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters55: OperationParameter = { +export const parameters69: OperationParameter = { parameterPath: "parameters", - mapper: ManagedServerSecurityAlertPolicyMapper + mapper: ManagedInstanceMapper }; -export const parameters56: OperationParameter = { +export const parameters70: OperationParameter = { parameterPath: "parameters", - mapper: PrivateEndpointConnectionMapper + mapper: ManagedInstanceUpdateMapper }; -export const recoverableDatabaseName: OperationURLParameter = { - parameterPath: "recoverableDatabaseName", +export const numberOfQueries: OperationQueryParameter = { + parameterPath: ["options", "numberOfQueries"], mapper: { - serializedName: "recoverableDatabaseName", - required: true, + serializedName: "numberOfQueries", type: { - name: "String" + name: "Number" } } }; -export const parameters57: OperationParameter = { - parameterPath: "parameters", - mapper: CreateDatabaseRestorePointDefinitionMapper -}; - -export const restorePointName: OperationURLParameter = { - parameterPath: "restorePointName", +export const databases: OperationQueryParameter = { + parameterPath: ["options", "databases"], mapper: { - serializedName: "restorePointName", - required: true, + serializedName: "databases", type: { name: "String" } } }; -export const parameters58: OperationParameter = { - parameterPath: "parameters", - mapper: ServerAutomaticTuningMapper -}; - -export const parameters59: OperationParameter = { - parameterPath: "parameters", - mapper: ServerAzureADAdministratorMapper +export const aggregationFunction: OperationQueryParameter = { + parameterPath: ["options", "aggregationFunction"], + mapper: { + serializedName: "aggregationFunction", + type: { + name: "String" + } + } }; -export const parameters60: OperationParameter = { - parameterPath: "parameters", - mapper: ServerAzureADOnlyAuthenticationMapper +export const observationMetric: OperationQueryParameter = { + parameterPath: ["options", "observationMetric"], + mapper: { + serializedName: "observationMetric", + type: { + name: "String" + } + } }; -export const devOpsAuditingSettingsName: OperationURLParameter = { - parameterPath: "devOpsAuditingSettingsName", +export const ledgerDigestUploads1: OperationURLParameter = { + parameterPath: "ledgerDigestUploads", mapper: { - serializedName: "devOpsAuditingSettingsName", + serializedName: "ledgerDigestUploads", required: true, type: { name: "String" @@ -1414,15 +1580,15 @@ export const devOpsAuditingSettingsName: OperationURLParameter = { } }; -export const parameters61: OperationParameter = { +export const parameters71: OperationParameter = { parameterPath: "parameters", - mapper: ServerDevOpsAuditingSettingsMapper + mapper: ManagedLedgerDigestUploadsMapper }; -export const dnsAliasName: OperationURLParameter = { - parameterPath: "dnsAliasName", +export const restorableDroppedDatabaseId: OperationURLParameter = { + parameterPath: "restorableDroppedDatabaseId", mapper: { - serializedName: "dnsAliasName", + serializedName: "restorableDroppedDatabaseId", required: true, type: { name: "String" @@ -1430,25 +1596,10 @@ export const dnsAliasName: OperationURLParameter = { } }; -export const parameters62: OperationParameter = { - parameterPath: "parameters", - mapper: ServerDnsAliasAcquisitionMapper -}; - -export const parameters63: OperationParameter = { - parameterPath: "parameters", - mapper: ServerKeyMapper -}; - -export const parameters64: OperationParameter = { - parameterPath: "parameters", - mapper: ServerSecurityAlertPolicyMapper -}; - -export const serverTrustGroupName: OperationURLParameter = { - parameterPath: "serverTrustGroupName", +export const dnsAliasName: OperationURLParameter = { + parameterPath: "dnsAliasName", mapper: { - serializedName: "serverTrustGroupName", + serializedName: "dnsAliasName", required: true, type: { name: "String" @@ -1456,25 +1607,20 @@ export const serverTrustGroupName: OperationURLParameter = { } }; -export const parameters65: OperationParameter = { - parameterPath: "parameters", - mapper: ServerTrustGroupMapper -}; - -export const parameters66: OperationParameter = { +export const parameters72: OperationParameter = { parameterPath: "parameters", - mapper: ServerVulnerabilityAssessmentMapper + mapper: ManagedServerDnsAliasCreationMapper }; -export const parameters67: OperationParameter = { +export const parameters73: OperationParameter = { parameterPath: "parameters", - mapper: SqlAgentConfigurationMapper + mapper: ManagedServerDnsAliasAcquisitionMapper }; -export const usageName: OperationURLParameter = { - parameterPath: "usageName", +export const securityAlertPolicyName1: OperationURLParameter = { + parameterPath: "securityAlertPolicyName", mapper: { - serializedName: "usageName", + serializedName: "securityAlertPolicyName", required: true, type: { name: "String" @@ -1482,10 +1628,15 @@ export const usageName: OperationURLParameter = { } }; -export const syncAgentName: OperationURLParameter = { - parameterPath: "syncAgentName", +export const parameters74: OperationParameter = { + parameterPath: "parameters", + mapper: ManagedServerSecurityAlertPolicyMapper +}; + +export const outboundRuleFqdn: OperationURLParameter = { + parameterPath: "outboundRuleFqdn", mapper: { - serializedName: "syncAgentName", + serializedName: "outboundRuleFqdn", required: true, type: { name: "String" @@ -1493,15 +1644,15 @@ export const syncAgentName: OperationURLParameter = { } }; -export const parameters68: OperationParameter = { +export const parameters75: OperationParameter = { parameterPath: "parameters", - mapper: SyncAgentMapper + mapper: PrivateEndpointConnectionMapper }; -export const syncGroupName: OperationURLParameter = { - parameterPath: "syncGroupName", +export const recoverableDatabaseName: OperationURLParameter = { + parameterPath: "recoverableDatabaseName", mapper: { - serializedName: "syncGroupName", + serializedName: "recoverableDatabaseName", required: true, type: { name: "String" @@ -1509,10 +1660,10 @@ export const syncGroupName: OperationURLParameter = { } }; -export const startTime1: OperationQueryParameter = { - parameterPath: "startTime", +export const linkId: OperationURLParameter = { + parameterPath: "linkId", mapper: { - serializedName: "startTime", + serializedName: "linkId", required: true, type: { name: "String" @@ -1520,21 +1671,15 @@ export const startTime1: OperationQueryParameter = { } }; -export const endTime1: OperationQueryParameter = { - parameterPath: "endTime", - mapper: { - serializedName: "endTime", - required: true, - type: { - name: "String" - } - } +export const parameters76: OperationParameter = { + parameterPath: "parameters", + mapper: CreateDatabaseRestorePointDefinitionMapper }; -export const typeParam: OperationQueryParameter = { - parameterPath: "typeParam", +export const restorePointName: OperationURLParameter = { + parameterPath: "restorePointName", mapper: { - serializedName: "type", + serializedName: "restorePointName", required: true, type: { name: "String" @@ -1542,25 +1687,30 @@ export const typeParam: OperationQueryParameter = { } }; -export const continuationToken: OperationQueryParameter = { - parameterPath: ["options", "continuationToken"], - mapper: { - serializedName: "continuationToken", - type: { - name: "String" - } - } +export const parameters77: OperationParameter = { + parameterPath: "parameters", + mapper: ServerAdvancedThreatProtectionMapper }; -export const parameters69: OperationParameter = { +export const parameters78: OperationParameter = { parameterPath: "parameters", - mapper: SyncGroupMapper + mapper: ServerAutomaticTuningMapper +}; + +export const parameters79: OperationParameter = { + parameterPath: "parameters", + mapper: ServerAzureADAdministratorMapper +}; + +export const parameters80: OperationParameter = { + parameterPath: "parameters", + mapper: ServerAzureADOnlyAuthenticationMapper }; -export const syncMemberName: OperationURLParameter = { - parameterPath: "syncMemberName", +export const serverConfigurationOptionName: OperationURLParameter = { + parameterPath: "serverConfigurationOptionName", mapper: { - serializedName: "syncMemberName", + serializedName: "serverConfigurationOptionName", required: true, type: { name: "String" @@ -1568,15 +1718,15 @@ export const syncMemberName: OperationURLParameter = { } }; -export const parameters70: OperationParameter = { +export const parameters81: OperationParameter = { parameterPath: "parameters", - mapper: SyncMemberMapper + mapper: ServerConfigurationOptionMapper }; -export const timeZoneId: OperationURLParameter = { - parameterPath: "timeZoneId", +export const connectionPolicyName: OperationURLParameter = { + parameterPath: "connectionPolicyName", mapper: { - serializedName: "timeZoneId", + serializedName: "connectionPolicyName", required: true, type: { name: "String" @@ -1584,10 +1734,15 @@ export const timeZoneId: OperationURLParameter = { } }; -export const virtualClusterName: OperationURLParameter = { - parameterPath: "virtualClusterName", +export const parameters82: OperationParameter = { + parameterPath: "parameters", + mapper: ServerConnectionPolicyMapper +}; + +export const devOpsAuditingSettingsName: OperationURLParameter = { + parameterPath: "devOpsAuditingSettingsName", mapper: { - serializedName: "virtualClusterName", + serializedName: "devOpsAuditingSettingsName", required: true, type: { name: "String" @@ -1595,31 +1750,30 @@ export const virtualClusterName: OperationURLParameter = { } }; -export const parameters71: OperationParameter = { +export const parameters83: OperationParameter = { parameterPath: "parameters", - mapper: VirtualClusterUpdateMapper + mapper: ServerDevOpsAuditingSettingsMapper }; -export const virtualNetworkRuleName: OperationURLParameter = { - parameterPath: "virtualNetworkRuleName", - mapper: { - serializedName: "virtualNetworkRuleName", - required: true, - type: { - name: "String" - } - } +export const parameters84: OperationParameter = { + parameterPath: "parameters", + mapper: ServerDnsAliasAcquisitionMapper }; -export const parameters72: OperationParameter = { +export const parameters85: OperationParameter = { parameterPath: "parameters", - mapper: VirtualNetworkRuleMapper + mapper: ServerKeyMapper }; -export const workloadGroupName: OperationURLParameter = { - parameterPath: "workloadGroupName", +export const parameters86: OperationParameter = { + parameterPath: "parameters", + mapper: ServerSecurityAlertPolicyMapper +}; + +export const certificateName: OperationURLParameter = { + parameterPath: "certificateName", mapper: { - serializedName: "workloadGroupName", + serializedName: "certificateName", required: true, type: { name: "String" @@ -1627,10 +1781,15 @@ export const workloadGroupName: OperationURLParameter = { } }; -export const workloadClassifierName: OperationURLParameter = { - parameterPath: "workloadClassifierName", +export const parameters87: OperationParameter = { + parameterPath: "parameters", + mapper: ServerTrustCertificateMapper +}; + +export const serverTrustGroupName: OperationURLParameter = { + parameterPath: "serverTrustGroupName", mapper: { - serializedName: "workloadClassifierName", + serializedName: "serverTrustGroupName", required: true, type: { name: "String" @@ -1638,41 +1797,62 @@ export const workloadClassifierName: OperationURLParameter = { } }; -export const parameters73: OperationParameter = { +export const parameters88: OperationParameter = { parameterPath: "parameters", - mapper: WorkloadClassifierMapper + mapper: ServerTrustGroupMapper }; -export const parameters74: OperationParameter = { +export const parameters89: OperationParameter = { parameterPath: "parameters", - mapper: WorkloadGroupMapper + mapper: ServerVulnerabilityAssessmentMapper }; -export const parameters75: OperationParameter = { +export const parameters90: OperationParameter = { parameterPath: "parameters", - mapper: LogicalDatabaseTransparentDataEncryptionMapper + mapper: CheckNameAvailabilityRequestMapper }; -export const policyName3: OperationURLParameter = { - parameterPath: "policyName", +export const parameters91: OperationParameter = { + parameterPath: "parameters", + mapper: ServerMapper +}; + +export const parameters92: OperationParameter = { + parameterPath: "parameters", + mapper: ServerUpdateMapper +}; + +export const parameters93: OperationParameter = { + parameterPath: "parameters", + mapper: ImportNewDatabaseDefinitionMapper +}; + +export const parameters94: OperationParameter = { + parameterPath: "parameters", + mapper: SqlAgentConfigurationMapper +}; + +export const systemDatabaseName: OperationQueryParameter = { + parameterPath: "systemDatabaseName", mapper: { - serializedName: "policyName", - required: true, + defaultValue: "master", + isConstant: true, + serializedName: "systemDatabaseName", type: { name: "String" } } }; -export const parameters76: OperationParameter = { +export const parameters95: OperationParameter = { parameterPath: "parameters", - mapper: BackupShortTermRetentionPolicyMapper + mapper: SqlVulnerabilityAssessmentMapper }; -export const extensionName: OperationURLParameter = { - parameterPath: "extensionName", +export const startStopScheduleName: OperationURLParameter = { + parameterPath: "startStopScheduleName", mapper: { - serializedName: "extensionName", + serializedName: "startStopScheduleName", required: true, type: { name: "String" @@ -1680,15 +1860,15 @@ export const extensionName: OperationURLParameter = { } }; -export const parameters77: OperationParameter = { +export const parameters96: OperationParameter = { parameterPath: "parameters", - mapper: DatabaseExtensionsMapper + mapper: StartStopManagedInstanceScheduleMapper }; -export const ledgerDigestUploads: OperationURLParameter = { - parameterPath: "ledgerDigestUploads", +export const usageName: OperationURLParameter = { + parameterPath: "usageName", mapper: { - serializedName: "ledgerDigestUploads", + serializedName: "usageName", required: true, type: { name: "String" @@ -1696,15 +1876,10 @@ export const ledgerDigestUploads: OperationURLParameter = { } }; -export const parameters78: OperationParameter = { - parameterPath: "parameters", - mapper: LedgerDigestUploadsMapper -}; - -export const outboundRuleFqdn: OperationURLParameter = { - parameterPath: "outboundRuleFqdn", +export const syncAgentName: OperationURLParameter = { + parameterPath: "syncAgentName", mapper: { - serializedName: "outboundRuleFqdn", + serializedName: "syncAgentName", required: true, type: { name: "String" @@ -1712,50 +1887,31 @@ export const outboundRuleFqdn: OperationURLParameter = { } }; -export const parameters79: OperationParameter = { - parameterPath: "parameters", - mapper: OutboundFirewallRuleMapper -}; - -export const parameters80: OperationParameter = { - parameterPath: "parameters", - mapper: ServerMapper -}; - -export const parameters81: OperationParameter = { - parameterPath: "parameters", - mapper: ServerUpdateMapper -}; - -export const parameters82: OperationParameter = { - parameterPath: "parameters", - mapper: ImportNewDatabaseDefinitionMapper -}; - -export const parameters83: OperationParameter = { +export const parameters97: OperationParameter = { parameterPath: "parameters", - mapper: CheckNameAvailabilityRequestMapper + mapper: SyncAgentMapper }; -export const expandChildren: OperationQueryParameter = { - parameterPath: ["options", "expandChildren"], +export const syncGroupName: OperationURLParameter = { + parameterPath: "syncGroupName", mapper: { - serializedName: "expandChildren", + serializedName: "syncGroupName", + required: true, type: { - name: "Boolean" + name: "String" } } }; -export const parameters84: OperationParameter = { +export const parameters98: OperationParameter = { parameterPath: "parameters", - mapper: CopyLongTermRetentionBackupParametersMapper + mapper: SyncGroupMapper }; -export const longTermRetentionServerName: OperationURLParameter = { - parameterPath: "longTermRetentionServerName", +export const startTime1: OperationQueryParameter = { + parameterPath: "startTime", mapper: { - serializedName: "longTermRetentionServerName", + serializedName: "startTime", required: true, type: { name: "String" @@ -1763,10 +1919,10 @@ export const longTermRetentionServerName: OperationURLParameter = { } }; -export const longTermRetentionDatabaseName: OperationURLParameter = { - parameterPath: "longTermRetentionDatabaseName", +export const endTime1: OperationQueryParameter = { + parameterPath: "endTime", mapper: { - serializedName: "longTermRetentionDatabaseName", + serializedName: "endTime", required: true, type: { name: "String" @@ -1774,10 +1930,10 @@ export const longTermRetentionDatabaseName: OperationURLParameter = { } }; -export const backupName: OperationURLParameter = { - parameterPath: "backupName", +export const typeParam: OperationQueryParameter = { + parameterPath: "typeParam", mapper: { - serializedName: "backupName", + serializedName: "type", required: true, type: { name: "String" @@ -1785,85 +1941,105 @@ export const backupName: OperationURLParameter = { } }; -export const parameters85: OperationParameter = { - parameterPath: "parameters", - mapper: UpdateLongTermRetentionBackupParametersMapper -}; - -export const onlyLatestPerDatabase: OperationQueryParameter = { - parameterPath: ["options", "onlyLatestPerDatabase"], +export const continuationToken: OperationQueryParameter = { + parameterPath: ["options", "continuationToken"], mapper: { - serializedName: "onlyLatestPerDatabase", + serializedName: "continuationToken", type: { - name: "Boolean" + name: "String" } } }; -export const databaseState: OperationQueryParameter = { - parameterPath: ["options", "databaseState"], +export const syncMemberName: OperationURLParameter = { + parameterPath: "syncMemberName", mapper: { - serializedName: "databaseState", + serializedName: "syncMemberName", + required: true, type: { name: "String" } } }; -export const parameters86: OperationParameter = { +export const parameters99: OperationParameter = { parameterPath: "parameters", - mapper: ManagedInstanceMapper + mapper: SyncMemberMapper }; -export const parameters87: OperationParameter = { +export const timeZoneId: OperationURLParameter = { + parameterPath: "timeZoneId", + mapper: { + serializedName: "timeZoneId", + required: true, + type: { + name: "String" + } + } +}; + +export const parameters100: OperationParameter = { parameterPath: "parameters", - mapper: ManagedInstanceUpdateMapper + mapper: LogicalDatabaseTransparentDataEncryptionMapper }; -export const numberOfQueries: OperationQueryParameter = { - parameterPath: ["options", "numberOfQueries"], +export const expandChildren: OperationQueryParameter = { + parameterPath: ["options", "expandChildren"], mapper: { - serializedName: "numberOfQueries", + serializedName: "expandChildren", type: { - name: "Number" + name: "Boolean" } } }; -export const databases: OperationQueryParameter = { - parameterPath: ["options", "databases"], +export const virtualClusterName: OperationURLParameter = { + parameterPath: "virtualClusterName", mapper: { - serializedName: "databases", + serializedName: "virtualClusterName", + required: true, type: { name: "String" } } }; -export const aggregationFunction: OperationQueryParameter = { - parameterPath: ["options", "aggregationFunction"], +export const parameters101: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualClusterUpdateMapper +}; + +export const virtualNetworkRuleName: OperationURLParameter = { + parameterPath: "virtualNetworkRuleName", mapper: { - serializedName: "aggregationFunction", + serializedName: "virtualNetworkRuleName", + required: true, type: { name: "String" } } }; -export const observationMetric: OperationQueryParameter = { - parameterPath: ["options", "observationMetric"], +export const parameters102: OperationParameter = { + parameterPath: "parameters", + mapper: VirtualNetworkRuleMapper +}; + +export const workloadGroupName: OperationURLParameter = { + parameterPath: "workloadGroupName", mapper: { - serializedName: "observationMetric", + serializedName: "workloadGroupName", + required: true, type: { name: "String" } } }; -export const connectionPolicyName: OperationURLParameter = { - parameterPath: "connectionPolicyName", +export const workloadClassifierName: OperationURLParameter = { + parameterPath: "workloadClassifierName", mapper: { - serializedName: "connectionPolicyName", + serializedName: "workloadClassifierName", required: true, type: { name: "String" @@ -1871,7 +2047,12 @@ export const connectionPolicyName: OperationURLParameter = { } }; -export const parameters88: OperationParameter = { +export const parameters103: OperationParameter = { parameterPath: "parameters", - mapper: ServerConnectionPolicyMapper + mapper: WorkloadClassifierMapper +}; + +export const parameters104: OperationParameter = { + parameterPath: "parameters", + mapper: WorkloadGroupMapper }; diff --git a/sdk/sql/arm-sql/src/operations/backupShortTermRetentionPolicies.ts b/sdk/sql/arm-sql/src/operations/backupShortTermRetentionPolicies.ts index 7ac4f5e7a86d..d7e4161a2353 100644 --- a/sdk/sql/arm-sql/src/operations/backupShortTermRetentionPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/backupShortTermRetentionPolicies.ts @@ -138,6 +138,26 @@ export class BackupShortTermRetentionPoliciesImpl } } + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: BackupShortTermRetentionPoliciesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a database's short term retention policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -384,26 +404,6 @@ export class BackupShortTermRetentionPoliciesImpl return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: BackupShortTermRetentionPoliciesListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -429,6 +429,27 @@ export class BackupShortTermRetentionPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackupShortTermRetentionPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", @@ -439,14 +460,14 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.policyName3 + Parameters.subscriptionId, + Parameters.policyName ], headerParameters: [Parameters.accept], serializer @@ -470,15 +491,15 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.policyName3 + Parameters.subscriptionId, + Parameters.policyName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -503,41 +524,20 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters76, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.policyName3 + Parameters.subscriptionId, + Parameters.policyName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupShortTermRetentionPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.BackupShortTermRetentionPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -549,10 +549,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/capabilities.ts b/sdk/sql/arm-sql/src/operations/capabilities.ts index 53f451b0be0f..86d6e90f97da 100644 --- a/sdk/sql/arm-sql/src/operations/capabilities.ts +++ b/sdk/sql/arm-sql/src/operations/capabilities.ts @@ -56,7 +56,7 @@ const listByLocationOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.include], + queryParameters: [Parameters.apiVersion, Parameters.include], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/sql/arm-sql/src/operations/dataMaskingPolicies.ts b/sdk/sql/arm-sql/src/operations/dataMaskingPolicies.ts index 6908600dcea0..518459043c87 100644 --- a/sdk/sql/arm-sql/src/operations/dataMaskingPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/dataMaskingPolicies.ts @@ -12,11 +12,12 @@ import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { + DataMaskingPolicyName, + DataMaskingPoliciesGetOptionalParams, + DataMaskingPoliciesGetResponse, DataMaskingPolicy, DataMaskingPoliciesCreateOrUpdateOptionalParams, - DataMaskingPoliciesCreateOrUpdateResponse, - DataMaskingPoliciesGetOptionalParams, - DataMaskingPoliciesGetResponse + DataMaskingPoliciesCreateOrUpdateResponse } from "../models"; /** Class containing DataMaskingPolicies operations. */ @@ -32,91 +33,113 @@ export class DataMaskingPoliciesImpl implements DataMaskingPolicies { } /** - * Creates or updates a database data masking policy + * Gets the 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 dataMaskingPolicyName The name of the database for which the data masking policy applies. * @param options The options parameters. */ - createOrUpdate( + get( resourceGroupName: string, serverName: string, databaseName: string, - parameters: DataMaskingPolicy, - options?: DataMaskingPoliciesCreateOrUpdateOptionalParams - ): Promise { + dataMaskingPolicyName: DataMaskingPolicyName, + options?: DataMaskingPoliciesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, parameters, options }, - createOrUpdateOperationSpec + { + resourceGroupName, + serverName, + databaseName, + dataMaskingPolicyName, + options + }, + getOperationSpec ); } /** - * Gets a database data masking policy. + * 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 dataMaskingPolicyName The name of the database for which the data masking policy applies. + * @param parameters Parameters for creating or updating a data masking policy. * @param options The options parameters. */ - get( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, - options?: DataMaskingPoliciesGetOptionalParams - ): Promise { + dataMaskingPolicyName: DataMaskingPolicyName, + parameters: DataMaskingPolicy, + options?: DataMaskingPoliciesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - getOperationSpec + { + resourceGroupName, + serverName, + databaseName, + dataMaskingPolicyName, + parameters, + options + }, + createOrUpdateOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DataMaskingPolicy - } + }, + default: {} }, - requestBody: Parameters.parameters, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.dataMaskingPolicyName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}", - httpMethod: "GET", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.DataMaskingPolicy - } + }, + 201: { + bodyMapper: Mappers.DataMaskingPolicy + }, + default: {} }, + requestBody: Parameters.parameters5, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.dataMaskingPolicyName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; diff --git a/sdk/sql/arm-sql/src/operations/dataMaskingRules.ts b/sdk/sql/arm-sql/src/operations/dataMaskingRules.ts index 3510cd3ff42e..0c106d89ba41 100644 --- a/sdk/sql/arm-sql/src/operations/dataMaskingRules.ts +++ b/sdk/sql/arm-sql/src/operations/dataMaskingRules.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { DataMaskingRules } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -14,10 +15,13 @@ import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { DataMaskingRule, + DataMaskingPolicyName, + DataMaskingRulesListByDatabaseNextOptionalParams, DataMaskingRulesListByDatabaseOptionalParams, DataMaskingRulesListByDatabaseResponse, DataMaskingRulesCreateOrUpdateOptionalParams, - DataMaskingRulesCreateOrUpdateResponse + DataMaskingRulesCreateOrUpdateResponse, + DataMaskingRulesListByDatabaseNextResponse } from "../models"; /// @@ -39,18 +43,21 @@ export class DataMaskingRulesImpl implements DataMaskingRules { * this 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 dataMaskingPolicyName The name of the database for which the data masking rule applies. * @param options The options parameters. */ public listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, options?: DataMaskingRulesListByDatabaseOptionalParams ): PagedAsyncIterableIterator { const iter = this.listByDatabasePagingAll( resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, options ); return { @@ -68,6 +75,7 @@ export class DataMaskingRulesImpl implements DataMaskingRules { resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, options, settings ); @@ -79,41 +87,94 @@ export class DataMaskingRulesImpl implements DataMaskingRules { resourceGroupName: string, serverName: string, databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, options?: DataMaskingRulesListByDatabaseOptionalParams, - _settings?: PageSettings + settings?: PageSettings ): AsyncIterableIterator { let result: DataMaskingRulesListByDatabaseResponse; - result = await this._listByDatabase( - resourceGroupName, - serverName, - databaseName, - options - ); - yield result.value || []; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + serverName, + databaseName, + dataMaskingPolicyName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + serverName, + databaseName, + dataMaskingPolicyName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } private async *listByDatabasePagingAll( resourceGroupName: string, serverName: string, databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, options?: DataMaskingRulesListByDatabaseOptionalParams ): AsyncIterableIterator { for await (const page of this.listByDatabasePagingPage( resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, options )) { yield* page; } } + /** + * 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 dataMaskingPolicyName The name of the database for which the data masking rule applies. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, + options?: DataMaskingRulesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + dataMaskingPolicyName, + options + }, + listByDatabaseOperationSpec + ); + } + /** * 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 dataMaskingPolicyName The name of the database for which the data masking policy applies. * @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 options parameters. @@ -122,6 +183,7 @@ export class DataMaskingRulesImpl implements DataMaskingRules { resourceGroupName: string, serverName: string, databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, dataMaskingRuleName: string, parameters: DataMaskingRule, options?: DataMaskingRulesCreateOrUpdateOptionalParams @@ -131,6 +193,7 @@ export class DataMaskingRulesImpl implements DataMaskingRules { resourceGroupName, serverName, databaseName, + dataMaskingPolicyName, dataMaskingRuleName, parameters, options @@ -140,28 +203,61 @@ export class DataMaskingRulesImpl implements DataMaskingRules { } /** - * Gets a list of database data masking rules. + * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this 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 dataMaskingPolicyName The name of the database for which the data masking rule applies. + * @param nextLink The nextLink from the previous successful call to the ListByDatabase method. * @param options The options parameters. */ - private _listByDatabase( + private _listByDatabaseNext( resourceGroupName: string, serverName: string, databaseName: string, - options?: DataMaskingRulesListByDatabaseOptionalParams - ): Promise { + dataMaskingPolicyName: DataMaskingPolicyName, + nextLink: string, + options?: DataMaskingRulesListByDatabaseNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { + resourceGroupName, + serverName, + databaseName, + dataMaskingPolicyName, + nextLink, + options + }, + listByDatabaseNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataMaskingRuleListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.dataMaskingPolicyName + ], + headerParameters: [Parameters.accept], + serializer +}; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}", @@ -172,16 +268,17 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, 201: { bodyMapper: Mappers.DataMaskingRule - } + }, + default: {} }, - requestBody: Parameters.parameters1, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.dataMaskingPolicyName, Parameters.dataMaskingRuleName ], @@ -189,22 +286,22 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules", +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DataMaskingRuleListResult - } + }, + default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, Parameters.dataMaskingPolicyName ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/dataWarehouseUserActivitiesOperations.ts b/sdk/sql/arm-sql/src/operations/dataWarehouseUserActivitiesOperations.ts index 392107399fc2..b4a9d8604fdb 100644 --- a/sdk/sql/arm-sql/src/operations/dataWarehouseUserActivitiesOperations.ts +++ b/sdk/sql/arm-sql/src/operations/dataWarehouseUserActivitiesOperations.ts @@ -133,50 +133,50 @@ export class DataWarehouseUserActivitiesOperationsImpl } /** - * Gets the user activities of a data warehouse which includes running and suspended queries + * List the user activities of a data warehouse which includes running and suspended queries * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @param options The options parameters. */ - get( + private _listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, - dataWarehouseUserActivityName: DataWarehouseUserActivityName, - options?: DataWarehouseUserActivitiesGetOptionalParams - ): Promise { + options?: DataWarehouseUserActivitiesListByDatabaseOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - dataWarehouseUserActivityName, - options - }, - getOperationSpec + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec ); } /** - * List the user activities of a data warehouse which includes running and suspended queries + * Gets the user activities of a data warehouse which includes running and suspended queries * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. + * @param dataWarehouseUserActivityName The activity name of the data warehouse. * @param options The options parameters. */ - private _listByDatabase( + get( resourceGroupName: string, serverName: string, databaseName: string, - options?: DataWarehouseUserActivitiesListByDatabaseOptionalParams - ): Promise { + dataWarehouseUserActivityName: DataWarehouseUserActivityName, + options?: DataWarehouseUserActivitiesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { + resourceGroupName, + serverName, + databaseName, + dataWarehouseUserActivityName, + options + }, + getOperationSpec ); } @@ -205,45 +205,45 @@ export class DataWarehouseUserActivitiesOperationsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DataWarehouseUserActivities + bodyMapper: Mappers.DataWarehouseUserActivitiesListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.dataWarehouseUserActivityName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DataWarehouseUserActivitiesListResult + bodyMapper: Mappers.DataWarehouseUserActivities }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.dataWarehouseUserActivityName ], headerParameters: [Parameters.accept], serializer @@ -259,10 +259,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operations/databaseAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..d3e510f634cc --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseAdvancedThreatProtectionSettings.ts @@ -0,0 +1,332 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DatabaseAdvancedThreatProtectionSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + DatabaseAdvancedThreatProtection, + DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams, + DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams, + DatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse, + AdvancedThreatProtectionName, + DatabaseAdvancedThreatProtectionSettingsGetOptionalParams, + DatabaseAdvancedThreatProtectionSettingsGetResponse, + DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse, + DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse +} from "../models"; + +/// +/** Class containing DatabaseAdvancedThreatProtectionSettings operations. */ +export class DatabaseAdvancedThreatProtectionSettingsImpl + implements DatabaseAdvancedThreatProtectionSettings { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseAdvancedThreatProtectionSettings class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of database's Advanced Threat Protection states. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 options parameters. + */ + public listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + serverName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + serverName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + serverName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of database's Advanced Threat Protection states. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * Gets a database's Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: DatabaseAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + advancedThreatProtectionName, + options + }, + getOperationSpec + ); + } + + /** + * Creates or updates a database's Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced Threat Protection state. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: DatabaseAdvancedThreatProtection, + options?: DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + advancedThreatProtectionName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * ListByDatabaseNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + nextLink: string, + options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams + ): Promise< + DatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, nextLink, options }, + listByDatabaseNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseAdvancedThreatProtectionListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseAdvancedThreatProtection + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DatabaseAdvancedThreatProtection + }, + 201: { + bodyMapper: Mappers.DatabaseAdvancedThreatProtection + }, + default: {} + }, + requestBody: Parameters.parameters7, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseAdvancedThreatProtectionListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseAdvisors.ts b/sdk/sql/arm-sql/src/operations/databaseAdvisors.ts index d53ea09563bc..0860f9bceae1 100644 --- a/sdk/sql/arm-sql/src/operations/databaseAdvisors.ts +++ b/sdk/sql/arm-sql/src/operations/databaseAdvisors.ts @@ -124,13 +124,13 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.expand], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -145,13 +145,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.advisorName ], headerParameters: [Parameters.accept], @@ -167,14 +167,14 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.advisorName ], headerParameters: [Parameters.accept, Parameters.contentType], diff --git a/sdk/sql/arm-sql/src/operations/databaseAutomaticTuningOperations.ts b/sdk/sql/arm-sql/src/operations/databaseAutomaticTuningOperations.ts index 40c5b9528916..ed8e54f01273 100644 --- a/sdk/sql/arm-sql/src/operations/databaseAutomaticTuningOperations.ts +++ b/sdk/sql/arm-sql/src/operations/databaseAutomaticTuningOperations.ts @@ -87,13 +87,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -108,14 +108,14 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters17, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/sql/arm-sql/src/operations/databaseBlobAuditingPolicies.ts b/sdk/sql/arm-sql/src/operations/databaseBlobAuditingPolicies.ts index 86545d029381..eab3f28f382e 100644 --- a/sdk/sql/arm-sql/src/operations/databaseBlobAuditingPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/databaseBlobAuditingPolicies.ts @@ -134,64 +134,64 @@ export class DatabaseBlobAuditingPoliciesImpl } /** - * Gets a database's blob auditing policy. + * Lists auditing settings of a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param options The options parameters. */ - get( + private _listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabaseBlobAuditingPoliciesGetOptionalParams - ): Promise { + options?: DatabaseBlobAuditingPoliciesListByDatabaseOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, databaseName, options }, - getOperationSpec + listByDatabaseOperationSpec ); } /** - * Creates or updates a database's blob auditing policy. + * 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 parameters The database blob auditing policy. * @param options The options parameters. */ - createOrUpdate( + get( resourceGroupName: string, serverName: string, databaseName: string, - parameters: DatabaseBlobAuditingPolicy, - options?: DatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams - ): Promise { + options?: DatabaseBlobAuditingPoliciesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, parameters, options }, - createOrUpdateOperationSpec + { resourceGroupName, serverName, databaseName, options }, + getOperationSpec ); } /** - * Lists auditing settings of a database. + * 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 options parameters. */ - private _listByDatabase( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabaseBlobAuditingPoliciesListByDatabaseOptionalParams - ): Promise { + parameters: DatabaseBlobAuditingPolicy, + options?: DatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { resourceGroupName, serverName, databaseName, parameters, options }, + createOrUpdateOperationSpec ); } @@ -220,74 +220,74 @@ export class DatabaseBlobAuditingPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DatabaseBlobAuditingPolicy + bodyMapper: Mappers.DatabaseBlobAuditingPolicyListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.blobAuditingPolicyName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DatabaseBlobAuditingPolicy }, - 201: { - bodyMapper: Mappers.DatabaseBlobAuditingPolicy - }, default: {} }, - requestBody: Parameters.parameters15, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.blobAuditingPolicyName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/auditingSettings/{blobAuditingPolicyName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.DatabaseBlobAuditingPolicyListResult + bodyMapper: Mappers.DatabaseBlobAuditingPolicy + }, + 201: { + bodyMapper: Mappers.DatabaseBlobAuditingPolicy }, default: {} }, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.blobAuditingPolicyName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -301,10 +301,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseColumns.ts b/sdk/sql/arm-sql/src/operations/databaseColumns.ts index 65eb5fa2761d..84d8ed85226d 100644 --- a/sdk/sql/arm-sql/src/operations/databaseColumns.ts +++ b/sdk/sql/arm-sql/src/operations/databaseColumns.ts @@ -401,7 +401,7 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion2, + Parameters.apiVersion, Parameters.schema, Parameters.table, Parameters.column, @@ -410,10 +410,10 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -428,13 +428,13 @@ const listByTableOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName ], @@ -451,13 +451,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName @@ -476,10 +476,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -496,10 +496,10 @@ const listByTableNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.schemaName, Parameters.tableName diff --git a/sdk/sql/arm-sql/src/operations/databaseEncryptionProtectors.ts b/sdk/sql/arm-sql/src/operations/databaseEncryptionProtectors.ts new file mode 100644 index 000000000000..08860085f9d0 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseEncryptionProtectors.ts @@ -0,0 +1,271 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { DatabaseEncryptionProtectors } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + EncryptionProtectorName, + DatabaseEncryptionProtectorsRevalidateOptionalParams, + DatabaseEncryptionProtectorsRevertOptionalParams +} from "../models"; + +/** Class containing DatabaseEncryptionProtectors operations. */ +export class DatabaseEncryptionProtectorsImpl + implements DatabaseEncryptionProtectors { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseEncryptionProtectors class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + async beginRevalidate( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevalidateOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + serverName, + databaseName, + encryptionProtectorName, + options + }, + revalidateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + async beginRevalidateAndWait( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevalidateOptionalParams + ): Promise { + const poller = await this.beginRevalidate( + resourceGroupName, + serverName, + databaseName, + encryptionProtectorName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + async beginRevert( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevertOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + serverName, + databaseName, + encryptionProtectorName, + options + }, + revertOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + async beginRevertAndWait( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevertOptionalParams + ): Promise { + const poller = await this.beginRevert( + resourceGroupName, + serverName, + databaseName, + encryptionProtectorName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const revalidateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/encryptionProtector/{encryptionProtectorName}/revalidate", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.encryptionProtectorName + ], + serializer +}; +const revertOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/encryptionProtector/{encryptionProtectorName}/revert", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.encryptionProtectorName + ], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseExtensionsOperations.ts b/sdk/sql/arm-sql/src/operations/databaseExtensionsOperations.ts index a012e10ebee1..68d7f93e431b 100644 --- a/sdk/sql/arm-sql/src/operations/databaseExtensionsOperations.ts +++ b/sdk/sql/arm-sql/src/operations/databaseExtensionsOperations.ts @@ -135,6 +135,26 @@ export class DatabaseExtensionsOperationsImpl } } + /** + * List database extension. This will return an empty list as it is not supported. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseExtensionsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a database extension. This will return resource not found as it is not supported. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -158,7 +178,7 @@ export class DatabaseExtensionsOperationsImpl } /** - * Perform a database extension operation, like polybase import + * Perform a database extension operation, like database import, database export, or polybase import * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -240,7 +260,7 @@ export class DatabaseExtensionsOperationsImpl } /** - * Perform a database extension operation, like polybase import + * Perform a database extension operation, like database import, database export, or polybase import * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -268,26 +288,6 @@ export class DatabaseExtensionsOperationsImpl return poller.pollUntilDone(); } - /** - * List database extension. This will return an empty list as it is not supported. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param options The options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabaseExtensionsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -313,18 +313,39 @@ export class DatabaseExtensionsOperationsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ImportExportExtensionsOperationListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions/{extensionName}", httpMethod: "GET", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.extensionName ], serializer @@ -348,41 +369,20 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters77, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters10, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.extensionName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extensions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ImportExportExtensionsOperationListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -394,10 +394,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseOperations.ts b/sdk/sql/arm-sql/src/operations/databaseOperations.ts index 99ac81d7e41a..be610e7db06c 100644 --- a/sdk/sql/arm-sql/src/operations/databaseOperations.ts +++ b/sdk/sql/arm-sql/src/operations/databaseOperations.ts @@ -130,44 +130,44 @@ export class DatabaseOperationsImpl implements DatabaseOperations { } /** - * Cancels the asynchronous operation on the database. + * 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 operationId The operation identifier. * @param options The options parameters. */ - cancel( + private _listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, - operationId: string, - options?: DatabaseOperationsCancelOptionalParams - ): Promise { + options?: DatabaseOperationsListByDatabaseOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, operationId, options }, - cancelOperationSpec + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec ); } /** - * Gets a list of operations performed on the database. + * 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 options parameters. */ - private _listByDatabase( + cancel( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabaseOperationsListByDatabaseOptionalParams - ): Promise { + operationId: string, + options?: DatabaseOperationsCancelOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { resourceGroupName, serverName, databaseName, operationId, options }, + cancelOperationSpec ); } @@ -196,22 +196,6 @@ export class DatabaseOperationsImpl implements DatabaseOperations { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const cancelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.operationId - ], - serializer -}; const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations", @@ -222,17 +206,33 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/operations/{operationId}/cancel", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.operationId + ], + serializer +}; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -244,10 +244,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseRecommendedActions.ts b/sdk/sql/arm-sql/src/operations/databaseRecommendedActions.ts index 821ad27ded44..7af0c2536f4d 100644 --- a/sdk/sql/arm-sql/src/operations/databaseRecommendedActions.ts +++ b/sdk/sql/arm-sql/src/operations/databaseRecommendedActions.ts @@ -141,13 +141,13 @@ const listByDatabaseAdvisorOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.advisorName ], headerParameters: [Parameters.accept], @@ -163,13 +163,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.advisorName, Parameters.recommendedActionName ], @@ -186,14 +186,14 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters18, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters11, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.advisorName, Parameters.recommendedActionName ], diff --git a/sdk/sql/arm-sql/src/operations/databaseSchemas.ts b/sdk/sql/arm-sql/src/operations/databaseSchemas.ts index de373b268ff9..03a0a595fe41 100644 --- a/sdk/sql/arm-sql/src/operations/databaseSchemas.ts +++ b/sdk/sql/arm-sql/src/operations/databaseSchemas.ts @@ -207,13 +207,13 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -228,13 +228,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName ], headerParameters: [Parameters.accept], @@ -251,10 +251,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts index e6e162f0491a..95bbe8d0aa5e 100644 --- a/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/databaseSecurityAlertPolicies.ts @@ -134,6 +134,26 @@ export class DatabaseSecurityAlertPoliciesImpl } } + /** + * Gets a list of database's security alert policies. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database for which the security alert policy is defined. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseSecurityAlertPoliciesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a database's security alert policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -193,26 +213,6 @@ export class DatabaseSecurityAlertPoliciesImpl ); } - /** - * Gets a list of database's security alert policies. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param databaseName The name of the database for which the security alert policy is defined. - * @param options The options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabaseSecurityAlertPoliciesListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -238,74 +238,74 @@ export class DatabaseSecurityAlertPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DatabaseSecurityAlertPolicy + bodyMapper: Mappers.DatabaseSecurityAlertListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.securityAlertPolicyName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.DatabaseSecurityAlertPolicy }, - 201: { - bodyMapper: Mappers.DatabaseSecurityAlertPolicy - }, default: {} }, - requestBody: Parameters.parameters19, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.securityAlertPolicyName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.DatabaseSecurityAlertListResult + bodyMapper: Mappers.DatabaseSecurityAlertPolicy + }, + 201: { + bodyMapper: Mappers.DatabaseSecurityAlertPolicy }, default: {} }, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters12, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.securityAlertPolicyName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -319,10 +319,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentBaselines.ts b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentBaselines.ts new file mode 100644 index 000000000000..653ba8906e1f --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentBaselines.ts @@ -0,0 +1,374 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DatabaseSqlVulnerabilityAssessmentBaselines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + DatabaseSqlVulnerabilityAssessmentBaselineSet, + VulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextOptionalParams, + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams, + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentResponse, + BaselineName, + DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentBaselinesGetResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams, + DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse, + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextResponse +} from "../models"; + +/// +/** Class containing DatabaseSqlVulnerabilityAssessmentBaselines operations. */ +export class DatabaseSqlVulnerabilityAssessmentBaselinesImpl + implements DatabaseSqlVulnerabilityAssessmentBaselines { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseSqlVulnerabilityAssessmentBaselines class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + public listBySqlVulnerabilityAssessment( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySqlVulnerabilityAssessmentPagingAll( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySqlVulnerabilityAssessmentPagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options, + settings + ); + } + }; + } + + private async *listBySqlVulnerabilityAssessmentPagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySqlVulnerabilityAssessment( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySqlVulnerabilityAssessmentNext( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySqlVulnerabilityAssessmentPagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySqlVulnerabilityAssessmentPagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessment( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + }, + listBySqlVulnerabilityAssessmentOperationSpec + ); + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + options + }, + getOperationSpec + ); + } + + /** + * Add a database's vulnerability assessment rule baseline 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 serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * ListBySqlVulnerabilityAssessmentNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param nextLink The nextLink from the previous successful call to the + * ListBySqlVulnerabilityAssessment method. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessmentNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + nextLink: string, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + nextLink, + options + }, + listBySqlVulnerabilityAssessmentNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySqlVulnerabilityAssessmentOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSetListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSet + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSet + }, + default: {} + }, + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listBySqlVulnerabilityAssessmentNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSetListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentExecuteScan.ts b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentExecuteScan.ts new file mode 100644 index 000000000000..50100a506703 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentExecuteScan.ts @@ -0,0 +1,152 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { DatabaseSqlVulnerabilityAssessmentExecuteScan } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + VulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams +} from "../models"; + +/** Class containing DatabaseSqlVulnerabilityAssessmentExecuteScan operations. */ +export class DatabaseSqlVulnerabilityAssessmentExecuteScanImpl + implements DatabaseSqlVulnerabilityAssessmentExecuteScan { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseSqlVulnerabilityAssessmentExecuteScan class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + async beginExecute( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + }, + executeOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + async beginExecuteAndWait( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise { + const poller = await this.beginExecute( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const executeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentRuleBaselines.ts b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentRuleBaselines.ts new file mode 100644 index 000000000000..348a7705bb06 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentRuleBaselines.ts @@ -0,0 +1,453 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DatabaseSqlVulnerabilityAssessmentRuleBaselines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + DatabaseSqlVulnerabilityAssessmentRuleBaseline, + VulnerabilityAssessmentName, + BaselineName, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextResponse +} from "../models"; + +/// +/** Class containing DatabaseSqlVulnerabilityAssessmentRuleBaselines operations. */ +export class DatabaseSqlVulnerabilityAssessmentRuleBaselinesImpl + implements DatabaseSqlVulnerabilityAssessmentRuleBaselines { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseSqlVulnerabilityAssessmentRuleBaselines class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + public listByBaseline( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams + ): PagedAsyncIterableIterator< + DatabaseSqlVulnerabilityAssessmentRuleBaseline + > { + const iter = this.listByBaselinePagingAll( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByBaselinePagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + options, + settings + ); + } + }; + } + + private async *listByBaselinePagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByBaseline( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByBaselineNext( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByBaselinePagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByBaselinePagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + private _listByBaseline( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + options + }, + listByBaselineOperationSpec + ); + } + + /** + * Gets a database's sql 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + ruleId, + options + }, + getOperationSpec + ); + } + + /** + * 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + ruleId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + ruleId, + options + }, + deleteOperationSpec + ); + } + + /** + * ListByBaselineNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param nextLink The nextLink from the previous successful call to the ListByBaseline method. + * @param options The options parameters. + */ + private _listByBaselineNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + nextLink: string, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + baselineName, + nextLink, + options + }, + listByBaselineNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByBaselineOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaseline + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName, + Parameters.ruleId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaseline + }, + default: {} + }, + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName, + Parameters.ruleId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName, + Parameters.ruleId + ], + serializer +}; +const listByBaselineNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentScanResult.ts b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentScanResult.ts new file mode 100644 index 000000000000..d770a631ea1e --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentScanResult.ts @@ -0,0 +1,325 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DatabaseSqlVulnerabilityAssessmentScanResult } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SqlVulnerabilityAssessmentScanResults, + SQLVulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams, + DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams, + DatabaseSqlVulnerabilityAssessmentScanResultListByScanResponse, + DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentScanResultGetResponse, + DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextResponse +} from "../models"; + +/// +/** Class containing DatabaseSqlVulnerabilityAssessmentScanResult operations. */ +export class DatabaseSqlVulnerabilityAssessmentScanResultImpl + implements DatabaseSqlVulnerabilityAssessmentScanResult { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseSqlVulnerabilityAssessmentScanResult class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param options The options parameters. + */ + public listByScan( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByScanPagingAll( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByScanPagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options, + settings + ); + } + }; + } + + private async *listByScanPagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DatabaseSqlVulnerabilityAssessmentScanResultListByScanResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByScan( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByScanNext( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByScanPagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByScanPagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + )) { + yield* page; + } + } + + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param options The options parameters. + */ + private _listByScan( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + }, + listByScanOperationSpec + ); + } + + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param scanResultId The scan result id of the specific result to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + scanResultId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + scanResultId, + options + }, + getOperationSpec + ); + } + + /** + * ListByScanNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param nextLink The nextLink from the previous successful call to the ListByScan method. + * @param options The options parameters. + */ + private _listByScanNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + nextLink: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentScanResultListByScanNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + nextLink, + options + }, + listByScanNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByScanOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SQLVulnerabilityAssessmentScanListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName1, + Parameters.scanId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanResults + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName1, + Parameters.scanId, + Parameters.scanResultId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByScanNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SQLVulnerabilityAssessmentScanListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName1, + Parameters.scanId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..db659f42801a --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentScans.ts @@ -0,0 +1,307 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DatabaseSqlVulnerabilityAssessmentScans } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SqlVulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams, + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams, + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse, + DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentScansGetResponse, + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse +} from "../models"; + +/// +/** Class containing DatabaseSqlVulnerabilityAssessmentScans operations. */ +export class DatabaseSqlVulnerabilityAssessmentScansImpl + implements DatabaseSqlVulnerabilityAssessmentScans { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseSqlVulnerabilityAssessmentScans class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + public listBySqlVulnerabilityAssessments( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySqlVulnerabilityAssessmentsPagingAll( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySqlVulnerabilityAssessmentsPagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options, + settings + ); + } + }; + } + + private async *listBySqlVulnerabilityAssessmentsPagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySqlVulnerabilityAssessments( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySqlVulnerabilityAssessmentsNext( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySqlVulnerabilityAssessmentsPagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySqlVulnerabilityAssessmentsPagingPage( + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + )) { + yield* page; + } + } + + /** + * Lists the vulnerability assessment scans of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessments( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + }, + listBySqlVulnerabilityAssessmentsOperationSpec + ); + } + + /** + * Get a database vulnerability assessment scan 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + }, + getOperationSpec + ); + } + + /** + * ListBySqlVulnerabilityAssessmentsNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param nextLink The nextLink from the previous successful call to the + * ListBySqlVulnerabilityAssessments method. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessmentsNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + nextLink: string, + options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + nextLink, + options + }, + listBySqlVulnerabilityAssessmentsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySqlVulnerabilityAssessmentsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanRecordListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanRecord + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySqlVulnerabilityAssessmentsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanRecordListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentsSettings.ts b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentsSettings.ts new file mode 100644 index 000000000000..91b462932dd6 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/databaseSqlVulnerabilityAssessmentsSettings.ts @@ -0,0 +1,274 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DatabaseSqlVulnerabilityAssessmentsSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SqlVulnerabilityAssessment, + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextOptionalParams, + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams, + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseResponse, + SqlVulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentsSettingsGetResponse, + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextResponse +} from "../models"; + +/// +/** Class containing DatabaseSqlVulnerabilityAssessmentsSettings operations. */ +export class DatabaseSqlVulnerabilityAssessmentsSettingsImpl + implements DatabaseSqlVulnerabilityAssessmentsSettings { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DatabaseSqlVulnerabilityAssessmentsSettings class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Lists SQL 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. + * @param options The options parameters. + */ + public listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + serverName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + serverName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + serverName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options + )) { + yield* page; + } + } + + /** + * Lists SQL 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. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * Gets SQL Vulnerability Assessment policy for database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + }, + getOperationSpec + ); + } + + /** + * ListByDatabaseNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + nextLink: string, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, nextLink, options }, + listByDatabaseNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessment + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName2 + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/databaseTables.ts b/sdk/sql/arm-sql/src/operations/databaseTables.ts index dd78c3d9135f..aae755599b60 100644 --- a/sdk/sql/arm-sql/src/operations/databaseTables.ts +++ b/sdk/sql/arm-sql/src/operations/databaseTables.ts @@ -236,13 +236,13 @@ const listBySchemaOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName ], headerParameters: [Parameters.accept], @@ -258,13 +258,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName ], @@ -282,10 +282,10 @@ const listBySchemaNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.schemaName ], diff --git a/sdk/sql/arm-sql/src/operations/databaseUsages.ts b/sdk/sql/arm-sql/src/operations/databaseUsages.ts index 32f4ff1cad05..04242714040a 100644 --- a/sdk/sql/arm-sql/src/operations/databaseUsages.ts +++ b/sdk/sql/arm-sql/src/operations/databaseUsages.ts @@ -183,13 +183,13 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -205,10 +205,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentRuleBaselines.ts b/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentRuleBaselines.ts index c4b1fc78813d..c629a817a638 100644 --- a/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentRuleBaselines.ts +++ b/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentRuleBaselines.ts @@ -161,16 +161,16 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.ruleId, - Parameters.baselineName + Parameters.baselineName1 ], headerParameters: [Parameters.accept], serializer @@ -185,17 +185,17 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters15, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.ruleId, - Parameters.baselineName + Parameters.baselineName1 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -206,16 +206,16 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.ruleId, - Parameters.baselineName + Parameters.baselineName1 ], serializer }; diff --git a/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentScans.ts index 050bf6fa9550..5cfa83e0df06 100644 --- a/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentScans.ts +++ b/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessmentScans.ts @@ -21,11 +21,11 @@ import { DatabaseVulnerabilityAssessmentScansListByDatabaseNextOptionalParams, DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams, DatabaseVulnerabilityAssessmentScansListByDatabaseResponse, - DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams, DatabaseVulnerabilityAssessmentScansGetOptionalParams, DatabaseVulnerabilityAssessmentScansGetResponse, DatabaseVulnerabilityAssessmentScansExportOptionalParams, DatabaseVulnerabilityAssessmentScansExportResponse, + DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams, DatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse } from "../models"; @@ -146,6 +146,96 @@ export class DatabaseVulnerabilityAssessmentScansImpl } } + /** + * Lists the vulnerability assessment scans of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + options + }, + listByDatabaseOperationSpec + ); + } + + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + scanId: string, + options?: DatabaseVulnerabilityAssessmentScansGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + }, + getOperationSpec + ); + } + + /** + * Convert an existing scan result to a human readable format. If already exists nothing happens + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the scanned database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id. + * @param options The options parameters. + */ + export( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + scanId: string, + options?: DatabaseVulnerabilityAssessmentScansExportOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + }, + exportOperationSpec + ); + } + /** * Executes a Vulnerability Assessment database scan. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -252,96 +342,6 @@ export class DatabaseVulnerabilityAssessmentScansImpl return poller.pollUntilDone(); } - /** - * Lists the vulnerability assessment scans of a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param options The options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - vulnerabilityAssessmentName: VulnerabilityAssessmentName, - options?: DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - options - }, - listByDatabaseOperationSpec - ); - } - - /** - * Gets a vulnerability assessment scan record of a database. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param databaseName The name of the database. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serverName: string, - databaseName: string, - vulnerabilityAssessmentName: VulnerabilityAssessmentName, - scanId: string, - options?: DatabaseVulnerabilityAssessmentScansGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - options - }, - getOperationSpec - ); - } - - /** - * Convert an existing scan result to a human readable format. If already exists nothing happens - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param databaseName The name of the scanned database. - * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id. - * @param options The options parameters. - */ - export( - resourceGroupName: string, - serverName: string, - databaseName: string, - vulnerabilityAssessmentName: VulnerabilityAssessmentName, - scanId: string, - options?: DatabaseVulnerabilityAssessmentScansExportOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - vulnerabilityAssessmentName, - scanId, - options - }, - exportOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -376,23 +376,6 @@ export class DatabaseVulnerabilityAssessmentScansImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const initiateScanOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.vulnerabilityAssessmentName, - Parameters.scanId - ], - serializer -}; const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", @@ -403,13 +386,13 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName ], headerParameters: [Parameters.accept], @@ -425,13 +408,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.scanId ], @@ -451,19 +434,36 @@ const exportOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.scanId ], headerParameters: [Parameters.accept], serializer }; +const initiateScanOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId + ], + serializer +}; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -475,10 +475,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.vulnerabilityAssessmentName ], diff --git a/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessments.ts b/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessments.ts index a14c25883362..85bab17abfc8 100644 --- a/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessments.ts +++ b/sdk/sql/arm-sql/src/operations/databaseVulnerabilityAssessments.ts @@ -136,6 +136,27 @@ export class DatabaseVulnerabilityAssessmentsImpl } } + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets the database's vulnerability assessment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -223,27 +244,6 @@ export class DatabaseVulnerabilityAssessmentsImpl ); } - /** - * 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -270,6 +270,27 @@ export class DatabaseVulnerabilityAssessmentsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", @@ -280,13 +301,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName ], headerParameters: [Parameters.accept], @@ -305,14 +326,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -324,36 +345,15 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.vulnerabilityAssessmentName - ], - serializer -}; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName + Parameters.vulnerabilityAssessmentName ], - headerParameters: [Parameters.accept], serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -367,10 +367,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/databases.ts b/sdk/sql/arm-sql/src/operations/databases.ts index 1f6d601bfeaf..2f2e2e1cb8c2 100644 --- a/sdk/sql/arm-sql/src/operations/databases.ts +++ b/sdk/sql/arm-sql/src/operations/databases.ts @@ -16,12 +16,6 @@ import { SqlManagementClient } from "../sqlManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { - Metric, - DatabasesListMetricsOptionalParams, - DatabasesListMetricsResponse, - MetricDefinition, - DatabasesListMetricDefinitionsOptionalParams, - DatabasesListMetricDefinitionsResponse, Database, DatabasesListByServerNextOptionalParams, DatabasesListByServerOptionalParams, @@ -40,20 +34,20 @@ import { DatabaseUpdate, DatabasesUpdateOptionalParams, DatabasesUpdateResponse, + ExportDatabaseDefinition, + DatabasesExportOptionalParams, + DatabasesExportResponse, DatabasesFailoverOptionalParams, + ImportExistingDatabaseDefinition, + DatabasesImportOptionalParams, + DatabasesImportResponse, + ResourceMoveDefinition, + DatabasesRenameOptionalParams, DatabasesPauseOptionalParams, DatabasesPauseResponse, DatabasesResumeOptionalParams, DatabasesResumeResponse, DatabasesUpgradeDataWarehouseOptionalParams, - ResourceMoveDefinition, - DatabasesRenameOptionalParams, - ImportExistingDatabaseDefinition, - DatabasesImportOptionalParams, - DatabasesImportResponse, - ExportDatabaseDefinition, - DatabasesExportOptionalParams, - DatabasesExportResponse, DatabasesListByServerNextResponse, DatabasesListByElasticPoolNextResponse, DatabasesListInaccessibleByServerNextResponse @@ -72,164 +66,6 @@ export class DatabasesImpl implements Databases { this.client = client; } - /** - * 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 options parameters. - */ - public listMetrics( - resourceGroupName: string, - serverName: string, - databaseName: string, - filter: string, - options?: DatabasesListMetricsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listMetricsPagingAll( - resourceGroupName, - serverName, - databaseName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listMetricsPagingPage( - resourceGroupName, - serverName, - databaseName, - filter, - options, - settings - ); - } - }; - } - - private async *listMetricsPagingPage( - resourceGroupName: string, - serverName: string, - databaseName: string, - filter: string, - options?: DatabasesListMetricsOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: DatabasesListMetricsResponse; - result = await this._listMetrics( - resourceGroupName, - serverName, - databaseName, - filter, - options - ); - yield result.value || []; - } - - private async *listMetricsPagingAll( - resourceGroupName: string, - serverName: string, - databaseName: string, - filter: string, - options?: DatabasesListMetricsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listMetricsPagingPage( - resourceGroupName, - serverName, - databaseName, - filter, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - public listMetricDefinitions( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabasesListMetricDefinitionsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listMetricDefinitionsPagingAll( - resourceGroupName, - serverName, - databaseName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listMetricDefinitionsPagingPage( - resourceGroupName, - serverName, - databaseName, - options, - settings - ); - } - }; - } - - private async *listMetricDefinitionsPagingPage( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabasesListMetricDefinitionsOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: DatabasesListMetricDefinitionsResponse; - result = await this._listMetricDefinitions( - resourceGroupName, - serverName, - databaseName, - options - ); - yield result.value || []; - } - - private async *listMetricDefinitionsPagingAll( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabasesListMetricDefinitionsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listMetricDefinitionsPagingPage( - resourceGroupName, - serverName, - databaseName, - options - )) { - yield* page; - } - } - /** * Gets a list of databases. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -490,48 +326,6 @@ export class DatabasesImpl implements Databases { } } - /** - * 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 options parameters. - */ - private _listMetrics( - resourceGroupName: string, - serverName: string, - databaseName: string, - filter: string, - options?: DatabasesListMetricsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, filter, options }, - listMetricsOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listMetricDefinitions( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabasesListMetricDefinitionsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listMetricDefinitionsOperationSpec - ); - } - /** * Gets a list of databases. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -637,7 +431,8 @@ export class DatabasesImpl implements Databases { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -729,7 +524,8 @@ export class DatabasesImpl implements Databases { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -825,7 +621,8 @@ export class DatabasesImpl implements Databases { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -858,43 +655,30 @@ export class DatabasesImpl implements Databases { } /** - * 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 options parameters. - */ - private _listByElasticPool( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: DatabasesListByElasticPoolOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, options }, - listByElasticPoolOperationSpec - ); - } - - /** - * Failovers a database. + * Exports a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to failover. + * @param databaseName The name of the database. + * @param parameters The database export request parameters. * @param options The options parameters. */ - async beginFailover( + async beginExport( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesFailoverOptionalParams - ): Promise, void>> { + parameters: ExportDatabaseDefinition, + options?: DatabasesExportOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DatabasesExportResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -932,8 +716,8 @@ export class DatabasesImpl implements Databases { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, databaseName, options }, - failoverOperationSpec + { resourceGroupName, serverName, databaseName, parameters, options }, + exportOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -944,69 +728,49 @@ export class DatabasesImpl implements Databases { } /** - * Failovers a database. + * Exports a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to failover. + * @param databaseName The name of the database. + * @param parameters The database export request parameters. * @param options The options parameters. */ - async beginFailoverAndWait( + async beginExportAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesFailoverOptionalParams - ): Promise { - const poller = await this.beginFailover( + parameters: ExportDatabaseDefinition, + options?: DatabasesExportOptionalParams + ): Promise { + const poller = await this.beginExport( resourceGroupName, serverName, databaseName, + parameters, options ); return poller.pollUntilDone(); } /** - * Gets a list of inaccessible databases in a logical server - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param options The options parameters. - */ - private _listInaccessibleByServer( - resourceGroupName: string, - serverName: string, - options?: DatabasesListInaccessibleByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listInaccessibleByServerOperationSpec - ); - } - - /** - * Pauses a database. + * Failovers a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be paused. + * @param databaseName The name of the database to failover. * @param options The options parameters. */ - async beginPause( + async beginFailover( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesPauseOptionalParams - ): Promise< - PollerLike< - PollOperationState, - DatabasesPauseResponse - > - > { + options?: DatabasesFailoverOptionalParams + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1045,7 +809,7 @@ export class DatabasesImpl implements Databases { const lro = new LroImpl( sendOperation, { resourceGroupName, serverName, databaseName, options }, - pauseOperationSpec + failoverOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1056,20 +820,20 @@ export class DatabasesImpl implements Databases { } /** - * Pauses a database. + * Failovers a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be paused. + * @param databaseName The name of the database to failover. * @param options The options parameters. */ - async beginPauseAndWait( + async beginFailoverAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesPauseOptionalParams - ): Promise { - const poller = await this.beginPause( + options?: DatabasesFailoverOptionalParams + ): Promise { + const poller = await this.beginFailover( resourceGroupName, serverName, databaseName, @@ -1079,28 +843,30 @@ export class DatabasesImpl implements Databases { } /** - * Resumes a database. + * Imports a bacpac into a new database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be resumed. + * @param databaseName The name of the database. + * @param parameters The database import request parameters. * @param options The options parameters. */ - async beginResume( + async beginImport( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesResumeOptionalParams + parameters: ImportExistingDatabaseDefinition, + options?: DatabasesImportOptionalParams ): Promise< PollerLike< - PollOperationState, - DatabasesResumeResponse + PollOperationState, + DatabasesImportResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1138,8 +904,8 @@ export class DatabasesImpl implements Databases { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, databaseName, options }, - resumeOperationSpec + { resourceGroupName, serverName, databaseName, parameters, options }, + importOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1150,46 +916,76 @@ export class DatabasesImpl implements Databases { } /** - * Resumes a database. + * Imports a bacpac into a new database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be resumed. + * @param databaseName The name of the database. + * @param parameters The database import request parameters. * @param options The options parameters. */ - async beginResumeAndWait( + async beginImportAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesResumeOptionalParams - ): Promise { - const poller = await this.beginResume( + parameters: ImportExistingDatabaseDefinition, + options?: DatabasesImportOptionalParams + ): Promise { + const poller = await this.beginImport( resourceGroupName, serverName, databaseName, + parameters, options ); return poller.pollUntilDone(); } /** - * Upgrades a data warehouse. + * 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 be upgraded. + * @param databaseName The name of the database to rename. + * @param parameters The resource move definition for renaming this database. * @param options The options parameters. */ - async beginUpgradeDataWarehouse( + rename( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesUpgradeDataWarehouseOptionalParams - ): Promise, void>> { + parameters: ResourceMoveDefinition, + options?: DatabasesRenameOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, parameters, options }, + renameOperationSpec + ); + } + + /** + * 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 options parameters. + */ + async beginPause( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabasesPauseOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DatabasesPauseResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1228,7 +1024,7 @@ export class DatabasesImpl implements Databases { const lro = new LroImpl( sendOperation, { resourceGroupName, serverName, databaseName, options }, - upgradeDataWarehouseOperationSpec + pauseOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1239,20 +1035,20 @@ export class DatabasesImpl implements Databases { } /** - * Upgrades a data warehouse. + * 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 upgraded. + * @param databaseName The name of the database to be paused. * @param options The options parameters. */ - async beginUpgradeDataWarehouseAndWait( + async beginPauseAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesUpgradeDataWarehouseOptionalParams - ): Promise { - const poller = await this.beginUpgradeDataWarehouse( + options?: DatabasesPauseOptionalParams + ): Promise { + const poller = await this.beginPause( resourceGroupName, serverName, databaseName, @@ -1262,52 +1058,28 @@ export class DatabasesImpl implements Databases { } /** - * 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 options parameters. - */ - rename( - resourceGroupName: string, - serverName: string, - databaseName: string, - parameters: ResourceMoveDefinition, - options?: DatabasesRenameOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, parameters, options }, - renameOperationSpec - ); - } - - /** - * Imports a bacpac into a new database. + * 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. - * @param parameters The database import request parameters. + * @param databaseName The name of the database to be resumed. * @param options The options parameters. */ - async beginImport( + async beginResume( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ImportExistingDatabaseDefinition, - options?: DatabasesImportOptionalParams + options?: DatabasesResumeOptionalParams ): Promise< PollerLike< - PollOperationState, - DatabasesImportResponse + PollOperationState, + DatabasesResumeResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1345,8 +1117,8 @@ export class DatabasesImpl implements Databases { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, databaseName, parameters, options }, - importOperationSpec + { resourceGroupName, serverName, databaseName, options }, + resumeOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1357,56 +1129,46 @@ export class DatabasesImpl implements Databases { } /** - * Imports a bacpac into a new database. + * 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. - * @param parameters The database import request parameters. + * @param databaseName The name of the database to be resumed. * @param options The options parameters. */ - async beginImportAndWait( + async beginResumeAndWait( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ImportExistingDatabaseDefinition, - options?: DatabasesImportOptionalParams - ): Promise { - const poller = await this.beginImport( + options?: DatabasesResumeOptionalParams + ): Promise { + const poller = await this.beginResume( resourceGroupName, serverName, databaseName, - parameters, options ); return poller.pollUntilDone(); } /** - * Exports a database. + * 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. - * @param parameters The database export request parameters. + * @param databaseName The name of the database to be upgraded. * @param options The options parameters. */ - async beginExport( + async beginUpgradeDataWarehouse( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ExportDatabaseDefinition, - options?: DatabasesExportOptionalParams - ): Promise< - PollerLike< - PollOperationState, - DatabasesExportResponse - > - > { + options?: DatabasesUpgradeDataWarehouseOptionalParams + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1444,8 +1206,8 @@ export class DatabasesImpl implements Databases { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, databaseName, parameters, options }, - exportOperationSpec + { resourceGroupName, serverName, databaseName, options }, + upgradeDataWarehouseOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1456,31 +1218,66 @@ export class DatabasesImpl implements Databases { } /** - * Exports a database. + * 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. - * @param parameters The database export request parameters. + * @param databaseName The name of the database to be upgraded. * @param options The options parameters. */ - async beginExportAndWait( + async beginUpgradeDataWarehouseAndWait( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ExportDatabaseDefinition, - options?: DatabasesExportOptionalParams - ): Promise { - const poller = await this.beginExport( + options?: DatabasesUpgradeDataWarehouseOptionalParams + ): Promise { + const poller = await this.beginUpgradeDataWarehouse( resourceGroupName, serverName, databaseName, - parameters, options ); return poller.pollUntilDone(); } + /** + * 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 options parameters. + */ + private _listByElasticPool( + resourceGroupName: string, + serverName: string, + elasticPoolName: string, + options?: DatabasesListByElasticPoolOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, elasticPoolName, options }, + listByElasticPoolOperationSpec + ); + } + + /** + * Gets a list of inaccessible databases in a logical server + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The options parameters. + */ + private _listInaccessibleByServer( + resourceGroupName: string, + serverName: string, + options?: DatabasesListInaccessibleByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listInaccessibleByServerOperationSpec + ); + } + /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -1547,46 +1344,6 @@ export class DatabasesImpl implements Databases { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listMetricsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metrics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricListResult - } - }, - queryParameters: [Parameters.apiVersion, Parameters.filter], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listMetricDefinitionsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/metricDefinitions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricDefinitionListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases", @@ -1597,12 +1354,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.skipToken, Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion, Parameters.skipToken], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1617,13 +1374,17 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1647,14 +1408,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters17, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1665,13 +1426,13 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], serializer }; @@ -1694,38 +1455,49 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters18, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByElasticPoolOperationSpec: coreClient.OperationSpec = { +const exportOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.DatabaseListResult + bodyMapper: Mappers.ImportExportOperationResult + }, + 201: { + bodyMapper: Mappers.ImportExportOperationResult + }, + 202: { + bodyMapper: Mappers.ImportExportOperationResult + }, + 204: { + bodyMapper: Mappers.ImportExportOperationResult }, default: {} }, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters19, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.elasticPoolName + Parameters.databaseName, + Parameters.subscriptionId ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const failoverOperationSpec: coreClient.OperationSpec = { @@ -1733,34 +1505,64 @@ const failoverOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/failover", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1, Parameters.replicaType], + queryParameters: [Parameters.apiVersion, Parameters.replicaType], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], serializer }; -const listInaccessibleByServerOperationSpec: coreClient.OperationSpec = { +const importOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.DatabaseListResult + bodyMapper: Mappers.ImportExportOperationResult + }, + 201: { + bodyMapper: Mappers.ImportExportOperationResult + }, + 202: { + bodyMapper: Mappers.ImportExportOperationResult + }, + 204: { + bodyMapper: Mappers.ImportExportOperationResult }, default: {} }, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters20, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const renameOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + requestBody: Parameters.parameters21, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.contentType], + mediaType: "json", serializer }; const pauseOperationSpec: coreClient.OperationSpec = { @@ -1782,13 +1584,13 @@ const pauseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1812,13 +1614,13 @@ const resumeOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -1828,96 +1630,55 @@ const upgradeDataWarehouseOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/upgradeDataWarehouse", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - serializer -}; -const renameOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/move", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], - headerParameters: [Parameters.contentType], - mediaType: "json", serializer }; -const importOperationSpec: coreClient.OperationSpec = { +const listByElasticPoolOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/import", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/databases", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ImportExportOperationResult - }, - 201: { - bodyMapper: Mappers.ImportExportOperationResult - }, - 202: { - bodyMapper: Mappers.ImportExportOperationResult - }, - 204: { - bodyMapper: Mappers.ImportExportOperationResult + bodyMapper: Mappers.DatabaseListResult }, default: {} }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.subscriptionId, + Parameters.elasticPoolName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const exportOperationSpec: coreClient.OperationSpec = { +const listInaccessibleByServerOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/export", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/inaccessibleDatabases", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ImportExportOperationResult - }, - 201: { - bodyMapper: Mappers.ImportExportOperationResult - }, - 202: { - bodyMapper: Mappers.ImportExportOperationResult - }, - 204: { - bodyMapper: Mappers.ImportExportOperationResult + bodyMapper: Mappers.DatabaseListResult }, default: {} }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.subscriptionId ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -1931,9 +1692,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -1950,11 +1711,11 @@ const listByElasticPoolNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.elasticPoolName, - Parameters.nextLink + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.elasticPoolName ], headerParameters: [Parameters.accept], serializer @@ -1970,9 +1731,9 @@ const listInaccessibleByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/deletedServers.ts b/sdk/sql/arm-sql/src/operations/deletedServers.ts index e41206404cdd..b616d83d3393 100644 --- a/sdk/sql/arm-sql/src/operations/deletedServers.ts +++ b/sdk/sql/arm-sql/src/operations/deletedServers.ts @@ -174,34 +174,34 @@ export class DeletedServersImpl implements DeletedServers { } /** - * Gets a deleted server. + * Gets a list of deleted servers for a location. * @param locationName The name of the region where the resource is located. - * @param deletedServerName The name of the deleted server. * @param options The options parameters. */ - get( + private _listByLocation( locationName: string, - deletedServerName: string, - options?: DeletedServersGetOptionalParams - ): Promise { + options?: DeletedServersListByLocationOptionalParams + ): Promise { return this.client.sendOperationRequest( - { locationName, deletedServerName, options }, - getOperationSpec + { locationName, options }, + listByLocationOperationSpec ); } /** - * Gets a list of deleted servers for a location. + * Gets a deleted server. * @param locationName The name of the region where the resource is located. + * @param deletedServerName The name of the deleted server. * @param options The options parameters. */ - private _listByLocation( + get( locationName: string, - options?: DeletedServersListByLocationOptionalParams - ): Promise { + deletedServerName: string, + options?: DeletedServersGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { locationName, options }, - listByLocationOperationSpec + { locationName, deletedServerName, options }, + getOperationSpec ); } @@ -337,46 +337,46 @@ const listOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const listByLocationOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeletedServer + bodyMapper: Mappers.DeletedServerListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.locationName, - Parameters.deletedServerName + Parameters.locationName ], headerParameters: [Parameters.accept], serializer }; -const listByLocationOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/deletedServers/{deletedServerName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DeletedServerListResult + bodyMapper: Mappers.DeletedServer }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.locationName + Parameters.locationName, + Parameters.deletedServerName ], headerParameters: [Parameters.accept], serializer @@ -400,7 +400,7 @@ const recoverOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/sql/arm-sql/src/operations/distributedAvailabilityGroups.ts b/sdk/sql/arm-sql/src/operations/distributedAvailabilityGroups.ts new file mode 100644 index 000000000000..d62ba18a5088 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/distributedAvailabilityGroups.ts @@ -0,0 +1,780 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { DistributedAvailabilityGroups } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + DistributedAvailabilityGroup, + DistributedAvailabilityGroupsListByInstanceNextOptionalParams, + DistributedAvailabilityGroupsListByInstanceOptionalParams, + DistributedAvailabilityGroupsListByInstanceResponse, + DistributedAvailabilityGroupsGetOptionalParams, + DistributedAvailabilityGroupsGetResponse, + DistributedAvailabilityGroupsCreateOrUpdateOptionalParams, + DistributedAvailabilityGroupsCreateOrUpdateResponse, + DistributedAvailabilityGroupsDeleteOptionalParams, + DistributedAvailabilityGroupsUpdateOptionalParams, + DistributedAvailabilityGroupsUpdateResponse, + DistributedAvailabilityGroupSetRole, + DistributedAvailabilityGroupsSetRoleOptionalParams, + DistributedAvailabilityGroupsSetRoleResponse, + DistributedAvailabilityGroupsListByInstanceNextResponse +} from "../models"; + +/// +/** Class containing DistributedAvailabilityGroups operations. */ +export class DistributedAvailabilityGroupsImpl + implements DistributedAvailabilityGroups { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class DistributedAvailabilityGroups class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of a distributed availability groups in 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 options parameters. + */ + public listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: DistributedAvailabilityGroupsListByInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: DistributedAvailabilityGroupsListByInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: DistributedAvailabilityGroupsListByInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: DistributedAvailabilityGroupsListByInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of a distributed availability groups in 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: DistributedAvailabilityGroupsListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + + /** + * Gets a distributed availability group info. + * @param resourceGroupName The 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 distributedAvailabilityGroupName The distributed availability group name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + options?: DistributedAvailabilityGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + options + }, + getOperationSpec + ); + } + + /** + * Creates a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DistributedAvailabilityGroupsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Drops a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + options?: DistributedAvailabilityGroupsDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + options + }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Drops a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + options?: DistributedAvailabilityGroupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Updates a distributed availability group replication mode. + * @param resourceGroupName The 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DistributedAvailabilityGroupsUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + parameters, + options + }, + updateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates a distributed availability group replication mode. + * @param resourceGroupName The 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Sets the role for managed instance in a distributed availability 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 managedInstanceName The name of the managed instance. + * @param distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group set role request parameters. + * @param options The options parameters. + */ + async beginSetRole( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroupSetRole, + options?: DistributedAvailabilityGroupsSetRoleOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DistributedAvailabilityGroupsSetRoleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + parameters, + options + }, + setRoleOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Sets the role for managed instance in a distributed availability 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 managedInstanceName The name of the managed instance. + * @param distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group set role request parameters. + * @param options The options parameters. + */ + async beginSetRoleAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroupSetRole, + options?: DistributedAvailabilityGroupsSetRoleOptionalParams + ): Promise { + const poller = await this.beginSetRole( + resourceGroupName, + managedInstanceName, + distributedAvailabilityGroupName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByInstance method. + * @param options The options parameters. + */ + private _listByInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: DistributedAvailabilityGroupsListByInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DistributedAvailabilityGroupsListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.distributedAvailabilityGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 201: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 202: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 204: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + default: {} + }, + requestBody: Parameters.parameters22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.distributedAvailabilityGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.distributedAvailabilityGroupName + ], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 201: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 202: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 204: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + default: {} + }, + requestBody: Parameters.parameters22, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.distributedAvailabilityGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const setRoleOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/distributedAvailabilityGroups/{distributedAvailabilityGroupName}/setRole", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 201: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 202: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + 204: { + bodyMapper: Mappers.DistributedAvailabilityGroup + }, + default: {} + }, + requestBody: Parameters.parameters23, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.distributedAvailabilityGroupName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DistributedAvailabilityGroupsListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/elasticPoolActivities.ts b/sdk/sql/arm-sql/src/operations/elasticPoolActivities.ts deleted file mode 100644 index 2f5362f3f0f2..000000000000 --- a/sdk/sql/arm-sql/src/operations/elasticPoolActivities.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ElasticPoolActivities } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SqlManagementClient } from "../sqlManagementClient"; -import { - ElasticPoolActivity, - ElasticPoolActivitiesListByElasticPoolOptionalParams, - ElasticPoolActivitiesListByElasticPoolResponse -} from "../models"; - -/// -/** Class containing ElasticPoolActivities operations. */ -export class ElasticPoolActivitiesImpl implements ElasticPoolActivities { - private readonly client: SqlManagementClient; - - /** - * Initialize a new instance of the class ElasticPoolActivities class. - * @param client Reference to the service client - */ - constructor(client: SqlManagementClient) { - 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 options parameters. - */ - public listByElasticPool( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolActivitiesListByElasticPoolOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByElasticPoolPagingAll( - resourceGroupName, - serverName, - elasticPoolName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByElasticPoolPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - options, - settings - ); - } - }; - } - - private async *listByElasticPoolPagingPage( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolActivitiesListByElasticPoolOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ElasticPoolActivitiesListByElasticPoolResponse; - result = await this._listByElasticPool( - resourceGroupName, - serverName, - elasticPoolName, - options - ); - yield result.value || []; - } - - private async *listByElasticPoolPagingAll( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolActivitiesListByElasticPoolOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByElasticPoolPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _listByElasticPool( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolActivitiesListByElasticPoolOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, options }, - listByElasticPoolOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByElasticPoolOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolActivity", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ElasticPoolActivityListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.elasticPoolName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/sql/arm-sql/src/operations/elasticPoolDatabaseActivities.ts b/sdk/sql/arm-sql/src/operations/elasticPoolDatabaseActivities.ts deleted file mode 100644 index 2601e5cf7795..000000000000 --- a/sdk/sql/arm-sql/src/operations/elasticPoolDatabaseActivities.ts +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ElasticPoolDatabaseActivities } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SqlManagementClient } from "../sqlManagementClient"; -import { - ElasticPoolDatabaseActivity, - ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams, - ElasticPoolDatabaseActivitiesListByElasticPoolResponse -} from "../models"; - -/// -/** Class containing ElasticPoolDatabaseActivities operations. */ -export class ElasticPoolDatabaseActivitiesImpl - implements ElasticPoolDatabaseActivities { - private readonly client: SqlManagementClient; - - /** - * Initialize a new instance of the class ElasticPoolDatabaseActivities class. - * @param client Reference to the service client - */ - constructor(client: SqlManagementClient) { - 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 options parameters. - */ - public listByElasticPool( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByElasticPoolPagingAll( - resourceGroupName, - serverName, - elasticPoolName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByElasticPoolPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - options, - settings - ); - } - }; - } - - private async *listByElasticPoolPagingPage( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ElasticPoolDatabaseActivitiesListByElasticPoolResponse; - result = await this._listByElasticPool( - resourceGroupName, - serverName, - elasticPoolName, - options - ); - yield result.value || []; - } - - private async *listByElasticPoolPagingAll( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByElasticPoolPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _listByElasticPool( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, options }, - listByElasticPoolOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByElasticPoolOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/elasticPoolDatabaseActivity", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ElasticPoolDatabaseActivityListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.elasticPoolName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/sql/arm-sql/src/operations/elasticPoolOperations.ts b/sdk/sql/arm-sql/src/operations/elasticPoolOperations.ts index a0e6acea76b6..3da77036d56f 100644 --- a/sdk/sql/arm-sql/src/operations/elasticPoolOperations.ts +++ b/sdk/sql/arm-sql/src/operations/elasticPoolOperations.ts @@ -130,44 +130,44 @@ export class ElasticPoolOperationsImpl implements ElasticPoolOperations { } /** - * Cancels the asynchronous operation on the elastic pool. + * 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 operationId The operation identifier. * @param options The options parameters. */ - cancel( + private _listByElasticPool( resourceGroupName: string, serverName: string, elasticPoolName: string, - operationId: string, - options?: ElasticPoolOperationsCancelOptionalParams - ): Promise { + options?: ElasticPoolOperationsListByElasticPoolOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, operationId, options }, - cancelOperationSpec + { resourceGroupName, serverName, elasticPoolName, options }, + listByElasticPoolOperationSpec ); } /** - * Gets a list of operations performed on the elastic pool. + * 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 options parameters. */ - private _listByElasticPool( + cancel( resourceGroupName: string, serverName: string, elasticPoolName: string, - options?: ElasticPoolOperationsListByElasticPoolOptionalParams - ): Promise { + operationId: string, + options?: ElasticPoolOperationsCancelOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, options }, - listByElasticPoolOperationSpec + { resourceGroupName, serverName, elasticPoolName, operationId, options }, + cancelOperationSpec ); } @@ -196,22 +196,6 @@ export class ElasticPoolOperationsImpl implements ElasticPoolOperations { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const cancelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.elasticPoolName, - Parameters.operationId - ], - serializer -}; const listByElasticPoolOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations", @@ -222,17 +206,33 @@ const listByElasticPoolOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.elasticPoolName ], headerParameters: [Parameters.accept], serializer }; +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/operations/{operationId}/cancel", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.operationId, + Parameters.elasticPoolName + ], + serializer +}; const listByElasticPoolNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -244,11 +244,11 @@ const listByElasticPoolNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.elasticPoolName, - Parameters.nextLink + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.elasticPoolName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/elasticPools.ts b/sdk/sql/arm-sql/src/operations/elasticPools.ts index e6dcfe9e14c7..c66dc5092349 100644 --- a/sdk/sql/arm-sql/src/operations/elasticPools.ts +++ b/sdk/sql/arm-sql/src/operations/elasticPools.ts @@ -16,12 +16,6 @@ import { SqlManagementClient } from "../sqlManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { - Metric, - ElasticPoolsListMetricsOptionalParams, - ElasticPoolsListMetricsResponse, - MetricDefinition, - ElasticPoolsListMetricDefinitionsOptionalParams, - ElasticPoolsListMetricDefinitionsResponse, ElasticPool, ElasticPoolsListByServerNextOptionalParams, ElasticPoolsListByServerOptionalParams, @@ -51,164 +45,6 @@ export class ElasticPoolsImpl implements ElasticPools { 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 options parameters. - */ - public listMetrics( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - filter: string, - options?: ElasticPoolsListMetricsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listMetricsPagingAll( - resourceGroupName, - serverName, - elasticPoolName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listMetricsPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - filter, - options, - settings - ); - } - }; - } - - private async *listMetricsPagingPage( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - filter: string, - options?: ElasticPoolsListMetricsOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ElasticPoolsListMetricsResponse; - result = await this._listMetrics( - resourceGroupName, - serverName, - elasticPoolName, - filter, - options - ); - yield result.value || []; - } - - private async *listMetricsPagingAll( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - filter: string, - options?: ElasticPoolsListMetricsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listMetricsPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - filter, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - public listMetricDefinitions( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolsListMetricDefinitionsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listMetricDefinitionsPagingAll( - resourceGroupName, - serverName, - elasticPoolName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listMetricDefinitionsPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - options, - settings - ); - } - }; - } - - private async *listMetricDefinitionsPagingPage( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolsListMetricDefinitionsOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ElasticPoolsListMetricDefinitionsResponse; - result = await this._listMetricDefinitions( - resourceGroupName, - serverName, - elasticPoolName, - options - ); - yield result.value || []; - } - - private async *listMetricDefinitionsPagingAll( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolsListMetricDefinitionsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listMetricDefinitionsPagingPage( - resourceGroupName, - serverName, - elasticPoolName, - options - )) { - yield* page; - } - } - /** * Gets all elastic pools in a server. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -290,48 +126,6 @@ export class ElasticPoolsImpl implements ElasticPools { } } - /** - * 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 options parameters. - */ - private _listMetrics( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - filter: string, - options?: ElasticPoolsListMetricsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, filter, options }, - listMetricsOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listMetricDefinitions( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolsListMetricDefinitionsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, elasticPoolName, options }, - listMetricDefinitionsOperationSpec - ); - } - /** * Gets all elastic pools in a server. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -437,7 +231,8 @@ export class ElasticPoolsImpl implements ElasticPools { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" }); await poller.poll(); return poller; @@ -529,7 +324,8 @@ export class ElasticPoolsImpl implements ElasticPools { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -625,7 +421,8 @@ export class ElasticPoolsImpl implements ElasticPools { ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; @@ -769,46 +566,6 @@ export class ElasticPoolsImpl implements ElasticPools { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listMetricsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metrics", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricListResult - } - }, - queryParameters: [Parameters.apiVersion, Parameters.filter], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.elasticPoolName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listMetricDefinitionsOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/metricDefinitions", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MetricDefinitionListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.elasticPoolName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools", @@ -819,12 +576,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.skip, Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion, Parameters.skip], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -839,12 +596,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.elasticPoolName ], headerParameters: [Parameters.accept], @@ -869,13 +626,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters24, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.elasticPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -887,12 +644,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.elasticPoolName ], serializer @@ -916,13 +673,13 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters25, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.elasticPoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -934,12 +691,12 @@ const failoverOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}/failover", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.elasticPoolName ], serializer @@ -955,9 +712,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/encryptionProtectors.ts b/sdk/sql/arm-sql/src/operations/encryptionProtectors.ts index 52b2aa97ea0b..1028dc3dd7c3 100644 --- a/sdk/sql/arm-sql/src/operations/encryptionProtectors.ts +++ b/sdk/sql/arm-sql/src/operations/encryptionProtectors.ts @@ -388,12 +388,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -408,12 +408,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.encryptionProtectorName ], headerParameters: [Parameters.accept], @@ -438,13 +438,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters22, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters26, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.encryptionProtectorName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -456,12 +456,12 @@ const revalidateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/encryptionProtector/{encryptionProtectorName}/revalidate", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.encryptionProtectorName ], serializer @@ -477,9 +477,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/endpointCertificates.ts b/sdk/sql/arm-sql/src/operations/endpointCertificates.ts new file mode 100644 index 000000000000..c0aaf8145289 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/endpointCertificates.ts @@ -0,0 +1,244 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { EndpointCertificates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + EndpointCertificate, + EndpointCertificatesListByInstanceNextOptionalParams, + EndpointCertificatesListByInstanceOptionalParams, + EndpointCertificatesListByInstanceResponse, + EndpointCertificatesGetOptionalParams, + EndpointCertificatesGetResponse, + EndpointCertificatesListByInstanceNextResponse +} from "../models"; + +/// +/** Class containing EndpointCertificates operations. */ +export class EndpointCertificatesImpl implements EndpointCertificates { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class EndpointCertificates class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * List certificates used on endpoints on the target 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 options parameters. + */ + public listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: EndpointCertificatesListByInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: EndpointCertificatesListByInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: EndpointCertificatesListByInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: EndpointCertificatesListByInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * List certificates used on endpoints on the target 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: EndpointCertificatesListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + + /** + * Gets a certificate used on the endpoint with the given id. + * @param resourceGroupName The 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 endpointType Type of the endpoint whose certificate the customer is looking for. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + endpointType: string, + options?: EndpointCertificatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, endpointType, options }, + getOperationSpec + ); + } + + /** + * ListByInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByInstance method. + * @param options The options parameters. + */ + private _listByInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: EndpointCertificatesListByInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EndpointCertificateListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/endpointCertificates/{endpointType}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EndpointCertificate + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.endpointType + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.EndpointCertificateListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/extendedDatabaseBlobAuditingPolicies.ts b/sdk/sql/arm-sql/src/operations/extendedDatabaseBlobAuditingPolicies.ts index 11a946179b8f..51e241f71377 100644 --- a/sdk/sql/arm-sql/src/operations/extendedDatabaseBlobAuditingPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/extendedDatabaseBlobAuditingPolicies.ts @@ -134,64 +134,64 @@ export class ExtendedDatabaseBlobAuditingPoliciesImpl } /** - * Gets an extended database's blob auditing policy. + * Lists extended auditing settings of a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. * @param options The options parameters. */ - get( + private _listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, - options?: ExtendedDatabaseBlobAuditingPoliciesGetOptionalParams - ): Promise { + options?: ExtendedDatabaseBlobAuditingPoliciesListByDatabaseOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, databaseName, options }, - getOperationSpec + listByDatabaseOperationSpec ); } /** - * Creates or updates an extended database's blob auditing policy. + * 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 parameters The extended database blob auditing policy. * @param options The options parameters. */ - createOrUpdate( + get( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ExtendedDatabaseBlobAuditingPolicy, - options?: ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams - ): Promise { + options?: ExtendedDatabaseBlobAuditingPoliciesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, parameters, options }, - createOrUpdateOperationSpec + { resourceGroupName, serverName, databaseName, options }, + getOperationSpec ); } /** - * Lists extended auditing settings of a database. + * 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 options parameters. */ - private _listByDatabase( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, - options?: ExtendedDatabaseBlobAuditingPoliciesListByDatabaseOptionalParams - ): Promise { + parameters: ExtendedDatabaseBlobAuditingPolicy, + options?: ExtendedDatabaseBlobAuditingPoliciesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { resourceGroupName, serverName, databaseName, parameters, options }, + createOrUpdateOperationSpec ); } @@ -220,74 +220,74 @@ export class ExtendedDatabaseBlobAuditingPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy + bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicyListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.blobAuditingPolicyName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy }, - 201: { - bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy - }, default: {} }, - requestBody: Parameters.parameters12, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.blobAuditingPolicyName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicyListResult + bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy + }, + 201: { + bodyMapper: Mappers.ExtendedDatabaseBlobAuditingPolicy }, default: {} }, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters3, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.blobAuditingPolicyName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -301,10 +301,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/extendedServerBlobAuditingPolicies.ts b/sdk/sql/arm-sql/src/operations/extendedServerBlobAuditingPolicies.ts index 15477d1dd311..ec9c204be5bb 100644 --- a/sdk/sql/arm-sql/src/operations/extendedServerBlobAuditingPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/extendedServerBlobAuditingPolicies.ts @@ -122,6 +122,24 @@ export class ExtendedServerBlobAuditingPoliciesImpl } } + /** + * Lists extended auditing settings of a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ExtendedServerBlobAuditingPoliciesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets an extended server's blob auditing policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -236,24 +254,6 @@ export class ExtendedServerBlobAuditingPoliciesImpl return poller.pollUntilDone(); } - /** - * Lists extended auditing settings of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param options The options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ExtendedServerBlobAuditingPoliciesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -277,6 +277,26 @@ export class ExtendedServerBlobAuditingPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ExtendedServerBlobAuditingPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}", @@ -287,12 +307,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.blobAuditingPolicyName ], headerParameters: [Parameters.accept], @@ -317,39 +337,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters13, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters4, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.blobAuditingPolicyName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ExtendedServerBlobAuditingPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -361,9 +361,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/failoverGroups.ts b/sdk/sql/arm-sql/src/operations/failoverGroups.ts index ed02e982025d..b4bc440c75fa 100644 --- a/sdk/sql/arm-sql/src/operations/failoverGroups.ts +++ b/sdk/sql/arm-sql/src/operations/failoverGroups.ts @@ -129,6 +129,24 @@ export class FailoverGroupsImpl implements FailoverGroups { } } + /** + * 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: FailoverGroupsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a failover group. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -436,24 +454,6 @@ export class FailoverGroupsImpl implements FailoverGroups { return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: FailoverGroupsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * 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 @@ -665,6 +665,26 @@ export class FailoverGroupsImpl implements FailoverGroups { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.FailoverGroupListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", @@ -675,12 +695,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.failoverGroupName ], headerParameters: [Parameters.accept], @@ -705,13 +725,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters23, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters27, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.failoverGroupName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -723,12 +743,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.failoverGroupName ], serializer @@ -752,39 +772,19 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters24, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters28, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.failoverGroupName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.FailoverGroupListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; const failoverOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/failoverGroups/{failoverGroupName}/failover", @@ -804,12 +804,12 @@ const failoverOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.failoverGroupName ], headerParameters: [Parameters.accept], @@ -834,12 +834,12 @@ const forceFailoverAllowDataLossOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.failoverGroupName ], headerParameters: [Parameters.accept], @@ -856,9 +856,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/firewallRules.ts b/sdk/sql/arm-sql/src/operations/firewallRules.ts index 884d41bf2994..5855fecd3064 100644 --- a/sdk/sql/arm-sql/src/operations/firewallRules.ts +++ b/sdk/sql/arm-sql/src/operations/firewallRules.ts @@ -18,14 +18,14 @@ import { FirewallRulesListByServerNextOptionalParams, FirewallRulesListByServerOptionalParams, FirewallRulesListByServerResponse, + FirewallRuleList, + FirewallRulesReplaceOptionalParams, + FirewallRulesReplaceResponse, FirewallRulesGetOptionalParams, FirewallRulesGetResponse, FirewallRulesCreateOrUpdateOptionalParams, FirewallRulesCreateOrUpdateResponse, FirewallRulesDeleteOptionalParams, - FirewallRuleList, - FirewallRulesReplaceOptionalParams, - FirewallRulesReplaceResponse, FirewallRulesListByServerNextResponse } from "../models"; @@ -124,102 +124,102 @@ export class FirewallRulesImpl implements FirewallRules { } /** - * Gets a firewall rule. + * Gets a list of firewall rules. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. * @param options The options parameters. */ - get( + private _listByServer( resourceGroupName: string, serverName: string, - firewallRuleName: string, - options?: FirewallRulesGetOptionalParams - ): Promise { + options?: FirewallRulesListByServerOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, firewallRuleName, options }, - getOperationSpec + { resourceGroupName, serverName, options }, + listByServerOperationSpec ); } /** - * Creates or updates a firewall rule. + * Replaces all firewall rules on the server. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param firewallRuleName The name of the firewall rule. - * @param parameters The required parameters for creating or updating a firewall rule. + * @param parameters A list of server firewall rules. * @param options The options parameters. */ - createOrUpdate( + replace( resourceGroupName: string, serverName: string, - firewallRuleName: string, - parameters: FirewallRule, - options?: FirewallRulesCreateOrUpdateOptionalParams - ): Promise { + parameters: FirewallRuleList, + options?: FirewallRulesReplaceOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, firewallRuleName, parameters, options }, - createOrUpdateOperationSpec + { resourceGroupName, serverName, parameters, options }, + replaceOperationSpec ); } /** - * Deletes a firewall rule. + * 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 options parameters. */ - delete( + get( resourceGroupName: string, serverName: string, firewallRuleName: string, - options?: FirewallRulesDeleteOptionalParams - ): Promise { + options?: FirewallRulesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, firewallRuleName, options }, - deleteOperationSpec + getOperationSpec ); } /** - * Gets a list of firewall rules. + * 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 options parameters. */ - private _listByServer( + createOrUpdate( resourceGroupName: string, serverName: string, - options?: FirewallRulesListByServerOptionalParams - ): Promise { + firewallRuleName: string, + parameters: FirewallRule, + options?: FirewallRulesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec + { resourceGroupName, serverName, firewallRuleName, parameters, options }, + createOrUpdateOperationSpec ); } /** - * Replaces all firewall rules on the server. + * 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 parameters A list of server firewall rules. + * @param firewallRuleName The name of the firewall rule. * @param options The options parameters. */ - replace( + delete( resourceGroupName: string, serverName: string, - parameters: FirewallRuleList, - options?: FirewallRulesReplaceOptionalParams - ): Promise { + firewallRuleName: string, + options?: FirewallRulesDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, parameters, options }, - replaceOperationSpec + { resourceGroupName, serverName, firewallRuleName, options }, + deleteOperationSpec ); } @@ -246,111 +246,111 @@ export class FirewallRulesImpl implements FirewallRules { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByServerOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FirewallRule + bodyMapper: Mappers.FirewallRuleListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.firewallRuleName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const replaceOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.FirewallRule }, - 201: { - bodyMapper: Mappers.FirewallRule - }, + 202: {}, default: {} }, - requestBody: Parameters.parameters25, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters29, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.firewallRuleName + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const deleteOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", - httpMethod: "DELETE", - responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.firewallRuleName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.FirewallRuleListResult + bodyMapper: Mappers.FirewallRule }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId, + Parameters.firewallRuleName ], headerParameters: [Parameters.accept], serializer }; -const replaceOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.FirewallRule }, - 202: {}, + 201: { + bodyMapper: Mappers.FirewallRule + }, default: {} }, - requestBody: Parameters.parameters26, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters30, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId, + Parameters.firewallRuleName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.firewallRuleName + ], + serializer +}; const listByServerNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -362,9 +362,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/geoBackupPolicies.ts b/sdk/sql/arm-sql/src/operations/geoBackupPolicies.ts index 1c218d413d32..847db3b6528f 100644 --- a/sdk/sql/arm-sql/src/operations/geoBackupPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/geoBackupPolicies.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { GeoBackupPolicies } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -14,13 +15,15 @@ import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { GeoBackupPolicy, - GeoBackupPoliciesListByDatabaseOptionalParams, - GeoBackupPoliciesListByDatabaseResponse, + GeoBackupPoliciesListNextOptionalParams, + GeoBackupPoliciesListOptionalParams, + GeoBackupPoliciesListResponse, GeoBackupPolicyName, + GeoBackupPoliciesGetOptionalParams, + GeoBackupPoliciesGetResponse, GeoBackupPoliciesCreateOrUpdateOptionalParams, GeoBackupPoliciesCreateOrUpdateResponse, - GeoBackupPoliciesGetOptionalParams, - GeoBackupPoliciesGetResponse + GeoBackupPoliciesListNextResponse } from "../models"; /// @@ -37,20 +40,20 @@ export class GeoBackupPoliciesImpl implements GeoBackupPolicies { } /** - * Returns a list of geo backup policies. + * Gets a list of Geo backup policies for the given database resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this 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 options parameters. */ - public listByDatabase( + public list( resourceGroupName: string, serverName: string, databaseName: string, - options?: GeoBackupPoliciesListByDatabaseOptionalParams + options?: GeoBackupPoliciesListOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByDatabasePagingAll( + const iter = this.listPagingAll( resourceGroupName, serverName, databaseName, @@ -67,7 +70,7 @@ export class GeoBackupPoliciesImpl implements GeoBackupPolicies { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByDatabasePagingPage( + return this.listPagingPage( resourceGroupName, serverName, databaseName, @@ -78,30 +81,49 @@ export class GeoBackupPoliciesImpl implements GeoBackupPolicies { }; } - private async *listByDatabasePagingPage( + private async *listPagingPage( resourceGroupName: string, serverName: string, databaseName: string, - options?: GeoBackupPoliciesListByDatabaseOptionalParams, - _settings?: PageSettings + options?: GeoBackupPoliciesListOptionalParams, + settings?: PageSettings ): AsyncIterableIterator { - let result: GeoBackupPoliciesListByDatabaseResponse; - result = await this._listByDatabase( - resourceGroupName, - serverName, - databaseName, - options - ); - yield result.value || []; + let result: GeoBackupPoliciesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list( + resourceGroupName, + serverName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + serverName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - private async *listByDatabasePagingAll( + private async *listPagingAll( resourceGroupName: string, serverName: string, databaseName: string, - options?: GeoBackupPoliciesListByDatabaseOptionalParams + options?: GeoBackupPoliciesListOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByDatabasePagingPage( + for await (const page of this.listPagingPage( resourceGroupName, serverName, databaseName, @@ -112,111 +134,128 @@ export class GeoBackupPoliciesImpl implements GeoBackupPolicies { } /** - * Updates a database geo backup policy. + * Gets a list of Geo backup policies for the given database resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the geo backup policy. - * @param parameters The required parameters for creating or updating the geo backup policy. * @param options The options parameters. */ - createOrUpdate( + private _list( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: GeoBackupPoliciesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listOperationSpec + ); + } + + /** + * Gets a Geo backup policy for the given database resource. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param options The options parameters. + */ + get( resourceGroupName: string, serverName: string, databaseName: string, geoBackupPolicyName: GeoBackupPolicyName, - parameters: GeoBackupPolicy, - options?: GeoBackupPoliciesCreateOrUpdateOptionalParams - ): Promise { + options?: GeoBackupPoliciesGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, databaseName, geoBackupPolicyName, - parameters, options }, - createOrUpdateOperationSpec + getOperationSpec ); } /** - * Gets a geo backup policy. + * Create or update a database default Geo backup policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the geo backup policy. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @param options The options parameters. */ - get( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, geoBackupPolicyName: GeoBackupPolicyName, - options?: GeoBackupPoliciesGetOptionalParams - ): Promise { + parameters: GeoBackupPolicy, + options?: GeoBackupPoliciesCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, databaseName, geoBackupPolicyName, + parameters, options }, - getOperationSpec + createOrUpdateOperationSpec ); } /** - * Returns a list of geo backup policies. + * ListNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this 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 nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ - private _listByDatabase( + private _listNext( resourceGroupName: string, serverName: string, databaseName: string, - options?: GeoBackupPoliciesListByDatabaseOptionalParams - ): Promise { + nextLink: string, + options?: GeoBackupPoliciesListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { resourceGroupName, serverName, databaseName, nextLink, options }, + listNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", - httpMethod: "PUT", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.GeoBackupPolicy + bodyMapper: Mappers.GeoBackupPolicyListResult }, - 201: { - bodyMapper: Mappers.GeoBackupPolicy - } + default: {} }, - requestBody: Parameters.parameters2, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.geoBackupPolicyName + Parameters.subscriptionId ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; const getOperationSpec: coreClient.OperationSpec = { @@ -226,36 +265,64 @@ const getOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.GeoBackupPolicy - } + }, + default: {} }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.geoBackupPolicyName ], headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/geoBackupPolicies/{geoBackupPolicyName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.GeoBackupPolicyListResult - } + bodyMapper: Mappers.GeoBackupPolicy + }, + 201: { + bodyMapper: Mappers.GeoBackupPolicy + }, + default: {} }, + requestBody: Parameters.parameters31, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, Parameters.subscriptionId, + Parameters.geoBackupPolicyName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GeoBackupPolicyListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/iPv6FirewallRules.ts b/sdk/sql/arm-sql/src/operations/iPv6FirewallRules.ts new file mode 100644 index 000000000000..b648c5f9ddc6 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/iPv6FirewallRules.ts @@ -0,0 +1,326 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { IPv6FirewallRules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + IPv6FirewallRule, + IPv6FirewallRulesListByServerNextOptionalParams, + IPv6FirewallRulesListByServerOptionalParams, + IPv6FirewallRulesListByServerResponse, + IPv6FirewallRulesGetOptionalParams, + IPv6FirewallRulesGetResponse, + IPv6FirewallRulesCreateOrUpdateOptionalParams, + IPv6FirewallRulesCreateOrUpdateResponse, + IPv6FirewallRulesDeleteOptionalParams, + IPv6FirewallRulesListByServerNextResponse +} from "../models"; + +/// +/** Class containing IPv6FirewallRules operations. */ +export class IPv6FirewallRulesImpl implements IPv6FirewallRules { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class IPv6FirewallRules class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of IPv6 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 options parameters. + */ + public listByServer( + resourceGroupName: string, + serverName: string, + options?: IPv6FirewallRulesListByServerOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServerPagingAll( + resourceGroupName, + serverName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServerPagingPage( + resourceGroupName, + serverName, + options, + settings + ); + } + }; + } + + private async *listByServerPagingPage( + resourceGroupName: string, + serverName: string, + options?: IPv6FirewallRulesListByServerOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: IPv6FirewallRulesListByServerResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByServer(resourceGroupName, serverName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServerNext( + resourceGroupName, + serverName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByServerPagingAll( + resourceGroupName: string, + serverName: string, + options?: IPv6FirewallRulesListByServerOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServerPagingPage( + resourceGroupName, + serverName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of IPv6 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: IPv6FirewallRulesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + + /** + * Gets an IPv6 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 options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + firewallRuleName: string, + options?: IPv6FirewallRulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, firewallRuleName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates an IPv6 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 an IPv6 firewall rule. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + firewallRuleName: string, + parameters: IPv6FirewallRule, + options?: IPv6FirewallRulesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, firewallRuleName, parameters, options }, + createOrUpdateOperationSpec + ); + } + + /** + * Deletes an IPv6 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 options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + firewallRuleName: string, + options?: IPv6FirewallRulesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, firewallRuleName, options }, + deleteOperationSpec + ); + } + + /** + * ListByServerNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param nextLink The nextLink from the previous successful call to the ListByServer method. + * @param options The options parameters. + */ + private _listByServerNext( + resourceGroupName: string, + serverName: string, + nextLink: string, + options?: IPv6FirewallRulesListByServerNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, nextLink, options }, + listByServerNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IPv6FirewallRuleListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IPv6FirewallRule + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.firewallRuleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.IPv6FirewallRule + }, + 201: { + bodyMapper: Mappers.IPv6FirewallRule + }, + default: {} + }, + requestBody: Parameters.parameters32, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.firewallRuleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/ipv6FirewallRules/{firewallRuleName}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.firewallRuleName + ], + serializer +}; +const listByServerNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.IPv6FirewallRuleListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/index.ts b/sdk/sql/arm-sql/src/operations/index.ts index 717bfce71bce..24154f7c3722 100644 --- a/sdk/sql/arm-sql/src/operations/index.ts +++ b/sdk/sql/arm-sql/src/operations/index.ts @@ -6,58 +6,70 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./recoverableDatabases"; -export * from "./dataMaskingPolicies"; -export * from "./dataMaskingRules"; -export * from "./geoBackupPolicies"; -export * from "./databases"; -export * from "./elasticPools"; -export * from "./replicationLinks"; -export * from "./serverCommunicationLinks"; -export * from "./serviceObjectives"; -export * from "./elasticPoolActivities"; -export * from "./elasticPoolDatabaseActivities"; -export * from "./serverUsages"; -export * from "./extendedDatabaseBlobAuditingPolicies"; -export * from "./extendedServerBlobAuditingPolicies"; +export * from "./backupShortTermRetentionPolicies"; export * from "./serverBlobAuditingPolicies"; export * from "./databaseBlobAuditingPolicies"; +export * from "./extendedDatabaseBlobAuditingPolicies"; +export * from "./extendedServerBlobAuditingPolicies"; +export * from "./dataMaskingPolicies"; +export * from "./dataMaskingRules"; +export * from "./dataWarehouseUserActivitiesOperations"; +export * from "./databaseAdvancedThreatProtectionSettings"; export * from "./databaseAdvisors"; export * from "./databaseAutomaticTuningOperations"; export * from "./databaseColumns"; +export * from "./databaseEncryptionProtectors"; +export * from "./databaseExtensionsOperations"; +export * from "./databaseOperations"; export * from "./databaseRecommendedActions"; export * from "./databaseSchemas"; export * from "./databaseSecurityAlertPolicies"; +export * from "./databaseSqlVulnerabilityAssessmentBaselines"; +export * from "./databaseSqlVulnerabilityAssessmentExecuteScan"; +export * from "./databaseSqlVulnerabilityAssessmentRuleBaselines"; +export * from "./databaseSqlVulnerabilityAssessmentScanResult"; +export * from "./databaseSqlVulnerabilityAssessmentScans"; +export * from "./databaseSqlVulnerabilityAssessmentsSettings"; export * from "./databaseTables"; +export * from "./databaseUsages"; export * from "./databaseVulnerabilityAssessmentRuleBaselines"; -export * from "./databaseVulnerabilityAssessments"; export * from "./databaseVulnerabilityAssessmentScans"; -export * from "./dataWarehouseUserActivitiesOperations"; +export * from "./databaseVulnerabilityAssessments"; +export * from "./databases"; export * from "./deletedServers"; +export * from "./distributedAvailabilityGroups"; export * from "./elasticPoolOperations"; +export * from "./elasticPools"; export * from "./encryptionProtectors"; +export * from "./endpointCertificates"; export * from "./failoverGroups"; export * from "./firewallRules"; +export * from "./geoBackupPolicies"; +export * from "./iPv6FirewallRules"; export * from "./instanceFailoverGroups"; export * from "./instancePools"; 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 "./jobs"; +export * from "./ledgerDigestUploadsOperations"; export * from "./capabilities"; +export * from "./longTermRetentionBackups"; +export * from "./longTermRetentionManagedInstanceBackups"; export * from "./longTermRetentionPolicies"; export * from "./maintenanceWindowOptionsOperations"; export * from "./maintenanceWindowsOperations"; export * from "./managedBackupShortTermRetentionPolicies"; +export * from "./managedDatabaseAdvancedThreatProtectionSettings"; export * from "./managedDatabaseColumns"; +export * from "./managedDatabaseMoveOperations"; export * from "./managedDatabaseQueries"; export * from "./managedDatabaseRestoreDetails"; -export * from "./managedDatabases"; export * from "./managedDatabaseSchemas"; export * from "./managedDatabaseSecurityAlertPolicies"; export * from "./managedDatabaseSecurityEvents"; @@ -66,10 +78,13 @@ export * from "./managedDatabaseRecommendedSensitivityLabels"; export * from "./managedDatabaseTables"; export * from "./managedDatabaseTransparentDataEncryption"; export * from "./managedDatabaseVulnerabilityAssessmentRuleBaselines"; -export * from "./managedDatabaseVulnerabilityAssessments"; export * from "./managedDatabaseVulnerabilityAssessmentScans"; +export * from "./managedDatabaseVulnerabilityAssessments"; +export * from "./managedDatabases"; export * from "./managedInstanceAdministrators"; +export * from "./managedInstanceAdvancedThreatProtectionSettings"; export * from "./managedInstanceAzureADOnlyAuthentications"; +export * from "./managedInstanceDtcs"; export * from "./managedInstanceEncryptionProtectors"; export * from "./managedInstanceKeys"; export * from "./managedInstanceLongTermRetentionPolicies"; @@ -78,50 +93,61 @@ export * from "./managedInstancePrivateEndpointConnections"; export * from "./managedInstancePrivateLinkResources"; export * from "./managedInstanceTdeCertificates"; export * from "./managedInstanceVulnerabilityAssessments"; +export * from "./managedInstances"; +export * from "./managedLedgerDigestUploadsOperations"; export * from "./managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies"; +export * from "./managedServerDnsAliases"; export * from "./managedServerSecurityAlertPolicies"; export * from "./operations"; -export * from "./operationsHealthOperations"; +export * from "./outboundFirewallRules"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./recoverableDatabases"; export * from "./recoverableManagedDatabases"; +export * from "./replicationLinks"; +export * from "./restorableDroppedDatabases"; +export * from "./restorableDroppedManagedDatabases"; export * from "./restorePoints"; export * from "./sensitivityLabels"; export * from "./recommendedSensitivityLabels"; +export * from "./serverAdvancedThreatProtectionSettings"; export * from "./serverAdvisors"; export * from "./serverAutomaticTuningOperations"; export * from "./serverAzureADAdministrators"; export * from "./serverAzureADOnlyAuthentications"; +export * from "./serverConfigurationOptions"; +export * from "./serverConnectionPolicies"; export * from "./serverDevOpsAuditSettings"; export * from "./serverDnsAliases"; export * from "./serverKeys"; export * from "./serverOperations"; export * from "./serverSecurityAlertPolicies"; +export * from "./serverTrustCertificates"; export * from "./serverTrustGroups"; +export * from "./serverUsages"; export * from "./serverVulnerabilityAssessments"; +export * from "./servers"; export * from "./sqlAgent"; +export * from "./sqlVulnerabilityAssessmentBaseline"; +export * from "./sqlVulnerabilityAssessmentBaselines"; +export * from "./sqlVulnerabilityAssessmentExecuteScan"; +export * from "./sqlVulnerabilityAssessmentRuleBaseline"; +export * from "./sqlVulnerabilityAssessmentRuleBaselines"; +export * from "./sqlVulnerabilityAssessmentScanResult"; +export * from "./sqlVulnerabilityAssessmentScans"; +export * from "./sqlVulnerabilityAssessmentsSettings"; +export * from "./sqlVulnerabilityAssessments"; +export * from "./startStopManagedInstanceSchedules"; export * from "./subscriptionUsages"; +export * from "./synapseLinkWorkspaces"; export * from "./syncAgents"; export * from "./syncGroups"; export * from "./syncMembers"; export * from "./tdeCertificates"; export * from "./timeZones"; +export * from "./transparentDataEncryptions"; +export * from "./usages"; export * from "./virtualClusters"; export * from "./virtualNetworkRules"; export * from "./workloadClassifiers"; export * from "./workloadGroups"; -export * from "./transparentDataEncryptions"; -export * from "./backupShortTermRetentionPolicies"; -export * from "./databaseExtensionsOperations"; -export * from "./databaseOperations"; -export * from "./databaseUsages"; -export * from "./ledgerDigestUploadsOperations"; -export * from "./outboundFirewallRules"; -export * from "./servers"; -export * from "./usages"; -export * from "./longTermRetentionBackups"; -export * from "./longTermRetentionManagedInstanceBackups"; -export * from "./managedInstances"; -export * from "./restorableDroppedDatabases"; -export * from "./restorableDroppedManagedDatabases"; -export * from "./serverConnectionPolicies"; diff --git a/sdk/sql/arm-sql/src/operations/instanceFailoverGroups.ts b/sdk/sql/arm-sql/src/operations/instanceFailoverGroups.ts index b3e8efcc93c0..4843fad4c259 100644 --- a/sdk/sql/arm-sql/src/operations/instanceFailoverGroups.ts +++ b/sdk/sql/arm-sql/src/operations/instanceFailoverGroups.ts @@ -130,6 +130,24 @@ export class InstanceFailoverGroupsImpl implements InstanceFailoverGroups { } } + /** + * 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 options parameters. + */ + private _listByLocation( + resourceGroupName: string, + locationName: string, + options?: InstanceFailoverGroupsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, options }, + listByLocationOperationSpec + ); + } + /** * Gets a failover group. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -344,24 +362,6 @@ export class InstanceFailoverGroupsImpl implements InstanceFailoverGroups { return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByLocation( - resourceGroupName: string, - locationName: string, - options?: InstanceFailoverGroupsListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, locationName, options }, - listByLocationOperationSpec - ); - } - /** * 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 @@ -577,6 +577,26 @@ export class InstanceFailoverGroupsImpl implements InstanceFailoverGroups { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.InstanceFailoverGroupListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}", @@ -587,11 +607,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.failoverGroupName ], @@ -617,12 +637,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters27, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters33, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.failoverGroupName ], @@ -635,36 +655,16 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.failoverGroupName ], serializer }; -const listByLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InstanceFailoverGroupListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer -}; const failoverOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/instanceFailoverGroups/{failoverGroupName}/failover", @@ -684,11 +684,11 @@ const failoverOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.failoverGroupName ], @@ -714,11 +714,11 @@ const forceFailoverAllowDataLossOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.failoverGroupName ], @@ -736,8 +736,8 @@ const listByLocationNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName ], diff --git a/sdk/sql/arm-sql/src/operations/instancePools.ts b/sdk/sql/arm-sql/src/operations/instancePools.ts index 68308fb5e27f..082e957244aa 100644 --- a/sdk/sql/arm-sql/src/operations/instancePools.ts +++ b/sdk/sql/arm-sql/src/operations/instancePools.ts @@ -17,12 +17,12 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { InstancePool, - InstancePoolsListByResourceGroupNextOptionalParams, - InstancePoolsListByResourceGroupOptionalParams, - InstancePoolsListByResourceGroupResponse, InstancePoolsListNextOptionalParams, InstancePoolsListOptionalParams, InstancePoolsListResponse, + InstancePoolsListByResourceGroupNextOptionalParams, + InstancePoolsListByResourceGroupOptionalParams, + InstancePoolsListByResourceGroupResponse, InstancePoolsGetOptionalParams, InstancePoolsGetResponse, InstancePoolsCreateOrUpdateOptionalParams, @@ -31,8 +31,8 @@ import { InstancePoolUpdate, InstancePoolsUpdateOptionalParams, InstancePoolsUpdateResponse, - InstancePoolsListByResourceGroupNextResponse, - InstancePoolsListNextResponse + InstancePoolsListNextResponse, + InstancePoolsListByResourceGroupNextResponse } from "../models"; /// @@ -49,16 +49,13 @@ export class InstancePoolsImpl implements InstancePools { } /** - * Gets a list of instance pools in the resource group - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * Gets a list of all instance pools in the subscription. * @param options The options parameters. */ - public listByResourceGroup( - resourceGroupName: string, - options?: InstancePoolsListByResourceGroupOptionalParams + public list( + options?: InstancePoolsListOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + const iter = this.listPagingAll(options); return { next() { return iter.next(); @@ -70,35 +67,26 @@ export class InstancePoolsImpl implements InstancePools { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); + return this.listPagingPage(options, settings); } }; } - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: InstancePoolsListByResourceGroupOptionalParams, + private async *listPagingPage( + options?: InstancePoolsListOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: InstancePoolsListByResourceGroupResponse; + let result: InstancePoolsListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); + result = await this._list(options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); + result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -106,26 +94,25 @@ export class InstancePoolsImpl implements InstancePools { } } - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: InstancePoolsListByResourceGroupOptionalParams + private async *listPagingAll( + options?: InstancePoolsListOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { + for await (const page of this.listPagingPage(options)) { yield* page; } } /** - * Gets a list of all instance pools in the subscription. + * Gets a list of instance pools in the resource group + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. * @param options The options parameters. */ - public list( - options?: InstancePoolsListOptionalParams + public listByResourceGroup( + resourceGroupName: string, + options?: InstancePoolsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { next() { return iter.next(); @@ -137,26 +124,35 @@ export class InstancePoolsImpl implements InstancePools { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage(options, settings); + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } - private async *listPagingPage( - options?: InstancePoolsListOptionalParams, + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: InstancePoolsListByResourceGroupOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: InstancePoolsListResponse; + let result: InstancePoolsListByResourceGroupResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(options); + result = await this._listByResourceGroup(resourceGroupName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext(continuationToken, options); + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -164,14 +160,44 @@ export class InstancePoolsImpl implements InstancePools { } } - private async *listPagingAll( - options?: InstancePoolsListOptionalParams + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: InstancePoolsListByResourceGroupOptionalParams ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { yield* page; } } + /** + * Gets a list of all instance pools in the subscription. + * @param options The options parameters. + */ + private _list( + options?: InstancePoolsListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Gets a list of instance pools in the resource group + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: InstancePoolsListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + /** * Gets an instance pool. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -463,31 +489,20 @@ export class InstancePoolsImpl implements InstancePools { } /** - * Gets a list of instance pools in the resource group - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. * @param options The options parameters. */ - private _listByResourceGroup( - resourceGroupName: string, - options?: InstancePoolsListByResourceGroupOptionalParams - ): Promise { + private _listNext( + nextLink: string, + options?: InstancePoolsListNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec + { nextLink, options }, + listNextOperationSpec ); } - /** - * Gets a list of all instance pools in the subscription. - * @param options The options parameters. - */ - private _list( - options?: InstancePoolsListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - /** * ListByResourceGroupNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -505,25 +520,43 @@ export class InstancePoolsImpl implements InstancePools { listByResourceGroupNextOperationSpec ); } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: InstancePoolsListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.InstancePoolListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.InstancePoolListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", @@ -534,11 +567,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.instancePoolName ], headerParameters: [Parameters.accept], @@ -563,12 +596,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters28, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters34, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.instancePoolName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -580,11 +613,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.instancePoolName ], serializer @@ -608,52 +641,19 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters29, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters35, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.instancePoolName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InstancePoolListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/instancePools", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.InstancePoolListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -665,13 +665,12 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], serializer }; -const listNextOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -682,6 +681,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink ], diff --git a/sdk/sql/arm-sql/src/operations/jobAgents.ts b/sdk/sql/arm-sql/src/operations/jobAgents.ts index 9227eb03ec05..ea3ce30fdcbf 100644 --- a/sdk/sql/arm-sql/src/operations/jobAgents.ts +++ b/sdk/sql/arm-sql/src/operations/jobAgents.ts @@ -483,12 +483,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -503,12 +503,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], headerParameters: [Parameters.accept], @@ -533,13 +533,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters30, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters36, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -551,12 +551,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], serializer @@ -580,13 +580,13 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters31, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters37, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -604,9 +604,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/jobCredentials.ts b/sdk/sql/arm-sql/src/operations/jobCredentials.ts index 90e7c5cc550a..1ba5b9c71066 100644 --- a/sdk/sql/arm-sql/src/operations/jobCredentials.ts +++ b/sdk/sql/arm-sql/src/operations/jobCredentials.ts @@ -263,12 +263,12 @@ const listByAgentOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], headerParameters: [Parameters.accept], @@ -284,12 +284,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.credentialName ], @@ -309,13 +309,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters32, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters38, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.credentialName ], @@ -328,12 +328,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.credentialName ], @@ -350,9 +350,9 @@ const listByAgentNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName ], diff --git a/sdk/sql/arm-sql/src/operations/jobExecutions.ts b/sdk/sql/arm-sql/src/operations/jobExecutions.ts index c8de16cfc0e6..10460cae0b73 100644 --- a/sdk/sql/arm-sql/src/operations/jobExecutions.ts +++ b/sdk/sql/arm-sql/src/operations/jobExecutions.ts @@ -23,13 +23,13 @@ import { JobExecutionsListByJobNextOptionalParams, JobExecutionsListByJobOptionalParams, JobExecutionsListByJobResponse, - JobExecutionsCancelOptionalParams, - JobExecutionsCreateOptionalParams, - JobExecutionsCreateResponse, JobExecutionsGetOptionalParams, JobExecutionsGetResponse, JobExecutionsCreateOrUpdateOptionalParams, JobExecutionsCreateOrUpdateResponse, + JobExecutionsCancelOptionalParams, + JobExecutionsCreateOptionalParams, + JobExecutionsCreateResponse, JobExecutionsListByAgentNextResponse, JobExecutionsListByJobNextResponse } from "../models"; @@ -265,23 +265,45 @@ export class JobExecutionsImpl implements JobExecutions { } /** - * Requests cancellation of a job execution. + * 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 options parameters. + */ + private _listByJob( + resourceGroupName: string, + serverName: string, + jobAgentName: string, + jobName: string, + options?: JobExecutionsListByJobOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, jobAgentName, jobName, options }, + listByJobOperationSpec + ); + } + + /** + * 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 to cancel. + * @param jobExecutionId The id of the job execution * @param options The options parameters. */ - cancel( + get( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobExecutionsCancelOptionalParams - ): Promise { + options?: JobExecutionsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -291,35 +313,37 @@ export class JobExecutionsImpl implements JobExecutions { jobExecutionId, options }, - cancelOperationSpec + getOperationSpec ); } /** - * Starts an elastic job execution. + * 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 options parameters. */ - async beginCreate( + async beginCreateOrUpdate( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobExecutionsCreateOptionalParams + jobExecutionId: string, + options?: JobExecutionsCreateOrUpdateOptionalParams ): Promise< PollerLike< - PollOperationState, - JobExecutionsCreateResponse + PollOperationState, + JobExecutionsCreateOrUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -357,8 +381,15 @@ export class JobExecutionsImpl implements JobExecutions { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, jobAgentName, jobName, options }, - createOperationSpec + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + jobExecutionId, + options + }, + createOrUpdateOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -369,71 +400,52 @@ export class JobExecutionsImpl implements JobExecutions { } /** - * Starts an elastic job execution. + * 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 options parameters. */ - async beginCreateAndWait( + async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobExecutionsCreateOptionalParams - ): Promise { - const poller = await this.beginCreate( + jobExecutionId: string, + options?: JobExecutionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, serverName, jobAgentName, jobName, + jobExecutionId, options ); return poller.pollUntilDone(); } /** - * 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 options parameters. - */ - private _listByJob( - resourceGroupName: string, - serverName: string, - jobAgentName: string, - jobName: string, - options?: JobExecutionsListByJobOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, jobAgentName, jobName, options }, - listByJobOperationSpec - ); - } - - /** - * Gets a job execution. + * 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 + * @param jobExecutionId The id of the job execution to cancel. * @param options The options parameters. */ - get( + cancel( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobExecutionsGetOptionalParams - ): Promise { + options?: JobExecutionsCancelOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -443,37 +455,35 @@ export class JobExecutionsImpl implements JobExecutions { jobExecutionId, options }, - getOperationSpec + cancelOperationSpec ); } /** - * Creates or updates a job execution. + * 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 jobExecutionId The job execution id to create the job execution under. * @param options The options parameters. */ - async beginCreateOrUpdate( + async beginCreate( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobExecutionId: string, - options?: JobExecutionsCreateOrUpdateOptionalParams + options?: JobExecutionsCreateOptionalParams ): Promise< PollerLike< - PollOperationState, - JobExecutionsCreateOrUpdateResponse + PollOperationState, + JobExecutionsCreateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -511,15 +521,8 @@ export class JobExecutionsImpl implements JobExecutions { const lro = new LroImpl( sendOperation, - { - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobExecutionId, - options - }, - createOrUpdateOperationSpec + { resourceGroupName, serverName, jobAgentName, jobName, options }, + createOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -530,29 +533,26 @@ export class JobExecutionsImpl implements JobExecutions { } /** - * Creates or updates a job execution. + * 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 jobExecutionId The job execution id to create the job execution under. * @param options The options parameters. */ - async beginCreateOrUpdateAndWait( + async beginCreateAndWait( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobExecutionId: string, - options?: JobExecutionsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( + options?: JobExecutionsCreateOptionalParams + ): Promise { + const poller = await this.beginCreate( resourceGroupName, serverName, jobAgentName, jobName, - jobExecutionId, options ); return poller.pollUntilDone(); @@ -625,8 +625,8 @@ const listByAgentOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ + Parameters.apiVersion, Parameters.skip, - Parameters.apiVersion2, Parameters.createTimeMin, Parameters.createTimeMax, Parameters.endTimeMin, @@ -636,58 +636,10 @@ const listByAgentOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.jobAgentName - ], - headerParameters: [Parameters.accept], - serializer -}; -const cancelOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.jobAgentName, - Parameters.jobName, - Parameters.jobExecutionId - ], - serializer -}; -const createOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.JobExecution - }, - 201: { - bodyMapper: Mappers.JobExecution - }, - 202: { - bodyMapper: Mappers.JobExecution - }, - 204: { - bodyMapper: Mappers.JobExecution - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.jobAgentName, - Parameters.jobName + Parameters.jobAgentName ], headerParameters: [Parameters.accept], serializer @@ -703,8 +655,8 @@ const listByJobOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ + Parameters.apiVersion, Parameters.skip, - Parameters.apiVersion2, Parameters.createTimeMin, Parameters.createTimeMax, Parameters.endTimeMin, @@ -714,9 +666,9 @@ const listByJobOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName ], @@ -733,12 +685,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.jobExecutionId @@ -765,16 +717,64 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, Parameters.subscriptionId, + Parameters.jobAgentName, + Parameters.jobName, + Parameters.jobExecutionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const cancelOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.jobExecutionId ], + serializer +}; +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.JobExecution + }, + 201: { + bodyMapper: Mappers.JobExecution + }, + 202: { + bodyMapper: Mappers.JobExecution + }, + 204: { + bodyMapper: Mappers.JobExecution + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.jobAgentName, + Parameters.jobName + ], headerParameters: [Parameters.accept], serializer }; @@ -789,9 +789,9 @@ const listByAgentNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName ], @@ -809,9 +809,9 @@ const listByJobNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, Parameters.jobName diff --git a/sdk/sql/arm-sql/src/operations/jobStepExecutions.ts b/sdk/sql/arm-sql/src/operations/jobStepExecutions.ts index 7aa9d691e850..0846fe36197b 100644 --- a/sdk/sql/arm-sql/src/operations/jobStepExecutions.ts +++ b/sdk/sql/arm-sql/src/operations/jobStepExecutions.ts @@ -261,8 +261,8 @@ const listByJobExecutionOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ + Parameters.apiVersion, Parameters.skip, - Parameters.apiVersion2, Parameters.createTimeMin, Parameters.createTimeMax, Parameters.endTimeMin, @@ -272,9 +272,9 @@ const listByJobExecutionOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.jobExecutionId @@ -292,12 +292,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.jobExecutionId, @@ -317,9 +317,9 @@ const listByJobExecutionNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, Parameters.jobName, diff --git a/sdk/sql/arm-sql/src/operations/jobSteps.ts b/sdk/sql/arm-sql/src/operations/jobSteps.ts index b9ec55ea81ff..36bb848deae7 100644 --- a/sdk/sql/arm-sql/src/operations/jobSteps.ts +++ b/sdk/sql/arm-sql/src/operations/jobSteps.ts @@ -15,21 +15,21 @@ import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { JobStep, - JobStepsListByVersionNextOptionalParams, - JobStepsListByVersionOptionalParams, - JobStepsListByVersionResponse, JobStepsListByJobNextOptionalParams, JobStepsListByJobOptionalParams, JobStepsListByJobResponse, - JobStepsGetByVersionOptionalParams, - JobStepsGetByVersionResponse, + JobStepsListByVersionNextOptionalParams, + JobStepsListByVersionOptionalParams, + JobStepsListByVersionResponse, JobStepsGetOptionalParams, JobStepsGetResponse, JobStepsCreateOrUpdateOptionalParams, JobStepsCreateOrUpdateResponse, JobStepsDeleteOptionalParams, - JobStepsListByVersionNextResponse, - JobStepsListByJobNextResponse + JobStepsGetByVersionOptionalParams, + JobStepsGetByVersionResponse, + JobStepsListByJobNextResponse, + JobStepsListByVersionNextResponse } from "../models"; /// @@ -46,29 +46,26 @@ export class JobStepsImpl implements JobSteps { } /** - * Gets all job steps in the specified job version. + * 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 jobVersion The version of the job to get. * @param options The options parameters. */ - public listByVersion( + public listByJob( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobVersion: number, - options?: JobStepsListByVersionOptionalParams + options?: JobStepsListByJobOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByVersionPagingAll( + const iter = this.listByJobPagingAll( resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, options ); return { @@ -82,12 +79,11 @@ export class JobStepsImpl implements JobSteps { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByVersionPagingPage( + return this.listByJobPagingPage( resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, options, settings ); @@ -95,24 +91,22 @@ export class JobStepsImpl implements JobSteps { }; } - private async *listByVersionPagingPage( + private async *listByJobPagingPage( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobVersion: number, - options?: JobStepsListByVersionOptionalParams, + options?: JobStepsListByJobOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: JobStepsListByVersionResponse; + let result: JobStepsListByJobResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByVersion( + result = await this._listByJob( resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, options ); let page = result.value || []; @@ -121,12 +115,11 @@ export class JobStepsImpl implements JobSteps { yield page; } while (continuationToken) { - result = await this._listByVersionNext( + result = await this._listByJobNext( resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, continuationToken, options ); @@ -137,20 +130,18 @@ export class JobStepsImpl implements JobSteps { } } - private async *listByVersionPagingAll( + private async *listByJobPagingAll( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobVersion: number, - options?: JobStepsListByVersionOptionalParams + options?: JobStepsListByJobOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByVersionPagingPage( + for await (const page of this.listByJobPagingPage( resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, options )) { yield* page; @@ -158,26 +149,29 @@ export class JobStepsImpl implements JobSteps { } /** - * Gets all job steps for a job's current version. + * 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 options parameters. */ - public listByJob( + public listByVersion( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobStepsListByJobOptionalParams + jobVersion: number, + options?: JobStepsListByVersionOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByJobPagingAll( + const iter = this.listByVersionPagingAll( resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, options ); return { @@ -191,11 +185,12 @@ export class JobStepsImpl implements JobSteps { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByJobPagingPage( + return this.listByVersionPagingPage( resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, options, settings ); @@ -203,22 +198,24 @@ export class JobStepsImpl implements JobSteps { }; } - private async *listByJobPagingPage( + private async *listByVersionPagingPage( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobStepsListByJobOptionalParams, + jobVersion: number, + options?: JobStepsListByVersionOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: JobStepsListByJobResponse; + let result: JobStepsListByVersionResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByJob( + result = await this._listByVersion( resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, options ); let page = result.value || []; @@ -227,11 +224,12 @@ export class JobStepsImpl implements JobSteps { yield page; } while (continuationToken) { - result = await this._listByJobNext( + result = await this._listByVersionNext( resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, continuationToken, options ); @@ -242,18 +240,20 @@ export class JobStepsImpl implements JobSteps { } } - private async *listByJobPagingAll( + private async *listByVersionPagingAll( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobStepsListByJobOptionalParams + jobVersion: number, + options?: JobStepsListByVersionOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByJobPagingPage( + for await (const page of this.listByVersionPagingPage( resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, options )) { yield* page; @@ -261,110 +261,110 @@ export class JobStepsImpl implements JobSteps { } /** - * Gets all job steps in the specified job version. + * 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 jobVersion The version of the job to get. * @param options The options parameters. */ - private _listByVersion( + private _listByJob( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobVersion: number, - options?: JobStepsListByVersionOptionalParams - ): Promise { + options?: JobStepsListByJobOptionalParams + ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - jobAgentName, - jobName, - jobVersion, - options - }, - listByVersionOperationSpec + { resourceGroupName, serverName, jobAgentName, jobName, options }, + listByJobOperationSpec ); } /** - * Gets the specified version of a job step. + * 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 jobVersion The version of the job to get. * @param stepName The name of the job step. * @param options The options parameters. */ - getByVersion( + get( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobVersion: number, stepName: string, - options?: JobStepsGetByVersionOptionalParams - ): Promise { + options?: JobStepsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, stepName, options }, - getByVersionOperationSpec + getOperationSpec ); } /** - * Gets all job steps for a job's current version. + * 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 to get. + * @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 options parameters. */ - private _listByJob( + createOrUpdate( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobStepsListByJobOptionalParams - ): Promise { + stepName: string, + parameters: JobStep, + options?: JobStepsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, jobAgentName, jobName, options }, - listByJobOperationSpec + { + resourceGroupName, + serverName, + jobAgentName, + jobName, + stepName, + parameters, + options + }, + createOrUpdateOperationSpec ); } /** - * Gets a job step in a job's current version. + * 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. + * @param stepName The name of the job step to delete. * @param options The options parameters. */ - get( + delete( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, - options?: JobStepsGetOptionalParams - ): Promise { + options?: JobStepsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -374,146 +374,146 @@ export class JobStepsImpl implements JobSteps { stepName, options }, - getOperationSpec + deleteOperationSpec ); } /** - * Creates or updates a job step. This will implicitly create a new job version. + * 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. - * @param stepName The name of the job step. - * @param parameters The requested state of the job step. + * @param jobName The name of the job to get. + * @param jobVersion The version of the job to get. * @param options The options parameters. */ - createOrUpdate( + private _listByVersion( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - stepName: string, - parameters: JobStep, - options?: JobStepsCreateOrUpdateOptionalParams - ): Promise { + jobVersion: number, + options?: JobStepsListByVersionOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, jobAgentName, jobName, - stepName, - parameters, + jobVersion, options }, - createOrUpdateOperationSpec + listByVersionOperationSpec ); } /** - * Deletes a job step. This will implicitly create a new job version. + * 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 stepName The name of the job step to delete. + * @param jobVersion The version of the job to get. + * @param stepName The name of the job step. * @param options The options parameters. */ - delete( + getByVersion( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, + jobVersion: number, stepName: string, - options?: JobStepsDeleteOptionalParams - ): Promise { + options?: JobStepsGetByVersionOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, stepName, options }, - deleteOperationSpec + getByVersionOperationSpec ); } /** - * ListByVersionNext + * ListByJobNext * @param resourceGroupName The name of the resource group that contains 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 nextLink The nextLink from the previous successful call to the ListByVersion method. + * @param nextLink The nextLink from the previous successful call to the ListByJob method. * @param options The options parameters. */ - private _listByVersionNext( + private _listByJobNext( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobVersion: number, nextLink: string, - options?: JobStepsListByVersionNextOptionalParams - ): Promise { + options?: JobStepsListByJobNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, jobAgentName, jobName, - jobVersion, nextLink, options }, - listByVersionNextOperationSpec + listByJobNextOperationSpec ); } /** - * ListByJobNext + * ListByVersionNext * @param resourceGroupName The name of the resource group that contains 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 nextLink The nextLink from the previous successful call to the ListByJob method. + * @param jobVersion The version of the job to get. + * @param nextLink The nextLink from the previous successful call to the ListByVersion method. * @param options The options parameters. */ - private _listByJobNext( + private _listByVersionNext( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, + jobVersion: number, nextLink: string, - options?: JobStepsListByJobNextOptionalParams - ): Promise { + options?: JobStepsListByVersionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, jobAgentName, jobName, + jobVersion, nextLink, options }, - listByJobNextOperationSpec + listByVersionNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listByVersionOperationSpec: coreClient.OperationSpec = { +const listByJobOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps", httpMethod: "GET", responses: { 200: { @@ -521,22 +521,21 @@ const listByVersionOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, - Parameters.jobName, - Parameters.jobVersion + Parameters.jobName ], headerParameters: [Parameters.accept], serializer }; -const getByVersionOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", httpMethod: "GET", responses: { 200: { @@ -544,111 +543,112 @@ const getByVersionOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, - Parameters.stepName, - Parameters.jobVersion + Parameters.stepName ], headerParameters: [Parameters.accept], serializer }; -const listByJobOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.JobStepListResult + bodyMapper: Mappers.JobStep + }, + 201: { + bodyMapper: Mappers.JobStep }, default: {} }, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters39, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, - Parameters.jobName + Parameters.jobName, + Parameters.stepName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.JobStep - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.stepName ], - headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const listByVersionOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", - httpMethod: "PUT", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.JobStep - }, - 201: { - bodyMapper: Mappers.JobStep + bodyMapper: Mappers.JobStepListResult }, default: {} }, - requestBody: Parameters.parameters34, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, - Parameters.stepName + Parameters.jobVersion ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const deleteOperationSpec: coreClient.OperationSpec = { +const getByVersionOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}", - httpMethod: "DELETE", - responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.JobStep + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, - Parameters.stepName + Parameters.stepName, + Parameters.jobVersion ], + headerParameters: [Parameters.accept], serializer }; -const listByVersionNextOperationSpec: coreClient.OperationSpec = { +const listByJobNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -659,18 +659,17 @@ const listByVersionNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, - Parameters.jobName, - Parameters.jobVersion + Parameters.jobName ], headerParameters: [Parameters.accept], serializer }; -const listByJobNextOperationSpec: coreClient.OperationSpec = { +const listByVersionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -681,12 +680,13 @@ const listByJobNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, - Parameters.jobName + Parameters.jobName, + Parameters.jobVersion ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/jobTargetExecutions.ts b/sdk/sql/arm-sql/src/operations/jobTargetExecutions.ts index 98a88c9b0a1d..cc635abce0f5 100644 --- a/sdk/sql/arm-sql/src/operations/jobTargetExecutions.ts +++ b/sdk/sql/arm-sql/src/operations/jobTargetExecutions.ts @@ -15,16 +15,16 @@ import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { JobExecution, - JobTargetExecutionsListByJobExecutionNextOptionalParams, - JobTargetExecutionsListByJobExecutionOptionalParams, - JobTargetExecutionsListByJobExecutionResponse, JobTargetExecutionsListByStepNextOptionalParams, JobTargetExecutionsListByStepOptionalParams, JobTargetExecutionsListByStepResponse, + JobTargetExecutionsListByJobExecutionNextOptionalParams, + JobTargetExecutionsListByJobExecutionOptionalParams, + JobTargetExecutionsListByJobExecutionResponse, JobTargetExecutionsGetOptionalParams, JobTargetExecutionsGetResponse, - JobTargetExecutionsListByJobExecutionNextResponse, - JobTargetExecutionsListByStepNextResponse + JobTargetExecutionsListByStepNextResponse, + JobTargetExecutionsListByJobExecutionNextResponse } from "../models"; /// @@ -41,29 +41,32 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { } /** - * Lists target executions for all steps of a job execution. + * 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 options parameters. */ - public listByJobExecution( + public listByStep( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobTargetExecutionsListByJobExecutionOptionalParams + stepName: string, + options?: JobTargetExecutionsListByStepOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByJobExecutionPagingAll( + const iter = this.listByStepPagingAll( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, options ); return { @@ -77,12 +80,13 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByJobExecutionPagingPage( + return this.listByStepPagingPage( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, options, settings ); @@ -90,24 +94,26 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { }; } - private async *listByJobExecutionPagingPage( + private async *listByStepPagingPage( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobTargetExecutionsListByJobExecutionOptionalParams, + stepName: string, + options?: JobTargetExecutionsListByStepOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: JobTargetExecutionsListByJobExecutionResponse; + let result: JobTargetExecutionsListByStepResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByJobExecution( + result = await this._listByStep( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, options ); let page = result.value || []; @@ -116,12 +122,13 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { yield page; } while (continuationToken) { - result = await this._listByJobExecutionNext( + result = await this._listByStepNext( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, continuationToken, options ); @@ -132,20 +139,22 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { } } - private async *listByJobExecutionPagingAll( + private async *listByStepPagingAll( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobTargetExecutionsListByJobExecutionOptionalParams + stepName: string, + options?: JobTargetExecutionsListByStepOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByJobExecutionPagingPage( + for await (const page of this.listByStepPagingPage( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, + stepName, options )) { yield* page; @@ -153,32 +162,29 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { } /** - * Lists the target executions of a job step execution. + * 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 stepName The name of the step. * @param options The options parameters. */ - public listByStep( + public listByJobExecution( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - stepName: string, - options?: JobTargetExecutionsListByStepOptionalParams + options?: JobTargetExecutionsListByJobExecutionOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByStepPagingAll( + const iter = this.listByJobExecutionPagingAll( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - stepName, options ); return { @@ -192,13 +198,12 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByStepPagingPage( + return this.listByJobExecutionPagingPage( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - stepName, options, settings ); @@ -206,26 +211,24 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { }; } - private async *listByStepPagingPage( + private async *listByJobExecutionPagingPage( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - stepName: string, - options?: JobTargetExecutionsListByStepOptionalParams, + options?: JobTargetExecutionsListByJobExecutionOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: JobTargetExecutionsListByStepResponse; + let result: JobTargetExecutionsListByJobExecutionResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByStep( + result = await this._listByJobExecution( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - stepName, options ); let page = result.value || []; @@ -234,13 +237,12 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { yield page; } while (continuationToken) { - result = await this._listByStepNext( + result = await this._listByJobExecutionNext( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - stepName, continuationToken, options ); @@ -251,22 +253,20 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { } } - private async *listByStepPagingAll( + private async *listByJobExecutionPagingAll( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - stepName: string, - options?: JobTargetExecutionsListByStepOptionalParams + options?: JobTargetExecutionsListByJobExecutionOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByStepPagingPage( + for await (const page of this.listByJobExecutionPagingPage( resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, - stepName, options )) { yield* page; @@ -274,23 +274,25 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { } /** - * Lists target executions for all steps of a job execution. + * 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 options parameters. */ - private _listByJobExecution( + private _listByStep( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobTargetExecutionsListByJobExecutionOptionalParams - ): Promise { + stepName: string, + options?: JobTargetExecutionsListByStepOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -298,32 +300,35 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { jobAgentName, jobName, jobExecutionId, + stepName, options }, - listByJobExecutionOperationSpec + listByStepOperationSpec ); } /** - * Lists the target executions of a job step execution. + * 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 id of the job execution + * @param jobExecutionId The unique id of the job execution * @param stepName The name of the step. + * @param targetId The target id. * @param options The options parameters. */ - private _listByStep( + get( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, - options?: JobTargetExecutionsListByStepOptionalParams - ): Promise { + targetId: string, + options?: JobTargetExecutionsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -332,34 +337,31 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { jobName, jobExecutionId, stepName, + targetId, options }, - listByStepOperationSpec + getOperationSpec ); } /** - * Gets a target execution. + * 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 unique id of the job execution - * @param stepName The name of the step. - * @param targetId The target id. + * @param jobExecutionId The id of the job execution * @param options The options parameters. */ - get( + private _listByJobExecution( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - stepName: string, - targetId: string, - options?: JobTargetExecutionsGetOptionalParams - ): Promise { + options?: JobTargetExecutionsListByJobExecutionOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -367,34 +369,34 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { jobAgentName, jobName, jobExecutionId, - stepName, - targetId, options }, - getOperationSpec + listByJobExecutionOperationSpec ); } /** - * ListByJobExecutionNext + * ListByStepNext * @param resourceGroupName The name of the resource group that contains 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 nextLink The nextLink from the previous successful call to the ListByJobExecution method. + * @param stepName The name of the step. + * @param nextLink The nextLink from the previous successful call to the ListByStep method. * @param options The options parameters. */ - private _listByJobExecutionNext( + private _listByStepNext( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, + stepName: string, nextLink: string, - options?: JobTargetExecutionsListByJobExecutionNextOptionalParams - ): Promise { + options?: JobTargetExecutionsListByStepNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -402,35 +404,34 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { jobAgentName, jobName, jobExecutionId, + stepName, nextLink, options }, - listByJobExecutionNextOperationSpec + listByStepNextOperationSpec ); } /** - * ListByStepNext + * ListByJobExecutionNext * @param resourceGroupName The name of the resource group that contains 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 nextLink The nextLink from the previous successful call to the ListByStep method. + * @param nextLink The nextLink from the previous successful call to the ListByJobExecution method. * @param options The options parameters. */ - private _listByStepNext( + private _listByJobExecutionNext( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - stepName: string, nextLink: string, - options?: JobTargetExecutionsListByStepNextOptionalParams - ): Promise { + options?: JobTargetExecutionsListByJobExecutionNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -438,20 +439,19 @@ export class JobTargetExecutionsImpl implements JobTargetExecutions { jobAgentName, jobName, jobExecutionId, - stepName, nextLink, options }, - listByStepNextOperationSpec + listByJobExecutionNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listByJobExecutionOperationSpec: coreClient.OperationSpec = { +const listByStepOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets", httpMethod: "GET", responses: { 200: { @@ -460,8 +460,8 @@ const listByJobExecutionOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ + Parameters.apiVersion, Parameters.skip, - Parameters.apiVersion2, Parameters.createTimeMin, Parameters.createTimeMax, Parameters.endTimeMin, @@ -471,75 +471,75 @@ const listByJobExecutionOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, - Parameters.jobExecutionId + Parameters.jobExecutionId, + Parameters.stepName ], headerParameters: [Parameters.accept], serializer }; -const listByStepOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.JobExecutionListResult + bodyMapper: Mappers.JobExecution }, default: {} }, - queryParameters: [ - Parameters.skip, - Parameters.apiVersion2, - Parameters.createTimeMin, - Parameters.createTimeMax, - Parameters.endTimeMin, - Parameters.endTimeMax, - Parameters.isActive, - Parameters.top - ], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.jobExecutionId, - Parameters.stepName + Parameters.stepName, + Parameters.targetId ], headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const listByJobExecutionOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/steps/{stepName}/targets/{targetId}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/targets", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.JobExecution + bodyMapper: Mappers.JobExecutionListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [ + Parameters.apiVersion, + Parameters.skip, + Parameters.createTimeMin, + Parameters.createTimeMax, + Parameters.endTimeMin, + Parameters.endTimeMax, + Parameters.isActive, + Parameters.top + ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, - Parameters.jobExecutionId, - Parameters.stepName, - Parameters.targetId + Parameters.jobExecutionId ], headerParameters: [Parameters.accept], serializer }; -const listByJobExecutionNextOperationSpec: coreClient.OperationSpec = { +const listByStepNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -550,18 +550,19 @@ const listByJobExecutionNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, Parameters.jobName, - Parameters.jobExecutionId + Parameters.jobExecutionId, + Parameters.stepName ], headerParameters: [Parameters.accept], serializer }; -const listByStepNextOperationSpec: coreClient.OperationSpec = { +const listByJobExecutionNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -572,14 +573,13 @@ const listByStepNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, Parameters.jobName, - Parameters.jobExecutionId, - Parameters.stepName + Parameters.jobExecutionId ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/jobTargetGroups.ts b/sdk/sql/arm-sql/src/operations/jobTargetGroups.ts index a070e9574d84..83609b301188 100644 --- a/sdk/sql/arm-sql/src/operations/jobTargetGroups.ts +++ b/sdk/sql/arm-sql/src/operations/jobTargetGroups.ts @@ -263,12 +263,12 @@ const listByAgentOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], headerParameters: [Parameters.accept], @@ -284,12 +284,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.targetGroupName ], @@ -309,13 +309,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters35, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters40, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.targetGroupName ], @@ -328,12 +328,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.targetGroupName ], @@ -350,9 +350,9 @@ const listByAgentNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName ], diff --git a/sdk/sql/arm-sql/src/operations/jobVersions.ts b/sdk/sql/arm-sql/src/operations/jobVersions.ts index 48b0b18d4a1b..c9239b0b021d 100644 --- a/sdk/sql/arm-sql/src/operations/jobVersions.ts +++ b/sdk/sql/arm-sql/src/operations/jobVersions.ts @@ -236,12 +236,12 @@ const listByJobOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName ], @@ -258,12 +258,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName, Parameters.jobVersion @@ -282,9 +282,9 @@ const listByJobNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName, Parameters.jobName diff --git a/sdk/sql/arm-sql/src/operations/jobs.ts b/sdk/sql/arm-sql/src/operations/jobs.ts index 101a833f4dfd..875e20847ce0 100644 --- a/sdk/sql/arm-sql/src/operations/jobs.ts +++ b/sdk/sql/arm-sql/src/operations/jobs.ts @@ -263,12 +263,12 @@ const listByAgentOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName ], headerParameters: [Parameters.accept], @@ -284,12 +284,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName ], @@ -309,13 +309,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters33, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters41, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName ], @@ -328,12 +328,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}", httpMethod: "DELETE", responses: { 200: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.jobAgentName, Parameters.jobName ], @@ -350,9 +350,9 @@ const listByAgentNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.jobAgentName ], diff --git a/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts b/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts index 9b4f1300814c..8b340d9c584f 100644 --- a/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts +++ b/sdk/sql/arm-sql/src/operations/ledgerDigestUploadsOperations.ts @@ -138,6 +138,26 @@ export class LedgerDigestUploadsOperationsImpl } } + /** + * Gets all ledger digest upload settings on 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: LedgerDigestUploadsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets the current ledger digest upload configuration for a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -277,26 +297,6 @@ export class LedgerDigestUploadsOperationsImpl return poller.pollUntilDone(); } - /** - * Gets all ledger digest upload settings on 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: LedgerDigestUploadsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger * instance. @@ -429,6 +429,27 @@ export class LedgerDigestUploadsOperationsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LedgerDigestUploadsListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}", @@ -439,13 +460,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.ledgerDigestUploads ], headerParameters: [Parameters.accept], @@ -470,41 +491,20 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters78, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters42, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.ledgerDigestUploads ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LedgerDigestUploadsListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; const disableOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable", @@ -524,13 +524,13 @@ const disableOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.ledgerDigestUploads ], headerParameters: [Parameters.accept], @@ -547,10 +547,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/longTermRetentionBackups.ts b/sdk/sql/arm-sql/src/operations/longTermRetentionBackups.ts index 785da90b9f81..7b784300bb0a 100644 --- a/sdk/sql/arm-sql/src/operations/longTermRetentionBackups.ts +++ b/sdk/sql/arm-sql/src/operations/longTermRetentionBackups.ts @@ -17,46 +17,46 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { LongTermRetentionBackup, - LongTermRetentionBackupsListByDatabaseNextOptionalParams, - LongTermRetentionBackupsListByDatabaseOptionalParams, - LongTermRetentionBackupsListByDatabaseResponse, LongTermRetentionBackupsListByLocationNextOptionalParams, LongTermRetentionBackupsListByLocationOptionalParams, LongTermRetentionBackupsListByLocationResponse, LongTermRetentionBackupsListByServerNextOptionalParams, LongTermRetentionBackupsListByServerOptionalParams, LongTermRetentionBackupsListByServerResponse, - LongTermRetentionBackupsListByResourceGroupDatabaseNextOptionalParams, - LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams, - LongTermRetentionBackupsListByResourceGroupDatabaseResponse, + LongTermRetentionBackupsListByDatabaseNextOptionalParams, + LongTermRetentionBackupsListByDatabaseOptionalParams, + LongTermRetentionBackupsListByDatabaseResponse, LongTermRetentionBackupsListByResourceGroupLocationNextOptionalParams, LongTermRetentionBackupsListByResourceGroupLocationOptionalParams, LongTermRetentionBackupsListByResourceGroupLocationResponse, LongTermRetentionBackupsListByResourceGroupServerNextOptionalParams, LongTermRetentionBackupsListByResourceGroupServerOptionalParams, LongTermRetentionBackupsListByResourceGroupServerResponse, + LongTermRetentionBackupsListByResourceGroupDatabaseNextOptionalParams, + LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams, + LongTermRetentionBackupsListByResourceGroupDatabaseResponse, + LongTermRetentionBackupsGetOptionalParams, + LongTermRetentionBackupsGetResponse, + LongTermRetentionBackupsDeleteOptionalParams, CopyLongTermRetentionBackupParameters, LongTermRetentionBackupsCopyOptionalParams, LongTermRetentionBackupsCopyResponse, UpdateLongTermRetentionBackupParameters, LongTermRetentionBackupsUpdateOptionalParams, LongTermRetentionBackupsUpdateResponse, - LongTermRetentionBackupsGetOptionalParams, - LongTermRetentionBackupsGetResponse, - LongTermRetentionBackupsDeleteOptionalParams, + LongTermRetentionBackupsGetByResourceGroupOptionalParams, + LongTermRetentionBackupsGetByResourceGroupResponse, + LongTermRetentionBackupsDeleteByResourceGroupOptionalParams, LongTermRetentionBackupsCopyByResourceGroupOptionalParams, LongTermRetentionBackupsCopyByResourceGroupResponse, LongTermRetentionBackupsUpdateByResourceGroupOptionalParams, LongTermRetentionBackupsUpdateByResourceGroupResponse, - LongTermRetentionBackupsGetByResourceGroupOptionalParams, - LongTermRetentionBackupsGetByResourceGroupResponse, - LongTermRetentionBackupsDeleteByResourceGroupOptionalParams, - LongTermRetentionBackupsListByDatabaseNextResponse, LongTermRetentionBackupsListByLocationNextResponse, LongTermRetentionBackupsListByServerNextResponse, - LongTermRetentionBackupsListByResourceGroupDatabaseNextResponse, + LongTermRetentionBackupsListByDatabaseNextResponse, LongTermRetentionBackupsListByResourceGroupLocationNextResponse, - LongTermRetentionBackupsListByResourceGroupServerNextResponse + LongTermRetentionBackupsListByResourceGroupServerNextResponse, + LongTermRetentionBackupsListByResourceGroupDatabaseNextResponse } from "../models"; /// @@ -72,99 +72,6 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { this.client = client; } - /** - * 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 options parameters. - */ - public listByDatabase( - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByDatabaseOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByDatabasePagingAll( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByDatabasePagingPage( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - options, - settings - ); - } - }; - } - - private async *listByDatabasePagingPage( - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByDatabaseOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: LongTermRetentionBackupsListByDatabaseResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByDatabase( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByDatabaseNext( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByDatabasePagingAll( - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByDatabaseOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByDatabasePagingPage( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - options - )) { - yield* page; - } - } - /** * Lists the long term retention backups for a given location. * @param locationName The location of the database @@ -316,22 +223,18 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { /** * Lists all long term retention backups for 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 locationName The location of the database * @param longTermRetentionServerName The name of the server * @param longTermRetentionDatabaseName The name of the database * @param options The options parameters. */ - public listByResourceGroupDatabase( - resourceGroupName: string, + public listByDatabase( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + options?: LongTermRetentionBackupsListByDatabaseOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupDatabasePagingAll( - resourceGroupName, + const iter = this.listByDatabasePagingAll( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -348,8 +251,7 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupDatabasePagingPage( - resourceGroupName, + return this.listByDatabasePagingPage( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -360,19 +262,17 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { }; } - private async *listByResourceGroupDatabasePagingPage( - resourceGroupName: string, + private async *listByDatabasePagingPage( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams, + options?: LongTermRetentionBackupsListByDatabaseOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: LongTermRetentionBackupsListByResourceGroupDatabaseResponse; + let result: LongTermRetentionBackupsListByDatabaseResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByResourceGroupDatabase( - resourceGroupName, + result = await this._listByDatabase( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -384,8 +284,7 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { yield page; } while (continuationToken) { - result = await this._listByResourceGroupDatabaseNext( - resourceGroupName, + result = await this._listByDatabaseNext( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -399,15 +298,13 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { } } - private async *listByResourceGroupDatabasePagingAll( - resourceGroupName: string, + private async *listByDatabasePagingAll( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + options?: LongTermRetentionBackupsListByDatabaseOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupDatabasePagingPage( - resourceGroupName, + for await (const page of this.listByDatabasePagingPage( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -597,221 +494,162 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { } /** - * Copy an existing long term retention backup. - * @param locationName The location of the database. + * Lists all long term retention backups for 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 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 parameters The parameters needed for long term retention copy request * @param options The options parameters. */ - async beginCopy( + public listByResourceGroupDatabase( + resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - backupName: string, - parameters: CopyLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsCopyOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LongTermRetentionBackupsCopyResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() + options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupDatabasePagingAll( + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); } - }; + return this.listByResourceGroupDatabasePagingPage( + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + options, + settings + ); + } }; + } - const lro = new LroImpl( - sendOperation, - { + private async *listByResourceGroupDatabasePagingPage( + resourceGroupName: string, + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LongTermRetentionBackupsListByResourceGroupDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroupDatabase( + resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, - parameters, options - }, - copyOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupDatabaseNext( + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } - /** - * Copy an existing 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 parameters The parameters needed for long term retention copy request - * @param options The options parameters. - */ - async beginCopyAndWait( + private async *listByResourceGroupDatabasePagingAll( + resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - backupName: string, - parameters: CopyLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsCopyOptionalParams - ): Promise { - const poller = await this.beginCopy( + options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupDatabasePagingPage( + resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, - backupName, - parameters, options + )) { + yield* page; + } + } + + /** + * Lists the long term retention backups for a given location. + * @param locationName The location of the database + * @param options The options parameters. + */ + private _listByLocation( + locationName: string, + options?: LongTermRetentionBackupsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, options }, + listByLocationOperationSpec ); - return poller.pollUntilDone(); } /** - * Updates an existing long term retention backup. - * @param locationName The location of the database. + * 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 longTermRetentionDatabaseName The name of the database - * @param backupName The backup name. - * @param parameters The requested backup resource state * @param options The options parameters. */ - async beginUpdate( + private _listByServer( locationName: string, longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - backupName: string, - parameters: UpdateLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LongTermRetentionBackupsUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - options - }, - updateOperationSpec + options?: LongTermRetentionBackupsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, longTermRetentionServerName, options }, + listByServerOperationSpec ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; } /** - * Updates an existing long term retention backup. - * @param locationName The location of the database. + * 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 backupName The backup name. - * @param parameters The requested backup resource state * @param options The options parameters. */ - async beginUpdateAndWait( + private _listByDatabase( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - backupName: string, - parameters: UpdateLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - backupName, - parameters, - options + options?: LongTermRetentionBackupsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + options + }, + listByDatabaseOperationSpec ); - return poller.pollUntilDone(); } /** @@ -940,65 +778,7 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { } /** - * 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 options parameters. - */ - private _listByDatabase( - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - options - }, - listByDatabaseOperationSpec - ); - } - - /** - * Lists the long term retention backups for a given location. - * @param locationName The location of the database - * @param options The options parameters. - */ - private _listByLocation( - locationName: string, - options?: LongTermRetentionBackupsListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { locationName, options }, - listByLocationOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listByServer( - locationName: string, - longTermRetentionServerName: string, - options?: LongTermRetentionBackupsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { locationName, longTermRetentionServerName, options }, - listByServerOperationSpec - ); - } - - /** - * Copy an existing long term retention backup to a different 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. + * Copy an existing 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 @@ -1006,24 +786,23 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { * @param parameters The parameters needed for long term retention copy request * @param options The options parameters. */ - async beginCopyByResourceGroup( - resourceGroupName: string, + async beginCopy( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, parameters: CopyLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsCopyByResourceGroupOptionalParams + options?: LongTermRetentionBackupsCopyOptionalParams ): Promise< PollerLike< - PollOperationState, - LongTermRetentionBackupsCopyByResourceGroupResponse + PollOperationState, + LongTermRetentionBackupsCopyResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1062,7 +841,6 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { const lro = new LroImpl( sendOperation, { - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -1070,7 +848,7 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { parameters, options }, - copyByResourceGroupOperationSpec + copyOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1081,9 +859,7 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { } /** - * Copy an existing long term retention backup to a different 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. + * Copy an existing 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 @@ -1091,17 +867,15 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { * @param parameters The parameters needed for long term retention copy request * @param options The options parameters. */ - async beginCopyByResourceGroupAndWait( - resourceGroupName: string, + async beginCopyAndWait( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, parameters: CopyLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsCopyByResourceGroupOptionalParams - ): Promise { - const poller = await this.beginCopyByResourceGroup( - resourceGroupName, + options?: LongTermRetentionBackupsCopyOptionalParams + ): Promise { + const poller = await this.beginCopy( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -1114,8 +888,6 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { /** * Updates an existing long term retention 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 locationName The location of the database. * @param longTermRetentionServerName The name of the server * @param longTermRetentionDatabaseName The name of the database @@ -1123,24 +895,23 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { * @param parameters The requested backup resource state * @param options The options parameters. */ - async beginUpdateByResourceGroup( - resourceGroupName: string, + async beginUpdate( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, parameters: UpdateLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsUpdateByResourceGroupOptionalParams + options?: LongTermRetentionBackupsUpdateOptionalParams ): Promise< PollerLike< - PollOperationState, - LongTermRetentionBackupsUpdateByResourceGroupResponse + PollOperationState, + LongTermRetentionBackupsUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1179,7 +950,6 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { const lro = new LroImpl( sendOperation, { - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -1187,7 +957,7 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { parameters, options }, - updateByResourceGroupOperationSpec + updateOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -1199,8 +969,6 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { /** * Updates an existing long term retention 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 locationName The location of the database. * @param longTermRetentionServerName The name of the server * @param longTermRetentionDatabaseName The name of the database @@ -1208,17 +976,15 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { * @param parameters The requested backup resource state * @param options The options parameters. */ - async beginUpdateByResourceGroupAndWait( - resourceGroupName: string, + async beginUpdateAndWait( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, parameters: UpdateLongTermRetentionBackupParameters, - options?: LongTermRetentionBackupsUpdateByResourceGroupOptionalParams - ): Promise { - const poller = await this.beginUpdateByResourceGroup( - resourceGroupName, + options?: LongTermRetentionBackupsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( locationName, longTermRetentionServerName, longTermRetentionDatabaseName, @@ -1229,6 +995,72 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { return poller.pollUntilDone(); } + /** + * Lists the long term retention backups for a given 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 location of the database + * @param options The options parameters. + */ + private _listByResourceGroupLocation( + resourceGroupName: string, + locationName: string, + options?: LongTermRetentionBackupsListByResourceGroupLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, options }, + listByResourceGroupLocationOperationSpec + ); + } + + /** + * Lists the long term retention backups 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 locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param options The options parameters. + */ + private _listByResourceGroupServer( + resourceGroupName: string, + locationName: string, + longTermRetentionServerName: string, + options?: LongTermRetentionBackupsListByResourceGroupServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, longTermRetentionServerName, options }, + listByResourceGroupServerOperationSpec + ); + } + + /** + * Lists all long term retention backups for 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 locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param options The options parameters. + */ + private _listByResourceGroupDatabase( + resourceGroupName: string, + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + options + }, + listByResourceGroupDatabaseOperationSpec + ); + } + /** * Gets a long term retention backup. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -1367,96 +1199,237 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { } /** - * Lists all long term retention backups for a database. + * Copy an existing long term retention backup to a different 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 locationName The location of the database + * @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 parameters The parameters needed for long term retention copy request * @param options The options parameters. */ - private _listByResourceGroupDatabase( + async beginCopyByResourceGroup( resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( + backupName: string, + parameters: CopyLongTermRetentionBackupParameters, + options?: LongTermRetentionBackupsCopyByResourceGroupOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LongTermRetentionBackupsCopyByResourceGroupResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, + backupName, + parameters, options }, - listByResourceGroupDatabaseOperationSpec + copyByResourceGroupOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; } /** - * Lists the long term retention backups for a given location. + * Copy an existing long term retention backup to a different 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 locationName The location of the database + * @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 parameters The parameters needed for long term retention copy request * @param options The options parameters. */ - private _listByResourceGroupLocation( + async beginCopyByResourceGroupAndWait( resourceGroupName: string, locationName: string, - options?: LongTermRetentionBackupsListByResourceGroupLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, locationName, options }, - listByResourceGroupLocationOperationSpec + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + backupName: string, + parameters: CopyLongTermRetentionBackupParameters, + options?: LongTermRetentionBackupsCopyByResourceGroupOptionalParams + ): Promise { + const poller = await this.beginCopyByResourceGroup( + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + backupName, + parameters, + options ); + return poller.pollUntilDone(); } /** - * Lists the long term retention backups for a given server. + * Updates an existing long term retention 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 locationName The location of the database + * @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 parameters The requested backup resource state * @param options The options parameters. */ - private _listByResourceGroupServer( + async beginUpdateByResourceGroup( resourceGroupName: string, locationName: string, longTermRetentionServerName: string, - options?: LongTermRetentionBackupsListByResourceGroupServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, locationName, longTermRetentionServerName, options }, - listByResourceGroupServerOperationSpec + longTermRetentionDatabaseName: string, + backupName: string, + parameters: UpdateLongTermRetentionBackupParameters, + options?: LongTermRetentionBackupsUpdateByResourceGroupOptionalParams + ): Promise< + PollerLike< + PollOperationState, + LongTermRetentionBackupsUpdateByResourceGroupResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + backupName, + parameters, + options + }, + updateByResourceGroupOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; } /** - * ListByDatabaseNext - * @param locationName The location of the database + * Updates an existing long term retention 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 locationName The location of the database. * @param longTermRetentionServerName The name of the server * @param longTermRetentionDatabaseName The name of the database - * @param nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param backupName The backup name. + * @param parameters The requested backup resource state * @param options The options parameters. */ - private _listByDatabaseNext( + async beginUpdateByResourceGroupAndWait( + resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - nextLink: string, - options?: LongTermRetentionBackupsListByDatabaseNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - locationName, - longTermRetentionServerName, - longTermRetentionDatabaseName, - nextLink, - options - }, - listByDatabaseNextOperationSpec + backupName: string, + parameters: UpdateLongTermRetentionBackupParameters, + options?: LongTermRetentionBackupsUpdateByResourceGroupOptionalParams + ): Promise { + const poller = await this.beginUpdateByResourceGroup( + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + backupName, + parameters, + options ); + return poller.pollUntilDone(); } /** @@ -1496,34 +1469,29 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { } /** - * ListByResourceGroupDatabaseNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. + * ListByDatabaseNext * @param locationName The location of the database * @param longTermRetentionServerName The name of the server * @param longTermRetentionDatabaseName The name of the database - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroupDatabase - * method. + * @param nextLink The nextLink from the previous successful call to the ListByDatabase method. * @param options The options parameters. */ - private _listByResourceGroupDatabaseNext( - resourceGroupName: string, + private _listByDatabaseNext( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, nextLink: string, - options?: LongTermRetentionBackupsListByResourceGroupDatabaseNextOptionalParams - ): Promise { + options?: LongTermRetentionBackupsListByDatabaseNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { - resourceGroupName, locationName, longTermRetentionServerName, longTermRetentionDatabaseName, nextLink, options }, - listByResourceGroupDatabaseNextOperationSpec + listByDatabaseNextOperationSpec ); } @@ -1576,112 +1544,87 @@ export class LongTermRetentionBackupsImpl implements LongTermRetentionBackups { listByResourceGroupServerNextOperationSpec ); } + + /** + * ListByResourceGroupDatabaseNext + * @param resourceGroupName The 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 location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroupDatabase + * method. + * @param options The options parameters. + */ + private _listByResourceGroupDatabaseNext( + resourceGroupName: string, + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + nextLink: string, + options?: LongTermRetentionBackupsListByResourceGroupDatabaseNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + locationName, + longTermRetentionServerName, + longTermRetentionDatabaseName, + nextLink, + options + }, + listByResourceGroupDatabaseNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const copyOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - 201: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - 202: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - 204: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - default: {} - }, - requestBody: Parameters.parameters84, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.locationName, - Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName, - Parameters.backupName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - 201: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - 202: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult - }, - 204: { - bodyMapper: Mappers.LongTermRetentionBackupOperationResult + +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult }, default: {} }, - requestBody: Parameters.parameters85, - queryParameters: [Parameters.apiVersion1], + queryParameters: [ + Parameters.apiVersion, + Parameters.onlyLatestPerDatabase, + Parameters.databaseState + ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.locationName, - Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName, - Parameters.backupName + Parameters.locationName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const listByServerOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LongTermRetentionBackup + bodyMapper: Mappers.LongTermRetentionBackupListResult }, default: {} }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.locationName, - Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName, - Parameters.backupName + queryParameters: [ + Parameters.apiVersion, + Parameters.onlyLatestPerDatabase, + Parameters.databaseState ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", - httpMethod: "DELETE", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.locationName, - Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName, - Parameters.backupName + Parameters.longTermRetentionServerName ], + headerParameters: [Parameters.accept], serializer }; const listByDatabaseOperationSpec: coreClient.OperationSpec = { @@ -1695,7 +1638,7 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.onlyLatestPerDatabase, Parameters.databaseState ], @@ -1709,56 +1652,47 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByLocationOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LongTermRetentionBackupListResult + bodyMapper: Mappers.LongTermRetentionBackup }, default: {} }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.onlyLatestPerDatabase, - Parameters.databaseState - ], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.locationName + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName ], headerParameters: [Parameters.accept], serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LongTermRetentionBackupListResult - }, - default: {} - }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.onlyLatestPerDatabase, - Parameters.databaseState - ], + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.locationName, - Parameters.longTermRetentionServerName + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName ], - headerParameters: [Parameters.accept], serializer }; -const copyByResourceGroupOperationSpec: coreClient.OperationSpec = { +const copyOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy", httpMethod: "POST", responses: { 200: { @@ -1775,12 +1709,11 @@ const copyByResourceGroupOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters84, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters43, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.locationName, Parameters.longTermRetentionServerName, Parameters.longTermRetentionDatabaseName, @@ -1790,9 +1723,9 @@ const copyByResourceGroupOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const updateByResourceGroupOperationSpec: coreClient.OperationSpec = { +const updateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update", httpMethod: "POST", responses: { 200: { @@ -1809,12 +1742,11 @@ const updateByResourceGroupOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters85, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters44, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.locationName, Parameters.longTermRetentionServerName, Parameters.longTermRetentionDatabaseName, @@ -1824,44 +1756,53 @@ const updateByResourceGroupOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const getByResourceGroupOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupLocationOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LongTermRetentionBackup + bodyMapper: Mappers.LongTermRetentionBackupListResult }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [ + Parameters.apiVersion, + Parameters.onlyLatestPerDatabase, + Parameters.databaseState + ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.locationName, - Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName, - Parameters.backupName + Parameters.subscriptionId, + Parameters.locationName ], headerParameters: [Parameters.accept], serializer }; -const deleteByResourceGroupOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupServerOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", - httpMethod: "DELETE", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.onlyLatestPerDatabase, + Parameters.databaseState + ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, - Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName, - Parameters.backupName + Parameters.longTermRetentionServerName ], + headerParameters: [Parameters.accept], serializer }; const listByResourceGroupDatabaseOperationSpec: coreClient.OperationSpec = { @@ -1875,14 +1816,14 @@ const listByResourceGroupDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.onlyLatestPerDatabase, Parameters.databaseState ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.longTermRetentionServerName, Parameters.longTermRetentionDatabaseName @@ -1890,73 +1831,112 @@ const listByResourceGroupDatabaseOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupLocationOperationSpec: coreClient.OperationSpec = { +const getByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionBackups", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LongTermRetentionBackupListResult + bodyMapper: Mappers.LongTermRetentionBackup }, default: {} }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.onlyLatestPerDatabase, - Parameters.databaseState - ], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.locationName + Parameters.subscriptionId, + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupServerOperationSpec: coreClient.OperationSpec = { +const deleteByResourceGroupOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionBackups", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName + ], + serializer +}; +const copyByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/copy", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.LongTermRetentionBackupListResult + bodyMapper: Mappers.LongTermRetentionBackupOperationResult + }, + 201: { + bodyMapper: Mappers.LongTermRetentionBackupOperationResult + }, + 202: { + bodyMapper: Mappers.LongTermRetentionBackupOperationResult + }, + 204: { + bodyMapper: Mappers.LongTermRetentionBackupOperationResult }, default: {} }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.onlyLatestPerDatabase, - Parameters.databaseState - ], + requestBody: Parameters.parameters43, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, - Parameters.longTermRetentionServerName + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName, + Parameters.backupName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; -const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", +const updateByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionServers/{longTermRetentionServerName}/longTermRetentionDatabases/{longTermRetentionDatabaseName}/longTermRetentionBackups/{backupName}/update", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.LongTermRetentionBackupListResult + bodyMapper: Mappers.LongTermRetentionBackupOperationResult + }, + 201: { + bodyMapper: Mappers.LongTermRetentionBackupOperationResult + }, + 202: { + bodyMapper: Mappers.LongTermRetentionBackupOperationResult + }, + 204: { + bodyMapper: Mappers.LongTermRetentionBackupOperationResult }, default: {} }, + requestBody: Parameters.parameters44, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.nextLink, Parameters.locationName, Parameters.longTermRetentionServerName, - Parameters.longTermRetentionDatabaseName + Parameters.longTermRetentionDatabaseName, + Parameters.backupName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByLocationNextOperationSpec: coreClient.OperationSpec = { @@ -1996,7 +1976,7 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupDatabaseNextOperationSpec: coreClient.OperationSpec = { +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -2008,7 +1988,6 @@ const listByResourceGroupDatabaseNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.nextLink, Parameters.locationName, Parameters.longTermRetentionServerName, @@ -2028,8 +2007,8 @@ const listByResourceGroupLocationNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName ], @@ -2047,8 +2026,8 @@ const listByResourceGroupServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName, Parameters.longTermRetentionServerName @@ -2056,3 +2035,24 @@ const listByResourceGroupServerNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const listByResourceGroupDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionBackupListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.locationName, + Parameters.longTermRetentionServerName, + Parameters.longTermRetentionDatabaseName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/longTermRetentionManagedInstanceBackups.ts b/sdk/sql/arm-sql/src/operations/longTermRetentionManagedInstanceBackups.ts index 2b990504bc32..0b43f3d4d279 100644 --- a/sdk/sql/arm-sql/src/operations/longTermRetentionManagedInstanceBackups.ts +++ b/sdk/sql/arm-sql/src/operations/longTermRetentionManagedInstanceBackups.ts @@ -17,36 +17,36 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { ManagedInstanceLongTermRetentionBackup, + LongTermRetentionManagedInstanceBackupsListByLocationNextOptionalParams, + LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams, + LongTermRetentionManagedInstanceBackupsListByLocationResponse, LongTermRetentionManagedInstanceBackupsListByDatabaseNextOptionalParams, LongTermRetentionManagedInstanceBackupsListByDatabaseOptionalParams, LongTermRetentionManagedInstanceBackupsListByDatabaseResponse, LongTermRetentionManagedInstanceBackupsListByInstanceNextOptionalParams, LongTermRetentionManagedInstanceBackupsListByInstanceOptionalParams, LongTermRetentionManagedInstanceBackupsListByInstanceResponse, - LongTermRetentionManagedInstanceBackupsListByLocationNextOptionalParams, - LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams, - LongTermRetentionManagedInstanceBackupsListByLocationResponse, + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextOptionalParams, + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams, + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse, LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseNextOptionalParams, LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseOptionalParams, LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseResponse, LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextOptionalParams, LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceOptionalParams, LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceResponse, - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextOptionalParams, - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams, - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse, LongTermRetentionManagedInstanceBackupsGetOptionalParams, LongTermRetentionManagedInstanceBackupsGetResponse, LongTermRetentionManagedInstanceBackupsDeleteOptionalParams, LongTermRetentionManagedInstanceBackupsGetByResourceGroupOptionalParams, LongTermRetentionManagedInstanceBackupsGetByResourceGroupResponse, LongTermRetentionManagedInstanceBackupsDeleteByResourceGroupOptionalParams, + LongTermRetentionManagedInstanceBackupsListByLocationNextResponse, LongTermRetentionManagedInstanceBackupsListByDatabaseNextResponse, LongTermRetentionManagedInstanceBackupsListByInstanceNextResponse, - LongTermRetentionManagedInstanceBackupsListByLocationNextResponse, + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextResponse, LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseNextResponse, - LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextResponse, - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextResponse + LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceNextResponse } from "../models"; /// @@ -63,6 +63,71 @@ export class LongTermRetentionManagedInstanceBackupsImpl this.client = client; } + /** + * Lists the long term retention backups for managed databases in a given location. + * @param locationName The location of the database. + * @param options The options parameters. + */ + public listByLocation( + locationName: string, + options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocationPagingAll(locationName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocationPagingPage(locationName, options, settings); + } + }; + } + + private async *listByLocationPagingPage( + locationName: string, + options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: LongTermRetentionManagedInstanceBackupsListByLocationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocation(locationName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocationNext( + locationName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocationPagingAll( + locationName: string, + options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocationPagingPage( + locationName, + options + )) { + yield* page; + } + } + /** * Lists all long term retention backups for a managed database. * @param locationName The location of the database. @@ -242,14 +307,21 @@ export class LongTermRetentionManagedInstanceBackupsImpl /** * Lists the long term retention backups for managed databases in a given 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 location of the database. * @param options The options parameters. */ - public listByLocation( + public listByResourceGroupLocation( + resourceGroupName: string, locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByLocationPagingAll(locationName, options); + const iter = this.listByResourceGroupLocationPagingAll( + resourceGroupName, + locationName, + options + ); return { next() { return iter.next(); @@ -261,27 +333,38 @@ export class LongTermRetentionManagedInstanceBackupsImpl if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByLocationPagingPage(locationName, options, settings); + return this.listByResourceGroupLocationPagingPage( + resourceGroupName, + locationName, + options, + settings + ); } }; } - private async *listByLocationPagingPage( + private async *listByResourceGroupLocationPagingPage( + resourceGroupName: string, locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams, + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: LongTermRetentionManagedInstanceBackupsListByLocationResponse; + let result: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByLocation(locationName, options); + result = await this._listByResourceGroupLocation( + resourceGroupName, + locationName, + options + ); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByLocationNext( + result = await this._listByResourceGroupLocationNext( + resourceGroupName, locationName, continuationToken, options @@ -293,11 +376,13 @@ export class LongTermRetentionManagedInstanceBackupsImpl } } - private async *listByLocationPagingAll( + private async *listByResourceGroupLocationPagingAll( + resourceGroupName: string, locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByLocationPagingPage( + for await (const page of this.listByResourceGroupLocationPagingPage( + resourceGroupName, locationName, options )) { @@ -504,87 +589,36 @@ export class LongTermRetentionManagedInstanceBackupsImpl /** * Lists the long term retention backups for managed databases in a given 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 location of the database. * @param options The options parameters. */ - public listByResourceGroupLocation( - resourceGroupName: string, + private _listByLocation( locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupLocationPagingAll( - resourceGroupName, - locationName, - options + options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, options }, + listByLocationOperationSpec ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByResourceGroupLocationPagingPage( - resourceGroupName, - locationName, - options, - settings - ); - } - }; - } - - private async *listByResourceGroupLocationPagingPage( - resourceGroupName: string, - locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByResourceGroupLocation( - resourceGroupName, - locationName, - options - ); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByResourceGroupLocationNext( - resourceGroupName, - locationName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } } - private async *listByResourceGroupLocationPagingAll( - resourceGroupName: string, + /** + * Lists all long term retention backups for a managed database. + * @param locationName The location of the database. + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param options The options parameters. + */ + private _listByDatabase( locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupLocationPagingPage( - resourceGroupName, - locationName, - options - )) { - yield* page; - } + managedInstanceName: string, + databaseName: string, + options?: LongTermRetentionManagedInstanceBackupsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { locationName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); } /** @@ -700,25 +734,6 @@ export class LongTermRetentionManagedInstanceBackupsImpl return poller.pollUntilDone(); } - /** - * Lists all long term retention backups for a managed database. - * @param locationName The location of the database. - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param options The options parameters. - */ - private _listByDatabase( - locationName: string, - managedInstanceName: string, - databaseName: string, - options?: LongTermRetentionManagedInstanceBackupsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { locationName, managedInstanceName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * Lists the long term retention backups for a given managed instance. * @param locationName The location of the database @@ -738,16 +753,51 @@ export class LongTermRetentionManagedInstanceBackupsImpl /** * Lists the long term retention backups for managed databases in a given 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 location of the database. * @param options The options parameters. */ - private _listByLocation( + private _listByResourceGroupLocation( + resourceGroupName: string, locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams - ): Promise { + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams + ): Promise< + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse + > { return this.client.sendOperationRequest( - { locationName, options }, - listByLocationOperationSpec + { resourceGroupName, locationName, options }, + listByResourceGroupLocationOperationSpec + ); + } + + /** + * Lists all long term retention backups for 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 locationName The location of the database + * @param managedInstanceName The name of the managed instance. + * @param databaseName The name of the managed database. + * @param options The options parameters. + */ + private _listByResourceGroupDatabase( + resourceGroupName: string, + locationName: string, + managedInstanceName: string, + databaseName: string, + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseOptionalParams + ): Promise< + LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + locationName, + managedInstanceName, + databaseName, + options + }, + listByResourceGroupDatabaseOperationSpec ); } @@ -890,36 +940,6 @@ export class LongTermRetentionManagedInstanceBackupsImpl return poller.pollUntilDone(); } - /** - * Lists all long term retention backups for 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 locationName The location of the database - * @param managedInstanceName The name of the managed instance. - * @param databaseName The name of the managed database. - * @param options The options parameters. - */ - private _listByResourceGroupDatabase( - resourceGroupName: string, - locationName: string, - managedInstanceName: string, - databaseName: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseOptionalParams - ): Promise< - LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseResponse - > { - return this.client.sendOperationRequest( - { - resourceGroupName, - locationName, - managedInstanceName, - databaseName, - options - }, - listByResourceGroupDatabaseOperationSpec - ); - } - /** * Lists the long term retention backups for a given managed instance. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -943,22 +963,21 @@ export class LongTermRetentionManagedInstanceBackupsImpl } /** - * Lists the long term retention backups for managed databases in a given 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. + * ListByLocationNext * @param locationName The location of the database. + * @param nextLink The nextLink from the previous successful call to the ListByLocation method. * @param options The options parameters. */ - private _listByResourceGroupLocation( - resourceGroupName: string, + private _listByLocationNext( locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams + nextLink: string, + options?: LongTermRetentionManagedInstanceBackupsListByLocationNextOptionalParams ): Promise< - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationResponse + LongTermRetentionManagedInstanceBackupsListByLocationNextResponse > { return this.client.sendOperationRequest( - { resourceGroupName, locationName, options }, - listByResourceGroupLocationOperationSpec + { locationName, nextLink, options }, + listByLocationNextOperationSpec ); } @@ -1007,21 +1026,25 @@ export class LongTermRetentionManagedInstanceBackupsImpl } /** - * ListByLocationNext + * ListByResourceGroupLocationNext + * @param resourceGroupName The 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 location of the database. - * @param nextLink The nextLink from the previous successful call to the ListByLocation method. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroupLocation + * method. * @param options The options parameters. */ - private _listByLocationNext( + private _listByResourceGroupLocationNext( + resourceGroupName: string, locationName: string, nextLink: string, - options?: LongTermRetentionManagedInstanceBackupsListByLocationNextOptionalParams + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextOptionalParams ): Promise< - LongTermRetentionManagedInstanceBackupsListByLocationNextResponse + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextResponse > { return this.client.sendOperationRequest( - { locationName, nextLink, options }, - listByLocationNextOperationSpec + { resourceGroupName, locationName, nextLink, options }, + listByResourceGroupLocationNextOperationSpec ); } @@ -1089,33 +1112,58 @@ export class LongTermRetentionManagedInstanceBackupsImpl listByResourceGroupInstanceNextOperationSpec ); } - - /** - * ListByResourceGroupLocationNext - * @param resourceGroupName The 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 location of the database. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroupLocation - * method. - * @param options The options parameters. - */ - private _listByResourceGroupLocationNext( - resourceGroupName: string, - locationName: string, - nextLink: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextOptionalParams - ): Promise< - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationNextResponse - > { - return this.client.sendOperationRequest( - { resourceGroupName, locationName, nextLink, options }, - listByResourceGroupLocationNextOperationSpec - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceLongTermRetentionBackupListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.onlyLatestPerDatabase, + Parameters.databaseState + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceLongTermRetentionBackupListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.onlyLatestPerDatabase, + Parameters.databaseState + ], + urlParameters: [ + Parameters.$host, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.locationName, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", @@ -1126,11 +1174,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.databaseName, + Parameters.subscriptionId, Parameters.locationName, Parameters.managedInstanceName, Parameters.backupName @@ -1143,20 +1191,20 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.databaseName, + Parameters.subscriptionId, Parameters.locationName, Parameters.managedInstanceName, Parameters.backupName ], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const listByInstanceOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups", httpMethod: "GET", responses: { 200: { @@ -1165,23 +1213,22 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.onlyLatestPerDatabase, Parameters.databaseState ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.databaseName, Parameters.locationName, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const listByInstanceOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupLocationOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups", httpMethod: "GET", responses: { 200: { @@ -1190,22 +1237,22 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.onlyLatestPerDatabase, Parameters.databaseState ], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, - Parameters.locationName, - Parameters.managedInstanceName + Parameters.locationName ], headerParameters: [Parameters.accept], serializer }; -const listByLocationOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups", httpMethod: "GET", responses: { 200: { @@ -1214,14 +1261,17 @@ const listByLocationOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.onlyLatestPerDatabase, Parameters.databaseState ], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, Parameters.subscriptionId, - Parameters.locationName + Parameters.locationName, + Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer @@ -1236,12 +1286,12 @@ const getByResourceGroupOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.locationName, Parameters.managedInstanceName, Parameters.backupName @@ -1254,44 +1304,18 @@ const deleteByResourceGroupOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups/{backupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.locationName, Parameters.managedInstanceName, Parameters.backupName ], serializer }; -const listByResourceGroupDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionDatabases/{databaseName}/longTermRetentionManagedInstanceBackups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedInstanceLongTermRetentionBackupListResult - }, - default: {} - }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.onlyLatestPerDatabase, - Parameters.databaseState - ], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.databaseName, - Parameters.locationName, - Parameters.managedInstanceName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByResourceGroupInstanceOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstances/{managedInstanceName}/longTermRetentionManagedInstanceBackups", @@ -1303,23 +1327,22 @@ const listByResourceGroupInstanceOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.onlyLatestPerDatabase, Parameters.databaseState ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/longTermRetentionManagedInstanceBackups", +const listByLocationNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", httpMethod: "GET", responses: { 200: { @@ -1327,15 +1350,10 @@ const listByResourceGroupLocationOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [ - Parameters.apiVersion1, - Parameters.onlyLatestPerDatabase, - Parameters.databaseState - ], urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, + Parameters.nextLink, Parameters.locationName ], headerParameters: [Parameters.accept], @@ -1352,8 +1370,8 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName, Parameters.managedInstanceName @@ -1380,7 +1398,7 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByLocationNextOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupLocationNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -1391,6 +1409,7 @@ const listByLocationNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName @@ -1409,9 +1428,9 @@ const listByResourceGroupDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName, Parameters.managedInstanceName @@ -1430,8 +1449,8 @@ const listByResourceGroupInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName, Parameters.managedInstanceName @@ -1439,22 +1458,3 @@ const listByResourceGroupInstanceNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupLocationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedInstanceLongTermRetentionBackupListResult - }, - default: {} - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/sql/arm-sql/src/operations/longTermRetentionPolicies.ts b/sdk/sql/arm-sql/src/operations/longTermRetentionPolicies.ts index 57e28be0f3f2..55fbbac6b921 100644 --- a/sdk/sql/arm-sql/src/operations/longTermRetentionPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/longTermRetentionPolicies.ts @@ -136,6 +136,26 @@ export class LongTermRetentionPoliciesImpl } } + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: LongTermRetentionPoliciesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a database's long term retention policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -269,26 +289,6 @@ export class LongTermRetentionPoliciesImpl return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: LongTermRetentionPoliciesListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -314,6 +314,27 @@ export class LongTermRetentionPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LongTermRetentionPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", @@ -324,14 +345,14 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.policyName + Parameters.subscriptionId, + Parameters.policyName1 ], headerParameters: [Parameters.accept], serializer @@ -355,41 +376,20 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters36, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters45, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.policyName + Parameters.subscriptionId, + Parameters.policyName1 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/backupLongTermRetentionPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LongTermRetentionPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -401,10 +401,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/maintenanceWindowOptionsOperations.ts b/sdk/sql/arm-sql/src/operations/maintenanceWindowOptionsOperations.ts index 49f87ea2e6a0..48421453c0a5 100644 --- a/sdk/sql/arm-sql/src/operations/maintenanceWindowOptionsOperations.ts +++ b/sdk/sql/arm-sql/src/operations/maintenanceWindowOptionsOperations.ts @@ -71,15 +71,15 @@ const getOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion2, + Parameters.apiVersion, Parameters.maintenanceWindowOptionsName ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/maintenanceWindowsOperations.ts b/sdk/sql/arm-sql/src/operations/maintenanceWindowsOperations.ts index e38d084a77b7..5ebd823b46a2 100644 --- a/sdk/sql/arm-sql/src/operations/maintenanceWindowsOperations.ts +++ b/sdk/sql/arm-sql/src/operations/maintenanceWindowsOperations.ts @@ -103,13 +103,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.maintenanceWindowName], + queryParameters: [Parameters.apiVersion, Parameters.maintenanceWindowName], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -119,14 +119,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current", httpMethod: "PUT", responses: { 200: {}, default: {} }, - requestBody: Parameters.parameters37, - queryParameters: [Parameters.apiVersion2, Parameters.maintenanceWindowName], + requestBody: Parameters.parameters46, + queryParameters: [Parameters.apiVersion, Parameters.maintenanceWindowName], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.contentType], mediaType: "json", diff --git a/sdk/sql/arm-sql/src/operations/managedBackupShortTermRetentionPolicies.ts b/sdk/sql/arm-sql/src/operations/managedBackupShortTermRetentionPolicies.ts index 8258d372ade9..7bf0569853fc 100644 --- a/sdk/sql/arm-sql/src/operations/managedBackupShortTermRetentionPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedBackupShortTermRetentionPolicies.ts @@ -138,6 +138,26 @@ export class ManagedBackupShortTermRetentionPoliciesImpl } } + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedBackupShortTermRetentionPoliciesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a managed database's short term retention policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -390,26 +410,6 @@ export class ManagedBackupShortTermRetentionPoliciesImpl return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - managedInstanceName: string, - databaseName: string, - options?: ManagedBackupShortTermRetentionPoliciesListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -443,6 +443,27 @@ export class ManagedBackupShortTermRetentionPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies/{policyName}", @@ -453,14 +474,14 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName1 + Parameters.policyName2 ], headerParameters: [Parameters.accept], serializer @@ -484,15 +505,15 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters47, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName1 + Parameters.policyName2 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -517,41 +538,20 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters47, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName1 + Parameters.policyName2 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupShortTermRetentionPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.databaseName, - Parameters.managedInstanceName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -563,9 +563,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..1af03bcf9773 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseAdvancedThreatProtectionSettings.ts @@ -0,0 +1,342 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedDatabaseAdvancedThreatProtectionSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + ManagedDatabaseAdvancedThreatProtection, + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams, + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams, + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse, + AdvancedThreatProtectionName, + ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams, + ManagedDatabaseAdvancedThreatProtectionSettingsGetResponse, + ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse, + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse +} from "../models"; + +/// +/** Class containing ManagedDatabaseAdvancedThreatProtectionSettings operations. */ +export class ManagedDatabaseAdvancedThreatProtectionSettingsImpl + implements ManagedDatabaseAdvancedThreatProtectionSettings { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ManagedDatabaseAdvancedThreatProtectionSettings class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of managed database's Advanced Threat Protection states. + * @param resourceGroupName The 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 options parameters. + */ + public listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + managedInstanceName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + managedInstanceName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + managedInstanceName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + managedInstanceName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + managedInstanceName, + databaseName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of managed database's Advanced Threat Protection states. + * @param resourceGroupName The 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): Promise< + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * Gets a managed database's Advanced Threat Protection state. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + advancedThreatProtectionName, + options + }, + getOperationSpec + ); + } + + /** + * Creates or updates a managed database's Advanced Threat Protection state. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The managed database Advanced Threat Protection state. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ManagedDatabaseAdvancedThreatProtection, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + advancedThreatProtectionName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * ListByDatabaseNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + nextLink: string, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextOptionalParams + ): Promise< + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + nextLink, + options + }, + listByDatabaseNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseAdvancedThreatProtectionListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseAdvancedThreatProtection + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseAdvancedThreatProtection + }, + 201: { + bodyMapper: Mappers.ManagedDatabaseAdvancedThreatProtection + }, + default: {} + }, + requestBody: Parameters.parameters48, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseAdvancedThreatProtectionListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseColumns.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseColumns.ts index 4b27bb35b09b..4954dc4647a7 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseColumns.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseColumns.ts @@ -407,7 +407,7 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion2, + Parameters.apiVersion, Parameters.schema, Parameters.table, Parameters.column, @@ -416,9 +416,9 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -434,12 +434,12 @@ const listByTableOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.managedInstanceName @@ -457,12 +457,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -482,9 +482,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], @@ -502,9 +502,9 @@ const listByTableNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.schemaName, Parameters.tableName, diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseMoveOperations.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseMoveOperations.ts new file mode 100644 index 000000000000..f397f4734878 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseMoveOperations.ts @@ -0,0 +1,249 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedDatabaseMoveOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + ManagedDatabaseMoveOperationResult, + ManagedDatabaseMoveOperationsListByLocationNextOptionalParams, + ManagedDatabaseMoveOperationsListByLocationOptionalParams, + ManagedDatabaseMoveOperationsListByLocationResponse, + ManagedDatabaseMoveOperationsGetOptionalParams, + ManagedDatabaseMoveOperationsGetResponse, + ManagedDatabaseMoveOperationsListByLocationNextResponse +} from "../models"; + +/// +/** Class containing ManagedDatabaseMoveOperations operations. */ +export class ManagedDatabaseMoveOperationsImpl + implements ManagedDatabaseMoveOperations { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ManagedDatabaseMoveOperations class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Lists managed database move operations. + * @param resourceGroupName The 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 + * @param options The options parameters. + */ + public listByLocation( + resourceGroupName: string, + locationName: string, + options?: ManagedDatabaseMoveOperationsListByLocationOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByLocationPagingAll( + resourceGroupName, + locationName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByLocationPagingPage( + resourceGroupName, + locationName, + options, + settings + ); + } + }; + } + + private async *listByLocationPagingPage( + resourceGroupName: string, + locationName: string, + options?: ManagedDatabaseMoveOperationsListByLocationOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedDatabaseMoveOperationsListByLocationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByLocation( + resourceGroupName, + locationName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByLocationNext( + resourceGroupName, + locationName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByLocationPagingAll( + resourceGroupName: string, + locationName: string, + options?: ManagedDatabaseMoveOperationsListByLocationOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByLocationPagingPage( + resourceGroupName, + locationName, + options + )) { + yield* page; + } + } + + /** + * Lists managed database move operations. + * @param resourceGroupName The 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 + * @param options The options parameters. + */ + private _listByLocation( + resourceGroupName: string, + locationName: string, + options?: ManagedDatabaseMoveOperationsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, options }, + listByLocationOperationSpec + ); + } + + /** + * Gets a managed database move operation. + * @param resourceGroupName The 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 + * @param operationId + * @param options The options parameters. + */ + get( + resourceGroupName: string, + locationName: string, + operationId: string, + options?: ManagedDatabaseMoveOperationsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, operationId, options }, + getOperationSpec + ); + } + + /** + * ListByLocationNext + * @param resourceGroupName The 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 + * @param nextLink The nextLink from the previous successful call to the ListByLocation method. + * @param options The options parameters. + */ + private _listByLocationNext( + resourceGroupName: string, + locationName: string, + nextLink: string, + options?: ManagedDatabaseMoveOperationsListByLocationNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, nextLink, options }, + listByLocationNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseMoveOperationResults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseMoveOperationListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.onlyLatestPerDatabase + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/managedDatabaseMoveOperationResults/{operationId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseMoveOperationResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.operationId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByLocationNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedDatabaseMoveOperationListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseQueries.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseQueries.ts index d5d20edb5b56..01b5e3b7e828 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseQueries.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseQueries.ts @@ -239,12 +239,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.queryId ], @@ -262,16 +262,16 @@ const listByQueryOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion2, + Parameters.apiVersion, Parameters.startTime, Parameters.endTime, Parameters.interval ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.queryId ], @@ -289,9 +289,9 @@ const listByQueryNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName, Parameters.queryId diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseRecommendedSensitivityLabels.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseRecommendedSensitivityLabels.ts index 41532e447838..48a997b1c468 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseRecommendedSensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseRecommendedSensitivityLabels.ts @@ -65,13 +65,13 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels", httpMethod: "PATCH", responses: { 200: {}, default: {} }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters52, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.contentType], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseRestoreDetails.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseRestoreDetails.ts index 79ed9526a189..374ee8c43a2a 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseRestoreDetails.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseRestoreDetails.ts @@ -71,12 +71,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.restoreDetailsName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseSchemas.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseSchemas.ts index ae3536d5e2dd..5f5daa940d6a 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseSchemas.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseSchemas.ts @@ -219,12 +219,12 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -240,12 +240,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.managedInstanceName ], @@ -263,9 +263,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts index b91d9a6cd10b..c9cb0a02dd24 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityAlertPolicies.ts @@ -135,6 +135,27 @@ export class ManagedDatabaseSecurityAlertPoliciesImpl } } + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSecurityAlertPoliciesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a managed database's security alert policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -194,27 +215,6 @@ export class ManagedDatabaseSecurityAlertPoliciesImpl ); } - /** - * 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - managedInstanceName: string, - databaseName: string, - options?: ManagedDatabaseSecurityAlertPoliciesListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -247,74 +247,74 @@ export class ManagedDatabaseSecurityAlertPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicyListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, - Parameters.securityAlertPolicyName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy }, - 201: { - bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy - }, default: {} }, - requestBody: Parameters.parameters42, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.securityAlertPolicyName, Parameters.managedInstanceName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/securityAlertPolicies/{securityAlertPolicyName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicyListResult + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy + }, + 201: { + bodyMapper: Mappers.ManagedDatabaseSecurityAlertPolicy }, default: {} }, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters49, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, + Parameters.securityAlertPolicyName, Parameters.managedInstanceName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -328,9 +328,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityEvents.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityEvents.ts index 3d09bd90b0f8..a3a24dbb483e 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityEvents.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseSecurityEvents.ts @@ -191,17 +191,17 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.skip, - Parameters.apiVersion2, + Parameters.apiVersion, Parameters.skiptoken, - Parameters.filter1, + Parameters.filter, + Parameters.skip, Parameters.top ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -218,9 +218,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts index 40b816a3e7d4..5c38dd66888d 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseSensitivityLabels.ts @@ -21,6 +21,11 @@ import { ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextOptionalParams, ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams, ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseResponse, + ManagedDatabaseSensitivityLabelsListByDatabaseNextOptionalParams, + ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams, + ManagedDatabaseSensitivityLabelsListByDatabaseResponse, + SensitivityLabelUpdateList, + ManagedDatabaseSensitivityLabelsUpdateOptionalParams, SensitivityLabelSource, ManagedDatabaseSensitivityLabelsGetOptionalParams, ManagedDatabaseSensitivityLabelsGetResponse, @@ -29,10 +34,9 @@ import { ManagedDatabaseSensitivityLabelsDeleteOptionalParams, ManagedDatabaseSensitivityLabelsDisableRecommendationOptionalParams, ManagedDatabaseSensitivityLabelsEnableRecommendationOptionalParams, - SensitivityLabelUpdateList, - ManagedDatabaseSensitivityLabelsUpdateOptionalParams, ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextResponse, - ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextResponse + ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextResponse, + ManagedDatabaseSensitivityLabelsListByDatabaseNextResponse } from "../models"; /// @@ -237,6 +241,170 @@ export class ManagedDatabaseSensitivityLabelsImpl } } + /** + * 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 options parameters. + */ + public listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + managedInstanceName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + managedInstanceName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedDatabaseSensitivityLabelsListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + managedInstanceName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + managedInstanceName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + managedInstanceName, + databaseName, + options + )) { + yield* page; + } + } + + /** + * 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 options parameters. + */ + private _listCurrentByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listCurrentByDatabaseOperationSpec + ); + } + + /** + * Update sensitivity labels of a given database using an operations batch. + * @param resourceGroupName The 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 A list of sensitivity label update operations. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: SensitivityLabelUpdateList, + options?: ManagedDatabaseSensitivityLabelsUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + updateOperationSpec + ); + } + + /** + * 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 options parameters. + */ + private _listRecommendedByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams + ): Promise< + ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listRecommendedByDatabaseOperationSpec + ); + } + /** * Gets the sensitivity label of a given column * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -422,85 +590,66 @@ export class ManagedDatabaseSensitivityLabelsImpl * @param databaseName The name of the database. * @param options The options parameters. */ - private _listCurrentByDatabase( + private _listByDatabase( resourceGroupName: string, managedInstanceName: string, databaseName: string, - options?: ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams - ): Promise { + options?: ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, managedInstanceName, databaseName, options }, - listCurrentByDatabaseOperationSpec + listByDatabaseOperationSpec ); } /** - * Update sensitivity labels of a given database using an operations batch. + * ListCurrentByDatabaseNext * @param resourceGroupName The 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 A list of sensitivity label update operations. + * @param nextLink The nextLink from the previous successful call to the ListCurrentByDatabase method. * @param options The options parameters. */ - update( + private _listCurrentByDatabaseNext( resourceGroupName: string, managedInstanceName: string, databaseName: string, - parameters: SensitivityLabelUpdateList, - options?: ManagedDatabaseSensitivityLabelsUpdateOptionalParams - ): Promise { + nextLink: string, + options?: ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextOptionalParams + ): Promise< + ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextResponse + > { return this.client.sendOperationRequest( { resourceGroupName, managedInstanceName, databaseName, - parameters, + nextLink, options }, - updateOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listRecommendedByDatabase( - resourceGroupName: string, - managedInstanceName: string, - databaseName: string, - options?: ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams - ): Promise< - ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseResponse - > { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, databaseName, options }, - listRecommendedByDatabaseOperationSpec + listCurrentByDatabaseNextOperationSpec ); } /** - * ListCurrentByDatabaseNext + * ListRecommendedByDatabaseNext * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListCurrentByDatabase method. + * @param nextLink The nextLink from the previous successful call to the ListRecommendedByDatabase + * method. * @param options The options parameters. */ - private _listCurrentByDatabaseNext( + private _listRecommendedByDatabaseNext( resourceGroupName: string, managedInstanceName: string, databaseName: string, nextLink: string, - options?: ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextOptionalParams + options?: ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextOptionalParams ): Promise< - ManagedDatabaseSensitivityLabelsListCurrentByDatabaseNextResponse + ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextResponse > { return this.client.sendOperationRequest( { @@ -510,29 +659,26 @@ export class ManagedDatabaseSensitivityLabelsImpl nextLink, options }, - listCurrentByDatabaseNextOperationSpec + listRecommendedByDatabaseNextOperationSpec ); } /** - * ListRecommendedByDatabaseNext + * ListByDatabaseNext * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListRecommendedByDatabase - * method. + * @param nextLink The nextLink from the previous successful call to the ListByDatabase method. * @param options The options parameters. */ - private _listRecommendedByDatabaseNext( + private _listByDatabaseNext( resourceGroupName: string, managedInstanceName: string, databaseName: string, nextLink: string, - options?: ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextOptionalParams - ): Promise< - ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseNextResponse - > { + options?: ManagedDatabaseSensitivityLabelsListByDatabaseNextOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -541,13 +687,83 @@ export class ManagedDatabaseSensitivityLabelsImpl nextLink, options }, - listRecommendedByDatabaseNextOperationSpec + listByDatabaseNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listCurrentByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.skipToken, + Parameters.count + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels", + httpMethod: "PATCH", + responses: { 200: {}, default: {} }, + requestBody: Parameters.parameters50, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const listRecommendedByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.filter, + Parameters.skipToken, + Parameters.includeDisabledRecommendations + ], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", @@ -558,12 +774,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -586,13 +802,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters43, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters51, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -608,12 +824,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -627,12 +843,12 @@ const disableRecommendationOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", httpMethod: "POST", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -646,12 +862,12 @@ const enableRecommendationOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", httpMethod: "POST", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -660,9 +876,9 @@ const enableRecommendationOperationSpec: coreClient.OperationSpec = { ], serializer }; -const listCurrentByDatabaseOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/sensitivityLabels", httpMethod: "GET", responses: { 200: { @@ -670,43 +886,19 @@ const listCurrentByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [ - Parameters.skipToken, - Parameters.apiVersion2, - Parameters.filter1, - Parameters.count - ], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, - Parameters.managedInstanceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels", - httpMethod: "PATCH", - responses: { 200: {}, default: {} }, - requestBody: Parameters.parameters44, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.databaseName, Parameters.managedInstanceName ], - headerParameters: [Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listRecommendedByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels", +const listCurrentByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", httpMethod: "GET", responses: { 200: { @@ -714,23 +906,18 @@ const listRecommendedByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [ - Parameters.skipToken, - Parameters.apiVersion2, - Parameters.filter1, - Parameters.includeDisabledRecommendations - ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const listCurrentByDatabaseNextOperationSpec: coreClient.OperationSpec = { +const listRecommendedByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -741,16 +928,16 @@ const listCurrentByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const listRecommendedByDatabaseNextOperationSpec: coreClient.OperationSpec = { +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -761,9 +948,9 @@ const listRecommendedByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseTables.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseTables.ts index a3ac3c08dcd4..bc8614c36c86 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseTables.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseTables.ts @@ -242,12 +242,12 @@ const listBySchemaOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.managedInstanceName ], @@ -264,12 +264,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.managedInstanceName @@ -288,9 +288,9 @@ const listBySchemaNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.schemaName, Parameters.managedInstanceName diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseTransparentDataEncryption.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseTransparentDataEncryption.ts index 9a1aadee22a4..888006d792f4 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseTransparentDataEncryption.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseTransparentDataEncryption.ts @@ -135,6 +135,27 @@ export class ManagedDatabaseTransparentDataEncryptionImpl } } + /** + * Gets a list of managed database's transparent data encryptions. + * @param resourceGroupName The 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 transparent data encryption is + * defined. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseTransparentDataEncryptionListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a managed database's transparent data encryption. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -195,27 +216,6 @@ export class ManagedDatabaseTransparentDataEncryptionImpl ); } - /** - * Gets a list of managed database's transparent data encryptions. - * @param resourceGroupName The 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 transparent data encryption is - * defined. - * @param options The options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - managedInstanceName: string, - databaseName: string, - options?: ManagedDatabaseTransparentDataEncryptionListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -250,74 +250,74 @@ export class ManagedDatabaseTransparentDataEncryptionImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManagedTransparentDataEncryption + bodyMapper: Mappers.ManagedTransparentDataEncryptionListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, - Parameters.managedInstanceName, - Parameters.tdeName + Parameters.subscriptionId, + Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.ManagedTransparentDataEncryption }, - 201: { - bodyMapper: Mappers.ManagedTransparentDataEncryption - }, default: {} }, - requestBody: Parameters.parameters46, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.tdeName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/transparentDataEncryption/{tdeName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ManagedTransparentDataEncryptionListResult + bodyMapper: Mappers.ManagedTransparentDataEncryption + }, + 201: { + bodyMapper: Mappers.ManagedTransparentDataEncryption }, default: {} }, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters53, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, - Parameters.managedInstanceName + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.tdeName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -331,9 +331,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts index f31d4f57d402..96b9dbfed52c 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentRuleBaselines.ts @@ -161,15 +161,15 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.ruleId, - Parameters.baselineName, + Parameters.baselineName1, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -185,16 +185,16 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters20, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters15, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.ruleId, - Parameters.baselineName, + Parameters.baselineName1, Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -206,15 +206,15 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.ruleId, - Parameters.baselineName, + Parameters.baselineName1, Parameters.managedInstanceName ], serializer diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentScans.ts index c1d4fba12835..7e7c6f23b6a5 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentScans.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessmentScans.ts @@ -21,11 +21,11 @@ import { ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextOptionalParams, ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams, ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseResponse, - ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams, - ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams, - ManagedDatabaseVulnerabilityAssessmentScansExportResponse, ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams, ManagedDatabaseVulnerabilityAssessmentScansGetResponse, + ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams, + ManagedDatabaseVulnerabilityAssessmentScansExportResponse, + ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams, ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseNextResponse } from "../models"; @@ -147,84 +147,37 @@ export class ManagedDatabaseVulnerabilityAssessmentScansImpl } /** - * Executes a Vulnerability Assessment database scan. + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - async beginInitiateScan( + private _listByDatabase( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, - scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, + options?: ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams + ): Promise< + ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseResponse + > { + return this.client.sendOperationRequest( { resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, - scanId, options }, - initiateScanOperationSpec + listByDatabaseOperationSpec ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - await poller.poll(); - return poller; } /** - * Executes a Vulnerability Assessment database scan. + * 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. @@ -233,23 +186,25 @@ export class ManagedDatabaseVulnerabilityAssessmentScansImpl * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - async beginInitiateScanAndWait( + get( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams - ): Promise { - const poller = await this.beginInitiateScan( - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - options + options?: ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options + }, + getOperationSpec ); - return poller.pollUntilDone(); } /** @@ -284,37 +239,84 @@ export class ManagedDatabaseVulnerabilityAssessmentScansImpl } /** - * Lists the vulnerability assessment scans of a database. + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - private _listByDatabase( + async beginInitiateScan( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, - options?: ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams - ): Promise< - ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseResponse - > { - return this.client.sendOperationRequest( + scanId: string, + options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, + scanId, options }, - listByDatabaseOperationSpec + initiateScanOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; } /** - * Gets a vulnerability assessment scan record of a database. + * 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. @@ -323,25 +325,23 @@ export class ManagedDatabaseVulnerabilityAssessmentScansImpl * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - get( + async beginInitiateScanAndWait( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - managedInstanceName, - databaseName, - vulnerabilityAssessmentName, - scanId, - options - }, - getOperationSpec + options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + ): Promise { + const poller = await this.beginInitiateScan( + resourceGroupName, + managedInstanceName, + databaseName, + vulnerabilityAssessmentName, + scanId, + options ); + return poller.pollUntilDone(); } /** @@ -380,42 +380,44 @@ export class ManagedDatabaseVulnerabilityAssessmentScansImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const initiateScanOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VulnerabilityAssessmentScanRecordListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, - Parameters.scanId, Parameters.managedInstanceName ], + headerParameters: [Parameters.accept], serializer }; -const exportOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export", - httpMethod: "POST", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", + httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport - }, - 201: { - bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport + bodyMapper: Mappers.VulnerabilityAssessmentScanRecord }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.scanId, Parameters.managedInstanceName @@ -423,49 +425,47 @@ const exportOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const exportOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.VulnerabilityAssessmentScanRecordListResult + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport + }, + 201: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentScansExport }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, + Parameters.scanId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const initiateScanOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VulnerabilityAssessmentScanRecord - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.scanId, Parameters.managedInstanceName ], - headerParameters: [Parameters.accept], serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -479,9 +479,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName diff --git a/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessments.ts b/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessments.ts index f9afdd63d2cb..c1533bc20698 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessments.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabaseVulnerabilityAssessments.ts @@ -135,6 +135,26 @@ export class ManagedDatabaseVulnerabilityAssessmentsImpl } } + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets the database's vulnerability assessment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -222,26 +242,6 @@ export class ManagedDatabaseVulnerabilityAssessmentsImpl ); } - /** - * 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - managedInstanceName: string, - databaseName: string, - options?: ManagedDatabaseVulnerabilityAssessmentsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -275,6 +275,27 @@ export class ManagedDatabaseVulnerabilityAssessmentsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", @@ -285,12 +306,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName ], @@ -310,13 +331,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters21, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters16, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName ], @@ -329,36 +350,15 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, - Parameters.vulnerabilityAssessmentName, - Parameters.managedInstanceName - ], - serializer -}; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DatabaseVulnerabilityAssessmentListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.databaseName, + Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName ], - headerParameters: [Parameters.accept], serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -372,9 +372,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedDatabases.ts b/sdk/sql/arm-sql/src/operations/managedDatabases.ts index 31a4860bd55f..536857e74264 100644 --- a/sdk/sql/arm-sql/src/operations/managedDatabases.ts +++ b/sdk/sql/arm-sql/src/operations/managedDatabases.ts @@ -31,8 +31,13 @@ import { ManagedDatabaseUpdate, ManagedDatabasesUpdateOptionalParams, ManagedDatabasesUpdateResponse, + ManagedDatabaseMoveDefinition, + ManagedDatabasesCancelMoveOptionalParams, + ManagedDatabasesCompleteMoveOptionalParams, CompleteDatabaseRestoreDefinition, ManagedDatabasesCompleteRestoreOptionalParams, + ManagedDatabaseStartMoveDefinition, + ManagedDatabasesStartMoveOptionalParams, ManagedDatabasesListByInstanceNextResponse, ManagedDatabasesListInaccessibleByInstanceNextResponse } from "../models"; @@ -557,6 +562,206 @@ export class ManagedDatabasesImpl implements ManagedDatabases { return poller.pollUntilDone(); } + /** + * Cancels a managed database move operation. + * @param resourceGroupName The 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 Parameters of the cancel managed database move operation. + * @param options The options parameters. + */ + async beginCancelMove( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCancelMoveOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + cancelMoveOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Cancels a managed database move operation. + * @param resourceGroupName The 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 Parameters of the cancel managed database move operation. + * @param options The options parameters. + */ + async beginCancelMoveAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCancelMoveOptionalParams + ): Promise { + const poller = await this.beginCancelMove( + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Completes a managed database move operation. + * @param resourceGroupName The 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 Parameters of the complete managed database move operation. + * @param options The options parameters. + */ + async beginCompleteMove( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCompleteMoveOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + completeMoveOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Completes a managed database move operation. + * @param resourceGroupName The 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 Parameters of the complete managed database move operation. + * @param options The options parameters. + */ + async beginCompleteMoveAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCompleteMoveOptionalParams + ): Promise { + const poller = await this.beginCompleteMove( + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** * Completes the restore operation on a managed database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -657,6 +862,106 @@ export class ManagedDatabasesImpl implements ManagedDatabases { return poller.pollUntilDone(); } + /** + * Starts a managed database move operation. + * @param resourceGroupName The 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 Parameters of the start managed database move operation. + * @param options The options parameters. + */ + async beginStartMove( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseStartMoveDefinition, + options?: ManagedDatabasesStartMoveOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + }, + startMoveOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Starts a managed database move operation. + * @param resourceGroupName The 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 Parameters of the start managed database move operation. + * @param options The options parameters. + */ + async beginStartMoveAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseStartMoveDefinition, + options?: ManagedDatabasesStartMoveOptionalParams + ): Promise { + const poller = await this.beginStartMove( + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + ); + return poller.pollUntilDone(); + } + /** * Gets a list of inaccessible managed databases in a managed instance * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -729,11 +1034,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -749,12 +1054,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -779,13 +1084,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters39, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters54, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -797,12 +1102,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], serializer @@ -826,31 +1131,85 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters40, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters55, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; +const cancelMoveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/cancelMove", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.parameters56, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const completeMoveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeMove", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.parameters56, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; const completeRestoreOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/completeRestore", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - requestBody: Parameters.parameters41, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters57, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.contentType], + mediaType: "json", + serializer +}; +const startMoveOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/startMove", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + requestBody: Parameters.parameters58, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.contentType], @@ -867,11 +1226,11 @@ const listInaccessibleByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -888,8 +1247,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], @@ -907,8 +1266,8 @@ const listInaccessibleByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceAdministrators.ts b/sdk/sql/arm-sql/src/operations/managedInstanceAdministrators.ts index 01fc3c1acd4e..5936220a3d33 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceAdministrators.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceAdministrators.ts @@ -393,11 +393,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -413,11 +413,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.administratorName ], @@ -443,12 +443,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters47, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters59, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.administratorName ], @@ -461,11 +461,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/administrators/{administratorName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.administratorName ], @@ -482,8 +482,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operations/managedInstanceAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..3997fd909407 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/managedInstanceAdvancedThreatProtectionSettings.ts @@ -0,0 +1,400 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedInstanceAdvancedThreatProtectionSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ManagedInstanceAdvancedThreatProtection, + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextOptionalParams, + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams, + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceResponse, + AdvancedThreatProtectionName, + ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams, + ManagedInstanceAdvancedThreatProtectionSettingsGetResponse, + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse, + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextResponse +} from "../models"; + +/// +/** Class containing ManagedInstanceAdvancedThreatProtectionSettings operations. */ +export class ManagedInstanceAdvancedThreatProtectionSettingsImpl + implements ManagedInstanceAdvancedThreatProtectionSettings { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ManagedInstanceAdvancedThreatProtectionSettings class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Get the managed instance's Advanced Threat Protection settings. + * @param resourceGroupName The 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 options parameters. + */ + public listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Get the managed instance's Advanced Threat Protection settings. + * @param resourceGroupName The 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams + ): Promise< + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + + /** + * Get a managed instance's Advanced Threat Protection state. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + advancedThreatProtectionName, + options + }, + getOperationSpec + ); + } + + /** + * Creates or updates Advanced Threat Protection settings. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The managed instance Advanced Threat Protection state. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ManagedInstanceAdvancedThreatProtection, + options?: ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + >, + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + advancedThreatProtectionName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates Advanced Threat Protection settings. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The managed instance Advanced Threat Protection state. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ManagedInstanceAdvancedThreatProtection, + options?: ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + > { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + advancedThreatProtectionName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByInstance method. + * @param options The options parameters. + */ + private _listByInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextOptionalParams + ): Promise< + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtectionListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtection + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtection + }, + 201: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtection + }, + 202: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtection + }, + 204: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtection + }, + default: {} + }, + requestBody: Parameters.parameters60, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceAdvancedThreatProtectionListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceAzureADOnlyAuthentications.ts b/sdk/sql/arm-sql/src/operations/managedInstanceAzureADOnlyAuthentications.ts index b7da19a811d5..530fceaf3b36 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceAzureADOnlyAuthentications.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceAzureADOnlyAuthentications.ts @@ -128,6 +128,24 @@ export class ManagedInstanceAzureADOnlyAuthenticationsImpl } } + /** + * Gets a list of server Azure Active Directory only authentications. + * @param resourceGroupName The 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceAzureADOnlyAuthenticationsListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + /** * Gets a specific Azure Active Directory only authentication property. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -348,24 +366,6 @@ export class ManagedInstanceAzureADOnlyAuthenticationsImpl return poller.pollUntilDone(); } - /** - * Gets a list of server Azure Active Directory only authentications. - * @param resourceGroupName The 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 options parameters. - */ - private _listByInstance( - resourceGroupName: string, - managedInstanceName: string, - options?: ManagedInstanceAzureADOnlyAuthenticationsListByInstanceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, options }, - listByInstanceOperationSpec - ); - } - /** * ListByInstanceNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -391,6 +391,26 @@ export class ManagedInstanceAzureADOnlyAuthenticationsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceAzureADOnlyAuthListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}", @@ -401,11 +421,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.authenticationName ], @@ -431,12 +451,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters48, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters61, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.authenticationName ], @@ -449,36 +469,16 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications/{authenticationName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.authenticationName ], serializer }; -const listByInstanceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/azureADOnlyAuthentications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedInstanceAzureADOnlyAuthListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.managedInstanceName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByInstanceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -490,8 +490,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceDtcs.ts b/sdk/sql/arm-sql/src/operations/managedInstanceDtcs.ts new file mode 100644 index 000000000000..ed539ea52995 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/managedInstanceDtcs.ts @@ -0,0 +1,380 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedInstanceDtcs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ManagedInstanceDtc, + ManagedInstanceDtcsListByManagedInstanceNextOptionalParams, + ManagedInstanceDtcsListByManagedInstanceOptionalParams, + ManagedInstanceDtcsListByManagedInstanceResponse, + DtcName, + ManagedInstanceDtcsGetOptionalParams, + ManagedInstanceDtcsGetResponse, + ManagedInstanceDtcsCreateOrUpdateOptionalParams, + ManagedInstanceDtcsCreateOrUpdateResponse, + ManagedInstanceDtcsListByManagedInstanceNextResponse +} from "../models"; + +/// +/** Class containing ManagedInstanceDtcs operations. */ +export class ManagedInstanceDtcsImpl implements ManagedInstanceDtcs { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ManagedInstanceDtcs class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of managed instance DTC settings. + * @param resourceGroupName The 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 options parameters. + */ + public listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceDtcsListByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByManagedInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByManagedInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByManagedInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceDtcsListByManagedInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedInstanceDtcsListByManagedInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByManagedInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByManagedInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByManagedInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceDtcsListByManagedInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByManagedInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of managed instance DTC settings. + * @param resourceGroupName The 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 options parameters. + */ + private _listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceDtcsListByManagedInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByManagedInstanceOperationSpec + ); + } + + /** + * Gets managed instance DTC settings. + * @param resourceGroupName The 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 dtcName The name of the managed instance DTC. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + dtcName: DtcName, + options?: ManagedInstanceDtcsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, dtcName, options }, + getOperationSpec + ); + } + + /** + * Updates managed instance DTC settings. + * @param resourceGroupName The 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 dtcName The name of the managed instance DTC. + * @param parameters Managed instance DTC settings. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + dtcName: DtcName, + parameters: ManagedInstanceDtc, + options?: ManagedInstanceDtcsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedInstanceDtcsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, managedInstanceName, dtcName, parameters, options }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates managed instance DTC settings. + * @param resourceGroupName The 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 dtcName The name of the managed instance DTC. + * @param parameters Managed instance DTC settings. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + dtcName: DtcName, + parameters: ManagedInstanceDtc, + options?: ManagedInstanceDtcsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + dtcName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByManagedInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByManagedInstance method. + * @param options The options parameters. + */ + private _listByManagedInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: ManagedInstanceDtcsListByManagedInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByManagedInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceDtcListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc/{dtcName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceDtc + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.dtcName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dtc/{dtcName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceDtc + }, + 201: { + bodyMapper: Mappers.ManagedInstanceDtc + }, + 202: { + bodyMapper: Mappers.ManagedInstanceDtc + }, + 204: { + bodyMapper: Mappers.ManagedInstanceDtc + }, + default: {} + }, + requestBody: Parameters.parameters62, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.dtcName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceDtcListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceEncryptionProtectors.ts b/sdk/sql/arm-sql/src/operations/managedInstanceEncryptionProtectors.ts index dd9f1a29897f..405680680d74 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceEncryptionProtectors.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceEncryptionProtectors.ts @@ -21,11 +21,11 @@ import { ManagedInstanceEncryptionProtectorsListByInstanceOptionalParams, ManagedInstanceEncryptionProtectorsListByInstanceResponse, EncryptionProtectorName, - ManagedInstanceEncryptionProtectorsRevalidateOptionalParams, ManagedInstanceEncryptionProtectorsGetOptionalParams, ManagedInstanceEncryptionProtectorsGetResponse, ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams, ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse, + ManagedInstanceEncryptionProtectorsRevalidateOptionalParams, ManagedInstanceEncryptionProtectorsListByInstanceNextResponse } from "../models"; @@ -129,23 +129,75 @@ export class ManagedInstanceEncryptionProtectorsImpl } /** - * Revalidates an existing encryption protector. + * 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceEncryptionProtectorsListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + + /** + * 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 encryptionProtectorName The name of the encryption protector to be retrieved. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: ManagedInstanceEncryptionProtectorsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + encryptionProtectorName, + options + }, + getOperationSpec + ); + } + + /** + * 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param parameters The requested encryption protector resource state. * @param options The options parameters. */ - async beginRevalidate( + async beginCreateOrUpdate( resourceGroupName: string, managedInstanceName: string, encryptionProtectorName: EncryptionProtectorName, - options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams - ): Promise, void>> { + parameters: ManagedInstanceEncryptionProtector, + options?: ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse + >, + ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -187,9 +239,10 @@ export class ManagedInstanceEncryptionProtectorsImpl resourceGroupName, managedInstanceName, encryptionProtectorName, + parameters, options }, - revalidateOperationSpec + createOrUpdateOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -200,98 +253,49 @@ export class ManagedInstanceEncryptionProtectorsImpl } /** - * Revalidates an existing encryption protector. + * 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param parameters The requested encryption protector resource state. * @param options The options parameters. */ - async beginRevalidateAndWait( + async beginCreateOrUpdateAndWait( resourceGroupName: string, managedInstanceName: string, encryptionProtectorName: EncryptionProtectorName, - options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams - ): Promise { - const poller = await this.beginRevalidate( + parameters: ManagedInstanceEncryptionProtector, + options?: ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, managedInstanceName, encryptionProtectorName, + parameters, options ); return poller.pollUntilDone(); } /** - * 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 options parameters. - */ - private _listByInstance( - resourceGroupName: string, - managedInstanceName: string, - options?: ManagedInstanceEncryptionProtectorsListByInstanceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, options }, - listByInstanceOperationSpec - ); - } - - /** - * 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 encryptionProtectorName The name of the encryption protector to be retrieved. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - managedInstanceName: string, - encryptionProtectorName: EncryptionProtectorName, - options?: ManagedInstanceEncryptionProtectorsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - managedInstanceName, - encryptionProtectorName, - options - }, - getOperationSpec - ); - } - - /** - * Updates an existing encryption protector. + * Revalidates an existing encryption protector. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. - * @param parameters The requested encryption protector resource state. * @param options The options parameters. */ - async beginCreateOrUpdate( + async beginRevalidate( resourceGroupName: string, managedInstanceName: string, encryptionProtectorName: EncryptionProtectorName, - parameters: ManagedInstanceEncryptionProtector, - options?: ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState< - ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse - >, - ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse - > - > { + options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -333,10 +337,9 @@ export class ManagedInstanceEncryptionProtectorsImpl resourceGroupName, managedInstanceName, encryptionProtectorName, - parameters, options }, - createOrUpdateOperationSpec + revalidateOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -347,26 +350,23 @@ export class ManagedInstanceEncryptionProtectorsImpl } /** - * Updates an existing encryption protector. + * Revalidates an existing encryption protector. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param managedInstanceName The name of the managed instance. * @param encryptionProtectorName The name of the encryption protector to be updated. - * @param parameters The requested encryption protector resource state. * @param options The options parameters. */ - async beginCreateOrUpdateAndWait( + async beginRevalidateAndWait( resourceGroupName: string, managedInstanceName: string, encryptionProtectorName: EncryptionProtectorName, - parameters: ManagedInstanceEncryptionProtector, - options?: ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( + options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams + ): Promise { + const poller = await this.beginRevalidate( resourceGroupName, managedInstanceName, encryptionProtectorName, - parameters, options ); return poller.pollUntilDone(); @@ -395,21 +395,6 @@ export class ManagedInstanceEncryptionProtectorsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const revalidateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.encryptionProtectorName, - Parameters.managedInstanceName - ], - serializer -}; const listByInstanceOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector", @@ -420,11 +405,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -440,11 +425,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.encryptionProtectorName, Parameters.managedInstanceName ], @@ -470,12 +455,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters49, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters63, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.encryptionProtectorName, Parameters.managedInstanceName ], @@ -483,6 +468,21 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; +const revalidateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/encryptionProtector/{encryptionProtectorName}/revalidate", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.encryptionProtectorName, + Parameters.managedInstanceName + ], + serializer +}; const listByInstanceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -494,8 +494,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceKeys.ts b/sdk/sql/arm-sql/src/operations/managedInstanceKeys.ts index e217acd78878..aac3229ca649 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceKeys.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceKeys.ts @@ -385,11 +385,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.filter1], + queryParameters: [Parameters.apiVersion, Parameters.filter], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -405,11 +405,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.keyName ], @@ -435,12 +435,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters50, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters64, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.keyName ], @@ -453,11 +453,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/keys/{keyName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.keyName ], @@ -474,8 +474,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceLongTermRetentionPolicies.ts b/sdk/sql/arm-sql/src/operations/managedInstanceLongTermRetentionPolicies.ts index 80a56e2d7dd3..454bcd4c5e1d 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceLongTermRetentionPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceLongTermRetentionPolicies.ts @@ -25,6 +25,8 @@ import { ManagedInstanceLongTermRetentionPoliciesGetResponse, ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalParams, ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateResponse, + ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams, + ManagedInstanceLongTermRetentionPoliciesDeleteResponse, ManagedInstanceLongTermRetentionPoliciesListByDatabaseNextResponse } from "../models"; @@ -136,6 +138,26 @@ export class ManagedInstanceLongTermRetentionPoliciesImpl } } + /** + * 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 managedInstanceName The name of the managed instance. + * @param databaseName The name of the database. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedInstanceLongTermRetentionPoliciesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a managed database's long term retention policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -278,23 +300,110 @@ export class ManagedInstanceLongTermRetentionPoliciesImpl } /** - * Gets a database's long term retention policy. + * Deletes a managed 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 databaseName The name of the database. + * @param policyName The policy name. Should always be Default. * @param options The options parameters. */ - private _listByDatabase( + async beginDelete( resourceGroupName: string, managedInstanceName: string, databaseName: string, - options?: ManagedInstanceLongTermRetentionPoliciesListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, databaseName, options }, - listByDatabaseOperationSpec + policyName: ManagedInstanceLongTermRetentionPolicyName, + options?: ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState< + ManagedInstanceLongTermRetentionPoliciesDeleteResponse + >, + ManagedInstanceLongTermRetentionPoliciesDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + databaseName, + policyName, + options + }, + deleteOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a managed 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 databaseName The name of the database. + * @param policyName The policy name. Should always be Default. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + policyName: ManagedInstanceLongTermRetentionPolicyName, + options?: ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + managedInstanceName, + databaseName, + policyName, + options + ); + return poller.pollUntilDone(); } /** @@ -330,6 +439,27 @@ export class ManagedInstanceLongTermRetentionPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceLongTermRetentionPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", @@ -340,14 +470,14 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName2 + Parameters.policyName3 ], headerParameters: [Parameters.accept], serializer @@ -371,37 +501,47 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters51, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters65, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName2 + Parameters.policyName3 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/backupLongTermRetentionPolicies/{policyName}", + httpMethod: "DELETE", responses: { 200: { - bodyMapper: Mappers.ManagedInstanceLongTermRetentionPolicyListResult + bodyMapper: Mappers.ManagedInstanceLongTermRetentionPolicy + }, + 201: { + bodyMapper: Mappers.ManagedInstanceLongTermRetentionPolicy + }, + 202: { + bodyMapper: Mappers.ManagedInstanceLongTermRetentionPolicy + }, + 204: { + bodyMapper: Mappers.ManagedInstanceLongTermRetentionPolicy }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, - Parameters.managedInstanceName + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.policyName3 ], headerParameters: [Parameters.accept], serializer @@ -417,9 +557,9 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceOperations.ts b/sdk/sql/arm-sql/src/operations/managedInstanceOperations.ts index 0d07576a97af..f49dea5da490 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceOperations.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceOperations.ts @@ -214,11 +214,11 @@ const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -234,11 +234,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.operationId, Parameters.managedInstanceName ], @@ -250,11 +250,11 @@ const cancelOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/operations/{operationId}/cancel", httpMethod: "POST", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.operationId, Parameters.managedInstanceName ], @@ -271,8 +271,8 @@ const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstancePrivateEndpointConnections.ts b/sdk/sql/arm-sql/src/operations/managedInstancePrivateEndpointConnections.ts index f18c172dd3d2..d09a0a603a08 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstancePrivateEndpointConnections.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstancePrivateEndpointConnections.ts @@ -127,6 +127,26 @@ export class ManagedInstancePrivateEndpointConnectionsImpl } } + /** + * Gets all private endpoint connections on 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 managedInstanceName The name of the managed instance. + * @param options The options parameters. + */ + private _listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancePrivateEndpointConnectionsListByManagedInstanceOptionalParams + ): Promise< + ManagedInstancePrivateEndpointConnectionsListByManagedInstanceResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByManagedInstanceOperationSpec + ); + } + /** * Gets a private endpoint connection. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -353,26 +373,6 @@ export class ManagedInstancePrivateEndpointConnectionsImpl return poller.pollUntilDone(); } - /** - * Gets all private endpoint connections on 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 managedInstanceName The name of the managed instance. - * @param options The options parameters. - */ - private _listByManagedInstance( - resourceGroupName: string, - managedInstanceName: string, - options?: ManagedInstancePrivateEndpointConnectionsListByManagedInstanceOptionalParams - ): Promise< - ManagedInstancePrivateEndpointConnectionsListByManagedInstanceResponse - > { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, options }, - listByManagedInstanceOperationSpec - ); - } - /** * ListByManagedInstanceNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -398,6 +398,26 @@ export class ManagedInstancePrivateEndpointConnectionsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstancePrivateEndpointConnectionListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}", @@ -408,11 +428,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.privateEndpointConnectionName ], @@ -438,12 +458,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters52, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters66, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.privateEndpointConnectionName ], @@ -456,36 +476,16 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.privateEndpointConnectionName ], serializer }; -const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedInstancePrivateEndpointConnectionListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.managedInstanceName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -497,8 +497,8 @@ const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstancePrivateLinkResources.ts b/sdk/sql/arm-sql/src/operations/managedInstancePrivateLinkResources.ts index 8a47584359d8..8cf4021e1a89 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstancePrivateLinkResources.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstancePrivateLinkResources.ts @@ -195,11 +195,11 @@ const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -215,11 +215,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.groupName ], @@ -237,8 +237,8 @@ const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceTdeCertificates.ts b/sdk/sql/arm-sql/src/operations/managedInstanceTdeCertificates.ts index 781f73a8f44f..320349de6e4a 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceTdeCertificates.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceTdeCertificates.ts @@ -128,12 +128,12 @@ const createOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/tdeCertificates", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - requestBody: Parameters.parameters53, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters67, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.contentType], diff --git a/sdk/sql/arm-sql/src/operations/managedInstanceVulnerabilityAssessments.ts b/sdk/sql/arm-sql/src/operations/managedInstanceVulnerabilityAssessments.ts index 8d7e4a9e448c..12e1dab65e6a 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstanceVulnerabilityAssessments.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstanceVulnerabilityAssessments.ts @@ -127,6 +127,25 @@ export class ManagedInstanceVulnerabilityAssessmentsImpl } } + /** + * 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceVulnerabilityAssessmentsListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + /** * Gets the managed instance's vulnerability assessment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -210,25 +229,6 @@ export class ManagedInstanceVulnerabilityAssessmentsImpl ); } - /** - * 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 options parameters. - */ - private _listByInstance( - resourceGroupName: string, - managedInstanceName: string, - options?: ManagedInstanceVulnerabilityAssessmentsListByInstanceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, options }, - listByInstanceOperationSpec - ); - } - /** * ListByInstanceNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -255,6 +255,26 @@ export class ManagedInstanceVulnerabilityAssessmentsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessmentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", @@ -265,11 +285,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName ], @@ -289,12 +309,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters54, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters68, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName ], @@ -307,34 +327,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.vulnerabilityAssessmentName, - Parameters.managedInstanceName - ], - serializer -}; -const listByInstanceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedInstanceVulnerabilityAssessmentListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, + Parameters.vulnerabilityAssessmentName, Parameters.managedInstanceName ], - headerParameters: [Parameters.accept], serializer }; const listByInstanceNextOperationSpec: coreClient.OperationSpec = { @@ -348,8 +348,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedInstances.ts b/sdk/sql/arm-sql/src/operations/managedInstances.ts index 5d7bddf25790..91678ad242e4 100644 --- a/sdk/sql/arm-sql/src/operations/managedInstances.ts +++ b/sdk/sql/arm-sql/src/operations/managedInstances.ts @@ -17,15 +17,19 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { ManagedInstance, - ManagedInstancesListByInstancePoolNextOptionalParams, - ManagedInstancesListByInstancePoolOptionalParams, - ManagedInstancesListByInstancePoolResponse, ManagedInstancesListNextOptionalParams, ManagedInstancesListOptionalParams, ManagedInstancesListResponse, + ManagedInstancesListByInstancePoolNextOptionalParams, + ManagedInstancesListByInstancePoolOptionalParams, + ManagedInstancesListByInstancePoolResponse, ManagedInstancesListByResourceGroupNextOptionalParams, ManagedInstancesListByResourceGroupOptionalParams, ManagedInstancesListByResourceGroupResponse, + OutboundEnvironmentEndpoint, + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextOptionalParams, + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams, + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceResponse, TopQueries, ManagedInstancesListByManagedInstanceNextOptionalParams, ManagedInstancesListByManagedInstanceOptionalParams, @@ -39,9 +43,12 @@ import { ManagedInstancesUpdateOptionalParams, ManagedInstancesUpdateResponse, ManagedInstancesFailoverOptionalParams, - ManagedInstancesListByInstancePoolNextResponse, + ManagedInstancesStartOptionalParams, + ManagedInstancesStopOptionalParams, ManagedInstancesListNextResponse, + ManagedInstancesListByInstancePoolNextResponse, ManagedInstancesListByResourceGroupNextResponse, + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextResponse, ManagedInstancesListByManagedInstanceNextResponse } from "../models"; @@ -58,6 +65,60 @@ export class ManagedInstancesImpl implements ManagedInstances { this.client = client; } + /** + * Gets a list of all managed instances in the subscription. + * @param options The options parameters. + */ + public list( + options?: ManagedInstancesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listPagingPage(options, settings); + } + }; + } + + private async *listPagingPage( + options?: ManagedInstancesListOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedInstancesListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext(continuationToken, options); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + options?: ManagedInstancesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + /** * Gets a list of all managed instances in an instance pool. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -144,13 +205,16 @@ export class ManagedInstancesImpl implements ManagedInstances { } /** - * Gets a list of all managed instances in the subscription. + * 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 options parameters. */ - public list( - options?: ManagedInstancesListOptionalParams + public listByResourceGroup( + resourceGroupName: string, + options?: ManagedInstancesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { next() { return iter.next(); @@ -162,26 +226,35 @@ export class ManagedInstancesImpl implements ManagedInstances { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage(options, settings); + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } - private async *listPagingPage( - options?: ManagedInstancesListOptionalParams, + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ManagedInstancesListByResourceGroupOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: ManagedInstancesListResponse; + let result: ManagedInstancesListByResourceGroupResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(options); + result = await this._listByResourceGroup(resourceGroupName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext(continuationToken, options); + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -189,25 +262,35 @@ export class ManagedInstancesImpl implements ManagedInstances { } } - private async *listPagingAll( - options?: ManagedInstancesListOptionalParams + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ManagedInstancesListByResourceGroupOptionalParams ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { yield* page; } } /** - * Gets a list of managed instances in a resource group. + * Gets the collection of outbound network dependencies for the given 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 options parameters. */ - public listByResourceGroup( + public listOutboundNetworkDependenciesByManagedInstance( resourceGroupName: string, - options?: ManagedInstancesListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + managedInstanceName: string, + options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listOutboundNetworkDependenciesByManagedInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); return { next() { return iter.next(); @@ -219,8 +302,9 @@ export class ManagedInstancesImpl implements ManagedInstances { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( + return this.listOutboundNetworkDependenciesByManagedInstancePagingPage( resourceGroupName, + managedInstanceName, options, settings ); @@ -228,23 +312,29 @@ export class ManagedInstancesImpl implements ManagedInstances { }; } - private async *listByResourceGroupPagingPage( + private async *listOutboundNetworkDependenciesByManagedInstancePagingPage( resourceGroupName: string, - options?: ManagedInstancesListByResourceGroupOptionalParams, + managedInstanceName: string, + options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: ManagedInstancesListByResourceGroupResponse; + ): AsyncIterableIterator { + let result: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); + result = await this._listOutboundNetworkDependenciesByManagedInstance( + resourceGroupName, + managedInstanceName, + options + ); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByResourceGroupNext( + result = await this._listOutboundNetworkDependenciesByManagedInstanceNext( resourceGroupName, + managedInstanceName, continuationToken, options ); @@ -255,12 +345,14 @@ export class ManagedInstancesImpl implements ManagedInstances { } } - private async *listByResourceGroupPagingAll( + private async *listOutboundNetworkDependenciesByManagedInstancePagingAll( resourceGroupName: string, - options?: ManagedInstancesListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( + managedInstanceName: string, + options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listOutboundNetworkDependenciesByManagedInstancePagingPage( resourceGroupName, + managedInstanceName, options )) { yield* page; @@ -352,6 +444,16 @@ export class ManagedInstancesImpl implements ManagedInstances { } } + /** + * Gets a list of all managed instances in the subscription. + * @param options The options parameters. + */ + private _list( + options?: ManagedInstancesListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** * Gets a list of all managed instances in an instance pool. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -370,16 +472,6 @@ export class ManagedInstancesImpl implements ManagedInstances { ); } - /** - * Gets a list of all managed instances in the subscription. - * @param options The options parameters. - */ - private _list( - options?: ManagedInstancesListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - /** * 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 @@ -687,21 +779,67 @@ export class ManagedInstancesImpl implements ManagedInstances { } /** - * Get top resource consuming queries of a managed instance. + * Failovers 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 managedInstanceName The name of the managed instance to failover. * @param options The options parameters. */ - private _listByManagedInstance( + async beginFailover( resourceGroupName: string, managedInstanceName: string, - options?: ManagedInstancesListByManagedInstanceOptionalParams - ): Promise { - return this.client.sendOperationRequest( + options?: ManagedInstancesFailoverOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, managedInstanceName, options }, - listByManagedInstanceOperationSpec + failoverOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; } /** @@ -711,10 +849,50 @@ export class ManagedInstancesImpl implements ManagedInstances { * @param managedInstanceName The name of the managed instance to failover. * @param options The options parameters. */ - async beginFailover( + async beginFailoverAndWait( resourceGroupName: string, managedInstanceName: string, options?: ManagedInstancesFailoverOptionalParams + ): Promise { + const poller = await this.beginFailover( + resourceGroupName, + managedInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the collection of outbound network dependencies for the given 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 options parameters. + */ + private _listOutboundNetworkDependenciesByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams + ): Promise< + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listOutboundNetworkDependenciesByManagedInstanceOperationSpec + ); + } + + /** + * Starts the 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 options parameters. + */ + async beginStart( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesStartOptionalParams ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -758,29 +936,30 @@ export class ManagedInstancesImpl implements ManagedInstances { const lro = new LroImpl( sendOperation, { resourceGroupName, managedInstanceName, options }, - failoverOperationSpec + startOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Failovers a managed instance. + * Starts the 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 to failover. + * @param managedInstanceName The name of the managed instance. * @param options The options parameters. */ - async beginFailoverAndWait( + async beginStartAndWait( resourceGroupName: string, managedInstanceName: string, - options?: ManagedInstancesFailoverOptionalParams + options?: ManagedInstancesStartOptionalParams ): Promise { - const poller = await this.beginFailover( + const poller = await this.beginStart( resourceGroupName, managedInstanceName, options @@ -789,22 +968,105 @@ export class ManagedInstancesImpl implements ManagedInstances { } /** - * ListByInstancePoolNext + * Stops the 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 instancePoolName The instance pool name. - * @param nextLink The nextLink from the previous successful call to the ListByInstancePool method. + * @param managedInstanceName The name of the managed instance. * @param options The options parameters. */ - private _listByInstancePoolNext( + async beginStop( resourceGroupName: string, - instancePoolName: string, - nextLink: string, - options?: ManagedInstancesListByInstancePoolNextOptionalParams - ): Promise { + managedInstanceName: string, + options?: ManagedInstancesStopOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, managedInstanceName, options }, + stopOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Stops the 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 options parameters. + */ + async beginStopAndWait( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesStopOptionalParams + ): Promise { + const poller = await this.beginStop( + resourceGroupName, + managedInstanceName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Get top resource consuming queries of 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 options parameters. + */ + private _listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesListByManagedInstanceOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, instancePoolName, nextLink, options }, - listByInstancePoolNextOperationSpec + { resourceGroupName, managedInstanceName, options }, + listByManagedInstanceOperationSpec ); } @@ -823,6 +1085,26 @@ export class ManagedInstancesImpl implements ManagedInstances { ); } + /** + * ListByInstancePoolNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param instancePoolName The instance pool name. + * @param nextLink The nextLink from the previous successful call to the ListByInstancePool method. + * @param options The options parameters. + */ + private _listByInstancePoolNext( + resourceGroupName: string, + instancePoolName: string, + nextLink: string, + options?: ManagedInstancesListByInstancePoolNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, instancePoolName, nextLink, options }, + listByInstancePoolNextOperationSpec + ); + } + /** * ListByResourceGroupNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -841,6 +1123,29 @@ export class ManagedInstancesImpl implements ManagedInstances { ); } + /** + * ListOutboundNetworkDependenciesByManagedInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the + * ListOutboundNetworkDependenciesByManagedInstance method. + * @param options The options parameters. + */ + private _listOutboundNetworkDependenciesByManagedInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextOptionalParams + ): Promise< + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceNextResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listOutboundNetworkDependenciesByManagedInstanceNextOperationSpec + ); + } + /** * ListByManagedInstanceNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -864,9 +1169,9 @@ export class ManagedInstancesImpl implements ManagedInstances { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listByInstancePoolOperationSpec: coreClient.OperationSpec = { +const listOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances", + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", httpMethod: "GET", responses: { 200: { @@ -874,19 +1179,14 @@ const listByInstancePoolOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1, Parameters.expand], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.instancePoolName - ], + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer }; -const listOperationSpec: coreClient.OperationSpec = { +const listByInstancePoolOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/managedInstances", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/managedInstances", httpMethod: "GET", responses: { 200: { @@ -894,8 +1194,13 @@ const listOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1, Parameters.expand], - urlParameters: [Parameters.$host, Parameters.subscriptionId], + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.instancePoolName + ], headerParameters: [Parameters.accept], serializer }; @@ -909,11 +1214,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1, Parameters.expand], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -928,11 +1233,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1, Parameters.expand], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -957,12 +1262,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters86, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters69, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -974,11 +1279,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], serializer @@ -1002,18 +1307,80 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters87, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters70, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; +const failoverOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion, Parameters.replicaType], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + serializer +}; +const listOutboundNetworkDependenciesByManagedInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/outboundNetworkDependenciesEndpoints", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const startOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/start", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + serializer +}; +const stopOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/stop", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + serializer +}; const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/topqueries", @@ -1025,7 +1392,7 @@ const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ - Parameters.apiVersion1, + Parameters.apiVersion, Parameters.startTime, Parameters.endTime, Parameters.interval, @@ -1036,25 +1403,28 @@ const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer }; -const failoverOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/failover", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion1, Parameters.replicaType], +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedInstanceListResult + }, + default: {} + }, urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.managedInstanceName + Parameters.nextLink ], + headerParameters: [Parameters.accept], serializer }; const listByInstancePoolNextOperationSpec: coreClient.OperationSpec = { @@ -1068,15 +1438,15 @@ const listByInstancePoolNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.instancePoolName ], headerParameters: [Parameters.accept], serializer }; -const listNextOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -1087,26 +1457,28 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listOutboundNetworkDependenciesByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ManagedInstanceListResult + bodyMapper: Mappers.OutboundEnvironmentEndpointCollection }, default: {} }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.nextLink + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName ], headerParameters: [Parameters.accept], serializer @@ -1122,8 +1494,8 @@ const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/managedLedgerDigestUploadsOperations.ts b/sdk/sql/arm-sql/src/operations/managedLedgerDigestUploadsOperations.ts new file mode 100644 index 000000000000..72038e21293f --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/managedLedgerDigestUploadsOperations.ts @@ -0,0 +1,564 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedLedgerDigestUploadsOperations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ManagedLedgerDigestUploads, + ManagedLedgerDigestUploadsListByDatabaseNextOptionalParams, + ManagedLedgerDigestUploadsListByDatabaseOptionalParams, + ManagedLedgerDigestUploadsListByDatabaseResponse, + ManagedLedgerDigestUploadsName, + ManagedLedgerDigestUploadsGetOptionalParams, + ManagedLedgerDigestUploadsGetResponse, + ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams, + ManagedLedgerDigestUploadsCreateOrUpdateResponse, + ManagedLedgerDigestUploadsDisableOptionalParams, + ManagedLedgerDigestUploadsDisableResponse, + ManagedLedgerDigestUploadsListByDatabaseNextResponse +} from "../models"; + +/// +/** Class containing ManagedLedgerDigestUploadsOperations operations. */ +export class ManagedLedgerDigestUploadsOperationsImpl + implements ManagedLedgerDigestUploadsOperations { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ManagedLedgerDigestUploadsOperations class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets all ledger digest upload settings on 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 options parameters. + */ + public listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedLedgerDigestUploadsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + managedInstanceName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + managedInstanceName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedLedgerDigestUploadsListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedLedgerDigestUploadsListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + managedInstanceName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + managedInstanceName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedLedgerDigestUploadsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + managedInstanceName, + databaseName, + options + )) { + yield* page; + } + } + + /** + * Gets all ledger digest upload settings on 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedLedgerDigestUploadsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * Gets the current ledger digest upload configuration for 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 ledgerDigestUploads + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + options?: ManagedLedgerDigestUploadsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + ledgerDigestUploads, + options + }, + getOperationSpec + ); + } + + /** + * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger 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 databaseName The name of the database. + * @param ledgerDigestUploads The name of the Ledger Digest Upload Configurations. + * @param parameters The Ledger Digest Storage Endpoint. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + parameters: ManagedLedgerDigestUploads, + options?: ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedLedgerDigestUploadsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + databaseName, + ledgerDigestUploads, + parameters, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger 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 databaseName The name of the database. + * @param ledgerDigestUploads The name of the Ledger Digest Upload Configurations. + * @param parameters The Ledger Digest Storage Endpoint. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + parameters: ManagedLedgerDigestUploads, + options?: ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + databaseName, + ledgerDigestUploads, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger + * 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 databaseName The name of the database. + * @param ledgerDigestUploads + * @param options The options parameters. + */ + async beginDisable( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + options?: ManagedLedgerDigestUploadsDisableOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedLedgerDigestUploadsDisableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + databaseName, + ledgerDigestUploads, + options + }, + disableOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger + * 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 databaseName The name of the database. + * @param ledgerDigestUploads + * @param options The options parameters. + */ + async beginDisableAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + options?: ManagedLedgerDigestUploadsDisableOptionalParams + ): Promise { + const poller = await this.beginDisable( + resourceGroupName, + managedInstanceName, + databaseName, + ledgerDigestUploads, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByDatabaseNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + nextLink: string, + options?: ManagedLedgerDigestUploadsListByDatabaseNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + databaseName, + nextLink, + options + }, + listByDatabaseNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedLedgerDigestUploadsListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.ledgerDigestUploads1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + 201: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + 202: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + 204: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + default: {} + }, + requestBody: Parameters.parameters71, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.ledgerDigestUploads1 + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const disableOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/ledgerDigestUploads/{ledgerDigestUploads}/disable", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + 201: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + 202: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + 204: { + bodyMapper: Mappers.ManagedLedgerDigestUploads + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.ledgerDigestUploads1 + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedLedgerDigestUploadsListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts b/sdk/sql/arm-sql/src/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts index fc4514483e3c..7581bcf94bfe 100644 --- a/sdk/sql/arm-sql/src/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.ts @@ -138,6 +138,33 @@ export class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImp } } + /** + * 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 options parameters. + */ + private _listByRestorableDroppedDatabase( + resourceGroupName: string, + managedInstanceName: string, + restorableDroppedDatabaseId: string, + options?: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseOptionalParams + ): Promise< + ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + restorableDroppedDatabaseId, + options + }, + listByRestorableDroppedDatabaseOperationSpec + ); + } + /** * Gets a dropped database's short term retention policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -398,33 +425,6 @@ export class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImp return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByRestorableDroppedDatabase( - resourceGroupName: string, - managedInstanceName: string, - restorableDroppedDatabaseId: string, - options?: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseOptionalParams - ): Promise< - ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesListByRestorableDroppedDatabaseResponse - > { - return this.client.sendOperationRequest( - { - resourceGroupName, - managedInstanceName, - restorableDroppedDatabaseId, - options - }, - listByRestorableDroppedDatabaseOperationSpec - ); - } - /** * ListByRestorableDroppedDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -459,6 +459,27 @@ export class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImp // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByRestorableDroppedDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.restorableDroppedDatabaseId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}", @@ -469,13 +490,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName1, + Parameters.policyName2, Parameters.restorableDroppedDatabaseId ], headerParameters: [Parameters.accept], @@ -500,14 +521,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters47, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName1, + Parameters.policyName2, Parameters.restorableDroppedDatabaseId ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -533,41 +554,20 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters38, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters47, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, - Parameters.policyName1, + Parameters.policyName2, Parameters.restorableDroppedDatabaseId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByRestorableDroppedDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedBackupShortTermRetentionPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.managedInstanceName, - Parameters.restorableDroppedDatabaseId - ], - headerParameters: [Parameters.accept], - serializer -}; const listByRestorableDroppedDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -579,8 +579,8 @@ const listByRestorableDroppedDatabaseNextOperationSpec: coreClient.OperationSpec }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName, Parameters.restorableDroppedDatabaseId diff --git a/sdk/sql/arm-sql/src/operations/managedServerDnsAliases.ts b/sdk/sql/arm-sql/src/operations/managedServerDnsAliases.ts new file mode 100644 index 000000000000..f234b62def0a --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/managedServerDnsAliases.ts @@ -0,0 +1,631 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ManagedServerDnsAliases } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ManagedServerDnsAlias, + ManagedServerDnsAliasesListByManagedInstanceNextOptionalParams, + ManagedServerDnsAliasesListByManagedInstanceOptionalParams, + ManagedServerDnsAliasesListByManagedInstanceResponse, + ManagedServerDnsAliasesGetOptionalParams, + ManagedServerDnsAliasesGetResponse, + ManagedServerDnsAliasCreation, + ManagedServerDnsAliasesCreateOrUpdateOptionalParams, + ManagedServerDnsAliasesCreateOrUpdateResponse, + ManagedServerDnsAliasesDeleteOptionalParams, + ManagedServerDnsAliasAcquisition, + ManagedServerDnsAliasesAcquireOptionalParams, + ManagedServerDnsAliasesAcquireResponse, + ManagedServerDnsAliasesListByManagedInstanceNextResponse +} from "../models"; + +/// +/** Class containing ManagedServerDnsAliases operations. */ +export class ManagedServerDnsAliasesImpl implements ManagedServerDnsAliases { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ManagedServerDnsAliases class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of managed server DNS aliases for a managed 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 options The options parameters. + */ + public listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedServerDnsAliasesListByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByManagedInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByManagedInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByManagedInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedServerDnsAliasesListByManagedInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ManagedServerDnsAliasesListByManagedInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByManagedInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByManagedInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByManagedInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedServerDnsAliasesListByManagedInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByManagedInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of managed server DNS aliases for a managed 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 options The options parameters. + */ + private _listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedServerDnsAliasesListByManagedInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByManagedInstanceOperationSpec + ); + } + + /** + * 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + options?: ManagedServerDnsAliasesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, dnsAliasName, options }, + getOperationSpec + ); + } + + /** + * Creates a managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param parameters A managed server dns alias creation request. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasCreation, + options?: ManagedServerDnsAliasesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedServerDnsAliasesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + dnsAliasName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Creates a managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param parameters A managed server dns alias creation request. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasCreation, + options?: ManagedServerDnsAliasesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + dnsAliasName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes the managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + options?: ManagedServerDnsAliasesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, managedInstanceName, dnsAliasName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes the managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + options?: ManagedServerDnsAliasesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + managedInstanceName, + dnsAliasName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Acquires managed server DNS alias from another managed 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 dnsAliasName + * @param parameters A managed server DNS alias acquisition request. + * @param options The options parameters. + */ + async beginAcquire( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasAcquisition, + options?: ManagedServerDnsAliasesAcquireOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedServerDnsAliasesAcquireResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + dnsAliasName, + parameters, + options + }, + acquireOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Acquires managed server DNS alias from another managed 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 dnsAliasName + * @param parameters A managed server DNS alias acquisition request. + * @param options The options parameters. + */ + async beginAcquireAndWait( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasAcquisition, + options?: ManagedServerDnsAliasesAcquireOptionalParams + ): Promise { + const poller = await this.beginAcquire( + resourceGroupName, + managedInstanceName, + dnsAliasName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByManagedInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByManagedInstance method. + * @param options The options parameters. + */ + private _listByManagedInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: ManagedServerDnsAliasesListByManagedInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByManagedInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedServerDnsAliasListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.dnsAliasName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + 201: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + 202: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + 204: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + default: {} + }, + requestBody: Parameters.parameters72, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.dnsAliasName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.dnsAliasName + ], + serializer +}; +const acquireOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/dnsAliases/{dnsAliasName}/acquire", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + 201: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + 202: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + 204: { + bodyMapper: Mappers.ManagedServerDnsAlias + }, + default: {} + }, + requestBody: Parameters.parameters73, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.dnsAliasName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedServerDnsAliasListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts index 1bcee9f6efb9..df0ba42f346b 100644 --- a/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/managedServerSecurityAlertPolicies.ts @@ -20,7 +20,7 @@ import { ManagedServerSecurityAlertPoliciesListByInstanceNextOptionalParams, ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams, ManagedServerSecurityAlertPoliciesListByInstanceResponse, - SecurityAlertPolicyName, + SecurityAlertPolicyNameAutoGenerated, ManagedServerSecurityAlertPoliciesGetOptionalParams, ManagedServerSecurityAlertPoliciesGetResponse, ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams, @@ -127,6 +127,24 @@ export class ManagedServerSecurityAlertPoliciesImpl } } + /** + * 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + /** * Get a managed server's threat detection policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -138,7 +156,7 @@ export class ManagedServerSecurityAlertPoliciesImpl get( resourceGroupName: string, managedInstanceName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, options?: ManagedServerSecurityAlertPoliciesGetOptionalParams ): Promise { return this.client.sendOperationRequest( @@ -164,7 +182,7 @@ export class ManagedServerSecurityAlertPoliciesImpl async beginCreateOrUpdate( resourceGroupName: string, managedInstanceName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise< @@ -245,7 +263,7 @@ export class ManagedServerSecurityAlertPoliciesImpl async beginCreateOrUpdateAndWait( resourceGroupName: string, managedInstanceName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise { @@ -259,24 +277,6 @@ export class ManagedServerSecurityAlertPoliciesImpl return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByInstance( - resourceGroupName: string, - managedInstanceName: string, - options?: ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, managedInstanceName, options }, - listByInstanceOperationSpec - ); - } - /** * ListByInstanceNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -300,6 +300,26 @@ export class ManagedServerSecurityAlertPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ManagedServerSecurityAlertPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies/{securityAlertPolicyName}", @@ -310,13 +330,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.securityAlertPolicyName, - Parameters.managedInstanceName + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.securityAlertPolicyName1 ], headerParameters: [Parameters.accept], serializer @@ -340,39 +360,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters55, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters74, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.securityAlertPolicyName, - Parameters.managedInstanceName + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.securityAlertPolicyName1 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByInstanceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/securityAlertPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ManagedServerSecurityAlertPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.managedInstanceName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByInstanceNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -384,8 +384,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/operations.ts b/sdk/sql/arm-sql/src/operations/operations.ts index b5cbf0223cb1..2fbbeacf475e 100644 --- a/sdk/sql/arm-sql/src/operations/operations.ts +++ b/sdk/sql/arm-sql/src/operations/operations.ts @@ -125,7 +125,7 @@ const listOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/operationsHealthOperations.ts b/sdk/sql/arm-sql/src/operations/operationsHealthOperations.ts deleted file mode 100644 index fc44ee7efde4..000000000000 --- a/sdk/sql/arm-sql/src/operations/operationsHealthOperations.ts +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { OperationsHealthOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SqlManagementClient } from "../sqlManagementClient"; -import { - OperationsHealth, - OperationsHealthListByLocationNextOptionalParams, - OperationsHealthListByLocationOptionalParams, - OperationsHealthListByLocationResponse, - OperationsHealthListByLocationNextResponse -} from "../models"; - -/// -/** Class containing OperationsHealthOperations operations. */ -export class OperationsHealthOperationsImpl - implements OperationsHealthOperations { - private readonly client: SqlManagementClient; - - /** - * Initialize a new instance of the class OperationsHealthOperations class. - * @param client Reference to the service client - */ - constructor(client: SqlManagementClient) { - this.client = client; - } - - /** - * Gets a service operation health status. - * @param locationName The name of the region where the resource is located. - * @param options The options parameters. - */ - public listByLocation( - locationName: string, - options?: OperationsHealthListByLocationOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByLocationPagingAll(locationName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByLocationPagingPage(locationName, options, settings); - } - }; - } - - private async *listByLocationPagingPage( - locationName: string, - options?: OperationsHealthListByLocationOptionalParams, - settings?: PageSettings - ): AsyncIterableIterator { - let result: OperationsHealthListByLocationResponse; - let continuationToken = settings?.continuationToken; - if (!continuationToken) { - result = await this._listByLocation(locationName, options); - let page = result.value || []; - continuationToken = result.nextLink; - setContinuationToken(page, continuationToken); - yield page; - } - while (continuationToken) { - result = await this._listByLocationNext( - locationName, - continuationToken, - options - ); - continuationToken = result.nextLink; - let page = result.value || []; - setContinuationToken(page, continuationToken); - yield page; - } - } - - private async *listByLocationPagingAll( - locationName: string, - options?: OperationsHealthListByLocationOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByLocationPagingPage( - locationName, - options - )) { - yield* page; - } - } - - /** - * Gets a service operation health status. - * @param locationName The name of the region where the resource is located. - * @param options The options parameters. - */ - private _listByLocation( - locationName: string, - options?: OperationsHealthListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { locationName, options }, - listByLocationOperationSpec - ); - } - - /** - * ListByLocationNext - * @param locationName The name of the region where the resource is located. - * @param nextLink The nextLink from the previous successful call to the ListByLocation method. - * @param options The options parameters. - */ - private _listByLocationNext( - locationName: string, - nextLink: string, - options?: OperationsHealthListByLocationNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { locationName, nextLink, options }, - listByLocationNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationName}/operationsHealth", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationsHealthListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByLocationNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationsHealthListResult - }, - default: {} - }, - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/sql/arm-sql/src/operations/outboundFirewallRules.ts b/sdk/sql/arm-sql/src/operations/outboundFirewallRules.ts index aea3087af753..ec6ba5825bc8 100644 --- a/sdk/sql/arm-sql/src/operations/outboundFirewallRules.ts +++ b/sdk/sql/arm-sql/src/operations/outboundFirewallRules.ts @@ -122,6 +122,24 @@ export class OutboundFirewallRulesImpl implements OutboundFirewallRules { } } + /** + * Gets all outbound firewall rules on 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: OutboundFirewallRulesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets an outbound firewall rule. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -148,14 +166,12 @@ export class OutboundFirewallRulesImpl implements OutboundFirewallRules { * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn - * @param parameters An Azure SQL DB Server Outbound Firewall Rule. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, serverName: string, outboundRuleFqdn: string, - parameters: OutboundFirewallRule, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams ): Promise< PollerLike< @@ -204,7 +220,7 @@ export class OutboundFirewallRulesImpl implements OutboundFirewallRules { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, outboundRuleFqdn, parameters, options }, + { resourceGroupName, serverName, outboundRuleFqdn, options }, createOrUpdateOperationSpec ); const poller = new LroEngine(lro, { @@ -221,21 +237,18 @@ export class OutboundFirewallRulesImpl implements OutboundFirewallRules { * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn - * @param parameters An Azure SQL DB Server Outbound Firewall Rule. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, outboundRuleFqdn: string, - parameters: OutboundFirewallRule, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, serverName, outboundRuleFqdn, - parameters, options ); return poller.pollUntilDone(); @@ -330,24 +343,6 @@ export class OutboundFirewallRulesImpl implements OutboundFirewallRules { return poller.pollUntilDone(); } - /** - * Gets all outbound firewall rules on 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: OutboundFirewallRulesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -371,6 +366,26 @@ export class OutboundFirewallRulesImpl implements OutboundFirewallRules { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.OutboundFirewallRuleListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}", @@ -381,12 +396,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.outboundRuleFqdn ], headerParameters: [Parameters.accept], @@ -411,17 +426,15 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters79, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.outboundRuleFqdn ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; const deleteOperationSpec: coreClient.OperationSpec = { @@ -429,34 +442,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules/{outboundRuleFqdn}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.outboundRuleFqdn - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/outboundFirewallRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OutboundFirewallRuleListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion3], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.outboundRuleFqdn ], - headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -470,9 +463,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/privateEndpointConnections.ts b/sdk/sql/arm-sql/src/operations/privateEndpointConnections.ts index c8ca340b2474..947c310e4fae 100644 --- a/sdk/sql/arm-sql/src/operations/privateEndpointConnections.ts +++ b/sdk/sql/arm-sql/src/operations/privateEndpointConnections.ts @@ -123,6 +123,24 @@ export class PrivateEndpointConnectionsImpl } } + /** + * Gets all private endpoint connections on 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: PrivateEndpointConnectionsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a private endpoint connection. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -337,24 +355,6 @@ export class PrivateEndpointConnectionsImpl return poller.pollUntilDone(); } - /** - * Gets all private endpoint connections on 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: PrivateEndpointConnectionsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -378,6 +378,26 @@ export class PrivateEndpointConnectionsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", @@ -388,12 +408,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.privateEndpointConnectionName ], headerParameters: [Parameters.accept], @@ -418,13 +438,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters56, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters75, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.privateEndpointConnectionName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -436,34 +456,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections/{privateEndpointConnectionName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.privateEndpointConnectionName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/privateEndpointConnections", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.PrivateEndpointConnectionListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.privateEndpointConnectionName ], - headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -477,9 +477,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/privateLinkResources.ts b/sdk/sql/arm-sql/src/operations/privateLinkResources.ts index b0da96f824e7..d23fdb13805f 100644 --- a/sdk/sql/arm-sql/src/operations/privateLinkResources.ts +++ b/sdk/sql/arm-sql/src/operations/privateLinkResources.ts @@ -188,12 +188,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -208,12 +208,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.groupName ], headerParameters: [Parameters.accept], @@ -230,9 +230,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/recommendedSensitivityLabels.ts b/sdk/sql/arm-sql/src/operations/recommendedSensitivityLabels.ts index b4e7f1349547..a56e7ec44811 100644 --- a/sdk/sql/arm-sql/src/operations/recommendedSensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operations/recommendedSensitivityLabels.ts @@ -59,14 +59,14 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels", httpMethod: "PATCH", responses: { 200: {}, default: {} }, - requestBody: Parameters.parameters45, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters52, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.contentType], mediaType: "json", diff --git a/sdk/sql/arm-sql/src/operations/recoverableDatabases.ts b/sdk/sql/arm-sql/src/operations/recoverableDatabases.ts index f5d80478dee5..c333aef6479d 100644 --- a/sdk/sql/arm-sql/src/operations/recoverableDatabases.ts +++ b/sdk/sql/arm-sql/src/operations/recoverableDatabases.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { RecoverableDatabases } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -14,10 +15,12 @@ import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { RecoverableDatabase, + RecoverableDatabasesListByServerNextOptionalParams, RecoverableDatabasesListByServerOptionalParams, RecoverableDatabasesListByServerResponse, RecoverableDatabasesGetOptionalParams, - RecoverableDatabasesGetResponse + RecoverableDatabasesGetResponse, + RecoverableDatabasesListByServerNextResponse } from "../models"; /// @@ -34,7 +37,7 @@ export class RecoverableDatabasesImpl implements RecoverableDatabases { } /** - * Gets a list of recoverable databases + * 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. @@ -75,11 +78,29 @@ export class RecoverableDatabasesImpl implements RecoverableDatabases { resourceGroupName: string, serverName: string, options?: RecoverableDatabasesListByServerOptionalParams, - _settings?: PageSettings + settings?: PageSettings ): AsyncIterableIterator { let result: RecoverableDatabasesListByServerResponse; - result = await this._listByServer(resourceGroupName, serverName, options); - yield result.value || []; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByServer(resourceGroupName, serverName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServerNext( + resourceGroupName, + serverName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } private async *listByServerPagingAll( @@ -97,11 +118,29 @@ export class RecoverableDatabasesImpl implements RecoverableDatabases { } /** - * Gets a recoverable database, which is a resource representing a database's geo backup + * 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 databaseName The name of the database + * @param options The options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: RecoverableDatabasesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + + /** + * Gets a recoverable 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 options parameters. */ get( @@ -117,26 +156,48 @@ export class RecoverableDatabasesImpl implements RecoverableDatabases { } /** - * Gets a list of recoverable databases + * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param nextLink The nextLink from the previous successful call to the ListByServer method. * @param options The options parameters. */ - private _listByServer( + private _listByServerNext( resourceGroupName: string, serverName: string, - options?: RecoverableDatabasesListByServerOptionalParams - ): Promise { + nextLink: string, + options?: RecoverableDatabasesListByServerNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec + { resourceGroupName, serverName, nextLink, options }, + listByServerNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecoverableDatabaseListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases/{databaseName}", @@ -144,34 +205,39 @@ const getOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.RecoverableDatabase - } + }, + default: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/recoverableDatabases", +const listByServerNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.RecoverableDatabaseListResult - } + }, + default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/recoverableManagedDatabases.ts b/sdk/sql/arm-sql/src/operations/recoverableManagedDatabases.ts index 25756f4bfc28..495517480331 100644 --- a/sdk/sql/arm-sql/src/operations/recoverableManagedDatabases.ts +++ b/sdk/sql/arm-sql/src/operations/recoverableManagedDatabases.ts @@ -198,11 +198,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -218,11 +218,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.recoverableDatabaseName ], @@ -240,8 +240,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/replicationLinks.ts b/sdk/sql/arm-sql/src/operations/replicationLinks.ts index a7a5ced58156..527c9d5fb966 100644 --- a/sdk/sql/arm-sql/src/operations/replicationLinks.ts +++ b/sdk/sql/arm-sql/src/operations/replicationLinks.ts @@ -23,13 +23,13 @@ import { ReplicationLinksListByServerNextOptionalParams, ReplicationLinksListByServerOptionalParams, ReplicationLinksListByServerResponse, + ReplicationLinksGetOptionalParams, + ReplicationLinksGetResponse, ReplicationLinksDeleteOptionalParams, ReplicationLinksFailoverOptionalParams, + ReplicationLinksFailoverResponse, ReplicationLinksFailoverAllowDataLossOptionalParams, - UnlinkParameters, - ReplicationLinksUnlinkOptionalParams, - ReplicationLinksGetOptionalParams, - ReplicationLinksGetResponse, + ReplicationLinksFailoverAllowDataLossResponse, ReplicationLinksListByDatabaseNextResponse, ReplicationLinksListByServerNextResponse } from "../models"; @@ -223,42 +223,62 @@ export class ReplicationLinksImpl implements ReplicationLinks { } /** - * Deletes a database replication link. Cannot be done during failover. + * Gets a list of replication links on 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 dropped. - * @param linkId The ID of the replication link to be deleted. + * @param databaseName The name of the database. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: ReplicationLinksListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * Gets a 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. + * @param linkId The name of the replication link. * @param options The options parameters. */ - delete( + get( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksDeleteOptionalParams - ): Promise { + options?: ReplicationLinksGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, serverName, databaseName, linkId, options }, - deleteOperationSpec + getOperationSpec ); } /** - * Sets which replica database is primary by failing over from the current primary replica database. + * Deletes the 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 that has the replication link to be failed over. - * @param linkId The ID of the replication link to be failed over. + * @param databaseName The name of the database. + * @param linkId * @param options The options parameters. */ - async beginFailover( + async beginDelete( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverOptionalParams + options?: ReplicationLinksDeleteOptionalParams ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, @@ -302,7 +322,7 @@ export class ReplicationLinksImpl implements ReplicationLinks { const lro = new LroImpl( sendOperation, { resourceGroupName, serverName, databaseName, linkId, options }, - failoverOperationSpec + deleteOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -313,22 +333,22 @@ export class ReplicationLinksImpl implements ReplicationLinks { } /** - * Sets which replica database is primary by failing over from the current primary replica database. + * Deletes the 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 that has the replication link to be failed over. - * @param linkId The ID of the replication link to be failed over. + * @param databaseName The name of the database. + * @param linkId * @param options The options parameters. */ - async beginFailoverAndWait( + async beginDeleteAndWait( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverOptionalParams + options?: ReplicationLinksDeleteOptionalParams ): Promise { - const poller = await this.beginFailover( + const poller = await this.beginDelete( resourceGroupName, serverName, databaseName, @@ -339,26 +359,30 @@ export class ReplicationLinksImpl implements ReplicationLinks { } /** - * Sets which replica database is primary by failing over from the current primary replica database. - * This operation might result in data loss. + * 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. - * @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 databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - async beginFailoverAllowDataLoss( + async beginFailover( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverAllowDataLossOptionalParams - ): Promise, void>> { + options?: ReplicationLinksFailoverOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ReplicationLinksFailoverResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -397,7 +421,7 @@ export class ReplicationLinksImpl implements ReplicationLinks { const lro = new LroImpl( sendOperation, { resourceGroupName, serverName, databaseName, linkId, options }, - failoverAllowDataLossOperationSpec + failoverOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -408,23 +432,22 @@ export class ReplicationLinksImpl implements ReplicationLinks { } /** - * Sets which replica database is primary by failing over from the current primary replica database. - * This operation might result in data loss. + * 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. - * @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 databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - async beginFailoverAllowDataLossAndWait( + async beginFailoverAndWait( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverAllowDataLossOptionalParams - ): Promise { - const poller = await this.beginFailoverAllowDataLoss( + options?: ReplicationLinksFailoverOptionalParams + ): Promise { + const poller = await this.beginFailover( resourceGroupName, serverName, databaseName, @@ -435,27 +458,30 @@ export class ReplicationLinksImpl implements ReplicationLinks { } /** - * Deletes a database replication link in forced or friendly way. + * Fails over from the current primary server to this server allowing 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 parameters The required parameters for unlinking replication link. + * @param databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - async beginUnlink( + async beginFailoverAllowDataLoss( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - parameters: UnlinkParameters, - options?: ReplicationLinksUnlinkOptionalParams - ): Promise, void>> { + options?: ReplicationLinksFailoverAllowDataLossOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ReplicationLinksFailoverAllowDataLossResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -493,15 +519,8 @@ export class ReplicationLinksImpl implements ReplicationLinks { const lro = new LroImpl( sendOperation, - { - resourceGroupName, - serverName, - databaseName, - linkId, - parameters, - options - }, - unlinkOperationSpec + { resourceGroupName, serverName, databaseName, linkId, options }, + failoverAllowDataLossOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -512,76 +531,31 @@ export class ReplicationLinksImpl implements ReplicationLinks { } /** - * Deletes a database replication link in forced or friendly way. + * Fails over from the current primary server to this server allowing 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 parameters The required parameters for unlinking replication link. + * @param databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - async beginUnlinkAndWait( + async beginFailoverAllowDataLossAndWait( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - parameters: UnlinkParameters, - options?: ReplicationLinksUnlinkOptionalParams - ): Promise { - const poller = await this.beginUnlink( + options?: ReplicationLinksFailoverAllowDataLossOptionalParams + ): Promise { + const poller = await this.beginFailoverAllowDataLoss( resourceGroupName, serverName, databaseName, linkId, - parameters, options ); return poller.pollUntilDone(); } - /** - * Gets a list of replication links on 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 options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: ReplicationLinksListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - - /** - * Gets a 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. - * @param linkId The name of the replication link. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - serverName: string, - databaseName: string, - linkId: string, - options?: ReplicationLinksGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, linkId, options }, - getOperationSpec - ); - } - /** * Gets a list of replication links. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -645,111 +619,122 @@ export class ReplicationLinksImpl implements ReplicationLinks { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const deleteOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", - httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicationLinkListResult + }, + default: {} + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.linkId + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], serializer }; -const failoverOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ReplicationLink + }, + default: {} + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.linkId - ], - serializer -}; -const failoverAllowDataLossOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, Parameters.linkId ], + headerParameters: [Parameters.accept], serializer }; -const unlinkOperationSpec: coreClient.OperationSpec = { +const deleteOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/unlink", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {} }, - requestBody: Parameters.parameters10, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.linkId ], - headerParameters: [Parameters.contentType], - mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const failoverOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/failover", + httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.ReplicationLinkListResult + bodyMapper: Mappers.ReplicationLink + }, + 201: { + bodyMapper: Mappers.ReplicationLink + }, + 202: { + bodyMapper: Mappers.ReplicationLink + }, + 204: { + bodyMapper: Mappers.ReplicationLink }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.linkId ], headerParameters: [Parameters.accept], serializer }; -const getOperationSpec: coreClient.OperationSpec = { +const failoverAllowDataLossOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/replicationLinks/{linkId}/forceFailoverAllowDataLoss", + httpMethod: "POST", responses: { 200: { bodyMapper: Mappers.ReplicationLink }, + 201: { + bodyMapper: Mappers.ReplicationLink + }, + 202: { + bodyMapper: Mappers.ReplicationLink + }, + 204: { + bodyMapper: Mappers.ReplicationLink + }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.linkId ], headerParameters: [Parameters.accept], @@ -765,12 +750,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -786,10 +771,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -806,9 +791,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/restorableDroppedDatabases.ts b/sdk/sql/arm-sql/src/operations/restorableDroppedDatabases.ts index bf22893ab596..4e48e012dd64 100644 --- a/sdk/sql/arm-sql/src/operations/restorableDroppedDatabases.ts +++ b/sdk/sql/arm-sql/src/operations/restorableDroppedDatabases.ts @@ -189,12 +189,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -209,12 +209,16 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [ + Parameters.apiVersion, + Parameters.expand, + Parameters.filter + ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.restorableDroppedDatabaseId ], headerParameters: [Parameters.accept], @@ -231,9 +235,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/restorableDroppedManagedDatabases.ts b/sdk/sql/arm-sql/src/operations/restorableDroppedManagedDatabases.ts index 861ff038afd5..04b41ffb5997 100644 --- a/sdk/sql/arm-sql/src/operations/restorableDroppedManagedDatabases.ts +++ b/sdk/sql/arm-sql/src/operations/restorableDroppedManagedDatabases.ts @@ -198,11 +198,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -218,11 +218,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName, Parameters.restorableDroppedDatabaseId ], @@ -240,8 +240,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/restorePoints.ts b/sdk/sql/arm-sql/src/operations/restorePoints.ts index 1c7239b2fd37..121140ead0e6 100644 --- a/sdk/sql/arm-sql/src/operations/restorePoints.ts +++ b/sdk/sql/arm-sql/src/operations/restorePoints.ts @@ -346,13 +346,13 @@ const listByDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -376,14 +376,14 @@ const createOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters57, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters76, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -399,13 +399,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.restorePointName ], headerParameters: [Parameters.accept], @@ -416,13 +416,13 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/restorePoints/{restorePointName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.restorePointName ], serializer @@ -438,10 +438,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts b/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts index 0b67dcaf0c73..8470e84a041a 100644 --- a/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operations/sensitivityLabels.ts @@ -21,18 +21,22 @@ import { SensitivityLabelsListRecommendedByDatabaseNextOptionalParams, SensitivityLabelsListRecommendedByDatabaseOptionalParams, SensitivityLabelsListRecommendedByDatabaseResponse, + SensitivityLabelsListByDatabaseNextOptionalParams, + SensitivityLabelsListByDatabaseOptionalParams, + SensitivityLabelsListByDatabaseResponse, SensitivityLabelUpdateList, SensitivityLabelsUpdateOptionalParams, - SensitivityLabelsEnableRecommendationOptionalParams, - SensitivityLabelsDisableRecommendationOptionalParams, SensitivityLabelSource, SensitivityLabelsGetOptionalParams, SensitivityLabelsGetResponse, SensitivityLabelsCreateOrUpdateOptionalParams, SensitivityLabelsCreateOrUpdateResponse, SensitivityLabelsDeleteOptionalParams, + SensitivityLabelsDisableRecommendationOptionalParams, + SensitivityLabelsEnableRecommendationOptionalParams, SensitivityLabelsListCurrentByDatabaseNextResponse, - SensitivityLabelsListRecommendedByDatabaseNextResponse + SensitivityLabelsListRecommendedByDatabaseNextResponse, + SensitivityLabelsListByDatabaseNextResponse } from "../models"; /// @@ -236,6 +240,100 @@ export class SensitivityLabelsImpl implements SensitivityLabels { } } + /** + * 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 options parameters. + */ + public listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SensitivityLabelsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + serverName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SensitivityLabelsListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SensitivityLabelsListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + serverName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + serverName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SensitivityLabelsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options + )) { + yield* page; + } + } + /** * Gets the sensitivity labels of a given database * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -299,8 +397,7 @@ export class SensitivityLabelsImpl implements SensitivityLabels { } /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all - * columns) + * 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. @@ -308,17 +405,19 @@ export class SensitivityLabelsImpl implements SensitivityLabels { * @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. * @param options The options parameters. */ - enableRecommendation( + get( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - options?: SensitivityLabelsEnableRecommendationOptionalParams - ): Promise { + sensitivityLabelSource: SensitivityLabelSource, + options?: SensitivityLabelsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -327,14 +426,15 @@ export class SensitivityLabelsImpl implements SensitivityLabels { schemaName, tableName, columnName, + sensitivityLabelSource, options }, - enableRecommendationOperationSpec + getOperationSpec ); } /** - * Disables sensitivity recommendations on a given column + * 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. @@ -342,17 +442,19 @@ export class SensitivityLabelsImpl implements SensitivityLabels { * @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 options parameters. */ - disableRecommendation( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - options?: SensitivityLabelsDisableRecommendationOptionalParams - ): Promise { + parameters: SensitivityLabel, + options?: SensitivityLabelsCreateOrUpdateOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -361,14 +463,15 @@ export class SensitivityLabelsImpl implements SensitivityLabels { schemaName, tableName, columnName, + parameters, options }, - disableRecommendationOperationSpec + createOrUpdateOperationSpec ); } /** - * Gets the sensitivity label of a given column + * 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. @@ -376,19 +479,17 @@ export class SensitivityLabelsImpl implements SensitivityLabels { * @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. * @param options The options parameters. */ - get( + delete( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - sensitivityLabelSource: SensitivityLabelSource, - options?: SensitivityLabelsGetOptionalParams - ): Promise { + options?: SensitivityLabelsDeleteOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -397,15 +498,14 @@ export class SensitivityLabelsImpl implements SensitivityLabels { schemaName, tableName, columnName, - sensitivityLabelSource, options }, - getOperationSpec + deleteOperationSpec ); } /** - * Creates or updates the sensitivity label of a given column + * 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. @@ -413,19 +513,17 @@ export class SensitivityLabelsImpl implements SensitivityLabels { * @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 options parameters. */ - createOrUpdate( + disableRecommendation( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - parameters: SensitivityLabel, - options?: SensitivityLabelsCreateOrUpdateOptionalParams - ): Promise { + options?: SensitivityLabelsDisableRecommendationOptionalParams + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -434,15 +532,15 @@ export class SensitivityLabelsImpl implements SensitivityLabels { schemaName, tableName, columnName, - parameters, options }, - createOrUpdateOperationSpec + disableRecommendationOperationSpec ); } /** - * Deletes the sensitivity label of a given column + * 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. @@ -452,14 +550,14 @@ export class SensitivityLabelsImpl implements SensitivityLabels { * @param columnName The name of the column. * @param options The options parameters. */ - delete( + enableRecommendation( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - options?: SensitivityLabelsDeleteOptionalParams + options?: SensitivityLabelsEnableRecommendationOptionalParams ): Promise { return this.client.sendOperationRequest( { @@ -471,7 +569,27 @@ export class SensitivityLabelsImpl implements SensitivityLabels { columnName, options }, - deleteOperationSpec + enableRecommendationOperationSpec + ); + } + + /** + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SensitivityLabelsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec ); } @@ -519,6 +637,28 @@ export class SensitivityLabelsImpl implements SensitivityLabels { listRecommendedByDatabaseNextOperationSpec ); } + + /** + * ListByDatabaseNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + nextLink: string, + options?: SensitivityLabelsListByDatabaseNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, nextLink, options }, + listByDatabaseNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -534,17 +674,17 @@ const listCurrentByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ + Parameters.apiVersion, + Parameters.filter, Parameters.skipToken, - Parameters.apiVersion2, - Parameters.filter1, Parameters.count ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -554,14 +694,14 @@ const updateOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels", httpMethod: "PATCH", responses: { 200: {}, default: {} }, - requestBody: Parameters.parameters44, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters50, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId ], headerParameters: [Parameters.contentType], mediaType: "json", @@ -578,57 +718,19 @@ const listRecommendedByDatabaseOperationSpec: coreClient.OperationSpec = { default: {} }, queryParameters: [ + Parameters.apiVersion, + Parameters.filter, Parameters.skipToken, - Parameters.apiVersion2, - Parameters.filter1, Parameters.includeDisabledRecommendations ], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; -const enableRecommendationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.schemaName, - Parameters.tableName, - Parameters.columnName, - Parameters.sensitivityLabelSource2 - ], - serializer -}; -const disableRecommendationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.schemaName, - Parameters.tableName, - Parameters.columnName, - Parameters.sensitivityLabelSource2 + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], serializer }; const getOperationSpec: coreClient.OperationSpec = { @@ -641,13 +743,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -669,14 +771,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters43, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters51, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -691,13 +793,13 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.schemaName, Parameters.tableName, Parameters.columnName, @@ -705,6 +807,65 @@ const deleteOperationSpec: coreClient.OperationSpec = { ], serializer }; +const disableRecommendationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource2 + ], + serializer +}; +const enableRecommendationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.schemaName, + Parameters.tableName, + Parameters.columnName, + Parameters.sensitivityLabelSource2 + ], + serializer +}; +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.filter], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const listCurrentByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -716,10 +877,10 @@ const listCurrentByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -736,10 +897,30 @@ const listRecommendedByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SensitivityLabelListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverCommunicationLinks.ts b/sdk/sql/arm-sql/src/operations/serverAdvancedThreatProtectionSettings.ts similarity index 57% rename from sdk/sql/arm-sql/src/operations/serverCommunicationLinks.ts rename to sdk/sql/arm-sql/src/operations/serverAdvancedThreatProtectionSettings.ts index 98d0861d987b..c8d41358d4e9 100644 --- a/sdk/sql/arm-sql/src/operations/serverCommunicationLinks.ts +++ b/sdk/sql/arm-sql/src/operations/serverAdvancedThreatProtectionSettings.ts @@ -7,7 +7,8 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ServerCommunicationLinks } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper"; +import { ServerAdvancedThreatProtectionSettings } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; @@ -15,23 +16,26 @@ import { SqlManagementClient } from "../sqlManagementClient"; import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { - ServerCommunicationLink, - ServerCommunicationLinksListByServerOptionalParams, - ServerCommunicationLinksListByServerResponse, - ServerCommunicationLinksDeleteOptionalParams, - ServerCommunicationLinksGetOptionalParams, - ServerCommunicationLinksGetResponse, - ServerCommunicationLinksCreateOrUpdateOptionalParams, - ServerCommunicationLinksCreateOrUpdateResponse + ServerAdvancedThreatProtection, + ServerAdvancedThreatProtectionSettingsListByServerNextOptionalParams, + ServerAdvancedThreatProtectionSettingsListByServerOptionalParams, + ServerAdvancedThreatProtectionSettingsListByServerResponse, + AdvancedThreatProtectionName, + ServerAdvancedThreatProtectionSettingsGetOptionalParams, + ServerAdvancedThreatProtectionSettingsGetResponse, + ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse, + ServerAdvancedThreatProtectionSettingsListByServerNextResponse } from "../models"; /// -/** Class containing ServerCommunicationLinks operations. */ -export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { +/** Class containing ServerAdvancedThreatProtectionSettings operations. */ +export class ServerAdvancedThreatProtectionSettingsImpl + implements ServerAdvancedThreatProtectionSettings { private readonly client: SqlManagementClient; /** - * Initialize a new instance of the class ServerCommunicationLinks class. + * Initialize a new instance of the class ServerAdvancedThreatProtectionSettings class. * @param client Reference to the service client */ constructor(client: SqlManagementClient) { @@ -39,7 +43,7 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { } /** - * Gets a list of server communication links. + * Get a list of the server's Advanced Threat Protection states. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -48,8 +52,8 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { public listByServer( resourceGroupName: string, serverName: string, - options?: ServerCommunicationLinksListByServerOptionalParams - ): PagedAsyncIterableIterator { + options?: ServerAdvancedThreatProtectionSettingsListByServerOptionalParams + ): PagedAsyncIterableIterator { const iter = this.listByServerPagingAll( resourceGroupName, serverName, @@ -79,19 +83,37 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { private async *listByServerPagingPage( resourceGroupName: string, serverName: string, - options?: ServerCommunicationLinksListByServerOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ServerCommunicationLinksListByServerResponse; - result = await this._listByServer(resourceGroupName, serverName, options); - yield result.value || []; + options?: ServerAdvancedThreatProtectionSettingsListByServerOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ServerAdvancedThreatProtectionSettingsListByServerResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByServer(resourceGroupName, serverName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServerNext( + resourceGroupName, + serverName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } private async *listByServerPagingAll( resourceGroupName: string, serverName: string, - options?: ServerCommunicationLinksListByServerOptionalParams - ): AsyncIterableIterator { + options?: ServerAdvancedThreatProtectionSettingsListByServerOptionalParams + ): AsyncIterableIterator { for await (const page of this.listByServerPagingPage( resourceGroupName, serverName, @@ -102,70 +124,70 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { } /** - * Deletes a server communication link. + * Get a list of the server's Advanced Threat Protection states. * @param resourceGroupName The name of the resource group that contains 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 options parameters. */ - delete( + private _listByServer( resourceGroupName: string, serverName: string, - communicationLinkName: string, - options?: ServerCommunicationLinksDeleteOptionalParams - ): Promise { + options?: ServerAdvancedThreatProtectionSettingsListByServerOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, communicationLinkName, options }, - deleteOperationSpec + { resourceGroupName, serverName, options }, + listByServerOperationSpec ); } /** - * Returns a server communication link. + * Get a server's Advanced Threat Protection state. * @param resourceGroupName The name of the resource group that contains 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. * @param options The options parameters. */ get( resourceGroupName: string, serverName: string, - communicationLinkName: string, - options?: ServerCommunicationLinksGetOptionalParams - ): Promise { + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: ServerAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, communicationLinkName, options }, + { resourceGroupName, serverName, advancedThreatProtectionName, options }, getOperationSpec ); } /** - * Creates a server communication link. + * Creates or updates an Advanced Threat Protection state. * @param resourceGroupName The name of the resource group that contains 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The server Advanced Threat Protection state. * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, serverName: string, - communicationLinkName: string, - parameters: ServerCommunicationLink, - options?: ServerCommunicationLinksCreateOrUpdateOptionalParams + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ServerAdvancedThreatProtection, + options?: ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams ): Promise< PollerLike< - PollOperationState, - ServerCommunicationLinksCreateOrUpdateResponse + PollOperationState< + ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse + >, + ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -206,7 +228,7 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { { resourceGroupName, serverName, - communicationLinkName, + advancedThreatProtectionName, parameters, options }, @@ -221,25 +243,25 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { } /** - * Creates a server communication link. + * Creates or updates an Advanced Threat Protection state. * @param resourceGroupName The name of the resource group that contains 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The server Advanced Threat Protection state. * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, - communicationLinkName: string, - parameters: ServerCommunicationLink, - options?: ServerCommunicationLinksCreateOrUpdateOptionalParams - ): Promise { + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ServerAdvancedThreatProtection, + options?: ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise { const poller = await this.beginCreateOrUpdate( resourceGroupName, serverName, - communicationLinkName, + advancedThreatProtectionName, parameters, options ); @@ -247,107 +269,116 @@ export class ServerCommunicationLinksImpl implements ServerCommunicationLinks { } /** - * Gets a list of server communication links. + * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. + * @param nextLink The nextLink from the previous successful call to the ListByServer method. * @param options The options parameters. */ - private _listByServer( + private _listByServerNext( resourceGroupName: string, serverName: string, - options?: ServerCommunicationLinksListByServerOptionalParams - ): Promise { + nextLink: string, + options?: ServerAdvancedThreatProtectionSettingsListByServerNextOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec + { resourceGroupName, serverName, nextLink, options }, + listByServerNextOperationSpec ); } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const deleteOperationSpec: coreClient.OperationSpec = { +const listByServerOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", - httpMethod: "DELETE", - responses: { 200: {} }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogicalServerAdvancedThreatProtectionListResult + }, + default: {} + }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.communicationLinkName + Parameters.subscriptionId ], + headerParameters: [Parameters.accept], serializer }; const getOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ServerCommunicationLink - } + bodyMapper: Mappers.ServerAdvancedThreatProtection + }, + default: {} }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.communicationLinkName + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName ], headerParameters: [Parameters.accept], serializer }; const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks/{communicationLinkName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/advancedThreatProtectionSettings/{advancedThreatProtectionName}", httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.ServerCommunicationLink + bodyMapper: Mappers.ServerAdvancedThreatProtection }, 201: { - bodyMapper: Mappers.ServerCommunicationLink + bodyMapper: Mappers.ServerAdvancedThreatProtection }, 202: { - bodyMapper: Mappers.ServerCommunicationLink + bodyMapper: Mappers.ServerAdvancedThreatProtection }, 204: { - bodyMapper: Mappers.ServerCommunicationLink - } + bodyMapper: Mappers.ServerAdvancedThreatProtection + }, + default: {} }, - requestBody: Parameters.parameters11, + requestBody: Parameters.parameters77, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.communicationLinkName + Parameters.subscriptionId, + Parameters.advancedThreatProtectionName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/communicationLinks", +const listByServerNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.ServerCommunicationLinkListResult - } + bodyMapper: Mappers.LogicalServerAdvancedThreatProtectionListResult + }, + default: {} }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/serverAdvisors.ts b/sdk/sql/arm-sql/src/operations/serverAdvisors.ts index 9e6e07701017..9fdca3b4ada5 100644 --- a/sdk/sql/arm-sql/src/operations/serverAdvisors.ts +++ b/sdk/sql/arm-sql/src/operations/serverAdvisors.ts @@ -111,12 +111,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2, Parameters.expand], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -131,12 +131,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.advisorName ], headerParameters: [Parameters.accept], @@ -152,13 +152,13 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters16, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.advisorName ], headerParameters: [Parameters.accept, Parameters.contentType], diff --git a/sdk/sql/arm-sql/src/operations/serverAutomaticTuningOperations.ts b/sdk/sql/arm-sql/src/operations/serverAutomaticTuningOperations.ts index a0cac8aea48b..036e714555bd 100644 --- a/sdk/sql/arm-sql/src/operations/serverAutomaticTuningOperations.ts +++ b/sdk/sql/arm-sql/src/operations/serverAutomaticTuningOperations.ts @@ -83,12 +83,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -103,13 +103,13 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters58, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters78, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/sql/arm-sql/src/operations/serverAzureADAdministrators.ts b/sdk/sql/arm-sql/src/operations/serverAzureADAdministrators.ts index cb49ab65136e..330b1cfe73e6 100644 --- a/sdk/sql/arm-sql/src/operations/serverAzureADAdministrators.ts +++ b/sdk/sql/arm-sql/src/operations/serverAzureADAdministrators.ts @@ -124,6 +124,24 @@ export class ServerAzureADAdministratorsImpl } } + /** + * Gets a list of Azure Active Directory administrators 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerAzureADAdministratorsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a Azure Active Directory administrator. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -332,24 +350,6 @@ export class ServerAzureADAdministratorsImpl return poller.pollUntilDone(); } - /** - * Gets a list of Azure Active Directory administrators 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerAzureADAdministratorsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -373,6 +373,26 @@ export class ServerAzureADAdministratorsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AdministratorListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", @@ -383,12 +403,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.administratorName ], headerParameters: [Parameters.accept], @@ -413,13 +433,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters59, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters79, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.administratorName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -431,34 +451,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators/{administratorName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.administratorName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/administrators", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AdministratorListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.administratorName ], - headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -472,9 +472,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverAzureADOnlyAuthentications.ts b/sdk/sql/arm-sql/src/operations/serverAzureADOnlyAuthentications.ts index 15a1d4a16b29..b28e88be909e 100644 --- a/sdk/sql/arm-sql/src/operations/serverAzureADOnlyAuthentications.ts +++ b/sdk/sql/arm-sql/src/operations/serverAzureADOnlyAuthentications.ts @@ -124,6 +124,24 @@ export class ServerAzureADOnlyAuthenticationsImpl } } + /** + * Gets a list of server Azure Active Directory only authentications. + * @param resourceGroupName The name of the resource group that contains 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerAzureADOnlyAuthenticationsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a specific Azure Active Directory only authentication property. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -344,24 +362,6 @@ export class ServerAzureADOnlyAuthenticationsImpl return poller.pollUntilDone(); } - /** - * Gets a list of server Azure Active Directory only authentications. - * @param resourceGroupName The name of the resource group that contains 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerAzureADOnlyAuthenticationsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -385,6 +385,26 @@ export class ServerAzureADOnlyAuthenticationsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.AzureADOnlyAuthListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}", @@ -395,12 +415,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.authenticationName ], headerParameters: [Parameters.accept], @@ -425,13 +445,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters60, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters80, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.authenticationName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -443,34 +463,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications/{authenticationName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.authenticationName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/azureADOnlyAuthentications", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.AzureADOnlyAuthListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.authenticationName ], - headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -484,9 +484,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverBlobAuditingPolicies.ts b/sdk/sql/arm-sql/src/operations/serverBlobAuditingPolicies.ts index cc18cacebace..2238b23f1682 100644 --- a/sdk/sql/arm-sql/src/operations/serverBlobAuditingPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/serverBlobAuditingPolicies.ts @@ -122,6 +122,24 @@ export class ServerBlobAuditingPoliciesImpl } } + /** + * Lists auditing settings of a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerBlobAuditingPoliciesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a server's blob auditing policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -234,24 +252,6 @@ export class ServerBlobAuditingPoliciesImpl return poller.pollUntilDone(); } - /** - * Lists auditing settings of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param options The options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerBlobAuditingPoliciesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -275,6 +275,26 @@ export class ServerBlobAuditingPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerBlobAuditingPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings/{blobAuditingPolicyName}", @@ -285,12 +305,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.blobAuditingPolicyName ], headerParameters: [Parameters.accept], @@ -315,39 +335,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters14, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.blobAuditingPolicyName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/auditingSettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerBlobAuditingPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -359,9 +359,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverConfigurationOptions.ts b/sdk/sql/arm-sql/src/operations/serverConfigurationOptions.ts new file mode 100644 index 000000000000..61fee4456ebe --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/serverConfigurationOptions.ts @@ -0,0 +1,392 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ServerConfigurationOptions } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ServerConfigurationOption, + ServerConfigurationOptionsListByManagedInstanceNextOptionalParams, + ServerConfigurationOptionsListByManagedInstanceOptionalParams, + ServerConfigurationOptionsListByManagedInstanceResponse, + ServerConfigurationOptionName, + ServerConfigurationOptionsGetOptionalParams, + ServerConfigurationOptionsGetResponse, + ServerConfigurationOptionsCreateOrUpdateOptionalParams, + ServerConfigurationOptionsCreateOrUpdateResponse, + ServerConfigurationOptionsListByManagedInstanceNextResponse +} from "../models"; + +/// +/** Class containing ServerConfigurationOptions operations. */ +export class ServerConfigurationOptionsImpl + implements ServerConfigurationOptions { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ServerConfigurationOptions class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of managed instance server configuration 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 managedInstanceName The name of the managed instance. + * @param options The options parameters. + */ + public listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerConfigurationOptionsListByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByManagedInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByManagedInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByManagedInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerConfigurationOptionsListByManagedInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ServerConfigurationOptionsListByManagedInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByManagedInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByManagedInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByManagedInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerConfigurationOptionsListByManagedInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByManagedInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of managed instance server configuration 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 managedInstanceName The name of the managed instance. + * @param options The options parameters. + */ + private _listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerConfigurationOptionsListByManagedInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByManagedInstanceOperationSpec + ); + } + + /** + * Gets managed instance server configuration option. + * @param resourceGroupName The 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 serverConfigurationOptionName The name of the server configuration option. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + serverConfigurationOptionName: ServerConfigurationOptionName, + options?: ServerConfigurationOptionsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + serverConfigurationOptionName, + options + }, + getOperationSpec + ); + } + + /** + * Updates managed instance server configuration option. + * @param resourceGroupName The 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 serverConfigurationOptionName The name of the server configuration option. + * @param parameters Server configuration option parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + serverConfigurationOptionName: ServerConfigurationOptionName, + parameters: ServerConfigurationOption, + options?: ServerConfigurationOptionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ServerConfigurationOptionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + serverConfigurationOptionName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Updates managed instance server configuration option. + * @param resourceGroupName The 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 serverConfigurationOptionName The name of the server configuration option. + * @param parameters Server configuration option parameters. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + serverConfigurationOptionName: ServerConfigurationOptionName, + parameters: ServerConfigurationOption, + options?: ServerConfigurationOptionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + serverConfigurationOptionName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByManagedInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByManagedInstance method. + * @param options The options parameters. + */ + private _listByManagedInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: ServerConfigurationOptionsListByManagedInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByManagedInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByManagedInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerConfigurationOptionListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions/{serverConfigurationOptionName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerConfigurationOption + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.serverConfigurationOptionName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverConfigurationOptions/{serverConfigurationOptionName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ServerConfigurationOption + }, + 201: { + bodyMapper: Mappers.ServerConfigurationOption + }, + 202: { + bodyMapper: Mappers.ServerConfigurationOption + }, + 204: { + bodyMapper: Mappers.ServerConfigurationOption + }, + default: {} + }, + requestBody: Parameters.parameters81, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.serverConfigurationOptionName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByManagedInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerConfigurationOptionListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/serverConnectionPolicies.ts b/sdk/sql/arm-sql/src/operations/serverConnectionPolicies.ts index 1397ac20a488..496f6692f3da 100644 --- a/sdk/sql/arm-sql/src/operations/serverConnectionPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/serverConnectionPolicies.ts @@ -122,6 +122,24 @@ export class ServerConnectionPoliciesImpl implements ServerConnectionPolicies { } } + /** + * Lists 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerConnectionPoliciesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a server connection policy * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -247,24 +265,6 @@ export class ServerConnectionPoliciesImpl implements ServerConnectionPolicies { return poller.pollUntilDone(); } - /** - * Lists 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerConnectionPoliciesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -288,6 +288,26 @@ export class ServerConnectionPoliciesImpl implements ServerConnectionPolicies { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerConnectionPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies/{connectionPolicyName}", @@ -298,12 +318,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.connectionPolicyName ], headerParameters: [Parameters.accept], @@ -328,39 +348,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters88, - queryParameters: [Parameters.apiVersion1], + requestBody: Parameters.parameters82, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.connectionPolicyName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/connectionPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerConnectionPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion1], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -372,9 +372,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverDevOpsAuditSettings.ts b/sdk/sql/arm-sql/src/operations/serverDevOpsAuditSettings.ts index 1d2a45c356ce..193924ca8076 100644 --- a/sdk/sql/arm-sql/src/operations/serverDevOpsAuditSettings.ts +++ b/sdk/sql/arm-sql/src/operations/serverDevOpsAuditSettings.ts @@ -20,6 +20,7 @@ import { ServerDevOpsAuditSettingsListByServerNextOptionalParams, ServerDevOpsAuditSettingsListByServerOptionalParams, ServerDevOpsAuditSettingsListByServerResponse, + DevOpsAuditingSettingsName, ServerDevOpsAuditSettingsGetOptionalParams, ServerDevOpsAuditSettingsGetResponse, ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams, @@ -122,19 +123,36 @@ export class ServerDevOpsAuditSettingsImpl } } + /** + * Lists DevOps audit settings of a server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param options The options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerDevOpsAuditSettingsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a server's DevOps audit settings. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be - * 'default'. + * @param devOpsAuditingSettingsName * @param options The options parameters. */ get( resourceGroupName: string, serverName: string, - devOpsAuditingSettingsName: string, + devOpsAuditingSettingsName: DevOpsAuditingSettingsName, options?: ServerDevOpsAuditSettingsGetOptionalParams ): Promise { return this.client.sendOperationRequest( @@ -148,15 +166,14 @@ export class ServerDevOpsAuditSettingsImpl * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be - * 'default'. + * @param devOpsAuditingSettingsName * @param parameters Properties of DevOps audit settings * @param options The options parameters. */ async beginCreateOrUpdate( resourceGroupName: string, serverName: string, - devOpsAuditingSettingsName: string, + devOpsAuditingSettingsName: DevOpsAuditingSettingsName, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams ): Promise< @@ -229,15 +246,14 @@ export class ServerDevOpsAuditSettingsImpl * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be - * 'default'. + * @param devOpsAuditingSettingsName * @param parameters Properties of DevOps audit settings * @param options The options parameters. */ async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, - devOpsAuditingSettingsName: string, + devOpsAuditingSettingsName: DevOpsAuditingSettingsName, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams ): Promise { @@ -251,24 +267,6 @@ export class ServerDevOpsAuditSettingsImpl return poller.pollUntilDone(); } - /** - * Lists DevOps audit settings of a server. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param options The options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerDevOpsAuditSettingsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -292,6 +290,26 @@ export class ServerDevOpsAuditSettingsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerDevOpsAuditSettingsListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings/{devOpsAuditingSettingsName}", @@ -302,12 +320,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.devOpsAuditingSettingsName ], headerParameters: [Parameters.accept], @@ -332,39 +350,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters61, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters83, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.devOpsAuditingSettingsName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/devOpsAuditingSettings", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerDevOpsAuditSettingsListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -376,9 +374,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverDnsAliases.ts b/sdk/sql/arm-sql/src/operations/serverDnsAliases.ts index 121074191084..36360ce4b7db 100644 --- a/sdk/sql/arm-sql/src/operations/serverDnsAliases.ts +++ b/sdk/sql/arm-sql/src/operations/serverDnsAliases.ts @@ -125,6 +125,24 @@ export class ServerDnsAliasesImpl implements ServerDnsAliases { } } + /** + * 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerDnsAliasesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a server DNS alias. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -328,24 +346,6 @@ export class ServerDnsAliasesImpl implements ServerDnsAliases { return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerDnsAliasesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * Acquires server DNS alias from another server. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -468,6 +468,26 @@ export class ServerDnsAliasesImpl implements ServerDnsAliases { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerDnsAliasListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", @@ -478,12 +498,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.dnsAliasName ], headerParameters: [Parameters.accept], @@ -508,12 +528,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.dnsAliasName ], headerParameters: [Parameters.accept], @@ -524,34 +544,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases/{dnsAliasName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.dnsAliasName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/dnsAliases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerDnsAliasListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.dnsAliasName ], - headerParameters: [Parameters.accept], serializer }; const acquireOperationSpec: coreClient.OperationSpec = { @@ -573,13 +573,13 @@ const acquireOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters62, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters84, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.dnsAliasName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -597,9 +597,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverKeys.ts b/sdk/sql/arm-sql/src/operations/serverKeys.ts index 93ff032e951a..bd5826c8fcd0 100644 --- a/sdk/sql/arm-sql/src/operations/serverKeys.ts +++ b/sdk/sql/arm-sql/src/operations/serverKeys.ts @@ -387,12 +387,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -407,12 +407,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.keyName ], headerParameters: [Parameters.accept], @@ -437,13 +437,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters63, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters85, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.keyName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -455,12 +455,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/keys/{keyName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.keyName ], serializer @@ -476,9 +476,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverOperations.ts b/sdk/sql/arm-sql/src/operations/serverOperations.ts index 013860eb26bc..9cf84209a1c2 100644 --- a/sdk/sql/arm-sql/src/operations/serverOperations.ts +++ b/sdk/sql/arm-sql/src/operations/serverOperations.ts @@ -166,12 +166,12 @@ const listByServerOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -187,9 +187,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts index c1d541b8c37e..c10e79397ef7 100644 --- a/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operations/serverSecurityAlertPolicies.ts @@ -20,7 +20,7 @@ import { ServerSecurityAlertPoliciesListByServerNextOptionalParams, ServerSecurityAlertPoliciesListByServerOptionalParams, ServerSecurityAlertPoliciesListByServerResponse, - SecurityAlertPolicyName, + SecurityAlertPolicyNameAutoGenerated, ServerSecurityAlertPoliciesGetOptionalParams, ServerSecurityAlertPoliciesGetResponse, ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams, @@ -123,6 +123,24 @@ export class ServerSecurityAlertPoliciesImpl } } + /** + * 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerSecurityAlertPoliciesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Get a server's security alert policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -134,7 +152,7 @@ export class ServerSecurityAlertPoliciesImpl get( resourceGroupName: string, serverName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, options?: ServerSecurityAlertPoliciesGetOptionalParams ): Promise { return this.client.sendOperationRequest( @@ -155,7 +173,7 @@ export class ServerSecurityAlertPoliciesImpl async beginCreateOrUpdate( resourceGroupName: string, serverName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise< @@ -234,7 +252,7 @@ export class ServerSecurityAlertPoliciesImpl async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise { @@ -248,24 +266,6 @@ export class ServerSecurityAlertPoliciesImpl return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerSecurityAlertPoliciesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -289,6 +289,26 @@ export class ServerSecurityAlertPoliciesImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogicalServerSecurityAlertPolicyListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/{securityAlertPolicyName}", @@ -299,13 +319,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.securityAlertPolicyName + Parameters.subscriptionId, + Parameters.securityAlertPolicyName1 ], headerParameters: [Parameters.accept], serializer @@ -329,39 +349,19 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters64, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters86, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.securityAlertPolicyName + Parameters.subscriptionId, + Parameters.securityAlertPolicyName1 ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LogicalServerSecurityAlertPolicyListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByServerNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -373,9 +373,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/serverTrustCertificates.ts b/sdk/sql/arm-sql/src/operations/serverTrustCertificates.ts new file mode 100644 index 000000000000..9fb592379b13 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/serverTrustCertificates.ts @@ -0,0 +1,492 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { ServerTrustCertificates } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + ServerTrustCertificate, + ServerTrustCertificatesListByInstanceNextOptionalParams, + ServerTrustCertificatesListByInstanceOptionalParams, + ServerTrustCertificatesListByInstanceResponse, + ServerTrustCertificatesGetOptionalParams, + ServerTrustCertificatesGetResponse, + ServerTrustCertificatesCreateOrUpdateOptionalParams, + ServerTrustCertificatesCreateOrUpdateResponse, + ServerTrustCertificatesDeleteOptionalParams, + ServerTrustCertificatesListByInstanceNextResponse +} from "../models"; + +/// +/** Class containing ServerTrustCertificates operations. */ +export class ServerTrustCertificatesImpl implements ServerTrustCertificates { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class ServerTrustCertificates class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql 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 options parameters. + */ + public listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerTrustCertificatesListByInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerTrustCertificatesListByInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: ServerTrustCertificatesListByInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerTrustCertificatesListByInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerTrustCertificatesListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + + /** + * Gets a server trust certificate that was uploaded from box to Sql 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 certificateName Name of of the certificate to get. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + options?: ServerTrustCertificatesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, certificateName, options }, + getOperationSpec + ); + } + + /** + * Uploads a server trust certificate from box to Sql 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 certificateName Name of of the certificate to upload. + * @param parameters The server trust certificate info. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + parameters: ServerTrustCertificate, + options?: ServerTrustCertificatesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ServerTrustCertificatesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + managedInstanceName, + certificateName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Uploads a server trust certificate from box to Sql 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 certificateName Name of of the certificate to upload. + * @param parameters The server trust certificate info. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + parameters: ServerTrustCertificate, + options?: ServerTrustCertificatesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + managedInstanceName, + certificateName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes a server trust certificate that was uploaded from box to Sql 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 certificateName Name of of the certificate to delete. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + options?: ServerTrustCertificatesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, managedInstanceName, certificateName, options }, + deleteOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Deletes a server trust certificate that was uploaded from box to Sql 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 certificateName Name of of the certificate to delete. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + options?: ServerTrustCertificatesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + managedInstanceName, + certificateName, + options + ); + return poller.pollUntilDone(); + } + + /** + * ListByInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByInstance method. + * @param options The options parameters. + */ + private _listByInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: ServerTrustCertificatesListByInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerTrustCertificatesListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerTrustCertificate + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.certificateName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ServerTrustCertificate + }, + 201: { + bodyMapper: Mappers.ServerTrustCertificate + }, + 202: { + bodyMapper: Mappers.ServerTrustCertificate + }, + 204: { + bodyMapper: Mappers.ServerTrustCertificate + }, + default: {} + }, + requestBody: Parameters.parameters87, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.certificateName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustCertificates/{certificateName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.certificateName + ], + serializer +}; +const listByInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerTrustCertificatesListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/serverTrustGroups.ts b/sdk/sql/arm-sql/src/operations/serverTrustGroups.ts index 429fff707d42..e689599c6124 100644 --- a/sdk/sql/arm-sql/src/operations/serverTrustGroups.ts +++ b/sdk/sql/arm-sql/src/operations/serverTrustGroups.ts @@ -215,6 +215,24 @@ export class ServerTrustGroupsImpl implements ServerTrustGroups { } } + /** + * Lists a server trust 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 options The options parameters. + */ + private _listByLocation( + resourceGroupName: string, + locationName: string, + options?: ServerTrustGroupsListByLocationOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, locationName, options }, + listByLocationOperationSpec + ); + } + /** * Gets a server trust group. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -429,24 +447,6 @@ export class ServerTrustGroupsImpl implements ServerTrustGroups { return poller.pollUntilDone(); } - /** - * Lists a server trust 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 options The options parameters. - */ - private _listByLocation( - resourceGroupName: string, - locationName: string, - options?: ServerTrustGroupsListByLocationOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, locationName, options }, - listByLocationOperationSpec - ); - } - /** * Gets a server trust groups by instance name. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -508,6 +508,26 @@ export class ServerTrustGroupsImpl implements ServerTrustGroups { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByLocationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerTrustGroupListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.locationName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}", @@ -518,11 +538,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.serverTrustGroupName ], @@ -548,12 +568,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters65, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters88, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.serverTrustGroupName ], @@ -566,36 +586,16 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups/{serverTrustGroupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.locationName, Parameters.serverTrustGroupName ], serializer }; -const listByLocationOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/locations/{locationName}/serverTrustGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerTrustGroupListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.locationName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByInstanceOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/serverTrustGroups", @@ -606,11 +606,11 @@ const listByInstanceOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -627,8 +627,8 @@ const listByLocationNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.locationName ], @@ -646,8 +646,8 @@ const listByInstanceNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.managedInstanceName ], diff --git a/sdk/sql/arm-sql/src/operations/serverUsages.ts b/sdk/sql/arm-sql/src/operations/serverUsages.ts index f4b83e359898..aa7d28217d4d 100644 --- a/sdk/sql/arm-sql/src/operations/serverUsages.ts +++ b/sdk/sql/arm-sql/src/operations/serverUsages.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; import { ServerUsages } from "../operationsInterfaces"; import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; @@ -14,8 +15,10 @@ import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; import { ServerUsage, + ServerUsagesListByServerNextOptionalParams, ServerUsagesListByServerOptionalParams, - ServerUsagesListByServerResponse + ServerUsagesListByServerResponse, + ServerUsagesListByServerNextResponse } from "../models"; /// @@ -32,7 +35,7 @@ export class ServerUsagesImpl implements ServerUsages { } /** - * Returns server usages. + * Gets 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. @@ -73,11 +76,29 @@ export class ServerUsagesImpl implements ServerUsages { resourceGroupName: string, serverName: string, options?: ServerUsagesListByServerOptionalParams, - _settings?: PageSettings + settings?: PageSettings ): AsyncIterableIterator { let result: ServerUsagesListByServerResponse; - result = await this._listByServer(resourceGroupName, serverName, options); - yield result.value || []; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByServer(resourceGroupName, serverName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServerNext( + resourceGroupName, + serverName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } } private async *listByServerPagingAll( @@ -95,7 +116,7 @@ export class ServerUsagesImpl implements ServerUsages { } /** - * Returns server usages. + * Gets 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. @@ -111,6 +132,26 @@ export class ServerUsagesImpl implements ServerUsages { listByServerOperationSpec ); } + + /** + * ListByServerNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param nextLink The nextLink from the previous successful call to the ListByServer method. + * @param options The options parameters. + */ + private _listByServerNext( + resourceGroupName: string, + serverName: string, + nextLink: string, + options?: ServerUsagesListByServerNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, nextLink, options }, + listByServerNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -122,14 +163,34 @@ const listByServerOperationSpec: coreClient.OperationSpec = { responses: { 200: { bodyMapper: Mappers.ServerUsageListResult - } + }, + default: {} }, queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByServerNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerUsageListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/serverVulnerabilityAssessments.ts b/sdk/sql/arm-sql/src/operations/serverVulnerabilityAssessments.ts index 7fe58d35a8f8..e0e6db89ef09 100644 --- a/sdk/sql/arm-sql/src/operations/serverVulnerabilityAssessments.ts +++ b/sdk/sql/arm-sql/src/operations/serverVulnerabilityAssessments.ts @@ -122,6 +122,24 @@ export class ServerVulnerabilityAssessmentsImpl } } + /** + * 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerVulnerabilityAssessmentsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets the server's vulnerability assessment. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -192,24 +210,6 @@ export class ServerVulnerabilityAssessmentsImpl ); } - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerVulnerabilityAssessmentsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -233,6 +233,26 @@ export class ServerVulnerabilityAssessmentsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerVulnerabilityAssessmentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", @@ -243,12 +263,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName ], headerParameters: [Parameters.accept], @@ -267,13 +287,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters66, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters89, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.vulnerabilityAssessmentName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -285,34 +305,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}", httpMethod: "DELETE", responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.vulnerabilityAssessmentName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerVulnerabilityAssessmentListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.vulnerabilityAssessmentName ], - headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -326,9 +326,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/servers.ts b/sdk/sql/arm-sql/src/operations/servers.ts index 07acdf208510..86ea5102dcc3 100644 --- a/sdk/sql/arm-sql/src/operations/servers.ts +++ b/sdk/sql/arm-sql/src/operations/servers.ts @@ -17,12 +17,15 @@ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; import { LroImpl } from "../lroImpl"; import { Server, - ServersListByResourceGroupNextOptionalParams, - ServersListByResourceGroupOptionalParams, - ServersListByResourceGroupResponse, ServersListNextOptionalParams, ServersListOptionalParams, ServersListResponse, + ServersListByResourceGroupNextOptionalParams, + ServersListByResourceGroupOptionalParams, + ServersListByResourceGroupResponse, + CheckNameAvailabilityRequest, + ServersCheckNameAvailabilityOptionalParams, + ServersCheckNameAvailabilityResponse, ServersGetOptionalParams, ServersGetResponse, ServersCreateOrUpdateOptionalParams, @@ -34,11 +37,10 @@ import { ImportNewDatabaseDefinition, ServersImportDatabaseOptionalParams, ServersImportDatabaseResponse, - CheckNameAvailabilityRequest, - ServersCheckNameAvailabilityOptionalParams, - ServersCheckNameAvailabilityResponse, - ServersListByResourceGroupNextResponse, - ServersListNextResponse + ServersRefreshStatusOptionalParams, + ServersRefreshStatusResponse, + ServersListNextResponse, + ServersListByResourceGroupNextResponse } from "../models"; /// @@ -55,16 +57,13 @@ export class ServersImpl implements Servers { } /** - * 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. + * Gets a list of all servers in the subscription. * @param options The options parameters. */ - public listByResourceGroup( - resourceGroupName: string, - options?: ServersListByResourceGroupOptionalParams + public list( + options?: ServersListOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); + const iter = this.listPagingAll(options); return { next() { return iter.next(); @@ -76,35 +75,26 @@ export class ServersImpl implements Servers { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByResourceGroupPagingPage( - resourceGroupName, - options, - settings - ); + return this.listPagingPage(options, settings); } }; } - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ServersListByResourceGroupOptionalParams, + private async *listPagingPage( + options?: ServersListOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: ServersListByResourceGroupResponse; + let result: ServersListResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByResourceGroup(resourceGroupName, options); + result = await this._list(options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); + result = await this._listNext(continuationToken, options); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -112,26 +102,25 @@ export class ServersImpl implements Servers { } } - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ServersListByResourceGroupOptionalParams + private async *listPagingAll( + options?: ServersListOptionalParams ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { + for await (const page of this.listPagingPage(options)) { yield* page; } } /** - * Gets a list of all servers in the subscription. + * 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 options parameters. */ - public list( - options?: ServersListOptionalParams + public listByResourceGroup( + resourceGroupName: string, + options?: ServersListByResourceGroupOptionalParams ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); + const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); return { next() { return iter.next(); @@ -143,26 +132,35 @@ export class ServersImpl implements Servers { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listPagingPage(options, settings); + return this.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings + ); } }; } - private async *listPagingPage( - options?: ServersListOptionalParams, + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ServersListByResourceGroupOptionalParams, settings?: PageSettings ): AsyncIterableIterator { - let result: ServersListResponse; + let result: ServersListByResourceGroupResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._list(options); + result = await this._listByResourceGroup(resourceGroupName, options); let page = result.value || []; continuationToken = result.nextLink; setContinuationToken(page, continuationToken); yield page; } while (continuationToken) { - result = await this._listNext(continuationToken, options); + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options + ); continuationToken = result.nextLink; let page = result.value || []; setContinuationToken(page, continuationToken); @@ -170,14 +168,43 @@ export class ServersImpl implements Servers { } } - private async *listPagingAll( - options?: ServersListOptionalParams + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ServersListByResourceGroupOptionalParams ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { yield* page; } } + /** + * Determines whether a resource can be created with the specified name. + * @param parameters The name availability request parameters. + * @param options The options parameters. + */ + checkNameAvailability( + parameters: CheckNameAvailabilityRequest, + options?: ServersCheckNameAvailabilityOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { parameters, options }, + checkNameAvailabilityOperationSpec + ); + } + + /** + * Gets a list of all servers in the subscription. + * @param options The options parameters. + */ + private _list( + options?: ServersListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + /** * Gets a list of servers in a resource groups. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -481,16 +508,6 @@ export class ServersImpl implements Servers { return poller.pollUntilDone(); } - /** - * Gets a list of all servers in the subscription. - * @param options The options parameters. - */ - private _list( - options?: ServersListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - /** * Imports a bacpac into a new database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -586,36 +603,93 @@ export class ServersImpl implements Servers { } /** - * Determines whether a resource can be created with the specified name. - * @param parameters The name availability request parameters. + * Refresh external governance enablement status. + * @param resourceGroupName The name of the resource group that contains 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 options parameters. */ - checkNameAvailability( - parameters: CheckNameAvailabilityRequest, - options?: ServersCheckNameAvailabilityOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { parameters, options }, - checkNameAvailabilityOperationSpec + async beginRefreshStatus( + resourceGroupName: string, + serverName: string, + options?: ServersRefreshStatusOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ServersRefreshStatusResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, serverName, options }, + refreshStatusOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; } /** - * ListByResourceGroupNext + * Refresh external governance enablement status. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param serverName The name of the server. * @param options The options parameters. */ - private _listByResourceGroupNext( + async beginRefreshStatusAndWait( resourceGroupName: string, - nextLink: string, - options?: ServersListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec + serverName: string, + options?: ServersRefreshStatusOptionalParams + ): Promise { + const poller = await this.beginRefreshStatus( + resourceGroupName, + serverName, + options ); + return poller.pollUntilDone(); } /** @@ -632,10 +706,59 @@ export class ServersImpl implements Servers { listNextOperationSpec ); } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. + * @param options The options parameters. + */ + private _listByResourceGroupNext( + resourceGroupName: string, + nextLink: string, + options?: ServersListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityResponse + }, + default: {} + }, + requestBody: Parameters.parameters90, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ServerListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.expand], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; const listByResourceGroupOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers", @@ -646,11 +769,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3, Parameters.expand], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -665,12 +788,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3, Parameters.expand], + queryParameters: [Parameters.apiVersion, Parameters.expand], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -694,13 +817,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters80, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters91, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -711,12 +834,12 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], serializer }; @@ -739,32 +862,18 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters81, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters92, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServerListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion3, Parameters.expand], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; const importDatabaseOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import", @@ -784,36 +893,48 @@ const importDatabaseOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters82, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters93, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const checkNameAvailabilityOperationSpec: coreClient.OperationSpec = { +const refreshStatusOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/checkNameAvailability", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/refreshExternalGovernanceStatus", httpMethod: "POST", responses: { 200: { - bodyMapper: Mappers.CheckNameAvailabilityResponse + bodyMapper: Mappers.RefreshExternalGovernanceStatusOperationResult + }, + 201: { + bodyMapper: Mappers.RefreshExternalGovernanceStatusOperationResult + }, + 202: { + bodyMapper: Mappers.RefreshExternalGovernanceStatusOperationResult + }, + 204: { + bodyMapper: Mappers.RefreshExternalGovernanceStatusOperationResult }, default: {} }, - requestBody: Parameters.parameters83, - queryParameters: [Parameters.apiVersion3], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], serializer }; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { +const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -825,13 +946,12 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { urlParameters: [ Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, Parameters.nextLink ], headerParameters: [Parameters.accept], serializer }; -const listNextOperationSpec: coreClient.OperationSpec = { +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { @@ -842,6 +962,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, Parameters.subscriptionId, Parameters.nextLink ], diff --git a/sdk/sql/arm-sql/src/operations/serviceObjectives.ts b/sdk/sql/arm-sql/src/operations/serviceObjectives.ts deleted file mode 100644 index f0dc3077156f..000000000000 --- a/sdk/sql/arm-sql/src/operations/serviceObjectives.ts +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { ServiceObjectives } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { SqlManagementClient } from "../sqlManagementClient"; -import { - ServiceObjective, - ServiceObjectivesListByServerOptionalParams, - ServiceObjectivesListByServerResponse, - ServiceObjectivesGetOptionalParams, - ServiceObjectivesGetResponse -} from "../models"; - -/// -/** Class containing ServiceObjectives operations. */ -export class ServiceObjectivesImpl implements ServiceObjectives { - private readonly client: SqlManagementClient; - - /** - * Initialize a new instance of the class ServiceObjectives class. - * @param client Reference to the service client - */ - constructor(client: SqlManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public listByServer( - resourceGroupName: string, - serverName: string, - options?: ServiceObjectivesListByServerOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByServerPagingAll( - resourceGroupName, - serverName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: (settings?: PageSettings) => { - if (settings?.maxPageSize) { - throw new Error("maxPageSize is not supported by this operation."); - } - return this.listByServerPagingPage( - resourceGroupName, - serverName, - options, - settings - ); - } - }; - } - - private async *listByServerPagingPage( - resourceGroupName: string, - serverName: string, - options?: ServiceObjectivesListByServerOptionalParams, - _settings?: PageSettings - ): AsyncIterableIterator { - let result: ServiceObjectivesListByServerResponse; - result = await this._listByServer(resourceGroupName, serverName, options); - yield result.value || []; - } - - private async *listByServerPagingAll( - resourceGroupName: string, - serverName: string, - options?: ServiceObjectivesListByServerOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByServerPagingPage( - resourceGroupName, - serverName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - serverName: string, - serviceObjectiveName: string, - options?: ServiceObjectivesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, serviceObjectiveName, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: ServiceObjectivesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives/{serviceObjectiveName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceObjective - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.serviceObjectiveName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/serviceObjectives", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ServiceObjectiveListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/sql/arm-sql/src/operations/sqlAgent.ts b/sdk/sql/arm-sql/src/operations/sqlAgent.ts index a5601ff58f3d..3427c9040ee3 100644 --- a/sdk/sql/arm-sql/src/operations/sqlAgent.ts +++ b/sdk/sql/arm-sql/src/operations/sqlAgent.ts @@ -82,11 +82,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept], @@ -102,12 +102,12 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters67, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters94, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.managedInstanceName ], headerParameters: [Parameters.accept, Parameters.contentType], diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentBaseline.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentBaseline.ts new file mode 100644 index 000000000000..15aae44b6e82 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentBaseline.ts @@ -0,0 +1,284 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SqlVulnerabilityAssessmentBaseline } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + DatabaseSqlVulnerabilityAssessmentBaselineSet, + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextOptionalParams, + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams, + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentResponse, + BaselineName, + SqlVulnerabilityAssessmentBaselineGetOptionalParams, + SqlVulnerabilityAssessmentBaselineGetResponse, + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextResponse +} from "../models"; + +/// +/** Class containing SqlVulnerabilityAssessmentBaseline operations. */ +export class SqlVulnerabilityAssessmentBaselineImpl + implements SqlVulnerabilityAssessmentBaseline { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentBaseline class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + public listBySqlVulnerabilityAssessment( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySqlVulnerabilityAssessmentPagingAll( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySqlVulnerabilityAssessmentPagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options, + settings + ); + } + }; + } + + private async *listBySqlVulnerabilityAssessmentPagingPage( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySqlVulnerabilityAssessment( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySqlVulnerabilityAssessmentNext( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySqlVulnerabilityAssessmentPagingAll( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySqlVulnerabilityAssessmentPagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessment( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams + ): Promise< + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, vulnerabilityAssessmentName, options }, + listBySqlVulnerabilityAssessmentOperationSpec + ); + } + + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentBaselineGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + options + }, + getOperationSpec + ); + } + + /** + * ListBySqlVulnerabilityAssessmentNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param nextLink The nextLink from the previous successful call to the + * ListBySqlVulnerabilityAssessment method. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessmentNext( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + nextLink: string, + options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextOptionalParams + ): Promise< + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + nextLink, + options + }, + listBySqlVulnerabilityAssessmentNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySqlVulnerabilityAssessmentOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSetListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSet + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySqlVulnerabilityAssessmentNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSetListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentBaselines.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentBaselines.ts new file mode 100644 index 000000000000..c18709105d0a --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentBaselines.ts @@ -0,0 +1,92 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SqlVulnerabilityAssessmentBaselines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + VulnerabilityAssessmentName, + BaselineName, + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams, + SqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse +} from "../models"; + +/** Class containing SqlVulnerabilityAssessmentBaselines operations. */ +export class SqlVulnerabilityAssessmentBaselinesImpl + implements SqlVulnerabilityAssessmentBaselines { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentBaselines class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Add a database's vulnerability assessment rule baseline 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 serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + options?: SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentBaselineSet + }, + default: {} + }, + requestBody: Parameters.parameters13, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentExecuteScan.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentExecuteScan.ts new file mode 100644 index 000000000000..602f8352486c --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentExecuteScan.ts @@ -0,0 +1,140 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SqlVulnerabilityAssessmentExecuteScan } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; +import { + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams +} from "../models"; + +/** Class containing SqlVulnerabilityAssessmentExecuteScan operations. */ +export class SqlVulnerabilityAssessmentExecuteScanImpl + implements SqlVulnerabilityAssessmentExecuteScan { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentExecuteScan class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + async beginExecute( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, serverName, vulnerabilityAssessmentName, options }, + executeOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + async beginExecuteAndWait( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise { + const poller = await this.beginExecute( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const executeOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/initiateScan", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentRuleBaseline.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentRuleBaseline.ts new file mode 100644 index 000000000000..50c81e5f7a4d --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentRuleBaseline.ts @@ -0,0 +1,369 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SqlVulnerabilityAssessmentRuleBaseline } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + DatabaseSqlVulnerabilityAssessmentRuleBaseline, + VulnerabilityAssessmentName, + BaselineName, + SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineListByBaselineResponse, + SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineGetResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateResponse, + SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextResponse +} from "../models"; + +/// +/** Class containing SqlVulnerabilityAssessmentRuleBaseline operations. */ +export class SqlVulnerabilityAssessmentRuleBaselineImpl + implements SqlVulnerabilityAssessmentRuleBaseline { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentRuleBaseline class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets a system database's sql 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + public listByBaseline( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams + ): PagedAsyncIterableIterator< + DatabaseSqlVulnerabilityAssessmentRuleBaseline + > { + const iter = this.listByBaselinePagingAll( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByBaselinePagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + options, + settings + ); + } + }; + } + + private async *listByBaselinePagingPage( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SqlVulnerabilityAssessmentRuleBaselineListByBaselineResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByBaseline( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByBaselineNext( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByBaselinePagingAll( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByBaselinePagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + options + )) { + yield* page; + } + } + + /** + * Gets a system database's sql 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + private _listByBaseline( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + options + }, + listByBaselineOperationSpec + ); + } + + /** + * Gets a system database's sql 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + ruleId, + options + }, + getOperationSpec + ); + } + + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + options?: SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + ruleId, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * ListByBaselineNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param nextLink The nextLink from the previous successful call to the ListByBaseline method. + * @param options The options parameters. + */ + private _listByBaselineNext( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + nextLink: string, + options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + nextLink, + options + }, + listByBaselineNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByBaselineOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaseline + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName, + Parameters.ruleId + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaseline + }, + default: {} + }, + requestBody: Parameters.parameters14, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName, + Parameters.ruleId + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByBaselineNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: + Mappers.DatabaseSqlVulnerabilityAssessmentRuleBaselineListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentRuleBaselines.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentRuleBaselines.ts new file mode 100644 index 000000000000..79ac40471908 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentRuleBaselines.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SqlVulnerabilityAssessmentRuleBaselines } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + VulnerabilityAssessmentName, + BaselineName, + SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams +} from "../models"; + +/** Class containing SqlVulnerabilityAssessmentRuleBaselines operations. */ +export class SqlVulnerabilityAssessmentRuleBaselinesImpl + implements SqlVulnerabilityAssessmentRuleBaselines { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentRuleBaselines class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + baselineName, + ruleId, + options + }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/baselines/{baselineName}/rules/{ruleId}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.baselineName, + Parameters.ruleId + ], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentScanResult.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentScanResult.ts new file mode 100644 index 000000000000..d68a0c20574a --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentScanResult.ts @@ -0,0 +1,302 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SqlVulnerabilityAssessmentScanResult } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SqlVulnerabilityAssessmentScanResults, + SQLVulnerabilityAssessmentName, + SqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams, + SqlVulnerabilityAssessmentScanResultListByScanOptionalParams, + SqlVulnerabilityAssessmentScanResultListByScanResponse, + SqlVulnerabilityAssessmentScanResultGetOptionalParams, + SqlVulnerabilityAssessmentScanResultGetResponse, + SqlVulnerabilityAssessmentScanResultListByScanNextResponse +} from "../models"; + +/// +/** Class containing SqlVulnerabilityAssessmentScanResult operations. */ +export class SqlVulnerabilityAssessmentScanResultImpl + implements SqlVulnerabilityAssessmentScanResult { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentScanResult class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param options The options parameters. + */ + public listByScan( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByScanPagingAll( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByScanPagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + options, + settings + ); + } + }; + } + + private async *listByScanPagingPage( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScanResultListByScanOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SqlVulnerabilityAssessmentScanResultListByScanResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByScan( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByScanNext( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByScanPagingAll( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByScanPagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + options + )) { + yield* page; + } + } + + /** + * 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param options The options parameters. + */ + private _listByScan( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + options + }, + listByScanOperationSpec + ); + } + + /** + * 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param scanResultId The scan result id of the specific result to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + scanResultId: string, + options?: SqlVulnerabilityAssessmentScanResultGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + scanResultId, + options + }, + getOperationSpec + ); + } + + /** + * ListByScanNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param nextLink The nextLink from the previous successful call to the ListByScan method. + * @param options The options parameters. + */ + private _listByScanNext( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + nextLink: string, + options?: SqlVulnerabilityAssessmentScanResultListByScanNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + nextLink, + options + }, + listByScanNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByScanOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SQLVulnerabilityAssessmentScanListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName1, + Parameters.scanId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanResults + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName1, + Parameters.scanId, + Parameters.scanResultId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByScanNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SQLVulnerabilityAssessmentScanListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName1, + Parameters.scanId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..93f8dc4ea0c8 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentScans.ts @@ -0,0 +1,281 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SqlVulnerabilityAssessmentScans } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SqlVulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams, + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams, + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse, + SqlVulnerabilityAssessmentScansGetOptionalParams, + SqlVulnerabilityAssessmentScansGetResponse, + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse +} from "../models"; + +/// +/** Class containing SqlVulnerabilityAssessmentScans operations. */ +export class SqlVulnerabilityAssessmentScansImpl + implements SqlVulnerabilityAssessmentScans { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentScans class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + public listBySqlVulnerabilityAssessments( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBySqlVulnerabilityAssessmentsPagingAll( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listBySqlVulnerabilityAssessmentsPagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options, + settings + ); + } + }; + } + + private async *listBySqlVulnerabilityAssessmentsPagingPage( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listBySqlVulnerabilityAssessments( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listBySqlVulnerabilityAssessmentsNext( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listBySqlVulnerabilityAssessmentsPagingAll( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBySqlVulnerabilityAssessmentsPagingPage( + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + options + )) { + yield* page; + } + } + + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessments( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): Promise< + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsResponse + > { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, vulnerabilityAssessmentName, options }, + listBySqlVulnerabilityAssessmentsOperationSpec + ); + } + + /** + * Get a system database vulnerability assessment scan record. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScansGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + scanId, + options + }, + getOperationSpec + ); + } + + /** + * ListBySqlVulnerabilityAssessmentsNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param nextLink The nextLink from the previous successful call to the + * ListBySqlVulnerabilityAssessments method. + * @param options The options parameters. + */ + private _listBySqlVulnerabilityAssessmentsNext( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + nextLink: string, + options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextOptionalParams + ): Promise< + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsNextResponse + > { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + nextLink, + options + }, + listBySqlVulnerabilityAssessmentsNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listBySqlVulnerabilityAssessmentsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanRecordListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanRecord + }, + default: {} + }, + queryParameters: [Parameters.apiVersion, Parameters.systemDatabaseName], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName, + Parameters.scanId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listBySqlVulnerabilityAssessmentsNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentScanRecordListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessments.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessments.ts new file mode 100644 index 000000000000..03e1a5319ed1 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessments.ts @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { SqlVulnerabilityAssessments } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentsDeleteOptionalParams +} from "../models"; + +/** Class containing SqlVulnerabilityAssessments operations. */ +export class SqlVulnerabilityAssessmentsImpl + implements SqlVulnerabilityAssessments { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessments class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Removes SQL 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentsDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, vulnerabilityAssessmentName, options }, + deleteOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentsSettings.ts b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentsSettings.ts new file mode 100644 index 000000000000..fe304e952774 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/sqlVulnerabilityAssessmentsSettings.ts @@ -0,0 +1,299 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SqlVulnerabilityAssessmentsSettings } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SqlVulnerabilityAssessment, + SqlVulnerabilityAssessmentsSettingsListByServerNextOptionalParams, + SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams, + SqlVulnerabilityAssessmentsSettingsListByServerResponse, + SqlVulnerabilityAssessmentName, + SqlVulnerabilityAssessmentsSettingsGetOptionalParams, + SqlVulnerabilityAssessmentsSettingsGetResponse, + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams, + SqlVulnerabilityAssessmentsSettingsCreateOrUpdateResponse, + SqlVulnerabilityAssessmentsSettingsListByServerNextResponse +} from "../models"; + +/// +/** Class containing SqlVulnerabilityAssessmentsSettings operations. */ +export class SqlVulnerabilityAssessmentsSettingsImpl + implements SqlVulnerabilityAssessmentsSettings { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SqlVulnerabilityAssessmentsSettings class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Lists SQL 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 options parameters. + */ + public listByServer( + resourceGroupName: string, + serverName: string, + options?: SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByServerPagingAll( + resourceGroupName, + serverName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByServerPagingPage( + resourceGroupName, + serverName, + options, + settings + ); + } + }; + } + + private async *listByServerPagingPage( + resourceGroupName: string, + serverName: string, + options?: SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SqlVulnerabilityAssessmentsSettingsListByServerResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByServer(resourceGroupName, serverName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByServerNext( + resourceGroupName, + serverName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByServerPagingAll( + resourceGroupName: string, + serverName: string, + options?: SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByServerPagingPage( + resourceGroupName, + serverName, + options + )) { + yield* page; + } + } + + /** + * Lists SQL 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + + /** + * Gets SQL Vulnerability Assessment 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentsSettingsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, vulnerabilityAssessmentName, options }, + getOperationSpec + ); + } + + /** + * Creates or updates SQL Vulnerability Assessment 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param parameters The requested resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + parameters: SqlVulnerabilityAssessment, + options?: SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + vulnerabilityAssessmentName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * ListByServerNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param nextLink The nextLink from the previous successful call to the ListByServer method. + * @param options The options parameters. + */ + private _listByServerNext( + resourceGroupName: string, + serverName: string, + nextLink: string, + options?: SqlVulnerabilityAssessmentsSettingsListByServerNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, nextLink, options }, + listByServerNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessment + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName2 + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessment + }, + 201: { + bodyMapper: Mappers.SqlVulnerabilityAssessment + }, + default: {} + }, + requestBody: Parameters.parameters95, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.vulnerabilityAssessmentName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listByServerNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlVulnerabilityAssessmentListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/startStopManagedInstanceSchedules.ts b/sdk/sql/arm-sql/src/operations/startStopManagedInstanceSchedules.ts new file mode 100644 index 000000000000..343e94f2dd34 --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/startStopManagedInstanceSchedules.ts @@ -0,0 +1,348 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { StartStopManagedInstanceSchedules } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + StartStopManagedInstanceSchedule, + StartStopManagedInstanceSchedulesListByInstanceNextOptionalParams, + StartStopManagedInstanceSchedulesListByInstanceOptionalParams, + StartStopManagedInstanceSchedulesListByInstanceResponse, + StartStopScheduleName, + StartStopManagedInstanceSchedulesGetOptionalParams, + StartStopManagedInstanceSchedulesGetResponse, + StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams, + StartStopManagedInstanceSchedulesCreateOrUpdateResponse, + StartStopManagedInstanceSchedulesDeleteOptionalParams, + StartStopManagedInstanceSchedulesListByInstanceNextResponse +} from "../models"; + +/// +/** Class containing StartStopManagedInstanceSchedules operations. */ +export class StartStopManagedInstanceSchedulesImpl + implements StartStopManagedInstanceSchedules { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class StartStopManagedInstanceSchedules class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Lists the managed instance's Start/Stop schedules. + * @param resourceGroupName The 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 options parameters. + */ + public listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: StartStopManagedInstanceSchedulesListByInstanceOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByInstancePagingAll( + resourceGroupName, + managedInstanceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options, + settings + ); + } + }; + } + + private async *listByInstancePagingPage( + resourceGroupName: string, + managedInstanceName: string, + options?: StartStopManagedInstanceSchedulesListByInstanceOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: StartStopManagedInstanceSchedulesListByInstanceResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByInstance( + resourceGroupName, + managedInstanceName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByInstanceNext( + resourceGroupName, + managedInstanceName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByInstancePagingAll( + resourceGroupName: string, + managedInstanceName: string, + options?: StartStopManagedInstanceSchedulesListByInstanceOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByInstancePagingPage( + resourceGroupName, + managedInstanceName, + options + )) { + yield* page; + } + } + + /** + * Lists the managed instance's Start/Stop schedules. + * @param resourceGroupName The 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 options parameters. + */ + private _listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: StartStopManagedInstanceSchedulesListByInstanceOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, options }, + listByInstanceOperationSpec + ); + } + + /** + * Gets the managed instance's Start/Stop schedule. + * @param resourceGroupName The 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 startStopScheduleName Name of the managed instance Start/Stop schedule. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + startStopScheduleName: StartStopScheduleName, + options?: StartStopManagedInstanceSchedulesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + startStopScheduleName, + options + }, + getOperationSpec + ); + } + + /** + * Creates or updates the managed instance's Start/Stop schedule. + * @param resourceGroupName The 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 startStopScheduleName Name of the managed instance Start/Stop schedule. + * @param parameters The requested managed instance Start/Stop schedule. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + startStopScheduleName: StartStopScheduleName, + parameters: StartStopManagedInstanceSchedule, + options?: StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + startStopScheduleName, + parameters, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Deletes the managed instance's Start/Stop schedule. + * @param resourceGroupName The 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 startStopScheduleName Name of the managed instance Start/Stop schedule. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + managedInstanceName: string, + startStopScheduleName: StartStopScheduleName, + options?: StartStopManagedInstanceSchedulesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + managedInstanceName, + startStopScheduleName, + options + }, + deleteOperationSpec + ); + } + + /** + * ListByInstanceNext + * @param resourceGroupName The 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 nextLink The nextLink from the previous successful call to the ListByInstance method. + * @param options The options parameters. + */ + private _listByInstanceNext( + resourceGroupName: string, + managedInstanceName: string, + nextLink: string, + options?: StartStopManagedInstanceSchedulesListByInstanceNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, managedInstanceName, nextLink, options }, + listByInstanceNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByInstanceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StartStopManagedInstanceScheduleListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StartStopManagedInstanceSchedule + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.startStopScheduleName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.StartStopManagedInstanceSchedule + }, + 201: { + bodyMapper: Mappers.StartStopManagedInstanceSchedule + }, + default: {} + }, + requestBody: Parameters.parameters96, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.startStopScheduleName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}", + httpMethod: "DELETE", + responses: { 200: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.managedInstanceName, + Parameters.startStopScheduleName + ], + serializer +}; +const listByInstanceNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.StartStopManagedInstanceScheduleListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.managedInstanceName + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/subscriptionUsages.ts b/sdk/sql/arm-sql/src/operations/subscriptionUsages.ts index c81d4a018732..379b8de8a0eb 100644 --- a/sdk/sql/arm-sql/src/operations/subscriptionUsages.ts +++ b/sdk/sql/arm-sql/src/operations/subscriptionUsages.ts @@ -163,7 +163,7 @@ const listByLocationOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -182,7 +182,7 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/sql/arm-sql/src/operations/synapseLinkWorkspaces.ts b/sdk/sql/arm-sql/src/operations/synapseLinkWorkspaces.ts new file mode 100644 index 000000000000..399513c4407d --- /dev/null +++ b/sdk/sql/arm-sql/src/operations/synapseLinkWorkspaces.ts @@ -0,0 +1,216 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; +import { setContinuationToken } from "../pagingHelper"; +import { SynapseLinkWorkspaces } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { SqlManagementClient } from "../sqlManagementClient"; +import { + SynapseLinkWorkspace, + SynapseLinkWorkspacesListByDatabaseNextOptionalParams, + SynapseLinkWorkspacesListByDatabaseOptionalParams, + SynapseLinkWorkspacesListByDatabaseResponse, + SynapseLinkWorkspacesListByDatabaseNextResponse +} from "../models"; + +/// +/** Class containing SynapseLinkWorkspaces operations. */ +export class SynapseLinkWorkspacesImpl implements SynapseLinkWorkspaces { + private readonly client: SqlManagementClient; + + /** + * Initialize a new instance of the class SynapseLinkWorkspaces class. + * @param client Reference to the service client + */ + constructor(client: SqlManagementClient) { + this.client = client; + } + + /** + * Gets all synapselink workspaces for 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 options parameters. + */ + public listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SynapseLinkWorkspacesListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( + resourceGroupName, + serverName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: (settings?: PageSettings) => { + if (settings?.maxPageSize) { + throw new Error("maxPageSize is not supported by this operation."); + } + return this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options, + settings + ); + } + }; + } + + private async *listByDatabasePagingPage( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SynapseLinkWorkspacesListByDatabaseOptionalParams, + settings?: PageSettings + ): AsyncIterableIterator { + let result: SynapseLinkWorkspacesListByDatabaseResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabase( + resourceGroupName, + serverName, + databaseName, + options + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseNext( + resourceGroupName, + serverName, + databaseName, + continuationToken, + options + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabasePagingAll( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SynapseLinkWorkspacesListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( + resourceGroupName, + serverName, + databaseName, + options + )) { + yield* page; + } + } + + /** + * Gets all synapselink workspaces for 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SynapseLinkWorkspacesListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * ListByDatabaseNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + nextLink: string, + options?: SynapseLinkWorkspacesListByDatabaseNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, nextLink, options }, + listByDatabaseNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/linkWorkspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SynapseLinkWorkspaceListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SynapseLinkWorkspaceListResult + }, + default: {} + }, + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/sql/arm-sql/src/operations/syncAgents.ts b/sdk/sql/arm-sql/src/operations/syncAgents.ts index b9bd75c43154..ad3b682a8c19 100644 --- a/sdk/sql/arm-sql/src/operations/syncAgents.ts +++ b/sdk/sql/arm-sql/src/operations/syncAgents.ts @@ -223,6 +223,24 @@ export class SyncAgentsImpl implements SyncAgents { } } + /** + * 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: SyncAgentsListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a sync agent. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -431,24 +449,6 @@ export class SyncAgentsImpl implements SyncAgents { return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: SyncAgentsListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * Generates a sync agent key. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -534,6 +534,26 @@ export class SyncAgentsImpl implements SyncAgents { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SyncAgentListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", @@ -544,12 +564,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.syncAgentName ], headerParameters: [Parameters.accept], @@ -574,13 +594,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters68, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters97, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.syncAgentName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -592,34 +612,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.syncAgentName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SyncAgentListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.syncAgentName ], - headerParameters: [Parameters.accept], serializer }; const generateKeyOperationSpec: coreClient.OperationSpec = { @@ -632,12 +632,12 @@ const generateKeyOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.syncAgentName ], headerParameters: [Parameters.accept], @@ -653,12 +653,12 @@ const listLinkedDatabasesOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.syncAgentName ], headerParameters: [Parameters.accept], @@ -675,9 +675,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], @@ -694,9 +694,9 @@ const listLinkedDatabasesNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.syncAgentName ], diff --git a/sdk/sql/arm-sql/src/operations/syncGroups.ts b/sdk/sql/arm-sql/src/operations/syncGroups.ts index 5dfa5e776422..199f9c35d701 100644 --- a/sdk/sql/arm-sql/src/operations/syncGroups.ts +++ b/sdk/sql/arm-sql/src/operations/syncGroups.ts @@ -20,22 +20,19 @@ import { SyncGroupsListSyncDatabaseIdsNextOptionalParams, SyncGroupsListSyncDatabaseIdsOptionalParams, SyncGroupsListSyncDatabaseIdsResponse, + SyncGroup, + SyncGroupsListByDatabaseNextOptionalParams, + SyncGroupsListByDatabaseOptionalParams, + SyncGroupsListByDatabaseResponse, SyncFullSchemaProperties, SyncGroupsListHubSchemasNextOptionalParams, SyncGroupsListHubSchemasOptionalParams, SyncGroupsListHubSchemasResponse, SyncGroupLogProperties, SyncGroupsListLogsNextOptionalParams, - Enum60, + SyncGroupsType, SyncGroupsListLogsOptionalParams, SyncGroupsListLogsResponse, - SyncGroup, - SyncGroupsListByDatabaseNextOptionalParams, - SyncGroupsListByDatabaseOptionalParams, - SyncGroupsListByDatabaseResponse, - SyncGroupsRefreshHubSchemaOptionalParams, - SyncGroupsCancelSyncOptionalParams, - SyncGroupsTriggerSyncOptionalParams, SyncGroupsGetOptionalParams, SyncGroupsGetResponse, SyncGroupsCreateOrUpdateOptionalParams, @@ -43,10 +40,13 @@ import { SyncGroupsDeleteOptionalParams, SyncGroupsUpdateOptionalParams, SyncGroupsUpdateResponse, + SyncGroupsCancelSyncOptionalParams, + SyncGroupsRefreshHubSchemaOptionalParams, + SyncGroupsTriggerSyncOptionalParams, SyncGroupsListSyncDatabaseIdsNextResponse, + SyncGroupsListByDatabaseNextResponse, SyncGroupsListHubSchemasNextResponse, - SyncGroupsListLogsNextResponse, - SyncGroupsListByDatabaseNextResponse + SyncGroupsListLogsNextResponse } from "../models"; /// @@ -132,26 +132,23 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Gets a collection of hub database schemas. + * 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 syncGroupName The name of the sync group. * @param options The options parameters. */ - public listHubSchemas( + public listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, - syncGroupName: string, - options?: SyncGroupsListHubSchemasOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listHubSchemasPagingAll( + options?: SyncGroupsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabasePagingAll( resourceGroupName, serverName, databaseName, - syncGroupName, options ); return { @@ -165,11 +162,10 @@ export class SyncGroupsImpl implements SyncGroups { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listHubSchemasPagingPage( + return this.listByDatabasePagingPage( resourceGroupName, serverName, databaseName, - syncGroupName, options, settings ); @@ -177,22 +173,20 @@ export class SyncGroupsImpl implements SyncGroups { }; } - private async *listHubSchemasPagingPage( + private async *listByDatabasePagingPage( resourceGroupName: string, serverName: string, databaseName: string, - syncGroupName: string, - options?: SyncGroupsListHubSchemasOptionalParams, + options?: SyncGroupsListByDatabaseOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: SyncGroupsListHubSchemasResponse; + ): AsyncIterableIterator { + let result: SyncGroupsListByDatabaseResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listHubSchemas( + result = await this._listByDatabase( resourceGroupName, serverName, databaseName, - syncGroupName, options ); let page = result.value || []; @@ -201,11 +195,10 @@ export class SyncGroupsImpl implements SyncGroups { yield page; } while (continuationToken) { - result = await this._listHubSchemasNext( + result = await this._listByDatabaseNext( resourceGroupName, serverName, databaseName, - syncGroupName, continuationToken, options ); @@ -216,18 +209,16 @@ export class SyncGroupsImpl implements SyncGroups { } } - private async *listHubSchemasPagingAll( + private async *listByDatabasePagingAll( resourceGroupName: string, serverName: string, databaseName: string, - syncGroupName: string, - options?: SyncGroupsListHubSchemasOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listHubSchemasPagingPage( + options?: SyncGroupsListByDatabaseOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabasePagingPage( resourceGroupName, serverName, databaseName, - syncGroupName, options )) { yield* page; @@ -235,35 +226,26 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Gets a collection of sync group logs. + * 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 startTime Get logs generated after this time. - * @param endTime Get logs generated before this time. - * @param typeParam The types of logs to retrieve. * @param options The options parameters. */ - public listLogs( + public listHubSchemas( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - startTime: string, - endTime: string, - typeParam: Enum60, - options?: SyncGroupsListLogsOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listLogsPagingAll( + options?: SyncGroupsListHubSchemasOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listHubSchemasPagingAll( resourceGroupName, serverName, databaseName, syncGroupName, - startTime, - endTime, - typeParam, options ); return { @@ -277,14 +259,11 @@ export class SyncGroupsImpl implements SyncGroups { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listLogsPagingPage( + return this.listHubSchemasPagingPage( resourceGroupName, serverName, databaseName, syncGroupName, - startTime, - endTime, - typeParam, options, settings ); @@ -292,28 +271,22 @@ export class SyncGroupsImpl implements SyncGroups { }; } - private async *listLogsPagingPage( + private async *listHubSchemasPagingPage( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - startTime: string, - endTime: string, - typeParam: Enum60, - options?: SyncGroupsListLogsOptionalParams, + options?: SyncGroupsListHubSchemasOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: SyncGroupsListLogsResponse; + ): AsyncIterableIterator { + let result: SyncGroupsListHubSchemasResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listLogs( + result = await this._listHubSchemas( resourceGroupName, serverName, databaseName, syncGroupName, - startTime, - endTime, - typeParam, options ); let page = result.value || []; @@ -322,7 +295,7 @@ export class SyncGroupsImpl implements SyncGroups { yield page; } while (continuationToken) { - result = await this._listLogsNext( + result = await this._listHubSchemasNext( resourceGroupName, serverName, databaseName, @@ -337,24 +310,18 @@ export class SyncGroupsImpl implements SyncGroups { } } - private async *listLogsPagingAll( + private async *listHubSchemasPagingAll( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - startTime: string, - endTime: string, - typeParam: Enum60, - options?: SyncGroupsListLogsOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listLogsPagingPage( + options?: SyncGroupsListHubSchemasOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listHubSchemasPagingPage( resourceGroupName, serverName, databaseName, syncGroupName, - startTime, - endTime, - typeParam, options )) { yield* page; @@ -362,23 +329,35 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Lists sync groups under a hub database. + * 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 typeParam The types of logs to retrieve. * @param options The options parameters. */ - public listByDatabase( + public listLogs( resourceGroupName: string, serverName: string, databaseName: string, - options?: SyncGroupsListByDatabaseOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByDatabasePagingAll( + syncGroupName: string, + startTime: string, + endTime: string, + typeParam: SyncGroupsType, + options?: SyncGroupsListLogsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listLogsPagingAll( resourceGroupName, serverName, databaseName, + syncGroupName, + startTime, + endTime, + typeParam, options ); return { @@ -392,10 +371,14 @@ export class SyncGroupsImpl implements SyncGroups { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listByDatabasePagingPage( + return this.listLogsPagingPage( resourceGroupName, serverName, databaseName, + syncGroupName, + startTime, + endTime, + typeParam, options, settings ); @@ -403,20 +386,28 @@ export class SyncGroupsImpl implements SyncGroups { }; } - private async *listByDatabasePagingPage( + private async *listLogsPagingPage( resourceGroupName: string, serverName: string, databaseName: string, - options?: SyncGroupsListByDatabaseOptionalParams, + syncGroupName: string, + startTime: string, + endTime: string, + typeParam: SyncGroupsType, + options?: SyncGroupsListLogsOptionalParams, settings?: PageSettings - ): AsyncIterableIterator { - let result: SyncGroupsListByDatabaseResponse; + ): AsyncIterableIterator { + let result: SyncGroupsListLogsResponse; let continuationToken = settings?.continuationToken; if (!continuationToken) { - result = await this._listByDatabase( + result = await this._listLogs( resourceGroupName, serverName, databaseName, + syncGroupName, + startTime, + endTime, + typeParam, options ); let page = result.value || []; @@ -425,10 +416,11 @@ export class SyncGroupsImpl implements SyncGroups { yield page; } while (continuationToken) { - result = await this._listByDatabaseNext( + result = await this._listLogsNext( resourceGroupName, serverName, databaseName, + syncGroupName, continuationToken, options ); @@ -439,16 +431,24 @@ export class SyncGroupsImpl implements SyncGroups { } } - private async *listByDatabasePagingAll( + private async *listLogsPagingAll( resourceGroupName: string, serverName: string, databaseName: string, - options?: SyncGroupsListByDatabaseOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByDatabasePagingPage( + syncGroupName: string, + startTime: string, + endTime: string, + typeParam: SyncGroupsType, + options?: SyncGroupsListLogsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listLogsPagingPage( resourceGroupName, serverName, databaseName, + syncGroupName, + startTime, + endTime, + typeParam, options )) { yield* page; @@ -471,7 +471,27 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Refreshes a hub database schema. + * 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 options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SyncGroupsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + + /** + * 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. @@ -479,17 +499,46 @@ export class SyncGroupsImpl implements SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - async beginRefreshHubSchema( + get( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsRefreshHubSchemaOptionalParams - ): Promise, void>> { + options?: SyncGroupsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + getOperationSpec + ); + } + + /** + * 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 options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + syncGroupName: string, + parameters: SyncGroup, + options?: SyncGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SyncGroupsCreateOrUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -527,8 +576,15 @@ export class SyncGroupsImpl implements SyncGroups { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - refreshHubSchemaOperationSpec + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + parameters, + options + }, + createOrUpdateOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -539,33 +595,36 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Refreshes a hub database schema. + * 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 options parameters. */ - async beginRefreshHubSchemaAndWait( + async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsRefreshHubSchemaOptionalParams - ): Promise { - const poller = await this.beginRefreshHubSchema( + parameters: SyncGroup, + options?: SyncGroupsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( resourceGroupName, serverName, databaseName, syncGroupName, + parameters, options ); return poller.pollUntilDone(); } /** - * Gets a collection of hub database schemas. + * 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. @@ -573,149 +632,17 @@ export class SyncGroupsImpl implements SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - private _listHubSchemas( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - options?: SyncGroupsListHubSchemasOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - listHubSchemasOperationSpec - ); - } - - /** - * 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 typeParam The types of logs to retrieve. - * @param options The options parameters. - */ - private _listLogs( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - startTime: string, - endTime: string, - typeParam: Enum60, - options?: SyncGroupsListLogsOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - syncGroupName, - startTime, - endTime, - typeParam, - options - }, - listLogsOperationSpec - ); - } - - /** - * 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 options parameters. - */ - cancelSync( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - options?: SyncGroupsCancelSyncOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - cancelSyncOperationSpec - ); - } - - /** - * 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 options parameters. - */ - triggerSync( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - options?: SyncGroupsTriggerSyncOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - triggerSyncOperationSpec - ); - } - - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - options?: SyncGroupsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - async beginCreateOrUpdate( + async beginDelete( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - parameters: SyncGroup, - options?: SyncGroupsCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SyncGroupsCreateOrUpdateResponse - > - > { + options?: SyncGroupsDeleteOptionalParams + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -753,15 +680,8 @@ export class SyncGroupsImpl implements SyncGroups { const lro = new LroImpl( sendOperation, - { - resourceGroupName, - serverName, - databaseName, - syncGroupName, - parameters, - options - }, - createOrUpdateOperationSpec + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + deleteOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -772,54 +692,58 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Creates or updates a sync group. + * 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 parameters The requested sync group resource state. * @param options The options parameters. */ - async beginCreateOrUpdateAndWait( + async beginDeleteAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - parameters: SyncGroup, - options?: SyncGroupsCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( + options?: SyncGroupsDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( resourceGroupName, serverName, databaseName, syncGroupName, - parameters, options ); return poller.pollUntilDone(); } /** - * Deletes a sync group. + * 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 options parameters. */ - async beginDelete( + async beginUpdate( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsDeleteOptionalParams - ): Promise, void>> { + parameters: SyncGroup, + options?: SyncGroupsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SyncGroupsUpdateResponse + > + > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -857,8 +781,15 @@ export class SyncGroupsImpl implements SyncGroups { const lro = new LroImpl( sendOperation, - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - deleteOperationSpec + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + parameters, + options + }, + updateOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -869,58 +800,135 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Deletes a sync group. + * 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 options parameters. */ - async beginDeleteAndWait( + async beginUpdateAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( + parameters: SyncGroup, + options?: SyncGroupsUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( resourceGroupName, serverName, databaseName, syncGroupName, + parameters, options ); return poller.pollUntilDone(); } /** - * Updates a sync group. + * 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 parameters The requested sync group resource state. * @param options The options parameters. */ - async beginUpdate( + cancelSync( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - parameters: SyncGroup, - options?: SyncGroupsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SyncGroupsUpdateResponse - > - > { + options?: SyncGroupsCancelSyncOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + cancelSyncOperationSpec + ); + } + + /** + * 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 options parameters. + */ + private _listHubSchemas( + resourceGroupName: string, + serverName: string, + databaseName: string, + syncGroupName: string, + options?: SyncGroupsListHubSchemasOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + listHubSchemasOperationSpec + ); + } + + /** + * 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 typeParam The types of logs to retrieve. + * @param options The options parameters. + */ + private _listLogs( + resourceGroupName: string, + serverName: string, + databaseName: string, + syncGroupName: string, + startTime: string, + endTime: string, + typeParam: SyncGroupsType, + options?: SyncGroupsListLogsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + startTime, + endTime, + typeParam, + options + }, + listLogsOperationSpec + ); + } + + /** + * 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 options parameters. + */ + async beginRefreshHubSchema( + resourceGroupName: string, + serverName: string, + databaseName: string, + syncGroupName: string, + options?: SyncGroupsRefreshHubSchemaOptionalParams + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -958,15 +966,8 @@ export class SyncGroupsImpl implements SyncGroups { const lro = new LroImpl( sendOperation, - { - resourceGroupName, - serverName, - databaseName, - syncGroupName, - parameters, - options - }, - updateOperationSpec + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + refreshHubSchemaOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, @@ -977,51 +978,50 @@ export class SyncGroupsImpl implements SyncGroups { } /** - * Updates a sync group. + * 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 parameters The requested sync group resource state. * @param options The options parameters. */ - async beginUpdateAndWait( + async beginRefreshHubSchemaAndWait( resourceGroupName: string, serverName: string, - databaseName: string, - syncGroupName: string, - parameters: SyncGroup, - options?: SyncGroupsUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( + databaseName: string, + syncGroupName: string, + options?: SyncGroupsRefreshHubSchemaOptionalParams + ): Promise { + const poller = await this.beginRefreshHubSchema( resourceGroupName, serverName, databaseName, syncGroupName, - parameters, options ); return poller.pollUntilDone(); } /** - * Lists sync groups under a hub database. + * 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 options parameters. */ - private _listByDatabase( + triggerSync( resourceGroupName: string, serverName: string, databaseName: string, - options?: SyncGroupsListByDatabaseOptionalParams - ): Promise { + syncGroupName: string, + options?: SyncGroupsTriggerSyncOptionalParams + ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + triggerSyncOperationSpec ); } @@ -1042,6 +1042,28 @@ export class SyncGroupsImpl implements SyncGroups { ); } + /** + * ListByDatabaseNext + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. + * @param options The options parameters. + */ + private _listByDatabaseNext( + resourceGroupName: string, + serverName: string, + databaseName: string, + nextLink: string, + options?: SyncGroupsListByDatabaseNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, nextLink, options }, + listByDatabaseNextOperationSpec + ); + } + /** * ListHubSchemasNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -1103,28 +1125,6 @@ export class SyncGroupsImpl implements SyncGroups { listLogsNextOperationSpec ); } - - /** - * ListByDatabaseNext - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this 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 nextLink The nextLink from the previous successful call to the ListByDatabase method. - * @param options The options parameters. - */ - private _listByDatabaseNext( - resourceGroupName: string, - serverName: string, - databaseName: string, - nextLink: string, - options?: SyncGroupsListByDatabaseNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, nextLink, options }, - listByDatabaseNextOperationSpec - ); - } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -1139,7 +1139,7 @@ const listSyncDatabaseIdsOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -1148,104 +1148,27 @@ const listSyncDatabaseIdsOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const refreshHubSchemaOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.syncGroupName - ], - serializer -}; -const listHubSchemasOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SyncFullSchemaPropertiesListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.syncGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listLogsOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SyncGroupLogListResult + bodyMapper: Mappers.SyncGroupListResult }, default: {} }, - queryParameters: [ - Parameters.apiVersion2, - Parameters.startTime1, - Parameters.endTime1, - Parameters.typeParam, - Parameters.continuationToken - ], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.syncGroupName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const cancelSyncOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.syncGroupName - ], - serializer -}; -const triggerSyncOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync", - httpMethod: "POST", - responses: { 200: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.syncGroupName - ], - serializer -}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", @@ -1256,13 +1179,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName ], headerParameters: [Parameters.accept], @@ -1287,14 +1210,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters98, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -1306,13 +1229,13 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName ], serializer @@ -1336,41 +1259,118 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters69, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters98, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const cancelSyncOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/cancelSync", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.syncGroupName + ], + serializer +}; +const listHubSchemasOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SyncGroupListResult + bodyMapper: Mappers.SyncFullSchemaPropertiesListResult }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, Parameters.subscriptionId, + Parameters.syncGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const listLogsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SyncGroupLogListResult + }, + default: {} + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.startTime1, + Parameters.endTime1, + Parameters.typeParam, + Parameters.continuationToken + ], + urlParameters: [ + Parameters.$host, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.syncGroupName ], headerParameters: [Parameters.accept], serializer }; +const refreshHubSchemaOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.syncGroupName + ], + serializer +}; +const triggerSyncOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync", + httpMethod: "POST", + responses: { 200: {}, default: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.syncGroupName + ], + serializer +}; const listSyncDatabaseIdsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -1389,64 +1389,64 @@ const listSyncDatabaseIdsNextOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const listHubSchemasNextOperationSpec: coreClient.OperationSpec = { +const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SyncFullSchemaPropertiesListResult + bodyMapper: Mappers.SyncGroupListResult }, default: {} }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.nextLink, - Parameters.syncGroupName + Parameters.subscriptionId, + Parameters.nextLink ], headerParameters: [Parameters.accept], serializer }; -const listLogsNextOperationSpec: coreClient.OperationSpec = { +const listHubSchemasNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SyncGroupLogListResult + bodyMapper: Mappers.SyncFullSchemaPropertiesListResult }, default: {} }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.syncGroupName ], headerParameters: [Parameters.accept], serializer }; -const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { +const listLogsNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SyncGroupListResult + bodyMapper: Mappers.SyncGroupLogListResult }, default: {} }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.nextLink + Parameters.subscriptionId, + Parameters.nextLink, + Parameters.syncGroupName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/sql/arm-sql/src/operations/syncMembers.ts b/sdk/sql/arm-sql/src/operations/syncMembers.ts index 4da469cdf666..6f6b56cdd3f0 100644 --- a/sdk/sql/arm-sql/src/operations/syncMembers.ts +++ b/sdk/sql/arm-sql/src/operations/syncMembers.ts @@ -264,6 +264,28 @@ export class SyncMembersImpl implements SyncMembers { } } + /** + * 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 options parameters. + */ + private _listBySyncGroup( + resourceGroupName: string, + serverName: string, + databaseName: string, + syncGroupName: string, + options?: SyncMembersListBySyncGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, syncGroupName, options }, + listBySyncGroupOperationSpec + ); + } + /** * Gets a sync member. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -635,59 +657,6 @@ export class SyncMembersImpl implements SyncMembers { return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listBySyncGroup( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - options?: SyncMembersListBySyncGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, syncGroupName, options }, - listBySyncGroupOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listMemberSchemas( - resourceGroupName: string, - serverName: string, - databaseName: string, - syncGroupName: string, - syncMemberName: string, - options?: SyncMembersListMemberSchemasOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - syncGroupName, - syncMemberName, - options - }, - listMemberSchemasOperationSpec - ); - } - /** * Refreshes a sync member database schema. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -794,6 +763,37 @@ export class SyncMembersImpl implements SyncMembers { return poller.pollUntilDone(); } + /** + * 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 options parameters. + */ + private _listMemberSchemas( + resourceGroupName: string, + serverName: string, + databaseName: string, + syncGroupName: string, + syncMemberName: string, + options?: SyncMembersListMemberSchemasOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + syncGroupName, + syncMemberName, + options + }, + listMemberSchemasOperationSpec + ); + } + /** * ListBySyncGroupNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -862,6 +862,28 @@ export class SyncMembersImpl implements SyncMembers { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listBySyncGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SyncMemberListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.syncGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", @@ -872,13 +894,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName, Parameters.syncMemberName ], @@ -904,14 +926,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters99, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName, Parameters.syncMemberName ], @@ -924,13 +946,13 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName, Parameters.syncMemberName ], @@ -955,14 +977,14 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters70, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters99, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.syncGroupName, Parameters.syncMemberName ], @@ -970,26 +992,21 @@ const updateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const listBySyncGroupOperationSpec: coreClient.OperationSpec = { +const refreshMemberSchemaOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SyncMemberListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema", + httpMethod: "POST", + responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.syncGroupName + Parameters.subscriptionId, + Parameters.syncGroupName, + Parameters.syncMemberName ], - headerParameters: [Parameters.accept], serializer }; const listMemberSchemasOperationSpec: coreClient.OperationSpec = { @@ -1002,34 +1019,17 @@ const listMemberSchemasOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.syncGroupName, - Parameters.syncMemberName - ], - headerParameters: [Parameters.accept], - serializer -}; -const refreshMemberSchemaOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}/refreshSchema", - httpMethod: "POST", - responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, Parameters.syncGroupName, Parameters.syncMemberName ], + headerParameters: [Parameters.accept], serializer }; const listBySyncGroupNextOperationSpec: coreClient.OperationSpec = { @@ -1043,10 +1043,10 @@ const listBySyncGroupNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.syncGroupName ], @@ -1064,10 +1064,10 @@ const listMemberSchemasNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.syncGroupName, Parameters.syncMemberName diff --git a/sdk/sql/arm-sql/src/operations/tdeCertificates.ts b/sdk/sql/arm-sql/src/operations/tdeCertificates.ts index 60b45324a51b..898bf9530650 100644 --- a/sdk/sql/arm-sql/src/operations/tdeCertificates.ts +++ b/sdk/sql/arm-sql/src/operations/tdeCertificates.ts @@ -124,13 +124,13 @@ const createOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/tdeCertificates", httpMethod: "POST", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - requestBody: Parameters.parameters53, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters67, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.serverName + Parameters.serverName, + Parameters.subscriptionId ], headerParameters: [Parameters.contentType], mediaType: "json", diff --git a/sdk/sql/arm-sql/src/operations/timeZones.ts b/sdk/sql/arm-sql/src/operations/timeZones.ts index 56026f2bf621..2cb598dd6fd3 100644 --- a/sdk/sql/arm-sql/src/operations/timeZones.ts +++ b/sdk/sql/arm-sql/src/operations/timeZones.ts @@ -163,7 +163,7 @@ const listByLocationOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -182,7 +182,7 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/sql/arm-sql/src/operations/transparentDataEncryptions.ts b/sdk/sql/arm-sql/src/operations/transparentDataEncryptions.ts index 473e7920004b..31904322ef9c 100644 --- a/sdk/sql/arm-sql/src/operations/transparentDataEncryptions.ts +++ b/sdk/sql/arm-sql/src/operations/transparentDataEncryptions.ts @@ -13,6 +13,8 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { SqlManagementClient } from "../sqlManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; import { LogicalDatabaseTransparentDataEncryption, TransparentDataEncryptionsListByDatabaseNextOptionalParams, @@ -135,6 +137,27 @@ export class TransparentDataEncryptionsImpl } } + /** + * Gets a list of the logical database's transparent data encryption. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the logical database for which the transparent data encryption is + * defined. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: TransparentDataEncryptionsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a logical database's transparent data encryption. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -168,15 +191,60 @@ export class TransparentDataEncryptionsImpl * @param parameters The database transparent data encryption. * @param options The options parameters. */ - createOrUpdate( + async beginCreateOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, tdeName: TransparentDataEncryptionName, parameters: LogicalDatabaseTransparentDataEncryption, options?: TransparentDataEncryptionsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): Promise< + PollerLike< + PollOperationState, + TransparentDataEncryptionsCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, serverName, @@ -187,27 +255,42 @@ export class TransparentDataEncryptionsImpl }, createOrUpdateOperationSpec ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; } /** - * Gets a list of the logical database's transparent data encryption. + * Updates a logical 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 logical database for which the transparent data encryption is - * defined. + * @param databaseName The name of the logical database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. * @param options The options parameters. */ - private _listByDatabase( + async beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: TransparentDataEncryptionsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec + tdeName: TransparentDataEncryptionName, + parameters: LogicalDatabaseTransparentDataEncryption, + options?: TransparentDataEncryptionsCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + serverName, + databaseName, + tdeName, + parameters, + options ); + return poller.pollUntilDone(); } /** @@ -236,75 +319,80 @@ export class TransparentDataEncryptionsImpl // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const getOperationSpec: coreClient.OperationSpec = { +const listByDatabaseOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption + bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryptionListResult }, default: {} }, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.tdeName + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer }; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { +const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}", - httpMethod: "PUT", + httpMethod: "GET", responses: { 200: { bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption }, - 201: { - bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption - }, - 202: {}, default: {} }, - requestBody: Parameters.parameters75, - queryParameters: [Parameters.apiVersion3], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.tdeName ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", + headerParameters: [Parameters.accept], serializer }; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption", - httpMethod: "GET", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/transparentDataEncryption/{tdeName}", + httpMethod: "PUT", responses: { 200: { - bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryptionListResult + bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption + }, + 201: { + bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption + }, + 202: { + bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption + }, + 204: { + bodyMapper: Mappers.LogicalDatabaseTransparentDataEncryption }, default: {} }, - queryParameters: [Parameters.apiVersion3], + requestBody: Parameters.parameters100, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.databaseName + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.tdeName ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -318,10 +406,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/usages.ts b/sdk/sql/arm-sql/src/operations/usages.ts index 2d1e669e019a..06ce5078b66c 100644 --- a/sdk/sql/arm-sql/src/operations/usages.ts +++ b/sdk/sql/arm-sql/src/operations/usages.ts @@ -170,11 +170,11 @@ const listByInstancePoolOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion3, Parameters.expandChildren], + queryParameters: [Parameters.apiVersion, Parameters.expandChildren], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.instancePoolName ], headerParameters: [Parameters.accept], @@ -191,8 +191,8 @@ const listByInstancePoolNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.instancePoolName ], diff --git a/sdk/sql/arm-sql/src/operations/virtualClusters.ts b/sdk/sql/arm-sql/src/operations/virtualClusters.ts index 47dae588ab20..6761c8e3bdba 100644 --- a/sdk/sql/arm-sql/src/operations/virtualClusters.ts +++ b/sdk/sql/arm-sql/src/operations/virtualClusters.ts @@ -23,14 +23,14 @@ import { VirtualClustersListByResourceGroupNextOptionalParams, VirtualClustersListByResourceGroupOptionalParams, VirtualClustersListByResourceGroupResponse, - VirtualClustersUpdateDnsServersOptionalParams, - VirtualClustersUpdateDnsServersResponse, VirtualClustersGetOptionalParams, VirtualClustersGetResponse, VirtualClustersDeleteOptionalParams, VirtualClusterUpdate, VirtualClustersUpdateOptionalParams, VirtualClustersUpdateResponse, + VirtualClustersUpdateDnsServersOptionalParams, + VirtualClustersUpdateDnsServersResponse, VirtualClustersListNextResponse, VirtualClustersListByResourceGroupNextResponse } from "../models"; @@ -172,24 +172,6 @@ export class VirtualClustersImpl implements VirtualClusters { } } - /** - * Synchronizes the DNS server settings used by the managed instances inside the given 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 options parameters. - */ - updateDnsServers( - resourceGroupName: string, - virtualClusterName: string, - options?: VirtualClustersUpdateDnsServersOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, virtualClusterName, options }, - updateDnsServersOperationSpec - ); - } - /** * Gets a list of all virtualClusters in the subscription. * @param options The options parameters. @@ -319,7 +301,7 @@ export class VirtualClustersImpl implements VirtualClusters { } /** - * Updates a virtual cluster. + * Updates an existing 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. @@ -390,7 +372,7 @@ export class VirtualClustersImpl implements VirtualClusters { } /** - * Updates a virtual cluster. + * Updates an existing 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. @@ -412,6 +394,95 @@ export class VirtualClustersImpl implements VirtualClusters { return poller.pollUntilDone(); } + /** + * Synchronizes the DNS server settings used by the managed instances inside the given 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 options parameters. + */ + async beginUpdateDnsServers( + resourceGroupName: string, + virtualClusterName: string, + options?: VirtualClustersUpdateDnsServersOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualClustersUpdateDnsServersResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, virtualClusterName, options }, + updateDnsServersOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Synchronizes the DNS server settings used by the managed instances inside the given 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 options parameters. + */ + async beginUpdateDnsServersAndWait( + resourceGroupName: string, + virtualClusterName: string, + options?: VirtualClustersUpdateDnsServersOptionalParams + ): Promise { + const poller = await this.beginUpdateDnsServers( + resourceGroupName, + virtualClusterName, + options + ); + return poller.pollUntilDone(); + } + /** * ListNext * @param nextLink The nextLink from the previous successful call to the List method. @@ -448,26 +519,6 @@ export class VirtualClustersImpl implements VirtualClusters { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const updateDnsServersOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.UpdateManagedInstanceDnsServersOperation - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.virtualClusterName - ], - headerParameters: [Parameters.accept], - serializer -}; const listOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/providers/Microsoft.Sql/virtualClusters", @@ -478,7 +529,7 @@ const listOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -493,11 +544,11 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName + Parameters.resourceGroupName, + Parameters.subscriptionId ], headerParameters: [Parameters.accept], serializer @@ -512,11 +563,11 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.virtualClusterName ], headerParameters: [Parameters.accept], @@ -527,11 +578,11 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.virtualClusterName ], serializer @@ -555,18 +606,47 @@ const updateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters71, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters101, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.virtualClusterName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", serializer }; +const updateDnsServersOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/virtualClusters/{virtualClusterName}/updateManagedInstanceDnsServers", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.UpdateVirtualClusterDnsServersOperation + }, + 201: { + bodyMapper: Mappers.UpdateVirtualClusterDnsServersOperation + }, + 202: { + bodyMapper: Mappers.UpdateVirtualClusterDnsServersOperation + }, + 204: { + bodyMapper: Mappers.UpdateVirtualClusterDnsServersOperation + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.virtualClusterName + ], + headerParameters: [Parameters.accept], + serializer +}; const listNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -595,8 +675,8 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/virtualNetworkRules.ts b/sdk/sql/arm-sql/src/operations/virtualNetworkRules.ts index 55d3700d3300..6f262a81ddcf 100644 --- a/sdk/sql/arm-sql/src/operations/virtualNetworkRules.ts +++ b/sdk/sql/arm-sql/src/operations/virtualNetworkRules.ts @@ -122,6 +122,24 @@ export class VirtualNetworkRulesImpl implements VirtualNetworkRules { } } + /** + * 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 options parameters. + */ + private _listByServer( + resourceGroupName: string, + serverName: string, + options?: VirtualNetworkRulesListByServerOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, options }, + listByServerOperationSpec + ); + } + /** * Gets a virtual network rule. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -336,24 +354,6 @@ export class VirtualNetworkRulesImpl implements VirtualNetworkRules { return poller.pollUntilDone(); } - /** - * 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 options parameters. - */ - private _listByServer( - resourceGroupName: string, - serverName: string, - options?: VirtualNetworkRulesListByServerOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, options }, - listByServerOperationSpec - ); - } - /** * ListByServerNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -377,6 +377,26 @@ export class VirtualNetworkRulesImpl implements VirtualNetworkRules { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByServerOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.VirtualNetworkRuleListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", @@ -387,12 +407,12 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.virtualNetworkRuleName ], headerParameters: [Parameters.accept], @@ -417,13 +437,13 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters72, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters102, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.virtualNetworkRuleName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -435,34 +455,14 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, - Parameters.virtualNetworkRuleName - ], - serializer -}; -const listByServerOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/virtualNetworkRules", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.VirtualNetworkRuleListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName + Parameters.virtualNetworkRuleName ], - headerParameters: [Parameters.accept], serializer }; const listByServerNextOperationSpec: coreClient.OperationSpec = { @@ -476,9 +476,9 @@ const listByServerNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operations/workloadClassifiers.ts b/sdk/sql/arm-sql/src/operations/workloadClassifiers.ts index feb69c3391d9..2dc4f69677d5 100644 --- a/sdk/sql/arm-sql/src/operations/workloadClassifiers.ts +++ b/sdk/sql/arm-sql/src/operations/workloadClassifiers.ts @@ -144,6 +144,34 @@ export class WorkloadClassifiersImpl implements WorkloadClassifiers { } } + /** + * Gets the list of workload classifiers for a workload 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. + * @param workloadGroupName The name of the workload group from which to receive the classifiers from. + * @param options The options parameters. + */ + private _listByWorkloadGroup( + resourceGroupName: string, + serverName: string, + databaseName: string, + workloadGroupName: string, + options?: WorkloadClassifiersListByWorkloadGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + serverName, + databaseName, + workloadGroupName, + options + }, + listByWorkloadGroupOperationSpec + ); + } + /** * Gets a workload classifier * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -398,34 +426,6 @@ export class WorkloadClassifiersImpl implements WorkloadClassifiers { return poller.pollUntilDone(); } - /** - * Gets the list of workload classifiers for a workload 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. - * @param workloadGroupName The name of the workload group from which to receive the classifiers from. - * @param options The options parameters. - */ - private _listByWorkloadGroup( - resourceGroupName: string, - serverName: string, - databaseName: string, - workloadGroupName: string, - options?: WorkloadClassifiersListByWorkloadGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - serverName, - databaseName, - workloadGroupName, - options - }, - listByWorkloadGroupOperationSpec - ); - } - /** * ListByWorkloadGroupNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -460,6 +460,28 @@ export class WorkloadClassifiersImpl implements WorkloadClassifiers { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByWorkloadGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkloadClassifierListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId, + Parameters.workloadGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}", @@ -470,13 +492,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.workloadGroupName, Parameters.workloadClassifierName ], @@ -502,14 +524,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters73, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters103, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.workloadGroupName, Parameters.workloadClassifierName ], @@ -522,40 +544,18 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.workloadGroupName, Parameters.workloadClassifierName ], serializer }; -const listByWorkloadGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}/workloadClassifiers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadClassifierListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName, - Parameters.workloadGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; const listByWorkloadGroupNextOperationSpec: coreClient.OperationSpec = { path: "{nextLink}", httpMethod: "GET", @@ -567,10 +567,10 @@ const listByWorkloadGroupNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink, Parameters.workloadGroupName ], diff --git a/sdk/sql/arm-sql/src/operations/workloadGroups.ts b/sdk/sql/arm-sql/src/operations/workloadGroups.ts index 1acc3d0bb95c..fa31042d648c 100644 --- a/sdk/sql/arm-sql/src/operations/workloadGroups.ts +++ b/sdk/sql/arm-sql/src/operations/workloadGroups.ts @@ -135,6 +135,26 @@ export class WorkloadGroupsImpl implements WorkloadGroups { } } + /** + * Gets the list of workload 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 serverName The name of the server. + * @param databaseName The name of the database. + * @param options The options parameters. + */ + private _listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: WorkloadGroupsListByDatabaseOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, serverName, databaseName, options }, + listByDatabaseOperationSpec + ); + } + /** * Gets a workload group * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -374,26 +394,6 @@ export class WorkloadGroupsImpl implements WorkloadGroups { return poller.pollUntilDone(); } - /** - * Gets the list of workload 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 serverName The name of the server. - * @param databaseName The name of the database. - * @param options The options parameters. - */ - private _listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: WorkloadGroupsListByDatabaseOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, serverName, databaseName, options }, - listByDatabaseOperationSpec - ); - } - /** * ListByDatabaseNext * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -419,6 +419,27 @@ export class WorkloadGroupsImpl implements WorkloadGroups { // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); +const listByDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.WorkloadGroupListResult + }, + default: {} + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.resourceGroupName, + Parameters.serverName, + Parameters.databaseName, + Parameters.subscriptionId + ], + headerParameters: [Parameters.accept], + serializer +}; const getOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}", @@ -429,13 +450,13 @@ const getOperationSpec: coreClient.OperationSpec = { }, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.workloadGroupName ], headerParameters: [Parameters.accept], @@ -460,14 +481,14 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { }, default: {} }, - requestBody: Parameters.parameters74, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters104, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.workloadGroupName ], headerParameters: [Parameters.accept, Parameters.contentType], @@ -479,36 +500,15 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups/{workloadGroupName}", httpMethod: "DELETE", responses: { 200: {}, 201: {}, 202: {}, 204: {}, default: {} }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, - Parameters.workloadGroupName - ], - serializer -}; -const listByDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/workloadGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkloadGroupListResult - }, - default: {} - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.serverName, - Parameters.databaseName + Parameters.workloadGroupName ], - headerParameters: [Parameters.accept], serializer }; const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { @@ -522,10 +522,10 @@ const listByDatabaseNextOperationSpec: coreClient.OperationSpec = { }, urlParameters: [ Parameters.$host, - Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.serverName, Parameters.databaseName, + Parameters.subscriptionId, Parameters.nextLink ], headerParameters: [Parameters.accept], diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingPolicies.ts b/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingPolicies.ts index c2869cb72d2c..8923ae23a9e2 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingPolicies.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingPolicies.ts @@ -7,43 +7,48 @@ */ import { + DataMaskingPolicyName, + DataMaskingPoliciesGetOptionalParams, + DataMaskingPoliciesGetResponse, DataMaskingPolicy, DataMaskingPoliciesCreateOrUpdateOptionalParams, - DataMaskingPoliciesCreateOrUpdateResponse, - DataMaskingPoliciesGetOptionalParams, - DataMaskingPoliciesGetResponse + DataMaskingPoliciesCreateOrUpdateResponse } from "../models"; /** Interface representing a DataMaskingPolicies. */ export interface DataMaskingPolicies { /** - * Creates or updates a database data masking policy + * Gets the 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 dataMaskingPolicyName The name of the database for which the data masking policy applies. * @param options The options parameters. */ - createOrUpdate( + get( resourceGroupName: string, serverName: string, databaseName: string, - parameters: DataMaskingPolicy, - options?: DataMaskingPoliciesCreateOrUpdateOptionalParams - ): Promise; + dataMaskingPolicyName: DataMaskingPolicyName, + options?: DataMaskingPoliciesGetOptionalParams + ): Promise; /** - * Gets a database data masking policy. + * 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 dataMaskingPolicyName The name of the database for which the data masking policy applies. + * @param parameters Parameters for creating or updating a data masking policy. * @param options The options parameters. */ - get( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, - options?: DataMaskingPoliciesGetOptionalParams - ): Promise; + dataMaskingPolicyName: DataMaskingPolicyName, + parameters: DataMaskingPolicy, + options?: DataMaskingPoliciesCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingRules.ts b/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingRules.ts index 6bf212be628a..6e0a6759777b 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingRules.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/dataMaskingRules.ts @@ -9,6 +9,7 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { DataMaskingRule, + DataMaskingPolicyName, DataMaskingRulesListByDatabaseOptionalParams, DataMaskingRulesCreateOrUpdateOptionalParams, DataMaskingRulesCreateOrUpdateResponse @@ -23,12 +24,14 @@ export interface DataMaskingRules { * this 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 dataMaskingPolicyName The name of the database for which the data masking rule applies. * @param options The options parameters. */ listByDatabase( resourceGroupName: string, serverName: string, databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, options?: DataMaskingRulesListByDatabaseOptionalParams ): PagedAsyncIterableIterator; /** @@ -37,6 +40,7 @@ export interface DataMaskingRules { * this 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 dataMaskingPolicyName The name of the database for which the data masking policy applies. * @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 options parameters. @@ -45,6 +49,7 @@ export interface DataMaskingRules { resourceGroupName: string, serverName: string, databaseName: string, + dataMaskingPolicyName: DataMaskingPolicyName, dataMaskingRuleName: string, parameters: DataMaskingRule, options?: DataMaskingRulesCreateOrUpdateOptionalParams diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..4008a4eeffe0 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseAdvancedThreatProtectionSettings.ts @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DatabaseAdvancedThreatProtection, + DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams, + AdvancedThreatProtectionName, + DatabaseAdvancedThreatProtectionSettingsGetOptionalParams, + DatabaseAdvancedThreatProtectionSettingsGetResponse, + DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a DatabaseAdvancedThreatProtectionSettings. */ +export interface DatabaseAdvancedThreatProtectionSettings { + /** + * Gets a list of database's Advanced Threat Protection states. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 options parameters. + */ + listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a database's Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: DatabaseAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise; + /** + * Creates or updates a database's Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The database Advanced Threat Protection state. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: DatabaseAdvancedThreatProtection, + options?: DatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseEncryptionProtectors.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseEncryptionProtectors.ts new file mode 100644 index 000000000000..8e5beb9c2b64 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseEncryptionProtectors.ts @@ -0,0 +1,82 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + EncryptionProtectorName, + DatabaseEncryptionProtectorsRevalidateOptionalParams, + DatabaseEncryptionProtectorsRevertOptionalParams +} from "../models"; + +/** Interface representing a DatabaseEncryptionProtectors. */ +export interface DatabaseEncryptionProtectors { + /** + * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + beginRevalidate( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevalidateOptionalParams + ): Promise, void>>; + /** + * Revalidates an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + beginRevalidateAndWait( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevalidateOptionalParams + ): Promise; + /** + * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + beginRevert( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevertOptionalParams + ): Promise, void>>; + /** + * Reverts an existing encryption protector for a particular 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 encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + beginRevertAndWait( + resourceGroupName: string, + serverName: string, + databaseName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: DatabaseEncryptionProtectorsRevertOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseExtensionsOperations.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseExtensionsOperations.ts index 0c9064ecdb88..30d1a0dc926a 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/databaseExtensionsOperations.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseExtensionsOperations.ts @@ -51,7 +51,7 @@ export interface DatabaseExtensionsOperations { options?: DatabaseExtensionsGetOptionalParams ): Promise; /** - * Perform a database extension operation, like polybase import + * Perform a database extension operation, like database import, database export, or polybase import * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. @@ -74,7 +74,7 @@ export interface DatabaseExtensionsOperations { > >; /** - * Perform a database extension operation, like polybase import + * Perform a database extension operation, like database import, database export, or polybase import * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentBaselines.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentBaselines.ts new file mode 100644 index 000000000000..3d2865edf3e3 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentBaselines.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DatabaseSqlVulnerabilityAssessmentBaselineSet, + VulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams, + BaselineName, + DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentBaselinesGetResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams, + DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a DatabaseSqlVulnerabilityAssessmentBaselines. */ +export interface DatabaseSqlVulnerabilityAssessmentBaselines { + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + listBySqlVulnerabilityAssessment( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesListBySqlVulnerabilityAssessmentOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesGetOptionalParams + ): Promise; + /** + * Add a database's vulnerability assessment rule baseline 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 serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + options?: DatabaseSqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentExecuteScan.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentExecuteScan.ts new file mode 100644 index 000000000000..fefa1012d517 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentExecuteScan.ts @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams +} from "../models"; + +/** Interface representing a DatabaseSqlVulnerabilityAssessmentExecuteScan. */ +export interface DatabaseSqlVulnerabilityAssessmentExecuteScan { + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + beginExecute( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise, void>>; + /** + * Executes a Vulnerability Assessment database scan. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + beginExecuteAndWait( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentRuleBaselines.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentRuleBaselines.ts new file mode 100644 index 000000000000..c33b5ce65b76 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentRuleBaselines.ts @@ -0,0 +1,108 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DatabaseSqlVulnerabilityAssessmentRuleBaseline, + VulnerabilityAssessmentName, + BaselineName, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a DatabaseSqlVulnerabilityAssessmentRuleBaselines. */ +export interface DatabaseSqlVulnerabilityAssessmentRuleBaselines { + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + listByBaseline( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesListByBaselineOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a database's sql 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesGetOptionalParams + ): 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateOptionalParams + ): Promise< + DatabaseSqlVulnerabilityAssessmentRuleBaselinesCreateOrUpdateResponse + >; + /** + * 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: DatabaseSqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentScanResult.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentScanResult.ts new file mode 100644 index 000000000000..f28d111d2a45 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentScanResult.ts @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SqlVulnerabilityAssessmentScanResults, + SQLVulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams, + DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentScanResultGetResponse +} from "../models"; + +/// +/** Interface representing a DatabaseSqlVulnerabilityAssessmentScanResult. */ +export interface DatabaseSqlVulnerabilityAssessmentScanResult { + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param options The options parameters. + */ + listByScan( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a vulnerability assessment scan record of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param scanResultId The scan result id of the specific result to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + scanResultId: string, + options?: DatabaseSqlVulnerabilityAssessmentScanResultGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..8d893677cc59 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentScans.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SqlVulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams, + DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentScansGetResponse +} from "../models"; + +/// +/** Interface representing a DatabaseSqlVulnerabilityAssessmentScans. */ +export interface DatabaseSqlVulnerabilityAssessmentScans { + /** + * Lists the vulnerability assessment scans of a database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + listBySqlVulnerabilityAssessments( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a database vulnerability assessment scan 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. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + scanId: string, + options?: DatabaseSqlVulnerabilityAssessmentScansGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentsSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentsSettings.ts new file mode 100644 index 000000000000..aa2952ce6349 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseSqlVulnerabilityAssessmentsSettings.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SqlVulnerabilityAssessment, + DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams, + SqlVulnerabilityAssessmentName, + DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams, + DatabaseSqlVulnerabilityAssessmentsSettingsGetResponse +} from "../models"; + +/// +/** Interface representing a DatabaseSqlVulnerabilityAssessmentsSettings. */ +export interface DatabaseSqlVulnerabilityAssessmentsSettings { + /** + * Lists SQL 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. + * @param options The options parameters. + */ + listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets SQL Vulnerability Assessment policy for database. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param databaseName The name of the database. + * @param vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + databaseName: string, + vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName, + options?: DatabaseSqlVulnerabilityAssessmentsSettingsGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databaseVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databaseVulnerabilityAssessmentScans.ts index 660c46dc2f7d..0b4e6f45d7ec 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/databaseVulnerabilityAssessmentScans.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databaseVulnerabilityAssessmentScans.ts @@ -12,11 +12,11 @@ import { VulnerabilityAssessmentScanRecord, VulnerabilityAssessmentName, DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams, - DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams, DatabaseVulnerabilityAssessmentScansGetOptionalParams, DatabaseVulnerabilityAssessmentScansGetResponse, DatabaseVulnerabilityAssessmentScansExportOptionalParams, - DatabaseVulnerabilityAssessmentScansExportResponse + DatabaseVulnerabilityAssessmentScansExportResponse, + DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams } from "../models"; /// @@ -39,7 +39,7 @@ export interface DatabaseVulnerabilityAssessmentScans { options?: DatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams ): PagedAsyncIterableIterator; /** - * Executes a Vulnerability Assessment database scan. + * 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. @@ -48,34 +48,34 @@ export interface DatabaseVulnerabilityAssessmentScans { * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - beginInitiateScan( + get( resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams - ): Promise, void>>; + options?: DatabaseVulnerabilityAssessmentScansGetOptionalParams + ): Promise; /** - * Executes a Vulnerability Assessment database scan. + * 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 database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan Id. * @param options The options parameters. */ - beginInitiateScanAndWait( + export( resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams - ): Promise; + options?: DatabaseVulnerabilityAssessmentScansExportOptionalParams + ): Promise; /** - * Gets a vulnerability assessment scan record of a database. + * 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. @@ -84,30 +84,30 @@ export interface DatabaseVulnerabilityAssessmentScans { * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - get( + beginInitiateScan( resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: DatabaseVulnerabilityAssessmentScansGetOptionalParams - ): Promise; + options?: DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + ): Promise, void>>; /** - * Convert an existing scan result to a human readable format. If already exists nothing happens + * 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 scanned database. + * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - export( + beginInitiateScanAndWait( resourceGroupName: string, serverName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: DatabaseVulnerabilityAssessmentScansExportOptionalParams - ): Promise; + options?: DatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/databases.ts b/sdk/sql/arm-sql/src/operationsInterfaces/databases.ts index 93138a1af56e..94fde583e599 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/databases.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/databases.ts @@ -9,10 +9,6 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { - Metric, - DatabasesListMetricsOptionalParams, - MetricDefinition, - DatabasesListMetricDefinitionsOptionalParams, Database, DatabasesListByServerOptionalParams, DatabasesListByElasticPoolOptionalParams, @@ -25,55 +21,25 @@ import { DatabaseUpdate, DatabasesUpdateOptionalParams, DatabasesUpdateResponse, + ExportDatabaseDefinition, + DatabasesExportOptionalParams, + DatabasesExportResponse, DatabasesFailoverOptionalParams, + ImportExistingDatabaseDefinition, + DatabasesImportOptionalParams, + DatabasesImportResponse, + ResourceMoveDefinition, + DatabasesRenameOptionalParams, DatabasesPauseOptionalParams, DatabasesPauseResponse, DatabasesResumeOptionalParams, DatabasesResumeResponse, - DatabasesUpgradeDataWarehouseOptionalParams, - ResourceMoveDefinition, - DatabasesRenameOptionalParams, - ImportExistingDatabaseDefinition, - DatabasesImportOptionalParams, - DatabasesImportResponse, - ExportDatabaseDefinition, - DatabasesExportOptionalParams, - DatabasesExportResponse + DatabasesUpgradeDataWarehouseOptionalParams } from "../models"; /// /** Interface representing a Databases. */ export interface Databases { - /** - * 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 options parameters. - */ - listMetrics( - resourceGroupName: string, - serverName: string, - databaseName: string, - filter: string, - options?: DatabasesListMetricsOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - listMetricDefinitions( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: DatabasesListMetricDefinitionsOptionalParams - ): PagedAsyncIterableIterator; /** * Gets a list of databases. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -229,215 +195,215 @@ export interface Databases { options?: DatabasesUpdateOptionalParams ): Promise; /** - * Failovers a database. + * Exports a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to failover. + * @param databaseName The name of the database. + * @param parameters The database export request parameters. * @param options The options parameters. */ - beginFailover( + beginExport( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesFailoverOptionalParams - ): Promise, void>>; + parameters: ExportDatabaseDefinition, + options?: DatabasesExportOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DatabasesExportResponse + > + >; /** - * Failovers a database. + * Exports a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to failover. + * @param databaseName The name of the database. + * @param parameters The database export request parameters. * @param options The options parameters. */ - beginFailoverAndWait( + beginExportAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesFailoverOptionalParams - ): Promise; + parameters: ExportDatabaseDefinition, + options?: DatabasesExportOptionalParams + ): Promise; /** - * Pauses a database. + * Failovers a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be paused. + * @param databaseName The name of the database to failover. * @param options The options parameters. */ - beginPause( + beginFailover( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesPauseOptionalParams - ): Promise< - PollerLike< - PollOperationState, - DatabasesPauseResponse - > - >; + options?: DatabasesFailoverOptionalParams + ): Promise, void>>; /** - * Pauses a database. + * Failovers a database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be paused. + * @param databaseName The name of the database to failover. * @param options The options parameters. */ - beginPauseAndWait( + beginFailoverAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesPauseOptionalParams - ): Promise; + options?: DatabasesFailoverOptionalParams + ): Promise; /** - * Resumes a database. + * Imports a bacpac into a new database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be resumed. + * @param databaseName The name of the database. + * @param parameters The database import request parameters. * @param options The options parameters. */ - beginResume( + beginImport( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesResumeOptionalParams + parameters: ImportExistingDatabaseDefinition, + options?: DatabasesImportOptionalParams ): Promise< PollerLike< - PollOperationState, - DatabasesResumeResponse + PollOperationState, + DatabasesImportResponse > >; /** - * Resumes a database. + * Imports a bacpac into a new database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param databaseName The name of the database to be resumed. + * @param databaseName The name of the database. + * @param parameters The database import request parameters. * @param options The options parameters. */ - beginResumeAndWait( + beginImportAndWait( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesResumeOptionalParams - ): Promise; + parameters: ImportExistingDatabaseDefinition, + options?: DatabasesImportOptionalParams + ): Promise; /** - * Upgrades a data warehouse. + * 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 be upgraded. + * @param databaseName The name of the database to rename. + * @param parameters The resource move definition for renaming this database. * @param options The options parameters. */ - beginUpgradeDataWarehouse( + rename( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesUpgradeDataWarehouseOptionalParams - ): Promise, void>>; + parameters: ResourceMoveDefinition, + options?: DatabasesRenameOptionalParams + ): Promise; /** - * Upgrades a data warehouse. + * 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 upgraded. + * @param databaseName The name of the database to be paused. * @param options The options parameters. */ - beginUpgradeDataWarehouseAndWait( + beginPause( resourceGroupName: string, serverName: string, databaseName: string, - options?: DatabasesUpgradeDataWarehouseOptionalParams - ): Promise; + options?: DatabasesPauseOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DatabasesPauseResponse + > + >; /** - * Renames a database. + * 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 rename. - * @param parameters The resource move definition for renaming this database. + * @param databaseName The name of the database to be paused. * @param options The options parameters. */ - rename( + beginPauseAndWait( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ResourceMoveDefinition, - options?: DatabasesRenameOptionalParams - ): Promise; + options?: DatabasesPauseOptionalParams + ): Promise; /** - * Imports a bacpac into a new database. + * 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. - * @param parameters The database import request parameters. + * @param databaseName The name of the database to be resumed. * @param options The options parameters. */ - beginImport( + beginResume( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ImportExistingDatabaseDefinition, - options?: DatabasesImportOptionalParams + options?: DatabasesResumeOptionalParams ): Promise< PollerLike< - PollOperationState, - DatabasesImportResponse + PollOperationState, + DatabasesResumeResponse > >; /** - * Imports a bacpac into a new database. + * 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. - * @param parameters The database import request parameters. + * @param databaseName The name of the database to be resumed. * @param options The options parameters. */ - beginImportAndWait( + beginResumeAndWait( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ImportExistingDatabaseDefinition, - options?: DatabasesImportOptionalParams - ): Promise; + options?: DatabasesResumeOptionalParams + ): Promise; /** - * Exports a database. + * 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. - * @param parameters The database export request parameters. + * @param databaseName The name of the database to be upgraded. * @param options The options parameters. */ - beginExport( + beginUpgradeDataWarehouse( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ExportDatabaseDefinition, - options?: DatabasesExportOptionalParams - ): Promise< - PollerLike< - PollOperationState, - DatabasesExportResponse - > - >; + options?: DatabasesUpgradeDataWarehouseOptionalParams + ): Promise, void>>; /** - * Exports a database. + * 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. - * @param parameters The database export request parameters. + * @param databaseName The name of the database to be upgraded. * @param options The options parameters. */ - beginExportAndWait( + beginUpgradeDataWarehouseAndWait( resourceGroupName: string, serverName: string, databaseName: string, - parameters: ExportDatabaseDefinition, - options?: DatabasesExportOptionalParams - ): Promise; + options?: DatabasesUpgradeDataWarehouseOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/distributedAvailabilityGroups.ts b/sdk/sql/arm-sql/src/operationsInterfaces/distributedAvailabilityGroups.ts new file mode 100644 index 000000000000..579dbc46e4b5 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/distributedAvailabilityGroups.ts @@ -0,0 +1,194 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + DistributedAvailabilityGroup, + DistributedAvailabilityGroupsListByInstanceOptionalParams, + DistributedAvailabilityGroupsGetOptionalParams, + DistributedAvailabilityGroupsGetResponse, + DistributedAvailabilityGroupsCreateOrUpdateOptionalParams, + DistributedAvailabilityGroupsCreateOrUpdateResponse, + DistributedAvailabilityGroupsDeleteOptionalParams, + DistributedAvailabilityGroupsUpdateOptionalParams, + DistributedAvailabilityGroupsUpdateResponse, + DistributedAvailabilityGroupSetRole, + DistributedAvailabilityGroupsSetRoleOptionalParams, + DistributedAvailabilityGroupsSetRoleResponse +} from "../models"; + +/// +/** Interface representing a DistributedAvailabilityGroups. */ +export interface DistributedAvailabilityGroups { + /** + * Gets a list of a distributed availability groups in 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 options parameters. + */ + listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: DistributedAvailabilityGroupsListByInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a distributed availability group info. + * @param resourceGroupName The 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 distributedAvailabilityGroupName The distributed availability group name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + options?: DistributedAvailabilityGroupsGetOptionalParams + ): Promise; + /** + * Creates a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DistributedAvailabilityGroupsCreateOrUpdateResponse + > + >; + /** + * Creates a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsCreateOrUpdateOptionalParams + ): Promise; + /** + * Drops a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + options?: DistributedAvailabilityGroupsDeleteOptionalParams + ): Promise, void>>; + /** + * Drops a distributed availability group between Sql On-Prem and Sql 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 distributedAvailabilityGroupName The distributed availability group name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + options?: DistributedAvailabilityGroupsDeleteOptionalParams + ): Promise; + /** + * Updates a distributed availability group replication mode. + * @param resourceGroupName The 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DistributedAvailabilityGroupsUpdateResponse + > + >; + /** + * Updates a distributed availability group replication mode. + * @param resourceGroupName The 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 distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group info. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroup, + options?: DistributedAvailabilityGroupsUpdateOptionalParams + ): Promise; + /** + * Sets the role for managed instance in a distributed availability 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 managedInstanceName The name of the managed instance. + * @param distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group set role request parameters. + * @param options The options parameters. + */ + beginSetRole( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroupSetRole, + options?: DistributedAvailabilityGroupsSetRoleOptionalParams + ): Promise< + PollerLike< + PollOperationState, + DistributedAvailabilityGroupsSetRoleResponse + > + >; + /** + * Sets the role for managed instance in a distributed availability 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 managedInstanceName The name of the managed instance. + * @param distributedAvailabilityGroupName The distributed availability group name. + * @param parameters The distributed availability group set role request parameters. + * @param options The options parameters. + */ + beginSetRoleAndWait( + resourceGroupName: string, + managedInstanceName: string, + distributedAvailabilityGroupName: string, + parameters: DistributedAvailabilityGroupSetRole, + options?: DistributedAvailabilityGroupsSetRoleOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/elasticPoolDatabaseActivities.ts b/sdk/sql/arm-sql/src/operationsInterfaces/elasticPoolDatabaseActivities.ts deleted file mode 100644 index c89936b0d92b..000000000000 --- a/sdk/sql/arm-sql/src/operationsInterfaces/elasticPoolDatabaseActivities.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - ElasticPoolDatabaseActivity, - ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams -} from "../models"; - -/// -/** Interface representing a ElasticPoolDatabaseActivities. */ -export interface ElasticPoolDatabaseActivities { - /** - * 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 options parameters. - */ - listByElasticPool( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolDatabaseActivitiesListByElasticPoolOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/elasticPools.ts b/sdk/sql/arm-sql/src/operationsInterfaces/elasticPools.ts index 6f1cdf0e9457..502791f5aba0 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/elasticPools.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/elasticPools.ts @@ -9,10 +9,6 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { - Metric, - ElasticPoolsListMetricsOptionalParams, - MetricDefinition, - ElasticPoolsListMetricDefinitionsOptionalParams, ElasticPool, ElasticPoolsListByServerOptionalParams, ElasticPoolsGetOptionalParams, @@ -29,36 +25,6 @@ import { /// /** Interface representing a ElasticPools. */ export interface ElasticPools { - /** - * 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 options parameters. - */ - listMetrics( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - filter: string, - options?: ElasticPoolsListMetricsOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - listMetricDefinitions( - resourceGroupName: string, - serverName: string, - elasticPoolName: string, - options?: ElasticPoolsListMetricDefinitionsOptionalParams - ): PagedAsyncIterableIterator; /** * Gets all elastic pools in a server. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/endpointCertificates.ts b/sdk/sql/arm-sql/src/operationsInterfaces/endpointCertificates.ts new file mode 100644 index 000000000000..d13bb3b68936 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/endpointCertificates.ts @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + EndpointCertificate, + EndpointCertificatesListByInstanceOptionalParams, + EndpointCertificatesGetOptionalParams, + EndpointCertificatesGetResponse +} from "../models"; + +/// +/** Interface representing a EndpointCertificates. */ +export interface EndpointCertificates { + /** + * List certificates used on endpoints on the target 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 options parameters. + */ + listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: EndpointCertificatesListByInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a certificate used on the endpoint with the given id. + * @param resourceGroupName The 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 endpointType Type of the endpoint whose certificate the customer is looking for. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + endpointType: string, + options?: EndpointCertificatesGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/firewallRules.ts b/sdk/sql/arm-sql/src/operationsInterfaces/firewallRules.ts index b9045ebd226a..5f8e53550314 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/firewallRules.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/firewallRules.ts @@ -10,14 +10,14 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { FirewallRule, FirewallRulesListByServerOptionalParams, + FirewallRuleList, + FirewallRulesReplaceOptionalParams, + FirewallRulesReplaceResponse, FirewallRulesGetOptionalParams, FirewallRulesGetResponse, FirewallRulesCreateOrUpdateOptionalParams, FirewallRulesCreateOrUpdateResponse, - FirewallRulesDeleteOptionalParams, - FirewallRuleList, - FirewallRulesReplaceOptionalParams, - FirewallRulesReplaceResponse + FirewallRulesDeleteOptionalParams } from "../models"; /// @@ -35,6 +35,20 @@ export interface FirewallRules { serverName: string, options?: FirewallRulesListByServerOptionalParams ): PagedAsyncIterableIterator; + /** + * Replaces all firewall rules on the server. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param parameters A list of server firewall rules. + * @param options The options parameters. + */ + replace( + resourceGroupName: string, + serverName: string, + parameters: FirewallRuleList, + options?: FirewallRulesReplaceOptionalParams + ): Promise; /** * Gets a firewall rule. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -79,18 +93,4 @@ export interface FirewallRules { firewallRuleName: string, options?: FirewallRulesDeleteOptionalParams ): Promise; - /** - * Replaces all firewall rules on the server. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. - * @param parameters A list of server firewall rules. - * @param options The options parameters. - */ - replace( - resourceGroupName: string, - serverName: string, - parameters: FirewallRuleList, - options?: FirewallRulesReplaceOptionalParams - ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/geoBackupPolicies.ts b/sdk/sql/arm-sql/src/operationsInterfaces/geoBackupPolicies.ts index 597dd83ae5ff..3310663b5299 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/geoBackupPolicies.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/geoBackupPolicies.ts @@ -9,63 +9,63 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { GeoBackupPolicy, - GeoBackupPoliciesListByDatabaseOptionalParams, + GeoBackupPoliciesListOptionalParams, GeoBackupPolicyName, - GeoBackupPoliciesCreateOrUpdateOptionalParams, - GeoBackupPoliciesCreateOrUpdateResponse, GeoBackupPoliciesGetOptionalParams, - GeoBackupPoliciesGetResponse + GeoBackupPoliciesGetResponse, + GeoBackupPoliciesCreateOrUpdateOptionalParams, + GeoBackupPoliciesCreateOrUpdateResponse } from "../models"; /// /** Interface representing a GeoBackupPolicies. */ export interface GeoBackupPolicies { /** - * Returns a list of geo backup policies. + * Gets a list of Geo backup policies for the given database resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this 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 options parameters. */ - listByDatabase( + list( resourceGroupName: string, serverName: string, databaseName: string, - options?: GeoBackupPoliciesListByDatabaseOptionalParams + options?: GeoBackupPoliciesListOptionalParams ): PagedAsyncIterableIterator; /** - * Updates a database geo backup policy. + * Gets a Geo backup policy for the given database resource. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the geo backup policy. - * @param parameters The required parameters for creating or updating the geo backup policy. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. * @param options The options parameters. */ - createOrUpdate( + get( resourceGroupName: string, serverName: string, databaseName: string, geoBackupPolicyName: GeoBackupPolicyName, - parameters: GeoBackupPolicy, - options?: GeoBackupPoliciesCreateOrUpdateOptionalParams - ): Promise; + options?: GeoBackupPoliciesGetOptionalParams + ): Promise; /** - * Gets a geo backup policy. + * Create or update a database default Geo backup policy. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param databaseName The name of the database. - * @param geoBackupPolicyName The name of the geo backup policy. + * @param geoBackupPolicyName The name of the Geo backup policy. This should always be 'Default'. + * @param parameters The required parameters for creating or updating the geo backup policy. * @param options The options parameters. */ - get( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, geoBackupPolicyName: GeoBackupPolicyName, - options?: GeoBackupPoliciesGetOptionalParams - ): Promise; + parameters: GeoBackupPolicy, + options?: GeoBackupPoliciesCreateOrUpdateOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/iPv6FirewallRules.ts b/sdk/sql/arm-sql/src/operationsInterfaces/iPv6FirewallRules.ts new file mode 100644 index 000000000000..0dea94f58b8f --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/iPv6FirewallRules.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + IPv6FirewallRule, + IPv6FirewallRulesListByServerOptionalParams, + IPv6FirewallRulesGetOptionalParams, + IPv6FirewallRulesGetResponse, + IPv6FirewallRulesCreateOrUpdateOptionalParams, + IPv6FirewallRulesCreateOrUpdateResponse, + IPv6FirewallRulesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a IPv6FirewallRules. */ +export interface IPv6FirewallRules { + /** + * Gets a list of IPv6 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 options parameters. + */ + listByServer( + resourceGroupName: string, + serverName: string, + options?: IPv6FirewallRulesListByServerOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets an IPv6 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 options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + firewallRuleName: string, + options?: IPv6FirewallRulesGetOptionalParams + ): Promise; + /** + * Creates or updates an IPv6 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 an IPv6 firewall rule. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + firewallRuleName: string, + parameters: IPv6FirewallRule, + options?: IPv6FirewallRulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes an IPv6 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 options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + firewallRuleName: string, + options?: IPv6FirewallRulesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/index.ts b/sdk/sql/arm-sql/src/operationsInterfaces/index.ts index 717bfce71bce..24154f7c3722 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/index.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/index.ts @@ -6,58 +6,70 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./recoverableDatabases"; -export * from "./dataMaskingPolicies"; -export * from "./dataMaskingRules"; -export * from "./geoBackupPolicies"; -export * from "./databases"; -export * from "./elasticPools"; -export * from "./replicationLinks"; -export * from "./serverCommunicationLinks"; -export * from "./serviceObjectives"; -export * from "./elasticPoolActivities"; -export * from "./elasticPoolDatabaseActivities"; -export * from "./serverUsages"; -export * from "./extendedDatabaseBlobAuditingPolicies"; -export * from "./extendedServerBlobAuditingPolicies"; +export * from "./backupShortTermRetentionPolicies"; export * from "./serverBlobAuditingPolicies"; export * from "./databaseBlobAuditingPolicies"; +export * from "./extendedDatabaseBlobAuditingPolicies"; +export * from "./extendedServerBlobAuditingPolicies"; +export * from "./dataMaskingPolicies"; +export * from "./dataMaskingRules"; +export * from "./dataWarehouseUserActivitiesOperations"; +export * from "./databaseAdvancedThreatProtectionSettings"; export * from "./databaseAdvisors"; export * from "./databaseAutomaticTuningOperations"; export * from "./databaseColumns"; +export * from "./databaseEncryptionProtectors"; +export * from "./databaseExtensionsOperations"; +export * from "./databaseOperations"; export * from "./databaseRecommendedActions"; export * from "./databaseSchemas"; export * from "./databaseSecurityAlertPolicies"; +export * from "./databaseSqlVulnerabilityAssessmentBaselines"; +export * from "./databaseSqlVulnerabilityAssessmentExecuteScan"; +export * from "./databaseSqlVulnerabilityAssessmentRuleBaselines"; +export * from "./databaseSqlVulnerabilityAssessmentScanResult"; +export * from "./databaseSqlVulnerabilityAssessmentScans"; +export * from "./databaseSqlVulnerabilityAssessmentsSettings"; export * from "./databaseTables"; +export * from "./databaseUsages"; export * from "./databaseVulnerabilityAssessmentRuleBaselines"; -export * from "./databaseVulnerabilityAssessments"; export * from "./databaseVulnerabilityAssessmentScans"; -export * from "./dataWarehouseUserActivitiesOperations"; +export * from "./databaseVulnerabilityAssessments"; +export * from "./databases"; export * from "./deletedServers"; +export * from "./distributedAvailabilityGroups"; export * from "./elasticPoolOperations"; +export * from "./elasticPools"; export * from "./encryptionProtectors"; +export * from "./endpointCertificates"; export * from "./failoverGroups"; export * from "./firewallRules"; +export * from "./geoBackupPolicies"; +export * from "./iPv6FirewallRules"; export * from "./instanceFailoverGroups"; export * from "./instancePools"; 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 "./jobs"; +export * from "./ledgerDigestUploadsOperations"; export * from "./capabilities"; +export * from "./longTermRetentionBackups"; +export * from "./longTermRetentionManagedInstanceBackups"; export * from "./longTermRetentionPolicies"; export * from "./maintenanceWindowOptionsOperations"; export * from "./maintenanceWindowsOperations"; export * from "./managedBackupShortTermRetentionPolicies"; +export * from "./managedDatabaseAdvancedThreatProtectionSettings"; export * from "./managedDatabaseColumns"; +export * from "./managedDatabaseMoveOperations"; export * from "./managedDatabaseQueries"; export * from "./managedDatabaseRestoreDetails"; -export * from "./managedDatabases"; export * from "./managedDatabaseSchemas"; export * from "./managedDatabaseSecurityAlertPolicies"; export * from "./managedDatabaseSecurityEvents"; @@ -66,10 +78,13 @@ export * from "./managedDatabaseRecommendedSensitivityLabels"; export * from "./managedDatabaseTables"; export * from "./managedDatabaseTransparentDataEncryption"; export * from "./managedDatabaseVulnerabilityAssessmentRuleBaselines"; -export * from "./managedDatabaseVulnerabilityAssessments"; export * from "./managedDatabaseVulnerabilityAssessmentScans"; +export * from "./managedDatabaseVulnerabilityAssessments"; +export * from "./managedDatabases"; export * from "./managedInstanceAdministrators"; +export * from "./managedInstanceAdvancedThreatProtectionSettings"; export * from "./managedInstanceAzureADOnlyAuthentications"; +export * from "./managedInstanceDtcs"; export * from "./managedInstanceEncryptionProtectors"; export * from "./managedInstanceKeys"; export * from "./managedInstanceLongTermRetentionPolicies"; @@ -78,50 +93,61 @@ export * from "./managedInstancePrivateEndpointConnections"; export * from "./managedInstancePrivateLinkResources"; export * from "./managedInstanceTdeCertificates"; export * from "./managedInstanceVulnerabilityAssessments"; +export * from "./managedInstances"; +export * from "./managedLedgerDigestUploadsOperations"; export * from "./managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies"; +export * from "./managedServerDnsAliases"; export * from "./managedServerSecurityAlertPolicies"; export * from "./operations"; -export * from "./operationsHealthOperations"; +export * from "./outboundFirewallRules"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; +export * from "./recoverableDatabases"; export * from "./recoverableManagedDatabases"; +export * from "./replicationLinks"; +export * from "./restorableDroppedDatabases"; +export * from "./restorableDroppedManagedDatabases"; export * from "./restorePoints"; export * from "./sensitivityLabels"; export * from "./recommendedSensitivityLabels"; +export * from "./serverAdvancedThreatProtectionSettings"; export * from "./serverAdvisors"; export * from "./serverAutomaticTuningOperations"; export * from "./serverAzureADAdministrators"; export * from "./serverAzureADOnlyAuthentications"; +export * from "./serverConfigurationOptions"; +export * from "./serverConnectionPolicies"; export * from "./serverDevOpsAuditSettings"; export * from "./serverDnsAliases"; export * from "./serverKeys"; export * from "./serverOperations"; export * from "./serverSecurityAlertPolicies"; +export * from "./serverTrustCertificates"; export * from "./serverTrustGroups"; +export * from "./serverUsages"; export * from "./serverVulnerabilityAssessments"; +export * from "./servers"; export * from "./sqlAgent"; +export * from "./sqlVulnerabilityAssessmentBaseline"; +export * from "./sqlVulnerabilityAssessmentBaselines"; +export * from "./sqlVulnerabilityAssessmentExecuteScan"; +export * from "./sqlVulnerabilityAssessmentRuleBaseline"; +export * from "./sqlVulnerabilityAssessmentRuleBaselines"; +export * from "./sqlVulnerabilityAssessmentScanResult"; +export * from "./sqlVulnerabilityAssessmentScans"; +export * from "./sqlVulnerabilityAssessmentsSettings"; +export * from "./sqlVulnerabilityAssessments"; +export * from "./startStopManagedInstanceSchedules"; export * from "./subscriptionUsages"; +export * from "./synapseLinkWorkspaces"; export * from "./syncAgents"; export * from "./syncGroups"; export * from "./syncMembers"; export * from "./tdeCertificates"; export * from "./timeZones"; +export * from "./transparentDataEncryptions"; +export * from "./usages"; export * from "./virtualClusters"; export * from "./virtualNetworkRules"; export * from "./workloadClassifiers"; export * from "./workloadGroups"; -export * from "./transparentDataEncryptions"; -export * from "./backupShortTermRetentionPolicies"; -export * from "./databaseExtensionsOperations"; -export * from "./databaseOperations"; -export * from "./databaseUsages"; -export * from "./ledgerDigestUploadsOperations"; -export * from "./outboundFirewallRules"; -export * from "./servers"; -export * from "./usages"; -export * from "./longTermRetentionBackups"; -export * from "./longTermRetentionManagedInstanceBackups"; -export * from "./managedInstances"; -export * from "./restorableDroppedDatabases"; -export * from "./restorableDroppedManagedDatabases"; -export * from "./serverConnectionPolicies"; diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/instancePools.ts b/sdk/sql/arm-sql/src/operationsInterfaces/instancePools.ts index bac8c12b273c..d6f49165a886 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/instancePools.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/instancePools.ts @@ -10,8 +10,8 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { InstancePool, - InstancePoolsListByResourceGroupOptionalParams, InstancePoolsListOptionalParams, + InstancePoolsListByResourceGroupOptionalParams, InstancePoolsGetOptionalParams, InstancePoolsGetResponse, InstancePoolsCreateOrUpdateOptionalParams, @@ -25,6 +25,13 @@ import { /// /** Interface representing a InstancePools. */ export interface InstancePools { + /** + * Gets a list of all instance pools in the subscription. + * @param options The options parameters. + */ + list( + options?: InstancePoolsListOptionalParams + ): PagedAsyncIterableIterator; /** * Gets a list of instance pools in the resource group * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -35,13 +42,6 @@ export interface InstancePools { resourceGroupName: string, options?: InstancePoolsListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; - /** - * Gets a list of all instance pools in the subscription. - * @param options The options parameters. - */ - list( - options?: InstancePoolsListOptionalParams - ): PagedAsyncIterableIterator; /** * Gets an instance pool. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/jobExecutions.ts b/sdk/sql/arm-sql/src/operationsInterfaces/jobExecutions.ts index d7aa1c71c1b8..051a2c27a8eb 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/jobExecutions.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/jobExecutions.ts @@ -12,13 +12,13 @@ import { JobExecution, JobExecutionsListByAgentOptionalParams, JobExecutionsListByJobOptionalParams, - JobExecutionsCancelOptionalParams, - JobExecutionsCreateOptionalParams, - JobExecutionsCreateResponse, JobExecutionsGetOptionalParams, JobExecutionsGetResponse, JobExecutionsCreateOrUpdateOptionalParams, - JobExecutionsCreateOrUpdateResponse + JobExecutionsCreateOrUpdateResponse, + JobExecutionsCancelOptionalParams, + JobExecutionsCreateOptionalParams, + JobExecutionsCreateResponse } from "../models"; /// @@ -55,117 +55,117 @@ export interface JobExecutions { options?: JobExecutionsListByJobOptionalParams ): PagedAsyncIterableIterator; /** - * Requests cancellation of a job execution. + * 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 to cancel. + * @param jobExecutionId The id of the job execution * @param options The options parameters. */ - cancel( + get( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobExecutionsCancelOptionalParams - ): Promise; + options?: JobExecutionsGetOptionalParams + ): Promise; /** - * Starts an elastic job execution. + * 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 options parameters. */ - beginCreate( + beginCreateOrUpdate( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobExecutionsCreateOptionalParams + jobExecutionId: string, + options?: JobExecutionsCreateOrUpdateOptionalParams ): Promise< PollerLike< - PollOperationState, - JobExecutionsCreateResponse + PollOperationState, + JobExecutionsCreateOrUpdateResponse > >; /** - * Starts an elastic job execution. + * 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 options parameters. */ - beginCreateAndWait( + beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - options?: JobExecutionsCreateOptionalParams - ): Promise; + jobExecutionId: string, + options?: JobExecutionsCreateOrUpdateOptionalParams + ): Promise; /** - * Gets a job execution. + * 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 + * @param jobExecutionId The id of the job execution to cancel. * @param options The options parameters. */ - get( + cancel( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobExecutionsGetOptionalParams - ): Promise; + options?: JobExecutionsCancelOptionalParams + ): Promise; /** - * Creates or updates a job execution. + * 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 jobExecutionId The job execution id to create the job execution under. * @param options The options parameters. */ - beginCreateOrUpdate( + beginCreate( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobExecutionId: string, - options?: JobExecutionsCreateOrUpdateOptionalParams + options?: JobExecutionsCreateOptionalParams ): Promise< PollerLike< - PollOperationState, - JobExecutionsCreateOrUpdateResponse + PollOperationState, + JobExecutionsCreateResponse > >; /** - * Creates or updates a job execution. + * 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 jobExecutionId The job execution id to create the job execution under. * @param options The options parameters. */ - beginCreateOrUpdateAndWait( + beginCreateAndWait( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, - jobExecutionId: string, - options?: JobExecutionsCreateOrUpdateOptionalParams - ): Promise; + options?: JobExecutionsCreateOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/jobSteps.ts b/sdk/sql/arm-sql/src/operationsInterfaces/jobSteps.ts index a6b38d15ea5b..6d1be1898afd 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/jobSteps.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/jobSteps.ts @@ -9,38 +9,20 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { JobStep, - JobStepsListByVersionOptionalParams, JobStepsListByJobOptionalParams, - JobStepsGetByVersionOptionalParams, - JobStepsGetByVersionResponse, + JobStepsListByVersionOptionalParams, JobStepsGetOptionalParams, JobStepsGetResponse, JobStepsCreateOrUpdateOptionalParams, JobStepsCreateOrUpdateResponse, - JobStepsDeleteOptionalParams + JobStepsDeleteOptionalParams, + JobStepsGetByVersionOptionalParams, + JobStepsGetByVersionResponse } from "../models"; /// /** Interface representing a JobSteps. */ export interface JobSteps { - /** - * 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 options parameters. - */ - listByVersion( - resourceGroupName: string, - serverName: string, - jobAgentName: string, - jobName: string, - jobVersion: number, - options?: JobStepsListByVersionOptionalParams - ): PagedAsyncIterableIterator; /** * 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 @@ -58,25 +40,23 @@ export interface JobSteps { options?: JobStepsListByJobOptionalParams ): PagedAsyncIterableIterator; /** - * Gets the specified version of a job step. + * 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. + * @param jobName The name of the job to get. * @param jobVersion The version of the job to get. - * @param stepName The name of the job step. * @param options The options parameters. */ - getByVersion( + listByVersion( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, - stepName: string, - options?: JobStepsGetByVersionOptionalParams - ): Promise; + options?: JobStepsListByVersionOptionalParams + ): PagedAsyncIterableIterator; /** * 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 @@ -133,4 +113,24 @@ export interface JobSteps { stepName: string, options?: JobStepsDeleteOptionalParams ): 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 options parameters. + */ + getByVersion( + resourceGroupName: string, + serverName: string, + jobAgentName: string, + jobName: string, + jobVersion: number, + stepName: string, + options?: JobStepsGetByVersionOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/jobTargetExecutions.ts b/sdk/sql/arm-sql/src/operationsInterfaces/jobTargetExecutions.ts index 9fc54e524215..7559b110bf62 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/jobTargetExecutions.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/jobTargetExecutions.ts @@ -9,8 +9,8 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { JobExecution, - JobTargetExecutionsListByJobExecutionOptionalParams, JobTargetExecutionsListByStepOptionalParams, + JobTargetExecutionsListByJobExecutionOptionalParams, JobTargetExecutionsGetOptionalParams, JobTargetExecutionsGetResponse } from "../models"; @@ -19,42 +19,42 @@ import { /** Interface representing a JobTargetExecutions. */ export interface JobTargetExecutions { /** - * Lists target executions for all steps of a job execution. + * 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 options parameters. */ - listByJobExecution( + listByStep( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - options?: JobTargetExecutionsListByJobExecutionOptionalParams + stepName: string, + options?: JobTargetExecutionsListByStepOptionalParams ): PagedAsyncIterableIterator; /** - * Lists the target executions of a job step execution. + * 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 stepName The name of the step. * @param options The options parameters. */ - listByStep( + listByJobExecution( resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, - stepName: string, - options?: JobTargetExecutionsListByStepOptionalParams + options?: JobTargetExecutionsListByJobExecutionOptionalParams ): PagedAsyncIterableIterator; /** * Gets a target execution. diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionBackups.ts b/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionBackups.ts index d53526992a1b..32a9373a3051 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionBackups.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionBackups.ts @@ -10,46 +10,33 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { LongTermRetentionBackup, - LongTermRetentionBackupsListByDatabaseOptionalParams, LongTermRetentionBackupsListByLocationOptionalParams, LongTermRetentionBackupsListByServerOptionalParams, - LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams, + LongTermRetentionBackupsListByDatabaseOptionalParams, LongTermRetentionBackupsListByResourceGroupLocationOptionalParams, LongTermRetentionBackupsListByResourceGroupServerOptionalParams, + LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams, + LongTermRetentionBackupsGetOptionalParams, + LongTermRetentionBackupsGetResponse, + LongTermRetentionBackupsDeleteOptionalParams, CopyLongTermRetentionBackupParameters, LongTermRetentionBackupsCopyOptionalParams, LongTermRetentionBackupsCopyResponse, UpdateLongTermRetentionBackupParameters, LongTermRetentionBackupsUpdateOptionalParams, LongTermRetentionBackupsUpdateResponse, - LongTermRetentionBackupsGetOptionalParams, - LongTermRetentionBackupsGetResponse, - LongTermRetentionBackupsDeleteOptionalParams, + LongTermRetentionBackupsGetByResourceGroupOptionalParams, + LongTermRetentionBackupsGetByResourceGroupResponse, + LongTermRetentionBackupsDeleteByResourceGroupOptionalParams, LongTermRetentionBackupsCopyByResourceGroupOptionalParams, LongTermRetentionBackupsCopyByResourceGroupResponse, LongTermRetentionBackupsUpdateByResourceGroupOptionalParams, - LongTermRetentionBackupsUpdateByResourceGroupResponse, - LongTermRetentionBackupsGetByResourceGroupOptionalParams, - LongTermRetentionBackupsGetByResourceGroupResponse, - LongTermRetentionBackupsDeleteByResourceGroupOptionalParams + LongTermRetentionBackupsUpdateByResourceGroupResponse } from "../models"; /// /** Interface representing a LongTermRetentionBackups. */ export interface LongTermRetentionBackups { - /** - * 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 options parameters. - */ - listByDatabase( - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByDatabaseOptionalParams - ): PagedAsyncIterableIterator; /** * Lists the long term retention backups for a given location. * @param locationName The location of the database @@ -72,19 +59,16 @@ export interface LongTermRetentionBackups { ): PagedAsyncIterableIterator; /** * Lists all long term retention backups for 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 locationName The location of the database * @param longTermRetentionServerName The name of the server * @param longTermRetentionDatabaseName The name of the database * @param options The options parameters. */ - listByResourceGroupDatabase( - resourceGroupName: string, + listByDatabase( locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, - options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + options?: LongTermRetentionBackupsListByDatabaseOptionalParams ): PagedAsyncIterableIterator; /** * Lists the long term retention backups for a given location. @@ -112,6 +96,67 @@ export interface LongTermRetentionBackups { longTermRetentionServerName: string, options?: LongTermRetentionBackupsListByResourceGroupServerOptionalParams ): PagedAsyncIterableIterator; + /** + * Lists all long term retention backups for 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 locationName The location of the database + * @param longTermRetentionServerName The name of the server + * @param longTermRetentionDatabaseName The name of the database + * @param options The options parameters. + */ + listByResourceGroupDatabase( + resourceGroupName: string, + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + options?: LongTermRetentionBackupsListByResourceGroupDatabaseOptionalParams + ): PagedAsyncIterableIterator; + /** + * 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 options parameters. + */ + get( + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + backupName: string, + options?: LongTermRetentionBackupsGetOptionalParams + ): 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 options parameters. + */ + beginDelete( + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + backupName: string, + options?: LongTermRetentionBackupsDeleteOptionalParams + ): Promise, void>>; + /** + * 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 options parameters. + */ + beginDeleteAndWait( + locationName: string, + longTermRetentionServerName: string, + longTermRetentionDatabaseName: string, + backupName: string, + options?: LongTermRetentionBackupsDeleteOptionalParams + ): Promise; /** * Copy an existing long term retention backup. * @param locationName The location of the database. @@ -192,48 +237,57 @@ export interface LongTermRetentionBackups { ): Promise; /** * Gets a long term retention 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 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 options parameters. */ - get( + getByResourceGroup( + resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, - options?: LongTermRetentionBackupsGetOptionalParams - ): Promise; + options?: LongTermRetentionBackupsGetByResourceGroupOptionalParams + ): Promise; /** * Deletes a long term retention 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 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 options parameters. */ - beginDelete( + beginDeleteByResourceGroup( + resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, - options?: LongTermRetentionBackupsDeleteOptionalParams + options?: LongTermRetentionBackupsDeleteByResourceGroupOptionalParams ): Promise, void>>; /** * Deletes a long term retention 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 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 options parameters. */ - beginDeleteAndWait( + beginDeleteByResourceGroupAndWait( + resourceGroupName: string, locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, - options?: LongTermRetentionBackupsDeleteOptionalParams + options?: LongTermRetentionBackupsDeleteByResourceGroupOptionalParams ): Promise; /** * Copy an existing long term retention backup to a different server. @@ -325,58 +379,4 @@ export interface LongTermRetentionBackups { parameters: UpdateLongTermRetentionBackupParameters, options?: LongTermRetentionBackupsUpdateByResourceGroupOptionalParams ): Promise; - /** - * Gets a long term retention 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 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 options parameters. - */ - getByResourceGroup( - resourceGroupName: string, - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - backupName: string, - options?: LongTermRetentionBackupsGetByResourceGroupOptionalParams - ): Promise; - /** - * Deletes a long term retention 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 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 options parameters. - */ - beginDeleteByResourceGroup( - resourceGroupName: string, - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - backupName: string, - options?: LongTermRetentionBackupsDeleteByResourceGroupOptionalParams - ): Promise, void>>; - /** - * Deletes a long term retention 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 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 options parameters. - */ - beginDeleteByResourceGroupAndWait( - resourceGroupName: string, - locationName: string, - longTermRetentionServerName: string, - longTermRetentionDatabaseName: string, - backupName: string, - options?: LongTermRetentionBackupsDeleteByResourceGroupOptionalParams - ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionManagedInstanceBackups.ts b/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionManagedInstanceBackups.ts index dd63702a2ebf..fbb70f1d7d23 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionManagedInstanceBackups.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/longTermRetentionManagedInstanceBackups.ts @@ -10,12 +10,12 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { ManagedInstanceLongTermRetentionBackup, + LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams, LongTermRetentionManagedInstanceBackupsListByDatabaseOptionalParams, LongTermRetentionManagedInstanceBackupsListByInstanceOptionalParams, - LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams, + LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams, LongTermRetentionManagedInstanceBackupsListByResourceGroupDatabaseOptionalParams, LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceOptionalParams, - LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams, LongTermRetentionManagedInstanceBackupsGetOptionalParams, LongTermRetentionManagedInstanceBackupsGetResponse, LongTermRetentionManagedInstanceBackupsDeleteOptionalParams, @@ -27,6 +27,15 @@ import { /// /** Interface representing a LongTermRetentionManagedInstanceBackups. */ export interface LongTermRetentionManagedInstanceBackups { + /** + * Lists the long term retention backups for managed databases in a given location. + * @param locationName The location of the database. + * @param options The options parameters. + */ + listByLocation( + locationName: string, + options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + ): PagedAsyncIterableIterator; /** * Lists all long term retention backups for a managed database. * @param locationName The location of the database. @@ -53,12 +62,15 @@ export interface LongTermRetentionManagedInstanceBackups { ): PagedAsyncIterableIterator; /** * Lists the long term retention backups for managed databases in a given 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 location of the database. * @param options The options parameters. */ - listByLocation( + listByResourceGroupLocation( + resourceGroupName: string, locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByLocationOptionalParams + options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams ): PagedAsyncIterableIterator; /** * Lists all long term retention backups for a managed database. @@ -90,18 +102,6 @@ export interface LongTermRetentionManagedInstanceBackups { managedInstanceName: string, options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupInstanceOptionalParams ): PagedAsyncIterableIterator; - /** - * Lists the long term retention backups for managed databases in a given 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 location of the database. - * @param options The options parameters. - */ - listByResourceGroupLocation( - resourceGroupName: string, - locationName: string, - options?: LongTermRetentionManagedInstanceBackupsListByResourceGroupLocationOptionalParams - ): PagedAsyncIterableIterator; /** * Gets a long term retention backup for a managed database. * @param locationName The location of the database. diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..14c6bba03db7 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseAdvancedThreatProtectionSettings.ts @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ManagedDatabaseAdvancedThreatProtection, + ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams, + AdvancedThreatProtectionName, + ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams, + ManagedDatabaseAdvancedThreatProtectionSettingsGetResponse, + ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ManagedDatabaseAdvancedThreatProtectionSettings. */ +export interface ManagedDatabaseAdvancedThreatProtectionSettings { + /** + * Gets a list of managed database's Advanced Threat Protection states. + * @param resourceGroupName The 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 options parameters. + */ + listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a managed database's Advanced Threat Protection state. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise; + /** + * Creates or updates a managed database's Advanced Threat Protection state. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The managed database Advanced Threat Protection state. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ManagedDatabaseAdvancedThreatProtection, + options?: ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + ManagedDatabaseAdvancedThreatProtectionSettingsCreateOrUpdateResponse + >; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serviceObjectives.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseMoveOperations.ts similarity index 53% rename from sdk/sql/arm-sql/src/operationsInterfaces/serviceObjectives.ts rename to sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseMoveOperations.ts index 3c14a0a36783..2882418a33ea 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/serviceObjectives.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseMoveOperations.ts @@ -8,39 +8,39 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ServiceObjective, - ServiceObjectivesListByServerOptionalParams, - ServiceObjectivesGetOptionalParams, - ServiceObjectivesGetResponse + ManagedDatabaseMoveOperationResult, + ManagedDatabaseMoveOperationsListByLocationOptionalParams, + ManagedDatabaseMoveOperationsGetOptionalParams, + ManagedDatabaseMoveOperationsGetResponse } from "../models"; /// -/** Interface representing a ServiceObjectives. */ -export interface ServiceObjectives { +/** Interface representing a ManagedDatabaseMoveOperations. */ +export interface ManagedDatabaseMoveOperations { /** - * Returns database service objectives. + * Lists managed database move operations. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. - * @param serverName The name of the server. + * @param locationName * @param options The options parameters. */ - listByServer( + listByLocation( resourceGroupName: string, - serverName: string, - options?: ServiceObjectivesListByServerOptionalParams - ): PagedAsyncIterableIterator; + locationName: string, + options?: ManagedDatabaseMoveOperationsListByLocationOptionalParams + ): PagedAsyncIterableIterator; /** - * Gets a database service objective. + * Gets a managed database move operation. * @param resourceGroupName The name of the resource group that contains 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 locationName + * @param operationId * @param options The options parameters. */ get( resourceGroupName: string, - serverName: string, - serviceObjectiveName: string, - options?: ServiceObjectivesGetOptionalParams - ): Promise; + locationName: string, + operationId: string, + options?: ManagedDatabaseMoveOperationsGetOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseSensitivityLabels.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseSensitivityLabels.ts index d9e14da84f1f..f0c117f4b1a8 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseSensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseSensitivityLabels.ts @@ -11,6 +11,9 @@ import { SensitivityLabel, ManagedDatabaseSensitivityLabelsListCurrentByDatabaseOptionalParams, ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams, + ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams, + SensitivityLabelUpdateList, + ManagedDatabaseSensitivityLabelsUpdateOptionalParams, SensitivityLabelSource, ManagedDatabaseSensitivityLabelsGetOptionalParams, ManagedDatabaseSensitivityLabelsGetResponse, @@ -18,9 +21,7 @@ import { ManagedDatabaseSensitivityLabelsCreateOrUpdateResponse, ManagedDatabaseSensitivityLabelsDeleteOptionalParams, ManagedDatabaseSensitivityLabelsDisableRecommendationOptionalParams, - ManagedDatabaseSensitivityLabelsEnableRecommendationOptionalParams, - SensitivityLabelUpdateList, - ManagedDatabaseSensitivityLabelsUpdateOptionalParams + ManagedDatabaseSensitivityLabelsEnableRecommendationOptionalParams } from "../models"; /// @@ -54,6 +55,36 @@ export interface ManagedDatabaseSensitivityLabels { databaseName: string, options?: ManagedDatabaseSensitivityLabelsListRecommendedByDatabaseOptionalParams ): PagedAsyncIterableIterator; + /** + * 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 options parameters. + */ + listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedDatabaseSensitivityLabelsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; + /** + * Update sensitivity labels of a given database using an operations batch. + * @param resourceGroupName The 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 A list of sensitivity label update operations. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: SensitivityLabelUpdateList, + options?: ManagedDatabaseSensitivityLabelsUpdateOptionalParams + ): Promise; /** * Gets the sensitivity label of a given column * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -159,20 +190,4 @@ export interface ManagedDatabaseSensitivityLabels { columnName: string, options?: ManagedDatabaseSensitivityLabelsEnableRecommendationOptionalParams ): Promise; - /** - * Update sensitivity labels of a given database using an operations batch. - * @param resourceGroupName The 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 A list of sensitivity label update operations. - * @param options The options parameters. - */ - update( - resourceGroupName: string, - managedInstanceName: string, - databaseName: string, - parameters: SensitivityLabelUpdateList, - options?: ManagedDatabaseSensitivityLabelsUpdateOptionalParams - ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseVulnerabilityAssessmentScans.ts index 4f1c456ab7d4..1d140cb07f0b 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseVulnerabilityAssessmentScans.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabaseVulnerabilityAssessmentScans.ts @@ -12,11 +12,11 @@ import { VulnerabilityAssessmentScanRecord, VulnerabilityAssessmentName, ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams, - ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams, + ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams, + ManagedDatabaseVulnerabilityAssessmentScansGetResponse, ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams, ManagedDatabaseVulnerabilityAssessmentScansExportResponse, - ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams, - ManagedDatabaseVulnerabilityAssessmentScansGetResponse + ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams } from "../models"; /// @@ -39,7 +39,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { options?: ManagedDatabaseVulnerabilityAssessmentScansListByDatabaseOptionalParams ): PagedAsyncIterableIterator; /** - * Executes a Vulnerability Assessment database scan. + * 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. @@ -48,52 +48,52 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - beginInitiateScan( + get( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams - ): Promise, void>>; + options?: ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams + ): Promise; /** - * Executes a Vulnerability Assessment database scan. + * 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 database. + * @param databaseName The name of the scanned database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param scanId The vulnerability assessment scan Id. * @param options The options parameters. */ - beginInitiateScanAndWait( + export( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams - ): Promise; + options?: ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams + ): Promise; /** - * Convert an existing scan result to a human readable format. If already exists nothing happens + * 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 scanned database. + * @param databaseName The name of the database. * @param vulnerabilityAssessmentName The name of the vulnerability assessment. - * @param scanId The vulnerability assessment scan Id. + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - export( + beginInitiateScan( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansExportOptionalParams - ): Promise; + options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + ): Promise, void>>; /** - * Gets a vulnerability assessment scan record of a database. + * 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. @@ -102,12 +102,12 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * @param scanId The vulnerability assessment scan Id of the scan to retrieve. * @param options The options parameters. */ - get( + beginInitiateScanAndWait( resourceGroupName: string, managedInstanceName: string, databaseName: string, vulnerabilityAssessmentName: VulnerabilityAssessmentName, scanId: string, - options?: ManagedDatabaseVulnerabilityAssessmentScansGetOptionalParams - ): Promise; + options?: ManagedDatabaseVulnerabilityAssessmentScansInitiateScanOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabases.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabases.ts index 11fdc902d23c..dda791d75a97 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabases.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedDatabases.ts @@ -20,8 +20,13 @@ import { ManagedDatabaseUpdate, ManagedDatabasesUpdateOptionalParams, ManagedDatabasesUpdateResponse, + ManagedDatabaseMoveDefinition, + ManagedDatabasesCancelMoveOptionalParams, + ManagedDatabasesCompleteMoveOptionalParams, CompleteDatabaseRestoreDefinition, - ManagedDatabasesCompleteRestoreOptionalParams + ManagedDatabasesCompleteRestoreOptionalParams, + ManagedDatabaseStartMoveDefinition, + ManagedDatabasesStartMoveOptionalParams } from "../models"; /// @@ -167,6 +172,70 @@ export interface ManagedDatabases { parameters: ManagedDatabaseUpdate, options?: ManagedDatabasesUpdateOptionalParams ): Promise; + /** + * Cancels a managed database move operation. + * @param resourceGroupName The 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 Parameters of the cancel managed database move operation. + * @param options The options parameters. + */ + beginCancelMove( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCancelMoveOptionalParams + ): Promise, void>>; + /** + * Cancels a managed database move operation. + * @param resourceGroupName The 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 Parameters of the cancel managed database move operation. + * @param options The options parameters. + */ + beginCancelMoveAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCancelMoveOptionalParams + ): Promise; + /** + * Completes a managed database move operation. + * @param resourceGroupName The 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 Parameters of the complete managed database move operation. + * @param options The options parameters. + */ + beginCompleteMove( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCompleteMoveOptionalParams + ): Promise, void>>; + /** + * Completes a managed database move operation. + * @param resourceGroupName The 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 Parameters of the complete managed database move operation. + * @param options The options parameters. + */ + beginCompleteMoveAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseMoveDefinition, + options?: ManagedDatabasesCompleteMoveOptionalParams + ): Promise; /** * Completes the restore operation on a managed database. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -199,4 +268,36 @@ export interface ManagedDatabases { parameters: CompleteDatabaseRestoreDefinition, options?: ManagedDatabasesCompleteRestoreOptionalParams ): Promise; + /** + * Starts a managed database move operation. + * @param resourceGroupName The 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 Parameters of the start managed database move operation. + * @param options The options parameters. + */ + beginStartMove( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseStartMoveDefinition, + options?: ManagedDatabasesStartMoveOptionalParams + ): Promise, void>>; + /** + * Starts a managed database move operation. + * @param resourceGroupName The 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 Parameters of the start managed database move operation. + * @param options The options parameters. + */ + beginStartMoveAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + parameters: ManagedDatabaseStartMoveDefinition, + options?: ManagedDatabasesStartMoveOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..071d3eec9d31 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceAdvancedThreatProtectionSettings.ts @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ManagedInstanceAdvancedThreatProtection, + ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams, + AdvancedThreatProtectionName, + ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams, + ManagedInstanceAdvancedThreatProtectionSettingsGetResponse, + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ManagedInstanceAdvancedThreatProtectionSettings. */ +export interface ManagedInstanceAdvancedThreatProtectionSettings { + /** + * Get the managed instance's Advanced Threat Protection settings. + * @param resourceGroupName The 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 options parameters. + */ + listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceAdvancedThreatProtectionSettingsListByInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a managed instance's Advanced Threat Protection state. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: ManagedInstanceAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise; + /** + * Creates or updates Advanced Threat Protection settings. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The managed instance Advanced Threat Protection state. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ManagedInstanceAdvancedThreatProtection, + options?: ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + >, + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + > + >; + /** + * Creates or updates Advanced Threat Protection settings. + * @param resourceGroupName The 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 advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The managed instance Advanced Threat Protection state. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ManagedInstanceAdvancedThreatProtection, + options?: ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + ManagedInstanceAdvancedThreatProtectionSettingsCreateOrUpdateResponse + >; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceDtcs.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceDtcs.ts new file mode 100644 index 000000000000..18e6e411548b --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceDtcs.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ManagedInstanceDtc, + ManagedInstanceDtcsListByManagedInstanceOptionalParams, + DtcName, + ManagedInstanceDtcsGetOptionalParams, + ManagedInstanceDtcsGetResponse, + ManagedInstanceDtcsCreateOrUpdateOptionalParams, + ManagedInstanceDtcsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ManagedInstanceDtcs. */ +export interface ManagedInstanceDtcs { + /** + * Gets a list of managed instance DTC settings. + * @param resourceGroupName The 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 options parameters. + */ + listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstanceDtcsListByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets managed instance DTC settings. + * @param resourceGroupName The 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 dtcName The name of the managed instance DTC. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + dtcName: DtcName, + options?: ManagedInstanceDtcsGetOptionalParams + ): Promise; + /** + * Updates managed instance DTC settings. + * @param resourceGroupName The 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 dtcName The name of the managed instance DTC. + * @param parameters Managed instance DTC settings. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + dtcName: DtcName, + parameters: ManagedInstanceDtc, + options?: ManagedInstanceDtcsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedInstanceDtcsCreateOrUpdateResponse + > + >; + /** + * Updates managed instance DTC settings. + * @param resourceGroupName The 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 dtcName The name of the managed instance DTC. + * @param parameters Managed instance DTC settings. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + dtcName: DtcName, + parameters: ManagedInstanceDtc, + options?: ManagedInstanceDtcsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceEncryptionProtectors.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceEncryptionProtectors.ts index 09aec4e25176..f5b9e8704bec 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceEncryptionProtectors.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceEncryptionProtectors.ts @@ -12,11 +12,11 @@ import { ManagedInstanceEncryptionProtector, ManagedInstanceEncryptionProtectorsListByInstanceOptionalParams, EncryptionProtectorName, - ManagedInstanceEncryptionProtectorsRevalidateOptionalParams, ManagedInstanceEncryptionProtectorsGetOptionalParams, ManagedInstanceEncryptionProtectorsGetResponse, ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams, - ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse + ManagedInstanceEncryptionProtectorsCreateOrUpdateResponse, + ManagedInstanceEncryptionProtectorsRevalidateOptionalParams } from "../models"; /// @@ -34,34 +34,6 @@ export interface ManagedInstanceEncryptionProtectors { managedInstanceName: string, options?: ManagedInstanceEncryptionProtectorsListByInstanceOptionalParams ): PagedAsyncIterableIterator; - /** - * Revalidates an existing encryption protector. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be updated. - * @param options The options parameters. - */ - beginRevalidate( - resourceGroupName: string, - managedInstanceName: string, - encryptionProtectorName: EncryptionProtectorName, - options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams - ): Promise, void>>; - /** - * Revalidates an existing encryption protector. - * @param resourceGroupName The name of the resource group that contains the resource. You can obtain - * this value from the Azure Resource Manager API or the portal. - * @param managedInstanceName The name of the managed instance. - * @param encryptionProtectorName The name of the encryption protector to be updated. - * @param options The options parameters. - */ - beginRevalidateAndWait( - resourceGroupName: string, - managedInstanceName: string, - encryptionProtectorName: EncryptionProtectorName, - options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams - ): Promise; /** * Gets a managed instance encryption protector. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -115,4 +87,32 @@ export interface ManagedInstanceEncryptionProtectors { parameters: ManagedInstanceEncryptionProtector, options?: ManagedInstanceEncryptionProtectorsCreateOrUpdateOptionalParams ): Promise; + /** + * Revalidates an existing encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + beginRevalidate( + resourceGroupName: string, + managedInstanceName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams + ): Promise, void>>; + /** + * Revalidates an existing encryption protector. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param managedInstanceName The name of the managed instance. + * @param encryptionProtectorName The name of the encryption protector to be updated. + * @param options The options parameters. + */ + beginRevalidateAndWait( + resourceGroupName: string, + managedInstanceName: string, + encryptionProtectorName: EncryptionProtectorName, + options?: ManagedInstanceEncryptionProtectorsRevalidateOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceLongTermRetentionPolicies.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceLongTermRetentionPolicies.ts index c107651cd99c..a43bfc7af3f7 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceLongTermRetentionPolicies.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstanceLongTermRetentionPolicies.ts @@ -15,7 +15,9 @@ import { ManagedInstanceLongTermRetentionPoliciesGetOptionalParams, ManagedInstanceLongTermRetentionPoliciesGetResponse, ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalParams, - ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateResponse + ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateResponse, + ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams, + ManagedInstanceLongTermRetentionPoliciesDeleteResponse } from "../models"; /// @@ -94,4 +96,43 @@ export interface ManagedInstanceLongTermRetentionPolicies { parameters: ManagedInstanceLongTermRetentionPolicy, options?: ManagedInstanceLongTermRetentionPoliciesCreateOrUpdateOptionalParams ): Promise; + /** + * Deletes a managed 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 databaseName The name of the database. + * @param policyName The policy name. Should always be Default. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + policyName: ManagedInstanceLongTermRetentionPolicyName, + options?: ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams + ): Promise< + PollerLike< + PollOperationState< + ManagedInstanceLongTermRetentionPoliciesDeleteResponse + >, + ManagedInstanceLongTermRetentionPoliciesDeleteResponse + > + >; + /** + * Deletes a managed 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 databaseName The name of the database. + * @param policyName The policy name. Should always be Default. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + policyName: ManagedInstanceLongTermRetentionPolicyName, + options?: ManagedInstanceLongTermRetentionPoliciesDeleteOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstances.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstances.ts index 001b1f49f3cd..280a41ac42ba 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedInstances.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedInstances.ts @@ -10,9 +10,11 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { ManagedInstance, - ManagedInstancesListByInstancePoolOptionalParams, ManagedInstancesListOptionalParams, + ManagedInstancesListByInstancePoolOptionalParams, ManagedInstancesListByResourceGroupOptionalParams, + OutboundEnvironmentEndpoint, + ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams, TopQueries, ManagedInstancesListByManagedInstanceOptionalParams, ManagedInstancesGetOptionalParams, @@ -23,12 +25,21 @@ import { ManagedInstanceUpdate, ManagedInstancesUpdateOptionalParams, ManagedInstancesUpdateResponse, - ManagedInstancesFailoverOptionalParams + ManagedInstancesFailoverOptionalParams, + ManagedInstancesStartOptionalParams, + ManagedInstancesStopOptionalParams } from "../models"; /// /** Interface representing a ManagedInstances. */ export interface ManagedInstances { + /** + * Gets a list of all managed instances in the subscription. + * @param options The options parameters. + */ + list( + options?: ManagedInstancesListOptionalParams + ): PagedAsyncIterableIterator; /** * Gets a list of all managed instances in an instance pool. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -41,13 +52,6 @@ export interface ManagedInstances { instancePoolName: string, options?: ManagedInstancesListByInstancePoolOptionalParams ): PagedAsyncIterableIterator; - /** - * Gets a list of all managed instances in the subscription. - * @param options The options parameters. - */ - list( - options?: ManagedInstancesListOptionalParams - ): PagedAsyncIterableIterator; /** * 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 @@ -58,6 +62,18 @@ export interface ManagedInstances { resourceGroupName: string, options?: ManagedInstancesListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; + /** + * Gets the collection of outbound network dependencies for the given 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 options parameters. + */ + listOutboundNetworkDependenciesByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesListOutboundNetworkDependenciesByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator; /** * Get top resource consuming queries of a managed instance. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -196,4 +212,52 @@ export interface ManagedInstances { managedInstanceName: string, options?: ManagedInstancesFailoverOptionalParams ): Promise; + /** + * Starts the 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 options parameters. + */ + beginStart( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesStartOptionalParams + ): Promise, void>>; + /** + * Starts the 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 options parameters. + */ + beginStartAndWait( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesStartOptionalParams + ): Promise; + /** + * Stops the 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 options parameters. + */ + beginStop( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesStopOptionalParams + ): Promise, void>>; + /** + * Stops the 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 options parameters. + */ + beginStopAndWait( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedInstancesStopOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedLedgerDigestUploadsOperations.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedLedgerDigestUploadsOperations.ts new file mode 100644 index 000000000000..32687d352644 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedLedgerDigestUploadsOperations.ts @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ManagedLedgerDigestUploads, + ManagedLedgerDigestUploadsListByDatabaseOptionalParams, + ManagedLedgerDigestUploadsName, + ManagedLedgerDigestUploadsGetOptionalParams, + ManagedLedgerDigestUploadsGetResponse, + ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams, + ManagedLedgerDigestUploadsCreateOrUpdateResponse, + ManagedLedgerDigestUploadsDisableOptionalParams, + ManagedLedgerDigestUploadsDisableResponse +} from "../models"; + +/// +/** Interface representing a ManagedLedgerDigestUploadsOperations. */ +export interface ManagedLedgerDigestUploadsOperations { + /** + * Gets all ledger digest upload settings on 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 options parameters. + */ + listByDatabase( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + options?: ManagedLedgerDigestUploadsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the current ledger digest upload configuration for 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 ledgerDigestUploads + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + options?: ManagedLedgerDigestUploadsGetOptionalParams + ): Promise; + /** + * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger 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 databaseName The name of the database. + * @param ledgerDigestUploads The name of the Ledger Digest Upload Configurations. + * @param parameters The Ledger Digest Storage Endpoint. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + parameters: ManagedLedgerDigestUploads, + options?: ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedLedgerDigestUploadsCreateOrUpdateResponse + > + >; + /** + * Enables upload ledger digests to an Azure Storage account or an Azure Confidential Ledger 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 databaseName The name of the database. + * @param ledgerDigestUploads The name of the Ledger Digest Upload Configurations. + * @param parameters The Ledger Digest Storage Endpoint. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + parameters: ManagedLedgerDigestUploads, + options?: ManagedLedgerDigestUploadsCreateOrUpdateOptionalParams + ): Promise; + /** + * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger + * 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 databaseName The name of the database. + * @param ledgerDigestUploads + * @param options The options parameters. + */ + beginDisable( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + options?: ManagedLedgerDigestUploadsDisableOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedLedgerDigestUploadsDisableResponse + > + >; + /** + * Disables uploading ledger digests to an Azure Storage account or an Azure Confidential Ledger + * 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 databaseName The name of the database. + * @param ledgerDigestUploads + * @param options The options parameters. + */ + beginDisableAndWait( + resourceGroupName: string, + managedInstanceName: string, + databaseName: string, + ledgerDigestUploads: ManagedLedgerDigestUploadsName, + options?: ManagedLedgerDigestUploadsDisableOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedServerDnsAliases.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedServerDnsAliases.ts new file mode 100644 index 000000000000..26e5fbacba5d --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedServerDnsAliases.ts @@ -0,0 +1,156 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ManagedServerDnsAlias, + ManagedServerDnsAliasesListByManagedInstanceOptionalParams, + ManagedServerDnsAliasesGetOptionalParams, + ManagedServerDnsAliasesGetResponse, + ManagedServerDnsAliasCreation, + ManagedServerDnsAliasesCreateOrUpdateOptionalParams, + ManagedServerDnsAliasesCreateOrUpdateResponse, + ManagedServerDnsAliasesDeleteOptionalParams, + ManagedServerDnsAliasAcquisition, + ManagedServerDnsAliasesAcquireOptionalParams, + ManagedServerDnsAliasesAcquireResponse +} from "../models"; + +/// +/** Interface representing a ManagedServerDnsAliases. */ +export interface ManagedServerDnsAliases { + /** + * Gets a list of managed server DNS aliases for a managed 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 options The options parameters. + */ + listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ManagedServerDnsAliasesListByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + options?: ManagedServerDnsAliasesGetOptionalParams + ): Promise; + /** + * Creates a managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param parameters A managed server dns alias creation request. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasCreation, + options?: ManagedServerDnsAliasesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedServerDnsAliasesCreateOrUpdateResponse + > + >; + /** + * Creates a managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param parameters A managed server dns alias creation request. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasCreation, + options?: ManagedServerDnsAliasesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + options?: ManagedServerDnsAliasesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes the managed 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 managedInstanceName The name of the managed instance. + * @param dnsAliasName + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + options?: ManagedServerDnsAliasesDeleteOptionalParams + ): Promise; + /** + * Acquires managed server DNS alias from another managed 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 dnsAliasName + * @param parameters A managed server DNS alias acquisition request. + * @param options The options parameters. + */ + beginAcquire( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasAcquisition, + options?: ManagedServerDnsAliasesAcquireOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ManagedServerDnsAliasesAcquireResponse + > + >; + /** + * Acquires managed server DNS alias from another managed 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 dnsAliasName + * @param parameters A managed server DNS alias acquisition request. + * @param options The options parameters. + */ + beginAcquireAndWait( + resourceGroupName: string, + managedInstanceName: string, + dnsAliasName: string, + parameters: ManagedServerDnsAliasAcquisition, + options?: ManagedServerDnsAliasesAcquireOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/managedServerSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operationsInterfaces/managedServerSecurityAlertPolicies.ts index 7dc6edd12e02..a5f7da0b2f8f 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/managedServerSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/managedServerSecurityAlertPolicies.ts @@ -11,7 +11,7 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { ManagedServerSecurityAlertPolicy, ManagedServerSecurityAlertPoliciesListByInstanceOptionalParams, - SecurityAlertPolicyName, + SecurityAlertPolicyNameAutoGenerated, ManagedServerSecurityAlertPoliciesGetOptionalParams, ManagedServerSecurityAlertPoliciesGetResponse, ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams, @@ -44,7 +44,7 @@ export interface ManagedServerSecurityAlertPolicies { get( resourceGroupName: string, managedInstanceName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, options?: ManagedServerSecurityAlertPoliciesGetOptionalParams ): Promise; /** @@ -59,7 +59,7 @@ export interface ManagedServerSecurityAlertPolicies { beginCreateOrUpdate( resourceGroupName: string, managedInstanceName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise< @@ -82,7 +82,7 @@ export interface ManagedServerSecurityAlertPolicies { beginCreateOrUpdateAndWait( resourceGroupName: string, managedInstanceName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ManagedServerSecurityAlertPolicy, options?: ManagedServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise; diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/operationsHealthOperations.ts b/sdk/sql/arm-sql/src/operationsInterfaces/operationsHealthOperations.ts deleted file mode 100644 index dce514ace15b..000000000000 --- a/sdk/sql/arm-sql/src/operationsInterfaces/operationsHealthOperations.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - OperationsHealth, - OperationsHealthListByLocationOptionalParams -} from "../models"; - -/// -/** Interface representing a OperationsHealthOperations. */ -export interface OperationsHealthOperations { - /** - * Gets a service operation health status. - * @param locationName The name of the region where the resource is located. - * @param options The options parameters. - */ - listByLocation( - locationName: string, - options?: OperationsHealthListByLocationOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/outboundFirewallRules.ts b/sdk/sql/arm-sql/src/operationsInterfaces/outboundFirewallRules.ts index 1f380a5a8ffa..e1320883187f 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/outboundFirewallRules.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/outboundFirewallRules.ts @@ -53,14 +53,12 @@ export interface OutboundFirewallRules { * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn - * @param parameters An Azure SQL DB Server Outbound Firewall Rule. * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, serverName: string, outboundRuleFqdn: string, - parameters: OutboundFirewallRule, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams ): Promise< PollerLike< @@ -74,14 +72,12 @@ export interface OutboundFirewallRules { * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. * @param outboundRuleFqdn - * @param parameters An Azure SQL DB Server Outbound Firewall Rule. * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, outboundRuleFqdn: string, - parameters: OutboundFirewallRule, options?: OutboundFirewallRulesCreateOrUpdateOptionalParams ): Promise; /** diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/recoverableDatabases.ts b/sdk/sql/arm-sql/src/operationsInterfaces/recoverableDatabases.ts index 32be1ee48122..89af9762f717 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/recoverableDatabases.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/recoverableDatabases.ts @@ -18,7 +18,7 @@ import { /** Interface representing a RecoverableDatabases. */ export interface RecoverableDatabases { /** - * Gets a list of recoverable databases + * 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. @@ -30,11 +30,11 @@ export interface RecoverableDatabases { options?: RecoverableDatabasesListByServerOptionalParams ): PagedAsyncIterableIterator; /** - * Gets a recoverable database, which is a resource representing a database's geo backup + * Gets a recoverable 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 databaseName The name of the database. * @param options The options parameters. */ get( diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/replicationLinks.ts b/sdk/sql/arm-sql/src/operationsInterfaces/replicationLinks.ts index c124dc370c98..44db73ea3dd9 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/replicationLinks.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/replicationLinks.ts @@ -12,13 +12,13 @@ import { ReplicationLink, ReplicationLinksListByDatabaseOptionalParams, ReplicationLinksListByServerOptionalParams, + ReplicationLinksGetOptionalParams, + ReplicationLinksGetResponse, ReplicationLinksDeleteOptionalParams, ReplicationLinksFailoverOptionalParams, + ReplicationLinksFailoverResponse, ReplicationLinksFailoverAllowDataLossOptionalParams, - UnlinkParameters, - ReplicationLinksUnlinkOptionalParams, - ReplicationLinksGetOptionalParams, - ReplicationLinksGetResponse + ReplicationLinksFailoverAllowDataLossResponse } from "../models"; /// @@ -51,125 +51,113 @@ export interface ReplicationLinks { options?: ReplicationLinksListByServerOptionalParams ): PagedAsyncIterableIterator; /** - * Deletes a database replication link. Cannot be done during failover. + * Gets a 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 that has the replication link to be dropped. - * @param linkId The ID of the replication link to be deleted. + * @param databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - delete( + get( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksDeleteOptionalParams - ): Promise; + options?: ReplicationLinksGetOptionalParams + ): Promise; /** - * Sets which replica database is primary by failing over from the current primary replica database. + * Deletes the 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 that has the replication link to be failed over. - * @param linkId The ID of the replication link to be failed over. + * @param databaseName The name of the database. + * @param linkId * @param options The options parameters. */ - beginFailover( + beginDelete( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverOptionalParams + options?: ReplicationLinksDeleteOptionalParams ): Promise, void>>; /** - * Sets which replica database is primary by failing over from the current primary replica database. + * Deletes the 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 that has the replication link to be failed over. - * @param linkId The ID of the replication link to be failed over. + * @param databaseName The name of the database. + * @param linkId * @param options The options parameters. */ - beginFailoverAndWait( + beginDeleteAndWait( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverOptionalParams + options?: ReplicationLinksDeleteOptionalParams ): Promise; /** - * 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 options parameters. - */ - beginFailoverAllowDataLoss( - resourceGroupName: string, - serverName: string, - databaseName: string, - linkId: string, - options?: ReplicationLinksFailoverAllowDataLossOptionalParams - ): Promise, void>>; - /** - * Sets which replica database is primary by failing over from the current primary replica database. - * This operation might result in data loss. + * 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. - * @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 databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - beginFailoverAllowDataLossAndWait( + beginFailover( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksFailoverAllowDataLossOptionalParams - ): Promise; + options?: ReplicationLinksFailoverOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ReplicationLinksFailoverResponse + > + >; /** - * Deletes a database replication link in forced or friendly way. + * 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. - * @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 parameters The required parameters for unlinking replication link. + * @param databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - beginUnlink( + beginFailoverAndWait( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - parameters: UnlinkParameters, - options?: ReplicationLinksUnlinkOptionalParams - ): Promise, void>>; + options?: ReplicationLinksFailoverOptionalParams + ): Promise; /** - * Deletes a database replication link in forced or friendly way. + * Fails over from the current primary server to this server allowing 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 parameters The required parameters for unlinking replication link. + * @param databaseName The name of the database. + * @param linkId The name of the replication link. * @param options The options parameters. */ - beginUnlinkAndWait( + beginFailoverAllowDataLoss( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - parameters: UnlinkParameters, - options?: ReplicationLinksUnlinkOptionalParams - ): Promise; + options?: ReplicationLinksFailoverAllowDataLossOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ReplicationLinksFailoverAllowDataLossResponse + > + >; /** - * Gets a replication link. + * Fails over from the current primary server to this server allowing 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. @@ -177,11 +165,11 @@ export interface ReplicationLinks { * @param linkId The name of the replication link. * @param options The options parameters. */ - get( + beginFailoverAllowDataLossAndWait( resourceGroupName: string, serverName: string, databaseName: string, linkId: string, - options?: ReplicationLinksGetOptionalParams - ): Promise; + options?: ReplicationLinksFailoverAllowDataLossOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sensitivityLabels.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sensitivityLabels.ts index 2e29e28ed53b..8e4d638bebd8 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/sensitivityLabels.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sensitivityLabels.ts @@ -11,16 +11,17 @@ import { SensitivityLabel, SensitivityLabelsListCurrentByDatabaseOptionalParams, SensitivityLabelsListRecommendedByDatabaseOptionalParams, + SensitivityLabelsListByDatabaseOptionalParams, SensitivityLabelUpdateList, SensitivityLabelsUpdateOptionalParams, - SensitivityLabelsEnableRecommendationOptionalParams, - SensitivityLabelsDisableRecommendationOptionalParams, SensitivityLabelSource, SensitivityLabelsGetOptionalParams, SensitivityLabelsGetResponse, SensitivityLabelsCreateOrUpdateOptionalParams, SensitivityLabelsCreateOrUpdateResponse, - SensitivityLabelsDeleteOptionalParams + SensitivityLabelsDeleteOptionalParams, + SensitivityLabelsDisableRecommendationOptionalParams, + SensitivityLabelsEnableRecommendationOptionalParams } from "../models"; /// @@ -54,6 +55,20 @@ export interface SensitivityLabels { databaseName: string, options?: SensitivityLabelsListRecommendedByDatabaseOptionalParams ): PagedAsyncIterableIterator; + /** + * 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 options parameters. + */ + listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SensitivityLabelsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; /** * Update sensitivity labels of a given database using an operations batch. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -71,8 +86,7 @@ export interface SensitivityLabels { options?: SensitivityLabelsUpdateOptionalParams ): Promise; /** - * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all - * columns) + * 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. @@ -80,19 +94,21 @@ export interface SensitivityLabels { * @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. * @param options The options parameters. */ - enableRecommendation( + get( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - options?: SensitivityLabelsEnableRecommendationOptionalParams - ): Promise; + sensitivityLabelSource: SensitivityLabelSource, + options?: SensitivityLabelsGetOptionalParams + ): Promise; /** - * Disables sensitivity recommendations on a given column + * 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. @@ -100,19 +116,21 @@ export interface SensitivityLabels { * @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 options parameters. */ - disableRecommendation( + createOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - options?: SensitivityLabelsDisableRecommendationOptionalParams - ): Promise; + parameters: SensitivityLabel, + options?: SensitivityLabelsCreateOrUpdateOptionalParams + ): Promise; /** - * Gets the sensitivity label of a given column + * 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. @@ -120,21 +138,19 @@ export interface SensitivityLabels { * @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. * @param options The options parameters. */ - get( + delete( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - sensitivityLabelSource: SensitivityLabelSource, - options?: SensitivityLabelsGetOptionalParams - ): Promise; + options?: SensitivityLabelsDeleteOptionalParams + ): Promise; /** - * Creates or updates the sensitivity label of a given column + * 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. @@ -142,21 +158,20 @@ export interface SensitivityLabels { * @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 options parameters. */ - createOrUpdate( + disableRecommendation( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - parameters: SensitivityLabel, - options?: SensitivityLabelsCreateOrUpdateOptionalParams - ): Promise; + options?: SensitivityLabelsDisableRecommendationOptionalParams + ): Promise; /** - * Deletes the sensitivity label of a given column + * 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. @@ -166,13 +181,13 @@ export interface SensitivityLabels { * @param columnName The name of the column. * @param options The options parameters. */ - delete( + enableRecommendation( resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, - options?: SensitivityLabelsDeleteOptionalParams + options?: SensitivityLabelsEnableRecommendationOptionalParams ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverAdvancedThreatProtectionSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverAdvancedThreatProtectionSettings.ts new file mode 100644 index 000000000000..8814d8b17633 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/serverAdvancedThreatProtectionSettings.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ServerAdvancedThreatProtection, + ServerAdvancedThreatProtectionSettingsListByServerOptionalParams, + AdvancedThreatProtectionName, + ServerAdvancedThreatProtectionSettingsGetOptionalParams, + ServerAdvancedThreatProtectionSettingsGetResponse, + ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams, + ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ServerAdvancedThreatProtectionSettings. */ +export interface ServerAdvancedThreatProtectionSettings { + /** + * Get a list of the server's Advanced Threat Protection states. + * @param resourceGroupName The name of the resource group that contains 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 options parameters. + */ + listByServer( + resourceGroupName: string, + serverName: string, + options?: ServerAdvancedThreatProtectionSettingsListByServerOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a server's Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + options?: ServerAdvancedThreatProtectionSettingsGetOptionalParams + ): Promise; + /** + * Creates or updates an Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The server Advanced Threat Protection state. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + serverName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ServerAdvancedThreatProtection, + options?: ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState< + ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse + >, + ServerAdvancedThreatProtectionSettingsCreateOrUpdateResponse + > + >; + /** + * Creates or updates an Advanced Threat Protection state. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param advancedThreatProtectionName The name of the Advanced Threat Protection state. + * @param parameters The server Advanced Threat Protection state. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + serverName: string, + advancedThreatProtectionName: AdvancedThreatProtectionName, + parameters: ServerAdvancedThreatProtection, + options?: ServerAdvancedThreatProtectionSettingsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverCommunicationLinks.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverCommunicationLinks.ts deleted file mode 100644 index eccf76ccbadd..000000000000 --- a/sdk/sql/arm-sql/src/operationsInterfaces/serverCommunicationLinks.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - ServerCommunicationLink, - ServerCommunicationLinksListByServerOptionalParams, - ServerCommunicationLinksDeleteOptionalParams, - ServerCommunicationLinksGetOptionalParams, - ServerCommunicationLinksGetResponse, - ServerCommunicationLinksCreateOrUpdateOptionalParams, - ServerCommunicationLinksCreateOrUpdateResponse -} from "../models"; - -/// -/** Interface representing a ServerCommunicationLinks. */ -export interface ServerCommunicationLinks { - /** - * 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 options parameters. - */ - listByServer( - resourceGroupName: string, - serverName: string, - options?: ServerCommunicationLinksListByServerOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - delete( - resourceGroupName: string, - serverName: string, - communicationLinkName: string, - options?: ServerCommunicationLinksDeleteOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - serverName: string, - communicationLinkName: string, - options?: ServerCommunicationLinksGetOptionalParams - ): 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 options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - serverName: string, - communicationLinkName: string, - parameters: ServerCommunicationLink, - options?: ServerCommunicationLinksCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ServerCommunicationLinksCreateOrUpdateResponse - > - >; - /** - * 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 options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - serverName: string, - communicationLinkName: string, - parameters: ServerCommunicationLink, - options?: ServerCommunicationLinksCreateOrUpdateOptionalParams - ): Promise; -} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverConfigurationOptions.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverConfigurationOptions.ts new file mode 100644 index 000000000000..6d57f6dd1273 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/serverConfigurationOptions.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ServerConfigurationOption, + ServerConfigurationOptionsListByManagedInstanceOptionalParams, + ServerConfigurationOptionName, + ServerConfigurationOptionsGetOptionalParams, + ServerConfigurationOptionsGetResponse, + ServerConfigurationOptionsCreateOrUpdateOptionalParams, + ServerConfigurationOptionsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a ServerConfigurationOptions. */ +export interface ServerConfigurationOptions { + /** + * Gets a list of managed instance server configuration 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 managedInstanceName The name of the managed instance. + * @param options The options parameters. + */ + listByManagedInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerConfigurationOptionsListByManagedInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets managed instance server configuration option. + * @param resourceGroupName The 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 serverConfigurationOptionName The name of the server configuration option. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + serverConfigurationOptionName: ServerConfigurationOptionName, + options?: ServerConfigurationOptionsGetOptionalParams + ): Promise; + /** + * Updates managed instance server configuration option. + * @param resourceGroupName The 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 serverConfigurationOptionName The name of the server configuration option. + * @param parameters Server configuration option parameters. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + serverConfigurationOptionName: ServerConfigurationOptionName, + parameters: ServerConfigurationOption, + options?: ServerConfigurationOptionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ServerConfigurationOptionsCreateOrUpdateResponse + > + >; + /** + * Updates managed instance server configuration option. + * @param resourceGroupName The 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 serverConfigurationOptionName The name of the server configuration option. + * @param parameters Server configuration option parameters. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + serverConfigurationOptionName: ServerConfigurationOptionName, + parameters: ServerConfigurationOption, + options?: ServerConfigurationOptionsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverDevOpsAuditSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverDevOpsAuditSettings.ts index 44ffdf85c2ce..0387f13a6a02 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/serverDevOpsAuditSettings.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/serverDevOpsAuditSettings.ts @@ -11,6 +11,7 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { ServerDevOpsAuditingSettings, ServerDevOpsAuditSettingsListByServerOptionalParams, + DevOpsAuditingSettingsName, ServerDevOpsAuditSettingsGetOptionalParams, ServerDevOpsAuditSettingsGetResponse, ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams, @@ -37,14 +38,13 @@ export interface ServerDevOpsAuditSettings { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be - * 'default'. + * @param devOpsAuditingSettingsName * @param options The options parameters. */ get( resourceGroupName: string, serverName: string, - devOpsAuditingSettingsName: string, + devOpsAuditingSettingsName: DevOpsAuditingSettingsName, options?: ServerDevOpsAuditSettingsGetOptionalParams ): Promise; /** @@ -52,15 +52,14 @@ export interface ServerDevOpsAuditSettings { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be - * 'default'. + * @param devOpsAuditingSettingsName * @param parameters Properties of DevOps audit settings * @param options The options parameters. */ beginCreateOrUpdate( resourceGroupName: string, serverName: string, - devOpsAuditingSettingsName: string, + devOpsAuditingSettingsName: DevOpsAuditingSettingsName, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams ): Promise< @@ -74,15 +73,14 @@ export interface ServerDevOpsAuditSettings { * @param resourceGroupName The name of the resource group that contains the resource. You can obtain * this value from the Azure Resource Manager API or the portal. * @param serverName The name of the server. - * @param devOpsAuditingSettingsName The name of the devops audit settings. This should always be - * 'default'. + * @param devOpsAuditingSettingsName * @param parameters Properties of DevOps audit settings * @param options The options parameters. */ beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, - devOpsAuditingSettingsName: string, + devOpsAuditingSettingsName: DevOpsAuditingSettingsName, parameters: ServerDevOpsAuditingSettings, options?: ServerDevOpsAuditSettingsCreateOrUpdateOptionalParams ): Promise; diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverSecurityAlertPolicies.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverSecurityAlertPolicies.ts index 47a3bf5f7afd..4bdba0e45546 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/serverSecurityAlertPolicies.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/serverSecurityAlertPolicies.ts @@ -11,7 +11,7 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { ServerSecurityAlertPolicy, ServerSecurityAlertPoliciesListByServerOptionalParams, - SecurityAlertPolicyName, + SecurityAlertPolicyNameAutoGenerated, ServerSecurityAlertPoliciesGetOptionalParams, ServerSecurityAlertPoliciesGetResponse, ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams, @@ -44,7 +44,7 @@ export interface ServerSecurityAlertPolicies { get( resourceGroupName: string, serverName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, options?: ServerSecurityAlertPoliciesGetOptionalParams ): Promise; /** @@ -59,7 +59,7 @@ export interface ServerSecurityAlertPolicies { beginCreateOrUpdate( resourceGroupName: string, serverName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise< @@ -80,7 +80,7 @@ export interface ServerSecurityAlertPolicies { beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, - securityAlertPolicyName: SecurityAlertPolicyName, + securityAlertPolicyName: SecurityAlertPolicyNameAutoGenerated, parameters: ServerSecurityAlertPolicy, options?: ServerSecurityAlertPoliciesCreateOrUpdateOptionalParams ): Promise; diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverTrustCertificates.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverTrustCertificates.ts new file mode 100644 index 000000000000..e9e1a4ff97cb --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/serverTrustCertificates.ts @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ServerTrustCertificate, + ServerTrustCertificatesListByInstanceOptionalParams, + ServerTrustCertificatesGetOptionalParams, + ServerTrustCertificatesGetResponse, + ServerTrustCertificatesCreateOrUpdateOptionalParams, + ServerTrustCertificatesCreateOrUpdateResponse, + ServerTrustCertificatesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a ServerTrustCertificates. */ +export interface ServerTrustCertificates { + /** + * Gets a list of server trust certificates that were uploaded from box to the given Sql 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 options parameters. + */ + listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: ServerTrustCertificatesListByInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a server trust certificate that was uploaded from box to Sql 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 certificateName Name of of the certificate to get. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + options?: ServerTrustCertificatesGetOptionalParams + ): Promise; + /** + * Uploads a server trust certificate from box to Sql 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 certificateName Name of of the certificate to upload. + * @param parameters The server trust certificate info. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + parameters: ServerTrustCertificate, + options?: ServerTrustCertificatesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ServerTrustCertificatesCreateOrUpdateResponse + > + >; + /** + * Uploads a server trust certificate from box to Sql 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 certificateName Name of of the certificate to upload. + * @param parameters The server trust certificate info. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + parameters: ServerTrustCertificate, + options?: ServerTrustCertificatesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes a server trust certificate that was uploaded from box to Sql 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 certificateName Name of of the certificate to delete. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + options?: ServerTrustCertificatesDeleteOptionalParams + ): Promise, void>>; + /** + * Deletes a server trust certificate that was uploaded from box to Sql 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 certificateName Name of of the certificate to delete. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + managedInstanceName: string, + certificateName: string, + options?: ServerTrustCertificatesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/serverUsages.ts b/sdk/sql/arm-sql/src/operationsInterfaces/serverUsages.ts index 8f0e03fb7a9e..5da881ab19de 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/serverUsages.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/serverUsages.ts @@ -13,7 +13,7 @@ import { ServerUsage, ServerUsagesListByServerOptionalParams } from "../models"; /** Interface representing a ServerUsages. */ export interface ServerUsages { /** - * Returns server usages. + * Gets 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. diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/servers.ts b/sdk/sql/arm-sql/src/operationsInterfaces/servers.ts index 403c3435e7b9..ce37d4340e45 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/servers.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/servers.ts @@ -10,8 +10,11 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { PollerLike, PollOperationState } from "@azure/core-lro"; import { Server, - ServersListByResourceGroupOptionalParams, ServersListOptionalParams, + ServersListByResourceGroupOptionalParams, + CheckNameAvailabilityRequest, + ServersCheckNameAvailabilityOptionalParams, + ServersCheckNameAvailabilityResponse, ServersGetOptionalParams, ServersGetResponse, ServersCreateOrUpdateOptionalParams, @@ -23,14 +26,18 @@ import { ImportNewDatabaseDefinition, ServersImportDatabaseOptionalParams, ServersImportDatabaseResponse, - CheckNameAvailabilityRequest, - ServersCheckNameAvailabilityOptionalParams, - ServersCheckNameAvailabilityResponse + ServersRefreshStatusOptionalParams, + ServersRefreshStatusResponse } from "../models"; /// /** Interface representing a Servers. */ export interface Servers { + /** + * Gets a list of all servers in the subscription. + * @param options The options parameters. + */ + list(options?: ServersListOptionalParams): PagedAsyncIterableIterator; /** * Gets a list of servers in a resource groups. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -42,10 +49,14 @@ export interface Servers { options?: ServersListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; /** - * Gets a list of all servers in the subscription. + * Determines whether a resource can be created with the specified name. + * @param parameters The name availability request parameters. * @param options The options parameters. */ - list(options?: ServersListOptionalParams): PagedAsyncIterableIterator; + checkNameAvailability( + parameters: CheckNameAvailabilityRequest, + options?: ServersCheckNameAvailabilityOptionalParams + ): Promise; /** * Gets a server. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -179,12 +190,32 @@ export interface Servers { options?: ServersImportDatabaseOptionalParams ): Promise; /** - * Determines whether a resource can be created with the specified name. - * @param parameters The name availability request parameters. + * Refresh external governance enablement status. + * @param resourceGroupName The name of the resource group that contains 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 options parameters. */ - checkNameAvailability( - parameters: CheckNameAvailabilityRequest, - options?: ServersCheckNameAvailabilityOptionalParams - ): Promise; + beginRefreshStatus( + resourceGroupName: string, + serverName: string, + options?: ServersRefreshStatusOptionalParams + ): Promise< + PollerLike< + PollOperationState, + ServersRefreshStatusResponse + > + >; + /** + * Refresh external governance enablement status. + * @param resourceGroupName The name of the resource group that contains 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 options parameters. + */ + beginRefreshStatusAndWait( + resourceGroupName: string, + serverName: string, + options?: ServersRefreshStatusOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentBaseline.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentBaseline.ts new file mode 100644 index 000000000000..26e33f7d7c8c --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentBaseline.ts @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DatabaseSqlVulnerabilityAssessmentBaselineSet, + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams, + BaselineName, + SqlVulnerabilityAssessmentBaselineGetOptionalParams, + SqlVulnerabilityAssessmentBaselineGetResponse +} from "../models"; + +/// +/** Interface representing a SqlVulnerabilityAssessmentBaseline. */ +export interface SqlVulnerabilityAssessmentBaseline { + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + listBySqlVulnerabilityAssessment( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessmentOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of database's sql vulnerability assessment rule baselines. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentBaselineGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentBaselines.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentBaselines.ts new file mode 100644 index 000000000000..68553ae022a1 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentBaselines.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + VulnerabilityAssessmentName, + BaselineName, + DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams, + SqlVulnerabilityAssessmentBaselinesCreateOrUpdateResponse +} from "../models"; + +/** Interface representing a SqlVulnerabilityAssessmentBaselines. */ +export interface SqlVulnerabilityAssessmentBaselines { + /** + * Add a database's vulnerability assessment rule baseline 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 serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineListInput, + options?: SqlVulnerabilityAssessmentBaselinesCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentExecuteScan.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentExecuteScan.ts new file mode 100644 index 000000000000..9a23bacf6093 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentExecuteScan.ts @@ -0,0 +1,45 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams +} from "../models"; + +/** Interface representing a SqlVulnerabilityAssessmentExecuteScan. */ +export interface SqlVulnerabilityAssessmentExecuteScan { + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + beginExecute( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise, void>>; + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + beginExecuteAndWait( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentExecuteScanExecuteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentRuleBaseline.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentRuleBaseline.ts new file mode 100644 index 000000000000..ffa4dbf1c58c --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentRuleBaseline.ts @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + DatabaseSqlVulnerabilityAssessmentRuleBaseline, + VulnerabilityAssessmentName, + BaselineName, + SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineGetResponse, + DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams, + SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a SqlVulnerabilityAssessmentRuleBaseline. */ +export interface SqlVulnerabilityAssessmentRuleBaseline { + /** + * Gets a system database's sql 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param options The options parameters. + */ + listByBaseline( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + options?: SqlVulnerabilityAssessmentRuleBaselineListByBaselineOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a system database's sql 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: SqlVulnerabilityAssessmentRuleBaselineGetOptionalParams + ): 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param parameters The requested rule baseline resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + parameters: DatabaseSqlVulnerabilityAssessmentRuleBaselineInput, + options?: SqlVulnerabilityAssessmentRuleBaselineCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentRuleBaselines.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentRuleBaselines.ts new file mode 100644 index 000000000000..5f26c8dee233 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentRuleBaselines.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + VulnerabilityAssessmentName, + BaselineName, + SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams +} from "../models"; + +/** Interface representing a SqlVulnerabilityAssessmentRuleBaselines. */ +export interface SqlVulnerabilityAssessmentRuleBaselines { + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param baselineName + * @param ruleId The vulnerability assessment rule ID. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + baselineName: BaselineName, + ruleId: string, + options?: SqlVulnerabilityAssessmentRuleBaselinesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentScanResult.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentScanResult.ts new file mode 100644 index 000000000000..859313120118 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentScanResult.ts @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SqlVulnerabilityAssessmentScanResults, + SQLVulnerabilityAssessmentName, + SqlVulnerabilityAssessmentScanResultListByScanOptionalParams, + SqlVulnerabilityAssessmentScanResultGetOptionalParams, + SqlVulnerabilityAssessmentScanResultGetResponse +} from "../models"; + +/// +/** Interface representing a SqlVulnerabilityAssessmentScanResult. */ +export interface SqlVulnerabilityAssessmentScanResult { + /** + * 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param options The options parameters. + */ + listByScan( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScanResultListByScanOptionalParams + ): PagedAsyncIterableIterator; + /** + * 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param scanId The scan id of the SQL Vulnerability Assessment scan to retrieve result from. + * @param scanResultId The scan result id of the specific result to retrieve. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SQLVulnerabilityAssessmentName, + scanId: string, + scanResultId: string, + options?: SqlVulnerabilityAssessmentScanResultGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentScans.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentScans.ts new file mode 100644 index 000000000000..683551d8503d --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentScans.ts @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SqlVulnerabilityAssessmentScanRecord, + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams, + SqlVulnerabilityAssessmentScansGetOptionalParams, + SqlVulnerabilityAssessmentScansGetResponse +} from "../models"; + +/// +/** Interface representing a SqlVulnerabilityAssessmentScans. */ +export interface SqlVulnerabilityAssessmentScans { + /** + * 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 vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param options The options parameters. + */ + listBySqlVulnerabilityAssessments( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentScansListBySqlVulnerabilityAssessmentsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Get a system database vulnerability assessment scan record. + * @param resourceGroupName The name of the resource group that contains the resource. You can obtain + * this value from the Azure Resource Manager API or the portal. + * @param serverName The name of the server. + * @param vulnerabilityAssessmentName The name of the vulnerability assessment. + * @param scanId + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + scanId: string, + options?: SqlVulnerabilityAssessmentScansGetOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessments.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessments.ts new file mode 100644 index 000000000000..32f50253afce --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessments.ts @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentsDeleteOptionalParams +} from "../models"; + +/** Interface representing a SqlVulnerabilityAssessments. */ +export interface SqlVulnerabilityAssessments { + /** + * Removes SQL 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentsDeleteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentsSettings.ts b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentsSettings.ts new file mode 100644 index 000000000000..726cfb9cdcdf --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/sqlVulnerabilityAssessmentsSettings.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + SqlVulnerabilityAssessment, + SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams, + SqlVulnerabilityAssessmentName, + SqlVulnerabilityAssessmentsSettingsGetOptionalParams, + SqlVulnerabilityAssessmentsSettingsGetResponse, + VulnerabilityAssessmentName, + SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams, + SqlVulnerabilityAssessmentsSettingsCreateOrUpdateResponse +} from "../models"; + +/// +/** Interface representing a SqlVulnerabilityAssessmentsSettings. */ +export interface SqlVulnerabilityAssessmentsSettings { + /** + * Lists SQL 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 options parameters. + */ + listByServer( + resourceGroupName: string, + serverName: string, + options?: SqlVulnerabilityAssessmentsSettingsListByServerOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets SQL Vulnerability Assessment 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: SqlVulnerabilityAssessmentName, + options?: SqlVulnerabilityAssessmentsSettingsGetOptionalParams + ): Promise; + /** + * Creates or updates SQL Vulnerability Assessment 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 vulnerabilityAssessmentName The name of the SQL Vulnerability Assessment. + * @param parameters The requested resource. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + serverName: string, + vulnerabilityAssessmentName: VulnerabilityAssessmentName, + parameters: SqlVulnerabilityAssessment, + options?: SqlVulnerabilityAssessmentsSettingsCreateOrUpdateOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/startStopManagedInstanceSchedules.ts b/sdk/sql/arm-sql/src/operationsInterfaces/startStopManagedInstanceSchedules.ts new file mode 100644 index 000000000000..758ade6cda53 --- /dev/null +++ b/sdk/sql/arm-sql/src/operationsInterfaces/startStopManagedInstanceSchedules.ts @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + StartStopManagedInstanceSchedule, + StartStopManagedInstanceSchedulesListByInstanceOptionalParams, + StartStopScheduleName, + StartStopManagedInstanceSchedulesGetOptionalParams, + StartStopManagedInstanceSchedulesGetResponse, + StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams, + StartStopManagedInstanceSchedulesCreateOrUpdateResponse, + StartStopManagedInstanceSchedulesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a StartStopManagedInstanceSchedules. */ +export interface StartStopManagedInstanceSchedules { + /** + * Lists the managed instance's Start/Stop schedules. + * @param resourceGroupName The 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 options parameters. + */ + listByInstance( + resourceGroupName: string, + managedInstanceName: string, + options?: StartStopManagedInstanceSchedulesListByInstanceOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the managed instance's Start/Stop schedule. + * @param resourceGroupName The 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 startStopScheduleName Name of the managed instance Start/Stop schedule. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + managedInstanceName: string, + startStopScheduleName: StartStopScheduleName, + options?: StartStopManagedInstanceSchedulesGetOptionalParams + ): Promise; + /** + * Creates or updates the managed instance's Start/Stop schedule. + * @param resourceGroupName The 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 startStopScheduleName Name of the managed instance Start/Stop schedule. + * @param parameters The requested managed instance Start/Stop schedule. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + managedInstanceName: string, + startStopScheduleName: StartStopScheduleName, + parameters: StartStopManagedInstanceSchedule, + options?: StartStopManagedInstanceSchedulesCreateOrUpdateOptionalParams + ): Promise; + /** + * Deletes the managed instance's Start/Stop schedule. + * @param resourceGroupName The 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 startStopScheduleName Name of the managed instance Start/Stop schedule. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + managedInstanceName: string, + startStopScheduleName: StartStopScheduleName, + options?: StartStopManagedInstanceSchedulesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/elasticPoolActivities.ts b/sdk/sql/arm-sql/src/operationsInterfaces/synapseLinkWorkspaces.ts similarity index 60% rename from sdk/sql/arm-sql/src/operationsInterfaces/elasticPoolActivities.ts rename to sdk/sql/arm-sql/src/operationsInterfaces/synapseLinkWorkspaces.ts index 8ed1453d251f..b21b4bb61935 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/elasticPoolActivities.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/synapseLinkWorkspaces.ts @@ -8,25 +8,25 @@ import { PagedAsyncIterableIterator } from "@azure/core-paging"; import { - ElasticPoolActivity, - ElasticPoolActivitiesListByElasticPoolOptionalParams + SynapseLinkWorkspace, + SynapseLinkWorkspacesListByDatabaseOptionalParams } from "../models"; /// -/** Interface representing a ElasticPoolActivities. */ -export interface ElasticPoolActivities { +/** Interface representing a SynapseLinkWorkspaces. */ +export interface SynapseLinkWorkspaces { /** - * Returns elastic pool activities. + * Gets all synapselink workspaces for 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 elasticPoolName The name of the elastic pool for which to get the current activity. + * @param databaseName The name of the database. * @param options The options parameters. */ - listByElasticPool( + listByDatabase( resourceGroupName: string, serverName: string, - elasticPoolName: string, - options?: ElasticPoolActivitiesListByElasticPoolOptionalParams - ): PagedAsyncIterableIterator; + databaseName: string, + options?: SynapseLinkWorkspacesListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/syncGroups.ts b/sdk/sql/arm-sql/src/operationsInterfaces/syncGroups.ts index 1457be1739b8..57989bb05da2 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/syncGroups.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/syncGroups.ts @@ -11,23 +11,23 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { SyncDatabaseIdProperties, SyncGroupsListSyncDatabaseIdsOptionalParams, + SyncGroup, + SyncGroupsListByDatabaseOptionalParams, SyncFullSchemaProperties, SyncGroupsListHubSchemasOptionalParams, SyncGroupLogProperties, - Enum60, + SyncGroupsType, SyncGroupsListLogsOptionalParams, - SyncGroup, - SyncGroupsListByDatabaseOptionalParams, - SyncGroupsRefreshHubSchemaOptionalParams, - SyncGroupsCancelSyncOptionalParams, - SyncGroupsTriggerSyncOptionalParams, SyncGroupsGetOptionalParams, SyncGroupsGetResponse, SyncGroupsCreateOrUpdateOptionalParams, SyncGroupsCreateOrUpdateResponse, SyncGroupsDeleteOptionalParams, SyncGroupsUpdateOptionalParams, - SyncGroupsUpdateResponse + SyncGroupsUpdateResponse, + SyncGroupsCancelSyncOptionalParams, + SyncGroupsRefreshHubSchemaOptionalParams, + SyncGroupsTriggerSyncOptionalParams } from "../models"; /// @@ -42,6 +42,20 @@ export interface SyncGroups { locationName: string, options?: SyncGroupsListSyncDatabaseIdsOptionalParams ): PagedAsyncIterableIterator; + /** + * 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 options parameters. + */ + listByDatabase( + resourceGroupName: string, + serverName: string, + databaseName: string, + options?: SyncGroupsListByDatabaseOptionalParams + ): PagedAsyncIterableIterator; /** * Gets a collection of hub database schemas. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -77,25 +91,11 @@ export interface SyncGroups { syncGroupName: string, startTime: string, endTime: string, - typeParam: Enum60, + typeParam: SyncGroupsType, options?: SyncGroupsListLogsOptionalParams ): PagedAsyncIterableIterator; /** - * 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 options parameters. - */ - listByDatabase( - resourceGroupName: string, - serverName: string, - databaseName: string, - options?: SyncGroupsListByDatabaseOptionalParams - ): PagedAsyncIterableIterator; - /** - * Refreshes a hub database schema. + * 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. @@ -103,47 +103,56 @@ export interface SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - beginRefreshHubSchema( + get( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsRefreshHubSchemaOptionalParams - ): Promise, void>>; + options?: SyncGroupsGetOptionalParams + ): Promise; /** - * Refreshes a hub database schema. + * 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 options parameters. */ - beginRefreshHubSchemaAndWait( + beginCreateOrUpdate( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsRefreshHubSchemaOptionalParams - ): Promise; + parameters: SyncGroup, + options?: SyncGroupsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SyncGroupsCreateOrUpdateResponse + > + >; /** - * Cancels a sync group synchronization. + * 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 options parameters. */ - cancelSync( + beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsCancelSyncOptionalParams - ): Promise; + parameters: SyncGroup, + options?: SyncGroupsCreateOrUpdateOptionalParams + ): Promise; /** - * Triggers a sync group synchronization. + * 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. @@ -151,15 +160,15 @@ export interface SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - triggerSync( + beginDelete( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsTriggerSyncOptionalParams - ): Promise; + options?: SyncGroupsDeleteOptionalParams + ): Promise, void>>; /** - * Gets a sync group. + * 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. @@ -167,15 +176,15 @@ export interface SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - get( + beginDeleteAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsGetOptionalParams - ): Promise; + options?: SyncGroupsDeleteOptionalParams + ): Promise; /** - * Creates or updates a sync group. + * 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. @@ -184,21 +193,21 @@ export interface SyncGroups { * @param parameters The requested sync group resource state. * @param options The options parameters. */ - beginCreateOrUpdate( + beginUpdate( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, parameters: SyncGroup, - options?: SyncGroupsCreateOrUpdateOptionalParams + options?: SyncGroupsUpdateOptionalParams ): Promise< PollerLike< - PollOperationState, - SyncGroupsCreateOrUpdateResponse + PollOperationState, + SyncGroupsUpdateResponse > >; /** - * Creates or updates a sync group. + * 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. @@ -207,16 +216,16 @@ export interface SyncGroups { * @param parameters The requested sync group resource state. * @param options The options parameters. */ - beginCreateOrUpdateAndWait( + beginUpdateAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, parameters: SyncGroup, - options?: SyncGroupsCreateOrUpdateOptionalParams - ): Promise; + options?: SyncGroupsUpdateOptionalParams + ): Promise; /** - * Deletes a sync group. + * 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. @@ -224,15 +233,15 @@ export interface SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - beginDelete( + cancelSync( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsDeleteOptionalParams - ): Promise, void>>; + options?: SyncGroupsCancelSyncOptionalParams + ): Promise; /** - * Deletes a sync group. + * 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. @@ -240,52 +249,43 @@ export interface SyncGroups { * @param syncGroupName The name of the sync group. * @param options The options parameters. */ - beginDeleteAndWait( + beginRefreshHubSchema( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - options?: SyncGroupsDeleteOptionalParams - ): Promise; + options?: SyncGroupsRefreshHubSchemaOptionalParams + ): Promise, void>>; /** - * Updates a sync group. + * 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 parameters The requested sync group resource state. * @param options The options parameters. */ - beginUpdate( + beginRefreshHubSchemaAndWait( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - parameters: SyncGroup, - options?: SyncGroupsUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - SyncGroupsUpdateResponse - > - >; + options?: SyncGroupsRefreshHubSchemaOptionalParams + ): Promise; /** - * Updates a sync group. + * 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 parameters The requested sync group resource state. * @param options The options parameters. */ - beginUpdateAndWait( + triggerSync( resourceGroupName: string, serverName: string, databaseName: string, syncGroupName: string, - parameters: SyncGroup, - options?: SyncGroupsUpdateOptionalParams - ): Promise; + options?: SyncGroupsTriggerSyncOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/transparentDataEncryptions.ts b/sdk/sql/arm-sql/src/operationsInterfaces/transparentDataEncryptions.ts index 4dd6addc774c..d8a6de02d2f5 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/transparentDataEncryptions.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/transparentDataEncryptions.ts @@ -7,6 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; import { LogicalDatabaseTransparentDataEncryption, TransparentDataEncryptionsListByDatabaseOptionalParams, @@ -62,7 +63,30 @@ export interface TransparentDataEncryptions { * @param parameters The database transparent data encryption. * @param options The options parameters. */ - createOrUpdate( + beginCreateOrUpdate( + resourceGroupName: string, + serverName: string, + databaseName: string, + tdeName: TransparentDataEncryptionName, + parameters: LogicalDatabaseTransparentDataEncryption, + options?: TransparentDataEncryptionsCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TransparentDataEncryptionsCreateOrUpdateResponse + > + >; + /** + * Updates a logical 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 logical database for which the security alert policy is defined. + * @param tdeName The name of the transparent data encryption configuration. + * @param parameters The database transparent data encryption. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( resourceGroupName: string, serverName: string, databaseName: string, diff --git a/sdk/sql/arm-sql/src/operationsInterfaces/virtualClusters.ts b/sdk/sql/arm-sql/src/operationsInterfaces/virtualClusters.ts index 3359222572d9..69ce32c09303 100644 --- a/sdk/sql/arm-sql/src/operationsInterfaces/virtualClusters.ts +++ b/sdk/sql/arm-sql/src/operationsInterfaces/virtualClusters.ts @@ -12,14 +12,14 @@ import { VirtualCluster, VirtualClustersListOptionalParams, VirtualClustersListByResourceGroupOptionalParams, - VirtualClustersUpdateDnsServersOptionalParams, - VirtualClustersUpdateDnsServersResponse, VirtualClustersGetOptionalParams, VirtualClustersGetResponse, VirtualClustersDeleteOptionalParams, VirtualClusterUpdate, VirtualClustersUpdateOptionalParams, - VirtualClustersUpdateResponse + VirtualClustersUpdateResponse, + VirtualClustersUpdateDnsServersOptionalParams, + VirtualClustersUpdateDnsServersResponse } from "../models"; /// @@ -42,18 +42,6 @@ export interface VirtualClusters { resourceGroupName: string, options?: VirtualClustersListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; - /** - * Synchronizes the DNS server settings used by the managed instances inside the given 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 options parameters. - */ - updateDnsServers( - resourceGroupName: string, - virtualClusterName: string, - options?: VirtualClustersUpdateDnsServersOptionalParams - ): Promise; /** * Gets a virtual cluster. * @param resourceGroupName The name of the resource group that contains the resource. You can obtain @@ -91,7 +79,7 @@ export interface VirtualClusters { options?: VirtualClustersDeleteOptionalParams ): Promise; /** - * Updates a virtual cluster. + * Updates an existing 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. @@ -110,7 +98,7 @@ export interface VirtualClusters { > >; /** - * Updates a virtual cluster. + * Updates an existing 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. @@ -123,4 +111,33 @@ export interface VirtualClusters { parameters: VirtualClusterUpdate, options?: VirtualClustersUpdateOptionalParams ): Promise; + /** + * Synchronizes the DNS server settings used by the managed instances inside the given 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 options parameters. + */ + beginUpdateDnsServers( + resourceGroupName: string, + virtualClusterName: string, + options?: VirtualClustersUpdateDnsServersOptionalParams + ): Promise< + PollerLike< + PollOperationState, + VirtualClustersUpdateDnsServersResponse + > + >; + /** + * Synchronizes the DNS server settings used by the managed instances inside the given 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 options parameters. + */ + beginUpdateDnsServersAndWait( + resourceGroupName: string, + virtualClusterName: string, + options?: VirtualClustersUpdateDnsServersOptionalParams + ): Promise; } diff --git a/sdk/sql/arm-sql/src/sqlManagementClient.ts b/sdk/sql/arm-sql/src/sqlManagementClient.ts index 87ffe5a05045..dc98f8b8c1da 100644 --- a/sdk/sql/arm-sql/src/sqlManagementClient.ts +++ b/sdk/sql/arm-sql/src/sqlManagementClient.ts @@ -8,60 +8,77 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; +import { + PipelineRequest, + PipelineResponse, + SendRequest +} from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { - RecoverableDatabasesImpl, - DataMaskingPoliciesImpl, - DataMaskingRulesImpl, - GeoBackupPoliciesImpl, - DatabasesImpl, - ElasticPoolsImpl, - ReplicationLinksImpl, - ServerCommunicationLinksImpl, - ServiceObjectivesImpl, - ElasticPoolActivitiesImpl, - ElasticPoolDatabaseActivitiesImpl, - ServerUsagesImpl, - ExtendedDatabaseBlobAuditingPoliciesImpl, - ExtendedServerBlobAuditingPoliciesImpl, + BackupShortTermRetentionPoliciesImpl, ServerBlobAuditingPoliciesImpl, DatabaseBlobAuditingPoliciesImpl, + ExtendedDatabaseBlobAuditingPoliciesImpl, + ExtendedServerBlobAuditingPoliciesImpl, + DataMaskingPoliciesImpl, + DataMaskingRulesImpl, + DataWarehouseUserActivitiesOperationsImpl, + DatabaseAdvancedThreatProtectionSettingsImpl, DatabaseAdvisorsImpl, DatabaseAutomaticTuningOperationsImpl, DatabaseColumnsImpl, + DatabaseEncryptionProtectorsImpl, + DatabaseExtensionsOperationsImpl, + DatabaseOperationsImpl, DatabaseRecommendedActionsImpl, DatabaseSchemasImpl, DatabaseSecurityAlertPoliciesImpl, + DatabaseSqlVulnerabilityAssessmentBaselinesImpl, + DatabaseSqlVulnerabilityAssessmentExecuteScanImpl, + DatabaseSqlVulnerabilityAssessmentRuleBaselinesImpl, + DatabaseSqlVulnerabilityAssessmentScanResultImpl, + DatabaseSqlVulnerabilityAssessmentScansImpl, + DatabaseSqlVulnerabilityAssessmentsSettingsImpl, DatabaseTablesImpl, + DatabaseUsagesImpl, DatabaseVulnerabilityAssessmentRuleBaselinesImpl, - DatabaseVulnerabilityAssessmentsImpl, DatabaseVulnerabilityAssessmentScansImpl, - DataWarehouseUserActivitiesOperationsImpl, + DatabaseVulnerabilityAssessmentsImpl, + DatabasesImpl, DeletedServersImpl, + DistributedAvailabilityGroupsImpl, ElasticPoolOperationsImpl, + ElasticPoolsImpl, EncryptionProtectorsImpl, + EndpointCertificatesImpl, FailoverGroupsImpl, FirewallRulesImpl, + GeoBackupPoliciesImpl, + IPv6FirewallRulesImpl, InstanceFailoverGroupsImpl, InstancePoolsImpl, JobAgentsImpl, JobCredentialsImpl, JobExecutionsImpl, - JobsImpl, JobStepExecutionsImpl, JobStepsImpl, JobTargetExecutionsImpl, JobTargetGroupsImpl, JobVersionsImpl, + JobsImpl, + LedgerDigestUploadsOperationsImpl, CapabilitiesImpl, + LongTermRetentionBackupsImpl, + LongTermRetentionManagedInstanceBackupsImpl, LongTermRetentionPoliciesImpl, MaintenanceWindowOptionsOperationsImpl, MaintenanceWindowsOperationsImpl, ManagedBackupShortTermRetentionPoliciesImpl, + ManagedDatabaseAdvancedThreatProtectionSettingsImpl, ManagedDatabaseColumnsImpl, + ManagedDatabaseMoveOperationsImpl, ManagedDatabaseQueriesImpl, ManagedDatabaseRestoreDetailsImpl, - ManagedDatabasesImpl, ManagedDatabaseSchemasImpl, ManagedDatabaseSecurityAlertPoliciesImpl, ManagedDatabaseSecurityEventsImpl, @@ -70,10 +87,13 @@ import { ManagedDatabaseTablesImpl, ManagedDatabaseTransparentDataEncryptionImpl, ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl, - ManagedDatabaseVulnerabilityAssessmentsImpl, ManagedDatabaseVulnerabilityAssessmentScansImpl, + ManagedDatabaseVulnerabilityAssessmentsImpl, + ManagedDatabasesImpl, ManagedInstanceAdministratorsImpl, + ManagedInstanceAdvancedThreatProtectionSettingsImpl, ManagedInstanceAzureADOnlyAuthenticationsImpl, + ManagedInstanceDtcsImpl, ManagedInstanceEncryptionProtectorsImpl, ManagedInstanceKeysImpl, ManagedInstanceLongTermRetentionPoliciesImpl, @@ -82,107 +102,130 @@ import { ManagedInstancePrivateLinkResourcesImpl, ManagedInstanceTdeCertificatesImpl, ManagedInstanceVulnerabilityAssessmentsImpl, + ManagedInstancesImpl, + ManagedLedgerDigestUploadsOperationsImpl, ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImpl, + ManagedServerDnsAliasesImpl, ManagedServerSecurityAlertPoliciesImpl, OperationsImpl, - OperationsHealthOperationsImpl, + OutboundFirewallRulesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, + RecoverableDatabasesImpl, RecoverableManagedDatabasesImpl, + ReplicationLinksImpl, + RestorableDroppedDatabasesImpl, + RestorableDroppedManagedDatabasesImpl, RestorePointsImpl, SensitivityLabelsImpl, RecommendedSensitivityLabelsImpl, + ServerAdvancedThreatProtectionSettingsImpl, ServerAdvisorsImpl, ServerAutomaticTuningOperationsImpl, ServerAzureADAdministratorsImpl, ServerAzureADOnlyAuthenticationsImpl, + ServerConfigurationOptionsImpl, + ServerConnectionPoliciesImpl, ServerDevOpsAuditSettingsImpl, ServerDnsAliasesImpl, ServerKeysImpl, ServerOperationsImpl, ServerSecurityAlertPoliciesImpl, + ServerTrustCertificatesImpl, ServerTrustGroupsImpl, + ServerUsagesImpl, ServerVulnerabilityAssessmentsImpl, + ServersImpl, SqlAgentImpl, + SqlVulnerabilityAssessmentBaselineImpl, + SqlVulnerabilityAssessmentBaselinesImpl, + SqlVulnerabilityAssessmentExecuteScanImpl, + SqlVulnerabilityAssessmentRuleBaselineImpl, + SqlVulnerabilityAssessmentRuleBaselinesImpl, + SqlVulnerabilityAssessmentScanResultImpl, + SqlVulnerabilityAssessmentScansImpl, + SqlVulnerabilityAssessmentsSettingsImpl, + SqlVulnerabilityAssessmentsImpl, + StartStopManagedInstanceSchedulesImpl, SubscriptionUsagesImpl, + SynapseLinkWorkspacesImpl, SyncAgentsImpl, SyncGroupsImpl, SyncMembersImpl, TdeCertificatesImpl, TimeZonesImpl, + TransparentDataEncryptionsImpl, + UsagesImpl, VirtualClustersImpl, VirtualNetworkRulesImpl, WorkloadClassifiersImpl, - WorkloadGroupsImpl, - TransparentDataEncryptionsImpl, - BackupShortTermRetentionPoliciesImpl, - DatabaseExtensionsOperationsImpl, - DatabaseOperationsImpl, - DatabaseUsagesImpl, - LedgerDigestUploadsOperationsImpl, - OutboundFirewallRulesImpl, - ServersImpl, - UsagesImpl, - LongTermRetentionBackupsImpl, - LongTermRetentionManagedInstanceBackupsImpl, - ManagedInstancesImpl, - RestorableDroppedDatabasesImpl, - RestorableDroppedManagedDatabasesImpl, - ServerConnectionPoliciesImpl + WorkloadGroupsImpl } from "./operations"; import { - RecoverableDatabases, - DataMaskingPolicies, - DataMaskingRules, - GeoBackupPolicies, - Databases, - ElasticPools, - ReplicationLinks, - ServerCommunicationLinks, - ServiceObjectives, - ElasticPoolActivities, - ElasticPoolDatabaseActivities, - ServerUsages, - ExtendedDatabaseBlobAuditingPolicies, - ExtendedServerBlobAuditingPolicies, + BackupShortTermRetentionPolicies, ServerBlobAuditingPolicies, DatabaseBlobAuditingPolicies, + ExtendedDatabaseBlobAuditingPolicies, + ExtendedServerBlobAuditingPolicies, + DataMaskingPolicies, + DataMaskingRules, + DataWarehouseUserActivitiesOperations, + DatabaseAdvancedThreatProtectionSettings, DatabaseAdvisors, DatabaseAutomaticTuningOperations, DatabaseColumns, + DatabaseEncryptionProtectors, + DatabaseExtensionsOperations, + DatabaseOperations, DatabaseRecommendedActions, DatabaseSchemas, DatabaseSecurityAlertPolicies, + DatabaseSqlVulnerabilityAssessmentBaselines, + DatabaseSqlVulnerabilityAssessmentExecuteScan, + DatabaseSqlVulnerabilityAssessmentRuleBaselines, + DatabaseSqlVulnerabilityAssessmentScanResult, + DatabaseSqlVulnerabilityAssessmentScans, + DatabaseSqlVulnerabilityAssessmentsSettings, DatabaseTables, + DatabaseUsages, DatabaseVulnerabilityAssessmentRuleBaselines, - DatabaseVulnerabilityAssessments, DatabaseVulnerabilityAssessmentScans, - DataWarehouseUserActivitiesOperations, + DatabaseVulnerabilityAssessments, + Databases, DeletedServers, + DistributedAvailabilityGroups, ElasticPoolOperations, + ElasticPools, EncryptionProtectors, + EndpointCertificates, FailoverGroups, FirewallRules, + GeoBackupPolicies, + IPv6FirewallRules, InstanceFailoverGroups, InstancePools, JobAgents, JobCredentials, JobExecutions, - Jobs, JobStepExecutions, JobSteps, JobTargetExecutions, JobTargetGroups, JobVersions, + Jobs, + LedgerDigestUploadsOperations, Capabilities, + LongTermRetentionBackups, + LongTermRetentionManagedInstanceBackups, LongTermRetentionPolicies, MaintenanceWindowOptionsOperations, MaintenanceWindowsOperations, ManagedBackupShortTermRetentionPolicies, + ManagedDatabaseAdvancedThreatProtectionSettings, ManagedDatabaseColumns, + ManagedDatabaseMoveOperations, ManagedDatabaseQueries, ManagedDatabaseRestoreDetails, - ManagedDatabases, ManagedDatabaseSchemas, ManagedDatabaseSecurityAlertPolicies, ManagedDatabaseSecurityEvents, @@ -191,10 +234,13 @@ import { ManagedDatabaseTables, ManagedDatabaseTransparentDataEncryption, ManagedDatabaseVulnerabilityAssessmentRuleBaselines, - ManagedDatabaseVulnerabilityAssessments, ManagedDatabaseVulnerabilityAssessmentScans, + ManagedDatabaseVulnerabilityAssessments, + ManagedDatabases, ManagedInstanceAdministrators, + ManagedInstanceAdvancedThreatProtectionSettings, ManagedInstanceAzureADOnlyAuthentications, + ManagedInstanceDtcs, ManagedInstanceEncryptionProtectors, ManagedInstanceKeys, ManagedInstanceLongTermRetentionPolicies, @@ -203,59 +249,71 @@ import { ManagedInstancePrivateLinkResources, ManagedInstanceTdeCertificates, ManagedInstanceVulnerabilityAssessments, + ManagedInstances, + ManagedLedgerDigestUploadsOperations, ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies, + ManagedServerDnsAliases, ManagedServerSecurityAlertPolicies, Operations, - OperationsHealthOperations, + OutboundFirewallRules, PrivateEndpointConnections, PrivateLinkResources, + RecoverableDatabases, RecoverableManagedDatabases, + ReplicationLinks, + RestorableDroppedDatabases, + RestorableDroppedManagedDatabases, RestorePoints, SensitivityLabels, RecommendedSensitivityLabels, + ServerAdvancedThreatProtectionSettings, ServerAdvisors, ServerAutomaticTuningOperations, ServerAzureADAdministrators, ServerAzureADOnlyAuthentications, + ServerConfigurationOptions, + ServerConnectionPolicies, ServerDevOpsAuditSettings, ServerDnsAliases, ServerKeys, ServerOperations, ServerSecurityAlertPolicies, + ServerTrustCertificates, ServerTrustGroups, + ServerUsages, ServerVulnerabilityAssessments, + Servers, SqlAgent, + SqlVulnerabilityAssessmentBaseline, + SqlVulnerabilityAssessmentBaselines, + SqlVulnerabilityAssessmentExecuteScan, + SqlVulnerabilityAssessmentRuleBaseline, + SqlVulnerabilityAssessmentRuleBaselines, + SqlVulnerabilityAssessmentScanResult, + SqlVulnerabilityAssessmentScans, + SqlVulnerabilityAssessmentsSettings, + SqlVulnerabilityAssessments, + StartStopManagedInstanceSchedules, SubscriptionUsages, + SynapseLinkWorkspaces, SyncAgents, SyncGroups, SyncMembers, TdeCertificates, TimeZones, + TransparentDataEncryptions, + Usages, VirtualClusters, VirtualNetworkRules, WorkloadClassifiers, - WorkloadGroups, - TransparentDataEncryptions, - BackupShortTermRetentionPolicies, - DatabaseExtensionsOperations, - DatabaseOperations, - DatabaseUsages, - LedgerDigestUploadsOperations, - OutboundFirewallRules, - Servers, - Usages, - LongTermRetentionBackups, - LongTermRetentionManagedInstanceBackups, - ManagedInstances, - RestorableDroppedDatabases, - RestorableDroppedManagedDatabases, - ServerConnectionPolicies + WorkloadGroups } from "./operationsInterfaces"; import { SqlManagementClientOptionalParams } from "./models"; export class SqlManagementClient extends coreClient.ServiceClient { $host: string; subscriptionId: string; + apiVersion: string; /** * Initializes a new instance of the SqlManagementClient class. @@ -284,7 +342,7 @@ export class SqlManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-sql/9.1.1`; + const packageDetails = `azsdk-js-arm-sql/10.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -337,28 +395,26 @@ export class SqlManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.recoverableDatabases = new RecoverableDatabasesImpl(this); - this.dataMaskingPolicies = new DataMaskingPoliciesImpl(this); - this.dataMaskingRules = new DataMaskingRulesImpl(this); - this.geoBackupPolicies = new GeoBackupPoliciesImpl(this); - this.databases = new DatabasesImpl(this); - this.elasticPools = new ElasticPoolsImpl(this); - this.replicationLinks = new ReplicationLinksImpl(this); - this.serverCommunicationLinks = new ServerCommunicationLinksImpl(this); - this.serviceObjectives = new ServiceObjectivesImpl(this); - this.elasticPoolActivities = new ElasticPoolActivitiesImpl(this); - this.elasticPoolDatabaseActivities = new ElasticPoolDatabaseActivitiesImpl( + this.apiVersion = options.apiVersion || "2022-11-01-preview"; + this.backupShortTermRetentionPolicies = new BackupShortTermRetentionPoliciesImpl( + this + ); + this.serverBlobAuditingPolicies = new ServerBlobAuditingPoliciesImpl(this); + this.databaseBlobAuditingPolicies = new DatabaseBlobAuditingPoliciesImpl( this ); - this.serverUsages = new ServerUsagesImpl(this); this.extendedDatabaseBlobAuditingPolicies = new ExtendedDatabaseBlobAuditingPoliciesImpl( this ); this.extendedServerBlobAuditingPolicies = new ExtendedServerBlobAuditingPoliciesImpl( this ); - this.serverBlobAuditingPolicies = new ServerBlobAuditingPoliciesImpl(this); - this.databaseBlobAuditingPolicies = new DatabaseBlobAuditingPoliciesImpl( + this.dataMaskingPolicies = new DataMaskingPoliciesImpl(this); + this.dataMaskingRules = new DataMaskingRulesImpl(this); + this.dataWarehouseUserActivitiesOperations = new DataWarehouseUserActivitiesOperationsImpl( + this + ); + this.databaseAdvancedThreatProtectionSettings = new DatabaseAdvancedThreatProtectionSettingsImpl( this ); this.databaseAdvisors = new DatabaseAdvisorsImpl(this); @@ -366,41 +422,79 @@ export class SqlManagementClient extends coreClient.ServiceClient { this ); this.databaseColumns = new DatabaseColumnsImpl(this); + this.databaseEncryptionProtectors = new DatabaseEncryptionProtectorsImpl( + this + ); + this.databaseExtensionsOperations = new DatabaseExtensionsOperationsImpl( + this + ); + this.databaseOperations = new DatabaseOperationsImpl(this); this.databaseRecommendedActions = new DatabaseRecommendedActionsImpl(this); this.databaseSchemas = new DatabaseSchemasImpl(this); this.databaseSecurityAlertPolicies = new DatabaseSecurityAlertPoliciesImpl( this ); - this.databaseTables = new DatabaseTablesImpl(this); - this.databaseVulnerabilityAssessmentRuleBaselines = new DatabaseVulnerabilityAssessmentRuleBaselinesImpl( + this.databaseSqlVulnerabilityAssessmentBaselines = new DatabaseSqlVulnerabilityAssessmentBaselinesImpl( this ); - this.databaseVulnerabilityAssessments = new DatabaseVulnerabilityAssessmentsImpl( + this.databaseSqlVulnerabilityAssessmentExecuteScan = new DatabaseSqlVulnerabilityAssessmentExecuteScanImpl( + this + ); + this.databaseSqlVulnerabilityAssessmentRuleBaselines = new DatabaseSqlVulnerabilityAssessmentRuleBaselinesImpl( + this + ); + this.databaseSqlVulnerabilityAssessmentScanResult = new DatabaseSqlVulnerabilityAssessmentScanResultImpl( + this + ); + this.databaseSqlVulnerabilityAssessmentScans = new DatabaseSqlVulnerabilityAssessmentScansImpl( + this + ); + this.databaseSqlVulnerabilityAssessmentsSettings = new DatabaseSqlVulnerabilityAssessmentsSettingsImpl( + this + ); + this.databaseTables = new DatabaseTablesImpl(this); + this.databaseUsages = new DatabaseUsagesImpl(this); + this.databaseVulnerabilityAssessmentRuleBaselines = new DatabaseVulnerabilityAssessmentRuleBaselinesImpl( this ); this.databaseVulnerabilityAssessmentScans = new DatabaseVulnerabilityAssessmentScansImpl( this ); - this.dataWarehouseUserActivitiesOperations = new DataWarehouseUserActivitiesOperationsImpl( + this.databaseVulnerabilityAssessments = new DatabaseVulnerabilityAssessmentsImpl( this ); + this.databases = new DatabasesImpl(this); this.deletedServers = new DeletedServersImpl(this); + this.distributedAvailabilityGroups = new DistributedAvailabilityGroupsImpl( + this + ); this.elasticPoolOperations = new ElasticPoolOperationsImpl(this); + this.elasticPools = new ElasticPoolsImpl(this); this.encryptionProtectors = new EncryptionProtectorsImpl(this); + this.endpointCertificates = new EndpointCertificatesImpl(this); this.failoverGroups = new FailoverGroupsImpl(this); this.firewallRules = new FirewallRulesImpl(this); + this.geoBackupPolicies = new GeoBackupPoliciesImpl(this); + this.iPv6FirewallRules = new IPv6FirewallRulesImpl(this); this.instanceFailoverGroups = new InstanceFailoverGroupsImpl(this); this.instancePools = new InstancePoolsImpl(this); this.jobAgents = new JobAgentsImpl(this); this.jobCredentials = new JobCredentialsImpl(this); this.jobExecutions = new JobExecutionsImpl(this); - this.jobs = new JobsImpl(this); this.jobStepExecutions = new JobStepExecutionsImpl(this); this.jobSteps = new JobStepsImpl(this); this.jobTargetExecutions = new JobTargetExecutionsImpl(this); this.jobTargetGroups = new JobTargetGroupsImpl(this); this.jobVersions = new JobVersionsImpl(this); + this.jobs = new JobsImpl(this); + this.ledgerDigestUploadsOperations = new LedgerDigestUploadsOperationsImpl( + this + ); this.capabilities = new CapabilitiesImpl(this); + this.longTermRetentionBackups = new LongTermRetentionBackupsImpl(this); + this.longTermRetentionManagedInstanceBackups = new LongTermRetentionManagedInstanceBackupsImpl( + this + ); this.longTermRetentionPolicies = new LongTermRetentionPoliciesImpl(this); this.maintenanceWindowOptionsOperations = new MaintenanceWindowOptionsOperationsImpl( this @@ -411,12 +505,17 @@ export class SqlManagementClient extends coreClient.ServiceClient { this.managedBackupShortTermRetentionPolicies = new ManagedBackupShortTermRetentionPoliciesImpl( this ); + this.managedDatabaseAdvancedThreatProtectionSettings = new ManagedDatabaseAdvancedThreatProtectionSettingsImpl( + this + ); this.managedDatabaseColumns = new ManagedDatabaseColumnsImpl(this); + this.managedDatabaseMoveOperations = new ManagedDatabaseMoveOperationsImpl( + this + ); this.managedDatabaseQueries = new ManagedDatabaseQueriesImpl(this); this.managedDatabaseRestoreDetails = new ManagedDatabaseRestoreDetailsImpl( this ); - this.managedDatabases = new ManagedDatabasesImpl(this); this.managedDatabaseSchemas = new ManagedDatabaseSchemasImpl(this); this.managedDatabaseSecurityAlertPolicies = new ManagedDatabaseSecurityAlertPoliciesImpl( this @@ -437,18 +536,23 @@ export class SqlManagementClient extends coreClient.ServiceClient { this.managedDatabaseVulnerabilityAssessmentRuleBaselines = new ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl( this ); - this.managedDatabaseVulnerabilityAssessments = new ManagedDatabaseVulnerabilityAssessmentsImpl( + this.managedDatabaseVulnerabilityAssessmentScans = new ManagedDatabaseVulnerabilityAssessmentScansImpl( this ); - this.managedDatabaseVulnerabilityAssessmentScans = new ManagedDatabaseVulnerabilityAssessmentScansImpl( + this.managedDatabaseVulnerabilityAssessments = new ManagedDatabaseVulnerabilityAssessmentsImpl( this ); + this.managedDatabases = new ManagedDatabasesImpl(this); this.managedInstanceAdministrators = new ManagedInstanceAdministratorsImpl( this ); + this.managedInstanceAdvancedThreatProtectionSettings = new ManagedInstanceAdvancedThreatProtectionSettingsImpl( + this + ); this.managedInstanceAzureADOnlyAuthentications = new ManagedInstanceAzureADOnlyAuthenticationsImpl( this ); + this.managedInstanceDtcs = new ManagedInstanceDtcsImpl(this); this.managedInstanceEncryptionProtectors = new ManagedInstanceEncryptionProtectorsImpl( this ); @@ -469,24 +573,38 @@ export class SqlManagementClient extends coreClient.ServiceClient { this.managedInstanceVulnerabilityAssessments = new ManagedInstanceVulnerabilityAssessmentsImpl( this ); + this.managedInstances = new ManagedInstancesImpl(this); + this.managedLedgerDigestUploadsOperations = new ManagedLedgerDigestUploadsOperationsImpl( + this + ); this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies = new ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesImpl( this ); + this.managedServerDnsAliases = new ManagedServerDnsAliasesImpl(this); this.managedServerSecurityAlertPolicies = new ManagedServerSecurityAlertPoliciesImpl( this ); this.operations = new OperationsImpl(this); - this.operationsHealthOperations = new OperationsHealthOperationsImpl(this); + this.outboundFirewallRules = new OutboundFirewallRulesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); + this.recoverableDatabases = new RecoverableDatabasesImpl(this); this.recoverableManagedDatabases = new RecoverableManagedDatabasesImpl( this ); + this.replicationLinks = new ReplicationLinksImpl(this); + this.restorableDroppedDatabases = new RestorableDroppedDatabasesImpl(this); + this.restorableDroppedManagedDatabases = new RestorableDroppedManagedDatabasesImpl( + this + ); this.restorePoints = new RestorePointsImpl(this); this.sensitivityLabels = new SensitivityLabelsImpl(this); this.recommendedSensitivityLabels = new RecommendedSensitivityLabelsImpl( this ); + this.serverAdvancedThreatProtectionSettings = new ServerAdvancedThreatProtectionSettingsImpl( + this + ); this.serverAdvisors = new ServerAdvisorsImpl(this); this.serverAutomaticTuningOperations = new ServerAutomaticTuningOperationsImpl( this @@ -497,6 +615,8 @@ export class SqlManagementClient extends coreClient.ServiceClient { this.serverAzureADOnlyAuthentications = new ServerAzureADOnlyAuthenticationsImpl( this ); + this.serverConfigurationOptions = new ServerConfigurationOptionsImpl(this); + this.serverConnectionPolicies = new ServerConnectionPoliciesImpl(this); this.serverDevOpsAuditSettings = new ServerDevOpsAuditSettingsImpl(this); this.serverDnsAliases = new ServerDnsAliasesImpl(this); this.serverKeys = new ServerKeysImpl(this); @@ -504,100 +624,152 @@ export class SqlManagementClient extends coreClient.ServiceClient { this.serverSecurityAlertPolicies = new ServerSecurityAlertPoliciesImpl( this ); + this.serverTrustCertificates = new ServerTrustCertificatesImpl(this); this.serverTrustGroups = new ServerTrustGroupsImpl(this); + this.serverUsages = new ServerUsagesImpl(this); this.serverVulnerabilityAssessments = new ServerVulnerabilityAssessmentsImpl( this ); + this.servers = new ServersImpl(this); this.sqlAgent = new SqlAgentImpl(this); - this.subscriptionUsages = new SubscriptionUsagesImpl(this); - this.syncAgents = new SyncAgentsImpl(this); - this.syncGroups = new SyncGroupsImpl(this); - this.syncMembers = new SyncMembersImpl(this); - this.tdeCertificates = new TdeCertificatesImpl(this); - this.timeZones = new TimeZonesImpl(this); - this.virtualClusters = new VirtualClustersImpl(this); - this.virtualNetworkRules = new VirtualNetworkRulesImpl(this); - this.workloadClassifiers = new WorkloadClassifiersImpl(this); - this.workloadGroups = new WorkloadGroupsImpl(this); - this.transparentDataEncryptions = new TransparentDataEncryptionsImpl(this); - this.backupShortTermRetentionPolicies = new BackupShortTermRetentionPoliciesImpl( + this.sqlVulnerabilityAssessmentBaseline = new SqlVulnerabilityAssessmentBaselineImpl( this ); - this.databaseExtensionsOperations = new DatabaseExtensionsOperationsImpl( + this.sqlVulnerabilityAssessmentBaselines = new SqlVulnerabilityAssessmentBaselinesImpl( this ); - this.databaseOperations = new DatabaseOperationsImpl(this); - this.databaseUsages = new DatabaseUsagesImpl(this); - this.ledgerDigestUploadsOperations = new LedgerDigestUploadsOperationsImpl( + this.sqlVulnerabilityAssessmentExecuteScan = new SqlVulnerabilityAssessmentExecuteScanImpl( this ); - this.outboundFirewallRules = new OutboundFirewallRulesImpl(this); - this.servers = new ServersImpl(this); - this.usages = new UsagesImpl(this); - this.longTermRetentionBackups = new LongTermRetentionBackupsImpl(this); - this.longTermRetentionManagedInstanceBackups = new LongTermRetentionManagedInstanceBackupsImpl( + this.sqlVulnerabilityAssessmentRuleBaseline = new SqlVulnerabilityAssessmentRuleBaselineImpl( this ); - this.managedInstances = new ManagedInstancesImpl(this); - this.restorableDroppedDatabases = new RestorableDroppedDatabasesImpl(this); - this.restorableDroppedManagedDatabases = new RestorableDroppedManagedDatabasesImpl( + this.sqlVulnerabilityAssessmentRuleBaselines = new SqlVulnerabilityAssessmentRuleBaselinesImpl( this ); - this.serverConnectionPolicies = new ServerConnectionPoliciesImpl(this); + this.sqlVulnerabilityAssessmentScanResult = new SqlVulnerabilityAssessmentScanResultImpl( + this + ); + this.sqlVulnerabilityAssessmentScans = new SqlVulnerabilityAssessmentScansImpl( + this + ); + this.sqlVulnerabilityAssessmentsSettings = new SqlVulnerabilityAssessmentsSettingsImpl( + this + ); + this.sqlVulnerabilityAssessments = new SqlVulnerabilityAssessmentsImpl( + this + ); + this.startStopManagedInstanceSchedules = new StartStopManagedInstanceSchedulesImpl( + this + ); + this.subscriptionUsages = new SubscriptionUsagesImpl(this); + this.synapseLinkWorkspaces = new SynapseLinkWorkspacesImpl(this); + this.syncAgents = new SyncAgentsImpl(this); + this.syncGroups = new SyncGroupsImpl(this); + this.syncMembers = new SyncMembersImpl(this); + this.tdeCertificates = new TdeCertificatesImpl(this); + this.timeZones = new TimeZonesImpl(this); + this.transparentDataEncryptions = new TransparentDataEncryptionsImpl(this); + this.usages = new UsagesImpl(this); + this.virtualClusters = new VirtualClustersImpl(this); + this.virtualNetworkRules = new VirtualNetworkRulesImpl(this); + this.workloadClassifiers = new WorkloadClassifiersImpl(this); + this.workloadGroups = new WorkloadGroupsImpl(this); + this.addCustomApiVersionPolicy(options.apiVersion); } - recoverableDatabases: RecoverableDatabases; - dataMaskingPolicies: DataMaskingPolicies; - dataMaskingRules: DataMaskingRules; - geoBackupPolicies: GeoBackupPolicies; - databases: Databases; - elasticPools: ElasticPools; - replicationLinks: ReplicationLinks; - serverCommunicationLinks: ServerCommunicationLinks; - serviceObjectives: ServiceObjectives; - elasticPoolActivities: ElasticPoolActivities; - elasticPoolDatabaseActivities: ElasticPoolDatabaseActivities; - serverUsages: ServerUsages; - extendedDatabaseBlobAuditingPolicies: ExtendedDatabaseBlobAuditingPolicies; - extendedServerBlobAuditingPolicies: ExtendedServerBlobAuditingPolicies; + /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */ + private addCustomApiVersionPolicy(apiVersion?: string) { + if (!apiVersion) { + return; + } + const apiVersionPolicy = { + name: "CustomApiVersionPolicy", + async sendRequest( + request: PipelineRequest, + next: SendRequest + ): Promise { + const param = request.url.split("?"); + if (param.length > 1) { + const newParams = param[1].split("&").map((item) => { + if (item.indexOf("api-version") > -1) { + return "api-version=" + apiVersion; + } else { + return item; + } + }); + request.url = param[0] + "?" + newParams.join("&"); + } + return next(request); + } + }; + this.pipeline.addPolicy(apiVersionPolicy); + } + + backupShortTermRetentionPolicies: BackupShortTermRetentionPolicies; serverBlobAuditingPolicies: ServerBlobAuditingPolicies; databaseBlobAuditingPolicies: DatabaseBlobAuditingPolicies; + extendedDatabaseBlobAuditingPolicies: ExtendedDatabaseBlobAuditingPolicies; + extendedServerBlobAuditingPolicies: ExtendedServerBlobAuditingPolicies; + dataMaskingPolicies: DataMaskingPolicies; + dataMaskingRules: DataMaskingRules; + dataWarehouseUserActivitiesOperations: DataWarehouseUserActivitiesOperations; + databaseAdvancedThreatProtectionSettings: DatabaseAdvancedThreatProtectionSettings; databaseAdvisors: DatabaseAdvisors; databaseAutomaticTuningOperations: DatabaseAutomaticTuningOperations; databaseColumns: DatabaseColumns; + databaseEncryptionProtectors: DatabaseEncryptionProtectors; + databaseExtensionsOperations: DatabaseExtensionsOperations; + databaseOperations: DatabaseOperations; databaseRecommendedActions: DatabaseRecommendedActions; databaseSchemas: DatabaseSchemas; databaseSecurityAlertPolicies: DatabaseSecurityAlertPolicies; + databaseSqlVulnerabilityAssessmentBaselines: DatabaseSqlVulnerabilityAssessmentBaselines; + databaseSqlVulnerabilityAssessmentExecuteScan: DatabaseSqlVulnerabilityAssessmentExecuteScan; + databaseSqlVulnerabilityAssessmentRuleBaselines: DatabaseSqlVulnerabilityAssessmentRuleBaselines; + databaseSqlVulnerabilityAssessmentScanResult: DatabaseSqlVulnerabilityAssessmentScanResult; + databaseSqlVulnerabilityAssessmentScans: DatabaseSqlVulnerabilityAssessmentScans; + databaseSqlVulnerabilityAssessmentsSettings: DatabaseSqlVulnerabilityAssessmentsSettings; databaseTables: DatabaseTables; + databaseUsages: DatabaseUsages; databaseVulnerabilityAssessmentRuleBaselines: DatabaseVulnerabilityAssessmentRuleBaselines; - databaseVulnerabilityAssessments: DatabaseVulnerabilityAssessments; databaseVulnerabilityAssessmentScans: DatabaseVulnerabilityAssessmentScans; - dataWarehouseUserActivitiesOperations: DataWarehouseUserActivitiesOperations; + databaseVulnerabilityAssessments: DatabaseVulnerabilityAssessments; + databases: Databases; deletedServers: DeletedServers; + distributedAvailabilityGroups: DistributedAvailabilityGroups; elasticPoolOperations: ElasticPoolOperations; + elasticPools: ElasticPools; encryptionProtectors: EncryptionProtectors; + endpointCertificates: EndpointCertificates; failoverGroups: FailoverGroups; firewallRules: FirewallRules; + geoBackupPolicies: GeoBackupPolicies; + iPv6FirewallRules: IPv6FirewallRules; instanceFailoverGroups: InstanceFailoverGroups; instancePools: InstancePools; jobAgents: JobAgents; jobCredentials: JobCredentials; jobExecutions: JobExecutions; - jobs: Jobs; jobStepExecutions: JobStepExecutions; jobSteps: JobSteps; jobTargetExecutions: JobTargetExecutions; jobTargetGroups: JobTargetGroups; jobVersions: JobVersions; + jobs: Jobs; + ledgerDigestUploadsOperations: LedgerDigestUploadsOperations; capabilities: Capabilities; + longTermRetentionBackups: LongTermRetentionBackups; + longTermRetentionManagedInstanceBackups: LongTermRetentionManagedInstanceBackups; longTermRetentionPolicies: LongTermRetentionPolicies; maintenanceWindowOptionsOperations: MaintenanceWindowOptionsOperations; maintenanceWindowsOperations: MaintenanceWindowsOperations; managedBackupShortTermRetentionPolicies: ManagedBackupShortTermRetentionPolicies; + managedDatabaseAdvancedThreatProtectionSettings: ManagedDatabaseAdvancedThreatProtectionSettings; managedDatabaseColumns: ManagedDatabaseColumns; + managedDatabaseMoveOperations: ManagedDatabaseMoveOperations; managedDatabaseQueries: ManagedDatabaseQueries; managedDatabaseRestoreDetails: ManagedDatabaseRestoreDetails; - managedDatabases: ManagedDatabases; managedDatabaseSchemas: ManagedDatabaseSchemas; managedDatabaseSecurityAlertPolicies: ManagedDatabaseSecurityAlertPolicies; managedDatabaseSecurityEvents: ManagedDatabaseSecurityEvents; @@ -606,10 +778,13 @@ export class SqlManagementClient extends coreClient.ServiceClient { managedDatabaseTables: ManagedDatabaseTables; managedDatabaseTransparentDataEncryption: ManagedDatabaseTransparentDataEncryption; managedDatabaseVulnerabilityAssessmentRuleBaselines: ManagedDatabaseVulnerabilityAssessmentRuleBaselines; - managedDatabaseVulnerabilityAssessments: ManagedDatabaseVulnerabilityAssessments; managedDatabaseVulnerabilityAssessmentScans: ManagedDatabaseVulnerabilityAssessmentScans; + managedDatabaseVulnerabilityAssessments: ManagedDatabaseVulnerabilityAssessments; + managedDatabases: ManagedDatabases; managedInstanceAdministrators: ManagedInstanceAdministrators; + managedInstanceAdvancedThreatProtectionSettings: ManagedInstanceAdvancedThreatProtectionSettings; managedInstanceAzureADOnlyAuthentications: ManagedInstanceAzureADOnlyAuthentications; + managedInstanceDtcs: ManagedInstanceDtcs; managedInstanceEncryptionProtectors: ManagedInstanceEncryptionProtectors; managedInstanceKeys: ManagedInstanceKeys; managedInstanceLongTermRetentionPolicies: ManagedInstanceLongTermRetentionPolicies; @@ -618,51 +793,62 @@ export class SqlManagementClient extends coreClient.ServiceClient { managedInstancePrivateLinkResources: ManagedInstancePrivateLinkResources; managedInstanceTdeCertificates: ManagedInstanceTdeCertificates; managedInstanceVulnerabilityAssessments: ManagedInstanceVulnerabilityAssessments; + managedInstances: ManagedInstances; + managedLedgerDigestUploadsOperations: ManagedLedgerDigestUploadsOperations; managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies: ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; + managedServerDnsAliases: ManagedServerDnsAliases; managedServerSecurityAlertPolicies: ManagedServerSecurityAlertPolicies; operations: Operations; - operationsHealthOperations: OperationsHealthOperations; + outboundFirewallRules: OutboundFirewallRules; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; + recoverableDatabases: RecoverableDatabases; recoverableManagedDatabases: RecoverableManagedDatabases; + replicationLinks: ReplicationLinks; + restorableDroppedDatabases: RestorableDroppedDatabases; + restorableDroppedManagedDatabases: RestorableDroppedManagedDatabases; restorePoints: RestorePoints; sensitivityLabels: SensitivityLabels; recommendedSensitivityLabels: RecommendedSensitivityLabels; + serverAdvancedThreatProtectionSettings: ServerAdvancedThreatProtectionSettings; serverAdvisors: ServerAdvisors; serverAutomaticTuningOperations: ServerAutomaticTuningOperations; serverAzureADAdministrators: ServerAzureADAdministrators; serverAzureADOnlyAuthentications: ServerAzureADOnlyAuthentications; + serverConfigurationOptions: ServerConfigurationOptions; + serverConnectionPolicies: ServerConnectionPolicies; serverDevOpsAuditSettings: ServerDevOpsAuditSettings; serverDnsAliases: ServerDnsAliases; serverKeys: ServerKeys; serverOperations: ServerOperations; serverSecurityAlertPolicies: ServerSecurityAlertPolicies; + serverTrustCertificates: ServerTrustCertificates; serverTrustGroups: ServerTrustGroups; + serverUsages: ServerUsages; serverVulnerabilityAssessments: ServerVulnerabilityAssessments; + servers: Servers; sqlAgent: SqlAgent; + sqlVulnerabilityAssessmentBaseline: SqlVulnerabilityAssessmentBaseline; + sqlVulnerabilityAssessmentBaselines: SqlVulnerabilityAssessmentBaselines; + sqlVulnerabilityAssessmentExecuteScan: SqlVulnerabilityAssessmentExecuteScan; + sqlVulnerabilityAssessmentRuleBaseline: SqlVulnerabilityAssessmentRuleBaseline; + sqlVulnerabilityAssessmentRuleBaselines: SqlVulnerabilityAssessmentRuleBaselines; + sqlVulnerabilityAssessmentScanResult: SqlVulnerabilityAssessmentScanResult; + sqlVulnerabilityAssessmentScans: SqlVulnerabilityAssessmentScans; + sqlVulnerabilityAssessmentsSettings: SqlVulnerabilityAssessmentsSettings; + sqlVulnerabilityAssessments: SqlVulnerabilityAssessments; + startStopManagedInstanceSchedules: StartStopManagedInstanceSchedules; subscriptionUsages: SubscriptionUsages; + synapseLinkWorkspaces: SynapseLinkWorkspaces; syncAgents: SyncAgents; syncGroups: SyncGroups; syncMembers: SyncMembers; tdeCertificates: TdeCertificates; timeZones: TimeZones; + transparentDataEncryptions: TransparentDataEncryptions; + usages: Usages; virtualClusters: VirtualClusters; virtualNetworkRules: VirtualNetworkRules; workloadClassifiers: WorkloadClassifiers; workloadGroups: WorkloadGroups; - transparentDataEncryptions: TransparentDataEncryptions; - backupShortTermRetentionPolicies: BackupShortTermRetentionPolicies; - databaseExtensionsOperations: DatabaseExtensionsOperations; - databaseOperations: DatabaseOperations; - databaseUsages: DatabaseUsages; - ledgerDigestUploadsOperations: LedgerDigestUploadsOperations; - outboundFirewallRules: OutboundFirewallRules; - servers: Servers; - usages: Usages; - longTermRetentionBackups: LongTermRetentionBackups; - longTermRetentionManagedInstanceBackups: LongTermRetentionManagedInstanceBackups; - managedInstances: ManagedInstances; - restorableDroppedDatabases: RestorableDroppedDatabases; - restorableDroppedManagedDatabases: RestorableDroppedManagedDatabases; - serverConnectionPolicies: ServerConnectionPolicies; } diff --git a/sdk/sql/arm-sql/test/sampleTest.ts b/sdk/sql/arm-sql/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/sql/arm-sql/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/sql/arm-sql/tsconfig.json b/sdk/sql/arm-sql/tsconfig.json index c6da67f236cf..3e6ae96443f3 100644 --- a/sdk/sql/arm-sql/tsconfig.json +++ b/sdk/sql/arm-sql/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-sql": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"