diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 12515ee5e111..d46ab9ae24e1 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -3106,7 +3106,7 @@ packages: dev: false /array-flatten/1.1.1: - resolution: {integrity: sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=} + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} dev: false /array-includes/3.1.5: @@ -3367,7 +3367,7 @@ packages: dev: false /buffer-equal-constant-time/1.0.1: - resolution: {integrity: sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=} + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} dev: false /buffer-from/1.1.2: @@ -3517,7 +3517,7 @@ packages: dev: false /charenc/0.0.2: - resolution: {integrity: sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=} + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} dev: false /check-error/1.0.2: @@ -3655,7 +3655,7 @@ packages: dev: false /concat-map/0.0.1: - resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: false /concurrently/6.5.1: @@ -3718,7 +3718,7 @@ packages: dev: false /cookie-signature/1.0.6: - resolution: {integrity: sha1-4wOogrNCzD7oylE6eZmXNNqzriw=} + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} dev: false /cookie/0.4.2: @@ -3820,7 +3820,7 @@ packages: dev: false /crypt/0.0.2: - resolution: {integrity: sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=} + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} dev: false /csv-parse/5.3.0: @@ -4101,11 +4101,11 @@ packages: dev: false /edge-launcher/1.2.2: - resolution: {integrity: sha1-60Cq+9Bnpup27/+rBke81VCbN7I=} + resolution: {integrity: sha512-JcD5WBi3BHZXXVSSeEhl6sYO8g5cuynk/hifBzds2Bp4JdzCGLNMHgMCKu5DvrO1yatMgF0goFsxXRGus0yh1g==} dev: false /ee-first/1.1.1: - resolution: {integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=} + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} dev: false /electron-to-chromium/1.4.199: @@ -4987,7 +4987,7 @@ packages: dev: false /fresh/0.5.2: - resolution: {integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=} + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} dev: false @@ -5127,7 +5127,7 @@ packages: dev: false /github-from-package/0.0.0: - resolution: {integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=} + resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} dev: false /glob-parent/5.1.2: @@ -6568,7 +6568,7 @@ packages: dev: false /media-typer/0.3.0: - resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=} + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} engines: {node: '>= 0.6'} dev: false @@ -6578,7 +6578,7 @@ packages: dev: false /merge-descriptors/1.0.1: - resolution: {integrity: sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=} + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: false /merge-source-map/1.1.0: @@ -7003,7 +7003,7 @@ packages: dev: false /noms/0.0.0: - resolution: {integrity: sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=} + resolution: {integrity: sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow==} dependencies: inherits: 2.0.4 readable-stream: 1.0.34 @@ -9193,7 +9193,7 @@ packages: dev: false /utils-merge/1.0.1: - resolution: {integrity: sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=} + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} dev: false @@ -11387,7 +11387,7 @@ packages: dev: false file:projects/arm-cosmosdb.tgz: - resolution: {integrity: sha512-2MGurY8KHRMQSY7UnlvQH01uzDAK6XQXyVmM3dK5nKV8tCosCy82zWxZVAMRRD27gP2te61DfNjBZkYBAoUIdQ==, tarball: file:projects/arm-cosmosdb.tgz} + resolution: {integrity: sha512-XE1IzWtyih5po1Ef53hSGaeQua/vg/9ELYhWnnuF3IFncpWQ341lH8rlSueKgikgq7nFTbizURUj5+B9rKV7Rg==, tarball: file:projects/arm-cosmosdb.tgz} name: '@rush-temp/arm-cosmosdb' version: 0.0.0 dependencies: @@ -11407,7 +11407,7 @@ packages: rollup: 2.79.0 rollup-plugin-sourcemaps: 0.6.3_rollup@2.79.0 tslib: 2.4.0 - typescript: 4.6.4 + typescript: 4.2.4 uglify-js: 3.16.3 transitivePeerDependencies: - '@types/node' @@ -16287,7 +16287,7 @@ packages: '@azure/core-tracing': 1.0.0-preview.13 '@azure/logger-js': 1.3.2 '@microsoft/api-extractor': 7.18.11 - '@opentelemetry/api': 1.1.0 + '@opentelemetry/api': 1.2.0 '@types/chai': 4.3.1 '@types/express': 4.17.13 '@types/mocha': 7.0.2 @@ -16428,7 +16428,7 @@ packages: version: 0.0.0 dependencies: '@microsoft/api-extractor': 7.18.11 - '@opentelemetry/api': 1.1.0 + '@opentelemetry/api': 1.2.0 '@types/chai': 4.3.1 '@types/chai-as-promised': 7.1.5 '@types/mocha': 7.0.2 diff --git a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md index 8bc0cf6ee960..e81dbe2d9d6c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md +++ b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md @@ -1,15 +1,251 @@ # Release History + +## 16.0.0-beta.4 (2022-09-07) + +**Features** -## 15.2.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added operation group DataTransferJobs + - Added operation group GraphResources + - Added operation group RestorableGremlinDatabases + - Added operation group RestorableGremlinGraphs + - Added operation group RestorableGremlinResources + - Added operation group RestorableTableResources + - Added operation group RestorableTables + - Added operation CassandraClusters.getBackup + - Added operation CassandraClusters.listBackups + - 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 GremlinResources.beginRetrieveContinuousBackupInformation + - Added operation GremlinResources.beginRetrieveContinuousBackupInformationAndWait + - 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.beginMongoDBDatabaseRedistributeThroughput + - Added operation MongoDBResources.beginMongoDBDatabaseRedistributeThroughputAndWait + - Added operation MongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistribution + - Added operation MongoDBResources.beginMongoDBDatabaseRetrieveThroughputDistributionAndWait + - Added operation SqlResources.beginCreateUpdateClientEncryptionKey + - Added operation SqlResources.beginCreateUpdateClientEncryptionKeyAndWait + - 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.beginSqlDatabaseRedistributeThroughput + - Added operation SqlResources.beginSqlDatabaseRedistributeThroughputAndWait + - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistribution + - Added operation SqlResources.beginSqlDatabaseRetrieveThroughputDistributionAndWait + - Added operation SqlResources.getClientEncryptionKey + - Added operation SqlResources.listClientEncryptionKeys + - Added operation TableResources.beginRetrieveContinuousBackupInformation + - Added operation TableResources.beginRetrieveContinuousBackupInformationAndWait + - Added Interface AuthenticationMethodLdapProperties + - Added Interface AzureBlobDataTransferDataSourceSink + - Added Interface BackupResource + - Added Interface BackupResourceProperties + - Added Interface CassandraClustersGetBackupOptionalParams + - Added Interface CassandraClustersListBackupsOptionalParams + - Added Interface CassandraResourcesCreateUpdateCassandraViewOptionalParams + - Added Interface CassandraResourcesDeleteCassandraViewOptionalParams + - Added Interface CassandraResourcesGetCassandraViewOptionalParams + - Added Interface CassandraResourcesGetCassandraViewThroughputOptionalParams + - Added Interface CassandraResourcesListCassandraViewsOptionalParams + - Added Interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + - Added Interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + - Added Interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams + - Added Interface CassandraViewCreateUpdateParameters + - Added Interface CassandraViewGetPropertiesOptions + - Added Interface CassandraViewGetPropertiesResource + - Added Interface CassandraViewGetResults + - Added Interface CassandraViewListResult + - Added Interface CassandraViewResource + - Added Interface ClientEncryptionIncludedPath + - Added Interface ClientEncryptionKeyCreateUpdateParameters + - Added Interface ClientEncryptionKeyGetPropertiesResource + - Added Interface ClientEncryptionKeyGetResults + - Added Interface ClientEncryptionKeyResource + - Added Interface ClientEncryptionKeysListResult + - Added Interface ClientEncryptionPolicy + - Added Interface ContinuousModeProperties + - Added Interface CosmosCassandraDataTransferDataSourceSink + - Added Interface CosmosSqlDataTransferDataSourceSink + - Added Interface CreateJobRequest + - Added Interface DataTransferDataSourceSink + - Added Interface DataTransferJobFeedResults + - Added Interface DataTransferJobGetResults + - Added Interface DataTransferJobProperties + - Added Interface DataTransferJobsCancelOptionalParams + - Added Interface DataTransferJobsCreateOptionalParams + - Added Interface DataTransferJobsGetOptionalParams + - Added Interface DataTransferJobsListByDatabaseAccountNextOptionalParams + - Added Interface DataTransferJobsListByDatabaseAccountOptionalParams + - Added Interface DataTransferJobsPauseOptionalParams + - Added Interface DataTransferJobsResumeOptionalParams + - Added Interface DiagnosticLogSettings + - Added Interface GraphResource + - Added Interface GraphResourceCreateUpdateParameters + - Added Interface GraphResourceGetPropertiesOptions + - Added Interface GraphResourceGetPropertiesResource + - Added Interface GraphResourceGetResults + - Added Interface GraphResourcesCreateUpdateGraphOptionalParams + - Added Interface GraphResourcesDeleteGraphResourceOptionalParams + - Added Interface GraphResourcesGetGraphOptionalParams + - Added Interface GraphResourcesListGraphsOptionalParams + - Added Interface GraphResourcesListResult + - Added Interface GremlinDatabaseRestoreResource + - Added Interface GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + - Added Interface KeyWrapMetadata + - Added Interface ListBackups + - Added Interface MergeParameters + - Added Interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + - Added Interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams + - Added Interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams + - Added Interface MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams + - Added Interface PhysicalPartitionId + - Added Interface PhysicalPartitionStorageInfo + - Added Interface PhysicalPartitionStorageInfoCollection + - Added Interface PhysicalPartitionThroughputInfoProperties + - Added Interface PhysicalPartitionThroughputInfoResource + - Added Interface PhysicalPartitionThroughputInfoResult + - Added Interface PhysicalPartitionThroughputInfoResultPropertiesResource + - Added Interface RedistributeThroughputParameters + - Added Interface RedistributeThroughputPropertiesResource + - Added Interface ResourceRestoreParameters + - Added Interface RestorableGremlinDatabaseGetResult + - Added Interface RestorableGremlinDatabasePropertiesResource + - Added Interface RestorableGremlinDatabasesListOptionalParams + - Added Interface RestorableGremlinDatabasesListResult + - Added Interface RestorableGremlinGraphGetResult + - Added Interface RestorableGremlinGraphPropertiesResource + - Added Interface RestorableGremlinGraphsListOptionalParams + - Added Interface RestorableGremlinGraphsListResult + - Added Interface RestorableGremlinResourcesGetResult + - Added Interface RestorableGremlinResourcesListOptionalParams + - Added Interface RestorableGremlinResourcesListResult + - Added Interface RestorableTableGetResult + - Added Interface RestorableTablePropertiesResource + - Added Interface RestorableTableResourcesGetResult + - Added Interface RestorableTableResourcesListOptionalParams + - Added Interface RestorableTableResourcesListResult + - Added Interface RestorableTablesListOptionalParams + - Added Interface RestorableTablesListResult + - Added Interface RestoreParametersBase + - Added Interface RetrieveThroughputParameters + - Added Interface RetrieveThroughputPropertiesResource + - Added Interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams + - Added Interface SqlResourcesGetClientEncryptionKeyOptionalParams + - Added Interface SqlResourcesListClientEncryptionKeysOptionalParams + - Added Interface SqlResourcesListSqlContainerPartitionMergeOptionalParams + - Added Interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams + - Added Interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams + - Added Interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + - Added Interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + - Added Interface TableResourcesRetrieveContinuousBackupInformationOptionalParams + - Added Type Alias CassandraClustersGetBackupResponse + - Added Type Alias CassandraClustersListBackupsResponse + - 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 ContinuousTier + - Added Type Alias DataTransferComponent + - Added Type Alias DataTransferDataSourceSinkUnion + - Added Type Alias DataTransferJobsCancelResponse + - 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 EnableFullTextQuery + - Added Type Alias GraphResourcesCreateUpdateGraphResponse + - Added Type Alias GraphResourcesGetGraphResponse + - Added Type Alias GraphResourcesListGraphsResponse + - Added Type Alias GremlinResourcesRetrieveContinuousBackupInformationResponse + - Added Type Alias MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + - Added Type Alias MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + - Added Type Alias MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + - Added Type Alias MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + - Added Type Alias MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + - Added Type Alias RestorableGremlinDatabasesListResponse + - Added Type Alias RestorableGremlinGraphsListResponse + - Added Type Alias RestorableGremlinResourcesListResponse + - Added Type Alias RestorableTableResourcesListResponse + - Added Type Alias RestorableTablesListResponse + - Added Type Alias SqlResourcesCreateUpdateClientEncryptionKeyResponse + - Added Type Alias SqlResourcesGetClientEncryptionKeyResponse + - Added Type Alias SqlResourcesListClientEncryptionKeysResponse + - Added Type Alias SqlResourcesListSqlContainerPartitionMergeResponse + - Added Type Alias SqlResourcesSqlContainerRedistributeThroughputResponse + - Added Type Alias SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + - Added Type Alias SqlResourcesSqlDatabaseRedistributeThroughputResponse + - Added Type Alias SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + - Added Type Alias TableResourcesRetrieveContinuousBackupInformationResponse + - Added Type Alias ThroughputPolicyType + - Interface ARMResourceProperties has a new optional parameter identity + - Interface ContinuousModeBackupPolicy has a new optional parameter continuousModeProperties + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountCreateUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountGetResults has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountGetResults has a new optional parameter enableMaterializedViews + - Interface DatabaseAccountUpdateParameters has a new optional parameter diagnosticLogSettings + - Interface DatabaseAccountUpdateParameters has a new optional parameter enableMaterializedViews + - Interface DataCenterResourceProperties has a new optional parameter authenticationMethodLdapProperties + - Interface LocationProperties has a new optional parameter status + - Interface MongoDBCollectionResource has a new optional parameter createMode + - Interface MongoDBCollectionResource has a new optional parameter restoreParameters + - Interface MongoDBDatabaseResource has a new optional parameter createMode + - Interface MongoDBDatabaseResource has a new optional parameter restoreParameters + - Interface RestorableDatabaseAccountGetResult has a new optional parameter oldestRestorableTime + - Interface RestorableMongodbCollectionsListOptionalParams has a new optional parameter endTime + - Interface RestorableMongodbCollectionsListOptionalParams has a new optional parameter startTime + - Interface RestoreParameters has a new optional parameter gremlinDatabasesToRestore + - Interface RestoreParameters has a new optional parameter tablesToRestore + - Interface SqlContainerResource has a new optional parameter clientEncryptionPolicy + - Interface SqlContainerResource has a new optional parameter createMode + - Interface SqlContainerResource has a new optional parameter restoreParameters + - Interface SqlDatabaseResource has a new optional parameter createMode + - Interface SqlDatabaseResource has a new optional parameter restoreParameters + - Class CosmosDBManagementClient has a new parameter dataTransferJobs + - Class CosmosDBManagementClient has a new parameter graphResources + - Class CosmosDBManagementClient has a new parameter restorableGremlinDatabases + - Class CosmosDBManagementClient has a new parameter restorableGremlinGraphs + - Class CosmosDBManagementClient has a new parameter restorableGremlinResources + - Class CosmosDBManagementClient has a new parameter restorableTableResources + - Class CosmosDBManagementClient has a new parameter restorableTables + - Added Enum KnownContinuousTier + - Added Enum KnownDataTransferComponent + - Added Enum KnownThroughputPolicyType + - Enum KnownAuthenticationMethod has a new value Ldap + - Enum KnownOperationType has a new value Recreate -### Other Changes +**Breaking Changes** + - Interface DatabaseAccountCreateUpdateParameters no longer has parameter identity + - Interface DatabaseAccountGetResults no longer has parameter identity + - Interface RestoreParameters no longer has parameter restoreSource + - Interface RestoreParameters no longer has parameter restoreTimestampInUtc + + ## 15.2.0 (2022-09-05) **Features** diff --git a/sdk/cosmosdb/arm-cosmosdb/README.md b/sdk/cosmosdb/arm-cosmosdb/README.md index e8aca66f9f85..e0995ed3c9b6 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 a317f789b44b..d75e550fbab7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/_meta.json +++ b/sdk/cosmosdb/arm-cosmosdb/_meta.json @@ -1,8 +1,8 @@ { - "commit": "504c68706d55cb11e0cd4e4265c2c9a218dd2378", + "commit": "a92bd9c31b39fa3cf5a4c5800aaf981a14f06423", "readme": "specification/cosmos-db/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --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.0-rc.1.20220727.1 --generate-sample=true", + "autorest_command": "autorest --version=3.8.4 --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.0-rc.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.1.20220727.1" + "use": "@autorest/typescript@6.0.0-rc.1" } \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 9494afefaffa..139b65aad091 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CosmosDBManagementClient.", - "version": "15.2.1", + "version": "16.0.0-beta.4", "engines": { "node": ">=12.0.0" }, @@ -36,7 +36,7 @@ "mkdirp": "^1.0.4", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", - "typescript": "~4.6.0", + "typescript": "~4.2.0", "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", @@ -109,13 +109,5 @@ } ] }, - "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview" - } -} + "autoPublish": true +} \ 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 0d76f7f60486..3e0503627268 100644 --- a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md +++ b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md @@ -41,6 +41,7 @@ export interface ARMProxyResource { // @public export interface ARMResourceProperties { readonly id?: string; + identity?: ManagedServiceIdentity; location?: string; readonly name?: string; tags?: { @@ -52,6 +53,18 @@ export interface ARMResourceProperties { // @public export type AuthenticationMethod = string; +// @public +export interface AuthenticationMethodLdapProperties { + searchBaseDistinguishedName?: string; + searchFilterTemplate?: string; + // (undocumented) + serverCertificates?: Certificate[]; + serverHostname?: string; + serverPort?: number; + serviceUserDistinguishedName?: string; + serviceUserPassword?: string; +} + // @public (undocumented) export interface AutoscaleSettings { maxThroughput?: number; @@ -69,6 +82,15 @@ export interface AutoUpgradePolicyResource { throughputPolicy?: ThroughputPolicyResource; } +// @public +export interface AzureBlobDataTransferDataSourceSink extends DataTransferDataSourceSink { + component: "AzureBlobStorage"; + // (undocumented) + containerName: string; + // (undocumented) + endpointUrl?: string; +} + // @public export interface BackupInformation { readonly continuousBackupInformation?: ContinuousBackupInformation; @@ -96,6 +118,17 @@ export type BackupPolicyType = string; // @public (undocumented) export type BackupPolicyUnion = BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; +// @public +export interface BackupResource extends ARMProxyResource { + // (undocumented) + properties?: BackupResourceProperties; +} + +// @public (undocumented) +export interface BackupResourceProperties { + timestamp?: Date; +} + // @public export type BackupStorageRedundancy = string; @@ -142,6 +175,8 @@ export interface CassandraClusters { 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; + listBackups(resourceGroupName: string, clusterName: string, options?: CassandraClustersListBackupsOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: CassandraClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; status(resourceGroupName: string, clusterName: string, options?: CassandraClustersStatusOptionalParams): Promise; @@ -168,6 +203,13 @@ export interface CassandraClustersDeleteOptionalParams extends coreClient.Operat updateIntervalInMs?: number; } +// @public +export interface CassandraClustersGetBackupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersGetBackupResponse = BackupResource; + // @public export interface CassandraClustersGetOptionalParams extends coreClient.OperationOptions { } @@ -184,6 +226,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 { } @@ -313,10 +362,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, void>>; beginDeleteCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise; beginDeleteCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise, void>>; 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>>; @@ -325,16 +378,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 @@ -355,6 +417,15 @@ export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams exte // @public export type CassandraResourcesCreateUpdateCassandraTableResponse = CassandraTableGetResults; +// @public +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesCreateUpdateCassandraViewResponse = CassandraViewGetResults; + // @public export interface CassandraResourcesDeleteCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -367,6 +438,12 @@ export interface CassandraResourcesDeleteCassandraTableOptionalParams extends co updateIntervalInMs?: number; } +// @public +export interface CassandraResourcesDeleteCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface CassandraResourcesGetCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { } @@ -395,6 +472,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 { } @@ -409,6 +500,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 CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -445,6 +543,24 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption // @public export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = ThroughputSettingsGetResults; + +// @public +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -463,6 +579,15 @@ export interface CassandraResourcesUpdateCassandraTableThroughputOptionalParams // @public export type CassandraResourcesUpdateCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesUpdateCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraSchema { clusterKeys?: ClusterKey[]; @@ -505,11 +630,86 @@ 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 (undocumented) +export interface ClientEncryptionIncludedPath { + clientEncryptionKeyId: string; + encryptionAlgorithm: string; + encryptionType: string; + path: string; +} + +// @public +export interface ClientEncryptionKeyCreateUpdateParameters { + resource: ClientEncryptionKeyResource; +} + +// @public (undocumented) +export interface ClientEncryptionKeyGetPropertiesResource extends ClientEncryptionKeyResource, ExtendedResourceProperties { +} + +// @public +export interface ClientEncryptionKeyGetResults extends ARMProxyResource { + // (undocumented) + resource?: ClientEncryptionKeyGetPropertiesResource; +} + +// @public +export interface ClientEncryptionKeyResource { + encryptionAlgorithm?: string; + id?: string; + keyWrapMetadata?: KeyWrapMetadata; + wrappedDataEncryptionKey?: Uint8Array; +} + +// @public +export interface ClientEncryptionKeysListResult { + readonly value?: ClientEncryptionKeyGetResults[]; +} + +// @public +export interface ClientEncryptionPolicy { + includedPaths: ClientEncryptionIncludedPath[]; + policyFormatVersion?: number; +} + // @public export interface CloudError { error?: ErrorResponse; @@ -732,9 +932,18 @@ export interface ContinuousBackupRestoreLocation { // @public export interface ContinuousModeBackupPolicy extends BackupPolicy { + continuousModeProperties?: ContinuousModeProperties; type: "Continuous"; } +// @public +export interface ContinuousModeProperties { + tier?: ContinuousTier; +} + +// @public +export type ContinuousTier = string; + // @public export interface CorsPolicy { allowedHeaders?: string; @@ -744,6 +953,15 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +// @public +export interface CosmosCassandraDataTransferDataSourceSink extends DataTransferDataSourceSink { + component: "CosmosDBCassandra"; + // (undocumented) + keyspaceName: string; + // (undocumented) + tableName: string; +} + // @public (undocumented) export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -772,6 +990,10 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) databaseAccounts: DatabaseAccounts; // (undocumented) + dataTransferJobs: DataTransferJobs; + // (undocumented) + graphResources: GraphResources; + // (undocumented) gremlinResources: GremlinResources; // (undocumented) locations: Locations; @@ -798,6 +1020,12 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) restorableDatabaseAccounts: RestorableDatabaseAccounts; // (undocumented) + restorableGremlinDatabases: RestorableGremlinDatabases; + // (undocumented) + restorableGremlinGraphs: RestorableGremlinGraphs; + // (undocumented) + restorableGremlinResources: RestorableGremlinResources; + // (undocumented) restorableMongodbCollections: RestorableMongodbCollections; // (undocumented) restorableMongodbDatabases: RestorableMongodbDatabases; @@ -810,6 +1038,10 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) restorableSqlResources: RestorableSqlResources; // (undocumented) + restorableTableResources: RestorableTableResources; + // (undocumented) + restorableTables: RestorableTables; + // (undocumented) service: Service; // (undocumented) sqlResources: SqlResources; @@ -826,9 +1058,23 @@ export interface CosmosDBManagementClientOptionalParams extends coreClient.Servi endpoint?: string; } +// @public +export interface CosmosSqlDataTransferDataSourceSink extends DataTransferDataSourceSink { + 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; @@ -864,15 +1110,16 @@ export interface DatabaseAccountCreateUpdateParameters extends ARMResourceProper createMode?: CreateMode; databaseAccountOfferType: "Standard"; defaultIdentity?: string; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; enableAutomaticFailover?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; - identity?: ManagedServiceIdentity; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; readonly keysMetadata?: DatabaseAccountKeysMetadata; @@ -899,6 +1146,7 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { createMode?: CreateMode; readonly databaseAccountOfferType?: "Standard"; defaultIdentity?: string; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; readonly documentEndpoint?: string; @@ -906,10 +1154,10 @@ export interface DatabaseAccountGetResults extends ARMResourceProperties { enableAutomaticFailover?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; readonly failoverPolicies?: FailoverPolicy[]; - identity?: ManagedServiceIdentity; readonly instanceId?: string; ipRules?: IpAddressOrRange[]; isVirtualNetworkFilterEnabled?: boolean; @@ -1147,12 +1395,14 @@ export interface DatabaseAccountUpdateParameters { consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; defaultIdentity?: string; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; enableAutomaticFailover?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; enablePartitionMerge?: boolean; identity?: ManagedServiceIdentity; @@ -1206,6 +1456,7 @@ export interface DataCenterResource extends ARMProxyResource { // @public export interface DataCenterResourceProperties { + authenticationMethodLdapProperties?: AuthenticationMethodLdapProperties; availabilityZone?: boolean; backupStorageCustomerKeyUri?: string; base64EncodedCassandraYamlFragment?: string; @@ -1220,6 +1471,108 @@ export interface DataCenterResourceProperties { sku?: string; } +// @public +export type DataTransferComponent = string; + +// @public +export interface DataTransferDataSourceSink { + component: "CosmosDBCassandra" | "CosmosDBSql" | "AzureBlobStorage"; +} + +// @public (undocumented) +export type DataTransferDataSourceSinkUnion = DataTransferDataSourceSink | CosmosCassandraDataTransferDataSourceSink | CosmosSqlDataTransferDataSourceSink | AzureBlobDataTransferDataSourceSink; + +// @public +export interface DataTransferJobFeedResults { + readonly nextLink?: string; + readonly value?: DataTransferJobGetResults[]; +} + +// @public +export interface DataTransferJobGetResults extends ARMProxyResource { + destination?: DataTransferDataSourceSinkUnion; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + readonly processedCount?: number; + source?: DataTransferDataSourceSinkUnion; + readonly status?: string; + readonly totalCount?: number; + workerCount?: number; +} + +// @public +export interface DataTransferJobProperties { + destination: DataTransferDataSourceSinkUnion; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + 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; + 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 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 { } @@ -1241,6 +1594,14 @@ export type DataType = string; // @public export type DefaultConsistencyLevel = "Eventual" | "Session" | "BoundedStaleness" | "Strong" | "ConsistentPrefix"; +// @public +export interface DiagnosticLogSettings { + enableFullTextQuery?: EnableFullTextQuery; +} + +// @public +export type EnableFullTextQuery = "None" | "True" | "False"; + // @public export interface ErrorResponse { code?: string; @@ -1288,6 +1649,77 @@ export interface GraphAPIComputeServiceResourceProperties extends ServiceResourc 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 GraphResourcesCreateUpdateGraphOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesDeleteGraphResourceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GraphResourcesGetGraphOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesListGraphsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; + +// @public +export interface GraphResourcesListResult { + readonly value?: GraphResourceGetResults[]; +} + // @public export interface GremlinDatabaseCreateUpdateParameters extends ARMResourceProperties { options?: CreateUpdateOptions; @@ -1320,6 +1752,12 @@ export interface GremlinDatabaseResource { id: string; } +// @public +export interface GremlinDatabaseRestoreResource { + databaseName?: string; + graphNames?: string[]; +} + // @public export interface GremlinGraphCreateUpdateParameters extends ARMResourceProperties { options?: CreateUpdateOptions; @@ -1376,6 +1814,8 @@ export interface GremlinResources { beginMigrateGremlinGraphToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams): Promise; beginMigrateGremlinGraphToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams): Promise, GremlinResourcesMigrateGremlinGraphToManualThroughputResponse>>; beginMigrateGremlinGraphToManualThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams): Promise; + beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, location: ContinuousBackupRestoreLocation, options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, GremlinResourcesRetrieveContinuousBackupInformationResponse>>; + beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, location: ContinuousBackupRestoreLocation, options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; beginUpdateGremlinDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams): Promise, GremlinResourcesUpdateGremlinDatabaseThroughputResponse>>; beginUpdateGremlinDatabaseThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams): Promise; beginUpdateGremlinGraphThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: GremlinResourcesUpdateGremlinGraphThroughputOptionalParams): Promise, GremlinResourcesUpdateGremlinGraphThroughputResponse>>; @@ -1496,6 +1936,15 @@ export interface GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalPa // @public export type GremlinResourcesMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface GremlinResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GremlinResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + // @public export interface GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1551,6 +2000,14 @@ export interface IpAddressOrRange { // @public export type KeyKind = string; +// @public +export interface KeyWrapMetadata { + algorithm?: string; + name?: string; + type?: string; + value?: string; +} + // @public export enum KnownAnalyticalStorageSchemaType { FullFidelity = "FullFidelity", @@ -1570,6 +2027,7 @@ export enum KnownApiType { // @public export enum KnownAuthenticationMethod { Cassandra = "Cassandra", + Ldap = "Ldap", None = "None" } @@ -1621,6 +2079,12 @@ export enum KnownConnectorOffer { Small = "Small" } +// @public +export enum KnownContinuousTier { + Continuous30Days = "Continuous30Days", + Continuous7Days = "Continuous7Days" +} + // @public export enum KnownCreatedByType { Application = "Application", @@ -1642,6 +2106,13 @@ export enum KnownDatabaseAccountKind { Parse = "Parse" } +// @public +export enum KnownDataTransferComponent { + AzureBlobStorage = "AzureBlobStorage", + CosmosDBCassandra = "CosmosDBCassandra", + CosmosDBSql = "CosmosDBSql" +} + // @public export enum KnownDataType { LineString = "LineString", @@ -1714,6 +2185,7 @@ export enum KnownNotebookWorkspaceName { export enum KnownOperationType { Create = "Create", Delete = "Delete", + Recreate = "Recreate", Replace = "Replace", SystemOperation = "SystemOperation" } @@ -1787,6 +2259,13 @@ export enum KnownSpatialType { Polygon = "Polygon" } +// @public +export enum KnownThroughputPolicyType { + Custom = "custom", + Equal = "equal", + None = "none" +} + // @public export enum KnownTriggerOperation { All = "All", @@ -1813,6 +2292,11 @@ export enum KnownUnitType { Seconds = "Seconds" } +// @public +export interface ListBackups { + readonly value?: BackupResource[]; +} + // @public export interface ListClusters { value?: ClusterResource[]; @@ -1848,6 +2332,7 @@ export interface LocationListResult { export interface LocationProperties { readonly backupStorageRedundancies?: BackupStorageRedundancy[]; readonly isResidencyRestricted?: boolean; + readonly status?: string; readonly supportsAvailabilityZone?: boolean; } @@ -1933,6 +2418,11 @@ export interface MaterializedViewsBuilderServiceResourceProperties extends Servi serviceType: "MaterializedViewsBuilder"; } +// @public +export interface MergeParameters { + isDryRun?: boolean; +} + // @public export interface Metric { readonly endTime?: Date; @@ -2014,8 +2504,10 @@ export interface MongoDBCollectionListResult { // @public export interface MongoDBCollectionResource { analyticalStorageTtl?: number; + createMode?: CreateMode; id: string; indexes?: MongoIndex[]; + restoreParameters?: ResourceRestoreParameters; shardKey?: { [propertyName: string]: string; }; @@ -2050,7 +2542,9 @@ export interface MongoDBDatabaseListResult { // @public export interface MongoDBDatabaseResource { + createMode?: CreateMode; id: string; + restoreParameters?: ResourceRestoreParameters; } // @public @@ -2071,6 +2565,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>>; @@ -2079,6 +2575,14 @@ 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; + 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>>; @@ -2197,7 +2701,16 @@ export interface MongoDBResourcesGetMongoUserDefinitionOptionalParams extends co } // @public -export type MongoDBResourcesGetMongoUserDefinitionResponse = MongoUserDefinitionGetResults; +export type MongoDBResourcesGetMongoUserDefinitionResponse = MongoUserDefinitionGetResults; + +// @public +export interface MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesListMongoDBCollectionPartitionMergeResponse = PhysicalPartitionStorageInfoCollection; // @public export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions { @@ -2263,6 +2776,42 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona // @public export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBContainerRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @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; @@ -2632,6 +3181,42 @@ export interface Permission { 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 PhysicalPartitionThroughputInfoResult extends ARMResourceProperties { + resource?: PhysicalPartitionThroughputInfoResultPropertiesResource; +} + +// @public +export interface PhysicalPartitionThroughputInfoResultPropertiesResource extends PhysicalPartitionThroughputInfoProperties { +} + // @public export type PrimaryAggregationType = string; @@ -2750,6 +3335,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; @@ -2772,6 +3369,10 @@ export interface Resource { // @public export type ResourceIdentityType = "SystemAssigned" | "UserAssigned" | "SystemAssigned,UserAssigned" | "None"; +// @public +export interface ResourceRestoreParameters extends RestoreParametersBase { +} + // @public export interface RestorableDatabaseAccountGetResult { accountName?: string; @@ -2781,6 +3382,7 @@ export interface RestorableDatabaseAccountGetResult { readonly id?: string; location?: string; readonly name?: string; + oldestRestorableTime?: Date; readonly restorableLocations?: RestorableLocationResource[]; readonly type?: string; } @@ -2818,6 +3420,105 @@ export interface RestorableDatabaseAccountsListResult { readonly value?: RestorableDatabaseAccountGetResult[]; } +// @public +export interface RestorableGremlinDatabaseGetResult { + readonly id?: string; + readonly name?: string; + resource?: RestorableGremlinDatabasePropertiesResource; + readonly type?: string; +} + +// @public +export interface RestorableGremlinDatabasePropertiesResource { + readonly eventTimestamp?: string; + readonly operationType?: OperationType; + readonly ownerId?: string; + readonly ownerResourceId?: string; + readonly rid?: string; +} + +// @public +export interface RestorableGremlinDatabases { + list(location: string, instanceId: string, options?: RestorableGremlinDatabasesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableGremlinDatabasesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorableGremlinDatabasesListResponse = RestorableGremlinDatabasesListResult; + +// @public +export interface RestorableGremlinDatabasesListResult { + readonly value?: RestorableGremlinDatabaseGetResult[]; +} + +// @public +export interface RestorableGremlinGraphGetResult { + readonly id?: string; + readonly name?: string; + resource?: RestorableGremlinGraphPropertiesResource; + readonly type?: string; +} + +// @public +export interface RestorableGremlinGraphPropertiesResource { + readonly eventTimestamp?: string; + readonly operationType?: OperationType; + readonly ownerId?: string; + readonly ownerResourceId?: string; + readonly rid?: string; +} + +// @public +export interface RestorableGremlinGraphs { + list(location: string, instanceId: string, options?: RestorableGremlinGraphsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableGremlinGraphsListOptionalParams extends coreClient.OperationOptions { + endTime?: string; + restorableGremlinDatabaseRid?: string; + startTime?: string; +} + +// @public +export type RestorableGremlinGraphsListResponse = RestorableGremlinGraphsListResult; + +// @public +export interface RestorableGremlinGraphsListResult { + readonly value?: RestorableGremlinGraphGetResult[]; +} + +// @public +export interface RestorableGremlinResources { + list(location: string, instanceId: string, options?: RestorableGremlinResourcesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableGremlinResourcesGetResult { + databaseName?: string; + graphNames?: string[]; + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface RestorableGremlinResourcesListOptionalParams extends coreClient.OperationOptions { + restoreLocation?: string; + restoreTimestampInUtc?: string; +} + +// @public +export type RestorableGremlinResourcesListResponse = RestorableGremlinResourcesListResult; + +// @public +export interface RestorableGremlinResourcesListResult { + readonly value?: RestorableGremlinResourcesGetResult[]; +} + // @public export interface RestorableLocationResource { readonly creationTime?: Date; @@ -2850,7 +3551,9 @@ export interface RestorableMongodbCollections { // @public export interface RestorableMongodbCollectionsListOptionalParams extends coreClient.OperationOptions { + endTime?: string; restorableMongodbDatabaseRid?: string; + startTime?: string; } // @public @@ -3036,17 +3739,95 @@ export interface RestorableSqlResourcesListResult { readonly value?: RestorableSqlResourcesGetResult[]; } +// @public +export interface RestorableTableGetResult { + readonly id?: string; + readonly name?: string; + resource?: RestorableTablePropertiesResource; + readonly type?: string; +} + +// @public +export interface RestorableTablePropertiesResource { + readonly eventTimestamp?: string; + readonly operationType?: OperationType; + readonly ownerId?: string; + readonly ownerResourceId?: string; + readonly rid?: string; +} + +// @public +export interface RestorableTableResources { + list(location: string, instanceId: string, options?: RestorableTableResourcesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableTableResourcesGetResult { + readonly id?: string; + readonly name?: string; + readonly type?: string; +} + +// @public +export interface RestorableTableResourcesListOptionalParams extends coreClient.OperationOptions { + restoreLocation?: string; + restoreTimestampInUtc?: string; +} + +// @public +export type RestorableTableResourcesListResponse = RestorableTableResourcesListResult; + +// @public +export interface RestorableTableResourcesListResult { + readonly value?: RestorableTableResourcesGetResult[]; +} + +// @public +export interface RestorableTables { + list(location: string, instanceId: string, options?: RestorableTablesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableTablesListOptionalParams extends coreClient.OperationOptions { + endTime?: string; + startTime?: string; +} + +// @public +export type RestorableTablesListResponse = RestorableTablesListResult; + +// @public +export interface RestorableTablesListResult { + readonly value?: RestorableTableGetResult[]; +} + // @public export type RestoreMode = string; // @public -export interface RestoreParameters { +export interface RestoreParameters extends RestoreParametersBase { databasesToRestore?: DatabaseRestoreResource[]; + gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; restoreMode?: RestoreMode; + tablesToRestore?: string[]; +} + +// @public +export interface RestoreParametersBase { restoreSource?: string; restoreTimestampInUtc?: Date; } +// @public +export interface RetrieveThroughputParameters extends ARMResourceProperties { + resource: RetrieveThroughputPropertiesResource; +} + +// @public +export interface RetrieveThroughputPropertiesResource { + physicalPartitionIds: PhysicalPartitionId[]; +} + // @public export interface Role { db?: string; @@ -3181,11 +3962,14 @@ export interface SqlContainerListResult { // @public export interface SqlContainerResource { analyticalStorageTtl?: number; + clientEncryptionPolicy?: ClientEncryptionPolicy; conflictResolutionPolicy?: ConflictResolutionPolicy; + createMode?: CreateMode; defaultTtl?: number; id: string; indexingPolicy?: IndexingPolicy; partitionKey?: ContainerPartitionKey; + restoreParameters?: ResourceRestoreParameters; uniqueKeyPolicy?: UniqueKeyPolicy; } @@ -3220,7 +4004,9 @@ export interface SqlDatabaseListResult { // @public export interface SqlDatabaseResource { + createMode?: CreateMode; id: string; + restoreParameters?: ResourceRestoreParameters; } // @public @@ -3242,6 +4028,8 @@ export interface SqlDedicatedGatewayServiceResourceProperties extends ServiceRes // @public export interface SqlResources { + beginCreateUpdateClientEncryptionKey(resourceGroupName: string, accountName: string, databaseName: string, clientEncryptionKeyName: string, createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams): Promise, SqlResourcesCreateUpdateClientEncryptionKeyResponse>>; + beginCreateUpdateClientEncryptionKeyAndWait(resourceGroupName: string, accountName: string, databaseName: string, clientEncryptionKeyName: string, createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams): Promise; beginCreateUpdateSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters, options?: SqlResourcesCreateUpdateSqlContainerOptionalParams): Promise, SqlResourcesCreateUpdateSqlContainerResponse>>; beginCreateUpdateSqlContainerAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters, options?: SqlResourcesCreateUpdateSqlContainerOptionalParams): Promise; beginCreateUpdateSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateSqlDatabaseParameters: SqlDatabaseCreateUpdateParameters, options?: SqlResourcesCreateUpdateSqlDatabaseOptionalParams): Promise, SqlResourcesCreateUpdateSqlDatabaseResponse>>; @@ -3270,6 +4058,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, void>>; 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>>; @@ -3280,10 +4070,19 @@ 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; + 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>>; beginUpdateSqlDatabaseThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlDatabaseThroughputOptionalParams): Promise; + getClientEncryptionKey(resourceGroupName: string, accountName: string, databaseName: string, clientEncryptionKeyName: string, options?: SqlResourcesGetClientEncryptionKeyOptionalParams): Promise; getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesGetSqlContainerOptionalParams): Promise; getSqlContainerThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesGetSqlContainerThroughputOptionalParams): Promise; getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesGetSqlDatabaseOptionalParams): Promise; @@ -3293,6 +4092,7 @@ export interface SqlResources { getSqlStoredProcedure(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, storedProcedureName: string, options?: SqlResourcesGetSqlStoredProcedureOptionalParams): Promise; getSqlTrigger(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, triggerName: string, options?: SqlResourcesGetSqlTriggerOptionalParams): Promise; getSqlUserDefinedFunction(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: SqlResourcesGetSqlUserDefinedFunctionOptionalParams): Promise; + listClientEncryptionKeys(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesListClientEncryptionKeysOptionalParams): PagedAsyncIterableIterator; listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesListSqlContainersOptionalParams): PagedAsyncIterableIterator; listSqlDatabases(resourceGroupName: string, accountName: string, options?: SqlResourcesListSqlDatabasesOptionalParams): PagedAsyncIterableIterator; listSqlRoleAssignments(resourceGroupName: string, accountName: string, options?: SqlResourcesListSqlRoleAssignmentsOptionalParams): PagedAsyncIterableIterator; @@ -3302,6 +4102,15 @@ export interface SqlResources { listSqlUserDefinedFunctions(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesListSqlUserDefinedFunctionsOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; + // @public export interface SqlResourcesCreateUpdateSqlContainerOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3407,6 +4216,13 @@ export interface SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams extends updateIntervalInMs?: number; } +// @public +export interface SqlResourcesGetClientEncryptionKeyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlResourcesGetClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; + // @public export interface SqlResourcesGetSqlContainerOptionalParams extends coreClient.OperationOptions { } @@ -3470,6 +4286,22 @@ export interface SqlResourcesGetSqlUserDefinedFunctionOptionalParams extends cor // @public export type SqlResourcesGetSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults; +// @public +export interface SqlResourcesListClientEncryptionKeysOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlResourcesListClientEncryptionKeysResponse = ClientEncryptionKeysListResult; + +// @public +export interface SqlResourcesListSqlContainerPartitionMergeOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesListSqlContainerPartitionMergeResponse = PhysicalPartitionStorageInfoCollection; + // @public export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions { } @@ -3564,6 +4396,42 @@ export interface SqlResourcesRetrieveContinuousBackupInformationOptionalParams e // @public export type SqlResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; +// @public +export interface SqlResourcesSqlContainerRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlContainerRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlContainerRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +// @public +export interface SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + // @public export interface SqlResourcesUpdateSqlContainerThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3757,6 +4625,8 @@ export interface TableResources { beginMigrateTableToAutoscaleAndWait(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToAutoscaleOptionalParams): Promise; beginMigrateTableToManualThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams): Promise, TableResourcesMigrateTableToManualThroughputResponse>>; beginMigrateTableToManualThroughputAndWait(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams): Promise; + beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, tableName: string, location: ContinuousBackupRestoreLocation, options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, TableResourcesRetrieveContinuousBackupInformationResponse>>; + beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, tableName: string, location: ContinuousBackupRestoreLocation, options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; beginUpdateTableThroughput(resourceGroupName: string, accountName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: TableResourcesUpdateTableThroughputOptionalParams): Promise, TableResourcesUpdateTableThroughputResponse>>; beginUpdateTableThroughputAndWait(resourceGroupName: string, accountName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: TableResourcesUpdateTableThroughputOptionalParams): Promise; getTable(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesGetTableOptionalParams): Promise; @@ -3818,6 +4688,15 @@ export interface TableResourcesMigrateTableToManualThroughputOptionalParams exte // @public export type TableResourcesMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TableResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + // @public export interface TableResourcesUpdateTableThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3833,6 +4712,9 @@ export interface ThroughputPolicyResource { isEnabled?: boolean; } +// @public +export type ThroughputPolicyType = string; + // @public (undocumented) export interface ThroughputSettingsGetPropertiesResource extends ThroughputSettingsResource, ExtendedResourceProperties { } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index cd299a5dd58c..464add3ed180 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -28,12 +28,14 @@ import { CollectionPartitionImpl, PartitionKeyRangeIdImpl, PartitionKeyRangeIdRegionImpl, + GraphResourcesImpl, SqlResourcesImpl, MongoDBResourcesImpl, TableResourcesImpl, CassandraResourcesImpl, GremlinResourcesImpl, LocationsImpl, + DataTransferJobsImpl, CassandraClustersImpl, CassandraDataCentersImpl, NotebookWorkspacesImpl, @@ -46,6 +48,11 @@ import { RestorableMongodbDatabasesImpl, RestorableMongodbCollectionsImpl, RestorableMongodbResourcesImpl, + RestorableGremlinDatabasesImpl, + RestorableGremlinGraphsImpl, + RestorableGremlinResourcesImpl, + RestorableTablesImpl, + RestorableTableResourcesImpl, ServiceImpl } from "./operations"; import { @@ -62,12 +69,14 @@ import { CollectionPartition, PartitionKeyRangeId, PartitionKeyRangeIdRegion, + GraphResources, SqlResources, MongoDBResources, TableResources, CassandraResources, GremlinResources, Locations, + DataTransferJobs, CassandraClusters, CassandraDataCenters, NotebookWorkspaces, @@ -80,6 +89,11 @@ import { RestorableMongodbDatabases, RestorableMongodbCollections, RestorableMongodbResources, + RestorableGremlinDatabases, + RestorableGremlinGraphs, + RestorableGremlinResources, + RestorableTables, + RestorableTableResources, Service } from "./operationsInterfaces"; import { CosmosDBManagementClientOptionalParams } from "./models"; @@ -116,7 +130,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-cosmosdb/15.2.1`; + const packageDetails = `azsdk-js-arm-cosmosdb/16.0.0-beta.4`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -136,41 +150,34 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { }; super(optionsWithDefaults); - let bearerTokenAuthenticationPolicyFound: boolean = false; if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) { const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies(); - bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( + const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some( (pipelinePolicy) => pipelinePolicy.name === coreRestPipeline.bearerTokenAuthenticationPolicyName ); - } - if ( - !options || - !options.pipeline || - options.pipeline.getOrderedPolicies().length == 0 || - !bearerTokenAuthenticationPolicyFound - ) { - this.pipeline.removePolicy({ - name: coreRestPipeline.bearerTokenAuthenticationPolicyName - }); - this.pipeline.addPolicy( - coreRestPipeline.bearerTokenAuthenticationPolicy({ - credential: credentials, - scopes: `${optionsWithDefaults.credentialScopes}`, - challengeCallbacks: { - authorizeRequestOnChallenge: - coreClient.authorizeRequestOnClaimChallenge - } - }) - ); + if (!bearerTokenAuthenticationPolicyFound) { + this.pipeline.removePolicy({ + name: coreRestPipeline.bearerTokenAuthenticationPolicyName + }); + this.pipeline.addPolicy( + coreRestPipeline.bearerTokenAuthenticationPolicy({ + scopes: `${optionsWithDefaults.baseUri}/.default`, + challengeCallbacks: { + authorizeRequestOnChallenge: + coreClient.authorizeRequestOnClaimChallenge + } + }) + ); + } } // Parameter assignments this.subscriptionId = subscriptionId; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2022-08-15"; + this.apiVersion = options.apiVersion || "2022-08-15-preview"; this.databaseAccounts = new DatabaseAccountsImpl(this); this.operations = new OperationsImpl(this); this.database = new DatabaseImpl(this); @@ -184,12 +191,14 @@ 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.notebookWorkspaces = new NotebookWorkspacesImpl(this); @@ -204,6 +213,11 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { this ); this.restorableMongodbResources = new RestorableMongodbResourcesImpl(this); + this.restorableGremlinDatabases = new RestorableGremlinDatabasesImpl(this); + this.restorableGremlinGraphs = new RestorableGremlinGraphsImpl(this); + this.restorableGremlinResources = new RestorableGremlinResourcesImpl(this); + this.restorableTables = new RestorableTablesImpl(this); + this.restorableTableResources = new RestorableTableResourcesImpl(this); this.service = new ServiceImpl(this); this.addCustomApiVersionPolicy(options.apiVersion); } @@ -249,12 +263,14 @@ 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; notebookWorkspaces: NotebookWorkspaces; @@ -267,5 +283,10 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { restorableMongodbDatabases: RestorableMongodbDatabases; restorableMongodbCollections: RestorableMongodbCollections; restorableMongodbResources: RestorableMongodbResources; + restorableGremlinDatabases: RestorableGremlinDatabases; + restorableGremlinGraphs: RestorableGremlinGraphs; + restorableGremlinResources: RestorableGremlinResources; + restorableTables: RestorableTables; + restorableTableResources: RestorableTableResources; service: Service; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 75cd66a6ac45..73a7babb64c5 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 + | CosmosCassandraDataTransferDataSourceSink + | CosmosSqlDataTransferDataSourceSink + | AzureBlobDataTransferDataSourceSink; export type ServiceResourcePropertiesUnion = | ServiceResourceProperties | DataTransferServiceResourceProperties @@ -19,39 +24,6 @@ export type ServiceResourcePropertiesUnion = | GraphAPIComputeServiceResourceProperties | MaterializedViewsBuilderServiceResourceProperties; -/** 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; -} - /** IpAddressOrRange object */ export interface IpAddressOrRange { /** A single IPv4 address or a single IPv4 address range in CIDR format. Provided IPs must be well-formatted and cannot be contained in one of the following ranges: 10.0.0.0/8, 100.64.0.0/10, 172.16.0.0/12, 192.168.0.0/16, since these are not enforceable by the IP address filter. Example of valid inputs: “23.40.210.245” or “23.40.210.0/8”. */ @@ -169,18 +141,6 @@ export interface AnalyticalStorageConfiguration { schemaType?: AnalyticalStorageSchemaType; } -/** Parameters to indicate the information about the restore. */ -export interface RestoreParameters { - /** Describes the mode of the restore. */ - restoreMode?: RestoreMode; - /** The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} */ - restoreSource?: string; - /** Time to which the account has to be restored (ISO-8601 format). */ - restoreTimestampInUtc?: Date; - /** List of specific databases available for restore. */ - databasesToRestore?: DatabaseRestoreResource[]; -} - /** Specific Databases to restore. */ export interface DatabaseRestoreResource { /** The name of the database available for restore. */ @@ -189,6 +149,22 @@ export interface DatabaseRestoreResource { collectionNames?: string[]; } +/** Specific Gremlin Databases to restore. */ +export interface GremlinDatabaseRestoreResource { + /** The name of the gremlin database available for restore. */ + databaseName?: string; + /** The names of the graphs available for restore. */ + graphNames?: string[]; +} + +/** Parameters to indicate the information about the restore. */ +export interface RestoreParametersBase { + /** The id of the restorable database account from which the restore has to be initiated. For example: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName} */ + restoreSource?: string; + /** Time to which the account has to be restored (ISO-8601 format). */ + restoreTimestampInUtc?: Date; +} + /** The object representing the policy for taking backups on an account. */ export interface BackupPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -221,6 +197,12 @@ 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. */ @@ -297,6 +279,41 @@ 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. */ @@ -351,10 +368,14 @@ 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; + /** 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. @@ -703,6 +724,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. */ + autoscaleSettings?: AutoscaleSettings; +} + /** The List operation response, that contains the SQL databases and their properties. */ export interface SqlDatabaseListResult { /** @@ -716,6 +773,10 @@ export interface SqlDatabaseListResult { export interface SqlDatabaseResource { /** Name of the Cosmos DB SQL database */ id: string; + /** Parameters to indicate the information about the restore */ + restoreParameters?: ResourceRestoreParameters; + /** Enum to indicate the mode of resource creation. */ + createMode?: CreateMode; } /** The system generated resource properties associated with SQL databases, SQL containers, Gremlin databases and Gremlin graphs. */ @@ -737,27 +798,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. */ - 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. */ @@ -809,6 +849,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 { /** @@ -832,8 +930,14 @@ export interface SqlContainerResource { uniqueKeyPolicy?: UniqueKeyPolicy; /** The conflict resolution policy for the container. */ conflictResolutionPolicy?: ConflictResolutionPolicy; + /** The client encryption policy for the container. */ + clientEncryptionPolicy?: ClientEncryptionPolicy; /** Analytical TTL. */ analyticalStorageTtl?: number; + /** Parameters to indicate the information about the restore */ + restoreParameters?: ResourceRestoreParameters; + /** Enum to indicate the mode of resource creation. */ + createMode?: CreateMode; } /** Cosmos DB indexing policy */ @@ -926,6 +1030,91 @@ export interface ConflictResolutionPolicy { conflictResolutionProcedure?: string; } +/** Cosmos DB client encryption policy. */ +export interface ClientEncryptionPolicy { + /** Paths of the item that need encryption along with path-specific settings. */ + includedPaths: ClientEncryptionIncludedPath[]; + /** Version of the client encryption policy definition. Please note, user passed value is ignored. Default policy version is 1. */ + policyFormatVersion?: number; +} + +/** . */ +export interface ClientEncryptionIncludedPath { + /** Path that needs to be encrypted. */ + path: string; + /** The identifier of the Client Encryption Key to be used to encrypt the path. */ + clientEncryptionKeyId: string; + /** The type of encryption to be performed. Eg - Deterministic, Randomized. */ + encryptionType: string; + /** The encryption algorithm which will be used. Eg - AEAD_AES_256_CBC_HMAC_SHA256. */ + encryptionAlgorithm: string; +} + +/** 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 physical partitions and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly physicalPartitionStorageInfoCollection?: PhysicalPartitionStorageInfo[]; +} + +/** The storage of a physical partition */ +export interface PhysicalPartitionStorageInfo { + /** + * 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 storage in KB for the physical partition. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly storageInKB?: number; +} + +/** 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. */ export interface SqlStoredProcedureListResult { /** @@ -994,6 +1183,10 @@ export interface MongoDBDatabaseListResult { export interface MongoDBDatabaseResource { /** Name of the Cosmos DB MongoDB database */ id: string; + /** Parameters to indicate the information about the restore */ + restoreParameters?: ResourceRestoreParameters; + /** Enum to indicate the mode of resource creation. */ + createMode?: CreateMode; } /** The List operation response, that contains the MongoDB collections and their properties. */ @@ -1015,6 +1208,10 @@ export interface MongoDBCollectionResource { indexes?: MongoIndex[]; /** Analytical TTL. */ analyticalStorageTtl?: number; + /** Parameters to indicate the information about the restore */ + restoreParameters?: ResourceRestoreParameters; + /** Enum to indicate the mode of resource creation. */ + createMode?: CreateMode; } /** Cosmos DB MongoDB collection index key */ @@ -1175,6 +1372,11 @@ export interface LocationListResult { /** Cosmos DB location metadata */ export interface LocationProperties { + /** + * The current status of location in Azure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; /** * Flag indicating whether the location supports availability zones or not. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1192,23 +1394,81 @@ export interface LocationProperties { readonly backupStorageRedundancies?: BackupStorageRedundancy[]; } -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export interface ARMProxyResource { +/** The List operation response, that contains the Cassandra views and their properties. */ +export interface CassandraViewListResult { /** - * The unique resource identifier of the database account. + * List of Cassandra views and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + 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 { /** - * The name of the database account. + * Job Name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; + readonly jobName?: string; + /** Source DataStore details */ + source: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination: DataTransferDataSourceSinkUnion; /** - * The type of Azure resource. + * Job Status * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + 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; +} + +/** Base class for all DataTransfer source/sink */ +export interface DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBCassandra" | "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. */ @@ -1229,7 +1489,7 @@ export interface ClusterResourceProperties { cassandraVersion?: string; /** If you need to set the clusterName property in cassandra.yaml to something besides the resource name of the cluster, set the value to use on this property. */ clusterNameOverride?: string; - /** Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. */ + /** Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. 'Ldap' is in preview. */ authenticationMethod?: AuthenticationMethod; /** Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'. */ initialCassandraAdminPassword?: string; @@ -1253,7 +1513,7 @@ export interface ClusterResourceProperties { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly seedNodes?: SeedNode[]; - /** Number of hours to wait between taking a backup of the cluster. To disable backups, set this property to 0. */ + /** 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; @@ -1332,13 +1592,27 @@ export interface CommandOutput { commandOutput?: string; } -/** List of managed Cassandra data centers and their properties. */ -export interface ListDataCenters { +/** List of restorable backups for a Cassandra cluster. */ +export interface ListBackups { /** - * Container for array of data centers. + * Container for array of backups. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: DataCenterResource[]; + readonly value?: BackupResource[]; +} + +export interface BackupResourceProperties { + /** The time this backup was taken, formatted like 2021-01-21T17:35:21 */ + timestamp?: Date; +} + +/** List of managed Cassandra data centers and their properties. */ +export interface ListDataCenters { + /** + * Container for array of data centers. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DataCenterResource[]; } /** Properties of a managed Cassandra data center. */ @@ -1368,8 +1642,27 @@ export interface DataCenterResourceProperties { diskSku?: string; /** Number of disk used for data centers. Default value is 4. */ diskCapacity?: number; - /** If the azure data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. */ + /** If the data center has Availability Zone feature, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. */ availabilityZone?: boolean; + /** Ldap authentication method properties. This feature is in preview. */ + authenticationMethodLdapProperties?: AuthenticationMethodLdapProperties; +} + +/** Ldap authentication method properties. This feature is in preview. */ +export interface AuthenticationMethodLdapProperties { + /** Hostname of the LDAP server. */ + serverHostname?: string; + /** Port of the LDAP server. */ + serverPort?: number; + /** Distinguished name of the look up user account, who can look up user details on authentication. */ + serviceUserDistinguishedName?: string; + /** Password of the look up user. */ + serviceUserPassword?: string; + /** Distinguished name of the object to start the recursive search of users from. */ + searchBaseDistinguishedName?: string; + /** Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login. */ + searchFilterTemplate?: string; + serverCertificates?: Certificate[]; } /** Properties of a managed Cassandra cluster public status. */ @@ -1426,7 +1719,7 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa hostID?: string; /** The rack this node is part of. */ rack?: string; - /** The timestamp when these statistics were captured. */ + /** The timestamp at which that snapshot of these usage statistics were taken. */ timestamp?: string; /** The amount of disk used, in kB, of the directory /var/lib/cassandra. */ diskUsedKB?: number; @@ -1444,38 +1737,6 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa cpuUsage?: number; } -/** A list of notebook workspace resources */ -export interface NotebookWorkspaceListResult { - /** Array of notebook workspace resources */ - value?: NotebookWorkspace[]; -} - -/** The connection info for the given notebook workspace */ -export interface NotebookWorkspaceConnectionInfoResult { - /** - * Specifies auth token used for connecting to Notebook server (uses token-based auth). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly authToken?: string; - /** - * Specifies the endpoint of Notebook server. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly notebookServerEndpoint?: string; -} - -/** A list of private endpoint connections */ -export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; -} - -/** A list of private link resources */ -export interface PrivateLinkResourceListResult { - /** Array of private link resources */ - value?: PrivateLinkResource[]; -} - /** The set of data plane operations permitted through this Role Definition. */ export interface Privilege { /** An Azure Cosmos DB Mongo DB Resource. */ @@ -1548,6 +1809,38 @@ export interface MongoUserDefinitionListResult { readonly value?: MongoUserDefinitionGetResults[]; } +/** A list of notebook workspace resources */ +export interface NotebookWorkspaceListResult { + /** Array of notebook workspace resources */ + value?: NotebookWorkspace[]; +} + +/** The connection info for the given notebook workspace */ +export interface NotebookWorkspaceConnectionInfoResult { + /** + * Specifies auth token used for connecting to Notebook server (uses token-based auth). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly authToken?: string; + /** + * Specifies the endpoint of Notebook server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly notebookServerEndpoint?: string; +} + +/** A list of private endpoint connections */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; +} + /** The set of data plane operations permitted through this Role Definition. */ export interface Permission { /** An array of data actions that are allowed. */ @@ -1628,6 +1921,8 @@ export interface RestorableDatabaseAccountGetResult { accountName?: string; /** The creation time of the restorable database account (ISO-8601 format). */ creationTime?: 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; /** @@ -1965,18 +2260,259 @@ export interface RestorableMongodbResourcesListResult { * List of restorable MongoDB resources, including the database and collection names. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RestorableMongodbResourcesGetResult[]; + readonly value?: RestorableMongodbResourcesGetResult[]; +} + +/** Specific Databases to restore. */ +export interface RestorableMongodbResourcesGetResult { + /** + * The unique resource identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * 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; + /** The name of the database available for restore. */ + databaseName?: string; + /** The names of the collections available for restore. */ + collectionNames?: string[]; +} + +/** The List operation response, that contains the Gremlin database events and their properties. */ +export interface RestorableGremlinDatabasesListResult { + /** + * List of Gremlin database events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableGremlinDatabaseGetResult[]; +} + +/** An Azure Cosmos DB Gremlin database event */ +export interface RestorableGremlinDatabaseGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * 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; + /** The resource of an Azure Cosmos DB Gremlin database event */ + resource?: RestorableGremlinDatabasePropertiesResource; +} + +/** The resource of an Azure Cosmos DB Gremlin database event */ +export interface RestorableGremlinDatabasePropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this database event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this database event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this Gremlin database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this Gremlin database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** The List operation response, that contains the Gremlin graph events and their properties. */ +export interface RestorableGremlinGraphsListResult { + /** + * List of Gremlin graph events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableGremlinGraphGetResult[]; +} + +/** An Azure Cosmos DB Gremlin graph event */ +export interface RestorableGremlinGraphGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * 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; + /** The resource of an Azure Cosmos DB Gremlin graph event */ + resource?: RestorableGremlinGraphPropertiesResource; +} + +/** The resource of an Azure Cosmos DB Gremlin graph event */ +export interface RestorableGremlinGraphPropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this graph event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this graph event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this Gremlin graph. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this Gremlin graph. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** The List operation response, that contains the restorable Gremlin resources. */ +export interface RestorableGremlinResourcesListResult { + /** + * List of restorable Gremlin resources, including the gremlin database and graph names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableGremlinResourcesGetResult[]; +} + +/** Specific Databases to restore. */ +export interface RestorableGremlinResourcesGetResult { + /** + * The unique resource identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * 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; + /** The name of the gremlin database available for restore. */ + databaseName?: string; + /** The names of the graphs available for restore. */ + graphNames?: string[]; +} + +/** The List operation response, that contains the Table events and their properties. */ +export interface RestorableTablesListResult { + /** + * List of Table events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableTableGetResult[]; +} + +/** An Azure Cosmos DB Table event */ +export interface RestorableTableGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * 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; + /** The resource of an Azure Cosmos DB Table event */ + resource?: RestorableTablePropertiesResource; +} + +/** The resource of an Azure Cosmos DB Table event */ +export interface RestorableTablePropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this table event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this table event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this Table. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this Table. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** List of restorable table names. */ +export interface RestorableTableResourcesListResult { + /** + * List of restorable table names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableTableResourcesGetResult[]; } /** Specific Databases to restore. */ -export interface RestorableMongodbResourcesGetResult { +export interface RestorableTableResourcesGetResult { /** * The unique resource identifier of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * The name of the ARM resource. + * The name of the Table. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; @@ -1985,10 +2521,6 @@ export interface RestorableMongodbResourcesGetResult { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** The name of the database available for restore. */ - databaseName?: string; - /** The names of the collections available for restore. */ - collectionNames?: string[]; } /** The List operation response, that contains the Service Resource and their properties. */ @@ -2046,6 +2578,12 @@ export interface PeriodicModeProperties { backupStorageRedundancy?: BackupStorageRedundancy; } +/** Configuration values for periodic mode backup */ +export interface ContinuousModeProperties { + /** Enum to indicate type of Continuos backup mode */ + tier?: ContinuousTier; +} + /** Describes the service response property. */ export interface DataTransferServiceResource { /** Properties for DataTransferServiceResource. */ @@ -2092,6 +2630,21 @@ export interface MaterializedViewsBuilderServiceResource { /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export interface ProxyResource extends Resource {} +/** Parameters to indicate the information about the restore. */ +export interface RestoreParameters extends RestoreParametersBase { + /** Describes the mode of the restore. */ + restoreMode?: RestoreMode; + /** List of specific databases available for restore. */ + databasesToRestore?: DatabaseRestoreResource[]; + /** List of specific gremlin databases available for restore. */ + gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; + /** List of specific tables available for restore. */ + tablesToRestore?: string[]; +} + +/** Parameters to indicate the information about the restore. */ +export interface ResourceRestoreParameters extends RestoreParametersBase {} + /** The object representing periodic mode backup policy. */ export interface PeriodicModeBackupPolicy extends BackupPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -2104,14 +2657,14 @@ export interface PeriodicModeBackupPolicy extends BackupPolicy { export interface ContinuousModeBackupPolicy extends BackupPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ type: "Continuous"; + /** Configuration values for continuous mode backup */ + continuousModeProperties?: ContinuousModeProperties; } /** An Azure Cosmos DB database account. */ 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. @@ -2208,10 +2761,14 @@ 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; + /** 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. @@ -2226,8 +2783,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. */ @@ -2276,12 +2831,16 @@ 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; + /** 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. @@ -2291,6 +2850,21 @@ export interface DatabaseAccountCreateUpdateParameters enablePartitionMerge?: 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. */ export interface SqlDatabaseGetResults extends ARMResourceProperties { resource?: SqlDatabaseGetPropertiesResource; @@ -2333,6 +2907,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; @@ -2480,6 +3074,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 { @@ -2562,6 +3171,32 @@ export interface PartitionUsage extends Usage { readonly partitionKeyRangeId?: string; } +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 { @@ -2596,6 +3231,10 @@ export interface ThroughputSettingsGetPropertiesResource extends ThroughputSettingsResource, ExtendedResourceProperties {} +export interface ClientEncryptionKeyGetPropertiesResource + extends ClientEncryptionKeyResource, + ExtendedResourceProperties {} + export interface SqlContainerGetPropertiesResource extends SqlContainerResource, ExtendedResourceProperties {} @@ -2640,6 +3279,10 @@ export interface GremlinGraphGetPropertiesResource extends GremlinGraphResource, ExtendedResourceProperties {} +export interface CassandraViewGetPropertiesResource + extends CassandraViewResource, + ExtendedResourceProperties {} + /** Cosmos DB SQL container resource object */ export interface RestorableSqlContainerPropertiesResourceContainer extends SqlContainerResource, @@ -2651,25 +3294,10 @@ 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; +} /** Cosmos DB location get result */ export interface LocationGetResult extends ARMProxyResource { @@ -2677,47 +3305,61 @@ export interface LocationGetResult extends ARMProxyResource { properties?: LocationProperties; } -/** A managed Cassandra data center. */ -export interface DataCenterResource extends ARMProxyResource { - /** Properties of a managed Cassandra data center. */ - properties?: DataCenterResourceProperties; +/** Parameters to create Data Transfer Job */ +export interface CreateJobRequest extends ARMProxyResource { + /** Data Transfer Create Job Properties */ + properties: DataTransferJobProperties; } -/** A notebook workspace resource */ -export interface NotebookWorkspace extends ARMProxyResource { +/** A Cosmos DB Data Transfer Job */ +export interface DataTransferJobGetResults extends ARMProxyResource { /** - * Specifies the endpoint of Notebook server. + * Job Name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly notebookServerEndpoint?: string; + readonly jobName?: string; + /** Source DataStore details */ + source?: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination?: DataTransferDataSourceSinkUnion; /** - * Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. + * Job Status * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly status?: string; -} - -/** Parameters to create a notebook workspace resource */ -export interface NotebookWorkspaceCreateUpdateParameters - extends ARMProxyResource {} - -/** A private link resource */ -export interface PrivateLinkResource extends ARMProxyResource { /** - * The private link resource group id. + * Processed Count. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly groupId?: string; + readonly processedCount?: number; /** - * The private link resource required member names. + * Total Count. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requiredMembers?: string[]; + readonly totalCount?: number; /** - * The private link resource required zone names. + * Last Updated Time (ISO-8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requiredZoneNames?: string[]; + 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; +} + +/** A restorable backup of a Cassandra cluster. */ +export interface BackupResource extends ARMProxyResource { + properties?: BackupResourceProperties; +} + +/** A managed Cassandra data center. */ +export interface DataCenterResource extends ARMProxyResource { + /** Properties of a managed Cassandra data center. */ + properties?: DataCenterResourceProperties; } /** An Azure Cosmos DB Mongo Role Definition. */ @@ -2750,6 +3392,43 @@ export interface MongoUserDefinitionGetResults extends ARMProxyResource { mechanisms?: string; } +/** A notebook workspace resource */ +export interface NotebookWorkspace extends ARMProxyResource { + /** + * Specifies the endpoint of Notebook server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly notebookServerEndpoint?: string; + /** + * Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; +} + +/** Parameters to create a notebook workspace resource */ +export interface NotebookWorkspaceCreateUpdateParameters + extends ARMProxyResource {} + +/** A private link resource */ +export interface PrivateLinkResource extends ARMProxyResource { + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** + * The private link resource required zone names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredZoneNames?: string[]; +} + /** An Azure Cosmos DB SQL Role Definition. */ export interface SqlRoleDefinitionGetResults extends ARMProxyResource { /** A user-friendly name for the Role Definition. Must be unique for the database account. */ @@ -2778,6 +3457,37 @@ export interface ServiceResource extends ARMProxyResource { properties?: ServiceResourcePropertiesUnion; } +/** properties of physical partition throughput info */ +export interface PhysicalPartitionThroughputInfoResultPropertiesResource + extends PhysicalPartitionThroughputInfoProperties {} + +/** A CosmosDB Cassandra API data source/sink */ +export interface CosmosCassandraDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBCassandra"; + keyspaceName: string; + tableName: string; +} + +/** A CosmosDB Cassandra API data source/sink */ +export interface CosmosSqlDataTransferDataSourceSink + extends DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBSql"; + databaseName: string; + containerName: 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. */ @@ -3311,6 +4021,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 */ @@ -3377,6 +4108,27 @@ export enum KnownBackupStorageRedundancy { */ export type BackupStorageRedundancy = string; +/** Known values of {@link DataTransferComponent} that the service accepts. */ +export enum KnownDataTransferComponent { + /** CosmosDBCassandra */ + CosmosDBCassandra = "CosmosDBCassandra", + /** 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** \ + * **CosmosDBSql** \ + * **AzureBlobStorage** + */ +export type DataTransferComponent = string; + /** Known values of {@link ManagedCassandraProvisioningState} that the service accepts. */ export enum KnownManagedCassandraProvisioningState { /** Creating */ @@ -3412,7 +4164,9 @@ export enum KnownAuthenticationMethod { /** None */ None = "None", /** Cassandra */ - Cassandra = "Cassandra" + Cassandra = "Cassandra", + /** Ldap */ + Ldap = "Ldap" } /** @@ -3421,7 +4175,8 @@ export enum KnownAuthenticationMethod { * this enum contains the known values that the service supports. * ### Known values supported by the service * **None** \ - * **Cassandra** + * **Cassandra** \ + * **Ldap** */ export type AuthenticationMethod = string; @@ -3553,6 +4308,8 @@ export enum KnownOperationType { Replace = "Replace", /** Delete */ Delete = "Delete", + /** Recreate */ + Recreate = "Recreate", /** SystemOperation */ SystemOperation = "SystemOperation" } @@ -3565,6 +4322,7 @@ export enum KnownOperationType { * **Create** \ * **Replace** \ * **Delete** \ + * **Recreate** \ * **SystemOperation** */ export type OperationType = string; @@ -3644,6 +4402,24 @@ export enum KnownServiceStatus { */ export type ServiceStatus = string; +/** Known values of {@link ContinuousTier} that the service accepts. */ +export enum KnownContinuousTier { + /** Continuous7Days */ + Continuous7Days = "Continuous7Days", + /** Continuous30Days */ + Continuous30Days = "Continuous30Days" +} + +/** + * Defines values for ContinuousTier. \ + * {@link KnownContinuousTier} can be used interchangeably with ContinuousTier, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Continuous7Days** \ + * **Continuous30Days** + */ +export type ContinuousTier = string; + /** Known values of {@link NodeStatus} that the service accepts. */ export enum KnownNodeStatus { /** Up */ @@ -3661,12 +4437,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" @@ -3676,6 +4446,14 @@ 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. */ @@ -3967,6 +4745,41 @@ export interface PartitionKeyRangeIdRegionListMetricsOptionalParams /** Contains response data for the listMetrics operation. */ export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListResult; +/** Optional parameters. */ +export interface GraphResourcesListGraphsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listGraphs operation. */ +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; + +/** Optional parameters. */ +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 {} @@ -4030,11 +4843,37 @@ export interface SqlResourcesMigrateSqlDatabaseToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateSqlDatabaseToAutoscale operation. */ -export type SqlResourcesMigrateSqlDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateSqlDatabaseToAutoscale operation. */ +export type SqlResourcesMigrateSqlDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams + 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 migrateSqlDatabaseToManualThroughput operation. */ +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 SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams +export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4042,8 +4881,8 @@ export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateSqlDatabaseToManualThroughput operation. */ -export type SqlResourcesMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the createUpdateClientEncryptionKey operation. */ +export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; /** Optional parameters. */ export interface SqlResourcesListSqlContainersOptionalParams @@ -4080,6 +4919,18 @@ export interface SqlResourcesDeleteSqlContainerOptionalParams resumeFrom?: string; } +/** 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 {} @@ -4123,6 +4974,54 @@ export interface SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams /** Contains response data for the migrateSqlContainerToManualThroughput operation. */ export type SqlResourcesMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +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 sqlDatabaseRetrieveThroughputDistribution operation. */ +export type SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse = PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +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 sqlDatabaseRedistributeThroughput operation. */ +export type SqlResourcesSqlDatabaseRedistributeThroughputResponse = PhysicalPartitionThroughputInfoResult; + +/** Optional parameters. */ +export interface SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams + 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 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 extends coreClient.OperationOptions {} @@ -4388,6 +5287,54 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona /** Contains response data for the migrateMongoDBDatabaseToManualThroughput operation. */ 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 {} @@ -4423,6 +5370,18 @@ export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams resumeFrom?: string; } +/** 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 {} @@ -4626,6 +5585,18 @@ export interface TableResourcesMigrateTableToManualThroughputOptionalParams /** Contains response data for the migrateTableToManualThroughput operation. */ export type TableResourcesMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams + 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 retrieveContinuousBackupInformation operation. */ +export type TableResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + /** Optional parameters. */ export interface CassandraResourcesListCassandraKeyspacesOptionalParams extends coreClient.OperationOptions {} @@ -4782,6 +5753,84 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption /** Contains response data for the migrateCassandraTableToManualThroughput operation. */ 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 {} @@ -4938,6 +5987,18 @@ export interface GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalPa /** Contains response data for the migrateGremlinGraphToManualThroughput operation. */ export type GremlinResourcesMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + 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 retrieveContinuousBackupInformation operation. */ +export type GremlinResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + /** Optional parameters. */ export interface LocationsListOptionalParams extends coreClient.OperationOptions {} @@ -4952,6 +6013,55 @@ 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 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 {} @@ -5018,6 +6128,20 @@ export interface CassandraClustersInvokeCommandOptionalParams /** Contains response data for the invokeCommand operation. */ export type CassandraClustersInvokeCommandResponse = CommandOutput; +/** 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 { @@ -5232,9 +6356,9 @@ export interface RestorableSqlContainersListOptionalParams extends coreClient.OperationOptions { /** The resource ID of the SQL database. */ restorableSqlDatabaseRid?: string; - /** The snapshot create timestamp after which snapshots need to be listed. */ + /** Restorable Sql containers event feed start time. */ startTime?: string; - /** The snapshot create timestamp before which snapshots need to be listed. */ + /** Restorable Sql containers event feed end time. */ endTime?: string; } @@ -5263,6 +6387,10 @@ export type RestorableMongodbDatabasesListResponse = RestorableMongodbDatabasesL /** Optional parameters. */ export interface RestorableMongodbCollectionsListOptionalParams extends coreClient.OperationOptions { + /** Restorable MongoDB collections event feed start time. */ + startTime?: string; + /** Restorable MongoDB collections event feed end time. */ + endTime?: string; /** The resource ID of the MongoDB database. */ restorableMongodbDatabaseRid?: string; } @@ -5282,6 +6410,63 @@ export interface RestorableMongodbResourcesListOptionalParams /** Contains response data for the list operation. */ export type RestorableMongodbResourcesListResponse = RestorableMongodbResourcesListResult; +/** Optional parameters. */ +export interface RestorableGremlinDatabasesListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type RestorableGremlinDatabasesListResponse = RestorableGremlinDatabasesListResult; + +/** Optional parameters. */ +export interface RestorableGremlinGraphsListOptionalParams + extends coreClient.OperationOptions { + /** Restorable Gremlin graphs event feed start time. */ + startTime?: string; + /** Restorable Gremlin graphs event feed end time. */ + endTime?: string; + /** The resource ID of the Gremlin database. */ + restorableGremlinDatabaseRid?: string; +} + +/** Contains response data for the list operation. */ +export type RestorableGremlinGraphsListResponse = RestorableGremlinGraphsListResult; + +/** Optional parameters. */ +export interface RestorableGremlinResourcesListOptionalParams + extends coreClient.OperationOptions { + /** The location where the restorable resources are located. */ + restoreLocation?: string; + /** The timestamp when the restorable resources existed. */ + restoreTimestampInUtc?: string; +} + +/** Contains response data for the list operation. */ +export type RestorableGremlinResourcesListResponse = RestorableGremlinResourcesListResult; + +/** Optional parameters. */ +export interface RestorableTablesListOptionalParams + extends coreClient.OperationOptions { + /** Restorable Tables event feed start time. */ + startTime?: string; + /** Restorable Tables event feed end time. */ + endTime?: string; +} + +/** Contains response data for the list operation. */ +export type RestorableTablesListResponse = RestorableTablesListResult; + +/** Optional parameters. */ +export interface RestorableTableResourcesListOptionalParams + extends coreClient.OperationOptions { + /** The location where the restorable resources are located. */ + restoreLocation?: string; + /** The timestamp when the restorable resources existed. */ + restoreTimestampInUtc?: string; +} + +/** Contains response data for the list operation. */ +export type RestorableTableResourcesListResponse = RestorableTableResourcesListResult; + /** Optional parameters. */ export interface ServiceListOptionalParams extends coreClient.OperationOptions {} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index 7dfbccc48c50..82efc1363bbd 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -8,78 +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", @@ -359,37 +287,24 @@ export const AnalyticalStorageConfiguration: coreClient.CompositeMapper = { } }; -export const RestoreParameters: coreClient.CompositeMapper = { +export const DatabaseRestoreResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestoreParameters", + className: "DatabaseRestoreResource", modelProperties: { - restoreMode: { - serializedName: "restoreMode", - type: { - name: "String" - } - }, - restoreSource: { - serializedName: "restoreSource", + databaseName: { + serializedName: "databaseName", type: { name: "String" } }, - restoreTimestampInUtc: { - serializedName: "restoreTimestampInUtc", - type: { - name: "DateTime" - } - }, - databasesToRestore: { - serializedName: "databasesToRestore", + collectionNames: { + serializedName: "collectionNames", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "DatabaseRestoreResource" + name: "String" } } } @@ -398,10 +313,10 @@ export const RestoreParameters: coreClient.CompositeMapper = { } }; -export const DatabaseRestoreResource: coreClient.CompositeMapper = { +export const GremlinDatabaseRestoreResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DatabaseRestoreResource", + className: "GremlinDatabaseRestoreResource", modelProperties: { databaseName: { serializedName: "databaseName", @@ -409,8 +324,8 @@ export const DatabaseRestoreResource: coreClient.CompositeMapper = { name: "String" } }, - collectionNames: { - serializedName: "collectionNames", + graphNames: { + serializedName: "graphNames", type: { name: "Sequence", element: { @@ -424,6 +339,27 @@ export const DatabaseRestoreResource: coreClient.CompositeMapper = { } }; +export const RestoreParametersBase: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestoreParametersBase", + modelProperties: { + restoreSource: { + serializedName: "restoreSource", + type: { + name: "String" + } + }, + restoreTimestampInUtc: { + serializedName: "restoreTimestampInUtc", + type: { + name: "DateTime" + } + } + } + } +}; + export const BackupPolicy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -523,6 +459,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", @@ -677,6 +629,85 @@ export const ARMResourceProperties: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "String" } } } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + } + } + } +}; + +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" + } } } } @@ -879,6 +910,13 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { } } }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings" + } + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -892,6 +930,12 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { className: "Capacity" } }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean" + } + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -1592,10 +1636,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", @@ -1605,7 +1649,7 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SqlDatabaseGetResults" + className: "GraphResourceGetResults" } } } @@ -1614,10 +1658,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", @@ -1630,36 +1674,6 @@ export const SqlDatabaseResource: coreClient.CompositeMapper = { } }; -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" - } - } - } - } -}; - export const OptionsResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1719,7 +1733,89 @@ export const CreateUpdateOptions: coreClient.CompositeMapper = { } }; -export const ThroughputSettingsResource: coreClient.CompositeMapper = { +export const SqlDatabaseListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDatabaseGetResults" + } + } + } + } + } + } +}; + +export const SqlDatabaseResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + }, + restoreParameters: { + serializedName: "restoreParameters", + type: { + name: "Composite", + 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" + } + } + } + } +}; + +export const ThroughputSettingsResource: coreClient.CompositeMapper = { type: { name: "Composite", className: "ThroughputSettingsResource", @@ -1838,6 +1934,141 @@ export const CloudError: coreClient.CompositeMapper = { } }; +export const ClientEncryptionKeysListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeysListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClientEncryptionKeyGetResults" + } + } + } + } + } + } +}; + +export const ClientEncryptionKeyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeyResource", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + encryptionAlgorithm: { + serializedName: "encryptionAlgorithm", + type: { + name: "String" + } + }, + wrappedDataEncryptionKey: { + serializedName: "wrappedDataEncryptionKey", + type: { + name: "ByteArray" + } + }, + keyWrapMetadata: { + serializedName: "keyWrapMetadata", + type: { + 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", @@ -1906,11 +2137,32 @@ export const SqlContainerResource: coreClient.CompositeMapper = { className: "ConflictResolutionPolicy" } }, + clientEncryptionPolicy: { + serializedName: "clientEncryptionPolicy", + type: { + name: "Composite", + className: "ClientEncryptionPolicy" + } + }, analyticalStorageTtl: { serializedName: "analyticalStorageTtl", type: { name: "Number" } + }, + restoreParameters: { + serializedName: "restoreParameters", + type: { + name: "Composite", + className: "ResourceRestoreParameters" + } + }, + createMode: { + defaultValue: "Default", + serializedName: "createMode", + type: { + name: "String" + } } } } @@ -2222,42 +2474,64 @@ export const ConflictResolutionPolicy: coreClient.CompositeMapper = { } }; -export const SqlStoredProcedureListResult: coreClient.CompositeMapper = { +export const ClientEncryptionPolicy: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlStoredProcedureListResult", + className: "ClientEncryptionPolicy", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + includedPaths: { + serializedName: "includedPaths", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SqlStoredProcedureGetResults" + className: "ClientEncryptionIncludedPath" } } } + }, + policyFormatVersion: { + defaultValue: 1, + serializedName: "policyFormatVersion", + type: { + name: "Number" + } } } } }; -export const SqlStoredProcedureResource: coreClient.CompositeMapper = { +export const ClientEncryptionIncludedPath: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlStoredProcedureResource", + className: "ClientEncryptionIncludedPath", modelProperties: { - id: { - serializedName: "id", + path: { + serializedName: "path", required: true, type: { name: "String" } }, - body: { - serializedName: "body", + clientEncryptionKeyId: { + serializedName: "clientEncryptionKeyId", + required: true, + type: { + name: "String" + } + }, + encryptionType: { + serializedName: "encryptionType", + required: true, + type: { + name: "String" + } + }, + encryptionAlgorithm: { + serializedName: "encryptionAlgorithm", + required: true, type: { name: "String" } @@ -2266,29 +2540,256 @@ export const SqlStoredProcedureResource: coreClient.CompositeMapper = { } }; -export const SqlUserDefinedFunctionListResult: coreClient.CompositeMapper = { +export const MergeParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlUserDefinedFunctionListResult", + className: "MergeParameters", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + isDryRun: { + serializedName: "isDryRun", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SqlUserDefinedFunctionGetResults" - } - } + name: "Boolean" } } } } }; -export const SqlUserDefinedFunctionResource: 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: "PhysicalPartitionStorageInfo", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + storageInKB: { + serializedName: "storageInKB", + readOnly: true, + type: { + name: "Number" + } + } + } + } +}; + +export const RetrieveThroughputPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RetrieveThroughputPropertiesResource", + modelProperties: { + physicalPartitionIds: { + serializedName: "physicalPartitionIds", + required: true, + type: { + 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" + } + } + } + } + } + } +}; + +export const SqlStoredProcedureListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlStoredProcedureListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlStoredProcedureGetResults" + } + } + } + } + } + } +}; + +export const SqlStoredProcedureResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlStoredProcedureResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + }, + body: { + serializedName: "body", + type: { + name: "String" + } + } + } + } +}; + +export const SqlUserDefinedFunctionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlUserDefinedFunctionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlUserDefinedFunctionGetResults" + } + } + } + } + } + } +}; + +export const SqlUserDefinedFunctionResource: coreClient.CompositeMapper = { type: { name: "Composite", className: "SqlUserDefinedFunctionResource", @@ -2399,6 +2900,20 @@ export const MongoDBDatabaseResource: coreClient.CompositeMapper = { type: { name: "String" } + }, + restoreParameters: { + serializedName: "restoreParameters", + type: { + name: "Composite", + className: "ResourceRestoreParameters" + } + }, + createMode: { + defaultValue: "Default", + serializedName: "createMode", + type: { + name: "String" + } } } } @@ -2462,6 +2977,20 @@ export const MongoDBCollectionResource: coreClient.CompositeMapper = { type: { name: "Number" } + }, + restoreParameters: { + serializedName: "restoreParameters", + type: { + name: "Composite", + className: "ResourceRestoreParameters" + } + }, + createMode: { + defaultValue: "Default", + serializedName: "createMode", + type: { + name: "String" + } } } } @@ -2909,6 +3438,13 @@ export const LocationProperties: coreClient.CompositeMapper = { name: "Composite", className: "LocationProperties", modelProperties: { + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, supportsAvailabilityZone: { serializedName: "supportsAvailabilityZone", readOnly: true, @@ -2939,27 +3475,167 @@ export const LocationProperties: coreClient.CompositeMapper = { } }; -export const ARMProxyResource: coreClient.CompositeMapper = { +export const CassandraViewListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ARMProxyResource", + 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", - readOnly: true, + required: true, type: { name: "String" } }, - name: { - serializedName: "name", + 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" } }, - type: { - serializedName: "type", + 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" + } + } + } + } +}; + +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" @@ -3300,6 +3976,43 @@ export const CommandOutput: coreClient.CompositeMapper = { } }; +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 BackupResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupResourceProperties", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + } + } + } +}; + export const ListDataCenters: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3405,6 +4118,70 @@ export const DataCenterResourceProperties: coreClient.CompositeMapper = { type: { name: "Boolean" } + }, + authenticationMethodLdapProperties: { + serializedName: "authenticationMethodLdapProperties", + type: { + name: "Composite", + className: "AuthenticationMethodLdapProperties" + } + } + } + } +}; + +export const AuthenticationMethodLdapProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthenticationMethodLdapProperties", + modelProperties: { + serverHostname: { + serializedName: "serverHostname", + type: { + name: "String" + } + }, + serverPort: { + serializedName: "serverPort", + type: { + name: "Number" + } + }, + serviceUserDistinguishedName: { + serializedName: "serviceUserDistinguishedName", + type: { + name: "String" + } + }, + serviceUserPassword: { + serializedName: "serviceUserPassword", + type: { + name: "String" + } + }, + searchBaseDistinguishedName: { + serializedName: "searchBaseDistinguishedName", + type: { + name: "String" + } + }, + searchFilterTemplate: { + serializedName: "searchFilterTemplate", + type: { + name: "String" + } + }, + serverCertificates: { + serializedName: "serverCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } + } } } } @@ -3674,19 +4451,25 @@ export const ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatace } }; -export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { +export const Privilege: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceListResult", + className: "Privilege", modelProperties: { - value: { - serializedName: "value", + resource: { + serializedName: "resource", + type: { + name: "Composite", + className: "PrivilegeResource" + } + }, + actions: { + serializedName: "actions", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "NotebookWorkspace" + name: "String" } } } @@ -3695,21 +4478,19 @@ export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { } }; -export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = { +export const PrivilegeResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceConnectionInfoResult", + className: "PrivilegeResource", modelProperties: { - authToken: { - serializedName: "authToken", - readOnly: true, + db: { + serializedName: "db", type: { name: "String" } }, - notebookServerEndpoint: { - serializedName: "notebookServerEndpoint", - readOnly: true, + collection: { + serializedName: "collection", type: { name: "String" } @@ -3718,67 +4499,71 @@ export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = } }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const Role: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "Role", modelProperties: { - value: { - serializedName: "value", + db: { + serializedName: "db", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "String" + } + }, + role: { + serializedName: "role", + type: { + name: "String" } } } } }; -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { +export const MongoRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResourceListResult", + className: "MongoRoleDefinitionCreateUpdateParameters", modelProperties: { - value: { - serializedName: "value", + roleName: { + serializedName: "properties.roleName", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + type: { + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"] + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + privileges: { + serializedName: "properties.privileges", type: { name: "Sequence", element: { type: { name: "Composite", - className: "PrivateLinkResource" + className: "Privilege" } } } - } - } - } -}; - -export const Privilege: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Privilege", - modelProperties: { - resource: { - serializedName: "resource", - type: { - name: "Composite", - className: "PrivilegeResource" - } }, - actions: { - serializedName: "actions", + roles: { + serializedName: "properties.roles", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Role" } } } @@ -3787,92 +4572,93 @@ export const Privilege: coreClient.CompositeMapper = { } }; -export const PrivilegeResource: coreClient.CompositeMapper = { +export const MongoRoleDefinitionListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivilegeResource", + className: "MongoRoleDefinitionListResult", modelProperties: { - db: { - serializedName: "db", - type: { - name: "String" - } - }, - collection: { - serializedName: "collection", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MongoRoleDefinitionGetResults" + } + } } } } } }; -export const Role: coreClient.CompositeMapper = { +export const MongoUserDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Role", + className: "MongoUserDefinitionCreateUpdateParameters", modelProperties: { - db: { - serializedName: "db", + userName: { + serializedName: "properties.userName", type: { name: "String" } }, - role: { - serializedName: "role", - type: { - name: "String" - } - } - } - } -}; - -export const MongoRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MongoRoleDefinitionCreateUpdateParameters", - modelProperties: { - roleName: { - serializedName: "properties.roleName", + password: { + serializedName: "properties.password", type: { name: "String" } }, - type: { - serializedName: "properties.type", + databaseName: { + serializedName: "properties.databaseName", type: { - name: "Enum", - allowedValues: ["BuiltInRole", "CustomRole"] + name: "String" } }, - databaseName: { - serializedName: "properties.databaseName", + customData: { + serializedName: "properties.customData", type: { name: "String" } }, - privileges: { - serializedName: "properties.privileges", + roles: { + serializedName: "properties.roles", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Privilege" + className: "Role" } } } }, - roles: { - serializedName: "properties.roles", + mechanisms: { + serializedName: "properties.mechanisms", + type: { + name: "String" + } + } + } + } +}; + +export const MongoUserDefinitionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoUserDefinitionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "Role" + className: "MongoUserDefinitionGetResults" } } } @@ -3881,20 +4667,19 @@ export const MongoRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapp } }; -export const MongoRoleDefinitionListResult: coreClient.CompositeMapper = { +export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoRoleDefinitionListResult", + className: "NotebookWorkspaceListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MongoRoleDefinitionGetResults" + className: "NotebookWorkspace" } } } @@ -3903,71 +4688,63 @@ export const MongoRoleDefinitionListResult: coreClient.CompositeMapper = { } }; -export const MongoUserDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { +export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoUserDefinitionCreateUpdateParameters", + className: "NotebookWorkspaceConnectionInfoResult", modelProperties: { - userName: { - serializedName: "properties.userName", - type: { - name: "String" - } - }, - password: { - serializedName: "properties.password", - type: { - name: "String" - } - }, - databaseName: { - serializedName: "properties.databaseName", + authToken: { + serializedName: "authToken", + readOnly: true, type: { name: "String" } }, - customData: { - serializedName: "properties.customData", + notebookServerEndpoint: { + serializedName: "notebookServerEndpoint", + readOnly: true, type: { name: "String" } - }, - roles: { - serializedName: "properties.roles", + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "Role" + className: "PrivateEndpointConnection" } } } - }, - mechanisms: { - serializedName: "properties.mechanisms", - type: { - name: "String" - } } } } }; -export const MongoUserDefinitionListResult: coreClient.CompositeMapper = { +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoUserDefinitionListResult", + className: "PrivateLinkResourceListResult", modelProperties: { value: { serializedName: "value", - readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "MongoUserDefinitionGetResults" + className: "PrivateLinkResource" } } } @@ -4189,6 +4966,12 @@ export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { name: "DateTime" } }, + oldestRestorableTime: { + serializedName: "properties.oldestRestorableTime", + type: { + name: "DateTime" + } + }, deletionTime: { serializedName: "properties.deletionTime", type: { @@ -4866,10 +5649,10 @@ export const RestorableMongodbResourcesGetResult: coreClient.CompositeMapper = { } }; -export const ServiceResourceListResult: coreClient.CompositeMapper = { +export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceResourceListResult", + className: "RestorableGremlinDatabasesListResult", modelProperties: { value: { serializedName: "value", @@ -4879,7 +5662,7 @@ export const ServiceResourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "ServiceResource" + className: "RestorableGremlinDatabaseGetResult" } } } @@ -4888,94 +5671,524 @@ export const ServiceResourceListResult: coreClient.CompositeMapper = { } }; -export const ServiceResourceProperties: coreClient.CompositeMapper = { - serializedName: "ServiceResourceProperties", +export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceResourceProperties", - uberParent: "ServiceResourceProperties", - additionalProperties: { type: { name: "Object" } }, - polymorphicDiscriminator: { - serializedName: "serviceType", - clientName: "serviceType" - }, + className: "RestorableGremlinDatabaseGetResult", modelProperties: { - creationTime: { - serializedName: "creationTime", + id: { + serializedName: "id", readOnly: true, - type: { - name: "DateTime" - } - }, - instanceSize: { - serializedName: "instanceSize", type: { name: "String" } }, - instanceCount: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "instanceCount", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Number" + name: "String" } }, - serviceType: { - serializedName: "serviceType", - required: true, + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - status: { - serializedName: "status", - readOnly: true, + resource: { + serializedName: "properties.resource", type: { - name: "String" + name: "Composite", + className: "RestorableGremlinDatabasePropertiesResource" } } } } }; -export const ServiceResourceCreateUpdateParameters: coreClient.CompositeMapper = { +export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ServiceResourceCreateUpdateParameters", + className: "RestorableGremlinDatabasePropertiesResource", modelProperties: { - instanceSize: { - serializedName: "properties.instanceSize", + rid: { + serializedName: "_rid", + readOnly: true, type: { name: "String" } }, - instanceCount: { - constraints: { - InclusiveMinimum: 0 - }, - serializedName: "properties.instanceCount", + operationType: { + serializedName: "operationType", + readOnly: true, type: { - name: "Number" + name: "String" } }, - serviceType: { - serializedName: "properties.serviceType", + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const PeriodicModeProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PeriodicModeProperties", - modelProperties: { - backupIntervalInMinutes: { + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String" + } + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +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 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 = { + type: { + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String" + } + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + 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 RestorableGremlinResourcesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinResourcesGetResult" + } + } + } + } + } + } +}; + +export const RestorableGremlinResourcesGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinResourcesGetResult", + 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" + } + }, + databaseName: { + serializedName: "databaseName", + type: { + name: "String" + } + }, + graphNames: { + serializedName: "graphNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +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 RestorableTableGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTableGetResult", + 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: "RestorableTablePropertiesResource" + } + } + } + } +}; + +export const RestorableTablePropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTablePropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String" + } + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + 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 RestorableTableResourcesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTableResourcesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableTableResourcesGetResult" + } + } + } + } + } + } +}; + +export const RestorableTableResourcesGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTableResourcesGetResult", + 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 ServiceResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceResourceListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ServiceResource" + } + } + } + } + } + } +}; + +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" + } + }, + instanceSize: { + serializedName: "instanceSize", + type: { + name: "String" + } + }, + instanceCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "instanceCount", + type: { + name: "Number" + } + }, + serviceType: { + serializedName: "serviceType", + required: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ServiceResourceCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceResourceCreateUpdateParameters", + modelProperties: { + instanceSize: { + serializedName: "properties.instanceSize", + type: { + name: "String" + } + }, + instanceCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.instanceCount", + type: { + name: "Number" + } + }, + serviceType: { + serializedName: "properties.serviceType", + type: { + name: "String" + } + } + } + } +}; + +export const PeriodicModeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PeriodicModeProperties", + modelProperties: { + backupIntervalInMinutes: { constraints: { InclusiveMinimum: 0 }, @@ -5003,6 +6216,21 @@ export const PeriodicModeProperties: coreClient.CompositeMapper = { } }; +export const ContinuousModeProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousModeProperties", + modelProperties: { + tier: { + serializedName: "tier", + type: { + name: "String" + } + } + } + } +}; + export const DataTransferServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5107,6 +6335,67 @@ export const ProxyResource: coreClient.CompositeMapper = { } }; +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: "DatabaseRestoreResource" + } + } + } + }, + gremlinDatabasesToRestore: { + serializedName: "gremlinDatabasesToRestore", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GremlinDatabaseRestoreResource" + } + } + } + }, + tablesToRestore: { + serializedName: "tablesToRestore", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const ResourceRestoreParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ResourceRestoreParameters", + modelProperties: { + ...RestoreParametersBase.type.modelProperties + } + } +}; + export const PeriodicModeBackupPolicy: coreClient.CompositeMapper = { serializedName: "Periodic", type: { @@ -5135,7 +6424,14 @@ export const ContinuousModeBackupPolicy: coreClient.CompositeMapper = { uberParent: "BackupPolicy", polymorphicDiscriminator: BackupPolicy.type.polymorphicDiscriminator, modelProperties: { - ...BackupPolicy.type.modelProperties + ...BackupPolicy.type.modelProperties, + continuousModeProperties: { + serializedName: "continuousModeProperties", + type: { + name: "Composite", + className: "ContinuousModeProperties" + } + } } } }; @@ -5152,13 +6448,6 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, systemData: { serializedName: "systemData", type: { @@ -5434,6 +6723,13 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { } } }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings" + } + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -5447,6 +6743,12 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { className: "Capacity" } }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean" + } + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -5476,13 +6778,6 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, consistencyPolicy: { serializedName: "properties.consistencyPolicy", type: { @@ -5671,6 +6966,13 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = } } }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings" + } + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -5691,6 +6993,12 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = className: "Capacity" } }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean" + } + }, keysMetadata: { serializedName: "properties.keysMetadata", type: { @@ -5708,6 +7016,54 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = } }; +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", @@ -5807,31 +7163,82 @@ export const SqlContainerGetResults: coreClient.CompositeMapper = { serializedName: "properties.options", type: { name: "Composite", - className: "SqlContainerGetPropertiesOptions" + 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 SqlContainerCreateUpdateParameters: coreClient.CompositeMapper = { +export const RedistributeThroughputParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlContainerCreateUpdateParameters", + className: "RedistributeThroughputParameters", modelProperties: { ...ARMResourceProperties.type.modelProperties, resource: { serializedName: "properties.resource", type: { name: "Composite", - className: "SqlContainerResource" - } - }, - options: { - serializedName: "properties.options", - type: { - name: "Composite", - className: "CreateUpdateOptions" + className: "RedistributeThroughputPropertiesResource" } } } @@ -6297,6 +7704,54 @@ export const GremlinGraphCreateUpdateParameters: coreClient.CompositeMapper = { } }; +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", @@ -6428,6 +7883,126 @@ export const PartitionUsage: coreClient.CompositeMapper = { } }; +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 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 CassandraViewGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + export const SqlDatabaseGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6494,6 +8069,17 @@ export const ThroughputSettingsGetPropertiesResource: coreClient.CompositeMapper } }; +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", @@ -6609,116 +8195,54 @@ export const GremlinGraphGetPropertiesResource: coreClient.CompositeMapper = { name: "Composite", className: "GremlinGraphGetPropertiesResource", modelProperties: { - ...GremlinGraphResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties - } - } -}; - -export const RestorableSqlContainerPropertiesResourceContainer: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResourceContainer", - modelProperties: { - ...SqlContainerResource.type.modelProperties, - ...ExtendedResourceProperties.type.modelProperties, - self: { - serializedName: "_self", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -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 + ...GremlinGraphResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties } } }; -export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { +export const CassandraViewGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraTableGetPropertiesOptions", + className: "CassandraViewGetPropertiesResource", modelProperties: { - ...OptionsResource.type.modelProperties + ...CassandraViewResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties } } }; -export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { +export const RestorableSqlContainerPropertiesResourceContainer: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinDatabaseGetPropertiesOptions", + className: "RestorableSqlContainerPropertiesResourceContainer", modelProperties: { - ...OptionsResource.type.modelProperties + ...SqlContainerResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties, + self: { + serializedName: "_self", + readOnly: true, + type: { + name: "String" + } + } } } }; -export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { +export const ClientEncryptionKeyGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphGetPropertiesOptions", + className: "ClientEncryptionKeyGetResults", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ClientEncryptionKeyGetPropertiesResource" + } + } } } }; @@ -6740,92 +8264,126 @@ export const LocationGetResult: coreClient.CompositeMapper = { } }; -export const DataCenterResource: coreClient.CompositeMapper = { +export const CreateJobRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataCenterResource", + className: "CreateJobRequest", modelProperties: { ...ARMProxyResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "DataCenterResourceProperties" + className: "DataTransferJobProperties" } } } } }; -export const NotebookWorkspace: coreClient.CompositeMapper = { +export const DataTransferJobGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspace", + className: "DataTransferJobGetResults", modelProperties: { ...ARMProxyResource.type.modelProperties, - notebookServerEndpoint: { - serializedName: "properties.notebookServerEndpoint", + jobName: { + serializedName: "properties.jobName", readOnly: true, type: { name: "String" } }, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "DataTransferDataSourceSink" + } + }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink" + } + }, status: { serializedName: "properties.status", readOnly: true, type: { name: "String" } + }, + processedCount: { + serializedName: "properties.processedCount", + readOnly: true, + type: { + name: "Number" + } + }, + totalCount: { + serializedName: "properties.totalCount", + readOnly: true, + type: { + name: "Number" + } + }, + lastUpdatedUtcTime: { + serializedName: "properties.lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + workerCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.workerCount", + type: { + name: "Number" + } + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponse" + } } } } }; -export const NotebookWorkspaceCreateUpdateParameters: coreClient.CompositeMapper = { +export const BackupResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceCreateUpdateParameters", + className: "BackupResource", modelProperties: { - ...ARMProxyResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BackupResourceProperties" + } + } } } }; -export const PrivateLinkResource: coreClient.CompositeMapper = { +export const DataCenterResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateLinkResource", + className: "DataCenterResource", modelProperties: { ...ARMProxyResource.type.modelProperties, - groupId: { - serializedName: "properties.groupId", - readOnly: true, - type: { - name: "String" - } - }, - requiredMembers: { - serializedName: "properties.requiredMembers", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - requiredZoneNames: { - serializedName: "properties.requiredZoneNames", - readOnly: true, + properties: { + serializedName: "properties", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Composite", + className: "DataCenterResourceProperties" } } } @@ -6937,6 +8495,81 @@ export const MongoUserDefinitionGetResults: coreClient.CompositeMapper = { } }; +export const NotebookWorkspace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NotebookWorkspace", + modelProperties: { + ...ARMProxyResource.type.modelProperties, + notebookServerEndpoint: { + serializedName: "properties.notebookServerEndpoint", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const NotebookWorkspaceCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NotebookWorkspaceCreateUpdateParameters", + modelProperties: { + ...ARMProxyResource.type.modelProperties + } + } +}; + +export const PrivateLinkResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ARMProxyResource.type.modelProperties, + groupId: { + serializedName: "properties.groupId", + readOnly: true, + type: { + name: "String" + } + }, + requiredMembers: { + serializedName: "properties.requiredMembers", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + requiredZoneNames: { + serializedName: "properties.requiredZoneNames", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const SqlRoleDefinitionGetResults: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7028,6 +8661,99 @@ export const ServiceResource: coreClient.CompositeMapper = { } }; +export const PhysicalPartitionThroughputInfoResultPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PhysicalPartitionThroughputInfoResultPropertiesResource", + modelProperties: { + ...PhysicalPartitionThroughputInfoProperties.type.modelProperties + } + } +}; + +export const CosmosCassandraDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBCassandra", + type: { + name: "Composite", + className: "CosmosCassandraDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + keyspaceName: { + serializedName: "keyspaceName", + required: true, + type: { + name: "String" + } + }, + tableName: { + serializedName: "tableName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CosmosSqlDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBSql", + type: { + name: "Composite", + className: "CosmosSqlDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, + type: { + name: "String" + } + }, + containerName: { + serializedName: "containerName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +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 ClusterResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -7261,9 +8987,13 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { export let discriminators = { BackupPolicy: BackupPolicy, + DataTransferDataSourceSink: DataTransferDataSourceSink, ServiceResourceProperties: ServiceResourceProperties, "BackupPolicy.Periodic": PeriodicModeBackupPolicy, "BackupPolicy.Continuous": ContinuousModeBackupPolicy, + "DataTransferDataSourceSink.CosmosDBCassandra": CosmosCassandraDataTransferDataSourceSink, + "DataTransferDataSourceSink.CosmosDBSql": CosmosSqlDataTransferDataSourceSink, + "DataTransferDataSourceSink.AzureBlobStorage": AzureBlobDataTransferDataSourceSink, "ServiceResourceProperties.DataTransfer": DataTransferServiceResourceProperties, "ServiceResourceProperties.SqlDedicatedGateway": SqlDedicatedGatewayServiceResourceProperties, "ServiceResourceProperties.GraphAPICompute": GraphAPIComputeServiceResourceProperties, diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index 8bed563d14e0..980ad8f1675c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -17,9 +17,14 @@ import { FailoverPolicies as FailoverPoliciesMapper, RegionForOnlineOffline as RegionForOnlineOfflineMapper, DatabaseAccountRegenerateKeyParameters as DatabaseAccountRegenerateKeyParametersMapper, + GraphResourceCreateUpdateParameters as GraphResourceCreateUpdateParametersMapper, SqlDatabaseCreateUpdateParameters as SqlDatabaseCreateUpdateParametersMapper, ThroughputSettingsUpdateParameters as ThroughputSettingsUpdateParametersMapper, + ClientEncryptionKeyCreateUpdateParameters as ClientEncryptionKeyCreateUpdateParametersMapper, SqlContainerCreateUpdateParameters as SqlContainerCreateUpdateParametersMapper, + MergeParameters as MergeParametersMapper, + RetrieveThroughputParameters as RetrieveThroughputParametersMapper, + RedistributeThroughputParameters as RedistributeThroughputParametersMapper, SqlStoredProcedureCreateUpdateParameters as SqlStoredProcedureCreateUpdateParametersMapper, SqlUserDefinedFunctionCreateUpdateParameters as SqlUserDefinedFunctionCreateUpdateParametersMapper, SqlTriggerCreateUpdateParameters as SqlTriggerCreateUpdateParametersMapper, @@ -33,8 +38,10 @@ 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, @@ -115,7 +122,7 @@ export const accountName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2022-08-15", + defaultValue: "2022-08-15-preview", isConstant: true, serializedName: "api-version", type: { @@ -265,6 +272,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: { @@ -286,6 +309,22 @@ export const updateThroughputParameters: OperationParameter = { mapper: ThroughputSettingsUpdateParametersMapper }; +export const clientEncryptionKeyName: OperationURLParameter = { + parameterPath: "clientEncryptionKeyName", + mapper: { + serializedName: "clientEncryptionKeyName", + required: true, + type: { + name: "String" + } + } +}; + +export const createUpdateClientEncryptionKeyParameters: OperationParameter = { + parameterPath: "createUpdateClientEncryptionKeyParameters", + mapper: ClientEncryptionKeyCreateUpdateParametersMapper +}; + export const containerName: OperationURLParameter = { parameterPath: "containerName", mapper: { @@ -302,6 +341,21 @@ export const createUpdateSqlContainerParameters: OperationParameter = { 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 = { parameterPath: "storedProcedureName", mapper: { @@ -477,15 +531,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" @@ -493,6 +542,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 @@ -509,6 +568,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: { @@ -535,6 +610,22 @@ export const body1: OperationParameter = { mapper: CommandPostBodyMapper }; +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 dataCenterName: OperationURLParameter = { parameterPath: "dataCenterName", mapper: { @@ -670,6 +761,16 @@ export const restorableMongodbDatabaseRid: OperationQueryParameter = { } }; +export const restorableGremlinDatabaseRid: OperationQueryParameter = { + parameterPath: ["options", "restorableGremlinDatabaseRid"], + mapper: { + serializedName: "restorableGremlinDatabaseRid", + type: { + name: "String" + } + } +}; + export const createUpdateParameters1: OperationParameter = { parameterPath: "createUpdateParameters", mapper: ServiceResourceCreateUpdateParametersMapper diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts index a4fa5b890890..bf4307a1103d 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts @@ -18,6 +18,8 @@ import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListByResourceGroupOptionalParams, + BackupResource, + CassandraClustersListBackupsOptionalParams, CassandraClustersListBySubscriptionResponse, CassandraClustersListByResourceGroupResponse, CassandraClustersGetOptionalParams, @@ -30,6 +32,9 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CassandraClustersListBackupsResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, @@ -128,6 +133,66 @@ export class CassandraClustersImpl implements CassandraClusters { } } + /** + * 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: () => { + return this.listBackupsPagingPage( + resourceGroupName, + clusterName, + options + ); + } + }; + } + + private async *listBackupsPagingPage( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams + ): AsyncIterableIterator { + let 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. @@ -533,6 +598,42 @@ export class CassandraClustersImpl implements CassandraClusters { return poller.pollUntilDone(); } + /** + * 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 @@ -907,6 +1008,51 @@ const invokeCommandOperationSpec: coreClient.OperationSpec = { mediaType: "json", 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", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts index e1fb0338a704..6074423d21e0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts @@ -19,6 +19,8 @@ import { CassandraResourcesListCassandraKeyspacesOptionalParams, CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, CassandraResourcesListCassandraKeyspacesResponse, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, @@ -49,7 +51,22 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams, CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, - CassandraResourcesMigrateCassandraTableToManualThroughputResponse + CassandraResourcesMigrateCassandraTableToManualThroughputResponse, + CassandraResourcesListCassandraViewsResponse, + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse } from "../models"; /// @@ -193,6 +210,74 @@ 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: () => { + return this.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options + ); + } + }; + } + + private async *listCassandraViewsPagingPage( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams + ): AsyncIterableIterator { + let 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. @@ -1318,209 +1403,783 @@ 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: {}, 201: {}, 202: {}, 204: {} }, - 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 - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept], - serializer + /** + * 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< + PollerLike< + PollOperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options + }, + createUpdateCassandraViewOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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 sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, keyspaceName, viewName, options }, + deleteCassandraViewOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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< + PollerLike< + PollOperationState< + CassandraResourcesUpdateCassandraViewThroughputResponse + >, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options + }, + updateCassandraViewThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + >, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, keyspaceName, viewName, options }, + migrateCassandraViewToAutoscaleOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + >, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, keyspaceName, viewName, options }, + migrateCassandraViewToManualThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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: {}, 201: {}, 202: {}, 204: {} }, + 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 + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept], + serializer }; const listCassandraTablesOperationSpec: coreClient.OperationSpec = { path: @@ -1730,3 +2389,211 @@ 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/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts new file mode 100644 index 000000000000..72bd5426c53e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts @@ -0,0 +1,414 @@ +/* + * 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 { 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, + CreateJobRequest, + DataTransferJobsCreateOptionalParams, + DataTransferJobsCreateResponse, + DataTransferJobsGetOptionalParams, + DataTransferJobsGetResponse, + DataTransferJobsPauseOptionalParams, + DataTransferJobsPauseResponse, + DataTransferJobsResumeOptionalParams, + DataTransferJobsResumeResponse, + DataTransferJobsCancelOptionalParams, + DataTransferJobsCancelResponse, + DataTransferJobsListByDatabaseAccountResponse, + 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: () => { + return this.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options + ); + } + }; + } + + private async *listByDatabaseAccountPagingPage( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDatabaseAccount( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDatabaseAccountNext( + resourceGroupName, + accountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + 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 + ); + } + + /** + * 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 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 + } + }, + queryParameters: [Parameters.apiVersion], + 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..e31e57b54d47 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts @@ -0,0 +1,415 @@ +/* + * 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 { 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } 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: () => { + return this.listGraphsPagingPage( + resourceGroupName, + accountName, + options + ); + } + }; + } + + private async *listGraphsPagingPage( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams + ): AsyncIterableIterator { + let 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< + PollerLike< + PollOperationState, + GraphResourcesCreateUpdateGraphResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options + }, + createUpdateGraphOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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 sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, graphName, options }, + deleteGraphResourceOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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 f4087c645e18..36b5ffc9df36 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts @@ -49,7 +49,10 @@ import { GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams, GremlinResourcesMigrateGremlinGraphToAutoscaleResponse, GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams, - GremlinResourcesMigrateGremlinGraphToManualThroughputResponse + GremlinResourcesMigrateGremlinGraphToManualThroughputResponse, + ContinuousBackupRestoreLocation, + GremlinResourcesRetrieveContinuousBackupInformationOptionalParams, + GremlinResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -1308,6 +1311,118 @@ export class GremlinResourcesImpl implements GremlinResources { ); return poller.pollUntilDone(); } + + /** + * Retrieves continuous backup information for a gremlin graph. + * @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 graphName Cosmos DB graph name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + async beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + databaseName: string, + graphName: string, + location: ContinuousBackupRestoreLocation, + options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GremlinResourcesRetrieveContinuousBackupInformationResponse + >, + GremlinResourcesRetrieveContinuousBackupInformationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + graphName, + location, + options + }, + retrieveContinuousBackupInformationOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Retrieves continuous backup information for a gremlin graph. + * @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 graphName Cosmos DB graph name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + async beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + graphName: string, + location: ContinuousBackupRestoreLocation, + options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise { + const poller = await this.beginRetrieveContinuousBackupInformation( + resourceGroupName, + accountName, + databaseName, + graphName, + location, + options + ); + return poller.pollUntilDone(); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -1547,8 +1662,8 @@ const getGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], headerParameters: [Parameters.accept], serializer @@ -1578,8 +1693,8 @@ const createUpdateGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1596,8 +1711,8 @@ const deleteGremlinGraphOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], serializer }; @@ -1616,8 +1731,8 @@ const getGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], headerParameters: [Parameters.accept], serializer @@ -1647,8 +1762,8 @@ const updateGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], headerParameters: [Parameters.accept, Parameters.contentType], mediaType: "json", @@ -1681,8 +1796,8 @@ const migrateGremlinGraphToAutoscaleOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], headerParameters: [Parameters.accept], serializer @@ -1714,9 +1829,44 @@ const migrateGremlinGraphToManualThroughputOperationSpec: coreClient.OperationSp Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.accountName, - Parameters.databaseName, - Parameters.graphName + Parameters.graphName, + Parameters.databaseName ], headerParameters: [Parameters.accept], serializer }; +const retrieveContinuousBackupInformationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/gremlinDatabases/{databaseName}/graphs/{graphName}/retrieveContinuousBackupInformation", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.BackupInformation + }, + 201: { + bodyMapper: Mappers.BackupInformation + }, + 202: { + bodyMapper: Mappers.BackupInformation + }, + 204: { + bodyMapper: Mappers.BackupInformation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.location, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName, + Parameters.databaseName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts index ba941407e862..5cba7fc94170 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts @@ -19,12 +19,14 @@ 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 "./notebookWorkspaces"; @@ -37,4 +39,9 @@ export * from "./restorableSqlResources"; export * from "./restorableMongodbDatabases"; export * from "./restorableMongodbCollections"; export * from "./restorableMongodbResources"; +export * from "./restorableGremlinDatabases"; +export * from "./restorableGremlinGraphs"; +export * from "./restorableGremlinResources"; +export * from "./restorableTables"; +export * from "./restorableTableResources"; export * from "./service"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts index c0c0d5c25251..8a270eea1e16 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -39,6 +39,16 @@ import { MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse, + RetrieveThroughputParameters, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, MongoDBResourcesListMongoDBCollectionsResponse, MongoDBResourcesGetMongoDBCollectionOptionalParams, MongoDBResourcesGetMongoDBCollectionResponse, @@ -46,6 +56,9 @@ import { MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, MongoDBResourcesCreateUpdateMongoDBCollectionResponse, MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + MergeParameters, + MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams, MongoDBResourcesGetMongoDBCollectionThroughputResponse, MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams, @@ -878,6 +891,454 @@ 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + >, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options + }, + mongoDBDatabaseRetrieveThroughputDistributionOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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< + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + > { + 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + >, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options + }, + mongoDBDatabaseRedistributeThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + >, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + collectionName, + retrieveThroughputParameters, + options + }, + mongoDBContainerRetrieveThroughputDistributionOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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< + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + > { + 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + >, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + collectionName, + redistributeThroughputParameters, + options + }, + mongoDBContainerRedistributeThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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. @@ -1121,6 +1582,118 @@ export class MongoDBResourcesImpl implements MongoDBResources { return poller.pollUntilDone(); } + /** + * 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 beginListMongoDBCollectionPartitionMerge( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + ): Promise< + PollerLike< + PollOperationState< + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + >, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + collectionName, + mergeParameters, + options + }, + listMongoDBCollectionPartitionMergeOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * 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 beginListMongoDBCollectionPartitionMergeAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + mergeParameters: MergeParameters, + options?: MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams + ): Promise { + const poller = await this.beginListMongoDBCollectionPartitionMerge( + resourceGroupName, + accountName, + databaseName, + collectionName, + mergeParameters, + options + ); + return poller.pollUntilDone(); + } + /** * Gets the RUs per second of the MongoDB collection under an existing Azure Cosmos DB database account * with the provided name. @@ -2234,6 +2807,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", @@ -2323,6 +3034,41 @@ const deleteMongoDBCollectionOperationSpec: coreClient.OperationSpec = { ], 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", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts new file mode 100644 index 000000000000..070289b229d2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts @@ -0,0 +1,130 @@ +/* + * 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 { RestorableGremlinDatabases } 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 { + RestorableGremlinDatabaseGetResult, + RestorableGremlinDatabasesListOptionalParams, + RestorableGremlinDatabasesListResponse +} from "../models"; + +/// +/** Class containing RestorableGremlinDatabases operations. */ +export class RestorableGremlinDatabasesImpl + implements RestorableGremlinDatabases { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableGremlinDatabases class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the + * restorable account. This helps in scenario where database was accidentally deleted to get the + * deletion time. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the + * restorable account. This helps in scenario where database was accidentally deleted to get the + * deletion time. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableGremlinDatabasesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts new file mode 100644 index 000000000000..41317222e7f8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts @@ -0,0 +1,132 @@ +/* + * 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 { RestorableGremlinGraphs } 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 { + RestorableGremlinGraphGetResult, + RestorableGremlinGraphsListOptionalParams, + RestorableGremlinGraphsListResponse +} from "../models"; + +/// +/** Class containing RestorableGremlinGraphs operations. */ +export class RestorableGremlinGraphsImpl implements RestorableGremlinGraphs { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableGremlinGraphs class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific + * database. This helps in scenario where container was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific + * database. This helps in scenario where container was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableGremlinGraphsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.startTime, + Parameters.endTime, + Parameters.restorableGremlinDatabaseRid + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts new file mode 100644 index 000000000000..f3fbacef2ac5 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts @@ -0,0 +1,134 @@ +/* + * 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 { RestorableGremlinResources } 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 { + RestorableGremlinResourcesGetResult, + RestorableGremlinResourcesListOptionalParams, + RestorableGremlinResourcesListResponse +} from "../models"; + +/// +/** Class containing RestorableGremlinResources operations. */ +export class RestorableGremlinResourcesImpl + implements RestorableGremlinResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableGremlinResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp + * and location. This helps in scenarios to validate what resources exist at given timestamp and + * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' + * permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp + * and location. This helps in scenarios to validate what resources exist at given timestamp and + * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' + * permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableGremlinResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.restoreLocation, + Parameters.restoreTimestampInUtc + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts index 4b31a1898033..c2603171f907 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts @@ -118,6 +118,8 @@ const listOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, + Parameters.startTime, + Parameters.endTime, Parameters.restorableMongodbDatabaseRid ], urlParameters: [ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts new file mode 100644 index 000000000000..f741acc2ae6d --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts @@ -0,0 +1,131 @@ +/* + * 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 { RestorableTableResources } 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 { + RestorableTableResourcesGetResult, + RestorableTableResourcesListOptionalParams, + RestorableTableResourcesListResponse +} from "../models"; + +/// +/** Class containing RestorableTableResources operations. */ +export class RestorableTableResourcesImpl implements RestorableTableResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableTableResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Return a list of tables that exist on the account at the given timestamp and location. This helps in + * scenarios to validate what resources exist at given timestamp and location. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Return a list of tables that exist on the account at the given timestamp and location. This helps in + * scenarios to validate what resources exist at given timestamp and location. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableTableResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.restoreLocation, + Parameters.restoreTimestampInUtc + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts new file mode 100644 index 000000000000..159a4b3b576f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts @@ -0,0 +1,131 @@ +/* + * 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 { RestorableTables } 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 { + RestorableTableGetResult, + RestorableTablesListOptionalParams, + RestorableTablesListResponse +} from "../models"; + +/// +/** Class containing RestorableTables operations. */ +export class RestorableTablesImpl implements RestorableTables { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableTables class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario + * where table was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario + * where table was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableTablesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.startTime, + Parameters.endTime + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts index 058f0cd70904..c1ab43497ee4 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts @@ -17,6 +17,8 @@ import { LroImpl } from "../lroImpl"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, + ClientEncryptionKeyGetResults, + SqlResourcesListClientEncryptionKeysOptionalParams, SqlContainerGetResults, SqlResourcesListSqlContainersOptionalParams, SqlStoredProcedureGetResults, @@ -45,6 +47,12 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesListClientEncryptionKeysResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesListSqlContainersResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, @@ -52,6 +60,9 @@ import { SqlResourcesCreateUpdateSqlContainerOptionalParams, SqlResourcesCreateUpdateSqlContainerResponse, SqlResourcesDeleteSqlContainerOptionalParams, + MergeParameters, + SqlResourcesListSqlContainerPartitionMergeOptionalParams, + SqlResourcesListSqlContainerPartitionMergeResponse, SqlResourcesGetSqlContainerThroughputOptionalParams, SqlResourcesGetSqlContainerThroughputResponse, SqlResourcesUpdateSqlContainerThroughputOptionalParams, @@ -60,6 +71,16 @@ import { SqlResourcesMigrateSqlContainerToAutoscaleResponse, SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, SqlResourcesMigrateSqlContainerToManualThroughputResponse, + RetrieveThroughputParameters, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + SqlResourcesSqlContainerRedistributeThroughputResponse, SqlResourcesListSqlStoredProceduresResponse, SqlResourcesGetSqlStoredProcedureOptionalParams, SqlResourcesGetSqlStoredProcedureResponse, @@ -173,6 +194,74 @@ 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. + */ + public listClientEncryptionKeys( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listClientEncryptionKeysPagingAll( + resourceGroupName, + accountName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listClientEncryptionKeysPagingPage( + resourceGroupName, + accountName, + databaseName, + options + ); + } + }; + } + + private async *listClientEncryptionKeysPagingPage( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): AsyncIterableIterator { + let result = await this._listClientEncryptionKeys( + resourceGroupName, + accountName, + databaseName, + options + ); + yield result.value || []; + } + + private async *listClientEncryptionKeysPagingAll( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listClientEncryptionKeysPagingPage( + resourceGroupName, + accountName, + databaseName, + options + )) { + yield* page; + } + } + /** * 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. @@ -1126,6 +1215,165 @@ 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< + PollerLike< + PollOperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + createUpdateClientEncryptionKeyParameters, + options + }, + createUpdateClientEncryptionKeyOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: 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. @@ -1368,53 +1616,31 @@ export class SqlResourcesImpl implements SqlResources { } /** - * 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 + * 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 updateThroughputParameters The parameters to provide for the RUs per second of the current - * SQL container. + * @param mergeParameters The parameters for the merge operation. * @param options The options parameters. */ - async beginUpdateSqlContainerThroughput( + async beginListSqlContainerPartitionMerge( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - updateThroughputParameters: ThroughputSettingsUpdateParameters, - options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams + mergeParameters: MergeParameters, + options?: SqlResourcesListSqlContainerPartitionMergeOptionalParams ): Promise< PollerLike< - PollOperationState, - SqlResourcesUpdateSqlContainerThroughputResponse + PollOperationState, + SqlResourcesListSqlContainerPartitionMergeResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1457,72 +1683,619 @@ export class SqlResourcesImpl implements SqlResources { accountName, databaseName, containerName, - updateThroughputParameters, + mergeParameters, options }, - updateSqlContainerThroughputOperationSpec + listSqlContainerPartitionMergeOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "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. + */ + async beginUpdateSqlContainerThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SqlResourcesUpdateSqlContainerThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + containerName, + updateThroughputParameters, + options + }, + updateSqlContainerThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * 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. + */ + async beginUpdateSqlContainerThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams + ): Promise { + const poller = await this.beginUpdateSqlContainerThroughput( + resourceGroupName, + accountName, + databaseName, + containerName, + updateThroughputParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB SQL container 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 databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The options parameters. + */ + async beginMigrateSqlContainerToAutoscale( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SqlResourcesMigrateSqlContainerToAutoscaleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, databaseName, containerName, options }, + migrateSqlContainerToAutoscaleOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Migrate an Azure Cosmos DB SQL container 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 databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The options parameters. + */ + async beginMigrateSqlContainerToAutoscaleAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams + ): Promise { + const poller = await this.beginMigrateSqlContainerToAutoscale( + resourceGroupName, + accountName, + databaseName, + containerName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB SQL container 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 databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The options parameters. + */ + async beginMigrateSqlContainerToManualThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState< + SqlResourcesMigrateSqlContainerToManualThroughputResponse + >, + SqlResourcesMigrateSqlContainerToManualThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, databaseName, containerName, options }, + migrateSqlContainerToManualThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs + }); + await poller.poll(); + return poller; + } + + /** + * Migrate an Azure Cosmos DB SQL container 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 databaseName Cosmos DB database name. + * @param containerName Cosmos DB container name. + * @param options The options parameters. + */ + async beginMigrateSqlContainerToManualThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + containerName: string, + options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams + ): Promise { + const poller = await this.beginMigrateSqlContainerToManualThroughput( + resourceGroupName, + accountName, + databaseName, + containerName, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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 retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. + * @param options The options parameters. + */ + async beginSqlDatabaseRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + ): Promise< + PollerLike< + PollOperationState< + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + >, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options + }, + sqlDatabaseRetrieveThroughputDistributionOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * 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 retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. + * @param options The options parameters. + */ + async beginSqlDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + ): Promise { + const poller = await this.beginSqlDatabaseRetrieveThroughputDistribution( + resourceGroupName, + accountName, + databaseName, + retrieveThroughputParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * 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. + */ + async beginSqlDatabaseRedistributeThroughput( + resourceGroupName: string, + accountName: string, + databaseName: string, + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SqlResourcesSqlDatabaseRedistributeThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + redistributeThroughputParameters, + options + }, + sqlDatabaseRedistributeThroughputOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Update RUs per second of an Azure Cosmos DB SQL container + * 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 updateThroughputParameters The parameters to provide for the RUs per second of the current - * SQL container. + * @param redistributeThroughputParameters The parameters to provide for redistributing throughput for + * the current SQL database. * @param options The options parameters. */ - async beginUpdateSqlContainerThroughputAndWait( + async beginSqlDatabaseRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, - containerName: string, - updateThroughputParameters: ThroughputSettingsUpdateParameters, - options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams - ): Promise { - const poller = await this.beginUpdateSqlContainerThroughput( + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams + ): Promise { + const poller = await this.beginSqlDatabaseRedistributeThroughput( resourceGroupName, accountName, databaseName, - containerName, - updateThroughputParameters, + redistributeThroughputParameters, options ); return poller.pollUntilDone(); } /** - * Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale + * 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. */ - async beginMigrateSqlContainerToAutoscale( + async beginSqlContainerRetrieveThroughputDistribution( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams ): Promise< PollerLike< - PollOperationState, - SqlResourcesMigrateSqlContainerToAutoscaleResponse + PollOperationState< + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + >, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1560,68 +2333,83 @@ export class SqlResourcesImpl implements SqlResources { const lro = new LroImpl( sendOperation, - { resourceGroupName, accountName, databaseName, containerName, options }, - migrateSqlContainerToAutoscaleOperationSpec + { + resourceGroupName, + accountName, + databaseName, + containerName, + retrieveThroughputParameters, + options + }, + sqlContainerRetrieveThroughputDistributionOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Migrate an Azure Cosmos DB SQL container from manual throughput to autoscale + * 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. */ - async beginMigrateSqlContainerToAutoscaleAndWait( + async beginSqlContainerRetrieveThroughputDistributionAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams - ): Promise { - const poller = await this.beginMigrateSqlContainerToAutoscale( + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams + ): Promise { + const poller = await this.beginSqlContainerRetrieveThroughputDistribution( resourceGroupName, accountName, databaseName, containerName, + retrieveThroughputParameters, options ); return poller.pollUntilDone(); } /** - * Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput + * 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. */ - async beginMigrateSqlContainerToManualThroughput( + async beginSqlContainerRedistributeThroughput( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams ): Promise< PollerLike< PollOperationState< - SqlResourcesMigrateSqlContainerToManualThroughputResponse + SqlResourcesSqlContainerRedistributeThroughputResponse >, - SqlResourcesMigrateSqlContainerToManualThroughputResponse + SqlResourcesSqlContainerRedistributeThroughputResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1659,37 +2447,49 @@ export class SqlResourcesImpl implements SqlResources { const lro = new LroImpl( sendOperation, - { resourceGroupName, accountName, databaseName, containerName, options }, - migrateSqlContainerToManualThroughputOperationSpec + { + resourceGroupName, + accountName, + databaseName, + containerName, + redistributeThroughputParameters, + options + }, + sqlContainerRedistributeThroughputOperationSpec ); const poller = new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" }); await poller.poll(); return poller; } /** - * Migrate an Azure Cosmos DB SQL container from autoscale to manual throughput + * 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. */ - async beginMigrateSqlContainerToManualThroughputAndWait( + async beginSqlContainerRedistributeThroughputAndWait( resourceGroupName: string, accountName: string, databaseName: string, containerName: string, - options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams - ): Promise { - const poller = await this.beginMigrateSqlContainerToManualThroughput( + redistributeThroughputParameters: RedistributeThroughputParameters, + options?: SqlResourcesSqlContainerRedistributeThroughputOptionalParams + ): Promise { + const poller = await this.beginSqlContainerRedistributeThroughput( resourceGroupName, accountName, databaseName, containerName, + redistributeThroughputParameters, options ); return poller.pollUntilDone(); @@ -3282,6 +4082,79 @@ const migrateSqlDatabaseToManualThroughputOperationSpec: coreClient.OperationSpe 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 + }, + 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", @@ -3371,6 +4244,41 @@ const deleteSqlContainerOperationSpec: coreClient.OperationSpec = { ], 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", @@ -3490,6 +4398,144 @@ const migrateSqlContainerToManualThroughputOperationSpec: coreClient.OperationSp headerParameters: [Parameters.accept], serializer }; +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 + } + }, + 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 + } + }, + 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 + } + }, + 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.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", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts index 969bbea7423e..98c4fd3f6e3f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts @@ -32,7 +32,10 @@ import { TableResourcesMigrateTableToAutoscaleOptionalParams, TableResourcesMigrateTableToAutoscaleResponse, TableResourcesMigrateTableToManualThroughputOptionalParams, - TableResourcesMigrateTableToManualThroughputResponse + TableResourcesMigrateTableToManualThroughputResponse, + ContinuousBackupRestoreLocation, + TableResourcesRetrieveContinuousBackupInformationOptionalParams, + TableResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -642,6 +645,106 @@ export class TableResourcesImpl implements TableResources { ); return poller.pollUntilDone(); } + + /** + * Retrieves continuous backup information for a table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + async beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + tableName: string, + location: ContinuousBackupRestoreLocation, + options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + TableResourcesRetrieveContinuousBackupInformationResponse + >, + TableResourcesRetrieveContinuousBackupInformationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, tableName, location, options }, + retrieveContinuousBackupInformationOperationSpec + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + await poller.poll(); + return poller; + } + + /** + * Retrieves continuous backup information for a table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + async beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + tableName: string, + location: ContinuousBackupRestoreLocation, + options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise { + const poller = await this.beginRetrieveContinuousBackupInformation( + resourceGroupName, + accountName, + tableName, + location, + options + ); + return poller.pollUntilDone(); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -846,3 +949,37 @@ const migrateTableToManualThroughputOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; +const retrieveContinuousBackupInformationOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/tables/{tableName}/retrieveContinuousBackupInformation", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.BackupInformation + }, + 201: { + bodyMapper: Mappers.BackupInformation + }, + 202: { + bodyMapper: Mappers.BackupInformation + }, + 204: { + bodyMapper: Mappers.BackupInformation + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + requestBody: Parameters.location, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.tableName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts index 72642eaf23ab..54abec27aa0f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts @@ -12,6 +12,8 @@ import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListByResourceGroupOptionalParams, + BackupResource, + CassandraClustersListBackupsOptionalParams, CassandraClustersGetOptionalParams, CassandraClustersGetResponse, CassandraClustersDeleteOptionalParams, @@ -22,6 +24,8 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, @@ -47,6 +51,17 @@ export interface CassandraClusters { resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams ): 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 +190,19 @@ export interface CassandraClusters { body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams ): 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 9623b8474f54..bfa37d392b22 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, @@ -41,7 +43,21 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams, CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, - CassandraResourcesMigrateCassandraTableToManualThroughputResponse + CassandraResourcesMigrateCassandraTableToManualThroughputResponse, + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse } from "../models"; /// @@ -71,6 +87,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. @@ -490,4 +519,221 @@ 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< + PollerLike< + PollOperationState, + 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< + PollerLike< + PollOperationState< + CassandraResourcesUpdateCassandraViewThroughputResponse + >, + 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< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + >, + 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< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + >, + 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/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts new file mode 100644 index 000000000000..ba391a27b49f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts @@ -0,0 +1,107 @@ +/* + * 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 +} 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; +} 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..53f1fb181489 --- /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 { PollerLike, PollOperationState } 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< + PollerLike< + PollOperationState, + 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/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts index 41a89b100f9e..d9cf07eb6cd3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts @@ -41,7 +41,10 @@ import { GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams, GremlinResourcesMigrateGremlinGraphToAutoscaleResponse, GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams, - GremlinResourcesMigrateGremlinGraphToManualThroughputResponse + GremlinResourcesMigrateGremlinGraphToManualThroughputResponse, + ContinuousBackupRestoreLocation, + GremlinResourcesRetrieveContinuousBackupInformationOptionalParams, + GremlinResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -482,4 +485,45 @@ export interface GremlinResources { graphName: string, options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams ): Promise; + /** + * Retrieves continuous backup information for a gremlin graph. + * @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 graphName Cosmos DB graph name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + databaseName: string, + graphName: string, + location: ContinuousBackupRestoreLocation, + options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GremlinResourcesRetrieveContinuousBackupInformationResponse + >, + GremlinResourcesRetrieveContinuousBackupInformationResponse + > + >; + /** + * Retrieves continuous backup information for a gremlin graph. + * @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 graphName Cosmos DB graph name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + graphName: string, + location: ContinuousBackupRestoreLocation, + options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts index ba941407e862..5cba7fc94170 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts @@ -19,12 +19,14 @@ 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 "./notebookWorkspaces"; @@ -37,4 +39,9 @@ export * from "./restorableSqlResources"; export * from "./restorableMongodbDatabases"; export * from "./restorableMongodbCollections"; export * from "./restorableMongodbResources"; +export * from "./restorableGremlinDatabases"; +export * from "./restorableGremlinGraphs"; +export * from "./restorableGremlinResources"; +export * from "./restorableTables"; +export * from "./restorableTableResources"; export * from "./service"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts index 818a969142b0..8fc68ac6a4fb 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts @@ -32,12 +32,25 @@ import { MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams, MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse, + RetrieveThroughputParameters, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionOptionalParams, + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse, + MongoDBResourcesMongoDBContainerRedistributeThroughputOptionalParams, + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse, MongoDBResourcesGetMongoDBCollectionOptionalParams, MongoDBResourcesGetMongoDBCollectionResponse, MongoDBCollectionCreateUpdateParameters, MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams, MongoDBResourcesCreateUpdateMongoDBCollectionResponse, MongoDBResourcesDeleteMongoDBCollectionOptionalParams, + MergeParameters, + MongoDBResourcesListMongoDBCollectionPartitionMergeOptionalParams, + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse, MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams, MongoDBResourcesGetMongoDBCollectionThroughputResponse, MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams, @@ -308,6 +321,174 @@ 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + >, + 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< + MongoDBResourcesMongoDBDatabaseRetrieveThroughputDistributionResponse + >; + /** + * 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBDatabaseRedistributeThroughputResponse + >, + 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + >, + 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< + MongoDBResourcesMongoDBContainerRetrieveThroughputDistributionResponse + >; + /** + * 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< + PollerLike< + PollOperationState< + MongoDBResourcesMongoDBContainerRedistributeThroughputResponse + >, + 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. @@ -394,6 +575,47 @@ export interface MongoDBResources { collectionName: string, options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams ): 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< + PollerLike< + PollOperationState< + MongoDBResourcesListMongoDBCollectionPartitionMergeResponse + >, + 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/restorableGremlinDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts new file mode 100644 index 000000000000..7a5e14606d0c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts @@ -0,0 +1,32 @@ +/* + * 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 { + RestorableGremlinDatabaseGetResult, + RestorableGremlinDatabasesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableGremlinDatabases. */ +export interface RestorableGremlinDatabases { + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the + * restorable account. This helps in scenario where database was accidentally deleted to get the + * deletion time. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts new file mode 100644 index 000000000000..a73bda76e1cb --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts @@ -0,0 +1,31 @@ +/* + * 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 { + RestorableGremlinGraphGetResult, + RestorableGremlinGraphsListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableGremlinGraphs. */ +export interface RestorableGremlinGraphs { + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific + * database. This helps in scenario where container was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts new file mode 100644 index 000000000000..435170af845f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts @@ -0,0 +1,32 @@ +/* + * 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 { + RestorableGremlinResourcesGetResult, + RestorableGremlinResourcesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableGremlinResources. */ +export interface RestorableGremlinResources { + /** + * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp + * and location. This helps in scenarios to validate what resources exist at given timestamp and + * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' + * permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts new file mode 100644 index 000000000000..bbc9b3c588b9 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts @@ -0,0 +1,31 @@ +/* + * 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 { + RestorableTableResourcesGetResult, + RestorableTableResourcesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableTableResources. */ +export interface RestorableTableResources { + /** + * Return a list of tables that exist on the account at the given timestamp and location. This helps in + * scenarios to validate what resources exist at given timestamp and location. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts new file mode 100644 index 000000000000..5e9f06371cba --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts @@ -0,0 +1,31 @@ +/* + * 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 { + RestorableTableGetResult, + RestorableTablesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableTables. */ +export interface RestorableTables { + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario + * where table was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts index 006a8232d8c8..faa6a57f29b7 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts @@ -11,6 +11,8 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, + ClientEncryptionKeyGetResults, + SqlResourcesListClientEncryptionKeysOptionalParams, SqlContainerGetResults, SqlResourcesListSqlContainersOptionalParams, SqlStoredProcedureGetResults, @@ -38,12 +40,20 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, SqlContainerCreateUpdateParameters, SqlResourcesCreateUpdateSqlContainerOptionalParams, SqlResourcesCreateUpdateSqlContainerResponse, SqlResourcesDeleteSqlContainerOptionalParams, + MergeParameters, + SqlResourcesListSqlContainerPartitionMergeOptionalParams, + SqlResourcesListSqlContainerPartitionMergeResponse, SqlResourcesGetSqlContainerThroughputOptionalParams, SqlResourcesGetSqlContainerThroughputResponse, SqlResourcesUpdateSqlContainerThroughputOptionalParams, @@ -52,6 +62,16 @@ import { SqlResourcesMigrateSqlContainerToAutoscaleResponse, SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams, SqlResourcesMigrateSqlContainerToManualThroughputResponse, + RetrieveThroughputParameters, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse, + RedistributeThroughputParameters, + SqlResourcesSqlDatabaseRedistributeThroughputOptionalParams, + SqlResourcesSqlDatabaseRedistributeThroughputResponse, + SqlResourcesSqlContainerRetrieveThroughputDistributionOptionalParams, + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse, + SqlResourcesSqlContainerRedistributeThroughputOptionalParams, + SqlResourcesSqlContainerRedistributeThroughputResponse, SqlResourcesGetSqlStoredProcedureOptionalParams, SqlResourcesGetSqlStoredProcedureResponse, SqlStoredProcedureCreateUpdateParameters, @@ -101,6 +121,19 @@ export interface SqlResources { accountName: string, options?: SqlResourcesListSqlDatabasesOptionalParams ): PagedAsyncIterableIterator; + /** + * 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. + */ + listClientEncryptionKeys( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): PagedAsyncIterableIterator; /** * 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. @@ -370,6 +403,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< + PollerLike< + PollOperationState, + 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. @@ -454,6 +545,45 @@ export interface SqlResources { containerName: string, options?: SqlResourcesDeleteSqlContainerOptionalParams ): 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< + PollerLike< + PollOperationState, + 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. @@ -582,6 +712,168 @@ export interface SqlResources { containerName: string, options?: SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams ): Promise; + /** + * 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 retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. + * @param options The options parameters. + */ + beginSqlDatabaseRetrieveThroughputDistribution( + resourceGroupName: string, + accountName: string, + databaseName: string, + retrieveThroughputParameters: RetrieveThroughputParameters, + options?: SqlResourcesSqlDatabaseRetrieveThroughputDistributionOptionalParams + ): Promise< + PollerLike< + PollOperationState< + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + >, + SqlResourcesSqlDatabaseRetrieveThroughputDistributionResponse + > + >; + /** + * 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 retrieveThroughputParameters The parameters to provide for retrieving throughput distribution + * for the current SQL database. + * @param options The options parameters. + */ + beginSqlDatabaseRetrieveThroughputDistributionAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + 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< + PollerLike< + PollOperationState, + SqlResourcesSqlDatabaseRedistributeThroughputResponse + > + >; + /** + * 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. + */ + beginSqlDatabaseRedistributeThroughputAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + 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< + PollerLike< + PollOperationState< + SqlResourcesSqlContainerRetrieveThroughputDistributionResponse + >, + 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< + PollerLike< + PollOperationState< + SqlResourcesSqlContainerRedistributeThroughputResponse + >, + 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/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts index b6d7e0d81032..20f6d8c3cb18 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts @@ -25,7 +25,10 @@ import { TableResourcesMigrateTableToAutoscaleOptionalParams, TableResourcesMigrateTableToAutoscaleResponse, TableResourcesMigrateTableToManualThroughputOptionalParams, - TableResourcesMigrateTableToManualThroughputResponse + TableResourcesMigrateTableToManualThroughputResponse, + ContinuousBackupRestoreLocation, + TableResourcesRetrieveContinuousBackupInformationOptionalParams, + TableResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -229,4 +232,41 @@ export interface TableResources { tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams ): Promise; + /** + * Retrieves continuous backup information for a table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + tableName: string, + location: ContinuousBackupRestoreLocation, + options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + TableResourcesRetrieveContinuousBackupInformationResponse + >, + TableResourcesRetrieveContinuousBackupInformationResponse + > + >; + /** + * Retrieves continuous backup information for a table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + tableName: string, + location: ContinuousBackupRestoreLocation, + options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts b/sdk/cosmosdb/arm-cosmosdb/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /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"