cosmosdb-release (#20468)
This commit is contained in:
Родитель
1255644f66
Коммит
18c578a3e0
|
@ -9668,7 +9668,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/arm-cosmosdb.tgz:
|
||||
resolution: {integrity: sha512-zGLtmr4RJTq17ajNRZ20xV0XNDjikI6J+nhCa43DnCR4zJ5newFoFSIPObuJVtcFoPPer81HOd8kMbEFuNA4xA==, tarball: file:projects/arm-cosmosdb.tgz}
|
||||
resolution: {integrity: sha512-b1vFT9mSxKrh2OYoHJ9mxx/0N56HfFL+QnYdIP9fvo59HvrfYClQD+GnE9ESVqL1EeP9T/ax6m+na2x/no8Wsw==, tarball: file:projects/arm-cosmosdb.tgz}
|
||||
name: '@rush-temp/arm-cosmosdb'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -9676,18 +9676,19 @@ packages:
|
|||
'@microsoft/api-extractor': 7.19.4
|
||||
'@rollup/plugin-commonjs': 21.0.1_rollup@2.67.1
|
||||
'@rollup/plugin-json': 4.1.0_rollup@2.67.1
|
||||
'@rollup/plugin-multi-entry': 3.0.1_rollup@2.67.1
|
||||
'@rollup/plugin-node-resolve': 8.4.0_rollup@2.67.1
|
||||
'@rollup/plugin-multi-entry': 4.1.0_rollup@2.67.1
|
||||
'@rollup/plugin-node-resolve': 13.1.3_rollup@2.67.1
|
||||
cross-env: 7.0.3
|
||||
mkdirp: 1.0.4
|
||||
mocha: 7.2.0
|
||||
rimraf: 3.0.2
|
||||
rollup: 2.67.1
|
||||
rollup-plugin-sourcemaps: 0.4.2_rollup@2.67.1
|
||||
rollup-plugin-sourcemaps: 0.6.3_rollup@2.67.1
|
||||
tslib: 2.3.1
|
||||
typescript: 4.2.4
|
||||
uglify-js: 3.15.1
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
- encoding
|
||||
- supports-color
|
||||
dev: false
|
||||
|
@ -13760,7 +13761,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/digital-twins-core.tgz:
|
||||
resolution: {integrity: sha512-HHJexN/cUky99Na2FGl/mUweka1rPkQFFVUaBWqP6yHLcZIikBhJ9rsxOS7TGOSM7wCsEGrlRolOh+5jiHMxzw==, tarball: file:projects/digital-twins-core.tgz}
|
||||
resolution: {integrity: sha512-O94bnJUDhIxxX2FnhYTmpFtSLvpe2XaNNwI3e6a7JvEuIkcHKMiN8Sh5WvA8BAhkEV+KsKKKNS8v0erLyit6TA==, tarball: file:projects/digital-twins-core.tgz}
|
||||
name: '@rush-temp/digital-twins-core'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
@ -13809,7 +13810,7 @@ packages:
|
|||
dev: false
|
||||
|
||||
file:projects/dtdl-parser.tgz:
|
||||
resolution: {integrity: sha512-HkF/GM4awodeF184YdeRQvLU+4ZEtC14BZNKwc+K3Z08l9qb+MyNS5/M6OogfKRwL0V6T+bgYGNRciYVn4JO3Q==, tarball: file:projects/dtdl-parser.tgz}
|
||||
resolution: {integrity: sha512-/Dpf2haY7btQZGQuvHBOvp+FV73jJdRtvEb9Iq2FlChhxnlxi3rnU+c5d3RiTER/V7CN2eTqZTmGqU81I5hofA==, tarball: file:projects/dtdl-parser.tgz}
|
||||
name: '@rush-temp/dtdl-parser'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
|
|
|
@ -1,15 +1,237 @@
|
|||
# Release History
|
||||
|
||||
## 16.0.0-beta.1 (2022-02-21)
|
||||
|
||||
**Features**
|
||||
|
||||
## 15.0.1 (Unreleased)
|
||||
- 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 group Service
|
||||
- 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.beginCreateUpdateMongoRoleDefinition
|
||||
- Added operation MongoDBResources.beginCreateUpdateMongoRoleDefinitionAndWait
|
||||
- Added operation MongoDBResources.beginCreateUpdateMongoUserDefinition
|
||||
- Added operation MongoDBResources.beginCreateUpdateMongoUserDefinitionAndWait
|
||||
- Added operation MongoDBResources.beginDeleteMongoRoleDefinition
|
||||
- Added operation MongoDBResources.beginDeleteMongoRoleDefinitionAndWait
|
||||
- Added operation MongoDBResources.beginDeleteMongoUserDefinition
|
||||
- Added operation MongoDBResources.beginDeleteMongoUserDefinitionAndWait
|
||||
- Added operation MongoDBResources.getMongoRoleDefinition
|
||||
- Added operation MongoDBResources.getMongoUserDefinition
|
||||
- Added operation MongoDBResources.listMongoRoleDefinitions
|
||||
- Added operation MongoDBResources.listMongoUserDefinitions
|
||||
- Added operation SqlResources.beginCreateUpdateClientEncryptionKey
|
||||
- Added operation SqlResources.beginCreateUpdateClientEncryptionKeyAndWait
|
||||
- Added operation SqlResources.getClientEncryptionKey
|
||||
- Added operation SqlResources.listClientEncryptionKeys
|
||||
- Added operation TableResources.beginRetrieveContinuousBackupInformation
|
||||
- Added operation TableResources.beginRetrieveContinuousBackupInformationAndWait
|
||||
- Added Interface AuthenticationMethodLdapProperties
|
||||
- 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 CassandraViewListResult
|
||||
- Added Interface CassandraViewResource
|
||||
- Added Interface ClientEncryptionKeyCreateUpdateParameters
|
||||
- Added Interface ClientEncryptionKeyResource
|
||||
- Added Interface ClientEncryptionKeysListResult
|
||||
- Added Interface DataTransferDataSourceSink
|
||||
- Added Interface DataTransferJobFeedResults
|
||||
- Added Interface DataTransferJobProperties
|
||||
- Added Interface DataTransferJobsCreateOptionalParams
|
||||
- Added Interface DataTransferJobsGetOptionalParams
|
||||
- Added Interface DataTransferJobsListByDatabaseAccountNextOptionalParams
|
||||
- Added Interface DataTransferJobsListByDatabaseAccountOptionalParams
|
||||
- Added Interface DataTransferServiceResource
|
||||
- Added Interface DiagnosticLogSettings
|
||||
- Added Interface GraphAPIComputeServiceResource
|
||||
- Added Interface GraphResource
|
||||
- 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 MaterializedViewsBuilderServiceResource
|
||||
- Added Interface MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams
|
||||
- Added Interface MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams
|
||||
- Added Interface MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams
|
||||
- Added Interface MongoDBResourcesDeleteMongoUserDefinitionOptionalParams
|
||||
- Added Interface MongoDBResourcesGetMongoRoleDefinitionOptionalParams
|
||||
- Added Interface MongoDBResourcesGetMongoUserDefinitionOptionalParams
|
||||
- Added Interface MongoDBResourcesListMongoRoleDefinitionsOptionalParams
|
||||
- Added Interface MongoDBResourcesListMongoUserDefinitionsOptionalParams
|
||||
- Added Interface MongoRoleDefinitionCreateUpdateParameters
|
||||
- Added Interface MongoRoleDefinitionListResult
|
||||
- Added Interface MongoUserDefinitionCreateUpdateParameters
|
||||
- Added Interface MongoUserDefinitionListResult
|
||||
- Added Interface Privilege
|
||||
- Added Interface PrivilegeResource
|
||||
- Added Interface RegionalServiceResource
|
||||
- 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 RestorableGremlinResourcesListOptionalParams
|
||||
- Added Interface RestorableGremlinResourcesListResult
|
||||
- Added Interface RestorableTableGetResult
|
||||
- Added Interface RestorableTablePropertiesResource
|
||||
- Added Interface RestorableTableResourcesListOptionalParams
|
||||
- Added Interface RestorableTableResourcesListResult
|
||||
- Added Interface RestorableTablesListOptionalParams
|
||||
- Added Interface RestorableTablesListResult
|
||||
- Added Interface Role
|
||||
- Added Interface ServiceCreateOptionalParams
|
||||
- Added Interface ServiceDeleteOptionalParams
|
||||
- Added Interface ServiceGetOptionalParams
|
||||
- Added Interface ServiceListOptionalParams
|
||||
- Added Interface ServiceResourceCreateUpdateParameters
|
||||
- Added Interface ServiceResourceListResult
|
||||
- Added Interface ServiceResourceProperties
|
||||
- Added Interface SqlDedicatedGatewayServiceResource
|
||||
- Added Interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams
|
||||
- Added Interface SqlResourcesGetClientEncryptionKeyOptionalParams
|
||||
- Added Interface SqlResourcesListClientEncryptionKeysOptionalParams
|
||||
- Added Interface TableResourcesRetrieveContinuousBackupInformationOptionalParams
|
||||
- Added Type Alias AzureBlobDataTransferDataSourceSink
|
||||
- Added Type Alias BackupResource
|
||||
- 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 CassandraViewCreateUpdateParameters
|
||||
- Added Type Alias CassandraViewGetPropertiesOptions
|
||||
- Added Type Alias CassandraViewGetPropertiesResource
|
||||
- Added Type Alias CassandraViewGetResults
|
||||
- Added Type Alias ClientEncryptionKeyGetPropertiesResource
|
||||
- Added Type Alias ClientEncryptionKeyGetResults
|
||||
- Added Type Alias CosmosCassandraDataTransferDataSourceSink
|
||||
- Added Type Alias CosmosSqlDataTransferDataSourceSink
|
||||
- Added Type Alias CreateJobRequest
|
||||
- Added Type Alias DataTransferComponent
|
||||
- Added Type Alias DataTransferDataSourceSinkUnion
|
||||
- Added Type Alias DataTransferJobGetResults
|
||||
- Added Type Alias DataTransferJobsCreateResponse
|
||||
- Added Type Alias DataTransferJobsGetResponse
|
||||
- Added Type Alias DataTransferJobsListByDatabaseAccountNextResponse
|
||||
- Added Type Alias DataTransferJobsListByDatabaseAccountResponse
|
||||
- Added Type Alias DataTransferRegionalServiceResource
|
||||
- Added Type Alias DataTransferServiceResourceProperties
|
||||
- Added Type Alias EnableFullTextQuery
|
||||
- Added Type Alias GraphAPIComputeRegionalServiceResource
|
||||
- Added Type Alias GraphAPIComputeServiceResourceProperties
|
||||
- Added Type Alias GraphResourceCreateUpdateParameters
|
||||
- Added Type Alias GraphResourceGetPropertiesOptions
|
||||
- Added Type Alias GraphResourceGetPropertiesResource
|
||||
- Added Type Alias GraphResourceGetResults
|
||||
- Added Type Alias GraphResourcesCreateUpdateGraphResponse
|
||||
- Added Type Alias GraphResourcesGetGraphResponse
|
||||
- Added Type Alias GraphResourcesListGraphsResponse
|
||||
- Added Type Alias GremlinResourcesRetrieveContinuousBackupInformationResponse
|
||||
- Added Type Alias MaterializedViewsBuilderRegionalServiceResource
|
||||
- Added Type Alias MaterializedViewsBuilderServiceResourceProperties
|
||||
- Added Type Alias MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse
|
||||
- Added Type Alias MongoDBResourcesCreateUpdateMongoUserDefinitionResponse
|
||||
- Added Type Alias MongoDBResourcesGetMongoRoleDefinitionResponse
|
||||
- Added Type Alias MongoDBResourcesGetMongoUserDefinitionResponse
|
||||
- Added Type Alias MongoDBResourcesListMongoRoleDefinitionsResponse
|
||||
- Added Type Alias MongoDBResourcesListMongoUserDefinitionsResponse
|
||||
- Added Type Alias MongoRoleDefinitionGetResults
|
||||
- Added Type Alias MongoRoleDefinitionType
|
||||
- Added Type Alias MongoUserDefinitionGetResults
|
||||
- Added Type Alias RestorableGremlinDatabasesListResponse
|
||||
- Added Type Alias RestorableGremlinGraphsListResponse
|
||||
- Added Type Alias RestorableGremlinResourcesListResponse
|
||||
- Added Type Alias RestorableTableResourcesListResponse
|
||||
- Added Type Alias RestorableTablesListResponse
|
||||
- Added Type Alias ServiceCreateResponse
|
||||
- Added Type Alias ServiceGetResponse
|
||||
- Added Type Alias ServiceListResponse
|
||||
- Added Type Alias ServiceResource
|
||||
- Added Type Alias ServiceResourcePropertiesUnion
|
||||
- Added Type Alias ServiceSize
|
||||
- Added Type Alias ServiceStatus
|
||||
- Added Type Alias ServiceType
|
||||
- Added Type Alias SqlDedicatedGatewayRegionalServiceResource
|
||||
- Added Type Alias SqlDedicatedGatewayServiceResourceProperties
|
||||
- Added Type Alias SqlResourcesCreateUpdateClientEncryptionKeyResponse
|
||||
- Added Type Alias SqlResourcesGetClientEncryptionKeyResponse
|
||||
- Added Type Alias SqlResourcesListClientEncryptionKeysResponse
|
||||
- Added Type Alias TableResourcesRetrieveContinuousBackupInformationResponse
|
||||
- Interface ARMResourceProperties has a new optional parameter identity
|
||||
- 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 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
|
||||
- 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
|
||||
- Class CosmosDBManagementClient has a new parameter service
|
||||
- Type Alias DatabaseAccountCreateUpdateParameters has a new parameter diagnosticLogSettings
|
||||
- Type Alias DatabaseAccountCreateUpdateParameters has a new parameter enableMaterializedViews
|
||||
- Type Alias DatabaseAccountGetResults has a new parameter diagnosticLogSettings
|
||||
- Type Alias DatabaseAccountGetResults has a new parameter enableMaterializedViews
|
||||
- Added Enum KnownDataTransferComponent
|
||||
- Added Enum KnownServiceSize
|
||||
- Added Enum KnownServiceStatus
|
||||
- Added Enum KnownServiceType
|
||||
- Enum KnownAuthenticationMethod has a new value Ldap
|
||||
|
||||
### Features Added
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
### Bugs Fixed
|
||||
|
||||
### Other Changes
|
||||
**Breaking Changes**
|
||||
|
||||
- Type Alias DatabaseAccountCreateUpdateParameters no longer has parameter identity
|
||||
- Type Alias DatabaseAccountGetResults no longer has parameter identity
|
||||
|
||||
|
||||
## 15.0.0 (2021-12-09)
|
||||
|
||||
The package of @azure/arm-cosmosdb is using our next generation design principles since version 15.0.0, which contains breaking changes.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2021 Microsoft
|
||||
Copyright (c) 2022 Microsoft
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -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
|
||||
|
@ -16,6 +16,8 @@ Azure Cosmos DB Database Service Resource Provider REST API
|
|||
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
|
||||
- Latest versions of Safari, Chrome, Edge and Firefox.
|
||||
|
||||
See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- An [Azure subscription][azure_sub].
|
||||
|
@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
|
|||
```javascript
|
||||
const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb");
|
||||
const { DefaultAzureCredential } = require("@azure/identity");
|
||||
// For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
|
||||
|
||||
const subscriptionId = "00000000-0000-0000-0000-000000000000";
|
||||
const client = new CosmosDBManagementClient(new DefaultAzureCredential(), subscriptionId);
|
||||
|
||||
// For client-side applications running in the browser, use this code instead:
|
||||
// const credential = new InteractiveBrowserCredential({
|
||||
// tenantId: "<YOUR_TENANT_ID>",
|
||||
// clientId: "<YOUR_CLIENT_ID>"
|
||||
// });
|
||||
// const client = new CosmosDBManagementClient(credential, subscriptionId);
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"commit": "d710fb7f40338ca6ef00e0a9680be0a3d4cf5059",
|
||||
"commit": "bb9f1204f9a337404ff7e7b73b4c7b4ddde7f8f1",
|
||||
"readme": "specification/cosmos-db/resource-manager/readme.md",
|
||||
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211130.1",
|
||||
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/cosmos-db/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220217.1",
|
||||
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20211130.1"
|
||||
"use": "@autorest/typescript@6.0.0-alpha.16.20220217.1"
|
||||
}
|
|
@ -1,18 +1,31 @@
|
|||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
|
||||
"docModel": { "enabled": true },
|
||||
"apiReport": { "enabled": true, "reportFolder": "./review" },
|
||||
"docModel": {
|
||||
"enabled": true
|
||||
},
|
||||
"apiReport": {
|
||||
"enabled": true,
|
||||
"reportFolder": "./review"
|
||||
},
|
||||
"dtsRollup": {
|
||||
"enabled": true,
|
||||
"untrimmedFilePath": "",
|
||||
"publicTrimmedFilePath": "./types/arm-cosmosdb.d.ts"
|
||||
},
|
||||
"messages": {
|
||||
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
},
|
||||
"extractorMessageReporting": {
|
||||
"ae-missing-release-tag": { "logLevel": "none" },
|
||||
"ae-unresolved-link": { "logLevel": "none" }
|
||||
"ae-missing-release-tag": {
|
||||
"logLevel": "none"
|
||||
},
|
||||
"ae-unresolved-link": {
|
||||
"logLevel": "none"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
"sdk-type": "mgmt",
|
||||
"author": "Microsoft Corporation",
|
||||
"description": "A generated SDK for CosmosDBManagementClient.",
|
||||
"version": "15.0.1",
|
||||
"version": "16.0.0-beta.1",
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
},
|
||||
|
@ -30,12 +30,12 @@
|
|||
"devDependencies": {
|
||||
"@microsoft/api-extractor": "^7.18.11",
|
||||
"@rollup/plugin-commonjs": "^21.0.1",
|
||||
"@rollup/plugin-json": "^4.0.0",
|
||||
"@rollup/plugin-multi-entry": "^3.0.0",
|
||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-multi-entry": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.1.3",
|
||||
"mkdirp": "^1.0.4",
|
||||
"rollup": "^2.0.0",
|
||||
"rollup-plugin-sourcemaps": "^0.4.2",
|
||||
"rollup": "^2.66.1",
|
||||
"rollup-plugin-sourcemaps": "^0.6.3",
|
||||
"typescript": "~4.2.0",
|
||||
"uglify-js": "^3.4.9",
|
||||
"rimraf": "^3.0.0",
|
||||
|
@ -98,5 +98,13 @@
|
|||
"docs": "echo skipped"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"//metadata": {
|
||||
"constantPaths": [
|
||||
{
|
||||
"path": "src/cosmosDBManagementClient.ts",
|
||||
"prefix": "packageDetails"
|
||||
}
|
||||
]
|
||||
},
|
||||
"autoPublish": true
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -14,62 +14,14 @@ import json from "@rollup/plugin-json";
|
|||
|
||||
import nodeBuiltins from "builtin-modules";
|
||||
|
||||
/**
|
||||
* Gets the proper configuration needed for rollup's commonJS plugin for @opentelemetry/api.
|
||||
*
|
||||
* NOTE: this manual configuration is only needed because OpenTelemetry uses an
|
||||
* __exportStar downleveled helper function to declare its exports which confuses
|
||||
* rollup's automatic discovery mechanism.
|
||||
*
|
||||
* @returns an object reference that can be `...`'d into your cjs() configuration.
|
||||
*/
|
||||
export function openTelemetryCommonJs() {
|
||||
const namedExports = {};
|
||||
|
||||
for (const key of [
|
||||
"@opentelemetry/api",
|
||||
"@azure/core-tracing/node_modules/@opentelemetry/api"
|
||||
]) {
|
||||
namedExports[key] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"SpanStatusCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
const releasedOpenTelemetryVersions = ["0.10.2", "1.0.0-rc.0"];
|
||||
|
||||
for (const version of releasedOpenTelemetryVersions) {
|
||||
namedExports[
|
||||
// working around a limitation in the rollup common.js plugin - it's not able to resolve these modules so the named exports listed above will not get applied. We have to drill down to the actual path.
|
||||
`../../../common/temp/node_modules/.pnpm/@opentelemetry/api@${version}/node_modules/@opentelemetry/api/build/src/index.js`
|
||||
] = [
|
||||
"SpanKind",
|
||||
"TraceFlags",
|
||||
"getSpan",
|
||||
"setSpan",
|
||||
"StatusCode",
|
||||
"CanonicalCode",
|
||||
"getSpanContext",
|
||||
"setSpanContext"
|
||||
];
|
||||
}
|
||||
|
||||
return namedExports;
|
||||
}
|
||||
|
||||
// #region Warning Handler
|
||||
|
||||
/**
|
||||
* A function that can determine whether a rollupwarning should be ignored. If
|
||||
* A function that can determine whether a rollup warning should be ignored. If
|
||||
* the function returns `true`, then the warning will not be displayed.
|
||||
*/
|
||||
|
||||
function ignoreNiseSinonEvalWarnings(warning) {
|
||||
function ignoreNiseSinonEval(warning) {
|
||||
return (
|
||||
warning.code === "EVAL" &&
|
||||
warning.id &&
|
||||
|
@ -78,17 +30,14 @@ function ignoreNiseSinonEvalWarnings(warning) {
|
|||
);
|
||||
}
|
||||
|
||||
function ignoreChaiCircularDependencyWarnings(warning) {
|
||||
function ignoreChaiCircularDependency(warning) {
|
||||
return (
|
||||
warning.code === "CIRCULAR_DEPENDENCY" &&
|
||||
warning.importer && warning.importer.includes("node_modules/chai") === true
|
||||
);
|
||||
}
|
||||
|
||||
const warningInhibitors = [
|
||||
ignoreChaiCircularDependencyWarnings,
|
||||
ignoreNiseSinonEvalWarnings
|
||||
];
|
||||
const warningInhibitors = [ignoreChaiCircularDependency, ignoreNiseSinonEval];
|
||||
|
||||
/**
|
||||
* Construct a warning handler for the shared rollup configuration
|
||||
|
@ -122,22 +71,7 @@ function makeBrowserTestConfig() {
|
|||
nodeResolve({
|
||||
mainFields: ["module", "browser"]
|
||||
}),
|
||||
cjs({
|
||||
namedExports: {
|
||||
// Chai's strange internal architecture makes it impossible to statically
|
||||
// analyze its exports.
|
||||
chai: [
|
||||
"version",
|
||||
"use",
|
||||
"util",
|
||||
"config",
|
||||
"expect",
|
||||
"should",
|
||||
"assert"
|
||||
],
|
||||
...openTelemetryCommonJs()
|
||||
}
|
||||
}),
|
||||
cjs(),
|
||||
json(),
|
||||
sourcemaps()
|
||||
//viz({ filename: "dist-test/browser-stats.html", sourcemap: true })
|
||||
|
@ -173,7 +107,7 @@ export function makeConfig(pkg, options) {
|
|||
],
|
||||
output: { file: "dist/index.js", format: "cjs", sourcemap: true },
|
||||
preserveSymlinks: false,
|
||||
plugins: [sourcemaps(), nodeResolve(), cjs()]
|
||||
plugins: [sourcemaps(), nodeResolve()]
|
||||
};
|
||||
|
||||
const config = [baseConfig];
|
||||
|
|
|
@ -22,12 +22,16 @@ import {
|
|||
CollectionPartitionImpl,
|
||||
PartitionKeyRangeIdImpl,
|
||||
PartitionKeyRangeIdRegionImpl,
|
||||
GraphResourcesImpl,
|
||||
SqlResourcesImpl,
|
||||
MongoDBResourcesImpl,
|
||||
TableResourcesImpl,
|
||||
CassandraResourcesImpl,
|
||||
GremlinResourcesImpl,
|
||||
LocationsImpl,
|
||||
DataTransferJobsImpl,
|
||||
CassandraClustersImpl,
|
||||
CassandraDataCentersImpl,
|
||||
NotebookWorkspacesImpl,
|
||||
PrivateEndpointConnectionsImpl,
|
||||
PrivateLinkResourcesImpl,
|
||||
|
@ -38,8 +42,12 @@ import {
|
|||
RestorableMongodbDatabasesImpl,
|
||||
RestorableMongodbCollectionsImpl,
|
||||
RestorableMongodbResourcesImpl,
|
||||
CassandraClustersImpl,
|
||||
CassandraDataCentersImpl
|
||||
RestorableGremlinDatabasesImpl,
|
||||
RestorableGremlinGraphsImpl,
|
||||
RestorableGremlinResourcesImpl,
|
||||
RestorableTablesImpl,
|
||||
RestorableTableResourcesImpl,
|
||||
ServiceImpl
|
||||
} from "./operations";
|
||||
import {
|
||||
DatabaseAccounts,
|
||||
|
@ -55,12 +63,16 @@ import {
|
|||
CollectionPartition,
|
||||
PartitionKeyRangeId,
|
||||
PartitionKeyRangeIdRegion,
|
||||
GraphResources,
|
||||
SqlResources,
|
||||
MongoDBResources,
|
||||
TableResources,
|
||||
CassandraResources,
|
||||
GremlinResources,
|
||||
Locations,
|
||||
DataTransferJobs,
|
||||
CassandraClusters,
|
||||
CassandraDataCenters,
|
||||
NotebookWorkspaces,
|
||||
PrivateEndpointConnections,
|
||||
PrivateLinkResources,
|
||||
|
@ -71,8 +83,12 @@ import {
|
|||
RestorableMongodbDatabases,
|
||||
RestorableMongodbCollections,
|
||||
RestorableMongodbResources,
|
||||
CassandraClusters,
|
||||
CassandraDataCenters
|
||||
RestorableGremlinDatabases,
|
||||
RestorableGremlinGraphs,
|
||||
RestorableGremlinResources,
|
||||
RestorableTables,
|
||||
RestorableTableResources,
|
||||
Service
|
||||
} from "./operationsInterfaces";
|
||||
import { CosmosDBManagementClientOptionalParams } from "./models";
|
||||
|
||||
|
@ -108,7 +124,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {
|
|||
credential: credentials
|
||||
};
|
||||
|
||||
const packageDetails = `azsdk-js-arm-cosmosdb/15.0.0`;
|
||||
const packageDetails = `azsdk-js-arm-cosmosdb/16.0.0-beta.1`;
|
||||
const userAgentPrefix =
|
||||
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
||||
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
||||
|
@ -131,7 +147,7 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {
|
|||
|
||||
// Assigning values to Constant parameters
|
||||
this.$host = options.$host || "https://management.azure.com";
|
||||
this.apiVersion = options.apiVersion || "2021-10-15";
|
||||
this.apiVersion = options.apiVersion || "2021-11-15-preview";
|
||||
this.databaseAccounts = new DatabaseAccountsImpl(this);
|
||||
this.operations = new OperationsImpl(this);
|
||||
this.database = new DatabaseImpl(this);
|
||||
|
@ -145,12 +161,16 @@ 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);
|
||||
this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this);
|
||||
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
||||
|
@ -163,8 +183,12 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {
|
|||
this
|
||||
);
|
||||
this.restorableMongodbResources = new RestorableMongodbResourcesImpl(this);
|
||||
this.cassandraClusters = new CassandraClustersImpl(this);
|
||||
this.cassandraDataCenters = new CassandraDataCentersImpl(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);
|
||||
}
|
||||
|
||||
databaseAccounts: DatabaseAccounts;
|
||||
|
@ -180,12 +204,16 @@ 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;
|
||||
privateEndpointConnections: PrivateEndpointConnections;
|
||||
privateLinkResources: PrivateLinkResources;
|
||||
|
@ -196,6 +224,10 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient {
|
|||
restorableMongodbDatabases: RestorableMongodbDatabases;
|
||||
restorableMongodbCollections: RestorableMongodbCollections;
|
||||
restorableMongodbResources: RestorableMongodbResources;
|
||||
cassandraClusters: CassandraClusters;
|
||||
cassandraDataCenters: CassandraDataCenters;
|
||||
restorableGremlinDatabases: RestorableGremlinDatabases;
|
||||
restorableGremlinGraphs: RestorableGremlinGraphs;
|
||||
restorableGremlinResources: RestorableGremlinResources;
|
||||
restorableTables: RestorableTables;
|
||||
restorableTableResources: RestorableTableResources;
|
||||
service: Service;
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -17,8 +17,10 @@ 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,
|
||||
SqlStoredProcedureCreateUpdateParameters as SqlStoredProcedureCreateUpdateParametersMapper,
|
||||
SqlUserDefinedFunctionCreateUpdateParameters as SqlUserDefinedFunctionCreateUpdateParametersMapper,
|
||||
|
@ -28,16 +30,21 @@ import {
|
|||
ContinuousBackupRestoreLocation as ContinuousBackupRestoreLocationMapper,
|
||||
MongoDBDatabaseCreateUpdateParameters as MongoDBDatabaseCreateUpdateParametersMapper,
|
||||
MongoDBCollectionCreateUpdateParameters as MongoDBCollectionCreateUpdateParametersMapper,
|
||||
MongoRoleDefinitionCreateUpdateParameters as MongoRoleDefinitionCreateUpdateParametersMapper,
|
||||
MongoUserDefinitionCreateUpdateParameters as MongoUserDefinitionCreateUpdateParametersMapper,
|
||||
TableCreateUpdateParameters as TableCreateUpdateParametersMapper,
|
||||
CassandraKeyspaceCreateUpdateParameters as CassandraKeyspaceCreateUpdateParametersMapper,
|
||||
CassandraTableCreateUpdateParameters as CassandraTableCreateUpdateParametersMapper,
|
||||
CassandraViewCreateUpdateParameters as CassandraViewCreateUpdateParametersMapper,
|
||||
GremlinDatabaseCreateUpdateParameters as GremlinDatabaseCreateUpdateParametersMapper,
|
||||
GremlinGraphCreateUpdateParameters as GremlinGraphCreateUpdateParametersMapper,
|
||||
NotebookWorkspaceCreateUpdateParameters as NotebookWorkspaceCreateUpdateParametersMapper,
|
||||
PrivateEndpointConnection as PrivateEndpointConnectionMapper,
|
||||
CreateJobRequest as CreateJobRequestMapper,
|
||||
ClusterResource as ClusterResourceMapper,
|
||||
CommandPostBody as CommandPostBodyMapper,
|
||||
DataCenterResource as DataCenterResourceMapper
|
||||
DataCenterResource as DataCenterResourceMapper,
|
||||
NotebookWorkspaceCreateUpdateParameters as NotebookWorkspaceCreateUpdateParametersMapper,
|
||||
PrivateEndpointConnection as PrivateEndpointConnectionMapper,
|
||||
ServiceResourceCreateUpdateParameters as ServiceResourceCreateUpdateParametersMapper
|
||||
} from "../models/mappers";
|
||||
|
||||
export const accept: OperationParameter = {
|
||||
|
@ -112,7 +119,7 @@ export const accountName: OperationURLParameter = {
|
|||
export const apiVersion: OperationQueryParameter = {
|
||||
parameterPath: "apiVersion",
|
||||
mapper: {
|
||||
defaultValue: "2021-10-15",
|
||||
defaultValue: "2021-11-15-preview",
|
||||
isConstant: true,
|
||||
serializedName: "api-version",
|
||||
type: {
|
||||
|
@ -262,6 +269,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: {
|
||||
|
@ -283,6 +306,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: {
|
||||
|
@ -405,6 +444,38 @@ export const createUpdateMongoDBCollectionParameters: OperationParameter = {
|
|||
mapper: MongoDBCollectionCreateUpdateParametersMapper
|
||||
};
|
||||
|
||||
export const mongoRoleDefinitionId: OperationURLParameter = {
|
||||
parameterPath: "mongoRoleDefinitionId",
|
||||
mapper: {
|
||||
serializedName: "mongoRoleDefinitionId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const createUpdateMongoRoleDefinitionParameters: OperationParameter = {
|
||||
parameterPath: "createUpdateMongoRoleDefinitionParameters",
|
||||
mapper: MongoRoleDefinitionCreateUpdateParametersMapper
|
||||
};
|
||||
|
||||
export const mongoUserDefinitionId: OperationURLParameter = {
|
||||
parameterPath: "mongoUserDefinitionId",
|
||||
mapper: {
|
||||
serializedName: "mongoUserDefinitionId",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const createUpdateMongoUserDefinitionParameters: OperationParameter = {
|
||||
parameterPath: "createUpdateMongoUserDefinitionParameters",
|
||||
mapper: MongoUserDefinitionCreateUpdateParametersMapper
|
||||
};
|
||||
|
||||
export const tableName: OperationURLParameter = {
|
||||
parameterPath: "tableName",
|
||||
mapper: {
|
||||
|
@ -442,15 +513,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"
|
||||
|
@ -458,6 +524,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
|
||||
|
@ -474,6 +550,85 @@ 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: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"),
|
||||
MaxLength: 100,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "clusterName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const body: OperationParameter = {
|
||||
parameterPath: "body",
|
||||
mapper: ClusterResourceMapper
|
||||
};
|
||||
|
||||
export const body1: OperationParameter = {
|
||||
parameterPath: "body",
|
||||
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: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"),
|
||||
MaxLength: 100,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "dataCenterName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const body2: OperationParameter = {
|
||||
parameterPath: "body",
|
||||
mapper: DataCenterResourceMapper
|
||||
};
|
||||
|
||||
export const notebookWorkspaceName: OperationURLParameter = {
|
||||
parameterPath: "notebookWorkspaceName",
|
||||
mapper: {
|
||||
|
@ -588,49 +743,32 @@ export const restorableMongodbDatabaseRid: OperationQueryParameter = {
|
|||
}
|
||||
};
|
||||
|
||||
export const clusterName: OperationURLParameter = {
|
||||
parameterPath: "clusterName",
|
||||
export const restorableGremlinDatabaseRid: OperationQueryParameter = {
|
||||
parameterPath: ["options", "restorableGremlinDatabaseRid"],
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"),
|
||||
MaxLength: 100,
|
||||
MinLength: 1
|
||||
},
|
||||
serializedName: "clusterName",
|
||||
required: true,
|
||||
serializedName: "restorableGremlinDatabaseRid",
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const body: OperationParameter = {
|
||||
parameterPath: "body",
|
||||
mapper: ClusterResourceMapper
|
||||
export const createUpdateParameters1: OperationParameter = {
|
||||
parameterPath: "createUpdateParameters",
|
||||
mapper: ServiceResourceCreateUpdateParametersMapper
|
||||
};
|
||||
|
||||
export const body1: OperationParameter = {
|
||||
parameterPath: "body",
|
||||
mapper: CommandPostBodyMapper
|
||||
};
|
||||
|
||||
export const dataCenterName: OperationURLParameter = {
|
||||
parameterPath: "dataCenterName",
|
||||
export const serviceName: OperationURLParameter = {
|
||||
parameterPath: "serviceName",
|
||||
mapper: {
|
||||
constraints: {
|
||||
Pattern: new RegExp("^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$"),
|
||||
MaxLength: 100,
|
||||
MinLength: 1
|
||||
MaxLength: 50,
|
||||
MinLength: 3
|
||||
},
|
||||
serializedName: "dataCenterName",
|
||||
serializedName: "serviceName",
|
||||
required: true,
|
||||
type: {
|
||||
name: "String"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const body2: OperationParameter = {
|
||||
parameterPath: "body",
|
||||
mapper: DataCenterResourceMapper
|
||||
};
|
||||
|
|
|
@ -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<BackupResource> {
|
||||
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<BackupResource[]> {
|
||||
let result = await this._listBackups(
|
||||
resourceGroupName,
|
||||
clusterName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listBackupsPagingAll(
|
||||
resourceGroupName: string,
|
||||
clusterName: string,
|
||||
options?: CassandraClustersListBackupsOptionalParams
|
||||
): AsyncIterableIterator<BackupResource> {
|
||||
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.
|
||||
|
@ -525,6 +590,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<CassandraClustersListBackupsResponse> {
|
||||
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<CassandraClustersGetBackupResponse> {
|
||||
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
|
||||
|
@ -895,6 +996,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",
|
||||
|
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -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<CassandraViewGetResults> {
|
||||
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<CassandraViewGetResults[]> {
|
||||
let result = await this._listCassandraViews(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
keyspaceName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listCassandraViewsPagingAll(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
keyspaceName: string,
|
||||
options?: CassandraResourcesListCassandraViewsOptionalParams
|
||||
): AsyncIterableIterator<CassandraViewGetResults> {
|
||||
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.
|
||||
|
@ -1298,6 +1383,570 @@ export class CassandraResourcesImpl implements CassandraResources {
|
|||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<CassandraResourcesListCassandraViewsResponse> {
|
||||
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<CassandraResourcesGetCassandraViewResponse> {
|
||||
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>,
|
||||
CassandraResourcesCreateUpdateCassandraViewResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<CassandraResourcesCreateUpdateCassandraViewResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<CassandraResourcesCreateUpdateCassandraViewResponse> {
|
||||
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<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<void> {
|
||||
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<CassandraResourcesGetCassandraViewThroughputResponse> {
|
||||
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<CassandraResourcesUpdateCassandraViewThroughputResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<CassandraResourcesUpdateCassandraViewThroughputResponse> {
|
||||
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<CassandraResourcesMigrateCassandraViewToAutoscaleResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<CassandraResourcesMigrateCassandraViewToAutoscaleResponse> {
|
||||
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<CassandraResourcesMigrateCassandraViewToManualThroughputResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<CassandraResourcesMigrateCassandraViewToManualThroughputResponse> {
|
||||
const poller = await this.beginMigrateCassandraViewToManualThroughput(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
keyspaceName,
|
||||
viewName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
@ -1710,3 +2359,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
|
||||
};
|
||||
|
|
|
@ -0,0 +1,282 @@
|
|||
/*
|
||||
* 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,
|
||||
DataTransferJobsListByDatabaseAccountResponse,
|
||||
DataTransferJobsListByDatabaseAccountNextResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<DataTransferJobGetResults> {
|
||||
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<DataTransferJobGetResults[]> {
|
||||
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<DataTransferJobGetResults> {
|
||||
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<DataTransferJobsCreateResponse> {
|
||||
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<DataTransferJobsGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, accountName, jobName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<DataTransferJobsListByDatabaseAccountResponse> {
|
||||
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<DataTransferJobsListByDatabaseAccountNextResponse> {
|
||||
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: {
|
||||
201: {
|
||||
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 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
|
||||
};
|
|
@ -0,0 +1,411 @@
|
|||
/*
|
||||
* 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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<GraphResourceGetResults> {
|
||||
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<GraphResourceGetResults[]> {
|
||||
let result = await this._listGraphs(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listGraphsPagingAll(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: GraphResourcesListGraphsOptionalParams
|
||||
): AsyncIterableIterator<GraphResourceGetResults> {
|
||||
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<GraphResourcesListGraphsResponse> {
|
||||
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<GraphResourcesGetGraphResponse> {
|
||||
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>,
|
||||
GraphResourcesCreateUpdateGraphResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<GraphResourcesCreateUpdateGraphResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<GraphResourcesCreateUpdateGraphResponse> {
|
||||
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<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<void> {
|
||||
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
|
||||
};
|
|
@ -49,7 +49,10 @@ import {
|
|||
GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams,
|
||||
GremlinResourcesMigrateGremlinGraphToAutoscaleResponse,
|
||||
GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams,
|
||||
GremlinResourcesMigrateGremlinGraphToManualThroughputResponse
|
||||
GremlinResourcesMigrateGremlinGraphToManualThroughputResponse,
|
||||
ContinuousBackupRestoreLocation,
|
||||
GremlinResourcesRetrieveContinuousBackupInformationOptionalParams,
|
||||
GremlinResourcesRetrieveContinuousBackupInformationResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -1288,6 +1291,116 @@ 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<GremlinResourcesRetrieveContinuousBackupInformationResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<GremlinResourcesRetrieveContinuousBackupInformationResponse> {
|
||||
const poller = await this.beginRetrieveContinuousBackupInformation(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
databaseName,
|
||||
graphName,
|
||||
location,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
@ -1527,8 +1640,8 @@ const getGremlinGraphOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.databaseName,
|
||||
Parameters.graphName
|
||||
Parameters.graphName,
|
||||
Parameters.databaseName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
|
@ -1558,8 +1671,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",
|
||||
|
@ -1576,8 +1689,8 @@ const deleteGremlinGraphOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.databaseName,
|
||||
Parameters.graphName
|
||||
Parameters.graphName,
|
||||
Parameters.databaseName
|
||||
],
|
||||
serializer
|
||||
};
|
||||
|
@ -1596,8 +1709,8 @@ const getGremlinGraphThroughputOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.databaseName,
|
||||
Parameters.graphName
|
||||
Parameters.graphName,
|
||||
Parameters.databaseName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
|
@ -1627,8 +1740,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",
|
||||
|
@ -1661,8 +1774,8 @@ const migrateGremlinGraphToAutoscaleOperationSpec: coreClient.OperationSpec = {
|
|||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.databaseName,
|
||||
Parameters.graphName
|
||||
Parameters.graphName,
|
||||
Parameters.databaseName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
|
@ -1694,9 +1807,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
|
||||
};
|
||||
|
|
|
@ -19,12 +19,16 @@ 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";
|
||||
export * from "./privateEndpointConnections";
|
||||
export * from "./privateLinkResources";
|
||||
|
@ -35,5 +39,9 @@ export * from "./restorableSqlResources";
|
|||
export * from "./restorableMongodbDatabases";
|
||||
export * from "./restorableMongodbCollections";
|
||||
export * from "./restorableMongodbResources";
|
||||
export * from "./cassandraClusters";
|
||||
export * from "./cassandraDataCenters";
|
||||
export * from "./restorableGremlinDatabases";
|
||||
export * from "./restorableGremlinGraphs";
|
||||
export * from "./restorableGremlinResources";
|
||||
export * from "./restorableTables";
|
||||
export * from "./restorableTableResources";
|
||||
export * from "./service";
|
||||
|
|
|
@ -19,6 +19,10 @@ import {
|
|||
MongoDBResourcesListMongoDBDatabasesOptionalParams,
|
||||
MongoDBCollectionGetResults,
|
||||
MongoDBResourcesListMongoDBCollectionsOptionalParams,
|
||||
MongoRoleDefinitionGetResults,
|
||||
MongoDBResourcesListMongoRoleDefinitionsOptionalParams,
|
||||
MongoUserDefinitionGetResults,
|
||||
MongoDBResourcesListMongoUserDefinitionsOptionalParams,
|
||||
MongoDBResourcesListMongoDBDatabasesResponse,
|
||||
MongoDBResourcesGetMongoDBDatabaseOptionalParams,
|
||||
MongoDBResourcesGetMongoDBDatabaseResponse,
|
||||
|
@ -50,6 +54,20 @@ import {
|
|||
MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse,
|
||||
MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams,
|
||||
MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse,
|
||||
MongoDBResourcesGetMongoRoleDefinitionOptionalParams,
|
||||
MongoDBResourcesGetMongoRoleDefinitionResponse,
|
||||
MongoRoleDefinitionCreateUpdateParameters,
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams,
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse,
|
||||
MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams,
|
||||
MongoDBResourcesListMongoRoleDefinitionsResponse,
|
||||
MongoDBResourcesGetMongoUserDefinitionOptionalParams,
|
||||
MongoDBResourcesGetMongoUserDefinitionResponse,
|
||||
MongoUserDefinitionCreateUpdateParameters,
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams,
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionResponse,
|
||||
MongoDBResourcesDeleteMongoUserDefinitionOptionalParams,
|
||||
MongoDBResourcesListMongoUserDefinitionsResponse,
|
||||
ContinuousBackupRestoreLocation,
|
||||
MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams,
|
||||
MongoDBResourcesRetrieveContinuousBackupInformationResponse
|
||||
|
@ -196,6 +214,126 @@ export class MongoDBResourcesImpl implements MongoDBResources {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the list of all Azure Cosmos DB Mongo Role Definitions.
|
||||
* @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 listMongoRoleDefinitions(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams
|
||||
): PagedAsyncIterableIterator<MongoRoleDefinitionGetResults> {
|
||||
const iter = this.listMongoRoleDefinitionsPagingAll(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listMongoRoleDefinitionsPagingPage(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listMongoRoleDefinitionsPagingPage(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams
|
||||
): AsyncIterableIterator<MongoRoleDefinitionGetResults[]> {
|
||||
let result = await this._listMongoRoleDefinitions(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listMongoRoleDefinitionsPagingAll(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams
|
||||
): AsyncIterableIterator<MongoRoleDefinitionGetResults> {
|
||||
for await (const page of this.listMongoRoleDefinitionsPagingPage(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the list of all Azure Cosmos DB Mongo User Definition.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public listMongoUserDefinitions(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams
|
||||
): PagedAsyncIterableIterator<MongoUserDefinitionGetResults> {
|
||||
const iter = this.listMongoUserDefinitionsPagingAll(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listMongoUserDefinitionsPagingPage(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listMongoUserDefinitionsPagingPage(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams
|
||||
): AsyncIterableIterator<MongoUserDefinitionGetResults[]> {
|
||||
let result = await this._listMongoUserDefinitions(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listMongoUserDefinitionsPagingAll(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams
|
||||
): AsyncIterableIterator<MongoUserDefinitionGetResults> {
|
||||
for await (const page of this.listMongoUserDefinitionsPagingPage(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists the MongoDB databases under an existing Azure Cosmos DB database account.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
|
@ -1298,6 +1436,458 @@ export class MongoDBResourcesImpl implements MongoDBResources {
|
|||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @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.
|
||||
*/
|
||||
getMongoRoleDefinition(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesGetMongoRoleDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesGetMongoRoleDefinitionResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ mongoRoleDefinitionId, resourceGroupName, accountName, options },
|
||||
getMongoRoleDefinitionOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoRoleDefinitionParameters The properties required to create or update a Role
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateUpdateMongoRoleDefinition(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse
|
||||
>,
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse> => {
|
||||
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,
|
||||
{
|
||||
mongoRoleDefinitionId,
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
createUpdateMongoRoleDefinitionParameters,
|
||||
options
|
||||
},
|
||||
createUpdateMongoRoleDefinitionOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoRoleDefinitionParameters The properties required to create or update a Role
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateUpdateMongoRoleDefinitionAndWait(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse> {
|
||||
const poller = await this.beginCreateUpdateMongoRoleDefinition(
|
||||
mongoRoleDefinitionId,
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
createUpdateMongoRoleDefinitionParameters,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @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.
|
||||
*/
|
||||
async beginDeleteMongoRoleDefinition(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
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,
|
||||
{ mongoRoleDefinitionId, resourceGroupName, accountName, options },
|
||||
deleteMongoRoleDefinitionOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @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.
|
||||
*/
|
||||
async beginDeleteMongoRoleDefinitionAndWait(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDeleteMongoRoleDefinition(
|
||||
mongoRoleDefinitionId,
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the list of all Azure Cosmos DB Mongo Role Definitions.
|
||||
* @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 _listMongoRoleDefinitions(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams
|
||||
): Promise<MongoDBResourcesListMongoRoleDefinitionsResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, accountName, options },
|
||||
listMongoRoleDefinitionsOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @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.
|
||||
*/
|
||||
getMongoUserDefinition(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesGetMongoUserDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesGetMongoUserDefinitionResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ mongoUserDefinitionId, resourceGroupName, accountName, options },
|
||||
getMongoUserDefinitionOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoUserDefinitionParameters The properties required to create or update a User
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateUpdateMongoUserDefinition(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoUserDefinitionParameters: MongoUserDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionResponse
|
||||
>,
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<MongoDBResourcesCreateUpdateMongoUserDefinitionResponse> => {
|
||||
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,
|
||||
{
|
||||
mongoUserDefinitionId,
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
createUpdateMongoUserDefinitionParameters,
|
||||
options
|
||||
},
|
||||
createUpdateMongoUserDefinitionOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoUserDefinitionParameters The properties required to create or update a User
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateUpdateMongoUserDefinitionAndWait(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoUserDefinitionParameters: MongoUserDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesCreateUpdateMongoUserDefinitionResponse> {
|
||||
const poller = await this.beginCreateUpdateMongoUserDefinition(
|
||||
mongoUserDefinitionId,
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
createUpdateMongoUserDefinitionParameters,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @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.
|
||||
*/
|
||||
async beginDeleteMongoUserDefinition(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
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,
|
||||
{ mongoUserDefinitionId, resourceGroupName, accountName, options },
|
||||
deleteMongoUserDefinitionOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @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.
|
||||
*/
|
||||
async beginDeleteMongoUserDefinitionAndWait(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDeleteMongoUserDefinition(
|
||||
mongoUserDefinitionId,
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the list of all Azure Cosmos DB Mongo User Definition.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _listMongoUserDefinitions(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams
|
||||
): Promise<MongoDBResourcesListMongoUserDefinitionsResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, accountName, options },
|
||||
listMongoUserDefinitionsOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves continuous backup information for a Mongodb collection.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
|
@ -1822,6 +2412,212 @@ const migrateMongoDBCollectionToManualThroughputOperationSpec: coreClient.Operat
|
|||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getMongoRoleDefinitionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MongoRoleDefinitionGetResults
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.mongoRoleDefinitionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createUpdateMongoRoleDefinitionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MongoRoleDefinitionGetResults
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.MongoRoleDefinitionGetResults
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.MongoRoleDefinitionGetResults
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.MongoRoleDefinitionGetResults
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.createUpdateMongoRoleDefinitionParameters,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.mongoRoleDefinitionId
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteMongoRoleDefinitionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions/{mongoRoleDefinitionId}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.mongoRoleDefinitionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listMongoRoleDefinitionsOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbRoleDefinitions",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MongoRoleDefinitionListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const getMongoUserDefinitionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MongoUserDefinitionGetResults
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.mongoUserDefinitionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createUpdateMongoUserDefinitionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MongoUserDefinitionGetResults
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.MongoUserDefinitionGetResults
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.MongoUserDefinitionGetResults
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.MongoUserDefinitionGetResults
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.createUpdateMongoUserDefinitionParameters,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.mongoUserDefinitionId
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const deleteMongoUserDefinitionOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions/{mongoUserDefinitionId}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.mongoUserDefinitionId
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const listMongoUserDefinitionsOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbUserDefinitions",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.MongoUserDefinitionListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const retrieveContinuousBackupInformationOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation",
|
||||
|
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<RestorableGremlinDatabaseGetResult> {
|
||||
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<RestorableGremlinDatabaseGetResult[]> {
|
||||
let result = await this._list(location, instanceId, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
location: string,
|
||||
instanceId: string,
|
||||
options?: RestorableGremlinDatabasesListOptionalParams
|
||||
): AsyncIterableIterator<RestorableGremlinDatabaseGetResult> {
|
||||
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<RestorableGremlinDatabasesListResponse> {
|
||||
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
|
||||
};
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<RestorableGremlinGraphGetResult> {
|
||||
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<RestorableGremlinGraphGetResult[]> {
|
||||
let result = await this._list(location, instanceId, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
location: string,
|
||||
instanceId: string,
|
||||
options?: RestorableGremlinGraphsListOptionalParams
|
||||
): AsyncIterableIterator<RestorableGremlinGraphGetResult> {
|
||||
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<RestorableGremlinGraphsListResponse> {
|
||||
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
|
||||
};
|
|
@ -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 {
|
||||
GremlinDatabaseRestoreResource,
|
||||
RestorableGremlinResourcesListOptionalParams,
|
||||
RestorableGremlinResourcesListResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<GremlinDatabaseRestoreResource> {
|
||||
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<GremlinDatabaseRestoreResource[]> {
|
||||
let result = await this._list(location, instanceId, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
location: string,
|
||||
instanceId: string,
|
||||
options?: RestorableGremlinResourcesListOptionalParams
|
||||
): AsyncIterableIterator<GremlinDatabaseRestoreResource> {
|
||||
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<RestorableGremlinResourcesListResponse> {
|
||||
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
|
||||
};
|
|
@ -118,6 +118,8 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|||
},
|
||||
queryParameters: [
|
||||
Parameters.apiVersion,
|
||||
Parameters.startTime,
|
||||
Parameters.endTime,
|
||||
Parameters.restorableMongodbDatabaseRid
|
||||
],
|
||||
urlParameters: [
|
||||
|
|
|
@ -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 { 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 {
|
||||
RestorableTableResourcesListOptionalParams,
|
||||
RestorableTableResourcesListResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<string> {
|
||||
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<string[]> {
|
||||
let result = await this._list(location, instanceId, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
location: string,
|
||||
instanceId: string,
|
||||
options?: RestorableTableResourcesListOptionalParams
|
||||
): AsyncIterableIterator<string> {
|
||||
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<RestorableTableResourcesListResponse> {
|
||||
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
|
||||
};
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<RestorableTableGetResult> {
|
||||
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<RestorableTableGetResult[]> {
|
||||
let result = await this._list(location, instanceId, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
location: string,
|
||||
instanceId: string,
|
||||
options?: RestorableTablesListOptionalParams
|
||||
): AsyncIterableIterator<RestorableTableGetResult> {
|
||||
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<RestorableTablesListResponse> {
|
||||
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
|
||||
};
|
|
@ -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 { Service } 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 {
|
||||
ServiceResource,
|
||||
ServiceListOptionalParams,
|
||||
ServiceListResponse,
|
||||
ServiceResourceCreateUpdateParameters,
|
||||
ServiceCreateOptionalParams,
|
||||
ServiceCreateResponse,
|
||||
ServiceGetOptionalParams,
|
||||
ServiceGetResponse,
|
||||
ServiceDeleteOptionalParams
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Class containing Service operations. */
|
||||
export class ServiceImpl implements Service {
|
||||
private readonly client: CosmosDBManagementClient;
|
||||
|
||||
/**
|
||||
* Initialize a new instance of the class Service class.
|
||||
* @param client Reference to the service client
|
||||
*/
|
||||
constructor(client: CosmosDBManagementClient) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status of service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
public list(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: ServiceListOptionalParams
|
||||
): PagedAsyncIterableIterator<ServiceResource> {
|
||||
const iter = this.listPagingAll(resourceGroupName, accountName, options);
|
||||
return {
|
||||
next() {
|
||||
return iter.next();
|
||||
},
|
||||
[Symbol.asyncIterator]() {
|
||||
return this;
|
||||
},
|
||||
byPage: () => {
|
||||
return this.listPagingPage(resourceGroupName, accountName, options);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private async *listPagingPage(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: ServiceListOptionalParams
|
||||
): AsyncIterableIterator<ServiceResource[]> {
|
||||
let result = await this._list(resourceGroupName, accountName, options);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listPagingAll(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: ServiceListOptionalParams
|
||||
): AsyncIterableIterator<ServiceResource> {
|
||||
for await (const page of this.listPagingPage(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
options
|
||||
)) {
|
||||
yield* page;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status of service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
private _list(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: ServiceListOptionalParams
|
||||
): Promise<ServiceListResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, accountName, options },
|
||||
listOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param createUpdateParameters The Service resource parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreate(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
createUpdateParameters: ServiceResourceCreateUpdateParameters,
|
||||
options?: ServiceCreateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<PollOperationState<ServiceCreateResponse>, ServiceCreateResponse>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<ServiceCreateResponse> => {
|
||||
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,
|
||||
serviceName,
|
||||
createUpdateParameters,
|
||||
options
|
||||
},
|
||||
createOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param createUpdateParameters The Service resource parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginCreateAndWait(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
createUpdateParameters: ServiceResourceCreateUpdateParameters,
|
||||
options?: ServiceCreateOptionalParams
|
||||
): Promise<ServiceCreateResponse> {
|
||||
const poller = await this.beginCreate(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
serviceName,
|
||||
createUpdateParameters,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status of service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
options?: ServiceGetOptionalParams
|
||||
): Promise<ServiceGetResponse> {
|
||||
return this.client.sendOperationRequest(
|
||||
{ resourceGroupName, accountName, serviceName, options },
|
||||
getOperationSpec
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes service with the given serviceName.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDelete(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
options?: ServiceDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<void> => {
|
||||
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, serviceName, options },
|
||||
deleteOperationSpec
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes service with the given serviceName.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
async beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
options?: ServiceDeleteOptionalParams
|
||||
): Promise<void> {
|
||||
const poller = await this.beginDelete(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
serviceName,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
||||
const listOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ServiceResourceListResult
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const createOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}",
|
||||
httpMethod: "PUT",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ServiceResource
|
||||
},
|
||||
201: {
|
||||
bodyMapper: Mappers.ServiceResource
|
||||
},
|
||||
202: {
|
||||
bodyMapper: Mappers.ServiceResource
|
||||
},
|
||||
204: {
|
||||
bodyMapper: Mappers.ServiceResource
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
requestBody: Parameters.createUpdateParameters1,
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.serviceName
|
||||
],
|
||||
headerParameters: [Parameters.accept, Parameters.contentType],
|
||||
mediaType: "json",
|
||||
serializer
|
||||
};
|
||||
const getOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}",
|
||||
httpMethod: "GET",
|
||||
responses: {
|
||||
200: {
|
||||
bodyMapper: Mappers.ServiceResource
|
||||
},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.serviceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
||||
const deleteOperationSpec: coreClient.OperationSpec = {
|
||||
path:
|
||||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/services/{serviceName}",
|
||||
httpMethod: "DELETE",
|
||||
responses: {
|
||||
200: {},
|
||||
201: {},
|
||||
202: {},
|
||||
204: {},
|
||||
default: {
|
||||
bodyMapper: Mappers.CloudError
|
||||
}
|
||||
},
|
||||
queryParameters: [Parameters.apiVersion],
|
||||
urlParameters: [
|
||||
Parameters.$host,
|
||||
Parameters.subscriptionId,
|
||||
Parameters.resourceGroupName,
|
||||
Parameters.accountName,
|
||||
Parameters.serviceName
|
||||
],
|
||||
headerParameters: [Parameters.accept],
|
||||
serializer
|
||||
};
|
|
@ -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,
|
||||
|
@ -173,6 +181,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<ClientEncryptionKeyGetResults> {
|
||||
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<ClientEncryptionKeyGetResults[]> {
|
||||
let result = await this._listClientEncryptionKeys(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
databaseName,
|
||||
options
|
||||
);
|
||||
yield result.value || [];
|
||||
}
|
||||
|
||||
private async *listClientEncryptionKeysPagingAll(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
databaseName: string,
|
||||
options?: SqlResourcesListClientEncryptionKeysOptionalParams
|
||||
): AsyncIterableIterator<ClientEncryptionKeyGetResults> {
|
||||
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.
|
||||
|
@ -1116,6 +1192,163 @@ 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<SqlResourcesListClientEncryptionKeysResponse> {
|
||||
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<SqlResourcesGetClientEncryptionKeyResponse> {
|
||||
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>,
|
||||
SqlResourcesCreateUpdateClientEncryptionKeyResponse
|
||||
>
|
||||
> {
|
||||
const directSendOperation = async (
|
||||
args: coreClient.OperationArguments,
|
||||
spec: coreClient.OperationSpec
|
||||
): Promise<SqlResourcesCreateUpdateClientEncryptionKeyResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<SqlResourcesCreateUpdateClientEncryptionKeyResponse> {
|
||||
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.
|
||||
|
@ -3240,6 +3473,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",
|
||||
|
|
|
@ -32,7 +32,10 @@ import {
|
|||
TableResourcesMigrateTableToAutoscaleOptionalParams,
|
||||
TableResourcesMigrateTableToAutoscaleResponse,
|
||||
TableResourcesMigrateTableToManualThroughputOptionalParams,
|
||||
TableResourcesMigrateTableToManualThroughputResponse
|
||||
TableResourcesMigrateTableToManualThroughputResponse,
|
||||
ContinuousBackupRestoreLocation,
|
||||
TableResourcesRetrieveContinuousBackupInformationOptionalParams,
|
||||
TableResourcesRetrieveContinuousBackupInformationResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -632,6 +635,104 @@ 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<TableResourcesRetrieveContinuousBackupInformationResponse> => {
|
||||
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
|
||||
);
|
||||
return new LroEngine(lro, {
|
||||
resumeFrom: options?.resumeFrom,
|
||||
intervalInMs: options?.updateIntervalInMs,
|
||||
lroResourceLocationConfig: "location"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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<TableResourcesRetrieveContinuousBackupInformationResponse> {
|
||||
const poller = await this.beginRetrieveContinuousBackupInformation(
|
||||
resourceGroupName,
|
||||
accountName,
|
||||
tableName,
|
||||
location,
|
||||
options
|
||||
);
|
||||
return poller.pollUntilDone();
|
||||
}
|
||||
}
|
||||
// Operation Specifications
|
||||
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
||||
|
@ -836,3 +937,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
|
||||
};
|
||||
|
|
|
@ -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<ClusterResource>;
|
||||
/**
|
||||
* 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<BackupResource>;
|
||||
/**
|
||||
* 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<CassandraClustersInvokeCommandResponse>;
|
||||
/**
|
||||
* 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<CassandraClustersGetBackupResponse>;
|
||||
/**
|
||||
* 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
|
||||
|
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -71,6 +87,19 @@ export interface CassandraResources {
|
|||
keyspaceName: string,
|
||||
options?: CassandraResourcesListCassandraTablesOptionalParams
|
||||
): PagedAsyncIterableIterator<CassandraTableGetResults>;
|
||||
/**
|
||||
* 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<CassandraViewGetResults>;
|
||||
/**
|
||||
* 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<CassandraResourcesMigrateCassandraTableToManualThroughputResponse>;
|
||||
/**
|
||||
* 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<CassandraResourcesGetCassandraViewResponse>;
|
||||
/**
|
||||
* 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>,
|
||||
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<CassandraResourcesCreateUpdateCassandraViewResponse>;
|
||||
/**
|
||||
* 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<PollerLike<PollOperationState<void>, 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<void>;
|
||||
/**
|
||||
* 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<CassandraResourcesGetCassandraViewThroughputResponse>;
|
||||
/**
|
||||
* 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<CassandraResourcesUpdateCassandraViewThroughputResponse>;
|
||||
/**
|
||||
* 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<CassandraResourcesMigrateCassandraViewToAutoscaleResponse>;
|
||||
/**
|
||||
* 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<CassandraResourcesMigrateCassandraViewToManualThroughputResponse>;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* 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
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<DataTransferJobGetResults>;
|
||||
/**
|
||||
* 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<DataTransferJobsCreateResponse>;
|
||||
/**
|
||||
* 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<DataTransferJobsGetResponse>;
|
||||
}
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<GraphResourceGetResults>;
|
||||
/**
|
||||
* 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<GraphResourcesGetGraphResponse>;
|
||||
/**
|
||||
* 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>,
|
||||
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<GraphResourcesCreateUpdateGraphResponse>;
|
||||
/**
|
||||
* 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<PollerLike<PollOperationState<void>, 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<void>;
|
||||
}
|
|
@ -41,7 +41,10 @@ import {
|
|||
GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams,
|
||||
GremlinResourcesMigrateGremlinGraphToAutoscaleResponse,
|
||||
GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams,
|
||||
GremlinResourcesMigrateGremlinGraphToManualThroughputResponse
|
||||
GremlinResourcesMigrateGremlinGraphToManualThroughputResponse,
|
||||
ContinuousBackupRestoreLocation,
|
||||
GremlinResourcesRetrieveContinuousBackupInformationOptionalParams,
|
||||
GremlinResourcesRetrieveContinuousBackupInformationResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -482,4 +485,45 @@ export interface GremlinResources {
|
|||
graphName: string,
|
||||
options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams
|
||||
): Promise<GremlinResourcesMigrateGremlinGraphToManualThroughputResponse>;
|
||||
/**
|
||||
* 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<GremlinResourcesRetrieveContinuousBackupInformationResponse>;
|
||||
}
|
||||
|
|
|
@ -19,12 +19,16 @@ 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";
|
||||
export * from "./privateEndpointConnections";
|
||||
export * from "./privateLinkResources";
|
||||
|
@ -35,5 +39,9 @@ export * from "./restorableSqlResources";
|
|||
export * from "./restorableMongodbDatabases";
|
||||
export * from "./restorableMongodbCollections";
|
||||
export * from "./restorableMongodbResources";
|
||||
export * from "./cassandraClusters";
|
||||
export * from "./cassandraDataCenters";
|
||||
export * from "./restorableGremlinDatabases";
|
||||
export * from "./restorableGremlinGraphs";
|
||||
export * from "./restorableGremlinResources";
|
||||
export * from "./restorableTables";
|
||||
export * from "./restorableTableResources";
|
||||
export * from "./service";
|
||||
|
|
|
@ -13,6 +13,10 @@ import {
|
|||
MongoDBResourcesListMongoDBDatabasesOptionalParams,
|
||||
MongoDBCollectionGetResults,
|
||||
MongoDBResourcesListMongoDBCollectionsOptionalParams,
|
||||
MongoRoleDefinitionGetResults,
|
||||
MongoDBResourcesListMongoRoleDefinitionsOptionalParams,
|
||||
MongoUserDefinitionGetResults,
|
||||
MongoDBResourcesListMongoUserDefinitionsOptionalParams,
|
||||
MongoDBResourcesGetMongoDBDatabaseOptionalParams,
|
||||
MongoDBResourcesGetMongoDBDatabaseResponse,
|
||||
MongoDBDatabaseCreateUpdateParameters,
|
||||
|
@ -42,6 +46,18 @@ import {
|
|||
MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse,
|
||||
MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams,
|
||||
MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse,
|
||||
MongoDBResourcesGetMongoRoleDefinitionOptionalParams,
|
||||
MongoDBResourcesGetMongoRoleDefinitionResponse,
|
||||
MongoRoleDefinitionCreateUpdateParameters,
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams,
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse,
|
||||
MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams,
|
||||
MongoDBResourcesGetMongoUserDefinitionOptionalParams,
|
||||
MongoDBResourcesGetMongoUserDefinitionResponse,
|
||||
MongoUserDefinitionCreateUpdateParameters,
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams,
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionResponse,
|
||||
MongoDBResourcesDeleteMongoUserDefinitionOptionalParams,
|
||||
ContinuousBackupRestoreLocation,
|
||||
MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams,
|
||||
MongoDBResourcesRetrieveContinuousBackupInformationResponse
|
||||
|
@ -74,6 +90,28 @@ export interface MongoDBResources {
|
|||
databaseName: string,
|
||||
options?: MongoDBResourcesListMongoDBCollectionsOptionalParams
|
||||
): PagedAsyncIterableIterator<MongoDBCollectionGetResults>;
|
||||
/**
|
||||
* Retrieves the list of all Azure Cosmos DB Mongo Role Definitions.
|
||||
* @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.
|
||||
*/
|
||||
listMongoRoleDefinitions(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams
|
||||
): PagedAsyncIterableIterator<MongoRoleDefinitionGetResults>;
|
||||
/**
|
||||
* Retrieves the list of all Azure Cosmos DB Mongo User Definition.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
listMongoUserDefinitions(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams
|
||||
): PagedAsyncIterableIterator<MongoUserDefinitionGetResults>;
|
||||
/**
|
||||
* Gets the MongoDB databases under an existing Azure Cosmos DB database account with the provided
|
||||
* name.
|
||||
|
@ -491,6 +529,162 @@ export interface MongoDBResources {
|
|||
): Promise<
|
||||
MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse
|
||||
>;
|
||||
/**
|
||||
* Retrieves the properties of an existing Azure Cosmos DB Mongo Role Definition with the given Id.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @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.
|
||||
*/
|
||||
getMongoRoleDefinition(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesGetMongoRoleDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesGetMongoRoleDefinitionResponse>;
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoRoleDefinitionParameters The properties required to create or update a Role
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateUpdateMongoRoleDefinition(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse
|
||||
>,
|
||||
MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoRoleDefinitionParameters The properties required to create or update a Role
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateUpdateMongoRoleDefinitionAndWait(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse>;
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @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.
|
||||
*/
|
||||
beginDeleteMongoRoleDefinition(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo Role Definition.
|
||||
* @param mongoRoleDefinitionId The ID for the Role Definition {dbName.roleName}.
|
||||
* @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.
|
||||
*/
|
||||
beginDeleteMongoRoleDefinitionAndWait(
|
||||
mongoRoleDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Retrieves the properties of an existing Azure Cosmos DB Mongo User Definition with the given Id.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @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.
|
||||
*/
|
||||
getMongoUserDefinition(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesGetMongoUserDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesGetMongoUserDefinitionResponse>;
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoUserDefinitionParameters The properties required to create or update a User
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateUpdateMongoUserDefinition(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoUserDefinitionParameters: MongoUserDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams
|
||||
): Promise<
|
||||
PollerLike<
|
||||
PollOperationState<
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionResponse
|
||||
>,
|
||||
MongoDBResourcesCreateUpdateMongoUserDefinitionResponse
|
||||
>
|
||||
>;
|
||||
/**
|
||||
* Creates or updates an Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param createUpdateMongoUserDefinitionParameters The properties required to create or update a User
|
||||
* Definition.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateUpdateMongoUserDefinitionAndWait(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
createUpdateMongoUserDefinitionParameters: MongoUserDefinitionCreateUpdateParameters,
|
||||
options?: MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams
|
||||
): Promise<MongoDBResourcesCreateUpdateMongoUserDefinitionResponse>;
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @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.
|
||||
*/
|
||||
beginDeleteMongoUserDefinition(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
/**
|
||||
* Deletes an existing Azure Cosmos DB Mongo User Definition.
|
||||
* @param mongoUserDefinitionId The ID for the User Definition {dbName.userName}.
|
||||
* @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.
|
||||
*/
|
||||
beginDeleteMongoUserDefinitionAndWait(
|
||||
mongoUserDefinitionId: string,
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams
|
||||
): Promise<void>;
|
||||
/**
|
||||
* Retrieves continuous backup information for a Mongodb collection.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
|
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<RestorableGremlinDatabaseGetResult>;
|
||||
}
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<RestorableGremlinGraphGetResult>;
|
||||
}
|
|
@ -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 {
|
||||
GremlinDatabaseRestoreResource,
|
||||
RestorableGremlinResourcesListOptionalParams
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<GremlinDatabaseRestoreResource>;
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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 { RestorableTableResourcesListOptionalParams } from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<string>;
|
||||
}
|
|
@ -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";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** 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<RestorableTableGetResult>;
|
||||
}
|
|
@ -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 { PollerLike, PollOperationState } from "@azure/core-lro";
|
||||
import {
|
||||
ServiceResource,
|
||||
ServiceListOptionalParams,
|
||||
ServiceResourceCreateUpdateParameters,
|
||||
ServiceCreateOptionalParams,
|
||||
ServiceCreateResponse,
|
||||
ServiceGetOptionalParams,
|
||||
ServiceGetResponse,
|
||||
ServiceDeleteOptionalParams
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
/** Interface representing a Service. */
|
||||
export interface Service {
|
||||
/**
|
||||
* Gets the status of service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
list(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
options?: ServiceListOptionalParams
|
||||
): PagedAsyncIterableIterator<ServiceResource>;
|
||||
/**
|
||||
* Creates a service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param createUpdateParameters The Service resource parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreate(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
createUpdateParameters: ServiceResourceCreateUpdateParameters,
|
||||
options?: ServiceCreateOptionalParams
|
||||
): Promise<
|
||||
PollerLike<PollOperationState<ServiceCreateResponse>, ServiceCreateResponse>
|
||||
>;
|
||||
/**
|
||||
* Creates a service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param createUpdateParameters The Service resource parameters.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginCreateAndWait(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
createUpdateParameters: ServiceResourceCreateUpdateParameters,
|
||||
options?: ServiceCreateOptionalParams
|
||||
): Promise<ServiceCreateResponse>;
|
||||
/**
|
||||
* Gets the status of service.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
get(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
options?: ServiceGetOptionalParams
|
||||
): Promise<ServiceGetResponse>;
|
||||
/**
|
||||
* Deletes service with the given serviceName.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDelete(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
options?: ServiceDeleteOptionalParams
|
||||
): Promise<PollerLike<PollOperationState<void>, void>>;
|
||||
/**
|
||||
* Deletes service with the given serviceName.
|
||||
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
||||
* @param accountName Cosmos DB database account name.
|
||||
* @param serviceName Cosmos DB service name.
|
||||
* @param options The options parameters.
|
||||
*/
|
||||
beginDeleteAndWait(
|
||||
resourceGroupName: string,
|
||||
accountName: string,
|
||||
serviceName: string,
|
||||
options?: ServiceDeleteOptionalParams
|
||||
): Promise<void>;
|
||||
}
|
|
@ -11,6 +11,8 @@ import { PollerLike, PollOperationState } from "@azure/core-lro";
|
|||
import {
|
||||
SqlDatabaseGetResults,
|
||||
SqlResourcesListSqlDatabasesOptionalParams,
|
||||
ClientEncryptionKeyGetResults,
|
||||
SqlResourcesListClientEncryptionKeysOptionalParams,
|
||||
SqlContainerGetResults,
|
||||
SqlResourcesListSqlContainersOptionalParams,
|
||||
SqlStoredProcedureGetResults,
|
||||
|
@ -38,6 +40,11 @@ import {
|
|||
SqlResourcesMigrateSqlDatabaseToAutoscaleResponse,
|
||||
SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams,
|
||||
SqlResourcesMigrateSqlDatabaseToManualThroughputResponse,
|
||||
SqlResourcesGetClientEncryptionKeyOptionalParams,
|
||||
SqlResourcesGetClientEncryptionKeyResponse,
|
||||
ClientEncryptionKeyCreateUpdateParameters,
|
||||
SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams,
|
||||
SqlResourcesCreateUpdateClientEncryptionKeyResponse,
|
||||
SqlResourcesGetSqlContainerOptionalParams,
|
||||
SqlResourcesGetSqlContainerResponse,
|
||||
SqlContainerCreateUpdateParameters,
|
||||
|
@ -101,6 +108,19 @@ export interface SqlResources {
|
|||
accountName: string,
|
||||
options?: SqlResourcesListSqlDatabasesOptionalParams
|
||||
): PagedAsyncIterableIterator<SqlDatabaseGetResults>;
|
||||
/**
|
||||
* 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<ClientEncryptionKeyGetResults>;
|
||||
/**
|
||||
* 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 +390,64 @@ export interface SqlResources {
|
|||
databaseName: string,
|
||||
options?: SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams
|
||||
): Promise<SqlResourcesMigrateSqlDatabaseToManualThroughputResponse>;
|
||||
/**
|
||||
* 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<SqlResourcesGetClientEncryptionKeyResponse>;
|
||||
/**
|
||||
* 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>,
|
||||
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<SqlResourcesCreateUpdateClientEncryptionKeyResponse>;
|
||||
/**
|
||||
* 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.
|
||||
|
|
|
@ -25,7 +25,10 @@ import {
|
|||
TableResourcesMigrateTableToAutoscaleOptionalParams,
|
||||
TableResourcesMigrateTableToAutoscaleResponse,
|
||||
TableResourcesMigrateTableToManualThroughputOptionalParams,
|
||||
TableResourcesMigrateTableToManualThroughputResponse
|
||||
TableResourcesMigrateTableToManualThroughputResponse,
|
||||
ContinuousBackupRestoreLocation,
|
||||
TableResourcesRetrieveContinuousBackupInformationOptionalParams,
|
||||
TableResourcesRetrieveContinuousBackupInformationResponse
|
||||
} from "../models";
|
||||
|
||||
/// <reference lib="esnext.asynciterable" />
|
||||
|
@ -229,4 +232,41 @@ export interface TableResources {
|
|||
tableName: string,
|
||||
options?: TableResourcesMigrateTableToManualThroughputOptionalParams
|
||||
): Promise<TableResourcesMigrateTableToManualThroughputResponse>;
|
||||
/**
|
||||
* 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<TableResourcesRetrieveContinuousBackupInformationResponse>;
|
||||
}
|
||||
|
|
|
@ -9,11 +9,19 @@
|
|||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es6", "dom"],
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"declaration": true,
|
||||
"outDir": "./dist-esm",
|
||||
"importHelpers": true
|
||||
},
|
||||
"include": ["./src/**/*.ts", "./test/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
"include": [
|
||||
"./src/**/*.ts",
|
||||
"./test/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
Загрузка…
Ссылка в новой задаче