From f075af1c6ea4e68f60ab90ef989e6085d8adc86d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 9 Sep 2024 16:58:25 +0000 Subject: [PATCH] CodeGen from PR 29905 in Azure/azure-rest-api-specs Merge c5487fa833c5842e4bc272591867594877c48846 into bdc14cfe458152d1e83dccd36c4fcb4227e2b660 --- sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md | 347 +- sdk/cosmosdb/arm-cosmosdb/README.md | 2 +- sdk/cosmosdb/arm-cosmosdb/_meta.json | 8 +- sdk/cosmosdb/arm-cosmosdb/package.json | 18 +- .../arm-cosmosdb/review/arm-cosmosdb.api.md | 1458 ++- .../src/cosmosDBManagementClient.ts | 37 +- sdk/cosmosdb/arm-cosmosdb/src/models/index.ts | 2391 ++++- .../arm-cosmosdb/src/models/mappers.ts | 8023 +++++++++++------ .../arm-cosmosdb/src/models/parameters.ts | 226 +- .../src/operations/cassandraClusters.ts | 422 +- .../src/operations/cassandraResources.ts | 1261 ++- .../arm-cosmosdb/src/operations/chaosFault.ts | 383 + .../src/operations/dataTransferJobs.ts | 464 + .../src/operations/graphResources.ts | 418 + .../src/operations/gremlinResources.ts | 16 +- .../arm-cosmosdb/src/operations/index.ts | 8 + .../src/operations/mongoDBResources.ts | 983 +- .../networkSecurityPerimeterConfigurations.ts | 389 + .../operations/privateEndpointConnections.ts | 4 +- .../src/operations/sqlResources.ts | 1760 +++- .../src/operations/throughputPool.ts | 454 + .../src/operations/throughputPoolAccount.ts | 361 + .../src/operations/throughputPoolAccounts.ts | 197 + .../src/operations/throughputPools.ts | 298 + .../operationsInterfaces/cassandraClusters.ts | 89 + .../cassandraResources.ts | 240 + .../src/operationsInterfaces/chaosFault.ts | 82 + .../operationsInterfaces/dataTransferJobs.ts | 122 + .../operationsInterfaces/graphResources.ts | 110 + .../src/operationsInterfaces/index.ts | 8 + .../operationsInterfaces/mongoDBResources.ts | 245 + .../networkSecurityPerimeterConfigurations.ts | 81 + .../src/operationsInterfaces/sqlResources.ts | 329 +- .../operationsInterfaces/throughputPool.ts | 122 + .../throughputPoolAccount.ts | 103 + .../throughputPoolAccounts.ts | 29 + .../operationsInterfaces/throughputPools.ts | 35 + sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts | 43 + sdk/cosmosdb/arm-cosmosdb/tsconfig.json | 10 +- 39 files changed, 17829 insertions(+), 3747 deletions(-) create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts create mode 100644 sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts diff --git a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md index 7ddaa6b72008..16839b19f126 100644 --- a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md +++ b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md @@ -1,15 +1,348 @@ # Release History - -## 16.0.1 (Unreleased) - + +## 17.0.0-beta.1 (2024-09-09) +Compared with version 16.0.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed + - Added operation group ChaosFault + - Added operation group DataTransferJobs + - Added operation group GraphResources + - Added operation group NetworkSecurityPerimeterConfigurations + - Added operation group ThroughputPool + - Added operation group ThroughputPoolAccount + - Added operation group ThroughputPoolAccounts + - Added operation group ThroughputPools + - Added operation CassandraClusters.beginInvokeCommandAsync + - Added operation CassandraClusters.beginInvokeCommandAsyncAndWait + - Added operation CassandraClusters.getBackup + - Added operation CassandraClusters.getCommandAsync + - Added operation CassandraClusters.listBackups + - Added operation CassandraClusters.listCommand + - Added operation CassandraResources.beginCreateUpdateCassandraView + - Added operation CassandraResources.beginCreateUpdateCassandraViewAndWait + - Added operation CassandraResources.beginDeleteCassandraView + - Added operation CassandraResources.beginDeleteCassandraViewAndWait + - Added operation CassandraResources.beginMigrateCassandraViewToAutoscale + - Added operation CassandraResources.beginMigrateCassandraViewToAutoscaleAndWait + - Added operation CassandraResources.beginMigrateCassandraViewToManualThroughput + - Added operation CassandraResources.beginMigrateCassandraViewToManualThroughputAndWait + - Added operation CassandraResources.beginUpdateCassandraViewThroughput + - Added operation CassandraResources.beginUpdateCassandraViewThroughputAndWait + - Added operation CassandraResources.getCassandraView + - Added operation CassandraResources.getCassandraViewThroughput + - Added operation CassandraResources.listCassandraViews + - Added operation MongoDBResources.beginListMongoDBCollectionPartitionMerge + - Added operation MongoDBResources.beginListMongoDBCollectionPartitionMergeAndWait + - Added operation MongoDBResources.beginMongoDBContainerRedistributeThroughput + - Added operation MongoDBResources.beginMongoDBContainerRedistributeThroughputAndWait + - Added operation MongoDBResources.beginMongoDBContainerRetrieveThroughputDistribution + - Added operation MongoDBResources.beginMongoDBContainerRetrieveThroughputDistributionAndWait + - Added operation MongoDBResources.beginMongoDBDatabasePartitionMerge + - Added operation MongoDBResources.beginMongoDBDatabasePartitionMergeAndWait + - Added operation MongoDBResources.beginMongoDBDatabaseRedistributeThroughput + - Added operation MongoDBResources.beginMongoDBDatabaseRedistributeThroughputAndWait + - Added operation MongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistribution + - Added operation MongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistributionAndWait + - Added operation SqlResources.beginListSqlContainerPartitionMerge + - Added operation SqlResources.beginListSqlContainerPartitionMergeAndWait + - Added operation SqlResources.beginSqlContainerRedistributeThroughput + - Added operation SqlResources.beginSqlContainerRedistributeThroughputAndWait + - Added operation SqlResources.beginSqlContainerRetrieveThroughputDistribution + - Added operation SqlResources.beginSqlContainerRetrieveThroughputDistributionAndWait + - Added operation SqlResources.beginSqlDatabasePartitionMerge + - Added operation SqlResources.beginSqlDatabasePartitionMergeAndWait + - Added operation SqlResources.beginSqlDatabaseRedistributeThroughput + - Added operation SqlResources.beginSqlDatabaseRedistributeThroughputAndWait + - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistribution + - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait + - Added Interface AccessRule + - Added Interface AccessRuleProperties + - Added Interface AccessRulePropertiesSubscriptionsItem + - Added Interface AzureBlobDataTransferDataSourceSink + - Added Interface BackupResource + - Added Interface BackupSchedule + - Added Interface BaseCosmosDataTransferDataSourceSink + - Added Interface CapacityModeChangeTransitionState + - Added Interface CassandraClustersGetBackupOptionalParams + - Added Interface CassandraClustersGetCommandAsyncOptionalParams + - Added Interface CassandraClustersInvokeCommandAsyncHeaders + - Added Interface CassandraClustersInvokeCommandAsyncOptionalParams + - Added Interface CassandraClustersListBackupsOptionalParams + - Added Interface CassandraClustersListCommandOptionalParams + - Added Interface CassandraResourcesCreateUpdateCassandraViewHeaders + - Added Interface CassandraResourcesCreateUpdateCassandraViewOptionalParams + - Added Interface CassandraResourcesDeleteCassandraViewHeaders + - Added Interface CassandraResourcesDeleteCassandraViewOptionalParams + - Added Interface CassandraResourcesGetCassandraViewOptionalParams + - Added Interface CassandraResourcesGetCassandraViewThroughputOptionalParams + - Added Interface CassandraResourcesListCassandraViewsOptionalParams + - Added Interface CassandraResourcesMigrateCassandraViewToAutoscaleHeaders + - Added Interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + - Added Interface CassandraResourcesMigrateCassandraViewToManualThroughputHeaders + - Added Interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + - Added Interface CassandraResourcesUpdateCassandraViewThroughputHeaders + - Added Interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams + - Added Interface CassandraViewCreateUpdateParameters + - Added Interface CassandraViewGetPropertiesOptions + - Added Interface CassandraViewGetPropertiesResource + - Added Interface CassandraViewGetResults + - Added Interface CassandraViewListResult + - Added Interface CassandraViewResource + - Added Interface ChaosFaultEnableDisableOptionalParams + - Added Interface ChaosFaultGetOptionalParams + - Added Interface ChaosFaultListNextOptionalParams + - Added Interface ChaosFaultListOptionalParams + - Added Interface ChaosFaultListResponse + - Added Interface ChaosFaultResource + - Added Interface CommandPublicResource + - Added Interface CosmosCassandraDataTransferDataSourceSink + - Added Interface CosmosMongoDataTransferDataSourceSink + - Added Interface CosmosMongoVCoreDataTransferDataSourceSink + - Added Interface CosmosSqlDataTransferDataSourceSink + - Added Interface CreateJobRequest + - Added Interface DataTransferDataSourceSink + - Added Interface DataTransferJobFeedResults + - Added Interface DataTransferJobGetResults + - Added Interface DataTransferJobProperties + - Added Interface DataTransferJobsCancelOptionalParams + - Added Interface DataTransferJobsCompleteOptionalParams + - Added Interface DataTransferJobsCreateOptionalParams + - Added Interface DataTransferJobsGetOptionalParams + - Added Interface DataTransferJobsListByDatabaseAccountNextOptionalParams + - Added Interface DataTransferJobsListByDatabaseAccountOptionalParams + - Added Interface DataTransferJobsPauseOptionalParams + - Added Interface DataTransferJobsResumeOptionalParams + - Added Interface DiagnosticLogSettings + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponseAutoGenerated + - Added Interface GraphResource + - Added Interface GraphResourceCreateUpdateParameters + - Added Interface GraphResourceGetPropertiesOptions + - Added Interface GraphResourceGetPropertiesResource + - Added Interface GraphResourceGetResults + - Added Interface GraphResourcesCreateUpdateGraphHeaders + - Added Interface GraphResourcesCreateUpdateGraphOptionalParams + - Added Interface GraphResourcesDeleteGraphResourceHeaders + - Added Interface GraphResourcesDeleteGraphResourceOptionalParams + - Added Interface GraphResourcesGetGraphOptionalParams + - Added Interface GraphResourcesListGraphsOptionalParams + - Added Interface GraphResourcesListResult + - Added Interface ListBackups + - Added Interface ListCommands + - Added Interface MaterializedViewDefinition + - Added Interface MergeParameters + - Added Interface MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders + - Added Interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + - Added Interface MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders + - Added Interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams + - Added Interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders + - Added Interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabasePartitionMergeHeaders + - Added Interface MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders + - Added Interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders + - Added Interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams + - Added Interface NetworkSecurityPerimeter + - Added Interface NetworkSecurityPerimeterConfiguration + - Added Interface NetworkSecurityPerimeterConfigurationListResult + - Added Interface NetworkSecurityPerimeterConfigurationProperties + - Added Interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileHeaders + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + - Added Interface NetworkSecurityProfile + - Added Interface PhysicalPartitionId + - Added Interface PhysicalPartitionStorageInfo + - Added Interface PhysicalPartitionStorageInfoCollection + - Added Interface PhysicalPartitionThroughputInfoProperties + - Added Interface PhysicalPartitionThroughputInfoResource + - Added Interface PhysicalPartitionThroughputInfoResult + - Added Interface PhysicalPartitionThroughputInfoResultPropertiesResource + - Added Interface ProvisioningIssue + - Added Interface ProvisioningIssueProperties + - Added Interface RedistributeThroughputParameters + - Added Interface RedistributeThroughputPropertiesResource + - Added Interface ResourceAssociation + - Added Interface RetrieveThroughputParameters + - Added Interface RetrieveThroughputPropertiesResource + - Added Interface SqlResourcesListSqlContainerPartitionMergeHeaders + - Added Interface SqlResourcesListSqlContainerPartitionMergeOptionalParams + - Added Interface SqlResourcesSqlContainerRedistributeThroughputHeaders + - Added Interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams + - Added Interface SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders + - Added Interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams + - Added Interface SqlResourcesSqlDatabasePartitionMergeHeaders + - Added Interface SqlResourcesSqlDatabasePartitionMergeOptionalParams + - Added Interface SqlResourcesSqlDatabaseRedistributeThroughputHeaders + - Added Interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders + - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + - Added Interface ThroughputPoolAccountCreateOptionalParams + - Added Interface ThroughputPoolAccountCreateParameters + - Added Interface ThroughputPoolAccountDeleteHeaders + - Added Interface ThroughputPoolAccountDeleteOptionalParams + - Added Interface ThroughputPoolAccountGetOptionalParams + - Added Interface ThroughputPoolAccountResource + - Added Interface ThroughputPoolAccountsListNextOptionalParams + - Added Interface ThroughputPoolAccountsListOptionalParams + - Added Interface ThroughputPoolAccountsListResult + - Added Interface ThroughputPoolCreateOrUpdateOptionalParams + - Added Interface ThroughputPoolDeleteHeaders + - Added Interface ThroughputPoolDeleteOptionalParams + - Added Interface ThroughputPoolGetOptionalParams + - Added Interface ThroughputPoolResource + - Added Interface ThroughputPoolsListByResourceGroupNextOptionalParams + - Added Interface ThroughputPoolsListByResourceGroupOptionalParams + - Added Interface ThroughputPoolsListNextOptionalParams + - Added Interface ThroughputPoolsListOptionalParams + - Added Interface ThroughputPoolsListResult + - Added Interface ThroughputPoolUpdate + - Added Interface ThroughputPoolUpdateHeaders + - Added Interface ThroughputPoolUpdateOptionalParams + - Added Interface TrackedResource + - Added Type Alias AccessRuleDirection + - Added Type Alias AutoReplicate + - Added Type Alias BackupState + - Added Type Alias BaseCosmosDataTransferDataSourceSinkUnion + - Added Type Alias CapacityMode + - Added Type Alias CapacityModeTransitionStatus + - Added Type Alias CassandraClustersGetBackupResponse + - Added Type Alias CassandraClustersGetCommandAsyncResponse + - Added Type Alias CassandraClustersInvokeCommandAsyncResponse + - Added Type Alias CassandraClustersListBackupsResponse + - Added Type Alias CassandraClustersListCommandResponse + - Added Type Alias CassandraResourcesCreateUpdateCassandraViewResponse + - Added Type Alias CassandraResourcesGetCassandraViewResponse + - Added Type Alias CassandraResourcesGetCassandraViewThroughputResponse + - Added Type Alias CassandraResourcesListCassandraViewsResponse + - Added Type Alias CassandraResourcesMigrateCassandraViewToAutoscaleResponse + - Added Type Alias CassandraResourcesMigrateCassandraViewToManualThroughputResponse + - Added Type Alias CassandraResourcesUpdateCassandraViewThroughputResponse + - Added Type Alias ChaosFaultEnableDisableResponse + - Added Type Alias ChaosFaultGetResponse + - Added Type Alias ChaosFaultListNextResponse + - Added Type Alias ChaosFaultListOperationResponse + - Added Type Alias ClusterType + - Added Type Alias CommandStatus + - Added Type Alias DataTransferComponent + - Added Type Alias DataTransferDataSourceSinkUnion + - Added Type Alias DataTransferJobMode + - Added Type Alias DataTransferJobsCancelResponse + - Added Type Alias DataTransferJobsCompleteResponse + - Added Type Alias DataTransferJobsCreateResponse + - Added Type Alias DataTransferJobsGetResponse + - Added Type Alias DataTransferJobsListByDatabaseAccountNextResponse + - Added Type Alias DataTransferJobsListByDatabaseAccountResponse + - Added Type Alias DataTransferJobsPauseResponse + - Added Type Alias DataTransferJobsResumeResponse + - Added Type Alias DefaultPriorityLevel + - Added Type Alias EnableFullTextQuery + - Added Type Alias GraphResourcesCreateUpdateGraphResponse + - Added Type Alias GraphResourcesGetGraphResponse + - Added Type Alias GraphResourcesListGraphsResponse + - Added Type Alias IssueType + - Added Type Alias MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + - Added Type Alias MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + - Added Type Alias MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + - Added Type Alias MongoDBResourcesMongoDBDatabasePartitionMergeResponse + - Added Type Alias MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + - Added Type Alias MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationProvisioningState + - Added Type Alias NetworkSecurityPerimeterConfigurationsGetResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListNextResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsReconcileResponse + - Added Type Alias ResourceAssociationAccessMode + - Added Type Alias ScheduledEventStrategy + - Added Type Alias Severity + - Added Type Alias SqlResourcesListSqlContainerPartitionMergeResponse + - Added Type Alias SqlResourcesSqlContainerRedistributeThroughputResponse + - Added Type Alias SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + - Added Type Alias SqlResourcesSqlDatabasePartitionMergeResponse + - Added Type Alias SqlResourcesSqlDatabaseRedistributeThroughputResponse + - Added Type Alias SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + - Added Type Alias SupportedActions + - Added Type Alias ThroughputPolicyType + - Added Type Alias ThroughputPoolAccountCreateResponse + - Added Type Alias ThroughputPoolAccountDeleteResponse + - Added Type Alias ThroughputPoolAccountGetResponse + - Added Type Alias ThroughputPoolAccountsListNextResponse + - Added Type Alias ThroughputPoolAccountsListResponse + - Added Type Alias ThroughputPoolCreateOrUpdateResponse + - Added Type Alias ThroughputPoolDeleteResponse + - Added Type Alias ThroughputPoolGetResponse + - Added Type Alias ThroughputPoolsListByResourceGroupNextResponse + - Added Type Alias ThroughputPoolsListByResourceGroupResponse + - Added Type Alias ThroughputPoolsListNextResponse + - Added Type Alias ThroughputPoolsListResponse + - Added Type Alias ThroughputPoolUpdateResponse + - Interface ARMResourceProperties has a new optional parameter identity + - Interface CassandraClustersDeallocateOptionalParams has a new optional parameter xMsForceDeallocate + - Interface ClusterResourceProperties has a new optional parameter autoReplicate + - Interface ClusterResourceProperties has a new optional parameter backupSchedules + - Interface ClusterResourceProperties has a new optional parameter clusterType + - Interface ClusterResourceProperties has a new optional parameter extensions + - Interface ClusterResourceProperties has a new optional parameter externalDataCenters + - Interface ClusterResourceProperties has a new optional parameter scheduledEventStrategy + - Interface CommandPostBody has a new optional parameter readWrite + - Interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems has a new optional parameter isLatestModel + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter capacityMode + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter defaultPriorityLevel + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enablePerRegionPerPartitionAutoscale + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enablePriorityBasedExecution + - Interface DatabaseAccountGetResults has a new optional parameter capacityMode + - Interface DatabaseAccountGetResults has a new optional parameter capacityModeChangeTransitionState + - Interface DatabaseAccountGetResults has a new optional parameter defaultPriorityLevel + - Interface DatabaseAccountGetResults has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountGetResults has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountGetResults has a new optional parameter enablePerRegionPerPartitionAutoscale + - Interface DatabaseAccountGetResults has a new optional parameter enablePriorityBasedExecution + - Interface DatabaseAccountUpdateParameters has a new optional parameter capacityMode + - Interface DatabaseAccountUpdateParameters has a new optional parameter defaultPriorityLevel + - Interface DatabaseAccountUpdateParameters has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountUpdateParameters has a new optional parameter enablePerRegionPerPartitionAutoscale + - Interface DatabaseAccountUpdateParameters has a new optional parameter enablePriorityBasedExecution + - Interface Resource has a new optional parameter systemData + - Interface RestoreParameters has a new optional parameter sourceBackupLocation + - Interface RestoreParametersBase has a new optional parameter restoreWithTtlDisabled + - Interface SqlContainerResource has a new optional parameter materializedViewDefinition + - Added Enum KnownAccessRuleDirection + - Added Enum KnownAutoReplicate + - Added Enum KnownBackupState + - Added Enum KnownCapacityMode + - Added Enum KnownCapacityModeTransitionStatus + - Added Enum KnownClusterType + - Added Enum KnownCommandStatus + - Added Enum KnownDataTransferComponent + - Added Enum KnownDataTransferJobMode + - Added Enum KnownDefaultPriorityLevel + - Added Enum KnownIssueType + - Added Enum KnownNetworkSecurityPerimeterConfigurationProvisioningState + - Added Enum KnownResourceAssociationAccessMode + - Added Enum KnownScheduledEventStrategy + - Added Enum KnownSeverity + - Added Enum KnownThroughputPolicyType + - Enum KnownServerVersion has a new value Seven0 + - Enum KnownStatus has a new value Canceled + - Enum KnownStatus has a new value Failed + - Enum KnownStatus has a new value Succeeded + - Enum KnownStatus has a new value Updating -### Other Changes +### Breaking Changes + - Interface CommandPostBody no longer has parameter readwrite + - Type of parameter arguments of interface CommandPostBody is changed from { + [propertyName: string]: string; + } to Record + + ## 16.0.0 (2024-06-24) ### Features Added diff --git a/sdk/cosmosdb/arm-cosmosdb/README.md b/sdk/cosmosdb/arm-cosmosdb/README.md index 028cf521dcd2..0de6091bc808 100644 --- a/sdk/cosmosdb/arm-cosmosdb/README.md +++ b/sdk/cosmosdb/arm-cosmosdb/README.md @@ -6,7 +6,7 @@ Azure Cosmos DB Database Service Resource Provider REST API [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-cosmosdb) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/cosmosdb/arm-cosmosdb/_meta.json b/sdk/cosmosdb/arm-cosmosdb/_meta.json index e5a73d993a01..1bbd34f77414 100644 --- a/sdk/cosmosdb/arm-cosmosdb/_meta.json +++ b/sdk/cosmosdb/arm-cosmosdb/_meta.json @@ -1,8 +1,8 @@ { - "commit": "768c1f32bbfdcea80bdadf92dc2fba2c114c2dda", + "commit": "31f133a6fb1e1981adaad4ca265c1a39c5de350b", "readme": "specification/cosmos-db/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --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\\cosmos-db\\resource-manager\\readme.md --use=@autorest/typescript@6.0.23 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --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/cosmos-db/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.11", - "use": "@autorest/typescript@6.0.23" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.12", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 9be5fb3bd66f..d9d10ca60026 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -3,13 +3,13 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CosmosDBManagementClient.", - "version": "16.0.1", + "version": "17.0.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { "@azure/core-lro": "^2.5.4", - "@azure/abort-controller": "^1.0.0", + "@azure/abort-controller": "^2.1.2", "@azure/core-paging": "^1.2.0", "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.6.0", @@ -35,7 +35,7 @@ "rimraf": "^5.0.0", "dotenv": "^16.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", + "@azure/identity": "^4.2.1", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.1.0", "mocha": "^10.0.0", @@ -106,13 +106,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb" +} \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md index 1972c32abd7b..5571d7c8f6c5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md +++ b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md @@ -10,6 +10,31 @@ import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { SimplePollerLike } from '@azure/core-lro'; +// @public +export interface AccessRule { + name?: string; + properties?: AccessRuleProperties; +} + +// @public +export type AccessRuleDirection = string; + +// @public +export interface AccessRuleProperties { + addressPrefixes?: string[]; + direction?: AccessRuleDirection; + emailAddresses?: string[]; + fullyQualifiedDomainNames?: string[]; + networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + phoneNumbers?: string[]; + subscriptions?: AccessRulePropertiesSubscriptionsItem[]; +} + +// @public +export interface AccessRulePropertiesSubscriptionsItem { + id?: string; +} + // @public export interface AccountKeyMetadata { readonly generationTime?: Date; @@ -41,6 +66,7 @@ export interface ARMProxyResource { // @public export interface ARMResourceProperties { readonly id?: string; + identity?: ManagedServiceIdentity; location?: string; readonly name?: string; tags?: { @@ -65,6 +91,9 @@ export interface AuthenticationMethodLdapProperties { serviceUserPassword?: string; } +// @public +export type AutoReplicate = string; + // @public (undocumented) export interface AutoscaleSettings { maxThroughput?: number; @@ -82,6 +111,15 @@ export interface AutoUpgradePolicyResource { throughputPolicy?: ThroughputPolicyResource; } +// @public +export interface AzureBlobDataTransferDataSourceSink extends DataTransferDataSourceSink { + component: "AzureBlobStorage"; + // (undocumented) + containerName: string; + // (undocumented) + endpointUrl?: string; +} + // @public export type AzureConnectionType = string; @@ -112,9 +150,38 @@ export type BackupPolicyType = string; // @public (undocumented) export type BackupPolicyUnion = BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; +// @public +export interface BackupResource { + backupExpiryTimestamp?: Date; + backupId?: string; + backupStartTimestamp?: Date; + backupState?: BackupState; + backupStopTimestamp?: Date; +} + +// @public (undocumented) +export interface BackupSchedule { + cronExpression?: string; + retentionInHours?: number; + scheduleName?: string; +} + +// @public +export type BackupState = string; + // @public export type BackupStorageRedundancy = string; +// @public +export interface BaseCosmosDataTransferDataSourceSink extends DataTransferDataSourceSink { + component: "BaseCosmosDataTransferDataSourceSink" | "CosmosDBCassandra" | "CosmosDBMongo" | "CosmosDBSql"; + // (undocumented) + remoteAccountName?: string; +} + +// @public (undocumented) +export type BaseCosmosDataTransferDataSourceSinkUnion = BaseCosmosDataTransferDataSourceSink | CosmosCassandraDataTransferDataSourceSink | CosmosMongoDataTransferDataSourceSink | CosmosSqlDataTransferDataSourceSink; + // @public export interface Capability { name?: string; @@ -125,6 +192,22 @@ export interface Capacity { totalThroughputLimit?: number; } +// @public +export type CapacityMode = string; + +// @public +export interface CapacityModeChangeTransitionState { + readonly capacityModeLastSuccessfulTransitionEndTimestamp?: Date; + readonly capacityModeTransitionBeginTimestamp?: Date; + readonly capacityModeTransitionEndTimestamp?: Date; + capacityModeTransitionStatus?: CapacityModeTransitionStatus; + currentCapacityMode?: CapacityMode; + previousCapacityMode?: CapacityMode; +} + +// @public +export type CapacityModeTransitionStatus = string; + // @public export interface CassandraClusterPublicStatus { connectionErrors?: ConnectionError[]; @@ -154,13 +237,19 @@ export interface CassandraClusters { beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: CassandraClustersDeleteOptionalParams): Promise; beginInvokeCommand(resourceGroupName: string, clusterName: string, body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams): Promise, CassandraClustersInvokeCommandResponse>>; beginInvokeCommandAndWait(resourceGroupName: string, clusterName: string, body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams): Promise; + beginInvokeCommandAsync(resourceGroupName: string, clusterName: string, body: CommandPostBody, options?: CassandraClustersInvokeCommandAsyncOptionalParams): Promise, CassandraClustersInvokeCommandAsyncResponse>>; + beginInvokeCommandAsyncAndWait(resourceGroupName: string, clusterName: string, body: CommandPostBody, options?: CassandraClustersInvokeCommandAsyncOptionalParams): Promise; beginStart(resourceGroupName: string, clusterName: string, options?: CassandraClustersStartOptionalParams): Promise, void>>; beginStartAndWait(resourceGroupName: string, clusterName: string, options?: CassandraClustersStartOptionalParams): Promise; beginUpdate(resourceGroupName: string, clusterName: string, body: ClusterResource, options?: CassandraClustersUpdateOptionalParams): Promise, CassandraClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, body: ClusterResource, options?: CassandraClustersUpdateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: CassandraClustersGetOptionalParams): Promise; + getBackup(resourceGroupName: string, clusterName: string, backupId: string, options?: CassandraClustersGetBackupOptionalParams): Promise; + getCommandAsync(resourceGroupName: string, clusterName: string, commandId: string, options?: CassandraClustersGetCommandAsyncOptionalParams): Promise; + listBackups(resourceGroupName: string, clusterName: string, options?: CassandraClustersListBackupsOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: CassandraClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; + listCommand(resourceGroupName: string, clusterName: string, options?: CassandraClustersListCommandOptionalParams): PagedAsyncIterableIterator; status(resourceGroupName: string, clusterName: string, options?: CassandraClustersStatusOptionalParams): Promise; } @@ -177,6 +266,7 @@ export type CassandraClustersCreateUpdateResponse = ClusterResource; export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; updateIntervalInMs?: number; + xMsForceDeallocate?: string; } // @public @@ -185,6 +275,20 @@ export interface CassandraClustersDeleteOptionalParams extends coreClient.Operat updateIntervalInMs?: number; } +// @public +export interface CassandraClustersGetBackupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersGetBackupResponse = BackupResource; + +// @public +export interface CassandraClustersGetCommandAsyncOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersGetCommandAsyncResponse = ListCommands; + // @public export interface CassandraClustersGetOptionalParams extends coreClient.OperationOptions { } @@ -192,6 +296,21 @@ export interface CassandraClustersGetOptionalParams extends coreClient.Operation // @public export type CassandraClustersGetResponse = ClusterResource; +// @public +export interface CassandraClustersInvokeCommandAsyncHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraClustersInvokeCommandAsyncOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraClustersInvokeCommandAsyncResponse = CommandPublicResource; + // @public export interface CassandraClustersInvokeCommandOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -201,6 +320,13 @@ export interface CassandraClustersInvokeCommandOptionalParams extends coreClient // @public export type CassandraClustersInvokeCommandResponse = CommandOutput; +// @public +export interface CassandraClustersListBackupsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersListBackupsResponse = ListBackups; + // @public export interface CassandraClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { } @@ -215,6 +341,13 @@ export interface CassandraClustersListBySubscriptionOptionalParams extends coreC // @public export type CassandraClustersListBySubscriptionResponse = ListClusters; +// @public +export interface CassandraClustersListCommandOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersListCommandResponse = ListCommands; + // @public export interface CassandraClustersStartOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -338,10 +471,14 @@ export interface CassandraResources { beginCreateUpdateCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, createUpdateCassandraKeyspaceParameters: CassandraKeyspaceCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraKeyspaceOptionalParams): Promise; beginCreateUpdateCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: CassandraTableCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraTableOptionalParams): Promise, CassandraResourcesCreateUpdateCassandraTableResponse>>; beginCreateUpdateCassandraTableAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: CassandraTableCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraTableOptionalParams): Promise; + beginCreateUpdateCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams): Promise, CassandraResourcesCreateUpdateCassandraViewResponse>>; + beginCreateUpdateCassandraViewAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams): Promise; beginDeleteCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise, CassandraResourcesDeleteCassandraKeyspaceResponse>>; beginDeleteCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise; beginDeleteCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise, CassandraResourcesDeleteCassandraTableResponse>>; beginDeleteCassandraTableAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise; + beginDeleteCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesDeleteCassandraViewOptionalParams): Promise, void>>; + beginDeleteCassandraViewAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesDeleteCassandraViewOptionalParams): Promise; beginMigrateCassandraKeyspaceToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams): Promise, CassandraResourcesMigrateCassandraKeyspaceToAutoscaleResponse>>; beginMigrateCassandraKeyspaceToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams): Promise; beginMigrateCassandraKeyspaceToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraKeyspaceToManualThroughputResponse>>; @@ -350,16 +487,25 @@ export interface CassandraResources { beginMigrateCassandraTableToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams): Promise; beginMigrateCassandraTableToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraTableToManualThroughputResponse>>; beginMigrateCassandraTableToManualThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams): Promise; + beginMigrateCassandraViewToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams): Promise, CassandraResourcesMigrateCassandraViewToAutoscaleResponse>>; + beginMigrateCassandraViewToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams): Promise; + beginMigrateCassandraViewToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraViewToManualThroughputResponse>>; + beginMigrateCassandraViewToManualThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams): Promise; beginUpdateCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraKeyspaceThroughputResponse>>; beginUpdateCassandraKeyspaceThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams): Promise; beginUpdateCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraTableThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraTableThroughputResponse>>; beginUpdateCassandraTableThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraTableThroughputOptionalParams): Promise; + beginUpdateCassandraViewThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraViewThroughputResponse>>; + beginUpdateCassandraViewThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams): Promise; getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesGetCassandraKeyspaceOptionalParams): Promise; getCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesGetCassandraKeyspaceThroughputOptionalParams): Promise; getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesGetCassandraTableOptionalParams): Promise; getCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesGetCassandraTableThroughputOptionalParams): Promise; + getCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesGetCassandraViewOptionalParams): Promise; + getCassandraViewThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesGetCassandraViewThroughputOptionalParams): Promise; listCassandraKeyspaces(resourceGroupName: string, accountName: string, options?: CassandraResourcesListCassandraKeyspacesOptionalParams): PagedAsyncIterableIterator; listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesListCassandraTablesOptionalParams): PagedAsyncIterableIterator; + listCassandraViews(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesListCassandraViewsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -392,6 +538,21 @@ export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams exte // @public export type CassandraResourcesCreateUpdateCassandraTableResponse = CassandraTableGetResults; +// @public +export interface CassandraResourcesCreateUpdateCassandraViewHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesCreateUpdateCassandraViewResponse = CassandraViewGetResults; + // @public export interface CassandraResourcesDeleteCassandraKeyspaceHeaders { azureAsyncOperation?: string; @@ -422,6 +583,18 @@ export interface CassandraResourcesDeleteCassandraTableOptionalParams extends co // @public export type CassandraResourcesDeleteCassandraTableResponse = CassandraResourcesDeleteCassandraTableHeaders; +// @public +export interface CassandraResourcesDeleteCassandraViewHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesDeleteCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface CassandraResourcesGetCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { } @@ -450,6 +623,20 @@ export interface CassandraResourcesGetCassandraTableThroughputOptionalParams ext // @public export type CassandraResourcesGetCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesGetCassandraViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesGetCassandraViewResponse = CassandraViewGetResults; + +// @public +export interface CassandraResourcesGetCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesGetCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesListCassandraKeyspacesOptionalParams extends coreClient.OperationOptions { } @@ -464,6 +651,13 @@ export interface CassandraResourcesListCassandraTablesOptionalParams extends cor // @public export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult; +// @public +export interface CassandraResourcesListCassandraViewsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesListCassandraViewsResponse = CassandraViewListResult; + // @public export interface CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders { azureAsyncOperation?: string; @@ -524,6 +718,36 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption // @public export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesMigrateCassandraViewToAutoscaleHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = ThroughputSettingsGetResults; + +// @public +export interface CassandraResourcesMigrateCassandraViewToManualThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders { azureAsyncOperation?: string; @@ -554,6 +778,21 @@ export interface CassandraResourcesUpdateCassandraTableThroughputOptionalParams // @public export type CassandraResourcesUpdateCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesUpdateCassandraViewThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesUpdateCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraSchema { clusterKeys?: ClusterKey[]; @@ -596,11 +835,97 @@ export interface CassandraTableResource { schema?: CassandraSchema; } +// @public +export interface CassandraViewCreateUpdateParameters extends ARMResourceProperties { + options?: CreateUpdateOptions; + resource: CassandraViewResource; +} + +// @public (undocumented) +export interface CassandraViewGetPropertiesOptions extends OptionsResource { +} + +// @public (undocumented) +export interface CassandraViewGetPropertiesResource extends CassandraViewResource, ExtendedResourceProperties { +} + +// @public +export interface CassandraViewGetResults extends ARMResourceProperties { + // (undocumented) + options?: CassandraViewGetPropertiesOptions; + // (undocumented) + resource?: CassandraViewGetPropertiesResource; +} + +// @public +export interface CassandraViewListResult { + readonly value?: CassandraViewGetResults[]; +} + +// @public +export interface CassandraViewResource { + id: string; + viewDefinition: string; +} + // @public (undocumented) export interface Certificate { pem?: string; } +// @public +export interface ChaosFault { + beginEnableDisable(resourceGroupName: string, accountName: string, chaosFault: string, chaosFaultRequest: ChaosFaultResource, options?: ChaosFaultEnableDisableOptionalParams): Promise, ChaosFaultEnableDisableResponse>>; + beginEnableDisableAndWait(resourceGroupName: string, accountName: string, chaosFault: string, chaosFaultRequest: ChaosFaultResource, options?: ChaosFaultEnableDisableOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, chaosFault: string, options?: ChaosFaultGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: ChaosFaultListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ChaosFaultEnableDisableOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ChaosFaultEnableDisableResponse = ChaosFaultResource; + +// @public +export interface ChaosFaultGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChaosFaultGetResponse = ChaosFaultResource; + +// @public +export interface ChaosFaultListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ChaosFaultListNextResponse = ChaosFaultListResponse; + +// @public +export type ChaosFaultListOperationResponse = ChaosFaultListResponse; + +// @public +export interface ChaosFaultListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface ChaosFaultListResponse { + readonly nextLink?: string; + readonly value?: ChaosFaultResource[]; +} + +// @public +export interface ChaosFaultResource extends ProxyResource { + action?: SupportedActions; + containerName?: string; + databaseName?: string; + readonly provisioningState?: string; + region?: string; +} + // @public (undocumented) export interface ClientEncryptionIncludedPath { clientEncryptionKeyId: string; @@ -662,13 +987,18 @@ export interface ClusterResource extends ManagedCassandraARMResourceProperties { // @public export interface ClusterResourceProperties { authenticationMethod?: AuthenticationMethod; + autoReplicate?: AutoReplicate; azureConnectionMethod?: AzureConnectionType; + backupSchedules?: BackupSchedule[]; cassandraAuditLoggingEnabled?: boolean; cassandraVersion?: string; clientCertificates?: Certificate[]; clusterNameOverride?: string; + clusterType?: ClusterType; deallocated?: boolean; delegatedManagementSubnetId?: string; + extensions?: string[]; + externalDataCenters?: string[]; externalGossipCertificates?: Certificate[]; externalSeedNodes?: SeedNode[]; readonly gossipCertificates?: Certificate[]; @@ -680,9 +1010,13 @@ export interface ClusterResourceProperties { provisioningState?: ManagedCassandraProvisioningState; repairEnabled?: boolean; restoreFromBackupId?: string; + scheduledEventStrategy?: ScheduledEventStrategy; readonly seedNodes?: SeedNode[]; } +// @public +export type ClusterType = string; + // @public export interface Collection { listMetricDefinitions(resourceGroupName: string, accountName: string, databaseRid: string, collectionRid: string, options?: CollectionListMetricDefinitionsOptionalParams): PagedAsyncIterableIterator; @@ -770,15 +1104,30 @@ export interface CommandOutput { // @public export interface CommandPostBody { - arguments?: { - [propertyName: string]: string; - }; + arguments?: Record; cassandraStopStart?: boolean; command: string; host: string; - readwrite?: boolean; + readWrite?: boolean; } +// @public +export interface CommandPublicResource { + arguments?: Record; + cassandraStopStart?: boolean; + command?: string; + commandId?: string; + host?: string; + isAdmin?: boolean; + outputFile?: string; + readWrite?: boolean; + result?: string; + status?: CommandStatus; +} + +// @public +export type CommandStatus = string; + // @public (undocumented) export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { readonly clientId?: string; @@ -793,6 +1142,7 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa diskFreeKB?: number; diskUsedKB?: number; hostID?: string; + isLatestModel?: boolean; load?: string; memoryBuffersAndCachedKB?: number; memoryFreeKB?: number; @@ -896,6 +1246,15 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +// @public +export interface CosmosCassandraDataTransferDataSourceSink extends BaseCosmosDataTransferDataSourceSink { + component: "CosmosDBCassandra"; + // (undocumented) + keyspaceName: string; + // (undocumented) + tableName: string; +} + // @public (undocumented) export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -910,6 +1269,8 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) cassandraResources: CassandraResources; // (undocumented) + chaosFault: ChaosFault; + // (undocumented) collection: Collection; // (undocumented) collectionPartition: CollectionPartition; @@ -924,12 +1285,18 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) databaseAccounts: DatabaseAccounts; // (undocumented) + dataTransferJobs: DataTransferJobs; + // (undocumented) + graphResources: GraphResources; + // (undocumented) gremlinResources: GremlinResources; // (undocumented) locations: Locations; // (undocumented) mongoDBResources: MongoDBResources; // (undocumented) + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; + // (undocumented) notebookWorkspaces: NotebookWorkspaces; // (undocumented) operations: Operations; @@ -979,6 +1346,14 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { subscriptionId: string; // (undocumented) tableResources: TableResources; + // (undocumented) + throughputPool: ThroughputPool; + // (undocumented) + throughputPoolAccount: ThroughputPoolAccount; + // (undocumented) + throughputPoolAccounts: ThroughputPoolAccounts; + // (undocumented) + throughputPools: ThroughputPools; } // @public @@ -988,9 +1363,45 @@ export interface CosmosDBManagementClientOptionalParams extends coreClient.Servi endpoint?: string; } +// @public +export interface CosmosMongoDataTransferDataSourceSink extends BaseCosmosDataTransferDataSourceSink { + // (undocumented) + collectionName: string; + component: "CosmosDBMongo"; + // (undocumented) + databaseName: string; +} + +// @public +export interface CosmosMongoVCoreDataTransferDataSourceSink extends DataTransferDataSourceSink { + // (undocumented) + collectionName: string; + component: "CosmosDBMongoVCore"; + // (undocumented) + connectionStringKeyVaultUri?: string; + // (undocumented) + databaseName: string; + // (undocumented) + hostName?: string; +} + +// @public +export interface CosmosSqlDataTransferDataSourceSink extends BaseCosmosDataTransferDataSourceSink { + component: "CosmosDBSql"; + // (undocumented) + containerName: string; + // (undocumented) + databaseName: string; +} + // @public export type CreatedByType = string; +// @public +export interface CreateJobRequest extends ARMProxyResource { + properties: DataTransferJobProperties; +} + // @public export type CreateMode = string; @@ -1022,6 +1433,7 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper backupPolicy?: BackupPolicyUnion; capabilities?: Capability[]; capacity?: Capacity; + capacityMode?: CapacityMode; connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; @@ -1029,6 +1441,8 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper customerManagedKeyStatus?: string; databaseAccountOfferType: "Standard"; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; @@ -1036,9 +1450,11 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper enableBurstCapacity?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; - identity?: ManagedServiceIdentity; + enablePerRegionPerPartitionAutoscale?: boolean; + enablePriorityBasedExecution?: boolean; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; readonly keysMetadata?: DatabaseAccountKeysMetadata; @@ -1060,6 +1476,8 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { backupPolicy?: BackupPolicyUnion; capabilities?: Capability[]; capacity?: Capacity; + capacityMode?: CapacityMode; + capacityModeChangeTransitionState?: CapacityModeChangeTransitionState; connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; @@ -1067,6 +1485,8 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { customerManagedKeyStatus?: string; readonly databaseAccountOfferType?: "Standard"; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; readonly documentEndpoint?: string; @@ -1075,10 +1495,12 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { enableBurstCapacity?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; + enablePerRegionPerPartitionAutoscale?: boolean; + enablePriorityBasedExecution?: boolean; readonly failoverPolicies?: FailoverPolicy[]; - identity?: ManagedServiceIdentity; readonly instanceId?: string; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; @@ -1349,11 +1771,14 @@ export interface DatabaseAccountUpdateParameters { backupPolicy?: BackupPolicyUnion; capabilities?: Capability[]; capacity?: Capacity; + capacityMode?: CapacityMode; connectorOffer?: ConnectorOffer; consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; customerManagedKeyStatus?: string; defaultIdentity?: string; + defaultPriorityLevel?: DefaultPriorityLevel; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; @@ -1361,8 +1786,11 @@ export interface DatabaseAccountUpdateParameters { enableBurstCapacity?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; + enablePerRegionPerPartitionAutoscale?: boolean; + enablePriorityBasedExecution?: boolean; identity?: ManagedServiceIdentity; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; @@ -1433,6 +1861,123 @@ export interface DataCenterResourceProperties { sku?: string; } +// @public +export type DataTransferComponent = string; + +// @public +export interface DataTransferDataSourceSink { + component: "BaseCosmosDataTransferDataSourceSink" | "CosmosDBCassandra" | "CosmosDBMongo" | "CosmosDBMongoVCore" | "CosmosDBSql" | "AzureBlobStorage"; +} + +// @public (undocumented) +export type DataTransferDataSourceSinkUnion = DataTransferDataSourceSink | BaseCosmosDataTransferDataSourceSinkUnion | CosmosMongoVCoreDataTransferDataSourceSink | AzureBlobDataTransferDataSourceSink; + +// @public +export interface DataTransferJobFeedResults { + readonly nextLink?: string; + readonly value?: DataTransferJobGetResults[]; +} + +// @public +export interface DataTransferJobGetResults extends ARMProxyResource { + destination?: DataTransferDataSourceSinkUnion; + readonly duration?: string; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + mode?: DataTransferJobMode; + readonly processedCount?: number; + source?: DataTransferDataSourceSinkUnion; + readonly status?: string; + readonly totalCount?: number; + workerCount?: number; +} + +// @public +export type DataTransferJobMode = string; + +// @public +export interface DataTransferJobProperties { + destination: DataTransferDataSourceSinkUnion; + readonly duration?: string; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + mode?: DataTransferJobMode; + readonly processedCount?: number; + source: DataTransferDataSourceSinkUnion; + readonly status?: string; + readonly totalCount?: number; + workerCount?: number; +} + +// @public +export interface DataTransferJobs { + cancel(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsCancelOptionalParams): Promise; + complete(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsCompleteOptionalParams): Promise; + create(resourceGroupName: string, accountName: string, jobName: string, jobCreateParameters: CreateJobRequest, options?: DataTransferJobsCreateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsGetOptionalParams): Promise; + listByDatabaseAccount(resourceGroupName: string, accountName: string, options?: DataTransferJobsListByDatabaseAccountOptionalParams): PagedAsyncIterableIterator; + pause(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsPauseOptionalParams): Promise; + resume(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsResumeOptionalParams): Promise; +} + +// @public +export interface DataTransferJobsCancelOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCancelResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsCompleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCompleteResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCreateResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsGetResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsListByDatabaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsListByDatabaseAccountNextResponse = DataTransferJobFeedResults; + +// @public +export interface DataTransferJobsListByDatabaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsListByDatabaseAccountResponse = DataTransferJobFeedResults; + +// @public +export interface DataTransferJobsPauseOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsPauseResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsResumeOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsResumeResponse = DataTransferJobGetResults; + // @public export interface DataTransferRegionalServiceResource extends RegionalServiceResource { } @@ -1462,12 +2007,43 @@ export type DedicatedGatewayType = string; // @public export type DefaultConsistencyLevel = "Eventual" | "Session" | "BoundedStaleness" | "Strong" | "ConsistentPrefix"; +// @public +export type DefaultPriorityLevel = string; + +// @public +export interface DiagnosticLogSettings { + enableFullTextQuery?: EnableFullTextQuery; +} + +// @public +export type EnableFullTextQuery = "None" | "True" | "False"; + +// @public +export interface ErrorAdditionalInfo { + readonly info?: Record; + readonly type?: string; +} + +// @public +export interface ErrorDetail { + readonly additionalInfo?: ErrorAdditionalInfo[]; + readonly code?: string; + readonly details?: ErrorDetail[]; + readonly message?: string; + readonly target?: string; +} + // @public export interface ErrorResponse { code?: string; message?: string; } +// @public +export interface ErrorResponseAutoGenerated { + error?: ErrorDetail; +} + // @public (undocumented) export interface ExcludedPath { path?: string; @@ -1493,28 +2069,111 @@ export interface FailoverPolicy { } // @public -export function getContinuationToken(page: unknown): string | undefined; +export function getContinuationToken(page: unknown): string | undefined; + +// @public +export interface GraphAPIComputeRegionalServiceResource extends RegionalServiceResource { + readonly graphApiComputeEndpoint?: string; +} + +// @public +export interface GraphAPIComputeServiceResource { + properties?: GraphAPIComputeServiceResourceProperties; +} + +// @public +export interface GraphAPIComputeServiceResourceCreateUpdateProperties extends ServiceResourceCreateUpdateProperties { + serviceType: "GraphAPICompute"; +} + +// @public +export interface GraphAPIComputeServiceResourceProperties extends ServiceResourceProperties { + graphApiComputeEndpoint?: string; + readonly locations?: GraphAPIComputeRegionalServiceResource[]; + serviceType: "GraphAPICompute"; +} + +// @public +export interface GraphResource { + id: string; +} + +// @public +export interface GraphResourceCreateUpdateParameters extends ARMResourceProperties { + options?: CreateUpdateOptions; + resource: GraphResource; +} + +// @public (undocumented) +export interface GraphResourceGetPropertiesOptions extends OptionsResource { +} + +// @public (undocumented) +export interface GraphResourceGetPropertiesResource extends GraphResource { +} + +// @public +export interface GraphResourceGetResults extends ARMResourceProperties { + // (undocumented) + options?: GraphResourceGetPropertiesOptions; + // (undocumented) + resource?: GraphResourceGetPropertiesResource; +} + +// @public +export interface GraphResources { + beginCreateUpdateGraph(resourceGroupName: string, accountName: string, graphName: string, createUpdateGraphParameters: GraphResourceCreateUpdateParameters, options?: GraphResourcesCreateUpdateGraphOptionalParams): Promise, GraphResourcesCreateUpdateGraphResponse>>; + beginCreateUpdateGraphAndWait(resourceGroupName: string, accountName: string, graphName: string, createUpdateGraphParameters: GraphResourceCreateUpdateParameters, options?: GraphResourcesCreateUpdateGraphOptionalParams): Promise; + beginDeleteGraphResource(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesDeleteGraphResourceOptionalParams): Promise, void>>; + beginDeleteGraphResourceAndWait(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesDeleteGraphResourceOptionalParams): Promise; + getGraph(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesGetGraphOptionalParams): Promise; + listGraphs(resourceGroupName: string, accountName: string, options?: GraphResourcesListGraphsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GraphResourcesCreateUpdateGraphHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface GraphResourcesCreateUpdateGraphOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesDeleteGraphResourceHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface GraphResourcesDeleteGraphResourceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} // @public -export interface GraphAPIComputeRegionalServiceResource extends RegionalServiceResource { - readonly graphApiComputeEndpoint?: string; +export interface GraphResourcesGetGraphOptionalParams extends coreClient.OperationOptions { } // @public -export interface GraphAPIComputeServiceResource { - properties?: GraphAPIComputeServiceResourceProperties; -} +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; // @public -export interface GraphAPIComputeServiceResourceCreateUpdateProperties extends ServiceResourceCreateUpdateProperties { - serviceType: "GraphAPICompute"; +export interface GraphResourcesListGraphsOptionalParams extends coreClient.OperationOptions { } // @public -export interface GraphAPIComputeServiceResourceProperties extends ServiceResourceProperties { - graphApiComputeEndpoint?: string; - readonly locations?: GraphAPIComputeRegionalServiceResource[]; - serviceType: "GraphAPICompute"; +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; + +// @public +export interface GraphResourcesListResult { + readonly value?: GraphResourceGetResults[]; } // @public @@ -1864,6 +2523,9 @@ export interface IpAddressOrRange { ipAddressOrRange?: string; } +// @public +export type IssueType = string; + // @public export type KeyKind = string; @@ -1878,6 +2540,12 @@ export interface KeyWrapMetadata { // @public export type Kind = string; +// @public +export enum KnownAccessRuleDirection { + Inbound = "Inbound", + Outbound = "Outbound" +} + // @public export enum KnownAnalyticalStorageSchemaType { FullFidelity = "FullFidelity", @@ -1901,6 +2569,13 @@ export enum KnownAuthenticationMethod { None = "None" } +// @public +export enum KnownAutoReplicate { + AllKeyspaces = "AllKeyspaces", + None = "None", + SystemKeyspaces = "SystemKeyspaces" +} + // @public export enum KnownAzureConnectionType { None = "None", @@ -1921,6 +2596,14 @@ export enum KnownBackupPolicyType { Periodic = "Periodic" } +// @public +export enum KnownBackupState { + Failed = "Failed", + Initiated = "Initiated", + InProgress = "InProgress", + Succeeded = "Succeeded" +} + // @public export enum KnownBackupStorageRedundancy { Geo = "Geo", @@ -1928,6 +2611,38 @@ export enum KnownBackupStorageRedundancy { Zone = "Zone" } +// @public +export enum KnownCapacityMode { + None = "None", + Provisioned = "Provisioned", + Serverless = "Serverless" +} + +// @public +export enum KnownCapacityModeTransitionStatus { + Completed = "Completed", + Failed = "Failed", + Initialized = "Initialized", + InProgress = "InProgress", + Invalid = "Invalid" +} + +// @public +export enum KnownClusterType { + NonProduction = "NonProduction", + Production = "Production" +} + +// @public +export enum KnownCommandStatus { + Done = "Done", + Enqueue = "Enqueue", + Failed = "Failed", + Finished = "Finished", + Processing = "Processing", + Running = "Running" +} + // @public export enum KnownCompositePathSortOrder { Ascending = "ascending", @@ -1982,6 +2697,21 @@ export enum KnownDatabaseAccountKind { Parse = "Parse" } +// @public +export enum KnownDataTransferComponent { + AzureBlobStorage = "AzureBlobStorage", + CosmosDBCassandra = "CosmosDBCassandra", + CosmosDBMongo = "CosmosDBMongo", + CosmosDBMongoVCore = "CosmosDBMongoVCore", + CosmosDBSql = "CosmosDBSql" +} + +// @public +export enum KnownDataTransferJobMode { + Offline = "Offline", + Online = "Online" +} + // @public export enum KnownDataType { LineString = "LineString", @@ -1998,6 +2728,12 @@ export enum KnownDedicatedGatewayType { IntegratedCache = "IntegratedCache" } +// @public +export enum KnownDefaultPriorityLevel { + High = "High", + Low = "Low" +} + // @public export enum KnownIndexingMode { Consistent = "consistent", @@ -2012,6 +2748,14 @@ export enum KnownIndexKind { Spatial = "Spatial" } +// @public +export enum KnownIssueType { + ConfigurationPropagationFailure = "ConfigurationPropagationFailure", + MissingIdentityConfiguration = "MissingIdentityConfiguration", + MissingPerimeterConfiguration = "MissingPerimeterConfiguration", + Unknown = "Unknown" +} + // @public export enum KnownKeyKind { Primary = "primary", @@ -2051,6 +2795,17 @@ export enum KnownMinimalTlsVersion { Tls12 = "Tls12" } +// @public +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + Accepted = "Accepted", + Canceled = "Canceled", + Creating = "Creating", + Deleting = "Deleting", + Failed = "Failed", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownNodeState { Joining = "Joining", @@ -2104,16 +2859,31 @@ export enum KnownPublicNetworkAccess { SecuredByPerimeter = "SecuredByPerimeter" } +// @public +export enum KnownResourceAssociationAccessMode { + Audit = "Audit", + Enforced = "Enforced", + Learning = "Learning" +} + // @public export enum KnownRestoreMode { PointInTime = "PointInTime" } +// @public +export enum KnownScheduledEventStrategy { + Ignore = "Ignore", + StopAny = "StopAny", + StopByRack = "StopByRack" +} + // @public export enum KnownServerVersion { Five0 = "5.0", Four0 = "4.0", Four2 = "4.2", + Seven0 = "7.0", Six0 = "6.0", Three2 = "3.2", Three6 = "3.6" @@ -2144,6 +2914,12 @@ export enum KnownServiceType { SqlDedicatedGateway = "SqlDedicatedGateway" } +// @public +export enum KnownSeverity { + Error = "Error", + Warning = "Warning" +} + // @public export enum KnownSpatialType { LineString = "LineString", @@ -2154,11 +2930,22 @@ export enum KnownSpatialType { // @public export enum KnownStatus { + Canceled = "Canceled", Deleting = "Deleting", + Failed = "Failed", Initializing = "Initializing", InternallyReady = "InternallyReady", Online = "Online", - Uninitialized = "Uninitialized" + Succeeded = "Succeeded", + Uninitialized = "Uninitialized", + Updating = "Updating" +} + +// @public +export enum KnownThroughputPolicyType { + Custom = "custom", + Equal = "equal", + None = "none" } // @public @@ -2200,11 +2987,21 @@ export enum KnownUnitType { Seconds = "Seconds" } +// @public +export interface ListBackups { + readonly value?: BackupResource[]; +} + // @public export interface ListClusters { value?: ClusterResource[]; } +// @public +export interface ListCommands { + readonly value?: CommandPublicResource[]; +} + // @public export interface ListDataCenters { readonly value?: DataCenterResource[]; @@ -2308,6 +3105,13 @@ export interface ManagedServiceIdentity { }; } +// @public +export interface MaterializedViewDefinition { + definition: string; + sourceCollectionId: string; + readonly sourceCollectionRid?: string; +} + // @public export interface MaterializedViewsBuilderRegionalServiceResource extends RegionalServiceResource { } @@ -2328,6 +3132,11 @@ export interface MaterializedViewsBuilderServiceResourceProperties extends Servi serviceType: "MaterializedViewsBuilder"; } +// @public +export interface MergeParameters { + isDryRun?: boolean; +} + // @public export interface Metric { readonly endTime?: Date; @@ -2473,6 +3282,8 @@ export interface MongoDBResources { beginDeleteMongoRoleDefinitionAndWait(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams): Promise; beginDeleteMongoUserDefinition(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams): Promise, void>>; beginDeleteMongoUserDefinitionAndWait(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams): Promise; + beginListMongoDBCollectionPartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams): Promise, MongoDBResourcesListMongoDBCollectionPartitionMergeResponse>>; + beginListMongoDBCollectionPartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams): Promise; beginMigrateMongoDBCollectionToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams): Promise, MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse>>; beginMigrateMongoDBCollectionToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams): Promise; beginMigrateMongoDBCollectionToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams): Promise, MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse>>; @@ -2481,6 +3292,16 @@ export interface MongoDBResources { beginMigrateMongoDBDatabaseToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleOptionalParams): Promise; beginMigrateMongoDBDatabaseToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams): Promise, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse>>; beginMigrateMongoDBDatabaseToManualThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams): Promise; + beginMongoDBContainerRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams): Promise, MongoDBResourcesMongoDBContainerRedistributeThroughputResponse>>; + beginMongoDBContainerRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams): Promise; + beginMongoDBContainerRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams): Promise, MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse>>; + beginMongoDBContainerRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams): Promise; + beginMongoDBDatabasePartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams): Promise, MongoDBResourcesMongoDBDatabasePartitionMergeResponse>>; + beginMongoDBDatabasePartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams): Promise; + beginMongoDBDatabaseRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams): Promise, MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse>>; + beginMongoDBDatabaseRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams): Promise; + beginMongoDBDatabaseRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams): Promise, MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse>>; + beginMongoDBDatabaseRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams): Promise; beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, location: ContinuousBackupRestoreLocation, options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, MongoDBResourcesRetrieveContinuousBackupInformationResponse>>; beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, location: ContinuousBackupRestoreLocation, options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; beginUpdateMongoDBCollectionThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams): Promise, MongoDBResourcesUpdateMongoDBCollectionThroughputResponse>>; @@ -2631,6 +3452,21 @@ export interface MongoDBResourcesGetMongoUserDefinitionOptionalParams extends co // @public export type MongoDBResourcesGetMongoUserDefinitionResponse = MongoUserDefinitionGetResults; +// @public +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesListMongoDBCollectionPartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + // @public export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions { } @@ -2719,6 +3555,81 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona // @public export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBContainerRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface MongoDBResourcesMongoDBDatabasePartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBDatabasePartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + +// @public +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + // @public export interface MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2829,6 +3740,89 @@ export interface MongoUserDefinitionListResult { // @public export type NetworkAclBypass = "None" | "AzureServices"; +// @public +export interface NetworkSecurityPerimeter { + id?: string; + location?: string; + perimeterGuid?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + properties?: NetworkSecurityPerimeterConfigurationProperties; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationListResult { + nextLink?: string; + value?: NetworkSecurityPerimeterConfiguration[]; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationProperties { + networkSecurityPerimeter?: NetworkSecurityPerimeter; + profile?: NetworkSecurityProfile; + readonly provisioningIssues?: ProvisioningIssue[]; + readonly provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; + resourceAssociation?: ResourceAssociation; +} + +// @public +export type NetworkSecurityPerimeterConfigurationProvisioningState = string; + +// @public +export interface NetworkSecurityPerimeterConfigurations { + beginReconcile(resourceGroupName: string, accountName: string, networkSecurityPerimeterConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams): Promise, NetworkSecurityPerimeterConfigurationsReconcileResponse>>; + beginReconcileAndWait(resourceGroupName: string, accountName: string, networkSecurityPerimeterConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, networkSecurityPerimeterConfigurationName: string, options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: NetworkSecurityPerimeterConfigurationsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsGetResponse = NetworkSecurityPerimeterConfiguration; + +// @public +export interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsListNextResponse = NetworkSecurityPerimeterConfigurationListResult; + +// @public +export interface NetworkSecurityPerimeterConfigurationsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type NetworkSecurityPerimeterConfigurationsListResponse = NetworkSecurityPerimeterConfigurationListResult; + +// @public +export interface NetworkSecurityPerimeterConfigurationsReconcileHeaders { + // (undocumented) + location?: string; +} + +// @public +export interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type NetworkSecurityPerimeterConfigurationsReconcileResponse = NetworkSecurityPerimeterConfigurationsReconcileHeaders; + +// @public +export interface NetworkSecurityProfile { + accessRules?: AccessRule[]; + accessRulesVersion?: number; + diagnosticSettingsVersion?: number; + enabledLogCategories?: string[]; + name?: string; +} + // @public export type NodeState = string; @@ -3082,22 +4076,58 @@ export interface PercentileTargetListMetricsOptionalParams extends coreClient.Op export type PercentileTargetListMetricsResponse = PercentileMetricListResult; // @public -export interface PeriodicModeBackupPolicy extends BackupPolicy { - periodicModeProperties?: PeriodicModeProperties; - type: "Periodic"; +export interface PeriodicModeBackupPolicy extends BackupPolicy { + periodicModeProperties?: PeriodicModeProperties; + type: "Periodic"; +} + +// @public +export interface PeriodicModeProperties { + backupIntervalInMinutes?: number; + backupRetentionIntervalInHours?: number; + backupStorageRedundancy?: BackupStorageRedundancy; +} + +// @public +export interface Permission { + dataActions?: string[]; + notDataActions?: string[]; +} + +// @public +export interface PhysicalPartitionId { + id: string; +} + +// @public +export interface PhysicalPartitionStorageInfo { + readonly id?: string; + readonly storageInKB?: number; +} + +// @public +export interface PhysicalPartitionStorageInfoCollection { + readonly physicalPartitionStorageInfoCollection?: PhysicalPartitionStorageInfo[]; +} + +// @public +export interface PhysicalPartitionThroughputInfoProperties { + physicalPartitionThroughputInfo?: PhysicalPartitionThroughputInfoResource[]; +} + +// @public +export interface PhysicalPartitionThroughputInfoResource { + id: string; + throughput?: number; } // @public -export interface PeriodicModeProperties { - backupIntervalInMinutes?: number; - backupRetentionIntervalInHours?: number; - backupStorageRedundancy?: BackupStorageRedundancy; +export interface PhysicalPartitionThroughputInfoResult extends ARMResourceProperties { + resource?: PhysicalPartitionThroughputInfoResultPropertiesResource; } // @public -export interface Permission { - dataActions?: string[]; - notDataActions?: string[]; +export interface PhysicalPartitionThroughputInfoResultPropertiesResource extends PhysicalPartitionThroughputInfoProperties { } // @public @@ -3211,6 +4241,21 @@ export interface PrivilegeResource { db?: string; } +// @public +export interface ProvisioningIssue { + readonly name?: string; + readonly properties?: ProvisioningIssueProperties; +} + +// @public +export interface ProvisioningIssueProperties { + readonly description?: string; + readonly issueType?: IssueType; + readonly severity?: Severity; + readonly suggestedAccessRules?: AccessRule[]; + readonly suggestedResourceIds?: string[]; +} + // @public export interface ProxyResource extends Resource { } @@ -3218,6 +4263,18 @@ export interface ProxyResource extends Resource { // @public export type PublicNetworkAccess = string; +// @public +export interface RedistributeThroughputParameters extends ARMResourceProperties { + resource: RedistributeThroughputPropertiesResource; +} + +// @public +export interface RedistributeThroughputPropertiesResource { + sourcePhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; + targetPhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; + throughputPolicy: ThroughputPolicyType; +} + // @public export interface RegionalServiceResource { readonly location?: string; @@ -3234,9 +4291,19 @@ export interface RegionForOnlineOffline { export interface Resource { readonly id?: string; readonly name?: string; + readonly systemData?: SystemData; readonly type?: string; } +// @public +export interface ResourceAssociation { + accessMode?: ResourceAssociationAccessMode; + name?: string; +} + +// @public +export type ResourceAssociationAccessMode = string; + // @public export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned,UserAssigned" | "None"; @@ -3694,6 +4761,7 @@ export interface RestoreParameters extends RestoreParametersBase { databasesToRestore?: DatabaseRestoreResource[]; gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; restoreMode?: RestoreMode; + sourceBackupLocation?: string; tablesToRestore?: string[]; } @@ -3701,6 +4769,17 @@ export interface RestoreParameters extends RestoreParametersBase { export interface RestoreParametersBase { restoreSource?: string; restoreTimestampInUtc?: Date; + restoreWithTtlDisabled?: boolean; +} + +// @public +export interface RetrieveThroughputParameters extends ARMResourceProperties { + resource: RetrieveThroughputPropertiesResource; +} + +// @public +export interface RetrieveThroughputPropertiesResource { + physicalPartitionIds: PhysicalPartitionId[]; } // @public @@ -3712,6 +4791,9 @@ export interface Role { // @public export type RoleDefinitionType = "BuiltInRole" | "CustomRole"; +// @public +export type ScheduledEventStrategy = string; + // @public (undocumented) export interface SeedNode { ipAddress?: string; @@ -3730,12 +4812,6 @@ export interface Service { list(resourceGroupName: string, accountName: string, options?: ServiceListOptionalParams): PagedAsyncIterableIterator; } -// @public -export interface ServiceCreateHeaders { - azureAsyncOperation?: string; - location?: string; -} - // @public export interface ServiceCreateOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3818,6 +4894,9 @@ export type ServiceStatus = string; // @public export type ServiceType = string; +// @public +export type Severity = string; + // @public (undocumented) export interface SpatialSpec { path?: string; @@ -3864,6 +4943,7 @@ export interface SqlContainerResource { defaultTtl?: number; id: string; indexingPolicy?: IndexingPolicy; + materializedViewDefinition?: MaterializedViewDefinition; partitionKey?: ContainerPartitionKey; restoreParameters?: ResourceRestoreParameters; uniqueKeyPolicy?: UniqueKeyPolicy; @@ -3961,6 +5041,8 @@ export interface SqlResources { beginDeleteSqlTriggerAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, triggerName: string, options?: SqlResourcesDeleteSqlTriggerOptionalParams): Promise; beginDeleteSqlUserDefinedFunction(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams): Promise, SqlResourcesDeleteSqlUserDefinedFunctionResponse>>; beginDeleteSqlUserDefinedFunctionAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams): Promise; + beginListSqlContainerPartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, mergeParameters: MergeParameters, options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams): Promise, SqlResourcesListSqlContainerPartitionMergeResponse>>; + beginListSqlContainerPartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, mergeParameters: MergeParameters, options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams): Promise; beginMigrateSqlContainerToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams): Promise, SqlResourcesMigrateSqlContainerToAutoscaleResponse>>; beginMigrateSqlContainerToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams): Promise; beginMigrateSqlContainerToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams): Promise, SqlResourcesMigrateSqlContainerToManualThroughputResponse>>; @@ -3971,6 +5053,16 @@ export interface SqlResources { beginMigrateSqlDatabaseToManualThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams): Promise; beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, location: ContinuousBackupRestoreLocation, options?: SqlResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, SqlResourcesRetrieveContinuousBackupInformationResponse>>; beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, location: ContinuousBackupRestoreLocation, options?: SqlResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; + beginSqlContainerRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams): Promise, SqlResourcesSqlContainerRedistributeThroughputResponse>>; + beginSqlContainerRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams): Promise; + beginSqlContainerRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams): Promise, SqlResourcesSqlContainerRetrieveThroughputDistributionResponse>>; + beginSqlContainerRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams): Promise; + beginSqlDatabasePartitionMerge(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams): Promise, SqlResourcesSqlDatabasePartitionMergeResponse>>; + beginSqlDatabasePartitionMergeAndWait(resourceGroupName: string, accountName: string, databaseName: string, mergeParameters: MergeParameters, options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams): Promise; + beginSqlDatabaseRedistributeThroughput(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams): Promise, SqlResourcesSqlDatabaseRedistributeThroughputResponse>>; + beginSqlDatabaseRedistributeThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, redistributeThroughputParameters: RedistributeThroughputParameters, options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams): Promise; + beginSqlDatabaseRetrieveThroughputDistribution(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams): Promise, SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse>>; + beginSqlDatabaseRetrieveThroughputDistributionAndWait(resourceGroupName: string, accountName: string, databaseName: string, retrieveThroughputParameters: RetrieveThroughputParameters, options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams): Promise; beginUpdateSqlContainerThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams): Promise, SqlResourcesUpdateSqlContainerThroughputResponse>>; beginUpdateSqlContainerThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams): Promise; beginUpdateSqlDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlDatabaseThroughputOptionalParams): Promise, SqlResourcesUpdateSqlDatabaseThroughputResponse>>; @@ -4267,6 +5359,21 @@ export interface SqlResourcesListClientEncryptionKeysOptionalParams extends core // @public export type SqlResourcesListClientEncryptionKeysResponse = ClientEncryptionKeysListResult; +// @public +export interface SqlResourcesListSqlContainerPartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesListSqlContainerPartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesListSqlContainerPartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + // @public export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions { } @@ -4385,6 +5492,81 @@ export interface SqlResourcesRetrieveContinuousBackupInformationOptionalParams e // @public export type SqlResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; +// @public +export interface SqlResourcesSqlContainerRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlContainerRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlContainerRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlDatabasePartitionMergeHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlDatabasePartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabasePartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + +// @public +export interface SqlResourcesSqlDatabaseRedistributeThroughputHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + // @public export interface SqlResourcesUpdateSqlContainerThroughputHeaders { azureAsyncOperation?: string; @@ -4541,6 +5723,9 @@ export interface SqlUserDefinedFunctionResource { // @public export type Status = string; +// @public +export type SupportedActions = "Enable" | "Disable"; + // @public export interface SystemData { createdAt?: Date; @@ -4715,6 +5900,201 @@ export interface ThroughputPolicyResource { isEnabled?: boolean; } +// @public +export type ThroughputPolicyType = string; + +// @public +export interface ThroughputPool { + beginCreateOrUpdate(resourceGroupName: string, throughputPoolName: string, body: ThroughputPoolResource, options?: ThroughputPoolCreateOrUpdateOptionalParams): Promise, ThroughputPoolCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, throughputPoolName: string, body: ThroughputPoolResource, options?: ThroughputPoolCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolDeleteOptionalParams): Promise, ThroughputPoolDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolUpdateOptionalParams): Promise, ThroughputPoolUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolUpdateOptionalParams): Promise; + get(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolGetOptionalParams): Promise; +} + +// @public +export interface ThroughputPoolAccount { + beginCreate(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, body: ThroughputPoolAccountResource, options?: ThroughputPoolAccountCreateOptionalParams): Promise, ThroughputPoolAccountCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, body: ThroughputPoolAccountResource, options?: ThroughputPoolAccountCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, options?: ThroughputPoolAccountDeleteOptionalParams): Promise, ThroughputPoolAccountDeleteResponse>>; + beginDeleteAndWait(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, options?: ThroughputPoolAccountDeleteOptionalParams): Promise; + get(resourceGroupName: string, throughputPoolName: string, throughputPoolAccountName: string, options?: ThroughputPoolAccountGetOptionalParams): Promise; +} + +// @public +export interface ThroughputPoolAccountCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ThroughputPoolAccountCreateParameters { + accountLocation?: string; + accountResourceIdentifier?: string; + tags?: { + [propertyName: string]: string; + }; +} + +// @public +export type ThroughputPoolAccountCreateResponse = ThroughputPoolAccountResource; + +// @public +export interface ThroughputPoolAccountDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ThroughputPoolAccountDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolAccountDeleteResponse = ThroughputPoolAccountDeleteHeaders; + +// @public +export interface ThroughputPoolAccountGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolAccountGetResponse = ThroughputPoolAccountResource; + +// @public +export interface ThroughputPoolAccountResource extends ProxyResource { + readonly accountInstanceId?: string; + accountLocation?: string; + accountResourceIdentifier?: string; + provisioningState?: Status; +} + +// @public +export interface ThroughputPoolAccounts { + list(resourceGroupName: string, throughputPoolName: string, options?: ThroughputPoolAccountsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ThroughputPoolAccountsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolAccountsListNextResponse = ThroughputPoolAccountsListResult; + +// @public +export interface ThroughputPoolAccountsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolAccountsListResponse = ThroughputPoolAccountsListResult; + +// @public +export interface ThroughputPoolAccountsListResult { + readonly nextLink?: string; + readonly value?: ThroughputPoolAccountResource[]; +} + +// @public +export interface ThroughputPoolCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolCreateOrUpdateResponse = ThroughputPoolResource; + +// @public +export interface ThroughputPoolDeleteHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ThroughputPoolDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolDeleteResponse = ThroughputPoolDeleteHeaders; + +// @public +export interface ThroughputPoolGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolGetResponse = ThroughputPoolResource; + +// @public +export interface ThroughputPoolResource extends TrackedResource { + maxThroughput?: number; + provisioningState?: Status; +} + +// @public +export interface ThroughputPools { + list(options?: ThroughputPoolsListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: ThroughputPoolsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ThroughputPoolsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListByResourceGroupNextResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListByResourceGroupResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListNextResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ThroughputPoolsListResponse = ThroughputPoolsListResult; + +// @public +export interface ThroughputPoolsListResult { + readonly nextLink?: string; + readonly value?: ThroughputPoolResource[]; +} + +// @public +export interface ThroughputPoolUpdate { + maxThroughput?: number; + provisioningState?: Status; +} + +// @public +export interface ThroughputPoolUpdateHeaders { + azureAsyncOperation?: string; + location?: string; +} + +// @public +export interface ThroughputPoolUpdateOptionalParams extends coreClient.OperationOptions { + body?: ThroughputPoolUpdate; + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ThroughputPoolUpdateResponse = ThroughputPoolResource; + // @public (undocumented) export interface ThroughputSettingsGetPropertiesResource extends ThroughputSettingsResource, ExtendedResourceProperties { } @@ -4740,6 +6120,14 @@ export interface ThroughputSettingsUpdateParameters extends ARMResourcePropertie resource: ThroughputSettingsResource; } +// @public +export interface TrackedResource extends Resource { + location: string; + tags?: { + [propertyName: string]: string; + }; +} + // @public export type TriggerOperation = string; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index 5c22645c8e4a..4e88b97a6c71 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -28,14 +28,17 @@ import { CollectionPartitionImpl, PartitionKeyRangeIdImpl, PartitionKeyRangeIdRegionImpl, + GraphResourcesImpl, SqlResourcesImpl, MongoDBResourcesImpl, TableResourcesImpl, CassandraResourcesImpl, GremlinResourcesImpl, LocationsImpl, + DataTransferJobsImpl, CassandraClustersImpl, CassandraDataCentersImpl, + NetworkSecurityPerimeterConfigurationsImpl, NotebookWorkspacesImpl, PrivateEndpointConnectionsImpl, PrivateLinkResourcesImpl, @@ -52,6 +55,11 @@ import { RestorableTablesImpl, RestorableTableResourcesImpl, ServiceImpl, + ThroughputPoolsImpl, + ThroughputPoolImpl, + ThroughputPoolAccountsImpl, + ThroughputPoolAccountImpl, + ChaosFaultImpl, } from "./operations"; import { DatabaseAccounts, @@ -67,14 +75,17 @@ import { CollectionPartition, PartitionKeyRangeId, PartitionKeyRangeIdRegion, + GraphResources, SqlResources, MongoDBResources, TableResources, CassandraResources, GremlinResources, Locations, + DataTransferJobs, CassandraClusters, CassandraDataCenters, + NetworkSecurityPerimeterConfigurations, NotebookWorkspaces, PrivateEndpointConnections, PrivateLinkResources, @@ -91,6 +102,11 @@ import { RestorableTables, RestorableTableResources, Service, + ThroughputPools, + ThroughputPool, + ThroughputPoolAccounts, + ThroughputPoolAccount, + ChaosFault, } from "./operationsInterfaces"; import { CosmosDBManagementClientOptionalParams } from "./models"; @@ -126,7 +142,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-cosmosdb/16.0.1`; + const packageDetails = `azsdk-js-arm-cosmosdb/17.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -180,7 +196,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-05-15"; + this.apiVersion = options.apiVersion || "2024-09-01-preview"; this.databaseAccounts = new DatabaseAccountsImpl(this); this.operations = new OperationsImpl(this); this.database = new DatabaseImpl(this); @@ -194,14 +210,18 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { this.collectionPartition = new CollectionPartitionImpl(this); this.partitionKeyRangeId = new PartitionKeyRangeIdImpl(this); this.partitionKeyRangeIdRegion = new PartitionKeyRangeIdRegionImpl(this); + this.graphResources = new GraphResourcesImpl(this); this.sqlResources = new SqlResourcesImpl(this); this.mongoDBResources = new MongoDBResourcesImpl(this); this.tableResources = new TableResourcesImpl(this); this.cassandraResources = new CassandraResourcesImpl(this); this.gremlinResources = new GremlinResourcesImpl(this); this.locations = new LocationsImpl(this); + this.dataTransferJobs = new DataTransferJobsImpl(this); this.cassandraClusters = new CassandraClustersImpl(this); this.cassandraDataCenters = new CassandraDataCentersImpl(this); + this.networkSecurityPerimeterConfigurations = + new NetworkSecurityPerimeterConfigurationsImpl(this); this.notebookWorkspaces = new NotebookWorkspacesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); @@ -220,6 +240,11 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { this.restorableTables = new RestorableTablesImpl(this); this.restorableTableResources = new RestorableTableResourcesImpl(this); this.service = new ServiceImpl(this); + this.throughputPools = new ThroughputPoolsImpl(this); + this.throughputPool = new ThroughputPoolImpl(this); + this.throughputPoolAccounts = new ThroughputPoolAccountsImpl(this); + this.throughputPoolAccount = new ThroughputPoolAccountImpl(this); + this.chaosFault = new ChaosFaultImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -264,14 +289,17 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { collectionPartition: CollectionPartition; partitionKeyRangeId: PartitionKeyRangeId; partitionKeyRangeIdRegion: PartitionKeyRangeIdRegion; + graphResources: GraphResources; sqlResources: SqlResources; mongoDBResources: MongoDBResources; tableResources: TableResources; cassandraResources: CassandraResources; gremlinResources: GremlinResources; locations: Locations; + dataTransferJobs: DataTransferJobs; cassandraClusters: CassandraClusters; cassandraDataCenters: CassandraDataCenters; + networkSecurityPerimeterConfigurations: NetworkSecurityPerimeterConfigurations; notebookWorkspaces: NotebookWorkspaces; privateEndpointConnections: PrivateEndpointConnections; privateLinkResources: PrivateLinkResources; @@ -288,4 +316,9 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { restorableTables: RestorableTables; restorableTableResources: RestorableTableResources; service: Service; + throughputPools: ThroughputPools; + throughputPool: ThroughputPool; + throughputPoolAccounts: ThroughputPoolAccounts; + throughputPoolAccount: ThroughputPoolAccount; + chaosFault: ChaosFault; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index c8de29f49c13..efa4bc81d10f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -12,6 +12,11 @@ export type BackupPolicyUnion = | BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; +export type DataTransferDataSourceSinkUnion = + | DataTransferDataSourceSink + | BaseCosmosDataTransferDataSourceSinkUnion + | CosmosMongoVCoreDataTransferDataSourceSink + | AzureBlobDataTransferDataSourceSink; export type ServiceResourcePropertiesUnion = | ServiceResourceProperties | DataTransferServiceResourceProperties @@ -24,41 +29,11 @@ export type ServiceResourceCreateUpdatePropertiesUnion = | SqlDedicatedGatewayServiceResourceCreateUpdateProperties | GraphAPIComputeServiceResourceCreateUpdateProperties | MaterializedViewsBuilderServiceResourceCreateUpdateProperties; - -/** Identity for the resource. */ -export interface ManagedServiceIdentity { - /** - * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ - type?: ResourceIdentityType; - /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { - [ - propertyName: string - ]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; - }; -} - -export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { - /** - * The principal id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} +export type BaseCosmosDataTransferDataSourceSinkUnion = + | BaseCosmosDataTransferDataSourceSink + | CosmosCassandraDataTransferDataSourceSink + | CosmosMongoDataTransferDataSourceSink + | CosmosSqlDataTransferDataSourceSink; /** IpAddressOrRange object */ export interface IpAddressOrRange { @@ -150,7 +125,7 @@ export interface PrivateLinkServiceConnectionStateProperty { /** Common fields that are returned in the response for all Azure Resource Manager resources */ export interface Resource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -164,10 +139,31 @@ export interface Resource { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** 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; } export interface ApiProperties { - /** Describes the ServerVersion of an a MongoDB account. */ + /** Describes the version of the MongoDB account. */ serverVersion?: ServerVersion; } @@ -199,6 +195,8 @@ export interface RestoreParametersBase { restoreSource?: string; /** Time to which the account has to be restored (ISO-8601 format). */ restoreTimestampInUtc?: Date; + /** Specifies whether the restored account will have Time-To-Live disabled upon the successful restore. */ + restoreWithTtlDisabled?: boolean; } /** The object representing the policy for taking backups on an account. */ @@ -233,12 +231,43 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +/** Indicates what diagnostic log settings are to be enabled. */ +export interface DiagnosticLogSettings { + /** Describe the level of detail with which queries are to be logged. */ + enableFullTextQuery?: EnableFullTextQuery; +} + /** The object that represents all properties related to capacity enforcement on an account. */ export interface Capacity { /** The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput. */ totalThroughputLimit?: number; } +/** The transition state information related capacity mode change with update request. */ +export interface CapacityModeChangeTransitionState { + /** The transition status of capacity mode. */ + capacityModeTransitionStatus?: CapacityModeTransitionStatus; + /** Indicates the current capacity mode of the account. */ + currentCapacityMode?: CapacityMode; + /** Indicates the previous capacity mode of the account before successful transition. */ + previousCapacityMode?: CapacityMode; + /** + * Begin time in UTC of the capacity mode change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityModeTransitionBeginTimestamp?: Date; + /** + * End time in UTC of the capacity mode change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityModeTransitionEndTimestamp?: Date; + /** + * End time in UTC of the last successful capacity mode change. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly capacityModeLastSuccessfulTransitionEndTimestamp?: Date; +} + /** The metadata related to each access key for the given Cosmos DB database account. */ export interface DatabaseAccountKeysMetadata { /** @@ -272,22 +301,6 @@ export interface AccountKeyMetadata { readonly generationTime?: Date; } -/** 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; -} - /** The core properties of ARM resources. */ export interface ARMResourceProperties { /** @@ -309,6 +322,43 @@ export interface ARMResourceProperties { location?: string; /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ tags?: { [propertyName: string]: string }; + /** Identity for the resource. */ + identity?: ManagedServiceIdentity; +} + +/** Identity for the resource. */ +export interface ManagedServiceIdentity { + /** + * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ + type?: ResourceIdentityType; + /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: { + [ + propertyName: string + ]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; + }; +} + +export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { + /** + * The principal id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; } /** Parameters for patching Azure Cosmos DB database account properties. */ @@ -363,10 +413,16 @@ export interface DatabaseAccountUpdateParameters { networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Indicates the capacityMode of the Cosmos DB account. */ + capacityMode?: CapacityMode; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; /** * This property is ignored during the update operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -374,12 +430,18 @@ export interface DatabaseAccountUpdateParameters { readonly keysMetadata?: DatabaseAccountKeysMetadata; /** Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: boolean; - /** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ - minimalTlsVersion?: MinimalTlsVersion; /** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */ enableBurstCapacity?: boolean; + /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ + minimalTlsVersion?: MinimalTlsVersion; /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: string; + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; + /** Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account */ + enablePerRegionPerPartitionAutoscale?: boolean; } /** The list of new failover policies for the failover priority change. */ @@ -731,6 +793,42 @@ export interface MetricAvailability { readonly retention?: string; } +/** The List operation response, that contains the Graph resource and their properties. */ +export interface GraphResourcesListResult { + /** + * List of Graph resource and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GraphResourceGetResults[]; +} + +/** Cosmos DB Graph resource object */ +export interface GraphResource { + /** Name of the Cosmos DB Graph */ + id: string; +} + +/** Cosmos DB options resource object */ +export interface OptionsResource { + /** Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. */ + throughput?: number; + /** Specifies the Autoscale settings. */ + autoscaleSettings?: AutoscaleSettings; +} + +export interface AutoscaleSettings { + /** Represents maximum throughput, the resource can scale up to. */ + maxThroughput?: number; +} + +/** CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput" */ +export interface CreateUpdateOptions { + /** Request Units per second. For example, "throughput": 10000. */ + throughput?: number; + /** Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. */ + autoscaleSettings?: AutoscaleSettings; +} + /** The List operation response, that contains the SQL databases and their properties. */ export interface SqlDatabaseListResult { /** @@ -769,27 +867,6 @@ export interface ExtendedResourceProperties { readonly etag?: string; } -/** Cosmos DB options resource object */ -export interface OptionsResource { - /** Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. */ - throughput?: number; - /** Specifies the Autoscale settings. */ - autoscaleSettings?: AutoscaleSettings; -} - -export interface AutoscaleSettings { - /** Represents maximum throughput, the resource can scale up to. */ - maxThroughput?: number; -} - -/** CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput" */ -export interface CreateUpdateOptions { - /** Request Units per second. For example, "throughput": 10000. */ - throughput?: number; - /** Specifies the Autoscale settings. Note: Either throughput or autoscaleSettings is required, but not both. */ - autoscaleSettings?: AutoscaleSettings; -} - /** Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both. */ export interface ThroughputSettingsResource { /** Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. */ @@ -851,6 +928,64 @@ export interface CloudError { error?: ErrorResponse; } +/** The List operation response, that contains the client encryption keys and their properties. */ +export interface ClientEncryptionKeysListResult { + /** + * List of client encryption keys and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ClientEncryptionKeyGetResults[]; +} + +/** Cosmos DB client encryption key resource object. */ +export interface ClientEncryptionKeyResource { + /** Name of the ClientEncryptionKey */ + id?: string; + /** Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. */ + encryptionAlgorithm?: string; + /** Wrapped (encrypted) form of the key represented as a byte array. */ + wrappedDataEncryptionKey?: Uint8Array; + /** Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. */ + keyWrapMetadata?: KeyWrapMetadata; +} + +/** Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key. */ +export interface KeyWrapMetadata { + /** The name of associated KeyEncryptionKey (aka CustomerManagedKey). */ + name?: string; + /** ProviderName of KeyStoreProvider. */ + type?: string; + /** Reference / link to the KeyEncryptionKey. */ + value?: string; + /** Algorithm used in wrapping and unwrapping of the data encryption key. */ + algorithm?: string; +} + +/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ +export interface ARMProxyResource { + /** + * The unique resource identifier of the database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Parameters to create and update ClientEncryptionKey. */ +export interface ClientEncryptionKeyCreateUpdateParameters { + /** The standard JSON format of a ClientEncryptionKey */ + resource: ClientEncryptionKeyResource; +} + /** The List operation response, that contains the containers and their properties. */ export interface SqlContainerListResult { /** @@ -882,6 +1017,8 @@ export interface SqlContainerResource { restoreParameters?: ResourceRestoreParameters; /** Enum to indicate the mode of resource creation. */ createMode?: CreateMode; + /** The configuration for defining Materialized Views. This must be specified only for creating a Materialized View container. */ + materializedViewDefinition?: MaterializedViewDefinition; /** List of computed properties */ computedProperties?: ComputedProperty[]; } @@ -996,6 +1133,19 @@ export interface ClientEncryptionIncludedPath { encryptionAlgorithm: string; } +/** Materialized View definition for the container. */ +export interface MaterializedViewDefinition { + /** + * An unique identifier for the source collection. This is a system generated property. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceCollectionRid?: string; + /** The name of the source container on which the Materialized View will be created. */ + sourceCollectionId: string; + /** The definition should be an SQL query which would be used to fetch data from the source container to populate into the Materialized View container. */ + definition: string; +} + /** The definition of a computed property */ export interface ComputedProperty { /** The name of a computed property, for example - "cp_lowerName" */ @@ -1004,62 +1154,69 @@ export interface ComputedProperty { query?: string; } -/** The List operation response, that contains the client encryption keys and their properties. */ -export interface ClientEncryptionKeysListResult { +/** The properties of an Azure Cosmos DB merge operations */ +export interface MergeParameters { + /** Specifies whether the operation is a real merge operation or a simulation. */ + isDryRun?: boolean; +} + +/** List of physical partitions and their properties returned by a merge operation. */ +export interface PhysicalPartitionStorageInfoCollection { /** - * List of client encryption keys and their properties. + * List of physical partitions and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: ClientEncryptionKeyGetResults[]; -} - -/** Cosmos DB client encryption key resource object. */ -export interface ClientEncryptionKeyResource { - /** Name of the ClientEncryptionKey */ - id?: string; - /** Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. */ - encryptionAlgorithm?: string; - /** Wrapped (encrypted) form of the key represented as a byte array. */ - wrappedDataEncryptionKey?: Uint8Array; - /** Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. */ - keyWrapMetadata?: KeyWrapMetadata; + readonly physicalPartitionStorageInfoCollection?: PhysicalPartitionStorageInfo[]; } -/** Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key. */ -export interface KeyWrapMetadata { - /** The name of associated KeyEncryptionKey (aka CustomerManagedKey). */ - name?: string; - /** ProviderName of KeyStoreProvider. */ - type?: string; - /** Reference / link to the KeyEncryptionKey. */ - value?: string; - /** Algorithm used in wrapping and unwrapping of the data encryption key. */ - algorithm?: string; -} - -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export interface ARMProxyResource { +/** The storage of a physical partition */ +export interface PhysicalPartitionStorageInfo { /** - * The unique resource identifier of the database account. + * The unique identifier of the partition. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * The name of the database account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of Azure resource. + * The storage in KB for the physical partition. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly storageInKB?: number; } -/** Parameters to create and update ClientEncryptionKey. */ -export interface ClientEncryptionKeyCreateUpdateParameters { - /** The standard JSON format of a ClientEncryptionKey */ - resource: ClientEncryptionKeyResource; +/** Resource to retrieve throughput information for Cosmos DB resource */ +export interface RetrieveThroughputPropertiesResource { + /** Array of PhysicalPartitionId objects. */ + physicalPartitionIds: PhysicalPartitionId[]; +} + +/** PhysicalPartitionId object */ +export interface PhysicalPartitionId { + /** Id of a physical partition */ + id: string; +} + +/** The properties of an Azure Cosmos DB PhysicalPartitionThroughputInfoProperties object */ +export interface PhysicalPartitionThroughputInfoProperties { + /** Array of physical partition throughput info objects */ + physicalPartitionThroughputInfo?: PhysicalPartitionThroughputInfoResource[]; +} + +/** PhysicalPartitionThroughputInfo object */ +export interface PhysicalPartitionThroughputInfoResource { + /** Id of a physical partition */ + id: string; + /** Throughput of a physical partition */ + throughput?: number; +} + +/** Resource to redistribute throughput for Azure Cosmos DB resource */ +export interface RedistributeThroughputPropertiesResource { + /** ThroughputPolicy to apply for throughput redistribution */ + throughputPolicy: ThroughputPolicyType; + /** Array of PhysicalPartitionThroughputInfoResource objects. */ + targetPhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; + /** Array of PhysicalPartitionThroughputInfoResource objects. */ + sourcePhysicalPartitionThroughputInfo: PhysicalPartitionThroughputInfoResource[]; } /** The List operation response, that contains the storedProcedures and their properties. */ @@ -1363,6 +1520,96 @@ export interface LocationProperties { readonly status?: Status; } +/** The List operation response, that contains the Cassandra views and their properties. */ +export interface CassandraViewListResult { + /** + * List of Cassandra views and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: CassandraViewGetResults[]; +} + +/** Cosmos DB Cassandra view resource object */ +export interface CassandraViewResource { + /** Name of the Cosmos DB Cassandra view */ + id: string; + /** View Definition of the Cosmos DB Cassandra view */ + viewDefinition: string; +} + +/** The properties of a DataTransfer Job */ +export interface DataTransferJobProperties { + /** + * Job Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobName?: string; + /** Source DataStore details */ + source: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination: DataTransferDataSourceSinkUnion; + /** + * Job Status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Processed Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processedCount?: number; + /** + * Total Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCount?: number; + /** + * Last Updated Time (ISO-8601 format). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedUtcTime?: Date; + /** Worker count */ + workerCount?: number; + /** + * Error response for Faulted job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorResponse; + /** + * Total Duration of Job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly duration?: string; + /** Mode of job execution */ + mode?: DataTransferJobMode; +} + +/** Base class for all DataTransfer source/sink */ +export interface DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: + | "BaseCosmosDataTransferDataSourceSink" + | "CosmosDBCassandra" + | "CosmosDBMongo" + | "CosmosDBMongoVCore" + | "CosmosDBSql" + | "AzureBlobStorage"; +} + +/** The List operation response, that contains the Data Transfer jobs and their properties. */ +export interface DataTransferJobFeedResults { + /** + * List of Data Transfer jobs and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DataTransferJobGetResults[]; + /** + * URL to get the next set of Data Transfer job list results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** List of managed Cassandra clusters. */ export interface ListClusters { /** Container for the array of clusters. */ @@ -1389,6 +1636,8 @@ export interface ClusterResourceProperties { prometheusEndpoint?: SeedNode; /** Should automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid cluster where you are already doing your own repairs. */ repairEnabled?: boolean; + /** The form of AutoReplicate that is being used by this cluster. */ + autoReplicate?: AutoReplicate; /** List of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, the managed Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more of the public certificates in this property. */ clientCertificates?: Certificate[]; /** List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be verifiable using one of the certificates provided in this property. */ @@ -1405,18 +1654,28 @@ export interface ClusterResourceProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly seedNodes?: SeedNode[]; + /** List of the data center names for unmanaged data centers in this cluster to be included in auto-replication. */ + externalDataCenters?: string[]; /** (Deprecated) Number of hours to wait between taking a backup of the cluster. */ hoursBetweenBackups?: number; /** Whether the cluster and associated data centers has been deallocated. */ deallocated?: boolean; /** Whether Cassandra audit logging is enabled */ cassandraAuditLoggingEnabled?: boolean; + /** Type of the cluster. If set to Production, some operations might not be permitted on cluster. */ + clusterType?: ClusterType; /** Error related to resource provisioning. */ provisionError?: CassandraError; + /** Extensions to be added or updated on cluster. */ + extensions?: string[]; + /** List of backup schedules that define when you want to back up your data. */ + backupSchedules?: BackupSchedule[]; + /** How the nodes in the cluster react to scheduled events */ + scheduledEventStrategy?: ScheduledEventStrategy; /** How to connect to the azure services needed for running the cluster */ azureConnectionMethod?: AzureConnectionType; /** - * If the Connection Method is VPN, this is the Id of the private link resource that the datacenters need to connect to. + * If the Connection Method is Vpn, this is the Id of the private link resource that the datacenters need to connect to. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly privateLinkResourceId?: string; @@ -1443,6 +1702,15 @@ export interface CassandraError { additionalErrorInfo?: string; } +export interface BackupSchedule { + /** The unique identifier of backup schedule. */ + scheduleName?: string; + /** The cron expression that defines when you want to back up your data. */ + cronExpression?: string; + /** The retention period (hours) of the backups. If you want to retain data forever, set retention to 0. */ + retentionInHours?: number; +} + /** The core properties of ARM resources. */ export interface ManagedCassandraARMResourceProperties { /** @@ -1489,13 +1757,13 @@ export interface CommandPostBody { /** The command which should be run */ command: string; /** The arguments for the command to be run */ - arguments?: { [propertyName: string]: string }; + arguments?: Record; /** IP address of the cassandra host to run the command on */ host: string; /** If true, stops cassandra before executing the command and then start it again */ cassandraStopStart?: boolean; /** If true, allows the command to *write* to the cassandra directory, otherwise read-only. */ - readwrite?: boolean; + readWrite?: boolean; } /** Response of /command api */ @@ -1504,6 +1772,62 @@ export interface CommandOutput { commandOutput?: string; } +/** resource representing a command */ +export interface CommandPublicResource { + /** The command which should be run */ + command?: string; + /** The unique id of command */ + commandId?: string; + /** The arguments for the command to be run */ + arguments?: Record; + /** IP address of the cassandra host to run the command on */ + host?: string; + /** Whether command has admin privileges */ + isAdmin?: boolean; + /** If true, stops cassandra before executing the command and then start it again */ + cassandraStopStart?: boolean; + /** If true, allows the command to *write* to the cassandra directory, otherwise read-only. */ + readWrite?: boolean; + /** Result output of the command. */ + result?: string; + /** Status of the command. */ + status?: CommandStatus; + /** The name of the file where the result is written. */ + outputFile?: string; +} + +/** List of commands for cluster. */ +export interface ListCommands { + /** + * Container for array of commands. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: CommandPublicResource[]; +} + +/** List of restorable backups for a Cassandra cluster. */ +export interface ListBackups { + /** + * Container for array of backups. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: BackupResource[]; +} + +/** A restorable backup of a Cassandra cluster. */ +export interface BackupResource { + /** The unique identifier of backup. */ + backupId?: string; + /** The current state of the backup. */ + backupState?: BackupState; + /** The time at which the backup process begins. */ + backupStartTimestamp?: Date; + /** The time at which the backup process ends. */ + backupStopTimestamp?: Date; + /** The time at which the backup will expire. */ + backupExpiryTimestamp?: Date; +} + /** List of managed Cassandra data centers and their properties. */ export interface ListDataCenters { /** @@ -1645,6 +1969,8 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa memoryTotalKB?: number; /** A float representing the current system-wide CPU utilization as a percentage. */ cpuUsage?: number; + /** If node has been updated to latest model */ + isLatestModel?: boolean; } /** The set of data plane operations permitted through this Role Definition. */ @@ -1719,6 +2045,190 @@ export interface MongoUserDefinitionListResult { readonly value?: MongoUserDefinitionGetResults[]; } +/** Result of a list NSP (network security perimeter) configurations request. */ +export interface NetworkSecurityPerimeterConfigurationListResult { + /** Array of network security perimeter results. */ + value?: NetworkSecurityPerimeterConfiguration[]; + /** The link used to get the next page of results. */ + nextLink?: string; +} + +/** Network security configuration properties. */ +export interface NetworkSecurityPerimeterConfigurationProperties { + /** + * Provisioning state of a network security perimeter configuration that is being created or updated. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: NetworkSecurityPerimeterConfigurationProvisioningState; + /** + * List of provisioning issues, if any + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningIssues?: ProvisioningIssue[]; + /** Information about a network security perimeter (NSP) */ + networkSecurityPerimeter?: NetworkSecurityPerimeter; + /** Information about resource association */ + resourceAssociation?: ResourceAssociation; + /** Network security perimeter configuration profile */ + profile?: NetworkSecurityProfile; +} + +/** Describes a provisioning issue for a network security perimeter configuration */ +export interface ProvisioningIssue { + /** + * Name of the issue + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should generate separate provisioning issue elements for each separate issue detected, and include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly properties?: ProvisioningIssueProperties; +} + +/** Details of a provisioning issue for a network security perimeter (NSP) configuration. Resource providers should generate separate provisioning issue elements for each separate issue detected, and include a meaningful and distinctive description, as well as any appropriate suggestedResourceIds and suggestedAccessRules */ +export interface ProvisioningIssueProperties { + /** + * Type of issue + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly issueType?: IssueType; + /** + * Severity of the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly severity?: Severity; + /** + * Description of the issue + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly description?: string; + /** + * Fully qualified resource IDs of suggested resources that can be associated to the network security perimeter (NSP) to remediate the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly suggestedResourceIds?: string[]; + /** + * Access rules that can be added to the network security profile (NSP) to remediate the issue. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly suggestedAccessRules?: AccessRule[]; +} + +/** Access rule in a network security perimeter configuration profile */ +export interface AccessRule { + /** Name of the access rule */ + name?: string; + /** Properties of Access Rule */ + properties?: AccessRuleProperties; +} + +/** Properties of Access Rule */ +export interface AccessRuleProperties { + /** Direction of Access Rule */ + direction?: AccessRuleDirection; + /** Address prefixes in the CIDR format for inbound rules */ + addressPrefixes?: string[]; + /** Subscriptions for inbound rules */ + subscriptions?: AccessRulePropertiesSubscriptionsItem[]; + /** Network security perimeters for inbound rules */ + networkSecurityPerimeters?: NetworkSecurityPerimeter[]; + /** Fully qualified domain names (FQDN) for outbound rules */ + fullyQualifiedDomainNames?: string[]; + /** Email addresses for outbound rules */ + emailAddresses?: string[]; + /** Phone numbers for outbound rules */ + phoneNumbers?: string[]; +} + +/** Subscription identifiers */ +export interface AccessRulePropertiesSubscriptionsItem { + /** The fully qualified Azure resource ID of the subscription e.g. ('/subscriptions/00000000-0000-0000-0000-000000000000') */ + id?: string; +} + +/** Information about a network security perimeter (NSP) */ +export interface NetworkSecurityPerimeter { + /** Fully qualified Azure resource ID of the NSP resource */ + id?: string; + /** Universal unique ID (UUID) of the network security perimeter */ + perimeterGuid?: string; + /** Location of the network security perimeter */ + location?: string; +} + +/** Information about resource association */ +export interface ResourceAssociation { + /** Name of the resource association */ + name?: string; + /** Access mode of the resource association */ + accessMode?: ResourceAssociationAccessMode; +} + +/** Network security perimeter configuration profile */ +export interface NetworkSecurityProfile { + /** Name of the profile */ + name?: string; + /** Current access rules version */ + accessRulesVersion?: number; + /** List of Access Rules */ + accessRules?: AccessRule[]; + /** Current diagnostic settings version */ + diagnosticSettingsVersion?: number; + /** List of log categories that are enabled */ + enabledLogCategories?: string[]; +} + +/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ +export interface ErrorResponseAutoGenerated { + /** The error object. */ + error?: ErrorDetail; +} + +/** The error detail. */ +export interface ErrorDetail { + /** + * 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; + /** + * The error target. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly target?: string; + /** + * The error details. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly details?: ErrorDetail[]; + /** + * The error additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; +} + +/** The resource management error additional info. */ +export interface ErrorAdditionalInfo { + /** + * The additional info type. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * The additional info. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly info?: Record; +} + /** A list of notebook workspace resources */ export interface NotebookWorkspaceListResult { /** Array of notebook workspace resources */ @@ -1831,10 +2341,10 @@ export interface RestorableDatabaseAccountGetResult { accountName?: string; /** The creation time of the restorable database account (ISO-8601 format). */ creationTime?: Date; - /** The time at which the restorable database account has been deleted (ISO-8601 format). */ - deletionTime?: Date; /** The least recent time at which the database account can be restored to (ISO-8601 format). */ oldestRestorableTime?: Date; + /** The time at which the restorable database account has been deleted (ISO-8601 format). */ + deletionTime?: Date; /** * The API type of the restorable database account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2558,6 +3068,56 @@ export interface ServiceResourceCreateUpdateProperties { instanceCount?: number; } +/** The List operation response, that contains the throughput pools and their properties. */ +export interface ThroughputPoolsListResult { + /** + * List of throughput pools and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ThroughputPoolResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Represents a throughput pool resource for updates. */ +export interface ThroughputPoolUpdate { + /** A provisioning state of the ThroughputPool. */ + provisioningState?: Status; + /** Value for throughput to be shared among CosmosDB resources in the pool. */ + maxThroughput?: number; +} + +/** The List operation response, that contains the global database accounts and their properties. */ +export interface ThroughputPoolAccountsListResult { + /** + * List of global database accounts in a throughput pool and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ThroughputPoolAccountResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** Chaos Fault List Response. */ +export interface ChaosFaultListResponse { + /** + * List of Chaos Faults. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ChaosFaultResource[]; + /** + * The link used to get the next page of results. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + /** Configuration values for periodic mode backup */ export interface PeriodicModeProperties { /** An integer representing the interval in minutes between two backups */ @@ -2570,7 +3130,7 @@ export interface PeriodicModeProperties { /** Configuration values for periodic mode backup */ export interface ContinuousModeProperties { - /** Enum to indicate type of Continuous backup mode */ + /** Enum to indicate type of Continuos backup mode */ tier?: ContinuousTier; } @@ -2617,9 +3177,27 @@ export interface MaterializedViewsBuilderServiceResource { properties?: MaterializedViewsBuilderServiceResourceProperties; } +/** Parameters for creating a Azure Cosmos DB throughput pool account. */ +export interface ThroughputPoolAccountCreateParameters { + /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ + tags?: { [propertyName: string]: string }; + /** The resource identifier of global database account in the throughputPool. */ + accountResourceIdentifier?: string; + /** The location of global database account in the throughputPool. */ + accountLocation?: string; +} + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} +/** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ +export interface TrackedResource extends Resource { + /** Resource tags. */ + tags?: { [propertyName: string]: string }; + /** The geo-location where the resource lives */ + location: string; +} + /** Parameters to indicate the information about the restore. */ export interface RestoreParameters extends RestoreParametersBase { /** Describes the mode of the restore. */ @@ -2630,6 +3208,8 @@ export interface RestoreParameters extends RestoreParametersBase { gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; /** List of specific tables available for restore. */ tablesToRestore?: string[]; + /** The source backup location for restore. */ + sourceBackupLocation?: string; } /** Parameters to indicate the information about the restore. */ @@ -2655,8 +3235,6 @@ export interface ContinuousModeBackupPolicy extends BackupPolicy { export interface DatabaseAccountGetResults extends ARMResourceProperties { /** Indicates the type of database account. This can only be set at database account creation. */ kind?: DatabaseAccountKind; - /** Identity for the resource. */ - identity?: ManagedServiceIdentity; /** * The system meta data relating to this resource. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2753,10 +3331,18 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Indicates the capacityMode of the Cosmos DB account. */ + capacityMode?: CapacityMode; + /** The object that represents the migration state for the CapacityMode of the Cosmos DB account. */ + capacityModeChangeTransitionState?: CapacityModeChangeTransitionState; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; /** * The object that represents the metadata for the Account Keys of the Cosmos DB account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2764,12 +3350,18 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { readonly keysMetadata?: DatabaseAccountKeysMetadata; /** Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: boolean; - /** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ - minimalTlsVersion?: MinimalTlsVersion; /** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */ enableBurstCapacity?: boolean; + /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ + minimalTlsVersion?: MinimalTlsVersion; /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: string; + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; + /** Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account */ + enablePerRegionPerPartitionAutoscale?: boolean; } /** Parameters to create and update Cosmos DB database accounts. */ @@ -2777,8 +3369,6 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProperties { /** Indicates the type of database account. This can only be set at database account creation. */ kind?: DatabaseAccountKind; - /** Identity for the resource. */ - identity?: ManagedServiceIdentity; /** The consistency policy for the Cosmos DB account. */ consistencyPolicy?: ConsistencyPolicy; /** An array that contains the georeplication locations enabled for the Cosmos DB account. */ @@ -2827,12 +3417,18 @@ export interface DatabaseAccountCreateUpdateParameters networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** Parameters to indicate the information about the restore. */ restoreParameters?: RestoreParameters; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Indicates the capacityMode of the Cosmos DB account. */ + capacityMode?: CapacityMode; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; /** * This property is ignored during the update/create operation, as the metadata is read-only. The object represents the metadata for the Account Keys of the Cosmos DB account. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -2840,12 +3436,33 @@ export interface DatabaseAccountCreateUpdateParameters readonly keysMetadata?: DatabaseAccountKeysMetadata; /** Flag to indicate enabling/disabling of Partition Merge feature on the account */ enablePartitionMerge?: boolean; - /** Indicates the minimum allowed Tls version. The default value is Tls 1.2. Cassandra and Mongo APIs only work with Tls 1.2. */ - minimalTlsVersion?: MinimalTlsVersion; /** Flag to indicate enabling/disabling of Burst Capacity Preview feature on the account */ enableBurstCapacity?: boolean; + /** Indicates the minimum allowed Tls version. The default is Tls 1.0, except for Cassandra and Mongo API's, which only work with Tls 1.2. */ + minimalTlsVersion?: MinimalTlsVersion; /** Indicates the status of the Customer Managed Key feature on the account. In case there are errors, the property provides troubleshooting guidance. */ customerManagedKeyStatus?: string; + /** Flag to indicate enabling/disabling of Priority Based Execution Preview feature on the account */ + enablePriorityBasedExecution?: boolean; + /** Enum to indicate default Priority Level of request for Priority Based Execution. */ + defaultPriorityLevel?: DefaultPriorityLevel; + /** Flag to indicate enabling/disabling of Per-Region Per-partition autoscale Preview feature on the account */ + enablePerRegionPerPartitionAutoscale?: boolean; +} + +/** An Azure Cosmos DB Graph resource. */ +export interface GraphResourceGetResults extends ARMResourceProperties { + resource?: GraphResourceGetPropertiesResource; + options?: GraphResourceGetPropertiesOptions; +} + +/** Parameters to create and update Cosmos DB Graph resource. */ +export interface GraphResourceCreateUpdateParameters + extends ARMResourceProperties { + /** The standard JSON format of a Graph resource */ + resource: GraphResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; } /** An Azure Cosmos DB SQL database. */ @@ -2890,6 +3507,26 @@ export interface SqlContainerCreateUpdateParameters options?: CreateUpdateOptions; } +/** Cosmos DB retrieve throughput parameters object */ +export interface RetrieveThroughputParameters extends ARMResourceProperties { + /** The standard JSON format of a resource throughput */ + resource: RetrieveThroughputPropertiesResource; +} + +/** An Azure Cosmos DB PhysicalPartitionThroughputInfoResult object. */ +export interface PhysicalPartitionThroughputInfoResult + extends ARMResourceProperties { + /** properties of physical partition throughput info */ + resource?: PhysicalPartitionThroughputInfoResultPropertiesResource; +} + +/** Cosmos DB redistribute throughput parameters object */ +export interface RedistributeThroughputParameters + extends ARMResourceProperties { + /** The standard JSON format of a resource throughput */ + resource: RedistributeThroughputPropertiesResource; +} + /** An Azure Cosmos DB storedProcedure. */ export interface SqlStoredProcedureGetResults extends ARMResourceProperties { resource?: SqlStoredProcedureGetPropertiesResource; @@ -3037,6 +3674,21 @@ export interface GremlinGraphCreateUpdateParameters options?: CreateUpdateOptions; } +/** An Azure Cosmos DB Cassandra view. */ +export interface CassandraViewGetResults extends ARMResourceProperties { + resource?: CassandraViewGetPropertiesResource; + options?: CassandraViewGetPropertiesOptions; +} + +/** Parameters to create and update Cosmos DB Cassandra view. */ +export interface CassandraViewCreateUpdateParameters + extends ARMResourceProperties { + /** The standard JSON format of a Cassandra view */ + resource: CassandraViewResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +} + /** The access keys for the given database account. */ export interface DatabaseAccountListKeysResult extends DatabaseAccountListReadOnlyKeysResult { @@ -3119,12 +3771,38 @@ export interface PartitionUsage extends Usage { readonly partitionKeyRangeId?: string; } -export interface SqlDatabaseGetPropertiesResource - extends SqlDatabaseResource, - ExtendedResourceProperties { - /** A system generated property that specified the addressable path of the collections resource. */ - colls?: string; - /** A system generated property that specifies the addressable path of the users resource. */ +export interface GraphResourceGetPropertiesResource extends GraphResource {} + +export interface GraphResourceGetPropertiesOptions extends OptionsResource {} + +export interface SqlDatabaseGetPropertiesOptions extends OptionsResource {} + +export interface SqlContainerGetPropertiesOptions extends OptionsResource {} + +export interface MongoDBDatabaseGetPropertiesOptions extends OptionsResource {} + +export interface MongoDBCollectionGetPropertiesOptions + extends OptionsResource {} + +export interface TableGetPropertiesOptions extends OptionsResource {} + +export interface CassandraKeyspaceGetPropertiesOptions + extends OptionsResource {} + +export interface CassandraTableGetPropertiesOptions extends OptionsResource {} + +export interface GremlinDatabaseGetPropertiesOptions extends OptionsResource {} + +export interface GremlinGraphGetPropertiesOptions extends OptionsResource {} + +export interface CassandraViewGetPropertiesOptions extends OptionsResource {} + +export interface SqlDatabaseGetPropertiesResource + extends SqlDatabaseResource, + ExtendedResourceProperties { + /** A system generated property that specified the addressable path of the collections resource. */ + colls?: string; + /** A system generated property that specifies the addressable path of the users resource. */ users?: string; } @@ -3153,14 +3831,14 @@ export interface ThroughputSettingsGetPropertiesResource extends ThroughputSettingsResource, ExtendedResourceProperties {} -export interface SqlContainerGetPropertiesResource - extends SqlContainerResource, - ExtendedResourceProperties {} - export interface ClientEncryptionKeyGetPropertiesResource extends ClientEncryptionKeyResource, ExtendedResourceProperties {} +export interface SqlContainerGetPropertiesResource + extends SqlContainerResource, + ExtendedResourceProperties {} + export interface SqlStoredProcedureGetPropertiesResource extends SqlStoredProcedureResource, ExtendedResourceProperties {} @@ -3201,6 +3879,10 @@ export interface GremlinGraphGetPropertiesResource extends GremlinGraphResource, ExtendedResourceProperties {} +export interface CassandraViewGetPropertiesResource + extends CassandraViewResource, + ExtendedResourceProperties {} + /** Cosmos DB SQL container resource object */ export interface RestorableSqlContainerPropertiesResourceContainer extends SqlContainerResource, @@ -3212,26 +3894,6 @@ export interface RestorableSqlContainerPropertiesResourceContainer readonly self?: string; } -export interface SqlDatabaseGetPropertiesOptions extends OptionsResource {} - -export interface SqlContainerGetPropertiesOptions extends OptionsResource {} - -export interface MongoDBDatabaseGetPropertiesOptions extends OptionsResource {} - -export interface MongoDBCollectionGetPropertiesOptions - extends OptionsResource {} - -export interface TableGetPropertiesOptions extends OptionsResource {} - -export interface CassandraKeyspaceGetPropertiesOptions - extends OptionsResource {} - -export interface CassandraTableGetPropertiesOptions extends OptionsResource {} - -export interface GremlinDatabaseGetPropertiesOptions extends OptionsResource {} - -export interface GremlinGraphGetPropertiesOptions extends OptionsResource {} - /** Client Encryption Key. */ export interface ClientEncryptionKeyGetResults extends ARMProxyResource { resource?: ClientEncryptionKeyGetPropertiesResource; @@ -3243,6 +3905,59 @@ export interface LocationGetResult extends ARMProxyResource { properties?: LocationProperties; } +/** Parameters to create Data Transfer Job */ +export interface CreateJobRequest extends ARMProxyResource { + /** Data Transfer Create Job Properties */ + properties: DataTransferJobProperties; +} + +/** A Cosmos DB Data Transfer Job */ +export interface DataTransferJobGetResults extends ARMProxyResource { + /** + * Job Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobName?: string; + /** Source DataStore details */ + source?: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination?: DataTransferDataSourceSinkUnion; + /** + * Job Status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Processed Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly processedCount?: number; + /** + * Total Count. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly totalCount?: number; + /** + * Last Updated Time (ISO-8601 format). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedUtcTime?: Date; + /** Worker count */ + workerCount?: number; + /** + * Error response for Faulted job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorResponse; + /** + * Total Duration of Job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly duration?: string; + /** Mode of job execution */ + mode?: DataTransferJobMode; +} + /** A managed Cassandra data center. */ export interface DataCenterResource extends ARMProxyResource { /** Properties of a managed Cassandra data center. */ @@ -3344,6 +4059,42 @@ export interface ServiceResource extends ARMProxyResource { properties?: ServiceResourcePropertiesUnion; } +/** properties of physical partition throughput info */ +export interface PhysicalPartitionThroughputInfoResultPropertiesResource + extends PhysicalPartitionThroughputInfoProperties {} + +/** A base CosmosDB data source/sink */ +export interface BaseCosmosDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: + | "BaseCosmosDataTransferDataSourceSink" + | "CosmosDBCassandra" + | "CosmosDBMongo" + | "CosmosDBSql"; + remoteAccountName?: string; +} + +/** A CosmosDB Mongo vCore API data source/sink */ +export interface CosmosMongoVCoreDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBMongoVCore"; + databaseName: string; + collectionName: string; + hostName?: string; + connectionStringKeyVaultUri?: string; +} + +/** An Azure Blob Storage data source/sink */ +export interface AzureBlobDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "AzureBlobStorage"; + containerName: string; + endpointUrl?: string; +} + /** Representation of a managed Cassandra cluster. */ export interface ClusterResource extends ManagedCassandraARMResourceProperties { /** Properties of a managed Cassandra cluster. */ @@ -3474,6 +4225,79 @@ export interface PrivateEndpointConnection extends ProxyResource { provisioningState?: string; } +/** Network security perimeter (NSP) configuration resource */ +export interface NetworkSecurityPerimeterConfiguration extends ProxyResource { + /** Network security configuration properties. */ + properties?: NetworkSecurityPerimeterConfigurationProperties; +} + +/** An Azure Cosmos DB Throughputpool Account */ +export interface ThroughputPoolAccountResource extends ProxyResource { + /** A provisioning state of the ThroughputPool Account. */ + provisioningState?: Status; + /** The resource identifier of global database account in the throughputPool. */ + accountResourceIdentifier?: string; + /** The location of global database account in the throughputPool. */ + accountLocation?: string; + /** + * The instance id of global database account in the throughputPool. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly accountInstanceId?: string; +} + +/** A request object to enable/disable the chaos fault */ +export interface ChaosFaultResource extends ProxyResource { + /** Indicates whether what action to take for the Chaos Fault. */ + action?: SupportedActions; + /** Region of the account where the Chaos Fault is to be enabled/disabled. */ + region?: string; + /** Database name. */ + databaseName?: string; + /** Container name. */ + containerName?: string; + /** + * A provisioning state of the Chaos Fault. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +} + +/** An Azure Cosmos DB Throughputpool. */ +export interface ThroughputPoolResource extends TrackedResource { + /** A provisioning state of the ThroughputPool. */ + provisioningState?: Status; + /** Value for throughput to be shared among CosmosDB resources in the pool. */ + maxThroughput?: number; +} + +/** A CosmosDB Cassandra API data source/sink */ +export interface CosmosCassandraDataTransferDataSourceSink + extends BaseCosmosDataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBCassandra"; + keyspaceName: string; + tableName: string; +} + +/** A CosmosDB Mongo API data source/sink */ +export interface CosmosMongoDataTransferDataSourceSink + extends BaseCosmosDataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBMongo"; + databaseName: string; + collectionName: string; +} + +/** A CosmosDB No Sql API data source/sink */ +export interface CosmosSqlDataTransferDataSourceSink + extends BaseCosmosDataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBSql"; + databaseName: string; + containerName: string; +} + /** Defines headers for DatabaseAccounts_delete operation. */ export interface DatabaseAccountsDeleteHeaders { /** URI to poll for completion status. */ @@ -3514,6 +4338,22 @@ export interface DatabaseAccountsRegenerateKeyHeaders { location?: string; } +/** Defines headers for GraphResources_createUpdateGraph operation. */ +export interface GraphResourcesCreateUpdateGraphHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for GraphResources_deleteGraphResource operation. */ +export interface GraphResourcesDeleteGraphResourceHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for SqlResources_createUpdateSqlDatabase operation. */ export interface SqlResourcesCreateUpdateSqlDatabaseHeaders { /** URI to poll for completion status. */ @@ -3554,6 +4394,14 @@ export interface SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders { location?: string; } +/** Defines headers for SqlResources_createUpdateClientEncryptionKey operation. */ +export interface SqlResourcesCreateUpdateClientEncryptionKeyHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for SqlResources_createUpdateSqlContainer operation. */ export interface SqlResourcesCreateUpdateSqlContainerHeaders { /** URI to poll for completion status. */ @@ -3570,6 +4418,22 @@ export interface SqlResourcesDeleteSqlContainerHeaders { location?: string; } +/** Defines headers for SqlResources_sqlDatabasePartitionMerge operation. */ +export interface SqlResourcesSqlDatabasePartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_listSqlContainerPartitionMerge operation. */ +export interface SqlResourcesListSqlContainerPartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for SqlResources_updateSqlContainerThroughput operation. */ export interface SqlResourcesUpdateSqlContainerThroughputHeaders { /** URI to poll for completion status. */ @@ -3594,8 +4458,32 @@ export interface SqlResourcesMigrateSqlContainerToManualThroughputHeaders { location?: string; } -/** Defines headers for SqlResources_createUpdateClientEncryptionKey operation. */ -export interface SqlResourcesCreateUpdateClientEncryptionKeyHeaders { +/** Defines headers for SqlResources_sqlDatabaseRetrieveThroughputDistribution operation. */ +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_sqlDatabaseRedistributeThroughput operation. */ +export interface SqlResourcesSqlDatabaseRedistributeThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_sqlContainerRetrieveThroughputDistribution operation. */ +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for SqlResources_sqlContainerRedistributeThroughput operation. */ +export interface SqlResourcesSqlContainerRedistributeThroughputHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ @@ -3690,6 +4578,38 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders location?: string; } +/** Defines headers for MongoDBResources_mongoDBDatabaseRetrieveThroughputDistribution operation. */ +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_mongoDBDatabaseRedistributeThroughput operation. */ +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_mongoDBContainerRetrieveThroughputDistribution operation. */ +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_mongoDBContainerRedistributeThroughput operation. */ +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for MongoDBResources_createUpdateMongoDBCollection operation. */ export interface MongoDBResourcesCreateUpdateMongoDBCollectionHeaders { /** URI to poll for completion status. */ @@ -3706,6 +4626,22 @@ export interface MongoDBResourcesDeleteMongoDBCollectionHeaders { location?: string; } +/** Defines headers for MongoDBResources_mongoDBDatabasePartitionMerge operation. */ +export interface MongoDBResourcesMongoDBDatabasePartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for MongoDBResources_listMongoDBCollectionPartitionMerge operation. */ +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for MongoDBResources_updateMongoDBCollectionThroughput operation. */ export interface MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders { /** URI to poll for completion status. */ @@ -3850,6 +4786,46 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputHeader location?: string; } +/** Defines headers for CassandraResources_createUpdateCassandraView operation. */ +export interface CassandraResourcesCreateUpdateCassandraViewHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_deleteCassandraView operation. */ +export interface CassandraResourcesDeleteCassandraViewHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_updateCassandraViewThroughput operation. */ +export interface CassandraResourcesUpdateCassandraViewThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_migrateCassandraViewToAutoscale operation. */ +export interface CassandraResourcesMigrateCassandraViewToAutoscaleHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for CassandraResources_migrateCassandraViewToManualThroughput operation. */ +export interface CassandraResourcesMigrateCassandraViewToManualThroughputHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + /** Defines headers for GremlinResources_createUpdateGremlinDatabase operation. */ export interface GremlinResourcesCreateUpdateGremlinDatabaseHeaders { /** URI to poll for completion status. */ @@ -3930,14 +4906,19 @@ export interface GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders { location?: string; } -/** Defines headers for Service_create operation. */ -export interface ServiceCreateHeaders { +/** Defines headers for CassandraClusters_invokeCommandAsync operation. */ +export interface CassandraClustersInvokeCommandAsyncHeaders { /** URI to poll for completion status. */ azureAsyncOperation?: string; /** URI to poll for completion status. */ location?: string; } +/** Defines headers for NetworkSecurityPerimeterConfigurations_reconcile operation. */ +export interface NetworkSecurityPerimeterConfigurationsReconcileHeaders { + location?: string; +} + /** Defines headers for Service_delete operation. */ export interface ServiceDeleteHeaders { /** URI to poll for completion status. */ @@ -3946,18 +4927,42 @@ export interface ServiceDeleteHeaders { location?: string; } -/** Known values of {@link DatabaseAccountKind} that the service accepts. */ -export enum KnownDatabaseAccountKind { - /** GlobalDocumentDB */ - GlobalDocumentDB = "GlobalDocumentDB", - /** MongoDB */ - MongoDB = "MongoDB", - /** Parse */ - Parse = "Parse", +/** Defines headers for ThroughputPool_update operation. */ +export interface ThroughputPoolUpdateHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; } -/** - * Defines values for DatabaseAccountKind. \ +/** Defines headers for ThroughputPool_delete operation. */ +export interface ThroughputPoolDeleteHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Defines headers for ThroughputPoolAccount_delete operation. */ +export interface ThroughputPoolAccountDeleteHeaders { + /** URI to poll for completion status. */ + azureAsyncOperation?: string; + /** URI to poll for completion status. */ + location?: string; +} + +/** Known values of {@link DatabaseAccountKind} that the service accepts. */ +export enum KnownDatabaseAccountKind { + /** GlobalDocumentDB */ + GlobalDocumentDB = "GlobalDocumentDB", + /** MongoDB */ + MongoDB = "MongoDB", + /** Parse */ + Parse = "Parse", +} + +/** + * Defines values for DatabaseAccountKind. \ * {@link KnownDatabaseAccountKind} can be used interchangeably with DatabaseAccountKind, * this enum contains the known values that the service supports. * ### Known values supported by the service @@ -3967,6 +4972,30 @@ export enum KnownDatabaseAccountKind { */ export type DatabaseAccountKind = 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 ConnectorOffer} that the service accepts. */ export enum KnownConnectorOffer { /** Small */ @@ -4017,6 +5046,8 @@ export enum KnownServerVersion { Five0 = "5.0", /** Six0 */ Six0 = "6.0", + /** Seven0 */ + Seven0 = "7.0", } /** @@ -4029,7 +5060,8 @@ export enum KnownServerVersion { * **4.0** \ * **4.2** \ * **5.0** \ - * **6.0** + * **6.0** \ + * **7.0** */ export type ServerVersion = string; @@ -4126,6 +5158,54 @@ export enum KnownBackupPolicyMigrationStatus { */ export type BackupPolicyMigrationStatus = string; +/** Known values of {@link CapacityMode} that the service accepts. */ +export enum KnownCapacityMode { + /** None */ + None = "None", + /** Provisioned */ + Provisioned = "Provisioned", + /** Serverless */ + Serverless = "Serverless", +} + +/** + * Defines values for CapacityMode. \ + * {@link KnownCapacityMode} can be used interchangeably with CapacityMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Provisioned** \ + * **Serverless** + */ +export type CapacityMode = string; + +/** Known values of {@link CapacityModeTransitionStatus} that the service accepts. */ +export enum KnownCapacityModeTransitionStatus { + /** Invalid */ + Invalid = "Invalid", + /** Initialized */ + Initialized = "Initialized", + /** InProgress */ + InProgress = "InProgress", + /** Completed */ + Completed = "Completed", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for CapacityModeTransitionStatus. \ + * {@link KnownCapacityModeTransitionStatus} can be used interchangeably with CapacityModeTransitionStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **Initialized** \ + * **InProgress** \ + * **Completed** \ + * **Failed** + */ +export type CapacityModeTransitionStatus = string; + /** Known values of {@link MinimalTlsVersion} that the service accepts. */ export enum KnownMinimalTlsVersion { /** Tls */ @@ -4147,29 +5227,23 @@ export enum KnownMinimalTlsVersion { */ export type MinimalTlsVersion = 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", +/** Known values of {@link DefaultPriorityLevel} that the service accepts. */ +export enum KnownDefaultPriorityLevel { + /** High */ + High = "High", + /** Low */ + Low = "Low", } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for DefaultPriorityLevel. \ + * {@link KnownDefaultPriorityLevel} can be used interchangeably with DefaultPriorityLevel, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **High** \ + * **Low** */ -export type CreatedByType = string; +export type DefaultPriorityLevel = string; /** Known values of {@link Kind} that the service accepts. */ export enum KnownKind { @@ -4474,6 +5548,27 @@ export enum KnownConflictResolutionMode { */ export type ConflictResolutionMode = string; +/** Known values of {@link ThroughputPolicyType} that the service accepts. */ +export enum KnownThroughputPolicyType { + /** None */ + None = "none", + /** Equal */ + Equal = "equal", + /** Custom */ + Custom = "custom", +} + +/** + * Defines values for ThroughputPolicyType. \ + * {@link KnownThroughputPolicyType} can be used interchangeably with ThroughputPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **none** \ + * **equal** \ + * **custom** + */ +export type ThroughputPolicyType = string; + /** Known values of {@link TriggerType} that the service accepts. */ export enum KnownTriggerType { /** Pre */ @@ -4552,6 +5647,14 @@ export enum KnownStatus { Online = "Online", /** Deleting */ Deleting = "Deleting", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", + /** Updating */ + Updating = "Updating", } /** @@ -4563,10 +5666,59 @@ export enum KnownStatus { * **Initializing** \ * **InternallyReady** \ * **Online** \ - * **Deleting** + * **Deleting** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** \ + * **Updating** */ export type Status = string; +/** Known values of {@link DataTransferComponent} that the service accepts. */ +export enum KnownDataTransferComponent { + /** CosmosDBCassandra */ + CosmosDBCassandra = "CosmosDBCassandra", + /** CosmosDBMongo */ + CosmosDBMongo = "CosmosDBMongo", + /** CosmosDBMongoVCore */ + CosmosDBMongoVCore = "CosmosDBMongoVCore", + /** CosmosDBSql */ + CosmosDBSql = "CosmosDBSql", + /** AzureBlobStorage */ + AzureBlobStorage = "AzureBlobStorage", +} + +/** + * Defines values for DataTransferComponent. \ + * {@link KnownDataTransferComponent} can be used interchangeably with DataTransferComponent, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **CosmosDBCassandra** \ + * **CosmosDBMongo** \ + * **CosmosDBMongoVCore** \ + * **CosmosDBSql** \ + * **AzureBlobStorage** + */ +export type DataTransferComponent = string; + +/** Known values of {@link DataTransferJobMode} that the service accepts. */ +export enum KnownDataTransferJobMode { + /** Offline */ + Offline = "Offline", + /** Online */ + Online = "Online", +} + +/** + * Defines values for DataTransferJobMode. \ + * {@link KnownDataTransferJobMode} can be used interchangeably with DataTransferJobMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Offline** \ + * **Online** + */ +export type DataTransferJobMode = string; + /** Known values of {@link ManagedCassandraProvisioningState} that the service accepts. */ export enum KnownManagedCassandraProvisioningState { /** Creating */ @@ -4618,6 +5770,66 @@ export enum KnownAuthenticationMethod { */ export type AuthenticationMethod = string; +/** Known values of {@link AutoReplicate} that the service accepts. */ +export enum KnownAutoReplicate { + /** None */ + None = "None", + /** SystemKeyspaces */ + SystemKeyspaces = "SystemKeyspaces", + /** AllKeyspaces */ + AllKeyspaces = "AllKeyspaces", +} + +/** + * Defines values for AutoReplicate. \ + * {@link KnownAutoReplicate} can be used interchangeably with AutoReplicate, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **SystemKeyspaces** \ + * **AllKeyspaces** + */ +export type AutoReplicate = string; + +/** Known values of {@link ClusterType} that the service accepts. */ +export enum KnownClusterType { + /** Production */ + Production = "Production", + /** NonProduction */ + NonProduction = "NonProduction", +} + +/** + * Defines values for ClusterType. \ + * {@link KnownClusterType} can be used interchangeably with ClusterType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Production** \ + * **NonProduction** + */ +export type ClusterType = string; + +/** Known values of {@link ScheduledEventStrategy} that the service accepts. */ +export enum KnownScheduledEventStrategy { + /** Ignore */ + Ignore = "Ignore", + /** StopAny */ + StopAny = "StopAny", + /** StopByRack */ + StopByRack = "StopByRack", +} + +/** + * Defines values for ScheduledEventStrategy. \ + * {@link KnownScheduledEventStrategy} can be used interchangeably with ScheduledEventStrategy, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Ignore** \ + * **StopAny** \ + * **StopByRack** + */ +export type ScheduledEventStrategy = string; + /** Known values of {@link AzureConnectionType} that the service accepts. */ export enum KnownAzureConnectionType { /** None */ @@ -4654,6 +5866,60 @@ export enum KnownManagedCassandraResourceIdentityType { */ export type ManagedCassandraResourceIdentityType = string; +/** Known values of {@link CommandStatus} that the service accepts. */ +export enum KnownCommandStatus { + /** Done */ + Done = "Done", + /** Running */ + Running = "Running", + /** Enqueue */ + Enqueue = "Enqueue", + /** Processing */ + Processing = "Processing", + /** Finished */ + Finished = "Finished", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for CommandStatus. \ + * {@link KnownCommandStatus} can be used interchangeably with CommandStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Done** \ + * **Running** \ + * **Enqueue** \ + * **Processing** \ + * **Finished** \ + * **Failed** + */ +export type CommandStatus = string; + +/** Known values of {@link BackupState} that the service accepts. */ +export enum KnownBackupState { + /** Initiated */ + Initiated = "Initiated", + /** InProgress */ + InProgress = "InProgress", + /** Succeeded */ + Succeeded = "Succeeded", + /** Failed */ + Failed = "Failed", +} + +/** + * Defines values for BackupState. \ + * {@link KnownBackupState} can be used interchangeably with BackupState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Initiated** \ + * **InProgress** \ + * **Succeeded** \ + * **Failed** + */ +export type BackupState = string; + /** Known values of {@link ConnectionState} that the service accepts. */ export enum KnownConnectionState { /** Unknown */ @@ -4711,6 +5977,120 @@ export enum KnownNodeState { */ export type NodeState = string; +/** Known values of {@link NetworkSecurityPerimeterConfigurationProvisioningState} that the service accepts. */ +export enum KnownNetworkSecurityPerimeterConfigurationProvisioningState { + /** Succeeded */ + Succeeded = "Succeeded", + /** Creating */ + Creating = "Creating", + /** Updating */ + Updating = "Updating", + /** Deleting */ + Deleting = "Deleting", + /** Accepted */ + Accepted = "Accepted", + /** Failed */ + Failed = "Failed", + /** Canceled */ + Canceled = "Canceled", +} + +/** + * Defines values for NetworkSecurityPerimeterConfigurationProvisioningState. \ + * {@link KnownNetworkSecurityPerimeterConfigurationProvisioningState} can be used interchangeably with NetworkSecurityPerimeterConfigurationProvisioningState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Succeeded** \ + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Accepted** \ + * **Failed** \ + * **Canceled** + */ +export type NetworkSecurityPerimeterConfigurationProvisioningState = string; + +/** Known values of {@link IssueType} that the service accepts. */ +export enum KnownIssueType { + /** Unknown issue type */ + Unknown = "Unknown", + /** An error occurred while applying the network security perimeter (NSP) configuration. */ + ConfigurationPropagationFailure = "ConfigurationPropagationFailure", + /** A network connectivity issue is happening on the resource which could be addressed either by adding new resources to the network security perimeter (NSP) or by modifying access rules. */ + MissingPerimeterConfiguration = "MissingPerimeterConfiguration", + /** An managed identity hasn't been associated with the resource. The resource will still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but it won't be able to perform outbound access as a member of the NSP. */ + MissingIdentityConfiguration = "MissingIdentityConfiguration", +} + +/** + * Defines values for IssueType. \ + * {@link KnownIssueType} can be used interchangeably with IssueType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Unknown**: Unknown issue type \ + * **ConfigurationPropagationFailure**: An error occurred while applying the network security perimeter (NSP) configuration. \ + * **MissingPerimeterConfiguration**: A network connectivity issue is happening on the resource which could be addressed either by adding new resources to the network security perimeter (NSP) or by modifying access rules. \ + * **MissingIdentityConfiguration**: An managed identity hasn't been associated with the resource. The resource will still be able to validate inbound traffic from the network security perimeter (NSP) or matching inbound access rules, but it won't be able to perform outbound access as a member of the NSP. + */ +export type IssueType = string; + +/** Known values of {@link Severity} that the service accepts. */ +export enum KnownSeverity { + /** Warning */ + Warning = "Warning", + /** Error */ + Error = "Error", +} + +/** + * Defines values for Severity. \ + * {@link KnownSeverity} can be used interchangeably with Severity, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Warning** \ + * **Error** + */ +export type Severity = string; + +/** Known values of {@link AccessRuleDirection} that the service accepts. */ +export enum KnownAccessRuleDirection { + /** Applies to inbound network traffic to the secured resources. */ + Inbound = "Inbound", + /** Applies to outbound network traffic from the secured resources */ + Outbound = "Outbound", +} + +/** + * Defines values for AccessRuleDirection. \ + * {@link KnownAccessRuleDirection} can be used interchangeably with AccessRuleDirection, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Inbound**: Applies to inbound network traffic to the secured resources. \ + * **Outbound**: Applies to outbound network traffic from the secured resources + */ +export type AccessRuleDirection = string; + +/** Known values of {@link ResourceAssociationAccessMode} that the service accepts. */ +export enum KnownResourceAssociationAccessMode { + /** Enforced access mode - traffic to the resource that failed access checks is blocked */ + Enforced = "Enforced", + /** Learning access mode - traffic to the resource is enabled for analysis but not blocked */ + Learning = "Learning", + /** Audit access mode - traffic to the resource that fails access checks is logged but not blocked */ + Audit = "Audit", +} + +/** + * Defines values for ResourceAssociationAccessMode. \ + * {@link KnownResourceAssociationAccessMode} can be used interchangeably with ResourceAssociationAccessMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enforced**: Enforced access mode - traffic to the resource that failed access checks is blocked \ + * **Learning**: Learning access mode - traffic to the resource is enabled for analysis but not blocked \ + * **Audit**: Audit access mode - traffic to the resource that fails access checks is logged but not blocked + */ +export type ResourceAssociationAccessMode = string; + /** Known values of {@link NotebookWorkspaceName} that the service accepts. */ export enum KnownNotebookWorkspaceName { /** Default */ @@ -4911,12 +6291,6 @@ export enum KnownNodeStatus { * **Down** */ export type NodeStatus = string; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned,UserAssigned" - | "None"; /** Defines values for DefaultConsistencyLevel. */ export type DefaultConsistencyLevel = | "Eventual" @@ -4926,10 +6300,20 @@ export type DefaultConsistencyLevel = | "ConsistentPrefix"; /** Defines values for NetworkAclBypass. */ export type NetworkAclBypass = "None" | "AzureServices"; +/** Defines values for EnableFullTextQuery. */ +export type EnableFullTextQuery = "None" | "True" | "False"; +/** Defines values for ResourceIdentityType. */ +export type ResourceIdentityType = + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned,UserAssigned" + | "None"; /** Defines values for MongoRoleDefinitionType. */ export type MongoRoleDefinitionType = "BuiltInRole" | "CustomRole"; /** Defines values for RoleDefinitionType. */ export type RoleDefinitionType = "BuiltInRole" | "CustomRole"; +/** Defines values for SupportedActions. */ +export type SupportedActions = "Enable" | "Disable"; /** Optional parameters. */ export interface DatabaseAccountsGetOptionalParams @@ -5234,14 +6618,49 @@ export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListResult; /** Optional parameters. */ -export interface SqlResourcesListSqlDatabasesOptionalParams +export interface GraphResourcesListGraphsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSqlDatabases operation. */ -export type SqlResourcesListSqlDatabasesResponse = SqlDatabaseListResult; +/** Contains response data for the listGraphs operation. */ +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; /** Optional parameters. */ -export interface SqlResourcesGetSqlDatabaseOptionalParams +export interface GraphResourcesGetGraphOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getGraph operation. */ +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; + +/** Optional parameters. */ +export interface GraphResourcesCreateUpdateGraphOptionalParams + 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 createUpdateGraph operation. */ +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; + +/** Optional parameters. */ +export interface GraphResourcesDeleteGraphResourceOptionalParams + 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 SqlResourcesListSqlDatabasesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listSqlDatabases operation. */ +export type SqlResourcesListSqlDatabasesResponse = SqlDatabaseListResult; + +/** Optional parameters. */ +export interface SqlResourcesGetSqlDatabaseOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the getSqlDatabase operation. */ @@ -5319,6 +6738,35 @@ export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams export type SqlResourcesMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface SqlResourcesListClientEncryptionKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listClientEncryptionKeys operation. */ +export type SqlResourcesListClientEncryptionKeysResponse = + ClientEncryptionKeysListResult; + +/** Optional parameters. */ +export interface SqlResourcesGetClientEncryptionKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getClientEncryptionKey operation. */ +export type SqlResourcesGetClientEncryptionKeyResponse = + ClientEncryptionKeyGetResults; + +/** Optional parameters. */ +export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams + 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 createUpdateClientEncryptionKey operation. */ +export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = + ClientEncryptionKeyGetResults; + /** Optional parameters. */ export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions {} @@ -5359,6 +6807,32 @@ export interface SqlResourcesDeleteSqlContainerOptionalParams export type SqlResourcesDeleteSqlContainerResponse = SqlResourcesDeleteSqlContainerHeaders; +/** Optional parameters. */ +export interface SqlResourcesSqlDatabasePartitionMergeOptionalParams + 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 sqlDatabasePartitionMerge operation. */ +export type SqlResourcesSqlDatabasePartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + +/** Optional parameters. */ +export interface SqlResourcesListSqlContainerPartitionMergeOptionalParams + 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 listSqlContainerPartitionMerge operation. */ +export type SqlResourcesListSqlContainerPartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + /** Optional parameters. */ export interface SqlResourcesGetSqlContainerThroughputOptionalParams extends coreClient.OperationOptions {} @@ -5407,23 +6881,33 @@ export type SqlResourcesMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesListClientEncryptionKeysOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + 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 listClientEncryptionKeys operation. */ -export type SqlResourcesListClientEncryptionKeysResponse = - ClientEncryptionKeysListResult; +/** Contains response data for the sqlDatabaseRetrieveThroughputDistribution operation. */ +export type SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; /** Optional parameters. */ -export interface SqlResourcesGetClientEncryptionKeyOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + 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 getClientEncryptionKey operation. */ -export type SqlResourcesGetClientEncryptionKeyResponse = - ClientEncryptionKeyGetResults; +/** Contains response data for the sqlDatabaseRedistributeThroughput operation. */ +export type SqlResourcesSqlDatabaseRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -5431,9 +6915,22 @@ export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateClientEncryptionKey operation. */ -export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = - ClientEncryptionKeyGetResults; +/** Contains response data for the sqlContainerRetrieveThroughputDistribution operation. */ +export type SqlResourcesSqlContainerRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams + 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 sqlContainerRedistributeThroughput operation. */ +export type SqlResourcesSqlContainerRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; /** Optional parameters. */ export interface SqlResourcesListSqlStoredProceduresOptionalParams @@ -5736,6 +7233,58 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams + 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 mongoDBDatabaseRetrieveThroughputDistribution operation. */ +export type MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams + 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 mongoDBDatabaseRedistributeThroughput operation. */ +export type MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams + 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 mongoDBContainerRetrieveThroughputDistribution operation. */ +export type MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse = + PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams + 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 mongoDBContainerRedistributeThroughput operation. */ +export type MongoDBResourcesMongoDBContainerRedistributeThroughputResponse = + PhysicalPartitionThroughputInfoResult; + /** Optional parameters. */ export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions {} @@ -5778,6 +7327,32 @@ export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams export type MongoDBResourcesDeleteMongoDBCollectionResponse = MongoDBResourcesDeleteMongoDBCollectionHeaders; +/** Optional parameters. */ +export interface MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams + 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 mongoDBDatabasePartitionMerge operation. */ +export type MongoDBResourcesMongoDBDatabasePartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + +/** Optional parameters. */ +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + 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 listMongoDBCollectionPartitionMerge operation. */ +export type MongoDBResourcesListMongoDBCollectionPartitionMergeResponse = + PhysicalPartitionStorageInfoCollection; + /** Optional parameters. */ export interface MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams extends coreClient.OperationOptions {} @@ -6191,6 +7766,91 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface CassandraResourcesListCassandraViewsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listCassandraViews operation. */ +export type CassandraResourcesListCassandraViewsResponse = + CassandraViewListResult; + +/** Optional parameters. */ +export interface CassandraResourcesGetCassandraViewOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getCassandraView operation. */ +export type CassandraResourcesGetCassandraViewResponse = + CassandraViewGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams + 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 createUpdateCassandraView operation. */ +export type CassandraResourcesCreateUpdateCassandraViewResponse = + CassandraViewGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesDeleteCassandraViewOptionalParams + 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 CassandraResourcesGetCassandraViewThroughputOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getCassandraViewThroughput operation. */ +export type CassandraResourcesGetCassandraViewThroughputResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams + 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 updateCassandraViewThroughput operation. */ +export type CassandraResourcesUpdateCassandraViewThroughputResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + 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 migrateCassandraViewToAutoscale operation. */ +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = + ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + 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 migrateCassandraViewToManualThroughput operation. */ +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = + ThroughputSettingsGetResults; + /** Optional parameters. */ export interface GremlinResourcesListGremlinDatabasesOptionalParams extends coreClient.OperationOptions {} @@ -6394,6 +8054,64 @@ export interface LocationsGetOptionalParams /** Contains response data for the get operation. */ export type LocationsGetResponse = LocationGetResult; +/** Optional parameters. */ +export interface DataTransferJobsCreateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the create operation. */ +export type DataTransferJobsCreateResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DataTransferJobsGetResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsPauseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the pause operation. */ +export type DataTransferJobsPauseResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsResumeOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the resume operation. */ +export type DataTransferJobsResumeResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsCancelOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the cancel operation. */ +export type DataTransferJobsCancelResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsCompleteOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the complete operation. */ +export type DataTransferJobsCompleteResponse = DataTransferJobGetResults; + +/** Optional parameters. */ +export interface DataTransferJobsListByDatabaseAccountOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseAccount operation. */ +export type DataTransferJobsListByDatabaseAccountResponse = + DataTransferJobFeedResults; + +/** Optional parameters. */ +export interface DataTransferJobsListByDatabaseAccountNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByDatabaseAccountNext operation. */ +export type DataTransferJobsListByDatabaseAccountNextResponse = + DataTransferJobFeedResults; + /** Optional parameters. */ export interface CassandraClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions {} @@ -6460,9 +8178,51 @@ export interface CassandraClustersInvokeCommandOptionalParams /** Contains response data for the invokeCommand operation. */ export type CassandraClustersInvokeCommandResponse = CommandOutput; +/** Optional parameters. */ +export interface CassandraClustersInvokeCommandAsyncOptionalParams + 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 invokeCommandAsync operation. */ +export type CassandraClustersInvokeCommandAsyncResponse = CommandPublicResource; + +/** Optional parameters. */ +export interface CassandraClustersListCommandOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listCommand operation. */ +export type CassandraClustersListCommandResponse = ListCommands; + +/** Optional parameters. */ +export interface CassandraClustersGetCommandAsyncOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getCommandAsync operation. */ +export type CassandraClustersGetCommandAsyncResponse = ListCommands; + +/** Optional parameters. */ +export interface CassandraClustersListBackupsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listBackups operation. */ +export type CassandraClustersListBackupsResponse = ListBackups; + +/** Optional parameters. */ +export interface CassandraClustersGetBackupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getBackup operation. */ +export type CassandraClustersGetBackupResponse = BackupResource; + /** Optional parameters. */ export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { + /** Force to deallocate a cluster of Cluster Type Production. Force to deallocate a cluster of Cluster Type Production might cause data loss */ + xMsForceDeallocate?: 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. */ @@ -6532,6 +8292,43 @@ export interface CassandraDataCentersUpdateOptionalParams /** Contains response data for the update operation. */ export type CassandraDataCentersUpdateResponse = DataCenterResource; +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type NetworkSecurityPerimeterConfigurationsListResponse = + NetworkSecurityPerimeterConfigurationListResult; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type NetworkSecurityPerimeterConfigurationsGetResponse = + NetworkSecurityPerimeterConfiguration; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + 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 reconcile operation. */ +export type NetworkSecurityPerimeterConfigurationsReconcileResponse = + NetworkSecurityPerimeterConfigurationsReconcileHeaders; + +/** Optional parameters. */ +export interface NetworkSecurityPerimeterConfigurationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type NetworkSecurityPerimeterConfigurationsListNextResponse = + NetworkSecurityPerimeterConfigurationListResult; + /** Optional parameters. */ export interface NotebookWorkspacesListByDatabaseAccountOptionalParams extends coreClient.OperationOptions {} @@ -6837,6 +8634,162 @@ export interface ServiceDeleteOptionalParams resumeFrom?: string; } +/** Optional parameters. */ +export interface ThroughputPoolsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ThroughputPoolsListResponse = ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type ThroughputPoolsListByResourceGroupResponse = + ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ThroughputPoolsListNextResponse = ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolsListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type ThroughputPoolsListByResourceGroupNextResponse = + ThroughputPoolsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ThroughputPoolGetResponse = ThroughputPoolResource; + +/** Optional parameters. */ +export interface ThroughputPoolCreateOrUpdateOptionalParams + 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 ThroughputPoolCreateOrUpdateResponse = ThroughputPoolResource; + +/** Optional parameters. */ +export interface ThroughputPoolUpdateOptionalParams + extends coreClient.OperationOptions { + /** The parameters to provide for the current Throughput Pool. */ + body?: ThroughputPoolUpdate; + /** 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 ThroughputPoolUpdateResponse = ThroughputPoolResource; + +/** Optional parameters. */ +export interface ThroughputPoolDeleteOptionalParams + 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 delete operation. */ +export type ThroughputPoolDeleteResponse = ThroughputPoolDeleteHeaders; + +/** Optional parameters. */ +export interface ThroughputPoolAccountsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ThroughputPoolAccountsListResponse = + ThroughputPoolAccountsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolAccountsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ThroughputPoolAccountsListNextResponse = + ThroughputPoolAccountsListResult; + +/** Optional parameters. */ +export interface ThroughputPoolAccountGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ThroughputPoolAccountGetResponse = ThroughputPoolAccountResource; + +/** Optional parameters. */ +export interface ThroughputPoolAccountCreateOptionalParams + 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 create operation. */ +export type ThroughputPoolAccountCreateResponse = ThroughputPoolAccountResource; + +/** Optional parameters. */ +export interface ThroughputPoolAccountDeleteOptionalParams + 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 delete operation. */ +export type ThroughputPoolAccountDeleteResponse = + ThroughputPoolAccountDeleteHeaders; + +/** Optional parameters. */ +export interface ChaosFaultListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type ChaosFaultListOperationResponse = ChaosFaultListResponse; + +/** Optional parameters. */ +export interface ChaosFaultEnableDisableOptionalParams + 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 enableDisable operation. */ +export type ChaosFaultEnableDisableResponse = ChaosFaultResource; + +/** Optional parameters. */ +export interface ChaosFaultGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type ChaosFaultGetResponse = ChaosFaultResource; + +/** Optional parameters. */ +export interface ChaosFaultListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type ChaosFaultListNextResponse = ChaosFaultListResponse; + /** Optional parameters. */ export interface CosmosDBManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index 3e0a24169702..835f00d2dd67 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -8,79 +8,6 @@ import * as coreClient from "@azure/core-client"; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedServiceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned,UserAssigned", - "None", - ], - }, - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", - }, - }, - }, - }, - }, - }, -}; - -export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String", - }, - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String", - }, - }, - }, - }, - }; - export const IpAddressOrRange: coreClient.CompositeMapper = { type: { name: "Composite", @@ -327,6 +254,58 @@ export const Resource: coreClient.CompositeMapper = { name: "String", }, }, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + }, + }, +}; + +export const SystemData: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SystemData", + modelProperties: { + createdBy: { + serializedName: "createdBy", + type: { + name: "String", + }, + }, + createdByType: { + serializedName: "createdByType", + type: { + name: "String", + }, + }, + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime", + }, + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", + type: { + name: "String", + }, + }, + lastModifiedByType: { + serializedName: "lastModifiedByType", + type: { + name: "String", + }, + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime", + }, + }, }, }, }; @@ -430,6 +409,12 @@ export const RestoreParametersBase: coreClient.CompositeMapper = { name: "DateTime", }, }, + restoreWithTtlDisabled: { + serializedName: "restoreWithTtlDisabled", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -533,6 +518,22 @@ export const CorsPolicy: coreClient.CompositeMapper = { }, }; +export const DiagnosticLogSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticLogSettings", + modelProperties: { + enableFullTextQuery: { + serializedName: "enableFullTextQuery", + type: { + name: "Enum", + allowedValues: ["None", "True", "False"], + }, + }, + }, + }, +}; + export const Capacity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -551,6 +552,54 @@ export const Capacity: coreClient.CompositeMapper = { }, }; +export const CapacityModeChangeTransitionState: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CapacityModeChangeTransitionState", + modelProperties: { + capacityModeTransitionStatus: { + serializedName: "capacityModeTransitionStatus", + type: { + name: "String", + }, + }, + currentCapacityMode: { + serializedName: "currentCapacityMode", + type: { + name: "String", + }, + }, + previousCapacityMode: { + serializedName: "previousCapacityMode", + type: { + name: "String", + }, + }, + capacityModeTransitionBeginTimestamp: { + serializedName: "capacityModeTransitionBeginTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + capacityModeTransitionEndTimestamp: { + serializedName: "capacityModeTransitionEndTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + capacityModeLastSuccessfulTransitionEndTimestamp: { + serializedName: "capacityModeLastSuccessfulTransitionEndTimestamp", + readOnly: true, + type: { + name: "DateTime", + }, + }, + }, + }, +}; + export const DatabaseAccountKeysMetadata: coreClient.CompositeMapper = { type: { name: "Composite", @@ -604,51 +653,6 @@ export const AccountKeyMetadata: coreClient.CompositeMapper = { }, }; -export const SystemData: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SystemData", - modelProperties: { - createdBy: { - serializedName: "createdBy", - type: { - name: "String", - }, - }, - createdByType: { - serializedName: "createdByType", - type: { - name: "String", - }, - }, - createdAt: { - serializedName: "createdAt", - type: { - name: "DateTime", - }, - }, - lastModifiedBy: { - serializedName: "lastModifiedBy", - type: { - name: "String", - }, - }, - lastModifiedByType: { - serializedName: "lastModifiedByType", - type: { - name: "String", - }, - }, - lastModifiedAt: { - serializedName: "lastModifiedAt", - type: { - name: "DateTime", - }, - }, - }, - }, -}; - export const ARMResourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", @@ -688,33 +692,113 @@ export const ARMResourceProperties: coreClient.CompositeMapper = { value: { type: { name: "String" } }, }, }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", + }, + }, }, }, }; -export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { +export const ManagedServiceIdentity: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountUpdateParameters", + className: "ManagedServiceIdentity", modelProperties: { - tags: { - serializedName: "tags", + principalId: { + serializedName: "principalId", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } }, + name: "String", }, }, - location: { - serializedName: "location", + tenantId: { + serializedName: "tenantId", + readOnly: true, type: { name: "String", }, }, - identity: { - serializedName: "identity", + type: { + serializedName: "type", type: { - name: "Composite", - className: "ManagedServiceIdentity", + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned,UserAssigned", + "None", + ], + }, + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: + "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + }, + }, + }, + }, + }, + }, +}; + +export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String", + }, + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountUpdateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity", }, }, consistencyPolicy: { @@ -889,6 +973,13 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { }, }, }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings", + }, + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -902,6 +993,18 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { className: "Capacity", }, }, + capacityMode: { + serializedName: "properties.capacityMode", + type: { + name: "String", + }, + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean", + }, + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -915,24 +1018,42 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { name: "Boolean", }, }, + enableBurstCapacity: { + serializedName: "properties.enableBurstCapacity", + type: { + name: "Boolean", + }, + }, minimalTlsVersion: { serializedName: "properties.minimalTlsVersion", type: { name: "String", }, }, - enableBurstCapacity: { - serializedName: "properties.enableBurstCapacity", + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String", + }, + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", type: { name: "Boolean", }, }, - customerManagedKeyStatus: { - serializedName: "properties.customerManagedKeyStatus", + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", type: { name: "String", }, }, + enablePerRegionPerPartitionAutoscale: { + serializedName: "properties.enablePerRegionPerPartitionAutoscale", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -1637,10 +1758,10 @@ export const MetricAvailability: coreClient.CompositeMapper = { }, }; -export const SqlDatabaseListResult: coreClient.CompositeMapper = { +export const GraphResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseListResult", + className: "GraphResourcesListResult", modelProperties: { value: { serializedName: "value", @@ -1650,7 +1771,7 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SqlDatabaseGetResults", + className: "GraphResourceGetResults", }, }, }, @@ -1659,10 +1780,10 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { }, }; -export const SqlDatabaseResource: coreClient.CompositeMapper = { +export const GraphResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseResource", + className: "GraphResource", modelProperties: { id: { serializedName: "id", @@ -1671,58 +1792,51 @@ export const SqlDatabaseResource: coreClient.CompositeMapper = { name: "String", }, }, - restoreParameters: { - serializedName: "restoreParameters", + }, + }, +}; + +export const OptionsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OptionsResource", + modelProperties: { + throughput: { + serializedName: "throughput", type: { - name: "Composite", - className: "ResourceRestoreParameters", + name: "Number", }, }, - createMode: { - defaultValue: "Default", - serializedName: "createMode", + autoscaleSettings: { + serializedName: "autoscaleSettings", type: { - name: "String", + name: "Composite", + className: "AutoscaleSettings", }, }, }, }, }; -export const ExtendedResourceProperties: coreClient.CompositeMapper = { +export const AutoscaleSettings: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ExtendedResourceProperties", + className: "AutoscaleSettings", modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", - }, - }, - ts: { - serializedName: "_ts", - readOnly: true, + maxThroughput: { + serializedName: "maxThroughput", type: { name: "Number", }, }, - etag: { - serializedName: "_etag", - readOnly: true, - type: { - name: "String", - }, - }, }, }, }; -export const OptionsResource: coreClient.CompositeMapper = { +export const CreateUpdateOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OptionsResource", + className: "CreateUpdateOptions", modelProperties: { throughput: { serializedName: "throughput", @@ -1741,37 +1855,82 @@ export const OptionsResource: coreClient.CompositeMapper = { }, }; -export const AutoscaleSettings: coreClient.CompositeMapper = { +export const SqlDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AutoscaleSettings", + className: "SqlDatabaseListResult", modelProperties: { - maxThroughput: { - serializedName: "maxThroughput", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDatabaseGetResults", + }, + }, }, }, }, }, }; -export const CreateUpdateOptions: coreClient.CompositeMapper = { +export const SqlDatabaseResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CreateUpdateOptions", + className: "SqlDatabaseResource", modelProperties: { - throughput: { - serializedName: "throughput", + id: { + serializedName: "id", + required: true, type: { - name: "Number", + name: "String", }, }, - autoscaleSettings: { - serializedName: "autoscaleSettings", + restoreParameters: { + serializedName: "restoreParameters", type: { name: "Composite", - className: "AutoscaleSettings", + className: "ResourceRestoreParameters", + }, + }, + createMode: { + defaultValue: "Default", + serializedName: "createMode", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ExtendedResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedResourceProperties", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + ts: { + serializedName: "_ts", + readOnly: true, + type: { + name: "Number", + }, + }, + etag: { + serializedName: "_etag", + readOnly: true, + type: { + name: "String", }, }, }, @@ -1911,10 +2070,10 @@ export const CloudError: coreClient.CompositeMapper = { }, }; -export const SqlContainerListResult: coreClient.CompositeMapper = { +export const ClientEncryptionKeysListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerListResult", + className: "ClientEncryptionKeysListResult", modelProperties: { value: { serializedName: "value", @@ -1924,7 +2083,7 @@ export const SqlContainerListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SqlContainerGetResults", + className: "ClientEncryptionKeyGetResults", }, }, }, @@ -1933,36 +2092,172 @@ export const SqlContainerListResult: coreClient.CompositeMapper = { }, }; -export const SqlContainerResource: coreClient.CompositeMapper = { +export const ClientEncryptionKeyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerResource", + className: "ClientEncryptionKeyResource", modelProperties: { id: { serializedName: "id", - required: true, type: { name: "String", }, }, - indexingPolicy: { - serializedName: "indexingPolicy", + encryptionAlgorithm: { + serializedName: "encryptionAlgorithm", type: { - name: "Composite", - className: "IndexingPolicy", + name: "String", }, }, - partitionKey: { - serializedName: "partitionKey", + wrappedDataEncryptionKey: { + serializedName: "wrappedDataEncryptionKey", type: { - name: "Composite", - className: "ContainerPartitionKey", + name: "ByteArray", }, }, - defaultTtl: { - serializedName: "defaultTtl", + keyWrapMetadata: { + serializedName: "keyWrapMetadata", type: { - name: "Number", + name: "Composite", + className: "KeyWrapMetadata", + }, + }, + }, + }, +}; + +export const KeyWrapMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyWrapMetadata", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + type: { + name: "String", + }, + }, + value: { + serializedName: "value", + type: { + name: "String", + }, + }, + algorithm: { + serializedName: "algorithm", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ARMProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ARMProxyResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ClientEncryptionKeyCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ClientEncryptionKeyCreateUpdateParameters", + modelProperties: { + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ClientEncryptionKeyResource", + }, + }, + }, + }, + }; + +export const SqlContainerListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlContainerGetResults", + }, + }, + }, + }, + }, + }, +}; + +export const SqlContainerResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + indexingPolicy: { + serializedName: "indexingPolicy", + type: { + name: "Composite", + className: "IndexingPolicy", + }, + }, + partitionKey: { + serializedName: "partitionKey", + type: { + name: "Composite", + className: "ContainerPartitionKey", + }, + }, + defaultTtl: { + serializedName: "defaultTtl", + type: { + name: "Number", }, }, uniqueKeyPolicy: { @@ -2006,6 +2301,13 @@ export const SqlContainerResource: coreClient.CompositeMapper = { name: "String", }, }, + materializedViewDefinition: { + serializedName: "materializedViewDefinition", + type: { + name: "Composite", + className: "MaterializedViewDefinition", + }, + }, computedProperties: { serializedName: "computedProperties", type: { @@ -2398,120 +2700,99 @@ export const ClientEncryptionIncludedPath: coreClient.CompositeMapper = { }, }; -export const ComputedProperty: coreClient.CompositeMapper = { +export const MaterializedViewDefinition: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ComputedProperty", + className: "MaterializedViewDefinition", modelProperties: { - name: { - serializedName: "name", + sourceCollectionRid: { + serializedName: "sourceCollectionRid", + readOnly: true, type: { name: "String", }, }, - query: { - serializedName: "query", + sourceCollectionId: { + serializedName: "sourceCollectionId", + required: true, type: { name: "String", }, }, - }, - }, -}; - -export const ClientEncryptionKeysListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClientEncryptionKeysListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + definition: { + serializedName: "definition", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClientEncryptionKeyGetResults", - }, - }, + name: "String", }, }, }, }, }; -export const ClientEncryptionKeyResource: coreClient.CompositeMapper = { +export const ComputedProperty: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeyResource", + className: "ComputedProperty", modelProperties: { - id: { - serializedName: "id", + name: { + serializedName: "name", type: { name: "String", }, }, - encryptionAlgorithm: { - serializedName: "encryptionAlgorithm", + query: { + serializedName: "query", type: { name: "String", }, }, - wrappedDataEncryptionKey: { - serializedName: "wrappedDataEncryptionKey", - type: { - name: "ByteArray", - }, - }, - keyWrapMetadata: { - serializedName: "keyWrapMetadata", - type: { - name: "Composite", - className: "KeyWrapMetadata", - }, - }, }, }, }; -export const KeyWrapMetadata: coreClient.CompositeMapper = { +export const MergeParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyWrapMetadata", + className: "MergeParameters", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String", - }, - }, - type: { - serializedName: "type", + isDryRun: { + serializedName: "isDryRun", type: { - name: "String", - }, - }, - value: { - serializedName: "value", - type: { - name: "String", - }, - }, - algorithm: { - serializedName: "algorithm", - type: { - name: "String", + name: "Boolean", }, }, }, }, }; -export const ARMProxyResource: coreClient.CompositeMapper = { +export const PhysicalPartitionStorageInfoCollection: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionStorageInfoCollection", + modelProperties: { + physicalPartitionStorageInfoCollection: { + serializedName: "physicalPartitionStorageInfoCollection", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionStorageInfo", + }, + }, + }, + }, + }, + }, + }; + +export const PhysicalPartitionStorageInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ARMProxyResource", + className: "PhysicalPartitionStorageInfo", modelProperties: { id: { serializedName: "id", @@ -2520,35 +2801,138 @@ export const ARMProxyResource: coreClient.CompositeMapper = { name: "String", }, }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", + storageInKB: { + serializedName: "storageInKB", readOnly: true, type: { - name: "String", + name: "Number", }, }, }, }, }; -export const ClientEncryptionKeyCreateUpdateParameters: coreClient.CompositeMapper = +export const RetrieveThroughputPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeyCreateUpdateParameters", + className: "RetrieveThroughputPropertiesResource", modelProperties: { - resource: { - serializedName: "properties.resource", + physicalPartitionIds: { + serializedName: "physicalPartitionIds", + required: true, type: { - name: "Composite", - className: "ClientEncryptionKeyResource", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionId", + }, + }, + }, + }, + }, + }, + }; + +export const PhysicalPartitionId: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhysicalPartitionId", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PhysicalPartitionThroughputInfoProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoProperties", + modelProperties: { + physicalPartitionThroughputInfo: { + serializedName: "physicalPartitionThroughputInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + }, + }, + }, + }, + }, + }, + }; + +export const PhysicalPartitionThroughputInfoResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + throughput: { + serializedName: "throughput", + type: { + name: "Number", + }, + }, + }, + }, + }; + +export const RedistributeThroughputPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RedistributeThroughputPropertiesResource", + modelProperties: { + throughputPolicy: { + serializedName: "throughputPolicy", + required: true, + type: { + name: "String", + }, + }, + targetPhysicalPartitionThroughputInfo: { + serializedName: "targetPhysicalPartitionThroughputInfo", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + }, + }, + }, + }, + sourcePhysicalPartitionThroughputInfo: { + serializedName: "sourcePhysicalPartitionThroughputInfo", + required: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResource", + }, + }, }, }, }, @@ -3363,6 +3747,189 @@ export const LocationProperties: coreClient.CompositeMapper = { }, }; +export const CassandraViewListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraViewGetResults", + }, + }, + }, + }, + }, + }, +}; + +export const CassandraViewResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String", + }, + }, + viewDefinition: { + serializedName: "viewDefinition", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataTransferJobProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferJobProperties", + modelProperties: { + jobName: { + serializedName: "jobName", + readOnly: true, + type: { + name: "String", + }, + }, + source: { + serializedName: "source", + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + }, + }, + destination: { + serializedName: "destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + }, + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String", + }, + }, + processedCount: { + serializedName: "processedCount", + readOnly: true, + type: { + name: "Number", + }, + }, + totalCount: { + serializedName: "totalCount", + readOnly: true, + type: { + name: "Number", + }, + }, + lastUpdatedUtcTime: { + serializedName: "lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + workerCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "workerCount", + type: { + name: "Number", + }, + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse", + }, + }, + duration: { + serializedName: "duration", + readOnly: true, + type: { + name: "String", + }, + }, + mode: { + serializedName: "mode", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataTransferDataSourceSink: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: { + serializedName: "component", + clientName: "component", + }, + modelProperties: { + component: { + defaultValue: "CosmosDBCassandra", + serializedName: "component", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const DataTransferJobFeedResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferJobFeedResults", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataTransferJobGetResults", + }, + }, + }, + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const ListClusters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3444,6 +4011,12 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { name: "Boolean", }, }, + autoReplicate: { + serializedName: "autoReplicate", + type: { + name: "String", + }, + }, clientCertificates: { serializedName: "clientCertificates", type: { @@ -3506,6 +4079,17 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { }, }, }, + externalDataCenters: { + serializedName: "externalDataCenters", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, hoursBetweenBackups: { serializedName: "hoursBetweenBackups", type: { @@ -3524,6 +4108,12 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { name: "Boolean", }, }, + clusterType: { + serializedName: "clusterType", + type: { + name: "String", + }, + }, provisionError: { serializedName: "provisionError", type: { @@ -3531,7 +4121,36 @@ export const ClusterResourceProperties: coreClient.CompositeMapper = { className: "CassandraError", }, }, - azureConnectionMethod: { + extensions: { + serializedName: "extensions", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + backupSchedules: { + serializedName: "backupSchedules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupSchedule", + }, + }, + }, + }, + scheduledEventStrategy: { + serializedName: "scheduledEventStrategy", + type: { + name: "String", + }, + }, + azureConnectionMethod: { serializedName: "azureConnectionMethod", type: { name: "String", @@ -3611,6 +4230,33 @@ export const CassandraError: coreClient.CompositeMapper = { }, }; +export const BackupSchedule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupSchedule", + modelProperties: { + scheduleName: { + serializedName: "scheduleName", + type: { + name: "String", + }, + }, + cronExpression: { + serializedName: "cronExpression", + type: { + name: "String", + }, + }, + retentionInHours: { + serializedName: "retentionInHours", + type: { + name: "Number", + }, + }, + }, + }, +}; + export const ManagedCassandraARMResourceProperties: coreClient.CompositeMapper = { type: { @@ -3708,7 +4354,7 @@ export const CommandPostBody: coreClient.CompositeMapper = { serializedName: "arguments", type: { name: "Dictionary", - value: { type: { name: "String" } }, + value: { type: { name: "any" } }, }, }, host: { @@ -3724,8 +4370,8 @@ export const CommandPostBody: coreClient.CompositeMapper = { name: "Boolean", }, }, - readwrite: { - serializedName: "readwrite", + readWrite: { + serializedName: "readWrite", type: { name: "Boolean", }, @@ -3749,6 +4395,159 @@ export const CommandOutput: coreClient.CompositeMapper = { }, }; +export const CommandPublicResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommandPublicResource", + modelProperties: { + command: { + serializedName: "command", + type: { + name: "String", + }, + }, + commandId: { + serializedName: "commandId", + type: { + name: "String", + }, + }, + arguments: { + serializedName: "arguments", + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, + host: { + serializedName: "host", + type: { + name: "String", + }, + }, + isAdmin: { + serializedName: "isAdmin", + type: { + name: "Boolean", + }, + }, + cassandraStopStart: { + serializedName: "cassandraStopStart", + type: { + name: "Boolean", + }, + }, + readWrite: { + serializedName: "readWrite", + type: { + name: "Boolean", + }, + }, + result: { + serializedName: "result", + type: { + name: "String", + }, + }, + status: { + serializedName: "status", + type: { + name: "String", + }, + }, + outputFile: { + serializedName: "outputFile", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ListCommands: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListCommands", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CommandPublicResource", + }, + }, + }, + }, + }, + }, +}; + +export const ListBackups: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListBackups", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupResource", + }, + }, + }, + }, + }, + }, +}; + +export const BackupResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupResource", + modelProperties: { + backupId: { + serializedName: "backupId", + type: { + name: "String", + }, + }, + backupState: { + serializedName: "backupState", + type: { + name: "String", + }, + }, + backupStartTimestamp: { + serializedName: "backupStartTimestamp", + type: { + name: "DateTime", + }, + }, + backupStopTimestamp: { + serializedName: "backupStopTimestamp", + type: { + name: "DateTime", + }, + }, + backupExpiryTimestamp: { + serializedName: "backupExpiryTimestamp", + type: { + name: "DateTime", + }, + }, + }, + }, +}; + export const ListDataCenters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4228,6 +5027,12 @@ export const ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatace name: "Number", }, }, + isLatestModel: { + serializedName: "isLatestModel", + type: { + name: "Boolean", + }, + }, }, }, }; @@ -4450,100 +5255,137 @@ export const MongoUserDefinitionListResult: coreClient.CompositeMapper = { }, }; -export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "NotebookWorkspaceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "NotebookWorkspace", +export const NetworkSecurityPerimeterConfigurationListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + }, }, }, }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String", + }, + }, }, }, - }, -}; + }; -export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = +export const NetworkSecurityPerimeterConfigurationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceConnectionInfoResult", + className: "NetworkSecurityPerimeterConfigurationProperties", modelProperties: { - authToken: { - serializedName: "authToken", + provisioningState: { + serializedName: "provisioningState", readOnly: true, type: { name: "String", }, }, - notebookServerEndpoint: { - serializedName: "notebookServerEndpoint", + provisioningIssues: { + serializedName: "provisioningIssues", readOnly: true, type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProvisioningIssue", + }, + }, + }, + }, + networkSecurityPerimeter: { + serializedName: "networkSecurityPerimeter", + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + }, + }, + resourceAssociation: { + serializedName: "resourceAssociation", + type: { + name: "Composite", + className: "ResourceAssociation", + }, + }, + profile: { + serializedName: "profile", + type: { + name: "Composite", + className: "NetworkSecurityProfile", }, }, }, }, }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const ProvisioningIssue: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "ProvisioningIssue", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - }, - }, + name: "String", + }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ProvisioningIssueProperties", }, }, }, }, }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const ProvisioningIssueProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "ProvisioningIssueProperties", modelProperties: { - value: { - serializedName: "value", + issueType: { + serializedName: "issueType", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateLinkResource", - }, - }, + name: "String", }, }, - }, - }, -}; - -export const Permission: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Permission", - modelProperties: { - dataActions: { - serializedName: "dataActions", + severity: { + serializedName: "severity", + readOnly: true, + type: { + name: "String", + }, + }, + description: { + serializedName: "description", + readOnly: true, + type: { + name: "String", + }, + }, + suggestedResourceIds: { + serializedName: "suggestedResourceIds", + readOnly: true, type: { name: "Sequence", element: { @@ -4553,13 +5395,15 @@ export const Permission: coreClient.CompositeMapper = { }, }, }, - notDataActions: { - serializedName: "notDataActions", + suggestedAccessRules: { + serializedName: "suggestedAccessRules", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "AccessRule", }, }, }, @@ -4568,116 +5412,103 @@ export const Permission: coreClient.CompositeMapper = { }, }; -export const SqlRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SqlRoleDefinitionCreateUpdateParameters", - modelProperties: { - roleName: { - serializedName: "properties.roleName", - type: { - name: "String", - }, - }, +export const AccessRule: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AccessRule", + modelProperties: { + name: { + serializedName: "name", type: { - serializedName: "properties.type", - type: { - name: "Enum", - allowedValues: ["BuiltInRole", "CustomRole"], - }, - }, - assignableScopes: { - serializedName: "properties.assignableScopes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, + name: "String", }, - permissions: { - serializedName: "properties.permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Permission", - }, - }, - }, + }, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "AccessRuleProperties", }, }, }, - }; + }, +}; -export const SqlRoleDefinitionListResult: coreClient.CompositeMapper = { +export const AccessRuleProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlRoleDefinitionListResult", + className: "AccessRuleProperties", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + direction: { + serializedName: "direction", + type: { + name: "String", + }, + }, + addressPrefixes: { + serializedName: "addressPrefixes", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + subscriptions: { + serializedName: "subscriptions", type: { name: "Sequence", element: { type: { name: "Composite", - className: "SqlRoleDefinitionGetResults", + className: "AccessRulePropertiesSubscriptionsItem", }, }, }, }, - }, - }, -}; - -export const SqlRoleAssignmentCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "SqlRoleAssignmentCreateUpdateParameters", - modelProperties: { - roleDefinitionId: { - serializedName: "properties.roleDefinitionId", - type: { - name: "String", + networkSecurityPerimeters: { + serializedName: "networkSecurityPerimeters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NetworkSecurityPerimeter", + }, }, }, - scope: { - serializedName: "properties.scope", - type: { - name: "String", + }, + fullyQualifiedDomainNames: { + serializedName: "fullyQualifiedDomainNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, }, }, - principalId: { - serializedName: "properties.principalId", - type: { - name: "String", + }, + emailAddresses: { + serializedName: "emailAddresses", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, }, }, }, - }, - }; - -export const SqlRoleAssignmentListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlRoleAssignmentListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + phoneNumbers: { + serializedName: "phoneNumbers", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "SqlRoleAssignmentGetResults", + name: "String", }, }, }, @@ -4686,101 +5517,112 @@ export const SqlRoleAssignmentListResult: coreClient.CompositeMapper = { }, }; -export const RestorableDatabaseAccountsListResult: coreClient.CompositeMapper = +export const AccessRulePropertiesSubscriptionsItem: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableDatabaseAccountsListResult", + className: "AccessRulePropertiesSubscriptionsItem", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + id: { + serializedName: "id", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableDatabaseAccountGetResult", - }, - }, + name: "String", }, }, }, }, }; -export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableDatabaseAccountGetResult", + className: "NetworkSecurityPerimeter", modelProperties: { id: { serializedName: "id", - readOnly: true, type: { name: "String", }, }, - name: { - serializedName: "name", - readOnly: true, + perimeterGuid: { + serializedName: "perimeterGuid", type: { - name: "String", + name: "Uuid", }, }, - type: { - serializedName: "type", - readOnly: true, + location: { + serializedName: "location", type: { name: "String", }, }, - location: { - serializedName: "location", + }, + }, +}; + +export const ResourceAssociation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceAssociation", + modelProperties: { + name: { + serializedName: "name", type: { name: "String", }, }, - accountName: { - serializedName: "properties.accountName", + accessMode: { + serializedName: "accessMode", type: { name: "String", }, }, - creationTime: { - serializedName: "properties.creationTime", + }, + }, +}; + +export const NetworkSecurityProfile: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NetworkSecurityProfile", + modelProperties: { + name: { + serializedName: "name", type: { - name: "DateTime", + name: "String", }, }, - deletionTime: { - serializedName: "properties.deletionTime", + accessRulesVersion: { + serializedName: "accessRulesVersion", type: { - name: "DateTime", + name: "Number", }, }, - oldestRestorableTime: { - serializedName: "properties.oldestRestorableTime", + accessRules: { + serializedName: "accessRules", type: { - name: "DateTime", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AccessRule", + }, + }, }, }, - apiType: { - serializedName: "properties.apiType", - readOnly: true, + diagnosticSettingsVersion: { + serializedName: "diagnosticSettingsVersion", type: { - name: "String", + name: "Number", }, }, - restorableLocations: { - serializedName: "properties.restorableLocations", - readOnly: true, + enabledLogCategories: { + serializedName: "enabledLogCategories", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "RestorableLocationResource", + name: "String", }, }, }, @@ -4789,103 +5631,181 @@ export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { }, }; -export const RestorableLocationResource: coreClient.CompositeMapper = { +export const ErrorResponseAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableLocationResource", + className: "ErrorResponseAutoGenerated", modelProperties: { - locationName: { - serializedName: "locationName", + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, +}; + +export const ErrorDetail: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ErrorDetail", + modelProperties: { + code: { + serializedName: "code", readOnly: true, type: { name: "String", }, }, - regionalDatabaseAccountInstanceId: { - serializedName: "regionalDatabaseAccountInstanceId", + message: { + serializedName: "message", readOnly: true, type: { name: "String", }, }, - creationTime: { - serializedName: "creationTime", + target: { + serializedName: "target", readOnly: true, type: { - name: "DateTime", + name: "String", }, }, - deletionTime: { - serializedName: "deletionTime", + details: { + serializedName: "details", readOnly: true, type: { - name: "DateTime", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorDetail", + }, + }, + }, + }, + additionalInfo: { + serializedName: "additionalInfo", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo", + }, + }, }, }, }, }, }; -export const ContinuousBackupRestoreLocation: coreClient.CompositeMapper = { +export const ErrorAdditionalInfo: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContinuousBackupRestoreLocation", + className: "ErrorAdditionalInfo", modelProperties: { - location: { - serializedName: "location", + type: { + serializedName: "type", + readOnly: true, type: { name: "String", }, }, + info: { + serializedName: "info", + readOnly: true, + type: { + name: "Dictionary", + value: { type: { name: "any" } }, + }, + }, }, }, }; -export const BackupInformation: coreClient.CompositeMapper = { +export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "BackupInformation", + className: "NotebookWorkspaceListResult", modelProperties: { - continuousBackupInformation: { - serializedName: "continuousBackupInformation", + value: { + serializedName: "value", type: { - name: "Composite", - className: "ContinuousBackupInformation", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NotebookWorkspace", + }, + }, }, }, }, }, }; -export const ContinuousBackupInformation: coreClient.CompositeMapper = { +export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NotebookWorkspaceConnectionInfoResult", + modelProperties: { + authToken: { + serializedName: "authToken", + readOnly: true, + type: { + name: "String", + }, + }, + notebookServerEndpoint: { + serializedName: "notebookServerEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContinuousBackupInformation", + className: "PrivateEndpointConnectionListResult", modelProperties: { - latestRestorableTimestamp: { - serializedName: "latestRestorableTimestamp", + value: { + serializedName: "value", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection", + }, + }, }, }, }, }, }; -export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabasesListResult", + className: "PrivateLinkResourceListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorableSqlDatabaseGetResult", + className: "PrivateLinkResource", }, }, }, @@ -4894,113 +5814,137 @@ export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { }, }; -export const RestorableSqlDatabaseGetResult: coreClient.CompositeMapper = { +export const Permission: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabaseGetResult", + className: "Permission", modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, + dataActions: { + serializedName: "dataActions", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - resource: { - serializedName: "properties.resource", + notDataActions: { + serializedName: "notDataActions", type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResource", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, }, }, }; -export const RestorableSqlDatabasePropertiesResource: coreClient.CompositeMapper = +export const SqlRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabasePropertiesResource", + className: "SqlRoleDefinitionCreateUpdateParameters", modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, + roleName: { + serializedName: "properties.roleName", type: { name: "String", }, }, - operationType: { - serializedName: "operationType", - readOnly: true, + type: { + serializedName: "properties.type", type: { - name: "String", + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"], }, }, - canUndelete: { - serializedName: "canUndelete", - readOnly: true, + assignableScopes: { + serializedName: "properties.assignableScopes", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - canUndeleteReason: { - serializedName: "canUndeleteReason", - readOnly: true, + permissions: { + serializedName: "properties.permissions", type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Permission", + }, + }, }, }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, - type: { - name: "String", + }, + }, + }; + +export const SqlRoleDefinitionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlRoleDefinitionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlRoleDefinitionGetResults", + }, }, }, - ownerId: { - serializedName: "ownerId", - readOnly: true, + }, + }, + }, +}; + +export const SqlRoleAssignmentCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlRoleAssignmentCreateUpdateParameters", + modelProperties: { + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", type: { name: "String", }, }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, + scope: { + serializedName: "properties.scope", type: { name: "String", }, }, - database: { - serializedName: "database", + principalId: { + serializedName: "properties.principalId", type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResourceDatabase", + name: "String", }, }, }, }, }; -export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { +export const SqlRoleAssignmentListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlContainersListResult", + className: "SqlRoleAssignmentListResult", modelProperties: { value: { serializedName: "value", @@ -5010,7 +5954,7 @@ export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RestorableSqlContainerGetResult", + className: "SqlRoleAssignmentGetResults", }, }, }, @@ -5019,15 +5963,38 @@ export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { }, }; -export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlContainerGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { +export const RestorableDatabaseAccountsListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableDatabaseAccountsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableDatabaseAccountGetResult", + }, + }, + }, + }, + }, + }, + }; + +export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableDatabaseAccountGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { name: "String", }, }, @@ -5045,97 +6012,52 @@ export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { name: "String", }, }, - resource: { - serializedName: "properties.resource", + location: { + serializedName: "location", type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResource", + name: "String", }, }, - }, - }, -}; - -export const RestorableSqlContainerPropertiesResource: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResource", - modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", - }, - }, - operationType: { - serializedName: "operationType", - readOnly: true, - type: { - name: "String", - }, - }, - canUndelete: { - serializedName: "canUndelete", - readOnly: true, - type: { - name: "String", - }, - }, - canUndeleteReason: { - serializedName: "canUndeleteReason", - readOnly: true, - type: { - name: "String", - }, + accountName: { + serializedName: "properties.accountName", + type: { + name: "String", }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, - type: { - name: "String", - }, + }, + creationTime: { + serializedName: "properties.creationTime", + type: { + name: "DateTime", }, - ownerId: { - serializedName: "ownerId", - readOnly: true, - type: { - name: "String", - }, + }, + oldestRestorableTime: { + serializedName: "properties.oldestRestorableTime", + type: { + name: "DateTime", }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, - type: { - name: "String", - }, + }, + deletionTime: { + serializedName: "properties.deletionTime", + type: { + name: "DateTime", }, - container: { - serializedName: "container", - type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResourceContainer", - }, + }, + apiType: { + serializedName: "properties.apiType", + readOnly: true, + type: { + name: "String", }, }, - }, - }; - -export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlResourcesListResult", - modelProperties: { - value: { - serializedName: "value", + restorableLocations: { + serializedName: "properties.restorableLocations", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "RestorableSqlResourcesGetResult", + className: "RestorableLocationResource", }, }, }, @@ -5144,80 +6066,115 @@ export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { }, }; -export const RestorableSqlResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableLocationResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlResourcesGetResult", + className: "RestorableLocationResource", modelProperties: { - id: { - serializedName: "id", + locationName: { + serializedName: "locationName", readOnly: true, type: { name: "String", }, }, - name: { - serializedName: "name", + regionalDatabaseAccountInstanceId: { + serializedName: "regionalDatabaseAccountInstanceId", readOnly: true, type: { name: "String", }, }, - type: { - serializedName: "type", + creationTime: { + serializedName: "creationTime", readOnly: true, type: { - name: "String", + name: "DateTime", }, }, - databaseName: { - serializedName: "databaseName", + deletionTime: { + serializedName: "deletionTime", + readOnly: true, + type: { + name: "DateTime", + }, + }, + }, + }, +}; + +export const ContinuousBackupRestoreLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousBackupRestoreLocation", + modelProperties: { + location: { + serializedName: "location", type: { name: "String", }, }, - collectionNames: { - serializedName: "collectionNames", + }, + }, +}; + +export const BackupInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupInformation", + modelProperties: { + continuousBackupInformation: { + serializedName: "continuousBackupInformation", type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "Composite", + className: "ContinuousBackupInformation", }, }, }, }, }; -export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbDatabasesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableMongodbDatabaseGetResult", - }, +export const ContinuousBackupInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousBackupInformation", + modelProperties: { + latestRestorableTimestamp: { + serializedName: "latestRestorableTimestamp", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlDatabasesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableSqlDatabaseGetResult", }, }, }, }, }, - }; + }, +}; -export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { +export const RestorableSqlDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbDatabaseGetResult", + className: "RestorableSqlDatabaseGetResult", modelProperties: { id: { serializedName: "id", @@ -5244,18 +6201,18 @@ export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableMongodbDatabasePropertiesResource", + className: "RestorableSqlDatabasePropertiesResource", }, }, }, }, }; -export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMapper = +export const RestorableSqlDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbDatabasePropertiesResource", + className: "RestorableSqlDatabasePropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -5306,76 +6263,81 @@ export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMa name: "String", }, }, + database: { + serializedName: "database", + type: { + name: "Composite", + className: "RestorableSqlDatabasePropertiesResourceDatabase", + }, + }, }, }, }; -export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbCollectionsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableMongodbCollectionGetResult", - }, +export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlContainersListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableSqlContainerGetResult", }, }, }, }, }, - }; + }, +}; -export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbCollectionGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, +export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlContainerGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", }, + }, + type: { + serializedName: "type", + readOnly: true, type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, + name: "String", }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableMongodbCollectionPropertiesResource", - }, + }, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableSqlContainerPropertiesResource", }, }, }, - }; + }, +}; -export const RestorableMongodbCollectionPropertiesResource: coreClient.CompositeMapper = +export const RestorableSqlContainerPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbCollectionPropertiesResource", + className: "RestorableSqlContainerPropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -5426,37 +6388,43 @@ export const RestorableMongodbCollectionPropertiesResource: coreClient.Composite name: "String", }, }, + container: { + serializedName: "container", + type: { + name: "Composite", + className: "RestorableSqlContainerPropertiesResourceContainer", + }, + }, }, }, }; -export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "RestorableMongodbResourcesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableMongodbResourcesGetResult", - }, +export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableSqlResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableSqlResourcesGetResult", }, }, }, }, }, - }; + }, +}; -export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableSqlResourcesGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbResourcesGetResult", + className: "RestorableSqlResourcesGetResult", modelProperties: { id: { serializedName: "id", @@ -5500,11 +6468,11 @@ export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { }, }; -export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = +export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinDatabasesListResult", + className: "RestorableMongodbDatabasesListResult", modelProperties: { value: { serializedName: "value", @@ -5514,7 +6482,7 @@ export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "RestorableGremlinDatabaseGetResult", + className: "RestorableMongodbDatabaseGetResult", }, }, }, @@ -5523,10 +6491,10 @@ export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = }, }; -export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { +export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinDatabaseGetResult", + className: "RestorableMongodbDatabaseGetResult", modelProperties: { id: { serializedName: "id", @@ -5553,18 +6521,18 @@ export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableGremlinDatabasePropertiesResource", + className: "RestorableMongodbDatabasePropertiesResource", }, }, }, }, }; -export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMapper = +export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinDatabasePropertiesResource", + className: "RestorableMongodbDatabasePropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -5619,98 +6587,100 @@ export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMa }, }; -export const RestorableGremlinGraphsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableGremlinGraphsListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableGremlinGraphGetResult", +export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableMongodbCollectionsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableMongodbCollectionGetResult", + }, }, }, }, }, }, - }, -}; - -export const RestorableGremlinGraphGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableGremlinGraphGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String", - }, - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String", - }, - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String", - }, - }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableGremlinGraphPropertiesResource", - }, - }, - }, - }, -}; + }; -export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMapper = +export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinGraphPropertiesResource", + className: "RestorableMongodbCollectionGetResult", modelProperties: { - rid: { - serializedName: "_rid", + id: { + serializedName: "id", readOnly: true, type: { name: "String", }, }, - operationType: { - serializedName: "operationType", + name: { + serializedName: "name", readOnly: true, type: { name: "String", }, }, - canUndelete: { - serializedName: "canUndelete", + type: { + serializedName: "type", readOnly: true, type: { name: "String", }, }, - canUndeleteReason: { - serializedName: "canUndeleteReason", - readOnly: true, + resource: { + serializedName: "properties.resource", type: { - name: "String", - }, + name: "Composite", + className: "RestorableMongodbCollectionPropertiesResource", + }, + }, + }, + }, + }; + +export const RestorableMongodbCollectionPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableMongodbCollectionPropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, + }, + canUndelete: { + serializedName: "canUndelete", + readOnly: true, + type: { + name: "String", + }, + }, + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, + type: { + name: "String", + }, }, eventTimestamp: { serializedName: "eventTimestamp", @@ -5737,11 +6707,11 @@ export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMappe }, }; -export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = +export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinResourcesListResult", + className: "RestorableMongodbResourcesListResult", modelProperties: { value: { serializedName: "value", @@ -5751,7 +6721,7 @@ export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "RestorableGremlinResourcesGetResult", + className: "RestorableMongodbResourcesGetResult", }, }, }, @@ -5760,10 +6730,10 @@ export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = }, }; -export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableGremlinResourcesGetResult", + className: "RestorableMongodbResourcesGetResult", modelProperties: { id: { serializedName: "id", @@ -5792,8 +6762,8 @@ export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { name: "String", }, }, - graphNames: { - serializedName: "graphNames", + collectionNames: { + serializedName: "collectionNames", type: { name: "Sequence", element: { @@ -5807,32 +6777,33 @@ export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { }, }; -export const RestorableTablesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableTablesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableTableGetResult", +export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinDatabasesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinDatabaseGetResult", + }, }, }, }, }, }, - }, -}; + }; -export const RestorableTableGetResult: coreClient.CompositeMapper = { +export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableTableGetResult", + className: "RestorableGremlinDatabaseGetResult", modelProperties: { id: { serializedName: "id", @@ -5859,75 +6830,76 @@ export const RestorableTableGetResult: coreClient.CompositeMapper = { serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableTablePropertiesResource", + className: "RestorableGremlinDatabasePropertiesResource", }, }, }, }, }; -export const RestorableTablePropertiesResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableTablePropertiesResource", - modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String", +export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinDatabasePropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, }, - }, - operationType: { - serializedName: "operationType", - readOnly: true, - type: { - name: "String", + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, }, - }, - canUndelete: { - serializedName: "canUndelete", - readOnly: true, - type: { - name: "String", + canUndelete: { + serializedName: "canUndelete", + readOnly: true, + type: { + name: "String", + }, }, - }, - canUndeleteReason: { - serializedName: "canUndeleteReason", - readOnly: true, - type: { - name: "String", + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, + type: { + name: "String", + }, }, - }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, - type: { - name: "String", + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String", + }, }, - }, - ownerId: { - serializedName: "ownerId", - readOnly: true, - type: { - name: "String", + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String", + }, }, - }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, - type: { - name: "String", + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const RestorableTableResourcesListResult: coreClient.CompositeMapper = { +export const RestorableGremlinGraphsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableTableResourcesListResult", + className: "RestorableGremlinGraphsListResult", modelProperties: { value: { serializedName: "value", @@ -5937,7 +6909,7 @@ export const RestorableTableResourcesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "RestorableTableResourcesGetResult", + className: "RestorableGremlinGraphGetResult", }, }, }, @@ -5946,10 +6918,10 @@ export const RestorableTableResourcesListResult: coreClient.CompositeMapper = { }, }; -export const RestorableTableResourcesGetResult: coreClient.CompositeMapper = { +export const RestorableGremlinGraphGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableTableResourcesGetResult", + className: "RestorableGremlinGraphGetResult", modelProperties: { id: { serializedName: "id", @@ -5972,677 +6944,795 @@ export const RestorableTableResourcesGetResult: coreClient.CompositeMapper = { name: "String", }, }, - }, - }, -}; - -export const ServiceResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceResourceListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, + resource: { + serializedName: "properties.resource", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ServiceResource", - }, - }, + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource", }, }, }, }, }; -export const ServiceResourceProperties: coreClient.CompositeMapper = { - serializedName: "ServiceResourceProperties", - type: { - name: "Composite", - className: "ServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: { - serializedName: "serviceType", - clientName: "serviceType", - }, - modelProperties: { - creationTime: { - serializedName: "creationTime", - readOnly: true, - type: { - name: "DateTime", +export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String", + }, }, - }, - instanceSize: { - serializedName: "instanceSize", - type: { - name: "String", + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String", + }, }, - }, - instanceCount: { - constraints: { - InclusiveMinimum: 0, + canUndelete: { + serializedName: "canUndelete", + readOnly: true, + type: { + name: "String", + }, }, - serializedName: "instanceCount", - type: { - name: "Number", + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, + type: { + name: "String", + }, }, - }, - serviceType: { - serializedName: "serviceType", - required: true, - type: { - name: "String", + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String", + }, }, - }, - status: { - serializedName: "status", - readOnly: true, - type: { - name: "String", + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String", + }, }, - }, - }, - }, -}; - -export const ServiceResourceCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ServiceResourceCreateUpdateParameters", - modelProperties: { - properties: { - serializedName: "properties", + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, type: { - name: "Composite", - className: "ServiceResourceCreateUpdateProperties", + name: "String", }, }, }, }, }; -export const ServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: { - serializedName: "serviceType", - clientName: "serviceType", - }, + className: "RestorableGremlinResourcesListResult", modelProperties: { - instanceSize: { - serializedName: "instanceSize", - type: { - name: "String", - }, - }, - instanceCount: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "instanceCount", - type: { - name: "Number", - }, - }, - serviceType: { - serializedName: "serviceType", - required: true, + value: { + serializedName: "value", + readOnly: true, type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinResourcesGetResult", + }, + }, }, }, }, }, }; -export const PeriodicModeProperties: coreClient.CompositeMapper = { +export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PeriodicModeProperties", + className: "RestorableGremlinResourcesGetResult", modelProperties: { - backupIntervalInMinutes: { - constraints: { - InclusiveMinimum: 0, - }, - serializedName: "backupIntervalInMinutes", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Number", + name: "String", }, }, - backupRetentionIntervalInHours: { - constraints: { - InclusiveMinimum: 0, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", }, - serializedName: "backupRetentionIntervalInHours", + }, + type: { + serializedName: "type", + readOnly: true, type: { - name: "Number", + name: "String", }, }, - backupStorageRedundancy: { - serializedName: "backupStorageRedundancy", + databaseName: { + serializedName: "databaseName", type: { name: "String", }, }, + graphNames: { + serializedName: "graphNames", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, }, }, }; -export const ContinuousModeProperties: coreClient.CompositeMapper = { +export const RestorableTablesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ContinuousModeProperties", + className: "RestorableTablesListResult", modelProperties: { - tier: { - serializedName: "tier", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableTableGetResult", + }, + }, }, }, }, }, }; -export const DataTransferServiceResource: coreClient.CompositeMapper = { +export const RestorableTableGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataTransferServiceResource", + className: "RestorableTableGetResult", modelProperties: { - properties: { - serializedName: "properties", + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String", + }, + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String", + }, + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String", + }, + }, + resource: { + serializedName: "properties.resource", type: { name: "Composite", - className: "DataTransferServiceResourceProperties", + className: "RestorableTablePropertiesResource", }, }, }, }, }; -export const RegionalServiceResource: coreClient.CompositeMapper = { +export const RestorableTablePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RegionalServiceResource", + className: "RestorableTablePropertiesResource", modelProperties: { - name: { - serializedName: "name", + rid: { + serializedName: "_rid", readOnly: true, type: { name: "String", }, }, - location: { - serializedName: "location", + operationType: { + serializedName: "operationType", readOnly: true, type: { name: "String", }, }, - status: { - serializedName: "status", + canUndelete: { + serializedName: "canUndelete", readOnly: true, type: { name: "String", }, }, - }, - }, -}; - -export const SqlDedicatedGatewayServiceResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlDedicatedGatewayServiceResource", - modelProperties: { - properties: { - serializedName: "properties", + canUndeleteReason: { + serializedName: "canUndeleteReason", + readOnly: true, type: { - name: "Composite", - className: "SqlDedicatedGatewayServiceResourceProperties", + name: "String", + }, + }, + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String", + }, + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String", + }, + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, + type: { + name: "String", }, }, }, }, }; -export const GraphAPIComputeServiceResource: coreClient.CompositeMapper = { +export const RestorableTableResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GraphAPIComputeServiceResource", + className: "RestorableTableResourcesListResult", modelProperties: { - properties: { - serializedName: "properties", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "GraphAPIComputeServiceResourceProperties", - }, - }, - }, - }, -}; - -export const MaterializedViewsBuilderServiceResource: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "MaterializedViewsBuilderServiceResource", - modelProperties: { - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "MaterializedViewsBuilderServiceResourceProperties", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableTableResourcesGetResult", + }, }, }, }, }, - }; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties, - }, }, }; -export const RestoreParameters: coreClient.CompositeMapper = { +export const RestorableTableResourcesGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestoreParameters", + className: "RestorableTableResourcesGetResult", modelProperties: { - ...RestoreParametersBase.type.modelProperties, - restoreMode: { - serializedName: "restoreMode", + id: { + serializedName: "id", + readOnly: true, type: { name: "String", }, }, - databasesToRestore: { - serializedName: "databasesToRestore", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseRestoreResource", - }, - }, - }, - }, - gremlinDatabasesToRestore: { - serializedName: "gremlinDatabasesToRestore", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GremlinDatabaseRestoreResource", - }, - }, + name: "String", }, }, - tablesToRestore: { - serializedName: "tablesToRestore", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "String", }, }, }, }, }; -export const ResourceRestoreParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ResourceRestoreParameters", - modelProperties: { - ...RestoreParametersBase.type.modelProperties, - }, - }, -}; - -export const PeriodicModeBackupPolicy: coreClient.CompositeMapper = { - serializedName: "Periodic", +export const ServiceResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PeriodicModeBackupPolicy", - uberParent: "BackupPolicy", - polymorphicDiscriminator: BackupPolicy.type.polymorphicDiscriminator, + className: "ServiceResourceListResult", modelProperties: { - ...BackupPolicy.type.modelProperties, - periodicModeProperties: { - serializedName: "periodicModeProperties", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Composite", - className: "PeriodicModeProperties", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceResource", + }, + }, }, }, }, }, }; -export const ContinuousModeBackupPolicy: coreClient.CompositeMapper = { - serializedName: "Continuous", +export const ServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "ServiceResourceProperties", type: { name: "Composite", - className: "ContinuousModeBackupPolicy", - uberParent: "BackupPolicy", - polymorphicDiscriminator: BackupPolicy.type.polymorphicDiscriminator, + className: "ServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: { + serializedName: "serviceType", + clientName: "serviceType", + }, modelProperties: { - ...BackupPolicy.type.modelProperties, - continuousModeProperties: { - serializedName: "continuousModeProperties", + creationTime: { + serializedName: "creationTime", + readOnly: true, type: { - name: "Composite", - className: "ContinuousModeProperties", + name: "DateTime", }, }, - }, - }, -}; - -export const DatabaseAccountGetResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseAccountGetResults", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - kind: { - serializedName: "kind", + instanceSize: { + serializedName: "instanceSize", type: { name: "String", }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", + instanceCount: { + constraints: { + InclusiveMinimum: 0, }, - }, - systemData: { - serializedName: "systemData", + serializedName: "instanceCount", type: { - name: "Composite", - className: "SystemData", + name: "Number", }, }, - provisioningState: { - serializedName: "properties.provisioningState", - readOnly: true, + serviceType: { + serializedName: "serviceType", + required: true, type: { name: "String", }, }, - documentEndpoint: { - serializedName: "properties.documentEndpoint", + status: { + serializedName: "status", readOnly: true, type: { name: "String", }, }, - databaseAccountOfferType: { - defaultValue: "Standard", - isConstant: true, - serializedName: "properties.databaseAccountOfferType", - type: { - name: "String", + }, + }, +}; + +export const ServiceResourceCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ServiceResourceCreateUpdateParameters", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ServiceResourceCreateUpdateProperties", + }, }, }, - ipRules: { - serializedName: "properties.ipRules", + }, + }; + +export const ServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: { + serializedName: "serviceType", + clientName: "serviceType", + }, + modelProperties: { + instanceSize: { + serializedName: "instanceSize", + type: { + name: "String", + }, + }, + instanceCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "instanceCount", + type: { + name: "Number", + }, + }, + serviceType: { + serializedName: "serviceType", + required: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ThroughputPoolsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolsListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "IpAddressOrRange", + className: "ThroughputPoolResource", }, }, }, }, - isVirtualNetworkFilterEnabled: { - serializedName: "properties.isVirtualNetworkFilterEnabled", - type: { - name: "Boolean", - }, - }, - enableAutomaticFailover: { - serializedName: "properties.enableAutomaticFailover", - type: { - name: "Boolean", - }, - }, - consistencyPolicy: { - serializedName: "properties.consistencyPolicy", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Composite", - className: "ConsistencyPolicy", + name: "String", }, }, - capabilities: { - serializedName: "properties.capabilities", + }, + }, +}; + +export const ThroughputPoolUpdate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolUpdate", + modelProperties: { + provisioningState: { + serializedName: "properties.provisioningState", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Capability", - }, - }, + name: "String", }, }, - writeLocations: { - serializedName: "properties.writeLocations", - readOnly: true, + maxThroughput: { + serializedName: "properties.maxThroughput", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Location", - }, - }, + name: "Number", }, }, - readLocations: { - serializedName: "properties.readLocations", + }, + }, +}; + +export const ThroughputPoolAccountsListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolAccountsListResult", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Location", + className: "ThroughputPoolAccountResource", }, }, }, }, - locations: { - serializedName: "properties.locations", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Location", - }, - }, + name: "String", }, }, - failoverPolicies: { - serializedName: "properties.failoverPolicies", + }, + }, +}; + +export const ChaosFaultListResponse: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ChaosFaultListResponse", + modelProperties: { + value: { + serializedName: "value", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "FailoverPolicy", - }, - }, - }, - }, - virtualNetworkRules: { - serializedName: "properties.virtualNetworkRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkRule", + className: "ChaosFaultResource", }, }, }, }, - privateEndpointConnections: { - serializedName: "properties.privateEndpointConnections", + nextLink: { + serializedName: "nextLink", readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - }, - }, - }, - }, - enableMultipleWriteLocations: { - serializedName: "properties.enableMultipleWriteLocations", - type: { - name: "Boolean", + name: "String", }, }, - enableCassandraConnector: { - serializedName: "properties.enableCassandraConnector", - type: { - name: "Boolean", + }, + }, +}; + +export const PeriodicModeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PeriodicModeProperties", + modelProperties: { + backupIntervalInMinutes: { + constraints: { + InclusiveMinimum: 0, }, - }, - connectorOffer: { - serializedName: "properties.connectorOffer", + serializedName: "backupIntervalInMinutes", type: { - name: "String", + name: "Number", }, }, - disableKeyBasedMetadataWriteAccess: { - serializedName: "properties.disableKeyBasedMetadataWriteAccess", - type: { - name: "Boolean", + backupRetentionIntervalInHours: { + constraints: { + InclusiveMinimum: 0, }, - }, - keyVaultKeyUri: { - serializedName: "properties.keyVaultKeyUri", + serializedName: "backupRetentionIntervalInHours", type: { - name: "String", + name: "Number", }, }, - defaultIdentity: { - serializedName: "properties.defaultIdentity", + backupStorageRedundancy: { + serializedName: "backupStorageRedundancy", type: { name: "String", }, }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", + }, + }, +}; + +export const ContinuousModeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousModeProperties", + modelProperties: { + tier: { + serializedName: "tier", type: { name: "String", }, }, - enableFreeTier: { - serializedName: "properties.enableFreeTier", - type: { - name: "Boolean", - }, - }, - apiProperties: { - serializedName: "properties.apiProperties", + }, + }, +}; + +export const DataTransferServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferServiceResource", + modelProperties: { + properties: { + serializedName: "properties", type: { name: "Composite", - className: "ApiProperties", - }, - }, - enableAnalyticalStorage: { - serializedName: "properties.enableAnalyticalStorage", - type: { - name: "Boolean", + className: "DataTransferServiceResourceProperties", }, }, - analyticalStorageConfiguration: { - serializedName: "properties.analyticalStorageConfiguration", + }, + }, +}; + +export const RegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionalServiceResource", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, type: { - name: "Composite", - className: "AnalyticalStorageConfiguration", + name: "String", }, }, - instanceId: { - serializedName: "properties.instanceId", + location: { + serializedName: "location", readOnly: true, type: { name: "String", }, }, - createMode: { - defaultValue: "Default", - serializedName: "properties.createMode", + status: { + serializedName: "status", + readOnly: true, type: { name: "String", }, }, - restoreParameters: { - serializedName: "properties.restoreParameters", + }, + }, +}; + +export const SqlDedicatedGatewayServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDedicatedGatewayServiceResource", + modelProperties: { + properties: { + serializedName: "properties", type: { name: "Composite", - className: "RestoreParameters", + className: "SqlDedicatedGatewayServiceResourceProperties", }, }, - backupPolicy: { - serializedName: "properties.backupPolicy", + }, + }, +}; + +export const GraphAPIComputeServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphAPIComputeServiceResource", + modelProperties: { + properties: { + serializedName: "properties", type: { name: "Composite", - className: "BackupPolicy", + className: "GraphAPIComputeServiceResourceProperties", }, }, - cors: { - serializedName: "properties.cors", - type: { - name: "Sequence", - element: { - type: { + }, + }, +}; + +export const MaterializedViewsBuilderServiceResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResource", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResourceProperties", + }, + }, + }, + }, + }; + +export const ThroughputPoolAccountCreateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ThroughputPoolAccountCreateParameters", + modelProperties: { + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + accountResourceIdentifier: { + serializedName: "properties.accountResourceIdentifier", + type: { + name: "String", + }, + }, + accountLocation: { + serializedName: "properties.accountLocation", + type: { + name: "String", + }, + }, + }, + }, + }; + +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, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const RestoreParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestoreParameters", + modelProperties: { + ...RestoreParametersBase.type.modelProperties, + restoreMode: { + serializedName: "restoreMode", + type: { + name: "String", + }, + }, + databasesToRestore: { + serializedName: "databasesToRestore", + type: { + name: "Sequence", + element: { + type: { name: "Composite", - className: "CorsPolicy", + className: "DatabaseRestoreResource", }, }, }, }, - networkAclBypass: { - serializedName: "properties.networkAclBypass", + gremlinDatabasesToRestore: { + serializedName: "gremlinDatabasesToRestore", type: { - name: "Enum", - allowedValues: ["None", "AzureServices"], + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GremlinDatabaseRestoreResource", + }, + }, }, }, - networkAclBypassResourceIds: { - serializedName: "properties.networkAclBypassResourceIds", + tablesToRestore: { + serializedName: "tablesToRestore", type: { name: "Sequence", element: { @@ -6652,929 +7742,2226 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { }, }, }, - disableLocalAuth: { - serializedName: "properties.disableLocalAuth", + sourceBackupLocation: { + serializedName: "sourceBackupLocation", type: { - name: "Boolean", + name: "String", }, }, - capacity: { - serializedName: "properties.capacity", + }, + }, +}; + +export const ResourceRestoreParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceRestoreParameters", + modelProperties: { + ...RestoreParametersBase.type.modelProperties, + }, + }, +}; + +export const PeriodicModeBackupPolicy: coreClient.CompositeMapper = { + serializedName: "Periodic", + type: { + name: "Composite", + className: "PeriodicModeBackupPolicy", + uberParent: "BackupPolicy", + polymorphicDiscriminator: BackupPolicy.type.polymorphicDiscriminator, + modelProperties: { + ...BackupPolicy.type.modelProperties, + periodicModeProperties: { + serializedName: "periodicModeProperties", type: { name: "Composite", - className: "Capacity", + className: "PeriodicModeProperties", }, }, - keysMetadata: { - serializedName: "properties.keysMetadata", + }, + }, +}; + +export const ContinuousModeBackupPolicy: coreClient.CompositeMapper = { + serializedName: "Continuous", + type: { + name: "Composite", + className: "ContinuousModeBackupPolicy", + uberParent: "BackupPolicy", + polymorphicDiscriminator: BackupPolicy.type.polymorphicDiscriminator, + modelProperties: { + ...BackupPolicy.type.modelProperties, + continuousModeProperties: { + serializedName: "continuousModeProperties", type: { name: "Composite", - className: "DatabaseAccountKeysMetadata", + className: "ContinuousModeProperties", }, }, - enablePartitionMerge: { - serializedName: "properties.enablePartitionMerge", + }, + }, +}; + +export const DatabaseAccountGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + kind: { + serializedName: "kind", type: { - name: "Boolean", + name: "String", }, }, - minimalTlsVersion: { - serializedName: "properties.minimalTlsVersion", + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, }, - enableBurstCapacity: { - serializedName: "properties.enableBurstCapacity", + documentEndpoint: { + serializedName: "properties.documentEndpoint", + readOnly: true, type: { - name: "Boolean", + name: "String", }, }, - customerManagedKeyStatus: { - serializedName: "properties.customerManagedKeyStatus", + databaseAccountOfferType: { + defaultValue: "Standard", + isConstant: true, + serializedName: "properties.databaseAccountOfferType", type: { name: "String", }, }, - }, - }, -}; - -export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "DatabaseAccountCreateUpdateParameters", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - kind: { - serializedName: "kind", - type: { - name: "String", + ipRules: { + serializedName: "properties.ipRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IpAddressOrRange", + }, }, }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity", - }, + }, + isVirtualNetworkFilterEnabled: { + serializedName: "properties.isVirtualNetworkFilterEnabled", + type: { + name: "Boolean", }, - consistencyPolicy: { - serializedName: "properties.consistencyPolicy", - type: { - name: "Composite", - className: "ConsistencyPolicy", - }, + }, + enableAutomaticFailover: { + serializedName: "properties.enableAutomaticFailover", + type: { + name: "Boolean", }, - locations: { - serializedName: "properties.locations", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Location", - }, + }, + consistencyPolicy: { + serializedName: "properties.consistencyPolicy", + type: { + name: "Composite", + className: "ConsistencyPolicy", + }, + }, + capabilities: { + serializedName: "properties.capabilities", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Capability", }, }, }, - databaseAccountOfferType: { - defaultValue: "Standard", - isConstant: true, - serializedName: "properties.databaseAccountOfferType", - type: { - name: "String", + }, + writeLocations: { + serializedName: "properties.writeLocations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Location", + }, }, }, - ipRules: { - serializedName: "properties.ipRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IpAddressOrRange", - }, + }, + readLocations: { + serializedName: "properties.readLocations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Location", }, }, }, - isVirtualNetworkFilterEnabled: { - serializedName: "properties.isVirtualNetworkFilterEnabled", - type: { - name: "Boolean", + }, + locations: { + serializedName: "properties.locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Location", + }, }, }, - enableAutomaticFailover: { - serializedName: "properties.enableAutomaticFailover", - type: { - name: "Boolean", + }, + failoverPolicies: { + serializedName: "properties.failoverPolicies", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FailoverPolicy", + }, }, }, - capabilities: { - serializedName: "properties.capabilities", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Capability", - }, + }, + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule", }, }, }, - virtualNetworkRules: { - serializedName: "properties.virtualNetworkRules", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "VirtualNetworkRule", - }, + }, + privateEndpointConnections: { + serializedName: "properties.privateEndpointConnections", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection", }, }, }, - enableMultipleWriteLocations: { - serializedName: "properties.enableMultipleWriteLocations", - type: { - name: "Boolean", - }, + }, + enableMultipleWriteLocations: { + serializedName: "properties.enableMultipleWriteLocations", + type: { + name: "Boolean", }, - enableCassandraConnector: { - serializedName: "properties.enableCassandraConnector", - type: { - name: "Boolean", - }, + }, + enableCassandraConnector: { + serializedName: "properties.enableCassandraConnector", + type: { + name: "Boolean", }, - connectorOffer: { - serializedName: "properties.connectorOffer", - type: { - name: "String", - }, + }, + connectorOffer: { + serializedName: "properties.connectorOffer", + type: { + name: "String", }, - disableKeyBasedMetadataWriteAccess: { - serializedName: "properties.disableKeyBasedMetadataWriteAccess", - type: { - name: "Boolean", - }, + }, + disableKeyBasedMetadataWriteAccess: { + serializedName: "properties.disableKeyBasedMetadataWriteAccess", + type: { + name: "Boolean", }, - keyVaultKeyUri: { - serializedName: "properties.keyVaultKeyUri", - type: { - name: "String", - }, + }, + keyVaultKeyUri: { + serializedName: "properties.keyVaultKeyUri", + type: { + name: "String", }, - defaultIdentity: { - serializedName: "properties.defaultIdentity", - type: { - name: "String", - }, + }, + defaultIdentity: { + serializedName: "properties.defaultIdentity", + type: { + name: "String", }, - publicNetworkAccess: { - serializedName: "properties.publicNetworkAccess", - type: { - name: "String", - }, + }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String", }, - enableFreeTier: { - serializedName: "properties.enableFreeTier", - type: { - name: "Boolean", - }, + }, + enableFreeTier: { + serializedName: "properties.enableFreeTier", + type: { + name: "Boolean", }, - apiProperties: { - serializedName: "properties.apiProperties", - type: { - name: "Composite", - className: "ApiProperties", - }, + }, + apiProperties: { + serializedName: "properties.apiProperties", + type: { + name: "Composite", + className: "ApiProperties", }, - enableAnalyticalStorage: { - serializedName: "properties.enableAnalyticalStorage", - type: { - name: "Boolean", - }, + }, + enableAnalyticalStorage: { + serializedName: "properties.enableAnalyticalStorage", + type: { + name: "Boolean", }, - analyticalStorageConfiguration: { - serializedName: "properties.analyticalStorageConfiguration", - type: { - name: "Composite", - className: "AnalyticalStorageConfiguration", - }, + }, + analyticalStorageConfiguration: { + serializedName: "properties.analyticalStorageConfiguration", + type: { + name: "Composite", + className: "AnalyticalStorageConfiguration", }, - createMode: { - defaultValue: "Default", - serializedName: "properties.createMode", - type: { - name: "String", - }, + }, + instanceId: { + serializedName: "properties.instanceId", + readOnly: true, + type: { + name: "String", }, - backupPolicy: { - serializedName: "properties.backupPolicy", - type: { - name: "Composite", - className: "BackupPolicy", - }, + }, + createMode: { + defaultValue: "Default", + serializedName: "properties.createMode", + type: { + name: "String", }, - cors: { - serializedName: "properties.cors", + }, + restoreParameters: { + serializedName: "properties.restoreParameters", + type: { + name: "Composite", + className: "RestoreParameters", + }, + }, + backupPolicy: { + serializedName: "properties.backupPolicy", + type: { + name: "Composite", + className: "BackupPolicy", + }, + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsPolicy", + }, + }, + }, + }, + networkAclBypass: { + serializedName: "properties.networkAclBypass", + type: { + name: "Enum", + allowedValues: ["None", "AzureServices"], + }, + }, + networkAclBypassResourceIds: { + serializedName: "properties.networkAclBypassResourceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings", + }, + }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + type: { + name: "Boolean", + }, + }, + capacity: { + serializedName: "properties.capacity", + type: { + name: "Composite", + className: "Capacity", + }, + }, + capacityMode: { + serializedName: "properties.capacityMode", + type: { + name: "String", + }, + }, + capacityModeChangeTransitionState: { + serializedName: "properties.capacityModeChangeTransitionState", + type: { + name: "Composite", + className: "CapacityModeChangeTransitionState", + }, + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean", + }, + }, + keysMetadata: { + serializedName: "properties.keysMetadata", + type: { + name: "Composite", + className: "DatabaseAccountKeysMetadata", + }, + }, + enablePartitionMerge: { + serializedName: "properties.enablePartitionMerge", + type: { + name: "Boolean", + }, + }, + enableBurstCapacity: { + serializedName: "properties.enableBurstCapacity", + type: { + name: "Boolean", + }, + }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String", + }, + }, + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String", + }, + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", + type: { + name: "Boolean", + }, + }, + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", + type: { + name: "String", + }, + }, + enablePerRegionPerPartitionAutoscale: { + serializedName: "properties.enablePerRegionPerPartitionAutoscale", + type: { + name: "Boolean", + }, + }, + }, + }, +}; + +export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + kind: { + serializedName: "kind", + type: { + name: "String", + }, + }, + consistencyPolicy: { + serializedName: "properties.consistencyPolicy", + type: { + name: "Composite", + className: "ConsistencyPolicy", + }, + }, + locations: { + serializedName: "properties.locations", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "CorsPolicy", + className: "Location", }, }, }, }, - networkAclBypass: { - serializedName: "properties.networkAclBypass", + databaseAccountOfferType: { + defaultValue: "Standard", + isConstant: true, + serializedName: "properties.databaseAccountOfferType", type: { - name: "Enum", - allowedValues: ["None", "AzureServices"], + name: "String", }, }, - networkAclBypassResourceIds: { - serializedName: "properties.networkAclBypassResourceIds", + ipRules: { + serializedName: "properties.ipRules", type: { name: "Sequence", element: { type: { - name: "String", + name: "Composite", + className: "IpAddressOrRange", }, }, }, }, - disableLocalAuth: { - serializedName: "properties.disableLocalAuth", + isVirtualNetworkFilterEnabled: { + serializedName: "properties.isVirtualNetworkFilterEnabled", type: { name: "Boolean", }, }, - restoreParameters: { - serializedName: "properties.restoreParameters", + enableAutomaticFailover: { + serializedName: "properties.enableAutomaticFailover", type: { - name: "Composite", - className: "RestoreParameters", + name: "Boolean", }, }, - capacity: { - serializedName: "properties.capacity", + capabilities: { + serializedName: "properties.capabilities", type: { - name: "Composite", - className: "Capacity", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Capability", + }, + }, }, }, - keysMetadata: { - serializedName: "properties.keysMetadata", + virtualNetworkRules: { + serializedName: "properties.virtualNetworkRules", type: { - name: "Composite", - className: "DatabaseAccountKeysMetadata", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "VirtualNetworkRule", + }, + }, }, }, - enablePartitionMerge: { - serializedName: "properties.enablePartitionMerge", + enableMultipleWriteLocations: { + serializedName: "properties.enableMultipleWriteLocations", type: { name: "Boolean", }, }, - minimalTlsVersion: { - serializedName: "properties.minimalTlsVersion", + enableCassandraConnector: { + serializedName: "properties.enableCassandraConnector", + type: { + name: "Boolean", + }, + }, + connectorOffer: { + serializedName: "properties.connectorOffer", type: { name: "String", }, }, - enableBurstCapacity: { - serializedName: "properties.enableBurstCapacity", + disableKeyBasedMetadataWriteAccess: { + serializedName: "properties.disableKeyBasedMetadataWriteAccess", type: { name: "Boolean", }, }, - customerManagedKeyStatus: { - serializedName: "properties.customerManagedKeyStatus", + keyVaultKeyUri: { + serializedName: "properties.keyVaultKeyUri", type: { name: "String", }, }, - }, - }, - }; - -export const SqlDatabaseGetResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlDatabaseGetResults", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlDatabaseGetPropertiesResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "SqlDatabaseGetPropertiesOptions", + defaultIdentity: { + serializedName: "properties.defaultIdentity", + type: { + name: "String", + }, }, + publicNetworkAccess: { + serializedName: "properties.publicNetworkAccess", + type: { + name: "String", + }, + }, + enableFreeTier: { + serializedName: "properties.enableFreeTier", + type: { + name: "Boolean", + }, + }, + apiProperties: { + serializedName: "properties.apiProperties", + type: { + name: "Composite", + className: "ApiProperties", + }, + }, + enableAnalyticalStorage: { + serializedName: "properties.enableAnalyticalStorage", + type: { + name: "Boolean", + }, + }, + analyticalStorageConfiguration: { + serializedName: "properties.analyticalStorageConfiguration", + type: { + name: "Composite", + className: "AnalyticalStorageConfiguration", + }, + }, + createMode: { + defaultValue: "Default", + serializedName: "properties.createMode", + type: { + name: "String", + }, + }, + backupPolicy: { + serializedName: "properties.backupPolicy", + type: { + name: "Composite", + className: "BackupPolicy", + }, + }, + cors: { + serializedName: "properties.cors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CorsPolicy", + }, + }, + }, + }, + networkAclBypass: { + serializedName: "properties.networkAclBypass", + type: { + name: "Enum", + allowedValues: ["None", "AzureServices"], + }, + }, + networkAclBypassResourceIds: { + serializedName: "properties.networkAclBypassResourceIds", + type: { + name: "Sequence", + element: { + type: { + name: "String", + }, + }, + }, + }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings", + }, + }, + disableLocalAuth: { + serializedName: "properties.disableLocalAuth", + type: { + name: "Boolean", + }, + }, + restoreParameters: { + serializedName: "properties.restoreParameters", + type: { + name: "Composite", + className: "RestoreParameters", + }, + }, + capacity: { + serializedName: "properties.capacity", + type: { + name: "Composite", + className: "Capacity", + }, + }, + capacityMode: { + serializedName: "properties.capacityMode", + type: { + name: "String", + }, + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean", + }, + }, + keysMetadata: { + serializedName: "properties.keysMetadata", + type: { + name: "Composite", + className: "DatabaseAccountKeysMetadata", + }, + }, + enablePartitionMerge: { + serializedName: "properties.enablePartitionMerge", + type: { + name: "Boolean", + }, + }, + enableBurstCapacity: { + serializedName: "properties.enableBurstCapacity", + type: { + name: "Boolean", + }, + }, + minimalTlsVersion: { + serializedName: "properties.minimalTlsVersion", + type: { + name: "String", + }, + }, + customerManagedKeyStatus: { + serializedName: "properties.customerManagedKeyStatus", + type: { + name: "String", + }, + }, + enablePriorityBasedExecution: { + serializedName: "properties.enablePriorityBasedExecution", + type: { + name: "Boolean", + }, + }, + defaultPriorityLevel: { + serializedName: "properties.defaultPriorityLevel", + type: { + name: "String", + }, + }, + enablePerRegionPerPartitionAutoscale: { + serializedName: "properties.enablePerRegionPerPartitionAutoscale", + type: { + name: "Boolean", + }, + }, + }, + }, + }; + +export const GraphResourceGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GraphResourceGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "GraphResourceGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const GraphResourceCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GraphResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const SqlDatabaseGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlDatabaseGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "SqlDatabaseGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const SqlDatabaseCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlDatabaseResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const ThroughputSettingsGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputSettingsGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ThroughputSettingsGetPropertiesResource", + }, + }, + }, + }, +}; + +export const ThroughputSettingsUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputSettingsUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ThroughputSettingsResource", + }, + }, + }, + }, +}; + +export const SqlContainerGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlContainerGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "SqlContainerGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const SqlContainerCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlContainerResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const RetrieveThroughputParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RetrieveThroughputParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RetrieveThroughputPropertiesResource", + }, + }, + }, + }, +}; + +export const PhysicalPartitionThroughputInfoResult: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResult", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: + "PhysicalPartitionThroughputInfoResultPropertiesResource", + }, + }, + }, + }, + }; + +export const RedistributeThroughputParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RedistributeThroughputParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RedistributeThroughputPropertiesResource", + }, + }, + }, + }, +}; + +export const SqlStoredProcedureGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlStoredProcedureGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlStoredProcedureGetPropertiesResource", + }, + }, + }, + }, +}; + +export const SqlStoredProcedureCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlStoredProcedureCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlStoredProcedureResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const SqlUserDefinedFunctionGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlUserDefinedFunctionGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlUserDefinedFunctionGetPropertiesResource", + }, + }, + }, + }, +}; + +export const SqlUserDefinedFunctionCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlUserDefinedFunctionCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlUserDefinedFunctionResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const SqlTriggerGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlTriggerGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlTriggerGetPropertiesResource", + }, + }, + }, + }, +}; + +export const SqlTriggerCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlTriggerCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "SqlTriggerResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const MongoDBDatabaseGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoDBDatabaseGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "MongoDBDatabaseGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "MongoDBDatabaseGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const MongoDBDatabaseCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MongoDBDatabaseCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "MongoDBDatabaseResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const MongoDBCollectionGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoDBCollectionGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "MongoDBCollectionGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "MongoDBCollectionGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const MongoDBCollectionCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MongoDBCollectionCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "MongoDBCollectionResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const TableGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "TableGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "TableGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const TableCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "TableResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const CassandraKeyspaceGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraKeyspaceGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraKeyspaceGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CassandraKeyspaceGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const CassandraKeyspaceCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CassandraKeyspaceCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraKeyspaceResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const CassandraTableGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraTableGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraTableGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CassandraTableGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const CassandraTableCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CassandraTableCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraTableResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const GremlinDatabaseGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinDatabaseGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinDatabaseGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "GremlinDatabaseGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const GremlinDatabaseCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GremlinDatabaseCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinDatabaseResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, + }; + +export const GremlinGraphGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinGraphGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinGraphGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "GremlinGraphGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const GremlinGraphCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinGraphCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinGraphResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const CassandraViewGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraViewGetPropertiesResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CassandraViewGetPropertiesOptions", + }, + }, + }, + }, +}; + +export const CassandraViewCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "CassandraViewResource", + }, + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions", + }, + }, + }, + }, +}; + +export const DatabaseAccountListKeysResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountListKeysResult", + modelProperties: { + ...DatabaseAccountListReadOnlyKeysResult.type.modelProperties, + primaryMasterKey: { + serializedName: "primaryMasterKey", + readOnly: true, + type: { + name: "String", + }, + }, + secondaryMasterKey: { + serializedName: "secondaryMasterKey", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PartitionMetric: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PartitionMetric", + modelProperties: { + ...Metric.type.modelProperties, + partitionId: { + serializedName: "partitionId", + readOnly: true, + type: { + name: "String", + }, + }, + partitionKeyRangeId: { + serializedName: "partitionKeyRangeId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const PercentileMetricValue: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PercentileMetricValue", + modelProperties: { + ...MetricValue.type.modelProperties, + p10: { + serializedName: "P10", + readOnly: true, + type: { + name: "Number", + }, + }, + p25: { + serializedName: "P25", + readOnly: true, + type: { + name: "Number", + }, + }, + p50: { + serializedName: "P50", + readOnly: true, + type: { + name: "Number", + }, + }, + p75: { + serializedName: "P75", + readOnly: true, + type: { + name: "Number", + }, + }, + p90: { + serializedName: "P90", + readOnly: true, + type: { + name: "Number", + }, + }, + p95: { + serializedName: "P95", + readOnly: true, + type: { + name: "Number", + }, + }, + p99: { + serializedName: "P99", + readOnly: true, + type: { + name: "Number", + }, + }, + }, + }, +}; + +export const PartitionUsage: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PartitionUsage", + modelProperties: { + ...Usage.type.modelProperties, + partitionId: { + serializedName: "partitionId", + readOnly: true, + type: { + name: "String", + }, + }, + partitionKeyRangeId: { + serializedName: "partitionKeyRangeId", + readOnly: true, + type: { + name: "String", + }, + }, + }, + }, +}; + +export const GraphResourceGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetPropertiesResource", + modelProperties: { + ...GraphResource.type.modelProperties, + }, + }, +}; + +export const GraphResourceGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const SqlDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const SqlContainerGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const MongoDBDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoDBDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const MongoDBCollectionGetPropertiesOptions: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MongoDBCollectionGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, + }; + +export const TableGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, + }, + }, +}; + +export const CassandraKeyspaceGetPropertiesOptions: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CassandraKeyspaceGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties, }, }, - }, -}; + }; -export const SqlDatabaseCreateUpdateParameters: coreClient.CompositeMapper = { +export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseCreateUpdateParameters", + className: "CassandraTableGetPropertiesOptions", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlDatabaseResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, - }, + ...OptionsResource.type.modelProperties, }, }, }; -export const ThroughputSettingsGetResults: coreClient.CompositeMapper = { +export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ThroughputSettingsGetResults", + className: "GremlinDatabaseGetPropertiesOptions", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "ThroughputSettingsGetPropertiesResource", - }, - }, + ...OptionsResource.type.modelProperties, }, }, }; -export const ThroughputSettingsUpdateParameters: coreClient.CompositeMapper = { +export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ThroughputSettingsUpdateParameters", + className: "GremlinGraphGetPropertiesOptions", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "ThroughputSettingsResource", - }, - }, + ...OptionsResource.type.modelProperties, }, }, }; -export const SqlContainerGetResults: coreClient.CompositeMapper = { +export const CassandraViewGetPropertiesOptions: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerGetResults", + className: "CassandraViewGetPropertiesOptions", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlContainerGetPropertiesResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "SqlContainerGetPropertiesOptions", - }, - }, + ...OptionsResource.type.modelProperties, }, }, }; -export const SqlContainerCreateUpdateParameters: coreClient.CompositeMapper = { +export const SqlDatabaseGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerCreateUpdateParameters", + className: "SqlDatabaseGetPropertiesResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlContainerResource", - }, - }, - options: { - serializedName: "properties.options", + ...SqlDatabaseResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + colls: { + serializedName: "_colls", type: { - name: "Composite", - className: "CreateUpdateOptions", + name: "String", }, }, - }, - }, -}; - -export const SqlStoredProcedureGetResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlStoredProcedureGetResults", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", + users: { + serializedName: "_users", type: { - name: "Composite", - className: "SqlStoredProcedureGetPropertiesResource", + name: "String", }, }, }, }, }; -export const SqlStoredProcedureCreateUpdateParameters: coreClient.CompositeMapper = +export const RestorableSqlDatabasePropertiesResourceDatabase: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlStoredProcedureCreateUpdateParameters", + className: "RestorableSqlDatabasePropertiesResourceDatabase", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", + ...SqlDatabaseResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + colls: { + serializedName: "_colls", + readOnly: true, type: { - name: "Composite", - className: "SqlStoredProcedureResource", + name: "String", }, }, - options: { - serializedName: "properties.options", + users: { + serializedName: "_users", + readOnly: true, type: { - name: "Composite", - className: "CreateUpdateOptions", + name: "String", + }, + }, + self: { + serializedName: "_self", + readOnly: true, + type: { + name: "String", }, }, }, }, }; -export const SqlUserDefinedFunctionGetResults: coreClient.CompositeMapper = { +export const ThroughputSettingsGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ThroughputSettingsGetPropertiesResource", + modelProperties: { + ...ThroughputSettingsResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, + }; + +export const ClientEncryptionKeyGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "ClientEncryptionKeyGetPropertiesResource", + modelProperties: { + ...ClientEncryptionKeyResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, + }; + +export const SqlContainerGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlUserDefinedFunctionGetResults", + className: "SqlContainerGetPropertiesResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlUserDefinedFunctionGetPropertiesResource", - }, + ...SqlContainerResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, +}; + +export const SqlStoredProcedureGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlStoredProcedureGetPropertiesResource", + modelProperties: { + ...SqlStoredProcedureResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, + }; + +export const SqlUserDefinedFunctionGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlUserDefinedFunctionGetPropertiesResource", + modelProperties: { + ...SqlUserDefinedFunctionResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, }, }, + }; + +export const SqlTriggerGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlTriggerGetPropertiesResource", + modelProperties: { + ...SqlTriggerResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, }, }; -export const SqlUserDefinedFunctionCreateUpdateParameters: coreClient.CompositeMapper = +export const MongoDBDatabaseGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlUserDefinedFunctionCreateUpdateParameters", + className: "MongoDBDatabaseGetPropertiesResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlUserDefinedFunctionResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, - }, + ...MongoDBDatabaseResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, + }; + +export const MongoDBCollectionGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "MongoDBCollectionGetPropertiesResource", + modelProperties: { + ...MongoDBCollectionResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, + }; + +export const TableGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableGetPropertiesResource", + modelProperties: { + ...TableResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, +}; + +export const CassandraKeyspaceGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CassandraKeyspaceGetPropertiesResource", + modelProperties: { + ...CassandraKeyspaceResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, }, }, }; -export const SqlTriggerGetResults: coreClient.CompositeMapper = { +export const CassandraTableGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlTriggerGetResults", + className: "CassandraTableGetPropertiesResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlTriggerGetPropertiesResource", - }, - }, + ...CassandraTableResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, }, }, }; -export const SqlTriggerCreateUpdateParameters: coreClient.CompositeMapper = { +export const GremlinDatabaseGetPropertiesResource: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GremlinDatabaseGetPropertiesResource", + modelProperties: { + ...GremlinDatabaseResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + }, + }, + }; + +export const GremlinGraphGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlTriggerCreateUpdateParameters", + className: "GremlinGraphGetPropertiesResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "SqlTriggerResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, - }, + ...GremlinGraphResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, }, }, }; -export const MongoDBDatabaseGetResults: coreClient.CompositeMapper = { +export const CassandraViewGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBDatabaseGetResults", + className: "CassandraViewGetPropertiesResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "MongoDBDatabaseGetPropertiesResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "MongoDBDatabaseGetPropertiesOptions", - }, - }, + ...CassandraViewResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, }, }, }; -export const MongoDBDatabaseCreateUpdateParameters: coreClient.CompositeMapper = +export const RestorableSqlContainerPropertiesResourceContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBDatabaseCreateUpdateParameters", + className: "RestorableSqlContainerPropertiesResourceContainer", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "MongoDBDatabaseResource", - }, - }, - options: { - serializedName: "properties.options", + ...SqlContainerResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + self: { + serializedName: "_self", + readOnly: true, type: { - name: "Composite", - className: "CreateUpdateOptions", + name: "String", }, }, }, }, }; -export const MongoDBCollectionGetResults: coreClient.CompositeMapper = { +export const ClientEncryptionKeyGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBCollectionGetResults", + className: "ClientEncryptionKeyGetResults", modelProperties: { - ...ARMResourceProperties.type.modelProperties, + ...ARMProxyResource.type.modelProperties, resource: { serializedName: "properties.resource", type: { name: "Composite", - className: "MongoDBCollectionGetPropertiesResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "MongoDBCollectionGetPropertiesOptions", + className: "ClientEncryptionKeyGetPropertiesResource", }, }, }, }, }; -export const MongoDBCollectionCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "MongoDBCollectionCreateUpdateParameters", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "MongoDBCollectionResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, - }, - }, - }, - }; - -export const TableGetResults: coreClient.CompositeMapper = { +export const LocationGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableGetResults", + className: "LocationGetResult", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "TableGetPropertiesResource", - }, - }, - options: { - serializedName: "properties.options", + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "TableGetPropertiesOptions", + className: "LocationProperties", }, }, }, }, }; -export const TableCreateUpdateParameters: coreClient.CompositeMapper = { +export const CreateJobRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableCreateUpdateParameters", + className: "CreateJobRequest", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "TableResource", - }, - }, - options: { - serializedName: "properties.options", + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "CreateUpdateOptions", + className: "DataTransferJobProperties", }, }, }, }, }; -export const CassandraKeyspaceGetResults: coreClient.CompositeMapper = { +export const DataTransferJobGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraKeyspaceGetResults", + className: "DataTransferJobGetResults", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", + ...ARMProxyResource.type.modelProperties, + jobName: { + serializedName: "properties.jobName", + readOnly: true, type: { - name: "Composite", - className: "CassandraKeyspaceGetPropertiesResource", + name: "String", }, }, - options: { - serializedName: "properties.options", + source: { + serializedName: "properties.source", type: { name: "Composite", - className: "CassandraKeyspaceGetPropertiesOptions", + className: "DataTransferDataSourceSink", }, }, - }, - }, -}; - -export const CassandraKeyspaceCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "CassandraKeyspaceCreateUpdateParameters", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "CassandraKeyspaceResource", - }, - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink", }, }, - }, - }; - -export const CassandraTableGetResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CassandraTableGetResults", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", + status: { + serializedName: "properties.status", + readOnly: true, type: { - name: "Composite", - className: "CassandraTableGetPropertiesResource", + name: "String", }, }, - options: { - serializedName: "properties.options", + processedCount: { + serializedName: "properties.processedCount", + readOnly: true, type: { - name: "Composite", - className: "CassandraTableGetPropertiesOptions", + name: "Number", }, }, - }, - }, -}; - -export const CassandraTableCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "CassandraTableCreateUpdateParameters", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "CassandraTableResource", - }, + totalCount: { + serializedName: "properties.totalCount", + readOnly: true, + type: { + name: "Number", }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, + }, + lastUpdatedUtcTime: { + serializedName: "properties.lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime", }, }, - }, - }; - -export const GremlinDatabaseGetResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GremlinDatabaseGetResults", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", + workerCount: { + constraints: { + InclusiveMinimum: 0, + }, + serializedName: "properties.workerCount", type: { - name: "Composite", - className: "GremlinDatabaseGetPropertiesResource", + name: "Number", }, }, - options: { - serializedName: "properties.options", + error: { + serializedName: "properties.error", type: { name: "Composite", - className: "GremlinDatabaseGetPropertiesOptions", + className: "ErrorResponse", }, }, - }, - }, -}; - -export const GremlinDatabaseCreateUpdateParameters: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "GremlinDatabaseCreateUpdateParameters", - modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "GremlinDatabaseResource", - }, + duration: { + serializedName: "properties.duration", + readOnly: true, + type: { + name: "String", }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions", - }, + }, + mode: { + serializedName: "properties.mode", + type: { + name: "String", }, }, }, - }; + }, +}; -export const GremlinGraphGetResults: coreClient.CompositeMapper = { +export const DataCenterResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphGetResults", + className: "DataCenterResource", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "GremlinGraphGetPropertiesResource", - }, - }, - options: { - serializedName: "properties.options", + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { name: "Composite", - className: "GremlinGraphGetPropertiesOptions", + className: "DataCenterResourceProperties", }, }, }, }, }; -export const GremlinGraphCreateUpdateParameters: coreClient.CompositeMapper = { +export const MongoRoleDefinitionGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphCreateUpdateParameters", + className: "MongoRoleDefinitionGetResults", modelProperties: { - ...ARMResourceProperties.type.modelProperties, - resource: { - serializedName: "properties.resource", + ...ARMProxyResource.type.modelProperties, + roleName: { + serializedName: "properties.roleName", type: { - name: "Composite", - className: "GremlinGraphResource", + name: "String", }, }, - options: { - serializedName: "properties.options", + typePropertiesType: { + serializedName: "properties.type", type: { - name: "Composite", - className: "CreateUpdateOptions", + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"], + }, + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String", + }, + }, + privileges: { + serializedName: "properties.privileges", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Privilege", + }, + }, + }, + }, + roles: { + serializedName: "properties.roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role", + }, + }, }, }, }, }, }; -export const DatabaseAccountListKeysResult: coreClient.CompositeMapper = { +export const MongoUserDefinitionGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountListKeysResult", + className: "MongoUserDefinitionGetResults", modelProperties: { - ...DatabaseAccountListReadOnlyKeysResult.type.modelProperties, - primaryMasterKey: { - serializedName: "primaryMasterKey", - readOnly: true, + ...ARMProxyResource.type.modelProperties, + userName: { + serializedName: "properties.userName", type: { name: "String", }, }, - secondaryMasterKey: { - serializedName: "secondaryMasterKey", - readOnly: true, + password: { + serializedName: "properties.password", + type: { + name: "String", + }, + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String", + }, + }, + customData: { + serializedName: "properties.customData", + type: { + name: "String", + }, + }, + roles: { + serializedName: "properties.roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role", + }, + }, + }, + }, + mechanisms: { + serializedName: "properties.mechanisms", type: { name: "String", }, @@ -7583,21 +9970,21 @@ export const DatabaseAccountListKeysResult: coreClient.CompositeMapper = { }, }; -export const PartitionMetric: coreClient.CompositeMapper = { +export const NotebookWorkspace: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PartitionMetric", + className: "NotebookWorkspace", modelProperties: { - ...Metric.type.modelProperties, - partitionId: { - serializedName: "partitionId", + ...ARMProxyResource.type.modelProperties, + notebookServerEndpoint: { + serializedName: "properties.notebookServerEndpoint", readOnly: true, type: { name: "String", }, }, - partitionKeyRangeId: { - serializedName: "partitionKeyRangeId", + status: { + serializedName: "properties.status", readOnly: true, type: { name: "String", @@ -7607,81 +9994,124 @@ export const PartitionMetric: coreClient.CompositeMapper = { }, }; -export const PercentileMetricValue: coreClient.CompositeMapper = { +export const NotebookWorkspaceCreateUpdateParameters: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NotebookWorkspaceCreateUpdateParameters", + modelProperties: { + ...ARMProxyResource.type.modelProperties, + }, + }, + }; + +export const PrivateLinkResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PercentileMetricValue", + className: "PrivateLinkResource", modelProperties: { - ...MetricValue.type.modelProperties, - p10: { - serializedName: "P10", + ...ARMProxyResource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", readOnly: true, type: { - name: "Number", + name: "String", }, }, - p25: { - serializedName: "P25", + requiredMembers: { + serializedName: "properties.requiredMembers", readOnly: true, type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - p50: { - serializedName: "P50", + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", readOnly: true, type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - p75: { - serializedName: "P75", - readOnly: true, + }, + }, +}; + +export const SqlRoleDefinitionGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlRoleDefinitionGetResults", + modelProperties: { + ...ARMProxyResource.type.modelProperties, + roleName: { + serializedName: "properties.roleName", type: { - name: "Number", - }, - }, - p90: { - serializedName: "P90", - readOnly: true, + name: "String", + }, + }, + typePropertiesType: { + serializedName: "properties.type", type: { - name: "Number", + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"], }, }, - p95: { - serializedName: "P95", - readOnly: true, + assignableScopes: { + serializedName: "properties.assignableScopes", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "String", + }, + }, }, }, - p99: { - serializedName: "P99", - readOnly: true, + permissions: { + serializedName: "properties.permissions", type: { - name: "Number", + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Permission", + }, + }, }, }, }, }, }; -export const PartitionUsage: coreClient.CompositeMapper = { +export const SqlRoleAssignmentGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PartitionUsage", + className: "SqlRoleAssignmentGetResults", modelProperties: { - ...Usage.type.modelProperties, - partitionId: { - serializedName: "partitionId", - readOnly: true, + ...ARMProxyResource.type.modelProperties, + roleDefinitionId: { + serializedName: "properties.roleDefinitionId", type: { name: "String", }, }, - partitionKeyRangeId: { - serializedName: "partitionKeyRangeId", - readOnly: true, + scope: { + serializedName: "properties.scope", + type: { + name: "String", + }, + }, + principalId: { + serializedName: "properties.principalId", type: { name: "String", }, @@ -7690,54 +10120,90 @@ export const PartitionUsage: coreClient.CompositeMapper = { }, }; -export const SqlDatabaseGetPropertiesResource: coreClient.CompositeMapper = { +export const ServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseGetPropertiesResource", + className: "ServiceResource", modelProperties: { - ...SqlDatabaseResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - colls: { - serializedName: "_colls", - type: { - name: "String", - }, - }, - users: { - serializedName: "_users", + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", type: { - name: "String", + name: "Composite", + className: "ServiceResourceProperties", }, }, }, }, }; -export const RestorableSqlDatabasePropertiesResourceDatabase: coreClient.CompositeMapper = +export const PhysicalPartitionThroughputInfoResultPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlDatabasePropertiesResourceDatabase", + className: "PhysicalPartitionThroughputInfoResultPropertiesResource", modelProperties: { - ...SqlDatabaseResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - colls: { - serializedName: "_colls", - readOnly: true, + ...PhysicalPartitionThroughputInfoProperties.type.modelProperties, + }, + }, + }; + +export const BaseCosmosDataTransferDataSourceSink: coreClient.CompositeMapper = + { + serializedName: "BaseCosmosDataTransferDataSourceSink", + type: { + name: "Composite", + className: "BaseCosmosDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: { + serializedName: "component", + clientName: "component", + }, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + remoteAccountName: { + serializedName: "remoteAccountName", type: { name: "String", }, }, - users: { - serializedName: "_users", - readOnly: true, + }, + }, + }; + +export const CosmosMongoVCoreDataTransferDataSourceSink: coreClient.CompositeMapper = + { + serializedName: "CosmosDBMongoVCore", + type: { + name: "Composite", + className: "CosmosMongoVCoreDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, type: { name: "String", }, }, - self: { - serializedName: "_self", - readOnly: true, + collectionName: { + serializedName: "collectionName", + required: true, + type: { + name: "String", + }, + }, + hostName: { + serializedName: "hostName", + type: { + name: "String", + }, + }, + connectionStringKeyVaultUri: { + serializedName: "connectionStringKeyVaultUri", type: { name: "String", }, @@ -7746,167 +10212,270 @@ export const RestorableSqlDatabasePropertiesResourceDatabase: coreClient.Composi }, }; -export const ThroughputSettingsGetPropertiesResource: coreClient.CompositeMapper = - { - type: { - name: "Composite", - className: "ThroughputSettingsGetPropertiesResource", - modelProperties: { - ...ThroughputSettingsResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, +export const AzureBlobDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "AzureBlobStorage", + type: { + name: "Composite", + className: "AzureBlobDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + containerName: { + serializedName: "containerName", + required: true, + type: { + name: "String", + }, + }, + endpointUrl: { + serializedName: "endpointUrl", + type: { + name: "String", + }, }, }, - }; + }, +}; -export const SqlContainerGetPropertiesResource: coreClient.CompositeMapper = { +export const ClusterResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerGetPropertiesResource", + className: "ClusterResource", modelProperties: { - ...SqlContainerResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ManagedCassandraARMResourceProperties.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "ClusterResourceProperties", + }, + }, }, }, }; -export const ClientEncryptionKeyGetPropertiesResource: coreClient.CompositeMapper = +export const DataTransferServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "DataTransfer", type: { name: "Composite", - className: "ClientEncryptionKeyGetPropertiesResource", + className: "DataTransferServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, modelProperties: { - ...ClientEncryptionKeyResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceProperties.type.modelProperties, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataTransferRegionalServiceResource", + }, + }, + }, + }, }, }, }; -export const SqlStoredProcedureGetPropertiesResource: coreClient.CompositeMapper = +export const SqlDedicatedGatewayServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "SqlDedicatedGateway", type: { name: "Composite", - className: "SqlStoredProcedureGetPropertiesResource", + className: "SqlDedicatedGatewayServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, modelProperties: { - ...SqlStoredProcedureResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceProperties.type.modelProperties, + sqlDedicatedGatewayEndpoint: { + serializedName: "sqlDedicatedGatewayEndpoint", + type: { + name: "String", + }, + }, + dedicatedGatewayType: { + serializedName: "dedicatedGatewayType", + type: { + name: "String", + }, + }, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDedicatedGatewayRegionalServiceResource", + }, + }, + }, + }, }, }, }; -export const SqlUserDefinedFunctionGetPropertiesResource: coreClient.CompositeMapper = +export const GraphAPIComputeServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "GraphAPICompute", type: { name: "Composite", - className: "SqlUserDefinedFunctionGetPropertiesResource", + className: "GraphAPIComputeServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + graphApiComputeEndpoint: { + serializedName: "graphApiComputeEndpoint", + type: { + name: "String", + }, + }, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GraphAPIComputeRegionalServiceResource", + }, + }, + }, + }, + }, + }, + }; + +export const MaterializedViewsBuilderServiceResourceProperties: coreClient.CompositeMapper = + { + serializedName: "MaterializedViewsBuilder", + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, modelProperties: { - ...SqlUserDefinedFunctionResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceProperties.type.modelProperties, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaterializedViewsBuilderRegionalServiceResource", + }, + }, + }, + }, }, }, }; -export const SqlTriggerGetPropertiesResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlTriggerGetPropertiesResource", - modelProperties: { - ...SqlTriggerResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - }, - }, -}; - -export const MongoDBDatabaseGetPropertiesResource: coreClient.CompositeMapper = +export const DataTransferServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = { + serializedName: "DataTransfer", type: { name: "Composite", - className: "MongoDBDatabaseGetPropertiesResource", + className: "DataTransferServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, modelProperties: { - ...MongoDBDatabaseResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceCreateUpdateProperties.type.modelProperties, }, }, }; -export const MongoDBCollectionGetPropertiesResource: coreClient.CompositeMapper = +export const SqlDedicatedGatewayServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = { + serializedName: "SqlDedicatedGateway", type: { name: "Composite", - className: "MongoDBCollectionGetPropertiesResource", + className: "SqlDedicatedGatewayServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, modelProperties: { - ...MongoDBCollectionResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceCreateUpdateProperties.type.modelProperties, + dedicatedGatewayType: { + serializedName: "dedicatedGatewayType", + type: { + name: "String", + }, + }, }, }, }; -export const TableGetPropertiesResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TableGetPropertiesResource", - modelProperties: { - ...TableResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - }, - }, -}; - -export const CassandraKeyspaceGetPropertiesResource: coreClient.CompositeMapper = +export const GraphAPIComputeServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = { + serializedName: "GraphAPICompute", type: { name: "Composite", - className: "CassandraKeyspaceGetPropertiesResource", + className: "GraphAPIComputeServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, modelProperties: { - ...CassandraKeyspaceResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceCreateUpdateProperties.type.modelProperties, }, }, }; -export const CassandraTableGetPropertiesResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CassandraTableGetPropertiesResource", - modelProperties: { - ...CassandraTableResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - }, - }, -}; - -export const GremlinDatabaseGetPropertiesResource: coreClient.CompositeMapper = +export const MaterializedViewsBuilderServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = { + serializedName: "MaterializedViewsBuilder", type: { name: "Composite", - className: "GremlinDatabaseGetPropertiesResource", + className: + "MaterializedViewsBuilderServiceResourceCreateUpdateProperties", + uberParent: "ServiceResourceCreateUpdateProperties", + polymorphicDiscriminator: + ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, modelProperties: { - ...GremlinDatabaseResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...ServiceResourceCreateUpdateProperties.type.modelProperties, }, }, }; -export const GremlinGraphGetPropertiesResource: coreClient.CompositeMapper = { +export const DataTransferRegionalServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphGetPropertiesResource", + className: "DataTransferRegionalServiceResource", modelProperties: { - ...GremlinGraphResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, + ...RegionalServiceResource.type.modelProperties, }, }, }; -export const RestorableSqlContainerPropertiesResourceContainer: coreClient.CompositeMapper = +export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlContainerPropertiesResourceContainer", + className: "SqlDedicatedGatewayRegionalServiceResource", modelProperties: { - ...SqlContainerResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - self: { - serializedName: "_self", + ...RegionalServiceResource.type.modelProperties, + sqlDedicatedGatewayEndpoint: { + serializedName: "sqlDedicatedGatewayEndpoint", readOnly: true, type: { name: "String", @@ -7916,216 +10485,139 @@ export const RestorableSqlContainerPropertiesResourceContainer: coreClient.Compo }, }; -export const SqlDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const SqlContainerGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlContainerGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const MongoDBDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MongoDBDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const MongoDBCollectionGetPropertiesOptions: coreClient.CompositeMapper = +export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBCollectionGetPropertiesOptions", + className: "GraphAPIComputeRegionalServiceResource", modelProperties: { - ...OptionsResource.type.modelProperties, + ...RegionalServiceResource.type.modelProperties, + graphApiComputeEndpoint: { + serializedName: "graphApiComputeEndpoint", + readOnly: true, + type: { + name: "String", + }, + }, }, }, }; -export const TableGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TableGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const CassandraKeyspaceGetPropertiesOptions: coreClient.CompositeMapper = +export const MaterializedViewsBuilderRegionalServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraKeyspaceGetPropertiesOptions", + className: "MaterializedViewsBuilderRegionalServiceResource", modelProperties: { - ...OptionsResource.type.modelProperties, + ...RegionalServiceResource.type.modelProperties, }, }, }; -export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CassandraTableGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GremlinDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "GremlinGraphGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties, - }, - }, -}; - -export const ClientEncryptionKeyGetResults: coreClient.CompositeMapper = { +export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClientEncryptionKeyGetResults", + className: "PrivateEndpointConnection", modelProperties: { - ...ARMProxyResource.type.modelProperties, - resource: { - serializedName: "properties.resource", + ...ProxyResource.type.modelProperties, + privateEndpoint: { + serializedName: "properties.privateEndpoint", type: { name: "Composite", - className: "ClientEncryptionKeyGetPropertiesResource", + className: "PrivateEndpointProperty", }, }, - }, - }, -}; - -export const LocationGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LocationGetResult", - modelProperties: { - ...ARMProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", type: { name: "Composite", - className: "LocationProperties", + className: "PrivateLinkServiceConnectionStateProperty", }, }, - }, - }, -}; - -export const DataCenterResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataCenterResource", - modelProperties: { - ...ARMProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + groupId: { + serializedName: "properties.groupId", + type: { + name: "String", + }, + }, + provisioningState: { + serializedName: "properties.provisioningState", type: { - name: "Composite", - className: "DataCenterResourceProperties", + name: "String", }, }, }, }, }; -export const MongoRoleDefinitionGetResults: coreClient.CompositeMapper = { +export const NetworkSecurityPerimeterConfiguration: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfiguration", + modelProperties: { + ...ProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationProperties", + }, + }, + }, + }, + }; + +export const ThroughputPoolAccountResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoRoleDefinitionGetResults", + className: "ThroughputPoolAccountResource", modelProperties: { - ...ARMProxyResource.type.modelProperties, - roleName: { - serializedName: "properties.roleName", + ...ProxyResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String", }, }, - typePropertiesType: { - serializedName: "properties.type", - type: { - name: "Enum", - allowedValues: ["BuiltInRole", "CustomRole"], - }, - }, - databaseName: { - serializedName: "properties.databaseName", + accountResourceIdentifier: { + serializedName: "properties.accountResourceIdentifier", type: { name: "String", }, }, - privileges: { - serializedName: "properties.privileges", + accountLocation: { + serializedName: "properties.accountLocation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Privilege", - }, - }, + name: "String", }, }, - roles: { - serializedName: "properties.roles", + accountInstanceId: { + serializedName: "properties.accountInstanceId", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Role", - }, - }, + name: "String", }, }, }, }, }; -export const MongoUserDefinitionGetResults: coreClient.CompositeMapper = { +export const ChaosFaultResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoUserDefinitionGetResults", + className: "ChaosFaultResource", modelProperties: { - ...ARMProxyResource.type.modelProperties, - userName: { - serializedName: "properties.userName", + ...ProxyResource.type.modelProperties, + action: { + serializedName: "properties.action", type: { - name: "String", + name: "Enum", + allowedValues: ["Enable", "Disable"], }, }, - password: { - serializedName: "properties.password", + region: { + serializedName: "properties.region", type: { name: "String", }, @@ -8136,26 +10628,15 @@ export const MongoUserDefinitionGetResults: coreClient.CompositeMapper = { name: "String", }, }, - customData: { - serializedName: "properties.customData", + containerName: { + serializedName: "properties.containerName", type: { name: "String", }, }, - roles: { - serializedName: "properties.roles", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Role", - }, - }, - }, - }, - mechanisms: { - serializedName: "properties.mechanisms", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String", }, @@ -8164,148 +10645,192 @@ export const MongoUserDefinitionGetResults: coreClient.CompositeMapper = { }, }; -export const NotebookWorkspace: coreClient.CompositeMapper = { +export const ThroughputPoolResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspace", + className: "ThroughputPoolResource", modelProperties: { - ...ARMProxyResource.type.modelProperties, - notebookServerEndpoint: { - serializedName: "properties.notebookServerEndpoint", - readOnly: true, + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String", }, }, - status: { - serializedName: "properties.status", - readOnly: true, + maxThroughput: { + serializedName: "properties.maxThroughput", type: { - name: "String", + name: "Number", }, }, }, }, }; -export const NotebookWorkspaceCreateUpdateParameters: coreClient.CompositeMapper = +export const CosmosCassandraDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBCassandra", type: { name: "Composite", - className: "NotebookWorkspaceCreateUpdateParameters", + className: "CosmosCassandraDataTransferDataSourceSink", + uberParent: "BaseCosmosDataTransferDataSourceSink", + polymorphicDiscriminator: + BaseCosmosDataTransferDataSourceSink.type.polymorphicDiscriminator, modelProperties: { - ...ARMProxyResource.type.modelProperties, + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, + keyspaceName: { + serializedName: "keyspaceName", + required: true, + type: { + name: "String", + }, + }, + tableName: { + serializedName: "tableName", + required: true, + type: { + name: "String", + }, + }, }, }, }; -export const PrivateLinkResource: coreClient.CompositeMapper = { +export const CosmosMongoDataTransferDataSourceSink: coreClient.CompositeMapper = + { + serializedName: "CosmosDBMongo", + type: { + name: "Composite", + className: "CosmosMongoDataTransferDataSourceSink", + uberParent: "BaseCosmosDataTransferDataSourceSink", + polymorphicDiscriminator: + BaseCosmosDataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, + type: { + name: "String", + }, + }, + collectionName: { + serializedName: "collectionName", + required: true, + type: { + name: "String", + }, + }, + }, + }, + }; + +export const CosmosSqlDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBSql", type: { name: "Composite", - className: "PrivateLinkResource", + className: "CosmosSqlDataTransferDataSourceSink", + uberParent: "BaseCosmosDataTransferDataSourceSink", + polymorphicDiscriminator: + BaseCosmosDataTransferDataSourceSink.type.polymorphicDiscriminator, modelProperties: { - ...ARMProxyResource.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - readOnly: true, + ...BaseCosmosDataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, type: { name: "String", }, }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, - }, - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - readOnly: true, + containerName: { + serializedName: "containerName", + required: true, type: { - name: "Sequence", - element: { - type: { - name: "String", - }, - }, + name: "String", }, }, }, }, }; -export const SqlRoleDefinitionGetResults: coreClient.CompositeMapper = { +export const DatabaseAccountsDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlRoleDefinitionGetResults", + className: "DatabaseAccountsDeleteHeaders", modelProperties: { - ...ARMProxyResource.type.modelProperties, - roleName: { - serializedName: "properties.roleName", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String", }, }, - typePropertiesType: { - serializedName: "properties.type", + location: { + serializedName: "location", type: { - name: "Enum", - allowedValues: ["BuiltInRole", "CustomRole"], + name: "String", }, }, - assignableScopes: { - serializedName: "properties.assignableScopes", - type: { - name: "Sequence", - element: { - type: { - name: "String", - }, + }, + }, +}; + +export const DatabaseAccountsFailoverPriorityChangeHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountsFailoverPriorityChangeHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", }, }, - }, - permissions: { - serializedName: "properties.permissions", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Permission", - }, + location: { + serializedName: "location", + type: { + name: "String", }, }, }, }, - }, -}; + }; -export const SqlRoleAssignmentGetResults: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlRoleAssignmentGetResults", - modelProperties: { - ...ARMProxyResource.type.modelProperties, - roleDefinitionId: { - serializedName: "properties.roleDefinitionId", - type: { - name: "String", +export const DatabaseAccountsOfflineRegionHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountsOfflineRegionHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, - scope: { - serializedName: "properties.scope", + }, + }; + +export const DatabaseAccountsOnlineRegionHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DatabaseAccountsOnlineRegionHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String", }, }, - principalId: { - serializedName: "properties.principalId", + location: { + serializedName: "location", type: { name: "String", }, @@ -8314,202 +10839,218 @@ export const SqlRoleAssignmentGetResults: coreClient.CompositeMapper = { }, }; -export const ServiceResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ServiceResource", - modelProperties: { - ...ARMProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ServiceResourceProperties", +export const DatabaseAccountsRegenerateKeyHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "DatabaseAccountsRegenerateKeyHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const ClusterResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterResource", - modelProperties: { - ...ManagedCassandraARMResourceProperties.type.modelProperties, - properties: { - serializedName: "properties", - type: { - name: "Composite", - className: "ClusterResourceProperties", +export const GraphResourcesCreateUpdateGraphHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "GraphResourcesCreateUpdateGraphHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const DataTransferServiceResourceProperties: coreClient.CompositeMapper = +export const GraphResourcesDeleteGraphResourceHeaders: coreClient.CompositeMapper = { - serializedName: "DataTransfer", type: { name: "Composite", - className: "DataTransferServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + className: "GraphResourcesDeleteGraphResourceHeaders", modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - locations: { - serializedName: "locations", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataTransferRegionalServiceResource", - }, - }, + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", }, }, }, }, }; -export const SqlDedicatedGatewayServiceResourceProperties: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateSqlDatabaseHeaders: coreClient.CompositeMapper = { - serializedName: "SqlDedicatedGateway", type: { name: "Composite", - className: "SqlDedicatedGatewayServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + className: "SqlResourcesCreateUpdateSqlDatabaseHeaders", modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - sqlDedicatedGatewayEndpoint: { - serializedName: "sqlDedicatedGatewayEndpoint", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String", }, }, - dedicatedGatewayType: { - serializedName: "dedicatedGatewayType", + location: { + serializedName: "location", type: { name: "String", }, }, - locations: { - serializedName: "locations", - readOnly: true, + }, + }, + }; + +export const SqlResourcesDeleteSqlDatabaseHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesDeleteSqlDatabaseHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SqlDedicatedGatewayRegionalServiceResource", - }, - }, + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", }, }, }, }, }; -export const GraphAPIComputeServiceResourceProperties: coreClient.CompositeMapper = +export const SqlResourcesUpdateSqlDatabaseThroughputHeaders: coreClient.CompositeMapper = { - serializedName: "GraphAPICompute", type: { name: "Composite", - className: "GraphAPIComputeServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + className: "SqlResourcesUpdateSqlDatabaseThroughputHeaders", modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - graphApiComputeEndpoint: { - serializedName: "graphApiComputeEndpoint", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { name: "String", }, }, - locations: { - serializedName: "locations", - readOnly: true, + location: { + serializedName: "location", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "GraphAPIComputeRegionalServiceResource", - }, - }, + name: "String", }, }, }, }, }; -export const MaterializedViewsBuilderServiceResourceProperties: coreClient.CompositeMapper = +export const SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = { - serializedName: "MaterializedViewsBuilder", type: { name: "Composite", - className: "MaterializedViewsBuilderServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: - ServiceResourceProperties.type.polymorphicDiscriminator, + className: "SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders", modelProperties: { - ...ServiceResourceProperties.type.modelProperties, - locations: { - serializedName: "locations", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "MaterializedViewsBuilderRegionalServiceResource", - }, - }, + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", }, }, }, }, }; -export const DataTransferServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = { - serializedName: "DataTransfer", type: { name: "Composite", - className: "DataTransferServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, }, }, }; -export const SqlDedicatedGatewayServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateClientEncryptionKeyHeaders: coreClient.CompositeMapper = { - serializedName: "SqlDedicatedGateway", type: { name: "Composite", - className: "SqlDedicatedGatewayServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesCreateUpdateClientEncryptionKeyHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, - dedicatedGatewayType: { - serializedName: "dedicatedGatewayType", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const SqlResourcesCreateUpdateSqlContainerHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesCreateUpdateSqlContainerHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { name: "String", }, @@ -8518,57 +11059,64 @@ export const SqlDedicatedGatewayServiceResourceCreateUpdateProperties: coreClien }, }; -export const GraphAPIComputeServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesDeleteSqlContainerHeaders: coreClient.CompositeMapper = { - serializedName: "GraphAPICompute", type: { name: "Composite", - className: "GraphAPIComputeServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesDeleteSqlContainerHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, }, }, }; -export const MaterializedViewsBuilderServiceResourceCreateUpdateProperties: coreClient.CompositeMapper = +export const SqlResourcesSqlDatabasePartitionMergeHeaders: coreClient.CompositeMapper = { - serializedName: "MaterializedViewsBuilder", type: { name: "Composite", - className: - "MaterializedViewsBuilderServiceResourceCreateUpdateProperties", - uberParent: "ServiceResourceCreateUpdateProperties", - polymorphicDiscriminator: - ServiceResourceCreateUpdateProperties.type.polymorphicDiscriminator, + className: "SqlResourcesSqlDatabasePartitionMergeHeaders", modelProperties: { - ...ServiceResourceCreateUpdateProperties.type.modelProperties, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, }, }, }; -export const DataTransferRegionalServiceResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataTransferRegionalServiceResource", - modelProperties: { - ...RegionalServiceResource.type.modelProperties, - }, - }, -}; - -export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMapper = +export const SqlResourcesListSqlContainerPartitionMergeHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDedicatedGatewayRegionalServiceResource", + className: "SqlResourcesListSqlContainerPartitionMergeHeaders", modelProperties: { - ...RegionalServiceResource.type.modelProperties, - sqlDedicatedGatewayEndpoint: { - serializedName: "sqlDedicatedGatewayEndpoint", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { name: "String", }, @@ -8577,16 +11125,20 @@ export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMap }, }; -export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper = +export const SqlResourcesUpdateSqlContainerThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GraphAPIComputeRegionalServiceResource", + className: "SqlResourcesUpdateSqlContainerThroughputHeaders", modelProperties: { - ...RegionalServiceResource.type.modelProperties, - graphApiComputeEndpoint: { - serializedName: "graphApiComputeEndpoint", - readOnly: true, + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", type: { name: "String", }, @@ -8595,79 +11147,55 @@ export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper }, }; -export const MaterializedViewsBuilderRegionalServiceResource: coreClient.CompositeMapper = +export const SqlResourcesMigrateSqlContainerToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MaterializedViewsBuilderRegionalServiceResource", + className: "SqlResourcesMigrateSqlContainerToAutoscaleHeaders", modelProperties: { - ...RegionalServiceResource.type.modelProperties, - }, - }, - }; - -export const PrivateEndpointConnection: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateEndpointConnection", - modelProperties: { - ...ProxyResource.type.modelProperties, - privateEndpoint: { - serializedName: "properties.privateEndpoint", - type: { - name: "Composite", - className: "PrivateEndpointProperty", - }, - }, - privateLinkServiceConnectionState: { - serializedName: "properties.privateLinkServiceConnectionState", - type: { - name: "Composite", - className: "PrivateLinkServiceConnectionStateProperty", - }, - }, - groupId: { - serializedName: "properties.groupId", - type: { - name: "String", + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, }, - }, - provisioningState: { - serializedName: "properties.provisioningState", - type: { - name: "String", + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const DatabaseAccountsDeleteHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseAccountsDeleteHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", +export const SqlResourcesMigrateSqlContainerToManualThroughputHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "SqlResourcesMigrateSqlContainerToManualThroughputHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, }, - }, - location: { - serializedName: "location", - type: { - name: "String", + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const DatabaseAccountsFailoverPriorityChangeHeaders: coreClient.CompositeMapper = +export const SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsFailoverPriorityChangeHeaders", + className: "SqlResourcesSqlDatabaseRetrieveThroughputDistributionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8685,11 +11213,11 @@ export const DatabaseAccountsFailoverPriorityChangeHeaders: coreClient.Composite }, }; -export const DatabaseAccountsOfflineRegionHeaders: coreClient.CompositeMapper = +export const SqlResourcesSqlDatabaseRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsOfflineRegionHeaders", + className: "SqlResourcesSqlDatabaseRedistributeThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8707,32 +11235,34 @@ export const DatabaseAccountsOfflineRegionHeaders: coreClient.CompositeMapper = }, }; -export const DatabaseAccountsOnlineRegionHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DatabaseAccountsOnlineRegionHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", +export const SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: + "SqlResourcesSqlContainerRetrieveThroughputDistributionHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, }, - }, - location: { - serializedName: "location", - type: { - name: "String", + location: { + serializedName: "location", + type: { + name: "String", + }, }, }, }, - }, -}; + }; -export const DatabaseAccountsRegenerateKeyHeaders: coreClient.CompositeMapper = +export const SqlResourcesSqlContainerRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseAccountsRegenerateKeyHeaders", + className: "SqlResourcesSqlContainerRedistributeThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8750,11 +11280,11 @@ export const DatabaseAccountsRegenerateKeyHeaders: coreClient.CompositeMapper = }, }; -export const SqlResourcesCreateUpdateSqlDatabaseHeaders: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateSqlStoredProcedureHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlDatabaseHeaders", + className: "SqlResourcesCreateUpdateSqlStoredProcedureHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8772,11 +11302,11 @@ export const SqlResourcesCreateUpdateSqlDatabaseHeaders: coreClient.CompositeMap }, }; -export const SqlResourcesDeleteSqlDatabaseHeaders: coreClient.CompositeMapper = +export const SqlResourcesDeleteSqlStoredProcedureHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlDatabaseHeaders", + className: "SqlResourcesDeleteSqlStoredProcedureHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8794,11 +11324,11 @@ export const SqlResourcesDeleteSqlDatabaseHeaders: coreClient.CompositeMapper = }, }; -export const SqlResourcesUpdateSqlDatabaseThroughputHeaders: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesUpdateSqlDatabaseThroughputHeaders", + className: "SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8816,11 +11346,11 @@ export const SqlResourcesUpdateSqlDatabaseThroughputHeaders: coreClient.Composit }, }; -export const SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = +export const SqlResourcesDeleteSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders", + className: "SqlResourcesDeleteSqlUserDefinedFunctionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8838,11 +11368,11 @@ export const SqlResourcesMigrateSqlDatabaseToAutoscaleHeaders: coreClient.Compos }, }; -export const SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = +export const SqlResourcesCreateUpdateSqlTriggerHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders", + className: "SqlResourcesCreateUpdateSqlTriggerHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8860,11 +11390,32 @@ export const SqlResourcesMigrateSqlDatabaseToManualThroughputHeaders: coreClient }, }; -export const SqlResourcesCreateUpdateSqlContainerHeaders: coreClient.CompositeMapper = +export const SqlResourcesDeleteSqlTriggerHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlResourcesDeleteSqlTriggerHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlContainerHeaders", + className: "MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8882,11 +11433,11 @@ export const SqlResourcesCreateUpdateSqlContainerHeaders: coreClient.CompositeMa }, }; -export const SqlResourcesDeleteSqlContainerHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesDeleteMongoDBDatabaseHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlContainerHeaders", + className: "MongoDBResourcesDeleteMongoDBDatabaseHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8904,11 +11455,11 @@ export const SqlResourcesDeleteSqlContainerHeaders: coreClient.CompositeMapper = }, }; -export const SqlResourcesUpdateSqlContainerThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesUpdateSqlContainerThroughputHeaders", + className: "MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8926,11 +11477,11 @@ export const SqlResourcesUpdateSqlContainerThroughputHeaders: coreClient.Composi }, }; -export const SqlResourcesMigrateSqlContainerToAutoscaleHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlContainerToAutoscaleHeaders", + className: "MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8948,11 +11499,12 @@ export const SqlResourcesMigrateSqlContainerToAutoscaleHeaders: coreClient.Compo }, }; -export const SqlResourcesMigrateSqlContainerToManualThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesMigrateSqlContainerToManualThroughputHeaders", + className: + "MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8970,11 +11522,12 @@ export const SqlResourcesMigrateSqlContainerToManualThroughputHeaders: coreClien }, }; -export const SqlResourcesCreateUpdateClientEncryptionKeyHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateClientEncryptionKeyHeaders", + className: + "MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -8992,11 +11545,11 @@ export const SqlResourcesCreateUpdateClientEncryptionKeyHeaders: coreClient.Comp }, }; -export const SqlResourcesCreateUpdateSqlStoredProcedureHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlStoredProcedureHeaders", + className: "MongoDBResourcesMongoDBDatabaseRedistributeThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9014,11 +11567,12 @@ export const SqlResourcesCreateUpdateSqlStoredProcedureHeaders: coreClient.Compo }, }; -export const SqlResourcesDeleteSqlStoredProcedureHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlStoredProcedureHeaders", + className: + "MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9036,11 +11590,12 @@ export const SqlResourcesDeleteSqlStoredProcedureHeaders: coreClient.CompositeMa }, }; -export const SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders", + className: + "MongoDBResourcesMongoDBContainerRedistributeThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9058,11 +11613,11 @@ export const SqlResourcesCreateUpdateSqlUserDefinedFunctionHeaders: coreClient.C }, }; -export const SqlResourcesDeleteSqlUserDefinedFunctionHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesCreateUpdateMongoDBCollectionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesDeleteSqlUserDefinedFunctionHeaders", + className: "MongoDBResourcesCreateUpdateMongoDBCollectionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9080,11 +11635,11 @@ export const SqlResourcesDeleteSqlUserDefinedFunctionHeaders: coreClient.Composi }, }; -export const SqlResourcesCreateUpdateSqlTriggerHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesDeleteMongoDBCollectionHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlResourcesCreateUpdateSqlTriggerHeaders", + className: "MongoDBResourcesDeleteMongoDBCollectionHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9102,32 +11657,11 @@ export const SqlResourcesCreateUpdateSqlTriggerHeaders: coreClient.CompositeMapp }, }; -export const SqlResourcesDeleteSqlTriggerHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlResourcesDeleteSqlTriggerHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMongoDBDatabasePartitionMergeHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders", + className: "MongoDBResourcesMongoDBDatabasePartitionMergeHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9145,11 +11679,11 @@ export const MongoDBResourcesCreateUpdateMongoDBDatabaseHeaders: coreClient.Comp }, }; -export const MongoDBResourcesDeleteMongoDBDatabaseHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesDeleteMongoDBDatabaseHeaders", + className: "MongoDBResourcesListMongoDBCollectionPartitionMergeHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9167,11 +11701,11 @@ export const MongoDBResourcesDeleteMongoDBDatabaseHeaders: coreClient.CompositeM }, }; -export const MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders", + className: "MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9189,11 +11723,11 @@ export const MongoDBResourcesUpdateMongoDBDatabaseThroughputHeaders: coreClient. }, }; -export const MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders", + className: "MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9211,12 +11745,12 @@ export const MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleHeaders: coreClien }, }; -export const MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders: coreClient.CompositeMapper = +export const MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", className: - "MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders", + "MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9234,11 +11768,11 @@ export const MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputHeaders: co }, }; -export const MongoDBResourcesCreateUpdateMongoDBCollectionHeaders: coreClient.CompositeMapper = +export const TableResourcesCreateUpdateTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesCreateUpdateMongoDBCollectionHeaders", + className: "TableResourcesCreateUpdateTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9256,11 +11790,32 @@ export const MongoDBResourcesCreateUpdateMongoDBCollectionHeaders: coreClient.Co }, }; -export const MongoDBResourcesDeleteMongoDBCollectionHeaders: coreClient.CompositeMapper = +export const TableResourcesDeleteTableHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableResourcesDeleteTableHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const TableResourcesUpdateTableThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesDeleteMongoDBCollectionHeaders", + className: "TableResourcesUpdateTableThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9278,11 +11833,11 @@ export const MongoDBResourcesDeleteMongoDBCollectionHeaders: coreClient.Composit }, }; -export const MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders: coreClient.CompositeMapper = +export const TableResourcesMigrateTableToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders", + className: "TableResourcesMigrateTableToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9300,11 +11855,11 @@ export const MongoDBResourcesUpdateMongoDBCollectionThroughputHeaders: coreClien }, }; -export const MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders: coreClient.CompositeMapper = +export const TableResourcesMigrateTableToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders", + className: "TableResourcesMigrateTableToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9322,12 +11877,11 @@ export const MongoDBResourcesMigrateMongoDBCollectionToAutoscaleHeaders: coreCli }, }; -export const MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesCreateUpdateCassandraKeyspaceHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders", + className: "CassandraResourcesCreateUpdateCassandraKeyspaceHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9345,11 +11899,11 @@ export const MongoDBResourcesMigrateMongoDBCollectionToManualThroughputHeaders: }, }; -export const TableResourcesCreateUpdateTableHeaders: coreClient.CompositeMapper = +export const CassandraResourcesDeleteCassandraKeyspaceHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesCreateUpdateTableHeaders", + className: "CassandraResourcesDeleteCassandraKeyspaceHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9367,32 +11921,11 @@ export const TableResourcesCreateUpdateTableHeaders: coreClient.CompositeMapper }, }; -export const TableResourcesDeleteTableHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TableResourcesDeleteTableHeaders", - modelProperties: { - azureAsyncOperation: { - serializedName: "azure-asyncoperation", - type: { - name: "String", - }, - }, - location: { - serializedName: "location", - type: { - name: "String", - }, - }, - }, - }, -}; - -export const TableResourcesUpdateTableThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesUpdateTableThroughputHeaders", + className: "CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9410,11 +11943,11 @@ export const TableResourcesUpdateTableThroughputHeaders: coreClient.CompositeMap }, }; -export const TableResourcesMigrateTableToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesMigrateTableToAutoscaleHeaders", + className: "CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9432,11 +11965,12 @@ export const TableResourcesMigrateTableToAutoscaleHeaders: coreClient.CompositeM }, }; -export const TableResourcesMigrateTableToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableResourcesMigrateTableToManualThroughputHeaders", + className: + "CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9454,11 +11988,11 @@ export const TableResourcesMigrateTableToManualThroughputHeaders: coreClient.Com }, }; -export const CassandraResourcesCreateUpdateCassandraKeyspaceHeaders: coreClient.CompositeMapper = +export const CassandraResourcesCreateUpdateCassandraTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesCreateUpdateCassandraKeyspaceHeaders", + className: "CassandraResourcesCreateUpdateCassandraTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9476,11 +12010,11 @@ export const CassandraResourcesCreateUpdateCassandraKeyspaceHeaders: coreClient. }, }; -export const CassandraResourcesDeleteCassandraKeyspaceHeaders: coreClient.CompositeMapper = +export const CassandraResourcesDeleteCassandraTableHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesDeleteCassandraKeyspaceHeaders", + className: "CassandraResourcesDeleteCassandraTableHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9498,11 +12032,11 @@ export const CassandraResourcesDeleteCassandraKeyspaceHeaders: coreClient.Compos }, }; -export const CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesUpdateCassandraTableThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders", + className: "CassandraResourcesUpdateCassandraTableThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9520,11 +12054,11 @@ export const CassandraResourcesUpdateCassandraKeyspaceThroughputHeaders: coreCli }, }; -export const CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraTableToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders", + className: "CassandraResourcesMigrateCassandraTableToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9542,12 +12076,12 @@ export const CassandraResourcesMigrateCassandraKeyspaceToAutoscaleHeaders: coreC }, }; -export const CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraTableToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", className: - "CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders", + "CassandraResourcesMigrateCassandraTableToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9565,11 +12099,11 @@ export const CassandraResourcesMigrateCassandraKeyspaceToManualThroughputHeaders }, }; -export const CassandraResourcesCreateUpdateCassandraTableHeaders: coreClient.CompositeMapper = +export const CassandraResourcesCreateUpdateCassandraViewHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesCreateUpdateCassandraTableHeaders", + className: "CassandraResourcesCreateUpdateCassandraViewHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9587,11 +12121,11 @@ export const CassandraResourcesCreateUpdateCassandraTableHeaders: coreClient.Com }, }; -export const CassandraResourcesDeleteCassandraTableHeaders: coreClient.CompositeMapper = +export const CassandraResourcesDeleteCassandraViewHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesDeleteCassandraTableHeaders", + className: "CassandraResourcesDeleteCassandraViewHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9609,11 +12143,11 @@ export const CassandraResourcesDeleteCassandraTableHeaders: coreClient.Composite }, }; -export const CassandraResourcesUpdateCassandraTableThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesUpdateCassandraViewThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesUpdateCassandraTableThroughputHeaders", + className: "CassandraResourcesUpdateCassandraViewThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9631,11 +12165,11 @@ export const CassandraResourcesUpdateCassandraTableThroughputHeaders: coreClient }, }; -export const CassandraResourcesMigrateCassandraTableToAutoscaleHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraViewToAutoscaleHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraResourcesMigrateCassandraTableToAutoscaleHeaders", + className: "CassandraResourcesMigrateCassandraViewToAutoscaleHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9653,12 +12187,12 @@ export const CassandraResourcesMigrateCassandraTableToAutoscaleHeaders: coreClie }, }; -export const CassandraResourcesMigrateCassandraTableToManualThroughputHeaders: coreClient.CompositeMapper = +export const CassandraResourcesMigrateCassandraViewToManualThroughputHeaders: coreClient.CompositeMapper = { type: { name: "Composite", className: - "CassandraResourcesMigrateCassandraTableToManualThroughputHeaders", + "CassandraResourcesMigrateCassandraViewToManualThroughputHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9897,10 +12431,48 @@ export const GremlinResourcesMigrateGremlinGraphToManualThroughputHeaders: coreC }, }; -export const ServiceCreateHeaders: coreClient.CompositeMapper = { +export const CassandraClustersInvokeCommandAsyncHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "CassandraClustersInvokeCommandAsyncHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const NetworkSecurityPerimeterConfigurationsReconcileHeaders: coreClient.CompositeMapper = + { + type: { + name: "Composite", + className: "NetworkSecurityPerimeterConfigurationsReconcileHeaders", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, + }; + +export const ServiceDeleteHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceCreateHeaders", + className: "ServiceDeleteHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9918,10 +12490,52 @@ export const ServiceCreateHeaders: coreClient.CompositeMapper = { }, }; -export const ServiceDeleteHeaders: coreClient.CompositeMapper = { +export const ThroughputPoolUpdateHeaders: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceDeleteHeaders", + className: "ThroughputPoolUpdateHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ThroughputPoolDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolDeleteHeaders", + modelProperties: { + azureAsyncOperation: { + serializedName: "azure-asyncoperation", + type: { + name: "String", + }, + }, + location: { + serializedName: "location", + type: { + name: "String", + }, + }, + }, + }, +}; + +export const ThroughputPoolAccountDeleteHeaders: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputPoolAccountDeleteHeaders", modelProperties: { azureAsyncOperation: { serializedName: "azure-asyncoperation", @@ -9941,10 +12555,17 @@ export const ServiceDeleteHeaders: coreClient.CompositeMapper = { export let discriminators = { BackupPolicy: BackupPolicy, + DataTransferDataSourceSink: DataTransferDataSourceSink, ServiceResourceProperties: ServiceResourceProperties, ServiceResourceCreateUpdateProperties: ServiceResourceCreateUpdateProperties, "BackupPolicy.Periodic": PeriodicModeBackupPolicy, "BackupPolicy.Continuous": ContinuousModeBackupPolicy, + "DataTransferDataSourceSink.BaseCosmosDataTransferDataSourceSink": + BaseCosmosDataTransferDataSourceSink, + "DataTransferDataSourceSink.CosmosDBMongoVCore": + CosmosMongoVCoreDataTransferDataSourceSink, + "DataTransferDataSourceSink.AzureBlobStorage": + AzureBlobDataTransferDataSourceSink, "ServiceResourceProperties.DataTransfer": DataTransferServiceResourceProperties, "ServiceResourceProperties.SqlDedicatedGateway": @@ -9961,4 +12582,10 @@ export let discriminators = { GraphAPIComputeServiceResourceCreateUpdateProperties, "ServiceResourceCreateUpdateProperties.MaterializedViewsBuilder": MaterializedViewsBuilderServiceResourceCreateUpdateProperties, + "BaseCosmosDataTransferDataSourceSink.CosmosDBCassandra": + CosmosCassandraDataTransferDataSourceSink, + "BaseCosmosDataTransferDataSourceSink.CosmosDBMongo": + CosmosMongoDataTransferDataSourceSink, + "BaseCosmosDataTransferDataSourceSink.CosmosDBSql": + CosmosSqlDataTransferDataSourceSink, }; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index d554d121614d..5c4c2eafd00b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -17,10 +17,14 @@ import { FailoverPolicies as FailoverPoliciesMapper, RegionForOnlineOffline as RegionForOnlineOfflineMapper, DatabaseAccountRegenerateKeyParameters as DatabaseAccountRegenerateKeyParametersMapper, + GraphResourceCreateUpdateParameters as GraphResourceCreateUpdateParametersMapper, SqlDatabaseCreateUpdateParameters as SqlDatabaseCreateUpdateParametersMapper, ThroughputSettingsUpdateParameters as ThroughputSettingsUpdateParametersMapper, - SqlContainerCreateUpdateParameters as SqlContainerCreateUpdateParametersMapper, ClientEncryptionKeyCreateUpdateParameters as ClientEncryptionKeyCreateUpdateParametersMapper, + SqlContainerCreateUpdateParameters as SqlContainerCreateUpdateParametersMapper, + MergeParameters as MergeParametersMapper, + RetrieveThroughputParameters as RetrieveThroughputParametersMapper, + RedistributeThroughputParameters as RedistributeThroughputParametersMapper, SqlStoredProcedureCreateUpdateParameters as SqlStoredProcedureCreateUpdateParametersMapper, SqlUserDefinedFunctionCreateUpdateParameters as SqlUserDefinedFunctionCreateUpdateParametersMapper, SqlTriggerCreateUpdateParameters as SqlTriggerCreateUpdateParametersMapper, @@ -34,14 +38,20 @@ import { TableCreateUpdateParameters as TableCreateUpdateParametersMapper, CassandraKeyspaceCreateUpdateParameters as CassandraKeyspaceCreateUpdateParametersMapper, CassandraTableCreateUpdateParameters as CassandraTableCreateUpdateParametersMapper, + CassandraViewCreateUpdateParameters as CassandraViewCreateUpdateParametersMapper, GremlinDatabaseCreateUpdateParameters as GremlinDatabaseCreateUpdateParametersMapper, GremlinGraphCreateUpdateParameters as GremlinGraphCreateUpdateParametersMapper, + CreateJobRequest as CreateJobRequestMapper, ClusterResource as ClusterResourceMapper, CommandPostBody as CommandPostBodyMapper, DataCenterResource as DataCenterResourceMapper, NotebookWorkspaceCreateUpdateParameters as NotebookWorkspaceCreateUpdateParametersMapper, PrivateEndpointConnection as PrivateEndpointConnectionMapper, ServiceResourceCreateUpdateParameters as ServiceResourceCreateUpdateParametersMapper, + ThroughputPoolResource as ThroughputPoolResourceMapper, + ThroughputPoolUpdate as ThroughputPoolUpdateMapper, + ThroughputPoolAccountResource as ThroughputPoolAccountResourceMapper, + ChaosFaultResource as ChaosFaultResourceMapper, } from "../models/mappers"; export const accept: OperationParameter = { @@ -116,7 +126,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-05-15", + defaultValue: "2024-09-01-preview", isConstant: true, serializedName: "api-version", type: { @@ -266,6 +276,22 @@ export const partitionKeyRangeId: OperationURLParameter = { }, }; +export const graphName: OperationURLParameter = { + parameterPath: "graphName", + mapper: { + serializedName: "graphName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const createUpdateGraphParameters: OperationParameter = { + parameterPath: "createUpdateGraphParameters", + mapper: GraphResourceCreateUpdateParametersMapper, +}; + export const databaseName: OperationURLParameter = { parameterPath: "databaseName", mapper: { @@ -287,10 +313,10 @@ export const updateThroughputParameters: OperationParameter = { mapper: ThroughputSettingsUpdateParametersMapper, }; -export const containerName: OperationURLParameter = { - parameterPath: "containerName", +export const clientEncryptionKeyName: OperationURLParameter = { + parameterPath: "clientEncryptionKeyName", mapper: { - serializedName: "containerName", + serializedName: "clientEncryptionKeyName", required: true, type: { name: "String", @@ -298,15 +324,15 @@ export const containerName: OperationURLParameter = { }, }; -export const createUpdateSqlContainerParameters: OperationParameter = { - parameterPath: "createUpdateSqlContainerParameters", - mapper: SqlContainerCreateUpdateParametersMapper, +export const createUpdateClientEncryptionKeyParameters: OperationParameter = { + parameterPath: "createUpdateClientEncryptionKeyParameters", + mapper: ClientEncryptionKeyCreateUpdateParametersMapper, }; -export const clientEncryptionKeyName: OperationURLParameter = { - parameterPath: "clientEncryptionKeyName", +export const containerName: OperationURLParameter = { + parameterPath: "containerName", mapper: { - serializedName: "clientEncryptionKeyName", + serializedName: "containerName", required: true, type: { name: "String", @@ -314,9 +340,24 @@ export const clientEncryptionKeyName: OperationURLParameter = { }, }; -export const createUpdateClientEncryptionKeyParameters: OperationParameter = { - parameterPath: "createUpdateClientEncryptionKeyParameters", - mapper: ClientEncryptionKeyCreateUpdateParametersMapper, +export const createUpdateSqlContainerParameters: OperationParameter = { + parameterPath: "createUpdateSqlContainerParameters", + mapper: SqlContainerCreateUpdateParametersMapper, +}; + +export const mergeParameters: OperationParameter = { + parameterPath: "mergeParameters", + mapper: MergeParametersMapper, +}; + +export const retrieveThroughputParameters: OperationParameter = { + parameterPath: "retrieveThroughputParameters", + mapper: RetrieveThroughputParametersMapper, +}; + +export const redistributeThroughputParameters: OperationParameter = { + parameterPath: "redistributeThroughputParameters", + mapper: RedistributeThroughputParametersMapper, }; export const storedProcedureName: OperationURLParameter = { @@ -495,15 +536,10 @@ export const createUpdateCassandraTableParameters: OperationParameter = { mapper: CassandraTableCreateUpdateParametersMapper, }; -export const createUpdateGremlinDatabaseParameters: OperationParameter = { - parameterPath: "createUpdateGremlinDatabaseParameters", - mapper: GremlinDatabaseCreateUpdateParametersMapper, -}; - -export const graphName: OperationURLParameter = { - parameterPath: "graphName", +export const viewName: OperationURLParameter = { + parameterPath: "viewName", mapper: { - serializedName: "graphName", + serializedName: "viewName", required: true, type: { name: "String", @@ -511,6 +547,16 @@ export const graphName: OperationURLParameter = { }, }; +export const createUpdateCassandraViewParameters: OperationParameter = { + parameterPath: "createUpdateCassandraViewParameters", + mapper: CassandraViewCreateUpdateParametersMapper, +}; + +export const createUpdateGremlinDatabaseParameters: OperationParameter = { + parameterPath: "createUpdateGremlinDatabaseParameters", + mapper: GremlinDatabaseCreateUpdateParametersMapper, +}; + export const createUpdateGremlinGraphParameters: OperationParameter = { parameterPath: "createUpdateGremlinGraphParameters", mapper: GremlinGraphCreateUpdateParametersMapper, @@ -527,6 +573,22 @@ export const location1: OperationURLParameter = { }, }; +export const jobCreateParameters: OperationParameter = { + parameterPath: "jobCreateParameters", + mapper: CreateJobRequestMapper, +}; + +export const jobName: OperationURLParameter = { + parameterPath: "jobName", + mapper: { + serializedName: "jobName", + required: true, + type: { + name: "String", + }, + }, +}; + export const clusterName: OperationURLParameter = { parameterPath: "clusterName", mapper: { @@ -553,6 +615,48 @@ export const body1: OperationParameter = { mapper: CommandPostBodyMapper, }; +export const commandId: OperationURLParameter = { + parameterPath: "commandId", + mapper: { + constraints: { + Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"), + MaxLength: 100, + MinLength: 1, + }, + serializedName: "commandId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const backupId: OperationURLParameter = { + parameterPath: "backupId", + mapper: { + constraints: { + Pattern: new RegExp("^[0-9]+$"), + MaxLength: 15, + MinLength: 1, + }, + serializedName: "backupId", + required: true, + type: { + name: "String", + }, + }, +}; + +export const xMsForceDeallocate: OperationParameter = { + parameterPath: ["options", "xMsForceDeallocate"], + mapper: { + serializedName: "x-ms-force-deallocate", + type: { + name: "String", + }, + }, +}; + export const dataCenterName: OperationURLParameter = { parameterPath: "dataCenterName", mapper: { @@ -574,6 +678,21 @@ export const body2: OperationParameter = { mapper: DataCenterResourceMapper, }; +export const networkSecurityPerimeterConfigurationName: OperationURLParameter = + { + parameterPath: "networkSecurityPerimeterConfigurationName", + mapper: { + constraints: { + Pattern: new RegExp("^.*$"), + }, + serializedName: "networkSecurityPerimeterConfigurationName", + required: true, + type: { + name: "String", + }, + }, + }; + export const notebookWorkspaceName: OperationURLParameter = { parameterPath: "notebookWorkspaceName", mapper: { @@ -717,3 +836,66 @@ export const serviceName: OperationURLParameter = { }, }, }; + +export const throughputPoolName: OperationURLParameter = { + parameterPath: "throughputPoolName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]+(-[a-z0-9]+)*"), + MaxLength: 50, + MinLength: 3, + }, + serializedName: "throughputPoolName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body3: OperationParameter = { + parameterPath: "body", + mapper: ThroughputPoolResourceMapper, +}; + +export const body4: OperationParameter = { + parameterPath: ["options", "body"], + mapper: ThroughputPoolUpdateMapper, +}; + +export const throughputPoolAccountName: OperationURLParameter = { + parameterPath: "throughputPoolAccountName", + mapper: { + constraints: { + Pattern: new RegExp("^[a-z0-9]+(-[a-z0-9]+)*"), + MaxLength: 50, + MinLength: 3, + }, + serializedName: "throughputPoolAccountName", + required: true, + type: { + name: "String", + }, + }, +}; + +export const body5: OperationParameter = { + parameterPath: "body", + mapper: ThroughputPoolAccountResourceMapper, +}; + +export const chaosFaultRequest: OperationParameter = { + parameterPath: "chaosFaultRequest", + mapper: ChaosFaultResourceMapper, +}; + +export const chaosFault: OperationURLParameter = { + parameterPath: "chaosFault", + mapper: { + serializedName: "chaosFault", + required: true, + type: { + name: "String", + }, + }, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts index 8c1a9d2f6342..020baff0c92c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts @@ -24,6 +24,12 @@ import { CassandraClustersListBySubscriptionResponse, CassandraClustersListByResourceGroupOptionalParams, CassandraClustersListByResourceGroupResponse, + CommandPublicResource, + CassandraClustersListCommandOptionalParams, + CassandraClustersListCommandResponse, + BackupResource, + CassandraClustersListBackupsOptionalParams, + CassandraClustersListBackupsResponse, CassandraClustersGetOptionalParams, CassandraClustersGetResponse, CassandraClustersDeleteOptionalParams, @@ -34,6 +40,12 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CassandraClustersInvokeCommandAsyncOptionalParams, + CassandraClustersInvokeCommandAsyncResponse, + CassandraClustersGetCommandAsyncOptionalParams, + CassandraClustersGetCommandAsyncResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, @@ -146,6 +158,130 @@ export class CassandraClustersImpl implements CassandraClusters { } } + /** + * List all commands currently running on ring info + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + public listCommand( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listCommandPagingAll( + resourceGroupName, + clusterName, + 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.listCommandPagingPage( + resourceGroupName, + clusterName, + options, + settings, + ); + }, + }; + } + + private async *listCommandPagingPage( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: CassandraClustersListCommandResponse; + result = await this._listCommand(resourceGroupName, clusterName, options); + yield result.value || []; + } + + private async *listCommandPagingAll( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listCommandPagingPage( + resourceGroupName, + clusterName, + options, + )) { + yield* page; + } + } + + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + public listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listBackupsPagingAll( + resourceGroupName, + clusterName, + 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.listBackupsPagingPage( + resourceGroupName, + clusterName, + options, + settings, + ); + }, + }; + } + + private async *listBackupsPagingPage( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: CassandraClustersListBackupsResponse; + result = await this._listBackups(resourceGroupName, clusterName, options); + yield result.value || []; + } + + private async *listBackupsPagingAll( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listBackupsPagingPage( + resourceGroupName, + clusterName, + options, + )) { + yield* page; + } + } + /** * List all managed Cassandra clusters in this subscription. * @param options The options parameters. @@ -556,6 +692,172 @@ export class CassandraClustersImpl implements CassandraClusters { return poller.pollUntilDone(); } + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + async beginInvokeCommandAsync( + resourceGroupName: string, + clusterName: string, + body: CommandPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraClustersInvokeCommandAsyncResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, clusterName, body, options }, + spec: invokeCommandAsyncOperationSpec, + }); + const poller = await createHttpPoller< + CassandraClustersInvokeCommandAsyncResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + async beginInvokeCommandAsyncAndWait( + resourceGroupName: string, + clusterName: string, + body: CommandPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise { + const poller = await this.beginInvokeCommandAsync( + resourceGroupName, + clusterName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * List all commands currently running on ring info + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + private _listCommand( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listCommandOperationSpec, + ); + } + + /** + * Get details about a specified command that was run asynchronously. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param commandId Managed Cassandra cluster command id. + * @param options The options parameters. + */ + getCommandAsync( + resourceGroupName: string, + clusterName: string, + commandId: string, + options?: CassandraClustersGetCommandAsyncOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, commandId, options }, + getCommandAsyncOperationSpec, + ); + } + + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + private _listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listBackupsOperationSpec, + ); + } + + /** + * Get the properties of an individual backup of this cluster that is available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param backupId Id of a restorable backup of a Cassandra cluster. + * @param options The options parameters. + */ + getBackup( + resourceGroupName: string, + clusterName: string, + backupId: string, + options?: CassandraClustersGetBackupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, backupId, options }, + getBackupOperationSpec, + ); + } + /** * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate * the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an @@ -921,6 +1223,124 @@ const invokeCommandOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer, }; +const invokeCommandAsyncOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommandAsync", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.CommandPublicResource, + }, + 201: { + bodyMapper: Mappers.CommandPublicResource, + }, + 202: { + bodyMapper: Mappers.CommandPublicResource, + }, + 204: { + bodyMapper: Mappers.CommandPublicResource, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.body1, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listCommandOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/commands", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListCommands, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getCommandAsyncOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/commands/{commandId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListCommands, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.commandId, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listBackupsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ListBackups, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getBackupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.BackupResource, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName, + Parameters.backupId, + ], + headerParameters: [Parameters.accept], + serializer, +}; const deallocateOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate", httpMethod: "POST", @@ -940,7 +1360,7 @@ const deallocateOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.clusterName, ], - headerParameters: [Parameters.accept], + headerParameters: [Parameters.accept, Parameters.xMsForceDeallocate], serializer, }; const startOperationSpec: coreClient.OperationSpec = { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts index 9e345d37fa49..26dd13746a47 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts @@ -25,6 +25,9 @@ import { CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, CassandraResourcesListCassandraTablesResponse, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, + CassandraResourcesListCassandraViewsResponse, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, CassandraKeyspaceCreateUpdateParameters, @@ -56,6 +59,20 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, CassandraResourcesMigrateCassandraTableToManualThroughputResponse, + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse, } from "../models"; /// @@ -211,6 +228,80 @@ export class CassandraResourcesImpl implements CassandraResources { } } + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + public listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listCassandraViewsPagingAll( + resourceGroupName, + accountName, + keyspaceName, + 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.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options, + settings, + ); + }, + }; + } + + private async *listCassandraViewsPagingPage( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: CassandraResourcesListCassandraViewsResponse; + result = await this._listCassandraViews( + resourceGroupName, + accountName, + keyspaceName, + options, + ); + yield result.value || []; + } + + private async *listCassandraViewsPagingAll( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options, + )) { + yield* page; + } + } + /** * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1366,204 +1457,779 @@ export class CassandraResourcesImpl implements CassandraResources { ); return poller.pollUntilDone(); } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listCassandraKeyspacesOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceListResult, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createUpdateCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - 201: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - 202: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - 204: { - bodyMapper: Mappers.CassandraKeyspaceGetResults, - }, - }, - requestBody: Parameters.createUpdateCassandraKeyspaceParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; -const deleteCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "DELETE", - responses: { - 200: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - 201: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - 202: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - 204: { - headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - serializer, -}; -const getCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const updateCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - }, - requestBody: Parameters.updateThroughputParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, - }; -const migrateCassandraKeyspaceToAutoscaleOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - default: { - bodyMapper: Mappers.CloudError, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName, - ], - headerParameters: [Parameters.accept], - serializer, - }; -const migrateCassandraKeyspaceToManualThroughputOperationSpec: coreClient.OperationSpec = - { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults, - }, - default: { + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + private _listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, options }, + listCassandraViewsOperationSpec, + ); + } + + /** + * Gets the Cassandra view under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, viewName, options }, + getCassandraViewOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + async beginCreateUpdateCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options, + }, + spec: createUpdateCassandraViewOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesCreateUpdateCassandraViewResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + async beginCreateUpdateCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginDeleteCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, keyspaceName, viewName, options }, + spec: deleteCassandraViewOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginDeleteCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise { + const poller = await this.beginDeleteCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account + * with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewThroughputOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, viewName, options }, + getCassandraViewThroughputOperationSpec, + ); + } + + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + async beginUpdateCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options, + }, + spec: updateCassandraViewThroughputOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesUpdateCassandraViewThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + async beginUpdateCassandraViewThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise { + const poller = await this.beginUpdateCassandraViewThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToAutoscale( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, keyspaceName, viewName, options }, + spec: migrateCassandraViewToAutoscaleOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise { + const poller = await this.beginMigrateCassandraViewToAutoscale( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToManualThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, keyspaceName, viewName, options }, + spec: migrateCassandraViewToManualThroughputOperationSpec, + }); + const poller = await createHttpPoller< + CassandraResourcesMigrateCassandraViewToManualThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise { + const poller = await this.beginMigrateCassandraViewToManualThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listCassandraKeyspacesOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + 201: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + 202: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + 204: { + bodyMapper: Mappers.CassandraKeyspaceGetResults, + }, + }, + requestBody: Parameters.createUpdateCassandraKeyspaceParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + 201: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + 202: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + 204: { + headersMapper: Mappers.CassandraResourcesDeleteCassandraKeyspaceHeaders, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + serializer, +}; +const getCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + requestBody: Parameters.updateThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const migrateCassandraKeyspaceToAutoscaleOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, + }; +const migrateCassandraKeyspaceToManualThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { bodyMapper: Mappers.CloudError, }, }, @@ -1793,3 +2459,204 @@ const migrateCassandraTableToManualThroughputOperationSpec: coreClient.Operation headerParameters: [Parameters.accept], serializer, }; +const listCassandraViewsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraViewListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getCassandraViewOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateCassandraViewOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + 201: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + 202: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + 204: { + bodyMapper: Mappers.CassandraViewGetResults, + }, + }, + requestBody: Parameters.createUpdateCassandraViewParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteCassandraViewOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + serializer, +}; +const getCassandraViewThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const updateCassandraViewThroughputOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + }, + requestBody: Parameters.updateThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const migrateCassandraViewToAutoscaleOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToAutoscale", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const migrateCassandraViewToManualThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/views/{viewName}/throughputSettings/default/migrateToManualThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName, + Parameters.viewName, + ], + headerParameters: [Parameters.accept], + serializer, + }; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts new file mode 100644 index 000000000000..e740f8644f43 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/chaosFault.ts @@ -0,0 +1,383 @@ +/* + * 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 { ChaosFault } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ChaosFaultResource, + ChaosFaultListNextOptionalParams, + ChaosFaultListOptionalParams, + ChaosFaultListOperationResponse, + ChaosFaultEnableDisableOptionalParams, + ChaosFaultEnableDisableResponse, + ChaosFaultGetOptionalParams, + ChaosFaultGetResponse, + ChaosFaultListNextResponse, +} from "../models"; + +/// +/** Class containing ChaosFault operations. */ +export class ChaosFaultImpl implements ChaosFault { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ChaosFault class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * List Chaos Faults for CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, 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( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ChaosFaultListOperationResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * List Chaos Faults for CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + async beginEnableDisable( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ChaosFaultEnableDisableResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + options, + }, + spec: enableDisableOperationSpec, + }); + const poller = await createHttpPoller< + ChaosFaultEnableDisableResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + async beginEnableDisableAndWait( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise { + const poller = await this.beginEnableDisable( + resourceGroupName, + accountName, + chaosFault, + chaosFaultRequest, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + chaosFault: string, + options?: ChaosFaultGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, chaosFault, options }, + getOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: ChaosFaultListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const enableDisableOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults/{chaosFault}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultResource, + }, + 201: { + bodyMapper: Mappers.ChaosFaultResource, + }, + 202: { + bodyMapper: Mappers.ChaosFaultResource, + }, + 204: { + bodyMapper: Mappers.ChaosFaultResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.chaosFaultRequest, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.chaosFault, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/chaosFaults/{chaosFault}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.chaosFault, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ChaosFaultListResponse, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts new file mode 100644 index 000000000000..46184166fc99 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts @@ -0,0 +1,464 @@ +/* + * 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 { DataTransferJobs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + DataTransferJobGetResults, + DataTransferJobsListByDatabaseAccountNextOptionalParams, + DataTransferJobsListByDatabaseAccountOptionalParams, + DataTransferJobsListByDatabaseAccountResponse, + CreateJobRequest, + DataTransferJobsCreateOptionalParams, + DataTransferJobsCreateResponse, + DataTransferJobsGetOptionalParams, + DataTransferJobsGetResponse, + DataTransferJobsPauseOptionalParams, + DataTransferJobsPauseResponse, + DataTransferJobsResumeOptionalParams, + DataTransferJobsResumeResponse, + DataTransferJobsCancelOptionalParams, + DataTransferJobsCancelResponse, + DataTransferJobsCompleteOptionalParams, + DataTransferJobsCompleteResponse, + DataTransferJobsListByDatabaseAccountNextResponse, +} from "../models"; + +/// +/** Class containing DataTransferJobs operations. */ +export class DataTransferJobsImpl implements DataTransferJobs { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class DataTransferJobs class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByDatabaseAccountPagingAll( + resourceGroupName, + accountName, + 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.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listByDatabaseAccountPagingPage( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: DataTransferJobsListByDatabaseAccountResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByDatabaseAccount( + resourceGroupName, + accountName, + options, + ); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByDatabaseAccountNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByDatabaseAccountPagingAll( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Creates a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param jobCreateParameters Parameters to create Data Transfer Job + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + jobName: string, + jobCreateParameters: CreateJobRequest, + options?: DataTransferJobsCreateOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, jobCreateParameters, options }, + createOperationSpec, + ); + } + + /** + * Get a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + getOperationSpec, + ); + } + + /** + * Pause a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + pause( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsPauseOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + pauseOperationSpec, + ); + } + + /** + * Resumes a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + resume( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsResumeOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + resumeOperationSpec, + ); + } + + /** + * Cancels a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + cancel( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCancelOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + cancelOperationSpec, + ); + } + + /** + * Completes a Data Transfer Online Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + complete( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCompleteOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + completeOperationSpec, + ); + } + + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listByDatabaseAccountOperationSpec, + ); + } + + /** + * ListByDatabaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the ListByDatabaseAccount method. + * @param options The options parameters. + */ + private _listByDatabaseAccountNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: DataTransferJobsListByDatabaseAccountNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listByDatabaseAccountNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.jobCreateParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const pauseOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/pause", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const resumeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/resume", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const cancelOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/cancel", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const completeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}/complete", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobGetResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.jobName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByDatabaseAccountOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobFeedResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByDatabaseAccountNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.DataTransferJobFeedResults, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts new file mode 100644 index 000000000000..4301f7bb7777 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts @@ -0,0 +1,418 @@ +/* + * 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 { GraphResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + GraphResourceGetResults, + GraphResourcesListGraphsOptionalParams, + GraphResourcesListGraphsResponse, + GraphResourcesGetGraphOptionalParams, + GraphResourcesGetGraphResponse, + GraphResourceCreateUpdateParameters, + GraphResourcesCreateUpdateGraphOptionalParams, + GraphResourcesCreateUpdateGraphResponse, + GraphResourcesDeleteGraphResourceOptionalParams, +} from "../models"; + +/// +/** Class containing GraphResources operations. */ +export class GraphResourcesImpl implements GraphResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class GraphResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listGraphsPagingAll( + resourceGroupName, + accountName, + 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.listGraphsPagingPage( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listGraphsPagingPage( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + _settings?: PageSettings, + ): AsyncIterableIterator { + let result: GraphResourcesListGraphsResponse; + result = await this._listGraphs(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listGraphsPagingAll( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listGraphsPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listGraphsOperationSpec, + ); + } + + /** + * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + getGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesGetGraphOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, graphName, options }, + getGraphOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + async beginCreateUpdateGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GraphResourcesCreateUpdateGraphResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options, + }, + spec: createUpdateGraphOperationSpec, + }); + const poller = await createHttpPoller< + GraphResourcesCreateUpdateGraphResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + async beginCreateUpdateGraphAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateGraph( + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + async beginDeleteGraphResource( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, accountName, graphName, options }, + spec: deleteGraphResourceOperationSpec, + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + async beginDeleteGraphResourceAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise { + const poller = await this.beginDeleteGraphResource( + resourceGroupName, + accountName, + graphName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listGraphsOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GraphResourcesListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getGraphOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateGraphOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + 201: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + 202: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + 204: { + bodyMapper: Mappers.GraphResourceGetResults, + }, + }, + requestBody: Parameters.createUpdateGraphParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteGraphResourceOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + ], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts index 370b59a302a3..52fe4b73315f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts @@ -1723,8 +1723,8 @@ const getGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1753,8 +1753,8 @@ const createUpdateGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1783,8 +1783,8 @@ const deleteGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], serializer, }; @@ -1802,8 +1802,8 @@ const getGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1832,8 +1832,8 @@ const updateGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1865,8 +1865,8 @@ const migrateGremlinGraphToAutoscaleOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1898,8 +1898,8 @@ const migrateGremlinGraphToManualThroughputOperationSpec: coreClient.OperationSp Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept], serializer, @@ -1932,8 +1932,8 @@ const retrieveContinuousBackupInformationOperationSpec: coreClient.OperationSpec Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, Parameters.graphName, + Parameters.databaseName, ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts index 96531b8c1b96..dbc6e7d2c843 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts @@ -19,14 +19,17 @@ export * from "./collectionPartitionRegion"; export * from "./collectionPartition"; export * from "./partitionKeyRangeId"; export * from "./partitionKeyRangeIdRegion"; +export * from "./graphResources"; export * from "./sqlResources"; export * from "./mongoDBResources"; export * from "./tableResources"; export * from "./cassandraResources"; export * from "./gremlinResources"; export * from "./locations"; +export * from "./dataTransferJobs"; export * from "./cassandraClusters"; export * from "./cassandraDataCenters"; +export * from "./networkSecurityPerimeterConfigurations"; export * from "./notebookWorkspaces"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; @@ -43,3 +46,8 @@ export * from "./restorableGremlinResources"; export * from "./restorableTables"; export * from "./restorableTableResources"; export * from "./service"; +export * from "./throughputPools"; +export * from "./throughputPool"; +export * from "./throughputPoolAccounts"; +export * from "./throughputPoolAccount"; +export * from "./chaosFault"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts index baf8e594bc5d..60dfaa2de990 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -47,6 +47,16 @@ import { MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse, + RetrieveThroughputParameters, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, MongoDBResourcesGetMongoDBCollectionOptionalParams, MongoDBResourcesGetMongoDBCollectionResponse, MongoDBCollectionCreateUpdateParameters, @@ -54,6 +64,11 @@ import { MongoDBResourcesCreateUpdateMongoDBCollectionResponse, MongoDBResourcesDeleteMongoDBCollectionOptionalParams, MongoDBResourcesDeleteMongoDBCollectionResponse, + MergeParameters, + MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse, + MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams, MongoDBResourcesGetMongoDBCollectionThroughputResponse, MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams, @@ -917,6 +932,452 @@ export class MongoDBResourcesImpl implements MongoDBResources { return poller.pollUntilDone(); } + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options, + }, + spec: mongoDBDatabaseRetrieveThroughputDistributionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = + await this.beginMongoDBDatabaseRetrieveThroughputDistribution( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, + }, + spec: mongoDBDatabaseRedistributeThroughputOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + async beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginMongoDBDatabaseRedistributeThroughput( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + options, + }, + spec: mongoDBContainerRetrieveThroughputDistributionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = + await this.beginMongoDBContainerRetrieveThroughputDistribution( + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + options, + }, + spec: mongoDBContainerRedistributeThroughputOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + async beginMongoDBContainerRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginMongoDBContainerRedistributeThroughput( + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + options, + ); + return poller.pollUntilDone(); + } + /** * Lists the MongoDB collection under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -937,53 +1398,268 @@ export class MongoDBResourcesImpl implements MongoDBResources { } /** - * Gets the MongoDB collection under an existing Azure Cosmos DB database account. + * Gets the MongoDB collection under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param options The options parameters. + */ + getMongoDBCollection( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + options?: MongoDBResourcesGetMongoDBCollectionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, collectionName, options }, + getMongoDBCollectionOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB + * Collection. + * @param options The options parameters. + */ + async beginCreateUpdateMongoDBCollection( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, + options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesCreateUpdateMongoDBCollectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + options, + }, + spec: createUpdateMongoDBCollectionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesCreateUpdateMongoDBCollectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update an Azure Cosmos DB MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB + * Collection. + * @param options The options parameters. + */ + async beginCreateUpdateMongoDBCollectionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, + options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateMongoDBCollection( + resourceGroupName, + accountName, + databaseName, + collectionName, + createUpdateMongoDBCollectionParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB Collection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param options The options parameters. + */ + async beginDeleteMongoDBCollection( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesDeleteMongoDBCollectionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + collectionName, + options, + }, + spec: deleteMongoDBCollectionOperationSpec, + }); + const poller = await createHttpPoller< + MongoDBResourcesDeleteMongoDBCollectionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB MongoDB Collection. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. * @param options The options parameters. */ - getMongoDBCollection( + async beginDeleteMongoDBCollectionAndWait( resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, - options?: MongoDBResourcesGetMongoDBCollectionOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, collectionName, options }, - getMongoDBCollectionOperationSpec, + options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + ): Promise { + const poller = await this.beginDeleteMongoDBCollection( + resourceGroupName, + accountName, + databaseName, + collectionName, + options, ); + return poller.pollUntilDone(); } /** - * Create or update an Azure Cosmos DB MongoDB Collection + * Merges the partitions of a MongoDB database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param collectionName Cosmos DB collection name. - * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB - * Collection. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginCreateUpdateMongoDBCollection( + async beginMongoDBDatabasePartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, - collectionName: string, - createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, - options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, ): Promise< SimplePollerLike< - OperationState, - MongoDBResourcesCreateUpdateMongoDBCollectionResponse + OperationState, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1024,76 +1700,74 @@ export class MongoDBResourcesImpl implements MongoDBResources { resourceGroupName, accountName, databaseName, - collectionName, - createUpdateMongoDBCollectionParameters, + mergeParameters, options, }, - spec: createUpdateMongoDBCollectionOperationSpec, + spec: mongoDBDatabasePartitionMergeOperationSpec, }); const poller = await createHttpPoller< - MongoDBResourcesCreateUpdateMongoDBCollectionResponse, - OperationState + MongoDBResourcesMongoDBDatabasePartitionMergeResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Create or update an Azure Cosmos DB MongoDB Collection + * Merges the partitions of a MongoDB database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param collectionName Cosmos DB collection name. - * @param createUpdateMongoDBCollectionParameters The parameters to provide for the current MongoDB - * Collection. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginCreateUpdateMongoDBCollectionAndWait( + async beginMongoDBDatabasePartitionMergeAndWait( resourceGroupName: string, accountName: string, databaseName: string, - collectionName: string, - createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, - options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateMongoDBCollection( + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginMongoDBDatabasePartitionMerge( resourceGroupName, accountName, databaseName, - collectionName, - createUpdateMongoDBCollectionParameters, + mergeParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB MongoDB Collection. + * Merges the partitions of a MongoDB Collection * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginDeleteMongoDBCollection( + async beginListMongoDBCollectionPartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, - options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, ): Promise< SimplePollerLike< - OperationState, - MongoDBResourcesDeleteMongoDBCollectionResponse + OperationState, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1135,41 +1809,46 @@ export class MongoDBResourcesImpl implements MongoDBResources { accountName, databaseName, collectionName, + mergeParameters, options, }, - spec: deleteMongoDBCollectionOperationSpec, + spec: listMongoDBCollectionPartitionMergeOperationSpec, }); const poller = await createHttpPoller< - MongoDBResourcesDeleteMongoDBCollectionResponse, - OperationState + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Deletes an existing Azure Cosmos DB MongoDB Collection. + * Merges the partitions of a MongoDB Collection * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginDeleteMongoDBCollectionAndWait( + async beginListMongoDBCollectionPartitionMergeAndWait( resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, - options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, - ): Promise { - const poller = await this.beginDeleteMongoDBCollection( + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginListMongoDBCollectionPartitionMerge( resourceGroupName, accountName, databaseName, collectionName, + mergeParameters, options, ); return poller.pollUntilDone(); @@ -2303,6 +2982,144 @@ const migrateMongoDBDatabaseToManualThroughputOperationSpec: coreClient.Operatio headerParameters: [Parameters.accept], serializer, }; +const mongoDBDatabaseRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const mongoDBDatabaseRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const mongoDBContainerRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const mongoDBContainerRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const listMongoDBCollectionsOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections", httpMethod: "GET", @@ -2401,6 +3218,74 @@ const deleteMongoDBCollectionOperationSpec: coreClient.OperationSpec = { ], serializer, }; +const mongoDBDatabasePartitionMergeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listMongoDBCollectionPartitionMergeOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.collectionName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const getMongoDBCollectionThroughputOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default", httpMethod: "GET", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..dcc0817ded2a --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,389 @@ +/* + * 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 { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + NetworkSecurityPerimeterConfiguration, + NetworkSecurityPerimeterConfigurationsListNextOptionalParams, + NetworkSecurityPerimeterConfigurationsListOptionalParams, + NetworkSecurityPerimeterConfigurationsListResponse, + NetworkSecurityPerimeterConfigurationsGetOptionalParams, + NetworkSecurityPerimeterConfigurationsGetResponse, + NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + NetworkSecurityPerimeterConfigurationsReconcileResponse, + NetworkSecurityPerimeterConfigurationsListNextResponse, +} from "../models"; + +/// +/** Class containing NetworkSecurityPerimeterConfigurations operations. */ +export class NetworkSecurityPerimeterConfigurationsImpl + implements NetworkSecurityPerimeterConfigurations +{ + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class NetworkSecurityPerimeterConfigurations class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Gets list of effective Network Security Perimeter Configuration for cosmos db account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, accountName, 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( + resourceGroupName, + accountName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: NetworkSecurityPerimeterConfigurationsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, accountName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + accountName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + accountName, + options, + )) { + yield* page; + } + } + + /** + * Gets list of effective Network Security Perimeter Configuration for cosmos db account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listOperationSpec, + ); + } + + /** + * Gets effective Network Security Perimeter Configuration for association + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + options, + }, + getOperationSpec, + ); + } + + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + async beginReconcile( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NetworkSecurityPerimeterConfigurationsReconcileResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + options, + }, + spec: reconcileOperationSpec, + }); + const poller = await createHttpPoller< + NetworkSecurityPerimeterConfigurationsReconcileResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + async beginReconcileAndWait( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise { + const poller = await this.beginReconcile( + resourceGroupName, + accountName, + networkSecurityPerimeterConfigurationName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: NetworkSecurityPerimeterConfigurationsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.networkSecurityPerimeterConfigurationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const reconcileOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile", + httpMethod: "POST", + responses: { + 200: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + 201: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + 202: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + 204: { + headersMapper: + Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.networkSecurityPerimeterConfigurationName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts index 181a58c003e3..caefb8a17c6b 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/privateEndpointConnections.ts @@ -404,7 +404,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.PrivateEndpointConnection, }, default: { - bodyMapper: Mappers.ErrorResponse, + bodyMapper: Mappers.ErrorResponseAutoGenerated, }, }, requestBody: Parameters.parameters, @@ -429,7 +429,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { 202: {}, 204: {}, default: { - bodyMapper: Mappers.ErrorResponse, + bodyMapper: Mappers.ErrorResponseAutoGenerated, }, }, queryParameters: [Parameters.apiVersion], diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts index 3970e6c5237a..a45277e22ad1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts @@ -22,12 +22,12 @@ import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, SqlResourcesListSqlDatabasesResponse, - SqlContainerGetResults, - SqlResourcesListSqlContainersOptionalParams, - SqlResourcesListSqlContainersResponse, ClientEncryptionKeyGetResults, SqlResourcesListClientEncryptionKeysOptionalParams, SqlResourcesListClientEncryptionKeysResponse, + SqlContainerGetResults, + SqlResourcesListSqlContainersOptionalParams, + SqlResourcesListSqlContainersResponse, SqlStoredProcedureGetResults, SqlResourcesListSqlStoredProceduresOptionalParams, SqlResourcesListSqlStoredProceduresResponse, @@ -59,6 +59,11 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, SqlContainerCreateUpdateParameters, @@ -66,6 +71,11 @@ import { SqlResourcesCreateUpdateSqlContainerResponse, SqlResourcesDeleteSqlContainerOptionalParams, SqlResourcesDeleteSqlContainerResponse, + MergeParameters, + SqlResourcesSqlDatabasePartitionMergeOptionalParams, + SqlResourcesSqlDatabasePartitionMergeResponse, + SqlResourcesListSqlContainerPartitionMergeOptionalParams, + SqlResourcesListSqlContainerPartitionMergeResponse, SqlResourcesGetSqlContainerThroughputOptionalParams, SqlResourcesGetSqlContainerThroughputResponse, SqlResourcesUpdateSqlContainerThroughputOptionalParams, @@ -74,11 +84,16 @@ import { SqlResourcesMigrateSqlContainerToAutoscaleResponse, SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, SqlResourcesMigrateSqlContainerToManualThroughputResponse, - SqlResourcesGetClientEncryptionKeyOptionalParams, - SqlResourcesGetClientEncryptionKeyResponse, - ClientEncryptionKeyCreateUpdateParameters, - SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - SqlResourcesCreateUpdateClientEncryptionKeyResponse, + RetrieveThroughputParameters, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + SqlResourcesSqlContainerRedistributeThroughputResponse, SqlResourcesGetSqlStoredProcedureOptionalParams, SqlResourcesGetSqlStoredProcedureResponse, SqlStoredProcedureCreateUpdateParameters, @@ -197,19 +212,19 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Lists the SQL container under an existing Azure Cosmos DB database account. + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - public listSqlContainers( + public listClientEncryptionKeys( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listSqlContainersPagingAll( + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listClientEncryptionKeysPagingAll( resourceGroupName, accountName, databaseName, @@ -226,7 +241,7 @@ export class SqlResourcesImpl implements SqlResources { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listSqlContainersPagingPage( + return this.listClientEncryptionKeysPagingPage( resourceGroupName, accountName, databaseName, @@ -237,15 +252,15 @@ export class SqlResourcesImpl implements SqlResources { }; } - private async *listSqlContainersPagingPage( + private async *listClientEncryptionKeysPagingPage( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, + options?: SqlResourcesListClientEncryptionKeysOptionalParams, _settings?: PageSettings, - ): AsyncIterableIterator { - let result: SqlResourcesListSqlContainersResponse; - result = await this._listSqlContainers( + ): AsyncIterableIterator { + let result: SqlResourcesListClientEncryptionKeysResponse; + result = await this._listClientEncryptionKeys( resourceGroupName, accountName, databaseName, @@ -254,13 +269,13 @@ export class SqlResourcesImpl implements SqlResources { yield result.value || []; } - private async *listSqlContainersPagingAll( + private async *listClientEncryptionKeysPagingAll( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listSqlContainersPagingPage( + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listClientEncryptionKeysPagingPage( resourceGroupName, accountName, databaseName, @@ -271,19 +286,19 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - public listClientEncryptionKeys( + public listSqlContainers( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): PagedAsyncIterableIterator { - const iter = this.listClientEncryptionKeysPagingAll( + options?: SqlResourcesListSqlContainersOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listSqlContainersPagingAll( resourceGroupName, accountName, databaseName, @@ -300,7 +315,7 @@ export class SqlResourcesImpl implements SqlResources { if (settings?.maxPageSize) { throw new Error("maxPageSize is not supported by this operation."); } - return this.listClientEncryptionKeysPagingPage( + return this.listSqlContainersPagingPage( resourceGroupName, accountName, databaseName, @@ -311,15 +326,15 @@ export class SqlResourcesImpl implements SqlResources { }; } - private async *listClientEncryptionKeysPagingPage( + private async *listSqlContainersPagingPage( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, + options?: SqlResourcesListSqlContainersOptionalParams, _settings?: PageSettings, - ): AsyncIterableIterator { - let result: SqlResourcesListClientEncryptionKeysResponse; - result = await this._listClientEncryptionKeys( + ): AsyncIterableIterator { + let result: SqlResourcesListSqlContainersResponse; + result = await this._listSqlContainers( resourceGroupName, accountName, databaseName, @@ -328,13 +343,13 @@ export class SqlResourcesImpl implements SqlResources { yield result.value || []; } - private async *listClientEncryptionKeysPagingAll( + private async *listSqlContainersPagingAll( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): AsyncIterableIterator { - for await (const page of this.listClientEncryptionKeysPagingPage( + options?: SqlResourcesListSqlContainersOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listSqlContainersPagingPage( resourceGroupName, accountName, databaseName, @@ -1272,6 +1287,167 @@ export class SqlResourcesImpl implements SqlResources { return poller.pollUntilDone(); } + /** + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The options parameters. + */ + private _listClientEncryptionKeys( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, options }, + listClientEncryptionKeysOperationSpec, + ); + } + + /** + * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param options The options parameters. + */ + getClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + options?: SqlResourcesGetClientEncryptionKeyOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + options, + }, + getClientEncryptionKeyOperationSpec, + ); + } + + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + async beginCreateUpdateClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + createUpdateClientEncryptionKeyParameters, + options, + }, + spec: createUpdateClientEncryptionKeyOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesCreateUpdateClientEncryptionKeyResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + async beginCreateUpdateClientEncryptionKeyAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateClientEncryptionKey( + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + createUpdateClientEncryptionKeyParameters, + options, + ); + return poller.pollUntilDone(); + } + /** * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1529,33 +1705,251 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. + * Merges the partitions of a SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - getSqlContainerThroughput( + async beginSqlDatabasePartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - options?: SqlResourcesGetSqlContainerThroughputOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, containerName, options }, - getSqlContainerThroughputOperationSpec, - ); - } - - /** - * Update RUs per second of an Azure Cosmos DB SQL container - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Cosmos DB database account name. - * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. - * @param updateThroughputParameters The parameters to provide for the RUs per second of the current + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabasePartitionMergeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + mergeParameters, + options, + }, + spec: sqlDatabasePartitionMergeOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesSqlDatabasePartitionMergeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Merges the partitions of a SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + async beginSqlDatabasePartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginSqlDatabasePartitionMerge( + resourceGroupName, + accountName, + databaseName, + mergeParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + async beginListSqlContainerPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesListSqlContainerPartitionMergeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + options, + }, + spec: listSqlContainerPartitionMergeOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesListSqlContainerPartitionMergeResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; + } + + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + async beginListSqlContainerPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise { + const poller = await this.beginListSqlContainerPartitionMerge( + resourceGroupName, + accountName, + databaseName, + containerName, + mergeParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The options parameters. + */ + getSqlContainerThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + options?: SqlResourcesGetSqlContainerThroughputOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, containerName, options }, + getSqlContainerThroughputOperationSpec, + ); + } + + /** + * Update RUs per second of an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param updateThroughputParameters The parameters to provide for the RUs per second of the current * SQL container. * @param options The options parameters. */ @@ -1873,79 +2267,30 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Cosmos DB database account name. - * @param databaseName Cosmos DB database name. - * @param options The options parameters. - */ - private _listClientEncryptionKeys( - resourceGroupName: string, - accountName: string, - databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, options }, - listClientEncryptionKeysOperationSpec, - ); - } - - /** - * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param accountName Cosmos DB database account name. - * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param options The options parameters. - */ - getClientEncryptionKey( - resourceGroupName: string, - accountName: string, - databaseName: string, - clientEncryptionKeyName: string, - options?: SqlResourcesGetClientEncryptionKeyOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - databaseName, - clientEncryptionKeyName, - options, - }, - getClientEncryptionKeyOperationSpec, - ); - } - - /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - async beginCreateUpdateClientEncryptionKey( + async beginSqlDatabaseRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateClientEncryptionKeyResponse + OperationState, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -1986,133 +2331,184 @@ export class SqlResourcesImpl implements SqlResources { resourceGroupName, accountName, databaseName, - clientEncryptionKeyName, - createUpdateClientEncryptionKeyParameters, + retrieveThroughputParameters, options, }, - spec: createUpdateClientEncryptionKeyOperationSpec, + spec: sqlDatabaseRetrieveThroughputDistributionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateClientEncryptionKeyResponse, - OperationState + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - async beginCreateUpdateClientEncryptionKeyAndWait( + async beginSqlDatabaseRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateClientEncryptionKey( + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = await this.beginSqlDatabaseRetrieveThroughputDistribution( resourceGroupName, accountName, databaseName, - clientEncryptionKeyName, - createUpdateClientEncryptionKeyParameters, + retrieveThroughputParameters, options, ); return poller.pollUntilDone(); } /** - * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. + * Redistribute throughput for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - private _listSqlStoredProcedures( + async beginSqlDatabaseRedistributeThroughput( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - options?: SqlResourcesListSqlStoredProceduresOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, accountName, databaseName, containerName, options }, - listSqlStoredProceduresOperationSpec, - ); + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabaseRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, + }, + spec: sqlDatabaseRedistributeThroughputOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", + }); + await poller.poll(); + return poller; } /** - * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. + * Redistribute throughput for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - getSqlStoredProcedure( + async beginSqlDatabaseRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - storedProcedureName: string, - options?: SqlResourcesGetSqlStoredProcedureOptionalParams, - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - accountName, - databaseName, - containerName, - storedProcedureName, - options, - }, - getSqlStoredProcedureOperationSpec, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginSqlDatabaseRedistributeThroughput( + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options, ); + return poller.pollUntilDone(); } /** - * Create or update an Azure Cosmos DB SQL storedProcedure + * Retrieve throughput distribution for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. - * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL - * storedProcedure. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. * @param options The options parameters. */ - async beginCreateUpdateSqlStoredProcedure( + async beginSqlContainerRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlStoredProcedureResponse + OperationState, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2154,81 +2550,79 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - storedProcedureName, - createUpdateSqlStoredProcedureParameters, + retrieveThroughputParameters, options, }, - spec: createUpdateSqlStoredProcedureOperationSpec, + spec: sqlContainerRetrieveThroughputDistributionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlStoredProcedureResponse, - OperationState + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Create or update an Azure Cosmos DB SQL storedProcedure + * Retrieve throughput distribution for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. - * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL - * storedProcedure. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. * @param options The options parameters. */ - async beginCreateUpdateSqlStoredProcedureAndWait( + async beginSqlContainerRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlStoredProcedure( + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + ): Promise { + const poller = await this.beginSqlContainerRetrieveThroughputDistribution( resourceGroupName, accountName, databaseName, containerName, - storedProcedureName, - createUpdateSqlStoredProcedureParameters, + retrieveThroughputParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB SQL storedProcedure. + * Redistribute throughput for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. * @param options The options parameters. */ - async beginDeleteSqlStoredProcedure( + async beginSqlContainerRedistributeThroughput( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesDeleteSqlStoredProcedureResponse + OperationState, + SqlResourcesSqlContainerRedistributeThroughputResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2270,130 +2664,132 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - storedProcedureName, + redistributeThroughputParameters, options, }, - spec: deleteSqlStoredProcedureOperationSpec, + spec: sqlContainerRedistributeThroughputOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesDeleteSqlStoredProcedureResponse, - OperationState + SqlResourcesSqlContainerRedistributeThroughputResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "location", }); await poller.poll(); return poller; } /** - * Deletes an existing Azure Cosmos DB SQL storedProcedure. + * Redistribute throughput for an Azure Cosmos DB SQL container * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param storedProcedureName Cosmos DB storedProcedure name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. * @param options The options parameters. */ - async beginDeleteSqlStoredProcedureAndWait( + async beginSqlContainerRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - storedProcedureName: string, - options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, - ): Promise { - const poller = await this.beginDeleteSqlStoredProcedure( + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + ): Promise { + const poller = await this.beginSqlContainerRedistributeThroughput( resourceGroupName, accountName, databaseName, containerName, - storedProcedureName, + redistributeThroughputParameters, options, ); return poller.pollUntilDone(); } /** - * Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. + * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. * @param options The options parameters. */ - private _listSqlUserDefinedFunctions( + private _listSqlStoredProcedures( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesListSqlUserDefinedFunctionsOptionalParams, - ): Promise { + options?: SqlResourcesListSqlStoredProceduresOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, options }, - listSqlUserDefinedFunctionsOperationSpec, + listSqlStoredProceduresOperationSpec, ); } /** - * Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. + * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param storedProcedureName Cosmos DB storedProcedure name. * @param options The options parameters. */ - getSqlUserDefinedFunction( + getSqlStoredProcedure( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - options?: SqlResourcesGetSqlUserDefinedFunctionOptionalParams, - ): Promise { + storedProcedureName: string, + options?: SqlResourcesGetSqlStoredProcedureOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, - userDefinedFunctionName, + storedProcedureName, options, }, - getSqlUserDefinedFunctionOperationSpec, + getSqlStoredProcedureOperationSpec, ); } /** - * Create or update an Azure Cosmos DB SQL userDefinedFunction + * Create or update an Azure Cosmos DB SQL storedProcedure * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. - * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL - * userDefinedFunction. + * @param storedProcedureName Cosmos DB storedProcedure name. + * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL + * storedProcedure. * @param options The options parameters. */ - async beginCreateUpdateSqlUserDefinedFunction( + async beginCreateUpdateSqlStoredProcedure( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, + storedProcedureName: string, + createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse + OperationState, + SqlResourcesCreateUpdateSqlStoredProcedureResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2435,15 +2831,15 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - userDefinedFunctionName, - createUpdateSqlUserDefinedFunctionParameters, + storedProcedureName, + createUpdateSqlStoredProcedureParameters, options, }, - spec: createUpdateSqlUserDefinedFunctionOperationSpec, + spec: createUpdateSqlStoredProcedureOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse, - OperationState + SqlResourcesCreateUpdateSqlStoredProcedureResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2453,63 +2849,63 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Create or update an Azure Cosmos DB SQL userDefinedFunction + * Create or update an Azure Cosmos DB SQL storedProcedure * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. - * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL - * userDefinedFunction. + * @param storedProcedureName Cosmos DB storedProcedure name. + * @param createUpdateSqlStoredProcedureParameters The parameters to provide for the current SQL + * storedProcedure. * @param options The options parameters. */ - async beginCreateUpdateSqlUserDefinedFunctionAndWait( + async beginCreateUpdateSqlStoredProcedureAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlUserDefinedFunction( + storedProcedureName: string, + createUpdateSqlStoredProcedureParameters: SqlStoredProcedureCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlStoredProcedure( resourceGroupName, accountName, databaseName, containerName, - userDefinedFunctionName, - createUpdateSqlUserDefinedFunctionParameters, + storedProcedureName, + createUpdateSqlStoredProcedureParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. + * Deletes an existing Azure Cosmos DB SQL storedProcedure. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param storedProcedureName Cosmos DB storedProcedure name. * @param options The options parameters. */ - async beginDeleteSqlUserDefinedFunction( + async beginDeleteSqlStoredProcedure( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, + storedProcedureName: string, + options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesDeleteSqlUserDefinedFunctionResponse + OperationState, + SqlResourcesDeleteSqlStoredProcedureResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2551,14 +2947,14 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - userDefinedFunctionName, + storedProcedureName, options, }, - spec: deleteSqlUserDefinedFunctionOperationSpec, + spec: deleteSqlStoredProcedureOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesDeleteSqlUserDefinedFunctionResponse, - OperationState + SqlResourcesDeleteSqlStoredProcedureResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2568,112 +2964,113 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. + * Deletes an existing Azure Cosmos DB SQL storedProcedure. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param storedProcedureName Cosmos DB storedProcedure name. * @param options The options parameters. */ - async beginDeleteSqlUserDefinedFunctionAndWait( + async beginDeleteSqlStoredProcedureAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - userDefinedFunctionName: string, - options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, - ): Promise { - const poller = await this.beginDeleteSqlUserDefinedFunction( + storedProcedureName: string, + options?: SqlResourcesDeleteSqlStoredProcedureOptionalParams, + ): Promise { + const poller = await this.beginDeleteSqlStoredProcedure( resourceGroupName, accountName, databaseName, containerName, - userDefinedFunctionName, + storedProcedureName, options, ); return poller.pollUntilDone(); } /** - * Lists the SQL trigger under an existing Azure Cosmos DB database account. + * Lists the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. * @param options The options parameters. */ - private _listSqlTriggers( + private _listSqlUserDefinedFunctions( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesListSqlTriggersOptionalParams, - ): Promise { + options?: SqlResourcesListSqlUserDefinedFunctionsOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, options }, - listSqlTriggersOperationSpec, + listSqlUserDefinedFunctionsOperationSpec, ); } /** - * Gets the SQL trigger under an existing Azure Cosmos DB database account. + * Gets the SQL userDefinedFunction under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. * @param options The options parameters. */ - getSqlTrigger( + getSqlUserDefinedFunction( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - options?: SqlResourcesGetSqlTriggerOptionalParams, - ): Promise { + userDefinedFunctionName: string, + options?: SqlResourcesGetSqlUserDefinedFunctionOptionalParams, + ): Promise { return this.client.sendOperationRequest( { resourceGroupName, accountName, databaseName, containerName, - triggerName, + userDefinedFunctionName, options, }, - getSqlTriggerOperationSpec, + getSqlUserDefinedFunctionOperationSpec, ); } /** - * Create or update an Azure Cosmos DB SQL trigger + * Create or update an Azure Cosmos DB SQL userDefinedFunction * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. - * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL + * userDefinedFunction. * @param options The options parameters. */ - async beginCreateUpdateSqlTrigger( + async beginCreateUpdateSqlUserDefinedFunction( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, + userDefinedFunctionName: string, + createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlTriggerResponse + OperationState, + SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2715,15 +3112,15 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - triggerName, - createUpdateSqlTriggerParameters, + userDefinedFunctionName, + createUpdateSqlUserDefinedFunctionParameters, options, }, - spec: createUpdateSqlTriggerOperationSpec, + spec: createUpdateSqlUserDefinedFunctionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlTriggerResponse, - OperationState + SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2733,62 +3130,63 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Create or update an Azure Cosmos DB SQL trigger + * Create or update an Azure Cosmos DB SQL userDefinedFunction * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. - * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. + * @param createUpdateSqlUserDefinedFunctionParameters The parameters to provide for the current SQL + * userDefinedFunction. * @param options The options parameters. */ - async beginCreateUpdateSqlTriggerAndWait( + async beginCreateUpdateSqlUserDefinedFunctionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlTrigger( + userDefinedFunctionName: string, + createUpdateSqlUserDefinedFunctionParameters: SqlUserDefinedFunctionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlUserDefinedFunction( resourceGroupName, accountName, databaseName, containerName, - triggerName, - createUpdateSqlTriggerParameters, + userDefinedFunctionName, + createUpdateSqlUserDefinedFunctionParameters, options, ); return poller.pollUntilDone(); } /** - * Deletes an existing Azure Cosmos DB SQL trigger. + * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. * @param options The options parameters. */ - async beginDeleteSqlTrigger( + async beginDeleteSqlUserDefinedFunction( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - options?: SqlResourcesDeleteSqlTriggerOptionalParams, + userDefinedFunctionName: string, + options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesDeleteSqlTriggerResponse + OperationState, + SqlResourcesDeleteSqlUserDefinedFunctionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2830,14 +3228,14 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - triggerName, + userDefinedFunctionName, options, }, - spec: deleteSqlTriggerOperationSpec, + spec: deleteSqlUserDefinedFunctionOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesDeleteSqlTriggerResponse, - OperationState + SqlResourcesDeleteSqlUserDefinedFunctionResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2847,77 +3245,112 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Deletes an existing Azure Cosmos DB SQL trigger. + * Deletes an existing Azure Cosmos DB SQL userDefinedFunction. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param containerName Cosmos DB container name. - * @param triggerName Cosmos DB trigger name. + * @param userDefinedFunctionName Cosmos DB userDefinedFunction name. * @param options The options parameters. */ - async beginDeleteSqlTriggerAndWait( + async beginDeleteSqlUserDefinedFunctionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - triggerName: string, - options?: SqlResourcesDeleteSqlTriggerOptionalParams, - ): Promise { - const poller = await this.beginDeleteSqlTrigger( + userDefinedFunctionName: string, + options?: SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams, + ): Promise { + const poller = await this.beginDeleteSqlUserDefinedFunction( resourceGroupName, accountName, databaseName, containerName, - triggerName, + userDefinedFunctionName, options, ); return poller.pollUntilDone(); } /** - * Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. - * @param roleDefinitionId The GUID for the Role Definition. + * Lists the SQL trigger under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. * @param options The options parameters. */ - getSqlRoleDefinition( - roleDefinitionId: string, + private _listSqlTriggers( resourceGroupName: string, accountName: string, - options?: SqlResourcesGetSqlRoleDefinitionOptionalParams, - ): Promise { + databaseName: string, + containerName: string, + options?: SqlResourcesListSqlTriggersOptionalParams, + ): Promise { return this.client.sendOperationRequest( - { roleDefinitionId, resourceGroupName, accountName, options }, - getSqlRoleDefinitionOperationSpec, + { resourceGroupName, accountName, databaseName, containerName, options }, + listSqlTriggersOperationSpec, ); } /** - * Creates or updates an Azure Cosmos DB SQL Role Definition. - * @param roleDefinitionId The GUID for the Role Definition. + * Gets the SQL trigger under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. - * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role - * Definition. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. * @param options The options parameters. */ - async beginCreateUpdateSqlRoleDefinition( - roleDefinitionId: string, + getSqlTrigger( resourceGroupName: string, accountName: string, - createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, + databaseName: string, + containerName: string, + triggerName: string, + options?: SqlResourcesGetSqlTriggerOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + containerName, + triggerName, + options, + }, + getSqlTriggerOperationSpec, + ); + } + + /** + * Create or update an Azure Cosmos DB SQL trigger + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. + * @param options The options parameters. + */ + async beginCreateUpdateSqlTrigger( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + triggerName: string, + createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateSqlRoleDefinitionResponse + OperationState, + SqlResourcesCreateUpdateSqlTriggerResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec, - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperationFn = async ( @@ -2955,17 +3388,19 @@ export class SqlResourcesImpl implements SqlResources { const lro = createLroSpec({ sendOperationFn, args: { - roleDefinitionId, resourceGroupName, accountName, - createUpdateSqlRoleDefinitionParameters, + databaseName, + containerName, + triggerName, + createUpdateSqlTriggerParameters, options, }, - spec: createUpdateSqlRoleDefinitionOperationSpec, + spec: createUpdateSqlTriggerOperationSpec, }); const poller = await createHttpPoller< - SqlResourcesCreateUpdateSqlRoleDefinitionResponse, - OperationState + SqlResourcesCreateUpdateSqlTriggerResponse, + OperationState >(lro, { restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs, @@ -2975,27 +3410,269 @@ export class SqlResourcesImpl implements SqlResources { } /** - * Creates or updates an Azure Cosmos DB SQL Role Definition. - * @param roleDefinitionId The GUID for the Role Definition. + * Create or update an Azure Cosmos DB SQL trigger * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. - * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role - * Definition. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param createUpdateSqlTriggerParameters The parameters to provide for the current SQL trigger. * @param options The options parameters. */ - async beginCreateUpdateSqlRoleDefinitionAndWait( - roleDefinitionId: string, + async beginCreateUpdateSqlTriggerAndWait( resourceGroupName: string, accountName: string, - createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, - options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, - ): Promise { - const poller = await this.beginCreateUpdateSqlRoleDefinition( - roleDefinitionId, + databaseName: string, + containerName: string, + triggerName: string, + createUpdateSqlTriggerParameters: SqlTriggerCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlTriggerOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlTrigger( resourceGroupName, accountName, - createUpdateSqlRoleDefinitionParameters, - options, + databaseName, + containerName, + triggerName, + createUpdateSqlTriggerParameters, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB SQL trigger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param options The options parameters. + */ + async beginDeleteSqlTrigger( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + triggerName: string, + options?: SqlResourcesDeleteSqlTriggerOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesDeleteSqlTriggerResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + accountName, + databaseName, + containerName, + triggerName, + options, + }, + spec: deleteSqlTriggerOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesDeleteSqlTriggerResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB SQL trigger. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param triggerName Cosmos DB trigger name. + * @param options The options parameters. + */ + async beginDeleteSqlTriggerAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + triggerName: string, + options?: SqlResourcesDeleteSqlTriggerOptionalParams, + ): Promise { + const poller = await this.beginDeleteSqlTrigger( + resourceGroupName, + accountName, + databaseName, + containerName, + triggerName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB SQL Role Definition with the given Id. + * @param roleDefinitionId The GUID for the Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + getSqlRoleDefinition( + roleDefinitionId: string, + resourceGroupName: string, + accountName: string, + options?: SqlResourcesGetSqlRoleDefinitionOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { roleDefinitionId, resourceGroupName, accountName, options }, + getSqlRoleDefinitionOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB SQL Role Definition. + * @param roleDefinitionId The GUID for the Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + async beginCreateUpdateSqlRoleDefinition( + roleDefinitionId: string, + resourceGroupName: string, + accountName: string, + createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesCreateUpdateSqlRoleDefinitionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + roleDefinitionId, + resourceGroupName, + accountName, + createUpdateSqlRoleDefinitionParameters, + options, + }, + spec: createUpdateSqlRoleDefinitionOperationSpec, + }); + const poller = await createHttpPoller< + SqlResourcesCreateUpdateSqlRoleDefinitionResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB SQL Role Definition. + * @param roleDefinitionId The GUID for the Role Definition. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param createUpdateSqlRoleDefinitionParameters The properties required to create or update a Role + * Definition. + * @param options The options parameters. + */ + async beginCreateUpdateSqlRoleDefinitionAndWait( + roleDefinitionId: string, + resourceGroupName: string, + accountName: string, + createUpdateSqlRoleDefinitionParameters: SqlRoleDefinitionCreateUpdateParameters, + options?: SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams, + ): Promise { + const poller = await this.beginCreateUpdateSqlRoleDefinition( + roleDefinitionId, + resourceGroupName, + accountName, + createUpdateSqlRoleDefinitionParameters, + options, ); return poller.pollUntilDone(); } @@ -3653,12 +4330,12 @@ const migrateSqlDatabaseToManualThroughputOperationSpec: coreClient.OperationSpe headerParameters: [Parameters.accept], serializer, }; -const listSqlContainersOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", +const listClientEncryptionKeysOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SqlContainerListResult, + bodyMapper: Mappers.ClientEncryptionKeysListResult, }, }, queryParameters: [Parameters.apiVersion], @@ -3672,12 +4349,12 @@ const listSqlContainersOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; -const getSqlContainerOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", +const getClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", httpMethod: "GET", responses: { 200: { - bodyMapper: Mappers.SqlContainerGetResults, + bodyMapper: Mappers.ClientEncryptionKeyGetResults, }, }, queryParameters: [Parameters.apiVersion], @@ -3687,7 +4364,77 @@ const getSqlContainerOperationSpec: coreClient.OperationSpec = { Parameters.resourceGroupName, Parameters.accountName, Parameters.databaseName, - Parameters.containerName, + Parameters.clientEncryptionKeyName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createUpdateClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + 201: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + 202: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + 204: { + bodyMapper: Mappers.ClientEncryptionKeyGetResults, + }, + }, + requestBody: Parameters.createUpdateClientEncryptionKeyParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.clientEncryptionKeyName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listSqlContainersOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlContainerListResult, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const getSqlContainerOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.SqlContainerGetResults, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, ], headerParameters: [Parameters.accept], serializer, @@ -3751,6 +4498,73 @@ const deleteSqlContainerOperationSpec: coreClient.OperationSpec = { ], serializer, }; +const sqlDatabasePartitionMergeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const listSqlContainerPartitionMergeOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/partitionMerge", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionStorageInfoCollection, + }, + default: { + bodyMapper: Mappers.CloudError, + }, + }, + requestBody: Parameters.mergeParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; const getSqlContainerThroughputOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default", httpMethod: "GET", @@ -3867,76 +4681,144 @@ const migrateSqlContainerToManualThroughputOperationSpec: coreClient.OperationSp headerParameters: [Parameters.accept], serializer, }; -const listClientEncryptionKeysOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClientEncryptionKeysListResult, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const getClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, - }, - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName, - Parameters.clientEncryptionKeyName, - ], - headerParameters: [Parameters.accept], - serializer, -}; -const createUpdateClientEncryptionKeyOperationSpec: coreClient.OperationSpec = { - path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/clientEncryptionKeys/{clientEncryptionKeyName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, +const sqlDatabaseRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, }, - 201: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const sqlDatabaseRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, }, - 202: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const sqlContainerRetrieveThroughputDistributionOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/retrieveThroughputDistribution", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, }, - 204: { - bodyMapper: Mappers.ClientEncryptionKeyGetResults, + requestBody: Parameters.retrieveThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; +const sqlContainerRedistributeThroughputOperationSpec: coreClient.OperationSpec = + { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/throughputSettings/default/redistributeThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 201: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 202: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + 204: { + bodyMapper: Mappers.PhysicalPartitionThroughputInfoResult, + }, + default: { + bodyMapper: Mappers.CloudError, + }, }, - }, - requestBody: Parameters.createUpdateClientEncryptionKeyParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName, - Parameters.clientEncryptionKeyName, - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer, -}; + requestBody: Parameters.redistributeThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName, + Parameters.containerName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, + }; const listSqlStoredProceduresOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/sqlDatabases/{databaseName}/containers/{containerName}/storedProcedures", httpMethod: "GET", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts new file mode 100644 index 000000000000..354f588208e1 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPool.ts @@ -0,0 +1,454 @@ +/* + * 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 { ThroughputPool } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ThroughputPoolGetOptionalParams, + ThroughputPoolGetResponse, + ThroughputPoolResource, + ThroughputPoolCreateOrUpdateOptionalParams, + ThroughputPoolCreateOrUpdateResponse, + ThroughputPoolUpdateOptionalParams, + ThroughputPoolUpdateResponse, + ThroughputPoolDeleteOptionalParams, + ThroughputPoolDeleteResponse, +} from "../models"; + +/** Class containing ThroughputPool operations. */ +export class ThroughputPoolImpl implements ThroughputPool { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPool class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, throughputPoolName, options }, + getOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + async beginCreateOrUpdate( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, throughputPoolName, body, options }, + spec: createOrUpdateOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + throughputPoolName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginUpdate( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, throughputPoolName, options }, + spec: updateOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + throughputPoolName, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, throughputPoolName, options }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + throughputPoolName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 201: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 202: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 204: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.body3, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 201: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 202: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + 204: { + bodyMapper: Mappers.ThroughputPoolResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.body4, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ThroughputPoolDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts new file mode 100644 index 000000000000..c24a37d722dd --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccount.ts @@ -0,0 +1,361 @@ +/* + * 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 { ThroughputPoolAccount } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + SimplePollerLike, + OperationState, + createHttpPoller, +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; +import { + ThroughputPoolAccountGetOptionalParams, + ThroughputPoolAccountGetResponse, + ThroughputPoolAccountResource, + ThroughputPoolAccountCreateOptionalParams, + ThroughputPoolAccountCreateResponse, + ThroughputPoolAccountDeleteOptionalParams, + ThroughputPoolAccountDeleteResponse, +} from "../models"; + +/** Class containing ThroughputPoolAccount operations. */ +export class ThroughputPoolAccountImpl implements ThroughputPoolAccount { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPoolAccount class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountGetOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + options, + }, + getOperationSpec, + ); + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + async beginCreate( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountCreateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + options, + }, + spec: createOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolAccountCreateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + resourceLocationConfig: "azure-async-operation", + }); + await poller.poll(); + return poller; + } + + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + async beginCreateAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise { + const poller = await this.beginCreate( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + body, + options, + ); + return poller.pollUntilDone(); + } + + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountDeleteResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec, + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperationFn = 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 = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + options, + }, + spec: deleteOperationSpec, + }); + const poller = await createHttpPoller< + ThroughputPoolAccountDeleteResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + }); + await poller.poll(); + return poller; + } + + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + throughputPoolName, + throughputPoolAccountName, + options, + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const getOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts/{throughputPoolAccountName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + Parameters.throughputPoolAccountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const createOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts/{throughputPoolAccountName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + 201: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + 202: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + 204: { + bodyMapper: Mappers.ThroughputPoolAccountResource, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + requestBody: Parameters.body5, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + Parameters.throughputPoolAccountName, + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer, +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts/{throughputPoolAccountName}", + httpMethod: "DELETE", + responses: { + 200: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + 201: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + 202: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + 204: { + headersMapper: Mappers.ThroughputPoolAccountDeleteHeaders, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + Parameters.throughputPoolAccountName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts new file mode 100644 index 000000000000..7915d747e853 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPoolAccounts.ts @@ -0,0 +1,197 @@ +/* + * 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 { ThroughputPoolAccounts } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + ThroughputPoolAccountResource, + ThroughputPoolAccountsListNextOptionalParams, + ThroughputPoolAccountsListOptionalParams, + ThroughputPoolAccountsListResponse, + ThroughputPoolAccountsListNextResponse, +} from "../models"; + +/// +/** Class containing ThroughputPoolAccounts operations. */ +export class ThroughputPoolAccountsImpl implements ThroughputPoolAccounts { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPoolAccounts class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists all the Azure Cosmos DB accounts available under the subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll( + resourceGroupName, + throughputPoolName, + 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( + resourceGroupName, + throughputPoolName, + options, + settings, + ); + }, + }; + } + + private async *listPagingPage( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ThroughputPoolAccountsListResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._list(resourceGroupName, throughputPoolName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + throughputPoolName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listPagingAll( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + throughputPoolName, + options, + )) { + yield* page; + } + } + + /** + * Lists all the Azure Cosmos DB accounts available under the subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, throughputPoolName, options }, + listOperationSpec, + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + throughputPoolName: string, + nextLink: string, + options?: ThroughputPoolAccountsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, throughputPoolName, nextLink, options }, + listNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools/{throughputPoolName}/throughputPoolAccounts", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolAccountsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + Parameters.throughputPoolName, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts new file mode 100644 index 000000000000..fe6f38b0f336 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/throughputPools.ts @@ -0,0 +1,298 @@ +/* + * 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 { ThroughputPools } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + ThroughputPoolResource, + ThroughputPoolsListNextOptionalParams, + ThroughputPoolsListOptionalParams, + ThroughputPoolsListResponse, + ThroughputPoolsListByResourceGroupNextOptionalParams, + ThroughputPoolsListByResourceGroupOptionalParams, + ThroughputPoolsListByResourceGroupResponse, + ThroughputPoolsListNextResponse, + ThroughputPoolsListByResourceGroupNextResponse, +} from "../models"; + +/// +/** Class containing ThroughputPools operations. */ +export class ThroughputPoolsImpl implements ThroughputPools { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class ThroughputPools class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * @param options The options parameters. + */ + public list( + options?: ThroughputPoolsListOptionalParams, + ): 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?: ThroughputPoolsListOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ThroughputPoolsListResponse; + 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?: ThroughputPoolsListOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * List all the ThroughputPools in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + public listByResourceGroup( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator { + const iter = this.listByResourceGroupPagingAll(resourceGroupName, 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.listByResourceGroupPagingPage( + resourceGroupName, + options, + settings, + ); + }, + }; + } + + private async *listByResourceGroupPagingPage( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + settings?: PageSettings, + ): AsyncIterableIterator { + let result: ThroughputPoolsListByResourceGroupResponse; + let continuationToken = settings?.continuationToken; + if (!continuationToken) { + result = await this._listByResourceGroup(resourceGroupName, options); + let page = result.value || []; + continuationToken = result.nextLink; + setContinuationToken(page, continuationToken); + yield page; + } + while (continuationToken) { + result = await this._listByResourceGroupNext( + resourceGroupName, + continuationToken, + options, + ); + continuationToken = result.nextLink; + let page = result.value || []; + setContinuationToken(page, continuationToken); + yield page; + } + } + + private async *listByResourceGroupPagingAll( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options, + )) { + yield* page; + } + } + + /** + * Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * @param options The options parameters. + */ + private _list( + options?: ThroughputPoolsListOptionalParams, + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * List all the ThroughputPools in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + private _listByResourceGroup( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec, + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: ThroughputPoolsListNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec, + ); + } + + /** + * ListByResourceGroupNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @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?: ThroughputPoolsListByResourceGroupNextOptionalParams, + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec, + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/throughputPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/throughputPools", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputPoolsListResult, + }, + default: { + bodyMapper: Mappers.ErrorResponseAutoGenerated, + }, + }, + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.nextLink, + ], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts index ee04087b70ce..327b7da76aae 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts @@ -12,6 +12,10 @@ import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListByResourceGroupOptionalParams, + CommandPublicResource, + CassandraClustersListCommandOptionalParams, + BackupResource, + CassandraClustersListBackupsOptionalParams, CassandraClustersGetOptionalParams, CassandraClustersGetResponse, CassandraClustersDeleteOptionalParams, @@ -22,6 +26,12 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CassandraClustersInvokeCommandAsyncOptionalParams, + CassandraClustersInvokeCommandAsyncResponse, + CassandraClustersGetCommandAsyncOptionalParams, + CassandraClustersGetCommandAsyncResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, @@ -47,6 +57,28 @@ export interface CassandraClusters { resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams, ): PagedAsyncIterableIterator; + /** + * List all commands currently running on ring info + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + listCommand( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListCommandOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams, + ): PagedAsyncIterableIterator; /** * Get the properties of a managed Cassandra cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,6 +207,63 @@ export interface CassandraClusters { body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams, ): Promise; + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + beginInvokeCommandAsync( + resourceGroupName: string, + clusterName: string, + body: CommandPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraClustersInvokeCommandAsyncResponse + > + >; + /** + * Invoke a command like nodetool for cassandra maintenance asynchronously + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param body Specification which command to run where + * @param options The options parameters. + */ + beginInvokeCommandAsyncAndWait( + resourceGroupName: string, + clusterName: string, + body: CommandPostBody, + options?: CassandraClustersInvokeCommandAsyncOptionalParams, + ): Promise; + /** + * Get details about a specified command that was run asynchronously. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param commandId Managed Cassandra cluster command id. + * @param options The options parameters. + */ + getCommandAsync( + resourceGroupName: string, + clusterName: string, + commandId: string, + options?: CassandraClustersGetCommandAsyncOptionalParams, + ): Promise; + /** + * Get the properties of an individual backup of this cluster that is available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param backupId Id of a restorable backup of a Cassandra cluster. + * @param options The options parameters. + */ + getBackup( + resourceGroupName: string, + clusterName: string, + backupId: string, + options?: CassandraClustersGetBackupOptionalParams, + ): Promise; /** * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate * the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts index 6b9eeca3a70d..d2e8d12a7372 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts @@ -13,6 +13,8 @@ import { CassandraResourcesListCassandraKeyspacesOptionalParams, CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, CassandraKeyspaceCreateUpdateParameters, @@ -44,6 +46,20 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, CassandraResourcesMigrateCassandraTableToManualThroughputResponse, + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse, } from "../models"; /// @@ -73,6 +89,19 @@ export interface CassandraResources { keyspaceName: string, options?: CassandraResourcesListCassandraTablesOptionalParams, ): PagedAsyncIterableIterator; + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams, + ): PagedAsyncIterableIterator; /** * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided * name. @@ -486,4 +515,215 @@ export interface CassandraResources { tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, ): Promise; + /** + * Gets the Cassandra view under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewOptionalParams, + ): Promise; + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + beginCreateUpdateCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + >; + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + beginCreateUpdateCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginDeleteCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginDeleteCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams, + ): Promise; + /** + * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account + * with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewThroughputOptionalParams, + ): Promise; + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + beginUpdateCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + >; + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + beginUpdateCassandraViewThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + ): Promise; + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToAutoscale( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + >; + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + ): Promise; + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToManualThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + >; + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.ts new file mode 100644 index 000000000000..2f06c46da2da --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/chaosFault.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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ChaosFaultResource, + ChaosFaultListOptionalParams, + ChaosFaultEnableDisableOptionalParams, + ChaosFaultEnableDisableResponse, + ChaosFaultGetOptionalParams, + ChaosFaultGetResponse, +} from "../models"; + +/// +/** Interface representing a ChaosFault. */ +export interface ChaosFault { + /** + * List Chaos Faults for CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: ChaosFaultListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + beginEnableDisable( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ChaosFaultEnableDisableResponse + > + >; + /** + * Enable, disable Chaos Fault in a CosmosDB account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param chaosFaultRequest A request object to enable/disable the chaos fault. + * @param options The options parameters. + */ + beginEnableDisableAndWait( + resourceGroupName: string, + accountName: string, + chaosFault: string, + chaosFaultRequest: ChaosFaultResource, + options?: ChaosFaultEnableDisableOptionalParams, + ): Promise; + /** + * Get Chaos Fault for a CosmosdB account for a particular Chaos Fault. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param chaosFault The name of the ChaosFault. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + chaosFault: string, + options?: ChaosFaultGetOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts new file mode 100644 index 000000000000..9e6ffe301391 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts @@ -0,0 +1,122 @@ +/* + * 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 { + DataTransferJobGetResults, + DataTransferJobsListByDatabaseAccountOptionalParams, + CreateJobRequest, + DataTransferJobsCreateOptionalParams, + DataTransferJobsCreateResponse, + DataTransferJobsGetOptionalParams, + DataTransferJobsGetResponse, + DataTransferJobsPauseOptionalParams, + DataTransferJobsPauseResponse, + DataTransferJobsResumeOptionalParams, + DataTransferJobsResumeResponse, + DataTransferJobsCancelOptionalParams, + DataTransferJobsCancelResponse, + DataTransferJobsCompleteOptionalParams, + DataTransferJobsCompleteResponse, +} from "../models"; + +/// +/** Interface representing a DataTransferJobs. */ +export interface DataTransferJobs { + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Creates a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param jobCreateParameters Parameters to create Data Transfer Job + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + jobName: string, + jobCreateParameters: CreateJobRequest, + options?: DataTransferJobsCreateOptionalParams, + ): Promise; + /** + * Get a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsGetOptionalParams, + ): Promise; + /** + * Pause a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + pause( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsPauseOptionalParams, + ): Promise; + /** + * Resumes a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + resume( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsResumeOptionalParams, + ): Promise; + /** + * Cancels a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + cancel( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCancelOptionalParams, + ): Promise; + /** + * Completes a Data Transfer Online Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + complete( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsCompleteOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts new file mode 100644 index 000000000000..1ffe7c056d61 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts @@ -0,0 +1,110 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + GraphResourceGetResults, + GraphResourcesListGraphsOptionalParams, + GraphResourcesGetGraphOptionalParams, + GraphResourcesGetGraphResponse, + GraphResourceCreateUpdateParameters, + GraphResourcesCreateUpdateGraphOptionalParams, + GraphResourcesCreateUpdateGraphResponse, + GraphResourcesDeleteGraphResourceOptionalParams, +} from "../models"; + +/// +/** Interface representing a GraphResources. */ +export interface GraphResources { + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + getGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesGetGraphOptionalParams, + ): Promise; + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + beginCreateUpdateGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + GraphResourcesCreateUpdateGraphResponse + > + >; + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + beginCreateUpdateGraphAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + beginDeleteGraphResource( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + beginDeleteGraphResourceAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts index 96531b8c1b96..dbc6e7d2c843 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts @@ -19,14 +19,17 @@ export * from "./collectionPartitionRegion"; export * from "./collectionPartition"; export * from "./partitionKeyRangeId"; export * from "./partitionKeyRangeIdRegion"; +export * from "./graphResources"; export * from "./sqlResources"; export * from "./mongoDBResources"; export * from "./tableResources"; export * from "./cassandraResources"; export * from "./gremlinResources"; export * from "./locations"; +export * from "./dataTransferJobs"; export * from "./cassandraClusters"; export * from "./cassandraDataCenters"; +export * from "./networkSecurityPerimeterConfigurations"; export * from "./notebookWorkspaces"; export * from "./privateEndpointConnections"; export * from "./privateLinkResources"; @@ -43,3 +46,8 @@ export * from "./restorableGremlinResources"; export * from "./restorableTables"; export * from "./restorableTableResources"; export * from "./service"; +export * from "./throughputPools"; +export * from "./throughputPool"; +export * from "./throughputPoolAccounts"; +export * from "./throughputPoolAccount"; +export * from "./chaosFault"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts index 4c31b6974452..1358b5f758fe 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts @@ -33,6 +33,16 @@ import { MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse, + RetrieveThroughputParameters, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, MongoDBResourcesGetMongoDBCollectionOptionalParams, MongoDBResourcesGetMongoDBCollectionResponse, MongoDBCollectionCreateUpdateParameters, @@ -40,6 +50,11 @@ import { MongoDBResourcesCreateUpdateMongoDBCollectionResponse, MongoDBResourcesDeleteMongoDBCollectionOptionalParams, MongoDBResourcesDeleteMongoDBCollectionResponse, + MergeParameters, + MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse, + MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams, MongoDBResourcesGetMongoDBCollectionThroughputResponse, MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams, @@ -309,6 +324,162 @@ export interface MongoDBResources { databaseName: string, options?: MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, ): Promise; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + > + >; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + > + >; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB database. + * @param options The options parameters. + */ + beginMongoDBDatabaseRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + ): Promise; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + > + >; + /** + * Retrieve throughput distribution for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + > + >; + /** + * Redistribute throughput for an Azure Cosmos DB MongoDB container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current MongoDB container. + * @param options The options parameters. + */ + beginMongoDBContainerRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + ): Promise; /** * Gets the MongoDB collection under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -400,6 +571,80 @@ export interface MongoDBResources { collectionName: string, options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams, ): Promise; + /** + * Merges the partitions of a MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginMongoDBDatabasePartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesMongoDBDatabasePartitionMergeResponse + > + >; + /** + * Merges the partitions of a MongoDB database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginMongoDBDatabasePartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesMongoDBDatabasePartitionMergeOptionalParams, + ): Promise; + /** + * Merges the partitions of a MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListMongoDBCollectionPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + > + >; + /** + * Merges the partitions of a MongoDB Collection + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListMongoDBCollectionPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + ): Promise; /** * Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account * with the provided name. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts new file mode 100644 index 000000000000..b7220649acbe --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts @@ -0,0 +1,81 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + NetworkSecurityPerimeterConfiguration, + NetworkSecurityPerimeterConfigurationsListOptionalParams, + NetworkSecurityPerimeterConfigurationsGetOptionalParams, + NetworkSecurityPerimeterConfigurationsGetResponse, + NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + NetworkSecurityPerimeterConfigurationsReconcileResponse, +} from "../models"; + +/// +/** Interface representing a NetworkSecurityPerimeterConfigurations. */ +export interface NetworkSecurityPerimeterConfigurations { + /** + * Gets list of effective Network Security Perimeter Configuration for cosmos db account + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + accountName: string, + options?: NetworkSecurityPerimeterConfigurationsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * Gets effective Network Security Perimeter Configuration for association + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams, + ): Promise; + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + beginReconcile( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + NetworkSecurityPerimeterConfigurationsReconcileResponse + > + >; + /** + * Refreshes any information about the association. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param networkSecurityPerimeterConfigurationName The name for Network Security Perimeter + * configuration + * @param options The options parameters. + */ + beginReconcileAndWait( + resourceGroupName: string, + accountName: string, + networkSecurityPerimeterConfigurationName: string, + options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts index e2a536558478..e5b5d4aa34e6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts @@ -11,10 +11,10 @@ import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, - SqlContainerGetResults, - SqlResourcesListSqlContainersOptionalParams, ClientEncryptionKeyGetResults, SqlResourcesListClientEncryptionKeysOptionalParams, + SqlContainerGetResults, + SqlResourcesListSqlContainersOptionalParams, SqlStoredProcedureGetResults, SqlResourcesListSqlStoredProceduresOptionalParams, SqlUserDefinedFunctionGetResults, @@ -41,6 +41,11 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, SqlContainerCreateUpdateParameters, @@ -48,6 +53,11 @@ import { SqlResourcesCreateUpdateSqlContainerResponse, SqlResourcesDeleteSqlContainerOptionalParams, SqlResourcesDeleteSqlContainerResponse, + MergeParameters, + SqlResourcesSqlDatabasePartitionMergeOptionalParams, + SqlResourcesSqlDatabasePartitionMergeResponse, + SqlResourcesListSqlContainerPartitionMergeOptionalParams, + SqlResourcesListSqlContainerPartitionMergeResponse, SqlResourcesGetSqlContainerThroughputOptionalParams, SqlResourcesGetSqlContainerThroughputResponse, SqlResourcesUpdateSqlContainerThroughputOptionalParams, @@ -56,11 +66,16 @@ import { SqlResourcesMigrateSqlContainerToAutoscaleResponse, SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, SqlResourcesMigrateSqlContainerToManualThroughputResponse, - SqlResourcesGetClientEncryptionKeyOptionalParams, - SqlResourcesGetClientEncryptionKeyResponse, - ClientEncryptionKeyCreateUpdateParameters, - SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - SqlResourcesCreateUpdateClientEncryptionKeyResponse, + RetrieveThroughputParameters, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + SqlResourcesSqlContainerRedistributeThroughputResponse, SqlResourcesGetSqlStoredProcedureOptionalParams, SqlResourcesGetSqlStoredProcedureResponse, SqlStoredProcedureCreateUpdateParameters, @@ -114,31 +129,31 @@ export interface SqlResources { options?: SqlResourcesListSqlDatabasesOptionalParams, ): PagedAsyncIterableIterator; /** - * Lists the SQL container under an existing Azure Cosmos DB database account. + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - listSqlContainers( + listClientEncryptionKeys( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListSqlContainersOptionalParams, - ): PagedAsyncIterableIterator; + options?: SqlResourcesListClientEncryptionKeysOptionalParams, + ): PagedAsyncIterableIterator; /** - * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. * @param options The options parameters. */ - listClientEncryptionKeys( + listSqlContainers( resourceGroupName: string, accountName: string, databaseName: string, - options?: SqlResourcesListClientEncryptionKeysOptionalParams, - ): PagedAsyncIterableIterator; + options?: SqlResourcesListSqlContainersOptionalParams, + ): PagedAsyncIterableIterator; /** * Lists the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -398,6 +413,64 @@ export interface SqlResources { databaseName: string, options?: SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, ): Promise; + /** + * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param options The options parameters. + */ + getClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + options?: SqlResourcesGetClientEncryptionKeyOptionalParams, + ): Promise; + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + beginCreateUpdateClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + >; + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + beginCreateUpdateClientEncryptionKeyAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + ): Promise; /** * Gets the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -487,6 +560,80 @@ export interface SqlResources { containerName: string, options?: SqlResourcesDeleteSqlContainerOptionalParams, ): Promise; + /** + * Merges the partitions of a SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginSqlDatabasePartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabasePartitionMergeResponse + > + >; + /** + * Merges the partitions of a SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginSqlDatabasePartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesSqlDatabasePartitionMergeOptionalParams, + ): Promise; + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListSqlContainerPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesListSqlContainerPartitionMergeResponse + > + >; + /** + * Merges the partitions of a SQL Container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param mergeParameters The parameters for the merge operation. + * @param options The options parameters. + */ + beginListSqlContainerPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams, + ): Promise; /** * Gets the RUs per second of the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -614,63 +761,161 @@ export interface SqlResources { options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, ): Promise; /** - * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - getClientEncryptionKey( + beginSqlDatabaseRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - options?: SqlResourcesGetClientEncryptionKeyOptionalParams, - ): Promise; + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + > + >; /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Retrieve throughput distribution for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. * @param options The options parameters. */ - beginCreateUpdateClientEncryptionKey( + beginSqlDatabaseRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB SQL database + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. + * @param options The options parameters. + */ + beginSqlDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, ): Promise< SimplePollerLike< - OperationState, - SqlResourcesCreateUpdateClientEncryptionKeyResponse + OperationState, + SqlResourcesSqlDatabaseRedistributeThroughputResponse > >; /** - * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure - * Powershell (instead of directly). + * Redistribute throughput for an Azure Cosmos DB SQL database * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param accountName Cosmos DB database account name. * @param databaseName Cosmos DB database name. - * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. - * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption - * key. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - beginCreateUpdateClientEncryptionKeyAndWait( + beginSqlDatabaseRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, - clientEncryptionKeyName: string, - createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, - options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, - ): Promise; + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + ): Promise; + /** + * Retrieve throughput distribution for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + > + >; + /** + * Retrieve throughput distribution for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + ): Promise; + /** + * Redistribute throughput for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + SqlResourcesSqlContainerRedistributeThroughputResponse + > + >; + /** + * Redistribute throughput for an Azure Cosmos DB SQL container + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL container. + * @param options The options parameters. + */ + beginSqlContainerRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + ): Promise; /** * Gets the SQL storedProcedure under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts new file mode 100644 index 000000000000..83d0c3c6a421 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPool.ts @@ -0,0 +1,122 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ThroughputPoolGetOptionalParams, + ThroughputPoolGetResponse, + ThroughputPoolResource, + ThroughputPoolCreateOrUpdateOptionalParams, + ThroughputPoolCreateOrUpdateResponse, + ThroughputPoolUpdateOptionalParams, + ThroughputPoolUpdateResponse, + ThroughputPoolDeleteOptionalParams, + ThroughputPoolDeleteResponse, +} from "../models"; + +/** Interface representing a ThroughputPool. */ +export interface ThroughputPool { + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolGetOptionalParams, + ): Promise; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + beginCreateOrUpdate( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolCreateOrUpdateResponse + > + >; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param body The parameters to provide for the current ThroughputPool. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + body: ThroughputPoolResource, + options?: ThroughputPoolCreateOrUpdateOptionalParams, + ): Promise; + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginUpdate( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolUpdateResponse + > + >; + /** + * Updates the properties of an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginUpdateAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolUpdateOptionalParams, + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolDeleteResponse + > + >; + /** + * Deletes an existing Azure Cosmos DB Throughput Pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts new file mode 100644 index 000000000000..44c05e8056fd --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccount.ts @@ -0,0 +1,103 @@ +/* + * 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 { SimplePollerLike, OperationState } from "@azure/core-lro"; +import { + ThroughputPoolAccountGetOptionalParams, + ThroughputPoolAccountGetResponse, + ThroughputPoolAccountResource, + ThroughputPoolAccountCreateOptionalParams, + ThroughputPoolAccountCreateResponse, + ThroughputPoolAccountDeleteOptionalParams, + ThroughputPoolAccountDeleteResponse, +} from "../models"; + +/** Interface representing a ThroughputPoolAccount. */ +export interface ThroughputPoolAccount { + /** + * Retrieves the properties of an existing Azure Cosmos DB Throughput Pool + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + get( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountGetOptionalParams, + ): Promise; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + beginCreate( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountCreateResponse + > + >; + /** + * Creates or updates an Azure Cosmos DB ThroughputPool account. The "Update" method is preferred when + * performing updates on an account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param body The parameters to provide for the current ThroughputPoolAccount. + * @param options The options parameters. + */ + beginCreateAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + body: ThroughputPoolAccountResource, + options?: ThroughputPoolAccountCreateOptionalParams, + ): Promise; + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise< + SimplePollerLike< + OperationState, + ThroughputPoolAccountDeleteResponse + > + >; + /** + * Removes an existing Azure Cosmos DB database account from a throughput pool. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param throughputPoolAccountName Cosmos DB global database account in a Throughput Pool + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + throughputPoolName: string, + throughputPoolAccountName: string, + options?: ThroughputPoolAccountDeleteOptionalParams, + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts new file mode 100644 index 000000000000..83312c1c702e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPoolAccounts.ts @@ -0,0 +1,29 @@ +/* + * 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 { + ThroughputPoolAccountResource, + ThroughputPoolAccountsListOptionalParams, +} from "../models"; + +/// +/** Interface representing a ThroughputPoolAccounts. */ +export interface ThroughputPoolAccounts { + /** + * Lists all the Azure Cosmos DB accounts available under the subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param throughputPoolName Cosmos DB Throughput Pool name. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + throughputPoolName: string, + options?: ThroughputPoolAccountsListOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.ts new file mode 100644 index 000000000000..9c73a3815a87 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/throughputPools.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 { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + ThroughputPoolResource, + ThroughputPoolsListOptionalParams, + ThroughputPoolsListByResourceGroupOptionalParams, +} from "../models"; + +/// +/** Interface representing a ThroughputPools. */ +export interface ThroughputPools { + /** + * Lists all the Azure Cosmos DB Throughput Pools available under the subscription. + * @param options The options parameters. + */ + list( + options?: ThroughputPoolsListOptionalParams, + ): PagedAsyncIterableIterator; + /** + * List all the ThroughputPools in a given resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The options parameters. + */ + listByResourceGroup( + resourceGroupName: string, + options?: ThroughputPoolsListByResourceGroupOptionalParams, + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts b/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts new file mode 100644 index 000000000000..d64be981b694 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/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/cosmosdb/arm-cosmosdb/tsconfig.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json index bbcdce662fee..3e6ae96443f3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-cosmosdb": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"