diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ad57955881f6..10d96b0c0283 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -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: diff --git a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md index 1ff1888f5837..ead661a645bf 100644 --- a/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md +++ b/sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md @@ -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. diff --git a/sdk/cosmosdb/arm-cosmosdb/LICENSE b/sdk/cosmosdb/arm-cosmosdb/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/cosmosdb/arm-cosmosdb/LICENSE +++ b/sdk/cosmosdb/arm-cosmosdb/LICENSE @@ -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 diff --git a/sdk/cosmosdb/arm-cosmosdb/README.md b/sdk/cosmosdb/arm-cosmosdb/README.md index 30be6dccaef0..e0995ed3c9b6 100644 --- a/sdk/cosmosdb/arm-cosmosdb/README.md +++ b/sdk/cosmosdb/arm-cosmosdb/README.md @@ -6,7 +6,7 @@ Azure Cosmos DB Database Service Resource Provider REST API [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-cosmosdb) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started @@ -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: "", +// clientId: "" +// }); +// const client = new CosmosDBManagementClient(credential, subscriptionId); ``` diff --git a/sdk/cosmosdb/arm-cosmosdb/_meta.json b/sdk/cosmosdb/arm-cosmosdb/_meta.json index 40d84700726b..a8daca9976c0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/_meta.json +++ b/sdk/cosmosdb/arm-cosmosdb/_meta.json @@ -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" } \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/api-extractor.json b/sdk/cosmosdb/arm-cosmosdb/api-extractor.json index bdc5ad02249a..0020e5644c49 100644 --- a/sdk/cosmosdb/arm-cosmosdb/api-extractor.json +++ b/sdk/cosmosdb/arm-cosmosdb/api-extractor.json @@ -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" + } } } -} +} \ No newline at end of file diff --git a/sdk/cosmosdb/arm-cosmosdb/package.json b/sdk/cosmosdb/arm-cosmosdb/package.json index 94182bba45fc..2877f910d527 100644 --- a/sdk/cosmosdb/arm-cosmosdb/package.json +++ b/sdk/cosmosdb/arm-cosmosdb/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for CosmosDBManagementClient.", - "version": "15.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 } diff --git a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md index dc859c4e5d52..0857e2bb1d5e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md +++ b/sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb.api.md @@ -36,6 +36,7 @@ export interface ARMProxyResource { // @public export interface ARMResourceProperties { readonly id?: string; + identity?: ManagedServiceIdentity; location?: string; readonly name?: string; tags?: { @@ -47,6 +48,18 @@ export interface ARMResourceProperties { // @public export type AuthenticationMethod = string; +// @public +export interface AuthenticationMethodLdapProperties { + searchBaseDistinguishedName?: string; + searchFilterTemplate?: string; + // (undocumented) + serverCertificates?: Certificate[]; + serverHostname?: string; + serverPort?: number; + serviceUserDistinguishedName?: string; + serviceUserPassword?: string; +} + // @public (undocumented) export interface AutoscaleSettings { maxThroughput?: number; @@ -64,6 +77,13 @@ export interface AutoUpgradePolicyResource { throughputPolicy?: ThroughputPolicyResource; } +// @public +export type AzureBlobDataTransferDataSourceSink = DataTransferDataSourceSink & { + component: "AzureBlobStorage"; + containerName: string; + endpointUrl?: string; +}; + // @public export interface BackupInformation { readonly continuousBackupInformation?: ContinuousBackupInformation; @@ -91,6 +111,16 @@ export type BackupPolicyType = string; // @public (undocumented) export type BackupPolicyUnion = BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; +// @public +export type BackupResource = ARMProxyResource & { + properties?: BackupResourceProperties; +}; + +// @public (undocumented) +export interface BackupResourceProperties { + timestamp?: Date; +} + // @public export type BackupStorageRedundancy = string; @@ -137,6 +167,8 @@ export interface CassandraClusters { beginUpdate(resourceGroupName: string, clusterName: string, body: ClusterResource, options?: CassandraClustersUpdateOptionalParams): Promise, CassandraClustersUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, clusterName: string, body: ClusterResource, options?: CassandraClustersUpdateOptionalParams): Promise; get(resourceGroupName: string, clusterName: string, options?: CassandraClustersGetOptionalParams): Promise; + getBackup(resourceGroupName: string, clusterName: string, backupId: string, options?: CassandraClustersGetBackupOptionalParams): Promise; + listBackups(resourceGroupName: string, clusterName: string, options?: CassandraClustersListBackupsOptionalParams): PagedAsyncIterableIterator; listByResourceGroup(resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; listBySubscription(options?: CassandraClustersListBySubscriptionOptionalParams): PagedAsyncIterableIterator; status(resourceGroupName: string, clusterName: string, options?: CassandraClustersStatusOptionalParams): Promise; @@ -163,6 +195,13 @@ export interface CassandraClustersDeleteOptionalParams extends coreClient.Operat updateIntervalInMs?: number; } +// @public +export interface CassandraClustersGetBackupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersGetBackupResponse = BackupResource; + // @public export interface CassandraClustersGetOptionalParams extends coreClient.OperationOptions { } @@ -179,6 +218,13 @@ export interface CassandraClustersInvokeCommandOptionalParams extends coreClient // @public export type CassandraClustersInvokeCommandResponse = CommandOutput; +// @public +export interface CassandraClustersListBackupsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraClustersListBackupsResponse = ListBackups; + // @public export interface CassandraClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { } @@ -304,10 +350,14 @@ export interface CassandraResources { beginCreateUpdateCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, createUpdateCassandraKeyspaceParameters: CassandraKeyspaceCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraKeyspaceOptionalParams): Promise; beginCreateUpdateCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: CassandraTableCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraTableOptionalParams): Promise, CassandraResourcesCreateUpdateCassandraTableResponse>>; beginCreateUpdateCassandraTableAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, createUpdateCassandraTableParameters: CassandraTableCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraTableOptionalParams): Promise; + beginCreateUpdateCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams): Promise, CassandraResourcesCreateUpdateCassandraViewResponse>>; + beginCreateUpdateCassandraViewAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams): Promise; beginDeleteCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise, void>>; beginDeleteCassandraKeyspaceAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesDeleteCassandraKeyspaceOptionalParams): Promise; beginDeleteCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise, void>>; beginDeleteCassandraTableAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesDeleteCassandraTableOptionalParams): Promise; + beginDeleteCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesDeleteCassandraViewOptionalParams): Promise, void>>; + beginDeleteCassandraViewAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesDeleteCassandraViewOptionalParams): Promise; beginMigrateCassandraKeyspaceToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams): Promise, CassandraResourcesMigrateCassandraKeyspaceToAutoscaleResponse>>; beginMigrateCassandraKeyspaceToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams): Promise; beginMigrateCassandraKeyspaceToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesMigrateCassandraKeyspaceToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraKeyspaceToManualThroughputResponse>>; @@ -316,16 +366,25 @@ export interface CassandraResources { beginMigrateCassandraTableToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams): Promise; beginMigrateCassandraTableToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraTableToManualThroughputResponse>>; beginMigrateCassandraTableToManualThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams): Promise; + beginMigrateCassandraViewToAutoscale(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams): Promise, CassandraResourcesMigrateCassandraViewToAutoscaleResponse>>; + beginMigrateCassandraViewToAutoscaleAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams): Promise; + beginMigrateCassandraViewToManualThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams): Promise, CassandraResourcesMigrateCassandraViewToManualThroughputResponse>>; + beginMigrateCassandraViewToManualThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams): Promise; beginUpdateCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraKeyspaceThroughputResponse>>; beginUpdateCassandraKeyspaceThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams): Promise; beginUpdateCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraTableThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraTableThroughputResponse>>; beginUpdateCassandraTableThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraTableThroughputOptionalParams): Promise; + beginUpdateCassandraViewThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams): Promise, CassandraResourcesUpdateCassandraViewThroughputResponse>>; + beginUpdateCassandraViewThroughputAndWait(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams): Promise; getCassandraKeyspace(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesGetCassandraKeyspaceOptionalParams): Promise; getCassandraKeyspaceThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesGetCassandraKeyspaceThroughputOptionalParams): Promise; getCassandraTable(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesGetCassandraTableOptionalParams): Promise; getCassandraTableThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, tableName: string, options?: CassandraResourcesGetCassandraTableThroughputOptionalParams): Promise; + getCassandraView(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesGetCassandraViewOptionalParams): Promise; + getCassandraViewThroughput(resourceGroupName: string, accountName: string, keyspaceName: string, viewName: string, options?: CassandraResourcesGetCassandraViewThroughputOptionalParams): Promise; listCassandraKeyspaces(resourceGroupName: string, accountName: string, options?: CassandraResourcesListCassandraKeyspacesOptionalParams): PagedAsyncIterableIterator; listCassandraTables(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesListCassandraTablesOptionalParams): PagedAsyncIterableIterator; + listCassandraViews(resourceGroupName: string, accountName: string, keyspaceName: string, options?: CassandraResourcesListCassandraViewsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -346,6 +405,15 @@ export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams exte // @public export type CassandraResourcesCreateUpdateCassandraTableResponse = CassandraTableGetResults; +// @public +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesCreateUpdateCassandraViewResponse = CassandraViewGetResults; + // @public export interface CassandraResourcesDeleteCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -358,6 +426,12 @@ export interface CassandraResourcesDeleteCassandraTableOptionalParams extends co updateIntervalInMs?: number; } +// @public +export interface CassandraResourcesDeleteCassandraViewOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface CassandraResourcesGetCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { } @@ -386,6 +460,20 @@ export interface CassandraResourcesGetCassandraTableThroughputOptionalParams ext // @public export type CassandraResourcesGetCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesGetCassandraViewOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesGetCassandraViewResponse = CassandraViewGetResults; + +// @public +export interface CassandraResourcesGetCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesGetCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesListCassandraKeyspacesOptionalParams extends coreClient.OperationOptions { } @@ -400,6 +488,13 @@ export interface CassandraResourcesListCassandraTablesOptionalParams extends cor // @public export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult; +// @public +export interface CassandraResourcesListCassandraViewsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type CassandraResourcesListCassandraViewsResponse = CassandraViewListResult; + // @public export interface CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -436,6 +531,24 @@ export interface CassandraResourcesMigrateCassandraTableToManualThroughputOption // @public export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = ThroughputSettingsGetResults; + +// @public +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -454,6 +567,15 @@ export interface CassandraResourcesUpdateCassandraTableThroughputOptionalParams // @public export type CassandraResourcesUpdateCassandraTableThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type CassandraResourcesUpdateCassandraViewThroughputResponse = ThroughputSettingsGetResults; + // @public export interface CassandraSchema { clusterKeys?: ClusterKey[]; @@ -492,11 +614,66 @@ export interface CassandraTableResource { schema?: CassandraSchema; } +// @public +export type CassandraViewCreateUpdateParameters = ARMResourceProperties & { + resource: CassandraViewResource; + options?: CreateUpdateOptions; +}; + +// @public (undocumented) +export type CassandraViewGetPropertiesOptions = OptionsResource & {}; + +// @public (undocumented) +export type CassandraViewGetPropertiesResource = CassandraViewResource & ExtendedResourceProperties & {}; + +// @public +export type CassandraViewGetResults = ARMResourceProperties & { + resource?: CassandraViewGetPropertiesResource; + options?: CassandraViewGetPropertiesOptions; +}; + +// @public +export interface CassandraViewListResult { + readonly value?: CassandraViewGetResults[]; +} + +// @public +export interface CassandraViewResource { + id: string; + viewDefinition: string; +} + // @public (undocumented) export interface Certificate { pem?: string; } +// @public +export interface ClientEncryptionKeyCreateUpdateParameters { + resource: ClientEncryptionKeyResource; +} + +// @public (undocumented) +export type ClientEncryptionKeyGetPropertiesResource = ClientEncryptionKeyResource & ExtendedResourceProperties & {}; + +// @public +export type ClientEncryptionKeyGetResults = ARMProxyResource & { + resource?: ClientEncryptionKeyGetPropertiesResource; +}; + +// @public +export interface ClientEncryptionKeyResource { + encryptionAlgorithm?: string; + id?: string; + keyWrapMetadata?: KeyWrapMetadata; + wrappedDataEncryptionKey?: Uint8Array; +} + +// @public +export interface ClientEncryptionKeysListResult { + readonly value?: ClientEncryptionKeyGetResults[]; +} + // @public export interface CloudError { error?: ErrorResponse; @@ -731,6 +908,13 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +// @public +export type CosmosCassandraDataTransferDataSourceSink = DataTransferDataSourceSink & { + component: "CosmosDBCassandra"; + keyspaceName: string; + tableName: string; +}; + // @public (undocumented) export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) @@ -759,6 +943,10 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) databaseAccounts: DatabaseAccounts; // (undocumented) + dataTransferJobs: DataTransferJobs; + // (undocumented) + graphResources: GraphResources; + // (undocumented) gremlinResources: GremlinResources; // (undocumented) locations: Locations; @@ -785,6 +973,12 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) restorableDatabaseAccounts: RestorableDatabaseAccounts; // (undocumented) + restorableGremlinDatabases: RestorableGremlinDatabases; + // (undocumented) + restorableGremlinGraphs: RestorableGremlinGraphs; + // (undocumented) + restorableGremlinResources: RestorableGremlinResources; + // (undocumented) restorableMongodbCollections: RestorableMongodbCollections; // (undocumented) restorableMongodbDatabases: RestorableMongodbDatabases; @@ -797,6 +991,12 @@ export class CosmosDBManagementClient extends coreClient.ServiceClient { // (undocumented) restorableSqlResources: RestorableSqlResources; // (undocumented) + restorableTableResources: RestorableTableResources; + // (undocumented) + restorableTables: RestorableTables; + // (undocumented) + service: Service; + // (undocumented) sqlResources: SqlResources; // (undocumented) subscriptionId: string; @@ -811,9 +1011,21 @@ export interface CosmosDBManagementClientOptionalParams extends coreClient.Servi endpoint?: string; } +// @public +export type CosmosSqlDataTransferDataSourceSink = DataTransferDataSourceSink & { + component: "CosmosDBSql"; + databaseName: string; + containerName: string; +}; + // @public export type CreatedByType = string; +// @public +export type CreateJobRequest = ARMProxyResource & { + properties: DataTransferJobProperties; +}; + // @public export type CreateMode = string; @@ -839,7 +1051,6 @@ export interface DatabaseAccountConnectionString { // @public export type DatabaseAccountCreateUpdateParameters = ARMResourceProperties & { kind?: DatabaseAccountKind; - identity?: ManagedServiceIdentity; consistencyPolicy?: ConsistencyPolicy; locations: Location_2[]; databaseAccountOfferType: "Standard"; @@ -864,15 +1075,16 @@ export type DatabaseAccountCreateUpdateParameters = ARMResourceProperties & { cors?: CorsPolicy[]; networkAclBypass?: NetworkAclBypass; networkAclBypassResourceIds?: string[]; + diagnosticLogSettings?: DiagnosticLogSettings; disableLocalAuth?: boolean; restoreParameters?: RestoreParameters; capacity?: Capacity; + enableMaterializedViews?: boolean; }; // @public export type DatabaseAccountGetResults = ARMResourceProperties & { kind?: DatabaseAccountKind; - identity?: ManagedServiceIdentity; readonly systemData?: SystemData; readonly provisioningState?: string; readonly documentEndpoint?: string; @@ -906,8 +1118,10 @@ export type DatabaseAccountGetResults = ARMResourceProperties & { cors?: CorsPolicy[]; networkAclBypass?: NetworkAclBypass; networkAclBypassResourceIds?: string[]; + diagnosticLogSettings?: DiagnosticLogSettings; disableLocalAuth?: boolean; capacity?: Capacity; + enableMaterializedViews?: boolean; }; // @public @@ -1120,12 +1334,14 @@ export interface DatabaseAccountUpdateParameters { consistencyPolicy?: ConsistencyPolicy; cors?: CorsPolicy[]; defaultIdentity?: string; + diagnosticLogSettings?: DiagnosticLogSettings; disableKeyBasedMetadataWriteAccess?: boolean; disableLocalAuth?: boolean; enableAnalyticalStorage?: boolean; enableAutomaticFailover?: boolean; enableCassandraConnector?: boolean; enableFreeTier?: boolean; + enableMaterializedViews?: boolean; enableMultipleWriteLocations?: boolean; identity?: ManagedServiceIdentity; ipRules?: IpAddressOrRange[]; @@ -1177,6 +1393,7 @@ export type DataCenterResource = ARMProxyResource & { // @public export interface DataCenterResourceProperties { + authenticationMethodLdapProperties?: AuthenticationMethodLdapProperties; availabilityZone?: boolean; backupStorageCustomerKeyUri?: string; base64EncodedCassandraYamlFragment?: string; @@ -1191,12 +1408,110 @@ export interface DataCenterResourceProperties { sku?: string; } +// @public +export type DataTransferComponent = string; + +// @public +export interface DataTransferDataSourceSink { + component: "CosmosDBCassandra" | "CosmosDBSql" | "AzureBlobStorage"; +} + +// @public (undocumented) +export type DataTransferDataSourceSinkUnion = DataTransferDataSourceSink | CosmosCassandraDataTransferDataSourceSink | CosmosSqlDataTransferDataSourceSink | AzureBlobDataTransferDataSourceSink; + +// @public +export interface DataTransferJobFeedResults { + readonly nextLink?: string; + readonly value?: DataTransferJobGetResults[]; +} + +// @public +export type DataTransferJobGetResults = ARMProxyResource & { + readonly jobName?: string; + source?: DataTransferDataSourceSinkUnion; + destination?: DataTransferDataSourceSinkUnion; + readonly status?: string; + readonly percentageComplete?: number; + readonly lastUpdatedUtcTime?: Date; + workerCount?: number; + readonly error?: ErrorResponse; +}; + +// @public +export interface DataTransferJobProperties { + destination: DataTransferDataSourceSinkUnion; + readonly error?: ErrorResponse; + readonly jobName?: string; + readonly lastUpdatedUtcTime?: Date; + readonly percentageComplete?: number; + source: DataTransferDataSourceSinkUnion; + readonly status?: string; + workerCount?: number; +} + +// @public +export interface DataTransferJobs { + create(resourceGroupName: string, accountName: string, jobName: string, jobCreateParameters: CreateJobRequest, options?: DataTransferJobsCreateOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, jobName: string, options?: DataTransferJobsGetOptionalParams): Promise; + listByDatabaseAccount(resourceGroupName: string, accountName: string, options?: DataTransferJobsListByDatabaseAccountOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface DataTransferJobsCreateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsCreateResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsGetResponse = DataTransferJobGetResults; + +// @public +export interface DataTransferJobsListByDatabaseAccountNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsListByDatabaseAccountNextResponse = DataTransferJobFeedResults; + +// @public +export interface DataTransferJobsListByDatabaseAccountOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type DataTransferJobsListByDatabaseAccountResponse = DataTransferJobFeedResults; + +// @public +export type DataTransferRegionalServiceResource = RegionalServiceResource & {}; + +// @public +export interface DataTransferServiceResource { + properties?: DataTransferServiceResourceProperties; +} + +// @public +export type DataTransferServiceResourceProperties = ServiceResourceProperties & { + serviceType: "DataTransfer"; + readonly locations?: DataTransferRegionalServiceResource[]; +}; + // @public export type DataType = string; // @public export type DefaultConsistencyLevel = "Eventual" | "Session" | "BoundedStaleness" | "Strong" | "ConsistentPrefix"; +// @public +export interface DiagnosticLogSettings { + enableFullTextQuery?: EnableFullTextQuery; +} + +// @public +export type EnableFullTextQuery = "None" | "True" | "False"; + // @public export interface ErrorResponse { code?: string; @@ -1227,6 +1542,90 @@ export interface FailoverPolicy { locationName?: string; } +// @public +export type GraphAPIComputeRegionalServiceResource = RegionalServiceResource & { + readonly graphApiComputeEndpoint?: string; +}; + +// @public +export interface GraphAPIComputeServiceResource { + properties?: GraphAPIComputeServiceResourceProperties; +} + +// @public +export type GraphAPIComputeServiceResourceProperties = ServiceResourceProperties & { + serviceType: "GraphAPICompute"; + graphApiComputeEndpoint?: string; + readonly locations?: GraphAPIComputeRegionalServiceResource[]; +}; + +// @public +export interface GraphResource { + id: string; +} + +// @public +export type GraphResourceCreateUpdateParameters = ARMResourceProperties & { + resource: GraphResource; + options?: CreateUpdateOptions; +}; + +// @public (undocumented) +export type GraphResourceGetPropertiesOptions = OptionsResource & {}; + +// @public (undocumented) +export type GraphResourceGetPropertiesResource = GraphResource & {}; + +// @public +export type GraphResourceGetResults = ARMResourceProperties & { + resource?: GraphResourceGetPropertiesResource; + options?: GraphResourceGetPropertiesOptions; +}; + +// @public +export interface GraphResources { + beginCreateUpdateGraph(resourceGroupName: string, accountName: string, graphName: string, createUpdateGraphParameters: GraphResourceCreateUpdateParameters, options?: GraphResourcesCreateUpdateGraphOptionalParams): Promise, GraphResourcesCreateUpdateGraphResponse>>; + beginCreateUpdateGraphAndWait(resourceGroupName: string, accountName: string, graphName: string, createUpdateGraphParameters: GraphResourceCreateUpdateParameters, options?: GraphResourcesCreateUpdateGraphOptionalParams): Promise; + beginDeleteGraphResource(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesDeleteGraphResourceOptionalParams): Promise, void>>; + beginDeleteGraphResourceAndWait(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesDeleteGraphResourceOptionalParams): Promise; + getGraph(resourceGroupName: string, accountName: string, graphName: string, options?: GraphResourcesGetGraphOptionalParams): Promise; + listGraphs(resourceGroupName: string, accountName: string, options?: GraphResourcesListGraphsOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface GraphResourcesCreateUpdateGraphOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesDeleteGraphResourceOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface GraphResourcesGetGraphOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; + +// @public +export interface GraphResourcesListGraphsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; + +// @public +export interface GraphResourcesListResult { + readonly value?: GraphResourceGetResults[]; +} + // @public export type GremlinDatabaseCreateUpdateParameters = ARMResourceProperties & { resource: GremlinDatabaseResource; @@ -1255,6 +1654,12 @@ export interface GremlinDatabaseResource { id: string; } +// @public +export interface GremlinDatabaseRestoreResource { + databaseName?: string; + graphNames?: string[]; +} + // @public export type GremlinGraphCreateUpdateParameters = ARMResourceProperties & { resource: GremlinGraphResource; @@ -1306,6 +1711,8 @@ export interface GremlinResources { beginMigrateGremlinGraphToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams): Promise; beginMigrateGremlinGraphToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams): Promise, GremlinResourcesMigrateGremlinGraphToManualThroughputResponse>>; beginMigrateGremlinGraphToManualThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams): Promise; + beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, location: ContinuousBackupRestoreLocation, options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, GremlinResourcesRetrieveContinuousBackupInformationResponse>>; + beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, location: ContinuousBackupRestoreLocation, options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; beginUpdateGremlinDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams): Promise, GremlinResourcesUpdateGremlinDatabaseThroughputResponse>>; beginUpdateGremlinDatabaseThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams): Promise; beginUpdateGremlinGraphThroughput(resourceGroupName: string, accountName: string, databaseName: string, graphName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: GremlinResourcesUpdateGremlinGraphThroughputOptionalParams): Promise, GremlinResourcesUpdateGremlinGraphThroughputResponse>>; @@ -1426,6 +1833,15 @@ export interface GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalPa // @public export type GremlinResourcesMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface GremlinResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type GremlinResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + // @public export interface GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -1481,6 +1897,13 @@ export interface IpAddressOrRange { // @public export type KeyKind = string; +// @public +export interface KeyWrapMetadata { + name?: string; + type?: string; + value?: string; +} + // @public export enum KnownAnalyticalStorageSchemaType { // (undocumented) @@ -1510,6 +1933,8 @@ export enum KnownAuthenticationMethod { // (undocumented) Cassandra = "Cassandra", // (undocumented) + Ldap = "Ldap", + // (undocumented) None = "None" } @@ -1611,6 +2036,16 @@ export enum KnownDatabaseAccountKind { Parse = "Parse" } +// @public +export enum KnownDataTransferComponent { + // (undocumented) + AzureBlobStorage = "AzureBlobStorage", + // (undocumented) + CosmosDBCassandra = "CosmosDBCassandra", + // (undocumented) + CosmosDBSql = "CosmosDBSql" +} + // @public export enum KnownDataType { // (undocumented) @@ -1774,11 +2209,49 @@ export enum KnownServerVersion { } // @public -export enum KnownSpatialType { +export enum KnownServiceSize { // (undocumented) - LineString = "LineString", + CosmosD16S = "Cosmos.D16s", // (undocumented) - MultiPolygon = "MultiPolygon", + CosmosD4S = "Cosmos.D4s", + // (undocumented) + CosmosD8S = "Cosmos.D8s" +} + +// @public +export enum KnownServiceStatus { + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Error = "Error", + // (undocumented) + Running = "Running", + // (undocumented) + Stopped = "Stopped", + // (undocumented) + Updating = "Updating" +} + +// @public +export enum KnownServiceType { + // (undocumented) + DataTransfer = "DataTransfer", + // (undocumented) + GraphAPICompute = "GraphAPICompute", + // (undocumented) + MaterializedViewsBuilder = "MaterializedViewsBuilder", + // (undocumented) + SqlDedicatedGateway = "SqlDedicatedGateway" +} + +// @public +export enum KnownSpatialType { + // (undocumented) + LineString = "LineString", + // (undocumented) + MultiPolygon = "MultiPolygon", // (undocumented) Point = "Point", // (undocumented) @@ -1825,6 +2298,11 @@ export enum KnownUnitType { Seconds = "Seconds" } +// @public +export interface ListBackups { + readonly value?: BackupResource[]; +} + // @public export interface ListClusters { value?: ClusterResource[]; @@ -1860,6 +2338,7 @@ export interface LocationListResult { export interface LocationProperties { readonly backupStorageRedundancies?: BackupStorageRedundancy[]; readonly isResidencyRestricted?: boolean; + readonly status?: string; readonly supportsAvailabilityZone?: boolean; } @@ -1930,6 +2409,20 @@ export interface ManagedServiceIdentity { }; } +// @public +export type MaterializedViewsBuilderRegionalServiceResource = RegionalServiceResource & {}; + +// @public +export interface MaterializedViewsBuilderServiceResource { + properties?: MaterializedViewsBuilderServiceResourceProperties; +} + +// @public +export type MaterializedViewsBuilderServiceResourceProperties = ServiceResourceProperties & { + serviceType: "MaterializedViewsBuilder"; + readonly locations?: MaterializedViewsBuilderRegionalServiceResource[]; +}; + // @public export interface Metric { readonly endTime?: Date; @@ -2048,10 +2541,18 @@ export interface MongoDBResources { beginCreateUpdateMongoDBCollectionAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, createUpdateMongoDBCollectionParameters: MongoDBCollectionCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams): Promise; beginCreateUpdateMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateMongoDBDatabaseParameters: MongoDBDatabaseCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoDBDatabaseOptionalParams): Promise, MongoDBResourcesCreateUpdateMongoDBDatabaseResponse>>; beginCreateUpdateMongoDBDatabaseAndWait(resourceGroupName: string, accountName: string, databaseName: string, createUpdateMongoDBDatabaseParameters: MongoDBDatabaseCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoDBDatabaseOptionalParams): Promise; + beginCreateUpdateMongoRoleDefinition(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams): Promise, MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse>>; + beginCreateUpdateMongoRoleDefinitionAndWait(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams): Promise; + beginCreateUpdateMongoUserDefinition(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, createUpdateMongoUserDefinitionParameters: MongoUserDefinitionCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams): Promise, MongoDBResourcesCreateUpdateMongoUserDefinitionResponse>>; + beginCreateUpdateMongoUserDefinitionAndWait(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, createUpdateMongoUserDefinitionParameters: MongoUserDefinitionCreateUpdateParameters, options?: MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams): Promise; beginDeleteMongoDBCollection(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams): Promise, void>>; beginDeleteMongoDBCollectionAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesDeleteMongoDBCollectionOptionalParams): Promise; beginDeleteMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesDeleteMongoDBDatabaseOptionalParams): Promise, void>>; beginDeleteMongoDBDatabaseAndWait(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesDeleteMongoDBDatabaseOptionalParams): Promise; + beginDeleteMongoRoleDefinition(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams): Promise, void>>; + beginDeleteMongoRoleDefinitionAndWait(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams): Promise; + beginDeleteMongoUserDefinition(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams): Promise, void>>; + beginDeleteMongoUserDefinitionAndWait(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesDeleteMongoUserDefinitionOptionalParams): Promise; beginMigrateMongoDBCollectionToAutoscale(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams): Promise, MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse>>; beginMigrateMongoDBCollectionToAutoscaleAndWait(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams): Promise; beginMigrateMongoDBCollectionToManualThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams): Promise, MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse>>; @@ -2070,8 +2571,12 @@ export interface MongoDBResources { getMongoDBCollectionThroughput(resourceGroupName: string, accountName: string, databaseName: string, collectionName: string, options?: MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams): Promise; getMongoDBDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesGetMongoDBDatabaseOptionalParams): Promise; getMongoDBDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesGetMongoDBDatabaseThroughputOptionalParams): Promise; + getMongoRoleDefinition(mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesGetMongoRoleDefinitionOptionalParams): Promise; + getMongoUserDefinition(mongoUserDefinitionId: string, resourceGroupName: string, accountName: string, options?: MongoDBResourcesGetMongoUserDefinitionOptionalParams): Promise; listMongoDBCollections(resourceGroupName: string, accountName: string, databaseName: string, options?: MongoDBResourcesListMongoDBCollectionsOptionalParams): PagedAsyncIterableIterator; listMongoDBDatabases(resourceGroupName: string, accountName: string, options?: MongoDBResourcesListMongoDBDatabasesOptionalParams): PagedAsyncIterableIterator; + listMongoRoleDefinitions(resourceGroupName: string, accountName: string, options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams): PagedAsyncIterableIterator; + listMongoUserDefinitions(resourceGroupName: string, accountName: string, options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams): PagedAsyncIterableIterator; } // @public @@ -2092,6 +2597,24 @@ export interface MongoDBResourcesCreateUpdateMongoDBDatabaseOptionalParams exten // @public export type MongoDBResourcesCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults; +// @public +export interface MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse = MongoRoleDefinitionGetResults; + +// @public +export interface MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type MongoDBResourcesCreateUpdateMongoUserDefinitionResponse = MongoUserDefinitionGetResults; + // @public export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2104,6 +2627,18 @@ export interface MongoDBResourcesDeleteMongoDBDatabaseOptionalParams extends cor updateIntervalInMs?: number; } +// @public +export interface MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface MongoDBResourcesDeleteMongoUserDefinitionOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + // @public export interface MongoDBResourcesGetMongoDBCollectionOptionalParams extends coreClient.OperationOptions { } @@ -2132,6 +2667,20 @@ export interface MongoDBResourcesGetMongoDBDatabaseThroughputOptionalParams exte // @public export type MongoDBResourcesGetMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface MongoDBResourcesGetMongoRoleDefinitionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MongoDBResourcesGetMongoRoleDefinitionResponse = MongoRoleDefinitionGetResults; + +// @public +export interface MongoDBResourcesGetMongoUserDefinitionOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MongoDBResourcesGetMongoUserDefinitionResponse = MongoUserDefinitionGetResults; + // @public export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions { } @@ -2146,6 +2695,20 @@ export interface MongoDBResourcesListMongoDBDatabasesOptionalParams extends core // @public export type MongoDBResourcesListMongoDBDatabasesResponse = MongoDBDatabaseListResult; +// @public +export interface MongoDBResourcesListMongoRoleDefinitionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MongoDBResourcesListMongoRoleDefinitionsResponse = MongoRoleDefinitionListResult; + +// @public +export interface MongoDBResourcesListMongoUserDefinitionsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type MongoDBResourcesListMongoUserDefinitionsResponse = MongoUserDefinitionListResult; + // @public export interface MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -2226,6 +2789,57 @@ export interface MongoIndexOptions { unique?: boolean; } +// @public +export interface MongoRoleDefinitionCreateUpdateParameters { + databaseName?: string; + privileges?: Privilege[]; + roleName?: string; + roles?: Role[]; + type?: MongoRoleDefinitionType; +} + +// @public +export type MongoRoleDefinitionGetResults = ARMProxyResource & { + roleName?: string; + typePropertiesType?: MongoRoleDefinitionType; + databaseName?: string; + privileges?: Privilege[]; + roles?: Role[]; +}; + +// @public +export interface MongoRoleDefinitionListResult { + readonly value?: MongoRoleDefinitionGetResults[]; +} + +// @public +export type MongoRoleDefinitionType = "BuiltInRole" | "CustomRole"; + +// @public +export interface MongoUserDefinitionCreateUpdateParameters { + customData?: string; + databaseName?: string; + mechanisms?: string; + password?: string; + roles?: Role[]; + userName?: string; +} + +// @public +export type MongoUserDefinitionGetResults = ARMProxyResource & { + userName?: string; + password?: string; + databaseName?: string; + customData?: string; + roles?: Role[]; + mechanisms?: string; +}; + +// @public +export interface MongoUserDefinitionListResult { + readonly value?: MongoUserDefinitionGetResults[]; +} + // @public export type NetworkAclBypass = "None" | "AzureServices"; @@ -2598,12 +3212,31 @@ export interface PrivateLinkServiceConnectionStateProperty { status?: string; } +// @public +export interface Privilege { + actions?: string[]; + resource?: PrivilegeResource; +} + +// @public +export interface PrivilegeResource { + collection?: string; + db?: string; +} + // @public export type ProxyResource = Resource & {}; // @public export type PublicNetworkAccess = string; +// @public +export interface RegionalServiceResource { + readonly location?: string; + readonly name?: string; + readonly status?: ServiceStatus; +} + // @public export interface RegionForOnlineOffline { region: string; @@ -2665,6 +3298,96 @@ export interface RestorableDatabaseAccountsListResult { readonly value?: RestorableDatabaseAccountGetResult[]; } +// @public +export interface RestorableGremlinDatabaseGetResult { + readonly id?: string; + readonly name?: string; + resource?: RestorableGremlinDatabasePropertiesResource; + readonly type?: string; +} + +// @public +export interface RestorableGremlinDatabasePropertiesResource { + readonly eventTimestamp?: string; + readonly operationType?: OperationType; + readonly ownerId?: string; + readonly ownerResourceId?: string; + readonly rid?: string; +} + +// @public +export interface RestorableGremlinDatabases { + list(location: string, instanceId: string, options?: RestorableGremlinDatabasesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableGremlinDatabasesListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type RestorableGremlinDatabasesListResponse = RestorableGremlinDatabasesListResult; + +// @public +export interface RestorableGremlinDatabasesListResult { + readonly value?: RestorableGremlinDatabaseGetResult[]; +} + +// @public +export interface RestorableGremlinGraphGetResult { + readonly id?: string; + readonly name?: string; + resource?: RestorableGremlinGraphPropertiesResource; + readonly type?: string; +} + +// @public +export interface RestorableGremlinGraphPropertiesResource { + readonly eventTimestamp?: string; + readonly operationType?: OperationType; + readonly ownerId?: string; + readonly ownerResourceId?: string; + readonly rid?: string; +} + +// @public +export interface RestorableGremlinGraphs { + list(location: string, instanceId: string, options?: RestorableGremlinGraphsListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableGremlinGraphsListOptionalParams extends coreClient.OperationOptions { + endTime?: string; + restorableGremlinDatabaseRid?: string; + startTime?: string; +} + +// @public +export type RestorableGremlinGraphsListResponse = RestorableGremlinGraphsListResult; + +// @public +export interface RestorableGremlinGraphsListResult { + readonly value?: RestorableGremlinGraphGetResult[]; +} + +// @public +export interface RestorableGremlinResources { + list(location: string, instanceId: string, options?: RestorableGremlinResourcesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableGremlinResourcesListOptionalParams extends coreClient.OperationOptions { + restoreLocation?: string; + restoreTimestampInUtc?: string; +} + +// @public +export type RestorableGremlinResourcesListResponse = RestorableGremlinResourcesListResult; + +// @public +export interface RestorableGremlinResourcesListResult { + readonly value?: GremlinDatabaseRestoreResource[]; +} + // @public export interface RestorableLocationResource { readonly creationTime?: Date; @@ -2697,7 +3420,9 @@ export interface RestorableMongodbCollections { // @public export interface RestorableMongodbCollectionsListOptionalParams extends coreClient.OperationOptions { + endTime?: string; restorableMongodbDatabaseRid?: string; + startTime?: string; } // @public @@ -2865,15 +3590,78 @@ export interface RestorableSqlResourcesListResult { readonly value?: DatabaseRestoreResource[]; } +// @public +export interface RestorableTableGetResult { + readonly id?: string; + readonly name?: string; + resource?: RestorableTablePropertiesResource; + readonly type?: string; +} + +// @public +export interface RestorableTablePropertiesResource { + readonly eventTimestamp?: string; + readonly operationType?: OperationType; + readonly ownerId?: string; + readonly ownerResourceId?: string; + readonly rid?: string; +} + +// @public +export interface RestorableTableResources { + list(location: string, instanceId: string, options?: RestorableTableResourcesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableTableResourcesListOptionalParams extends coreClient.OperationOptions { + restoreLocation?: string; + restoreTimestampInUtc?: string; +} + +// @public +export type RestorableTableResourcesListResponse = RestorableTableResourcesListResult; + +// @public +export interface RestorableTableResourcesListResult { + readonly value?: string[]; +} + +// @public +export interface RestorableTables { + list(location: string, instanceId: string, options?: RestorableTablesListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface RestorableTablesListOptionalParams extends coreClient.OperationOptions { + endTime?: string; + startTime?: string; +} + +// @public +export type RestorableTablesListResponse = RestorableTablesListResult; + +// @public +export interface RestorableTablesListResult { + readonly value?: RestorableTableGetResult[]; +} + // @public export type RestoreMode = string; // @public export interface RestoreParameters { databasesToRestore?: DatabaseRestoreResource[]; + gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; restoreMode?: RestoreMode; restoreSource?: string; restoreTimestampInUtc?: Date; + tablesToRestore?: string[]; +} + +// @public +export interface Role { + db?: string; + role?: string; } // @public @@ -2887,6 +3675,84 @@ export interface SeedNode { // @public export type ServerVersion = string; +// @public +export interface Service { + beginCreate(resourceGroupName: string, accountName: string, serviceName: string, createUpdateParameters: ServiceResourceCreateUpdateParameters, options?: ServiceCreateOptionalParams): Promise, ServiceCreateResponse>>; + beginCreateAndWait(resourceGroupName: string, accountName: string, serviceName: string, createUpdateParameters: ServiceResourceCreateUpdateParameters, options?: ServiceCreateOptionalParams): Promise; + beginDelete(resourceGroupName: string, accountName: string, serviceName: string, options?: ServiceDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, accountName: string, serviceName: string, options?: ServiceDeleteOptionalParams): Promise; + get(resourceGroupName: string, accountName: string, serviceName: string, options?: ServiceGetOptionalParams): Promise; + list(resourceGroupName: string, accountName: string, options?: ServiceListOptionalParams): PagedAsyncIterableIterator; +} + +// @public +export interface ServiceCreateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type ServiceCreateResponse = ServiceResource; + +// @public +export interface ServiceDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export interface ServiceGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceGetResponse = ServiceResource; + +// @public +export interface ServiceListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type ServiceListResponse = ServiceResourceListResult; + +// @public +export type ServiceResource = ARMProxyResource & { + properties?: ServiceResourcePropertiesUnion; +}; + +// @public +export interface ServiceResourceCreateUpdateParameters { + instanceCount?: number; + instanceSize?: ServiceSize; + serviceType?: ServiceType; +} + +// @public +export interface ServiceResourceListResult { + readonly value?: ServiceResource[]; +} + +// @public +export interface ServiceResourceProperties { + [property: string]: any; + readonly creationTime?: Date; + instanceCount?: number; + instanceSize?: ServiceSize; + serviceType: "DataTransfer" | "SqlDedicatedGateway" | "GraphAPICompute" | "MaterializedViewsBuilder"; + readonly status?: ServiceStatus; +} + +// @public (undocumented) +export type ServiceResourcePropertiesUnion = ServiceResourceProperties | DataTransferServiceResourceProperties | SqlDedicatedGatewayServiceResourceProperties | GraphAPIComputeServiceResourceProperties | MaterializedViewsBuilderServiceResourceProperties; + +// @public +export type ServiceSize = string; + +// @public +export type ServiceStatus = string; + +// @public +export type ServiceType = string; + // @public (undocumented) export interface SpatialSpec { path?: string; @@ -2961,8 +3827,27 @@ export interface SqlDatabaseResource { id: string; } +// @public +export type SqlDedicatedGatewayRegionalServiceResource = RegionalServiceResource & { + readonly sqlDedicatedGatewayEndpoint?: string; +}; + +// @public +export interface SqlDedicatedGatewayServiceResource { + properties?: SqlDedicatedGatewayServiceResourceProperties; +} + +// @public +export type SqlDedicatedGatewayServiceResourceProperties = ServiceResourceProperties & { + serviceType: "SqlDedicatedGateway"; + sqlDedicatedGatewayEndpoint?: string; + readonly locations?: SqlDedicatedGatewayRegionalServiceResource[]; +}; + // @public export interface SqlResources { + beginCreateUpdateClientEncryptionKey(resourceGroupName: string, accountName: string, databaseName: string, clientEncryptionKeyName: string, createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams): Promise, SqlResourcesCreateUpdateClientEncryptionKeyResponse>>; + beginCreateUpdateClientEncryptionKeyAndWait(resourceGroupName: string, accountName: string, databaseName: string, clientEncryptionKeyName: string, createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams): Promise; beginCreateUpdateSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters, options?: SqlResourcesCreateUpdateSqlContainerOptionalParams): Promise, SqlResourcesCreateUpdateSqlContainerResponse>>; beginCreateUpdateSqlContainerAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, createUpdateSqlContainerParameters: SqlContainerCreateUpdateParameters, options?: SqlResourcesCreateUpdateSqlContainerOptionalParams): Promise; beginCreateUpdateSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, createUpdateSqlDatabaseParameters: SqlDatabaseCreateUpdateParameters, options?: SqlResourcesCreateUpdateSqlDatabaseOptionalParams): Promise, SqlResourcesCreateUpdateSqlDatabaseResponse>>; @@ -3005,6 +3890,7 @@ export interface SqlResources { beginUpdateSqlContainerThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlContainerThroughputOptionalParams): Promise; beginUpdateSqlDatabaseThroughput(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlDatabaseThroughputOptionalParams): Promise, SqlResourcesUpdateSqlDatabaseThroughputResponse>>; beginUpdateSqlDatabaseThroughputAndWait(resourceGroupName: string, accountName: string, databaseName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: SqlResourcesUpdateSqlDatabaseThroughputOptionalParams): Promise; + getClientEncryptionKey(resourceGroupName: string, accountName: string, databaseName: string, clientEncryptionKeyName: string, options?: SqlResourcesGetClientEncryptionKeyOptionalParams): Promise; getSqlContainer(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesGetSqlContainerOptionalParams): Promise; getSqlContainerThroughput(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesGetSqlContainerThroughputOptionalParams): Promise; getSqlDatabase(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesGetSqlDatabaseOptionalParams): Promise; @@ -3014,6 +3900,7 @@ export interface SqlResources { getSqlStoredProcedure(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, storedProcedureName: string, options?: SqlResourcesGetSqlStoredProcedureOptionalParams): Promise; getSqlTrigger(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, triggerName: string, options?: SqlResourcesGetSqlTriggerOptionalParams): Promise; getSqlUserDefinedFunction(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, userDefinedFunctionName: string, options?: SqlResourcesGetSqlUserDefinedFunctionOptionalParams): Promise; + listClientEncryptionKeys(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesListClientEncryptionKeysOptionalParams): PagedAsyncIterableIterator; listSqlContainers(resourceGroupName: string, accountName: string, databaseName: string, options?: SqlResourcesListSqlContainersOptionalParams): PagedAsyncIterableIterator; listSqlDatabases(resourceGroupName: string, accountName: string, options?: SqlResourcesListSqlDatabasesOptionalParams): PagedAsyncIterableIterator; listSqlRoleAssignments(resourceGroupName: string, accountName: string, options?: SqlResourcesListSqlRoleAssignmentsOptionalParams): PagedAsyncIterableIterator; @@ -3023,6 +3910,15 @@ export interface SqlResources { listSqlUserDefinedFunctions(resourceGroupName: string, accountName: string, databaseName: string, containerName: string, options?: SqlResourcesListSqlUserDefinedFunctionsOptionalParams): PagedAsyncIterableIterator; } +// @public +export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; + // @public export interface SqlResourcesCreateUpdateSqlContainerOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; @@ -3128,6 +4024,13 @@ export interface SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams extends updateIntervalInMs?: number; } +// @public +export interface SqlResourcesGetClientEncryptionKeyOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlResourcesGetClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; + // @public export interface SqlResourcesGetSqlContainerOptionalParams extends coreClient.OperationOptions { } @@ -3191,6 +4094,13 @@ export interface SqlResourcesGetSqlUserDefinedFunctionOptionalParams extends cor // @public export type SqlResourcesGetSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults; +// @public +export interface SqlResourcesListClientEncryptionKeysOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type SqlResourcesListClientEncryptionKeysResponse = ClientEncryptionKeysListResult; + // @public export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions { } @@ -3468,6 +4378,8 @@ export interface TableResources { beginMigrateTableToAutoscaleAndWait(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToAutoscaleOptionalParams): Promise; beginMigrateTableToManualThroughput(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams): Promise, TableResourcesMigrateTableToManualThroughputResponse>>; beginMigrateTableToManualThroughputAndWait(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams): Promise; + beginRetrieveContinuousBackupInformation(resourceGroupName: string, accountName: string, tableName: string, location: ContinuousBackupRestoreLocation, options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams): Promise, TableResourcesRetrieveContinuousBackupInformationResponse>>; + beginRetrieveContinuousBackupInformationAndWait(resourceGroupName: string, accountName: string, tableName: string, location: ContinuousBackupRestoreLocation, options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams): Promise; beginUpdateTableThroughput(resourceGroupName: string, accountName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: TableResourcesUpdateTableThroughputOptionalParams): Promise, TableResourcesUpdateTableThroughputResponse>>; beginUpdateTableThroughputAndWait(resourceGroupName: string, accountName: string, tableName: string, updateThroughputParameters: ThroughputSettingsUpdateParameters, options?: TableResourcesUpdateTableThroughputOptionalParams): Promise; getTable(resourceGroupName: string, accountName: string, tableName: string, options?: TableResourcesGetTableOptionalParams): Promise; @@ -3529,6 +4441,15 @@ export interface TableResourcesMigrateTableToManualThroughputOptionalParams exte // @public export type TableResourcesMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults; +// @public +export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} + +// @public +export type TableResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + // @public export interface TableResourcesUpdateTableThroughputOptionalParams extends coreClient.OperationOptions { resumeFrom?: string; diff --git a/sdk/cosmosdb/arm-cosmosdb/rollup.config.js b/sdk/cosmosdb/arm-cosmosdb/rollup.config.js index 9be1955eb7f1..3f89d7309da5 100644 --- a/sdk/cosmosdb/arm-cosmosdb/rollup.config.js +++ b/sdk/cosmosdb/arm-cosmosdb/rollup.config.js @@ -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]; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts index 87988d281c16..0207a4e186bc 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/cosmosDBManagementClient.ts @@ -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; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts index 15b7a43939ed..bf19273468a1 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/index.ts @@ -12,39 +12,17 @@ export type BackupPolicyUnion = | BackupPolicy | PeriodicModeBackupPolicy | ContinuousModeBackupPolicy; - -/** Identity for the resource. */ -export interface ManagedServiceIdentity { - /** - * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ - type?: ResourceIdentityType; - /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { - [propertyName: string]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; - }; -} - -export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { - /** - * The principal id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The client id of user assigned identity. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly clientId?: string; -} +export type DataTransferDataSourceSinkUnion = + | DataTransferDataSourceSink + | CosmosCassandraDataTransferDataSourceSink + | CosmosSqlDataTransferDataSourceSink + | AzureBlobDataTransferDataSourceSink; +export type ServiceResourcePropertiesUnion = + | ServiceResourceProperties + | DataTransferServiceResourceProperties + | SqlDedicatedGatewayServiceResourceProperties + | GraphAPIComputeServiceResourceProperties + | MaterializedViewsBuilderServiceResourceProperties; /** IpAddressOrRange object */ export interface IpAddressOrRange { @@ -173,6 +151,10 @@ export interface RestoreParameters { restoreTimestampInUtc?: Date; /** List of specific databases available for restore. */ databasesToRestore?: DatabaseRestoreResource[]; + /** List of specific gremlin databases available for restore. */ + gremlinDatabasesToRestore?: GremlinDatabaseRestoreResource[]; + /** List of specific tables available for restore. */ + tablesToRestore?: string[]; } /** Specific Databases to restore. */ @@ -183,6 +165,14 @@ export interface DatabaseRestoreResource { collectionNames?: string[]; } +/** Specific Gremlin Databases to restore. */ +export interface GremlinDatabaseRestoreResource { + /** The name of the gremlin database available for restore. */ + databaseName?: string; + /** The names of the graphs available for restore. */ + graphNames?: string[]; +} + /** The object representing the policy for taking backups on an account. */ export interface BackupPolicy { /** Polymorphic discriminator, which specifies the different types this object can be */ @@ -215,6 +205,12 @@ export interface CorsPolicy { maxAgeInSeconds?: number; } +/** Indicates what diagnostic log settings are to be enabled. */ +export interface DiagnosticLogSettings { + /** Describe the level of detail with which queries are to be logged. */ + enableFullTextQuery?: EnableFullTextQuery; +} + /** The object that represents all properties related to capacity enforcement on an account. */ export interface Capacity { /** The total throughput limit imposed on the account. A totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of throughput. */ @@ -258,6 +254,41 @@ export interface ARMResourceProperties { location?: string; /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ tags?: { [propertyName: string]: string }; + /** Identity for the resource. */ + identity?: ManagedServiceIdentity; +} + +/** Identity for the resource. */ +export interface ManagedServiceIdentity { + /** + * The principal id of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The tenant id of the system assigned identity. This property will only be provided for a system assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tenantId?: string; + /** The type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. */ + type?: ResourceIdentityType; + /** The list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ + userAssignedIdentities?: { + [propertyName: string]: Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties; + }; +} + +export interface Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties { + /** + * The principal id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly principalId?: string; + /** + * The client id of user assigned identity. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly clientId?: string; } /** Parameters for patching Azure Cosmos DB database account properties. */ @@ -312,10 +343,14 @@ export interface DatabaseAccountUpdateParameters { networkAclBypass?: NetworkAclBypass; /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ disableLocalAuth?: boolean; /** The object that represents all properties related to capacity enforcement on an account. */ capacity?: Capacity; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; } /** The list of new failover policies for the failover priority change. */ @@ -657,6 +692,42 @@ export interface MetricAvailability { readonly retention?: string; } +/** The List operation response, that contains the Graph resource and their properties. */ +export interface GraphResourcesListResult { + /** + * List of Graph resource and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GraphResourceGetResults[]; +} + +/** Cosmos DB Graph resource object */ +export interface GraphResource { + /** Name of the Cosmos DB Graph */ + id: string; +} + +/** Cosmos DB options resource object */ +export interface OptionsResource { + /** Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. */ + throughput?: number; + /** Specifies the Autoscale settings. */ + autoscaleSettings?: AutoscaleSettings; +} + +export interface AutoscaleSettings { + /** Represents maximum throughput, the resource can scale up to. */ + maxThroughput?: number; +} + +/** CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput" */ +export interface CreateUpdateOptions { + /** Request Units per second. For example, "throughput": 10000. */ + throughput?: number; + /** Specifies the Autoscale settings. */ + autoscaleSettings?: AutoscaleSettings; +} + /** The List operation response, that contains the SQL databases and their properties. */ export interface SqlDatabaseListResult { /** @@ -691,27 +762,6 @@ export interface ExtendedResourceProperties { readonly etag?: string; } -/** Cosmos DB options resource object */ -export interface OptionsResource { - /** Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. */ - throughput?: number; - /** Specifies the Autoscale settings. */ - autoscaleSettings?: AutoscaleSettings; -} - -export interface AutoscaleSettings { - /** Represents maximum throughput, the resource can scale up to. */ - maxThroughput?: number; -} - -/** CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput" */ -export interface CreateUpdateOptions { - /** Request Units per second. For example, "throughput": 10000. */ - throughput?: number; - /** Specifies the Autoscale settings. */ - autoscaleSettings?: AutoscaleSettings; -} - /** Cosmos DB resource throughput object. Either throughput is required or autoscaleSettings is required, but not both. */ export interface ThroughputSettingsResource { /** Value of the Cosmos DB resource throughput. Either throughput is required or autoscaleSettings is required, but not both. */ @@ -763,6 +813,62 @@ export interface CloudError { error?: ErrorResponse; } +/** The List operation response, that contains the client encryption keys and their properties. */ +export interface ClientEncryptionKeysListResult { + /** + * List of client encryption keys and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ClientEncryptionKeyGetResults[]; +} + +/** Cosmos DB client encryption key resource object. */ +export interface ClientEncryptionKeyResource { + /** Name of the ClientEncryptionKey */ + id?: string; + /** Encryption algorithm that will be used along with this client encryption key to encrypt/decrypt data. */ + encryptionAlgorithm?: string; + /** Wrapped (encrypted) form of the key represented as a byte array. */ + wrappedDataEncryptionKey?: Uint8Array; + /** Metadata for the wrapping provider that can be used to unwrap the wrapped client encryption key. */ + keyWrapMetadata?: KeyWrapMetadata; +} + +/** Represents key wrap metadata that a key wrapping provider can use to wrap/unwrap a client encryption key. */ +export interface KeyWrapMetadata { + /** The name of associated KeyEncryptionKey (aka CustomerManagedKey). */ + name?: string; + /** ProviderName of KeyStoreProvider. */ + type?: string; + /** Reference / link to the KeyEncryptionKey. */ + value?: string; +} + +/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ +export interface ARMProxyResource { + /** + * The unique resource identifier of the database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; +} + +/** Parameters to create and update ClientEncryptionKey. */ +export interface ClientEncryptionKeyCreateUpdateParameters { + /** The standard JSON format of a ClientEncryptionKey */ + resource: ClientEncryptionKeyResource; +} + /** The List operation response, that contains the containers and their properties. */ export interface SqlContainerListResult { /** @@ -1127,6 +1233,11 @@ export interface LocationListResult { /** Cosmos DB location metadata */ export interface LocationProperties { + /** + * The current status of location in Azure. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; /** * Flag indicating whether the location supports availability zones or not. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -1144,209 +1255,142 @@ export interface LocationProperties { readonly backupStorageRedundancies?: BackupStorageRedundancy[]; } -/** The resource model definition for a ARM proxy resource. It will have everything other than required location and tags */ -export interface ARMProxyResource { - /** - * The unique resource identifier of the database account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the database account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; +/** The List operation response, that contains the Cassandra views and their properties. */ +export interface CassandraViewListResult { /** - * The type of Azure resource. + * List of Cassandra views and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly type?: string; + readonly value?: CassandraViewGetResults[]; } -/** A list of notebook workspace resources */ -export interface NotebookWorkspaceListResult { - /** Array of notebook workspace resources */ - value?: NotebookWorkspace[]; +/** Cosmos DB Cassandra view resource object */ +export interface CassandraViewResource { + /** Name of the Cosmos DB Cassandra view */ + id: string; + /** View Definition of the Cosmos DB Cassandra view */ + viewDefinition: string; } -/** The connection info for the given notebook workspace */ -export interface NotebookWorkspaceConnectionInfoResult { +/** The properties of a DataTransfer Job */ +export interface DataTransferJobProperties { /** - * Specifies auth token used for connecting to Notebook server (uses token-based auth). + * Job Name * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly authToken?: string; + readonly jobName?: string; + /** Source DataStore details */ + source: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination: DataTransferDataSourceSinkUnion; /** - * Specifies the endpoint of Notebook server. + * Job Status * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly notebookServerEndpoint?: string; -} - -/** A list of private endpoint connections */ -export interface PrivateEndpointConnectionListResult { - /** Array of private endpoint connections */ - value?: PrivateEndpointConnection[]; -} - -/** A list of private link resources */ -export interface PrivateLinkResourceListResult { - /** Array of private link resources */ - value?: PrivateLinkResource[]; -} - -/** The set of data plane operations permitted through this Role Definition. */ -export interface Permission { - /** An array of data actions that are allowed. */ - dataActions?: string[]; - /** An array of data actions that are denied. */ - notDataActions?: string[]; -} - -/** Parameters to create and update an Azure Cosmos DB SQL Role Definition. */ -export interface SqlRoleDefinitionCreateUpdateParameters { - /** A user-friendly name for the Role Definition. Must be unique for the database account. */ - roleName?: string; - /** Indicates whether the Role Definition was built-in or user created. */ - type?: RoleDefinitionType; - /** A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist. */ - assignableScopes?: string[]; - /** The set of operations allowed through this Role Definition. */ - permissions?: Permission[]; -} - -/** The relevant Role Definitions. */ -export interface SqlRoleDefinitionListResult { + readonly status?: string; /** - * List of Role Definitions and their properties. + * Percentage of completion. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SqlRoleDefinitionGetResults[]; -} - -/** Parameters to create and update an Azure Cosmos DB SQL Role Assignment. */ -export interface SqlRoleAssignmentCreateUpdateParameters { - /** The unique identifier for the associated Role Definition. */ - roleDefinitionId?: string; - /** The data plane resource path for which access is being granted through this Role Assignment. */ - scope?: string; - /** The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. */ - principalId?: string; -} - -/** The relevant Role Assignments. */ -export interface SqlRoleAssignmentListResult { + readonly percentageComplete?: number; /** - * List of Role Assignments and their properties + * Last Updated Time (ISO-8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: SqlRoleAssignmentGetResults[]; -} - -/** The List operation response, that contains the restorable database accounts and their properties. */ -export interface RestorableDatabaseAccountsListResult { + readonly lastUpdatedUtcTime?: Date; + /** Worker count */ + workerCount?: number; /** - * List of restorable database accounts and their properties. + * Error response for Faulted job * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RestorableDatabaseAccountGetResult[]; + readonly error?: ErrorResponse; } -/** A Azure Cosmos DB restorable database account. */ -export interface RestorableDatabaseAccountGetResult { +/** Base class for all DataTransfer source/sink */ +export interface DataTransferDataSourceSink { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBCassandra" | "CosmosDBSql" | "AzureBlobStorage"; +} + +/** The List operation response, that contains the Data Transfer jobs and their properties. */ +export interface DataTransferJobFeedResults { /** - * The unique resource identifier of the ARM resource. + * List of Data Transfer jobs and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly id?: string; + readonly value?: DataTransferJobGetResults[]; /** - * The name of the ARM resource. + * URL to get the next set of Data Transfer job list results if there are any. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly name?: string; - /** - * The type of Azure resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The location of the resource group to which the resource belongs. */ - location?: string; - /** The name of the global database account */ - accountName?: string; - /** The creation time of the restorable database account (ISO-8601 format). */ - creationTime?: Date; - /** The time at which the restorable database account has been deleted (ISO-8601 format). */ - deletionTime?: Date; - /** - * The API type of the restorable database account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly apiType?: ApiType; - /** - * List of regions where the of the database account can be restored from. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly restorableLocations?: RestorableLocationResource[]; + readonly nextLink?: string; } -/** Properties of the regional restorable account. */ -export interface RestorableLocationResource { - /** - * The location of the regional restorable account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly locationName?: string; - /** - * The instance id of the regional restorable account. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly regionalDatabaseAccountInstanceId?: string; - /** - * The creation time of the regional restorable database account (ISO-8601 format). - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly creationTime?: Date; +/** List of managed Cassandra clusters. */ +export interface ListClusters { + /** Container for the array of clusters. */ + value?: ClusterResource[]; +} + +/** Properties of a managed Cassandra cluster. */ +export interface ClusterResourceProperties { + /** The status of the resource at the time the operation was called. */ + provisioningState?: ManagedCassandraProvisioningState; + /** To create an empty cluster, omit this field or set it to null. To restore a backup into a new cluster, set this field to the resource id of the backup. */ + restoreFromBackupId?: string; + /** Resource id of a subnet that this cluster's management service should have its network interface attached to. The subnet must be routable to all subnets that will be delegated to data centers. The resource id must be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/' */ + delegatedManagementSubnetId?: string; + /** Which version of Cassandra should this cluster converge to running (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. */ + cassandraVersion?: string; + /** If you need to set the clusterName property in cassandra.yaml to something besides the resource name of the cluster, set the value to use on this property. */ + clusterNameOverride?: string; + /** Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. 'Ldap' is in preview. */ + authenticationMethod?: AuthenticationMethod; + /** Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'. */ + initialCassandraAdminPassword?: string; + /** Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. */ + prometheusEndpoint?: SeedNode; + /** Should automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid cluster where you are already doing your own repairs. */ + repairEnabled?: boolean; + /** List of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, the managed Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more of the public certificates in this property. */ + clientCertificates?: Certificate[]; + /** List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be verifiable using one of the certificates provided in this property. */ + externalGossipCertificates?: Certificate[]; /** - * The time at which the regional restorable database account has been deleted (ISO-8601 format). + * List of TLS certificates that unmanaged nodes must trust for gossip with managed nodes. All managed nodes will present TLS client certificates that are verifiable using one of the certificates provided in this property. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly deletionTime?: Date; -} - -/** Properties of the regional restorable account. */ -export interface ContinuousBackupRestoreLocation { - /** The name of the continuous backup restore location. */ - location?: string; -} - -/** Backup information of a resource. */ -export interface BackupInformation { + readonly gossipCertificates?: Certificate[]; + /** List of IP addresses of seed nodes in unmanaged data centers. These will be added to the seed node lists of all managed nodes. */ + externalSeedNodes?: SeedNode[]; /** - * Information about the status of continuous backups. + * List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly continuousBackupInformation?: ContinuousBackupInformation; + readonly seedNodes?: SeedNode[]; + /** Number of hours to wait between taking a backup of the cluster. */ + hoursBetweenBackups?: number; + /** Whether the cluster and associated data centers has been deallocated. */ + deallocated?: boolean; + /** Whether Cassandra audit logging is enabled */ + cassandraAuditLoggingEnabled?: boolean; } -/** Information about the status of continuous backups. */ -export interface ContinuousBackupInformation { - /** The latest restorable timestamp for a resource. */ - latestRestorableTimestamp?: string; +export interface SeedNode { + /** IP address of this seed node. */ + ipAddress?: string; } -/** The List operation response, that contains the SQL database events and their properties. */ -export interface RestorableSqlDatabasesListResult { - /** - * List of SQL database events and their properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: RestorableSqlDatabaseGetResult[]; +export interface Certificate { + /** PEM formatted public key. */ + pem?: string; } -/** An Azure Cosmos DB SQL database event */ -export interface RestorableSqlDatabaseGetResult { +/** The core properties of ARM resources. */ +export interface ManagedCassandraARMResourceProperties { /** - * The unique resource Identifier of the ARM resource. + * The unique resource identifier of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; @@ -1360,380 +1404,85 @@ export interface RestorableSqlDatabaseGetResult { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; - /** The resource of an Azure Cosmos DB SQL database event */ - resource?: RestorableSqlDatabasePropertiesResource; + /** The location of the resource group to which the resource belongs. */ + location?: string; + /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ + tags?: { [propertyName: string]: string }; + /** Identity for the resource. */ + identity?: ManagedCassandraManagedServiceIdentity; } -/** The resource of an Azure Cosmos DB SQL database event */ -export interface RestorableSqlDatabasePropertiesResource { - /** - * A system generated property. A unique identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rid?: string; - /** - * The operation type of this database event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationType?: OperationType; - /** - * The time when this database event happened. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventTimestamp?: string; +/** Identity for the resource. */ +export interface ManagedCassandraManagedServiceIdentity { /** - * The name of the SQL database. + * The object id of the identity resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ownerId?: string; + readonly principalId?: string; /** - * The resource ID of the SQL database. + * The tenant id of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ownerResourceId?: string; - /** Cosmos DB SQL database resource object */ - database?: RestorableSqlDatabasePropertiesResourceDatabase; + readonly tenantId?: string; + /** The type of the resource. */ + type?: ManagedCassandraResourceIdentityType; } -/** The List operation response, that contains the SQL container events and their properties. */ -export interface RestorableSqlContainersListResult { - /** - * List of SQL container events and their properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: RestorableSqlContainerGetResult[]; +/** Specification of which command to run where */ +export interface CommandPostBody { + /** The command which should be run */ + command: string; + /** The arguments for the command to be run */ + arguments?: { [propertyName: string]: string }; + /** IP address of the cassandra host to run the command on */ + host: string; + /** If true, stops cassandra before executing the command and then start it again */ + cassandraStopStart?: boolean; + /** If true, allows the command to *write* to the cassandra directory, otherwise read-only. */ + readwrite?: boolean; } -/** An Azure Cosmos DB SQL container event */ -export interface RestorableSqlContainerGetResult { - /** - * The unique resource Identifier of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of Azure resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The resource of an Azure Cosmos DB SQL container event */ - resource?: RestorableSqlContainerPropertiesResource; +/** Response of /command api */ +export interface CommandOutput { + /** Output of the command. */ + commandOutput?: string; } -/** The resource of an Azure Cosmos DB SQL container event */ -export interface RestorableSqlContainerPropertiesResource { - /** - * A system generated property. A unique identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rid?: string; - /** - * The operation type of this container event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationType?: OperationType; - /** - * The when this container event happened. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventTimestamp?: string; - /** - * The name of this SQL container. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ownerId?: string; +/** List of restorable backups for a Cassandra cluster. */ +export interface ListBackups { /** - * The resource ID of this SQL container. + * Container for array of backups. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly ownerResourceId?: string; - /** Cosmos DB SQL container resource object */ - container?: RestorableSqlContainerPropertiesResourceContainer; + readonly value?: BackupResource[]; } -/** The List operation response, that contains the restorable SQL resources. */ -export interface RestorableSqlResourcesListResult { - /** - * List of restorable SQL resources, including the database and collection names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DatabaseRestoreResource[]; +export interface BackupResourceProperties { + /** The time this backup was taken, formatted like 2021-01-21T17:35:21 */ + timestamp?: Date; } -/** The List operation response, that contains the MongoDB database events and their properties. */ -export interface RestorableMongodbDatabasesListResult { +/** List of managed Cassandra data centers and their properties. */ +export interface ListDataCenters { /** - * List of MongoDB database events and their properties. + * Container for array of data centers. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly value?: RestorableMongodbDatabaseGetResult[]; + readonly value?: DataCenterResource[]; } -/** An Azure Cosmos DB MongoDB database event */ -export interface RestorableMongodbDatabaseGetResult { +/** Properties of a managed Cassandra data center. */ +export interface DataCenterResourceProperties { + /** The status of the resource at the time the operation was called. */ + provisioningState?: ManagedCassandraProvisioningState; + /** The region this data center should be created in. */ + dataCenterLocation?: string; + /** Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'. */ + delegatedSubnetId?: string; + /** The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. */ + nodeCount?: number; /** - * The unique resource Identifier of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of Azure resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The resource of an Azure Cosmos DB MongoDB database event */ - resource?: RestorableMongodbDatabasePropertiesResource; -} - -/** The resource of an Azure Cosmos DB MongoDB database event */ -export interface RestorableMongodbDatabasePropertiesResource { - /** - * A system generated property. A unique identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rid?: string; - /** - * The operation type of this database event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationType?: OperationType; - /** - * The time when this database event happened. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventTimestamp?: string; - /** - * The name of this MongoDB database. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ownerId?: string; - /** - * The resource ID of this MongoDB database. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ownerResourceId?: string; -} - -/** The List operation response, that contains the MongoDB collection events and their properties. */ -export interface RestorableMongodbCollectionsListResult { - /** - * List of MongoDB collection events and their properties. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: RestorableMongodbCollectionGetResult[]; -} - -/** An Azure Cosmos DB MongoDB collection event */ -export interface RestorableMongodbCollectionGetResult { - /** - * The unique resource Identifier of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of Azure resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The resource of an Azure Cosmos DB MongoDB collection event */ - resource?: RestorableMongodbCollectionPropertiesResource; -} - -/** The resource of an Azure Cosmos DB MongoDB collection event */ -export interface RestorableMongodbCollectionPropertiesResource { - /** - * A system generated property. A unique identifier. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly rid?: string; - /** - * The operation type of this collection event. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly operationType?: OperationType; - /** - * The time when this collection event happened. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly eventTimestamp?: string; - /** - * The name of this MongoDB collection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ownerId?: string; - /** - * The resource ID of this MongoDB collection. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly ownerResourceId?: string; -} - -/** The List operation response, that contains the restorable MongoDB resources. */ -export interface RestorableMongodbResourcesListResult { - /** - * List of restorable MongoDB resources, including the database and collection names. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DatabaseRestoreResource[]; -} - -/** List of managed Cassandra clusters. */ -export interface ListClusters { - /** Container for the array of clusters. */ - value?: ClusterResource[]; -} - -/** Properties of a managed Cassandra cluster. */ -export interface ClusterResourceProperties { - /** The status of the resource at the time the operation was called. */ - provisioningState?: ManagedCassandraProvisioningState; - /** To create an empty cluster, omit this field or set it to null. To restore a backup into a new cluster, set this field to the resource id of the backup. */ - restoreFromBackupId?: string; - /** Resource id of a subnet that this cluster's management service should have its network interface attached to. The subnet must be routable to all subnets that will be delegated to data centers. The resource id must be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/' */ - delegatedManagementSubnetId?: string; - /** Which version of Cassandra should this cluster converge to running (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. */ - cassandraVersion?: string; - /** If you need to set the clusterName property in cassandra.yaml to something besides the resource name of the cluster, set the value to use on this property. */ - clusterNameOverride?: string; - /** Which authentication method Cassandra should use to authenticate clients. 'None' turns off authentication, so should not be used except in emergencies. 'Cassandra' is the default password based authentication. The default is 'Cassandra'. */ - authenticationMethod?: AuthenticationMethod; - /** Initial password for clients connecting as admin to the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'. */ - initialCassandraAdminPassword?: string; - /** Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. */ - prometheusEndpoint?: SeedNode; - /** Should automatic repairs run on this cluster? If omitted, this is true, and should stay true unless you are running a hybrid cluster where you are already doing your own repairs. */ - repairEnabled?: boolean; - /** List of TLS certificates used to authorize clients connecting to the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if clientCertificates is set, the managed Cassandra cluster will reject all connections not bearing a TLS client certificate that can be validated from one or more of the public certificates in this property. */ - clientCertificates?: Certificate[]; - /** List of TLS certificates used to authorize gossip from unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be verifiable using one of the certificates provided in this property. */ - externalGossipCertificates?: Certificate[]; - /** - * List of TLS certificates that unmanaged nodes must trust for gossip with managed nodes. All managed nodes will present TLS client certificates that are verifiable using one of the certificates provided in this property. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly gossipCertificates?: Certificate[]; - /** List of IP addresses of seed nodes in unmanaged data centers. These will be added to the seed node lists of all managed nodes. */ - externalSeedNodes?: SeedNode[]; - /** - * List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly seedNodes?: SeedNode[]; - /** Number of hours to wait between taking a backup of the cluster. To disable backups, set this property to 0. */ - hoursBetweenBackups?: number; - /** Whether the cluster and associated data centers has been deallocated. */ - deallocated?: boolean; - /** Whether Cassandra audit logging is enabled */ - cassandraAuditLoggingEnabled?: boolean; -} - -export interface SeedNode { - /** IP address of this seed node. */ - ipAddress?: string; -} - -export interface Certificate { - /** PEM formatted public key. */ - pem?: string; -} - -/** The core properties of ARM resources. */ -export interface ManagedCassandraARMResourceProperties { - /** - * The unique resource identifier of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly id?: string; - /** - * The name of the ARM resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly name?: string; - /** - * The type of Azure resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly type?: string; - /** The location of the resource group to which the resource belongs. */ - location?: string; - /** Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". */ - tags?: { [propertyName: string]: string }; - /** Identity for the resource. */ - identity?: ManagedCassandraManagedServiceIdentity; -} - -/** Identity for the resource. */ -export interface ManagedCassandraManagedServiceIdentity { - /** - * The object id of the identity resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly principalId?: string; - /** - * The tenant id of the resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly tenantId?: string; - /** The type of the resource. */ - type?: ManagedCassandraResourceIdentityType; -} - -/** Specification of which command to run where */ -export interface CommandPostBody { - /** The command which should be run */ - command: string; - /** The arguments for the command to be run */ - arguments?: { [propertyName: string]: string }; - /** IP address of the cassandra host to run the command on */ - host: string; - /** If true, stops cassandra before executing the command and then start it again */ - cassandraStopStart?: boolean; - /** If true, allows the command to *write* to the cassandra directory, otherwise read-only. */ - readwrite?: boolean; -} - -/** Response of /command api */ -export interface CommandOutput { - /** Output of the command. */ - commandOutput?: string; -} - -/** List of managed Cassandra data centers and their properties. */ -export interface ListDataCenters { - /** - * Container for array of data centers. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly value?: DataCenterResource[]; -} - -/** Properties of a managed Cassandra data center. */ -export interface DataCenterResourceProperties { - /** The status of the resource at the time the operation was called. */ - provisioningState?: ManagedCassandraProvisioningState; - /** The region this data center should be created in. */ - dataCenterLocation?: string; - /** Resource id of a subnet the nodes in this data center should have their network interfaces connected to. The subnet must be in the same region specified in 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's 'delegatedManagementSubnetId' property. This resource id will be of the form '/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks//subnets/'. */ - delegatedSubnetId?: string; - /** The number of nodes the data center should have. This is the desired number. After it is set, it may take some time for the data center to be scaled to match. To monitor the number of nodes and their status, use the fetchNodeStatus method on the cluster. */ - nodeCount?: number; - /** - * IP addresses for seed nodes in this data center. This is for reference. Generally you will want to use the seedNodes property on the cluster, which aggregates the seed nodes from all data centers in the cluster. + * IP addresses for seed nodes in this data center. This is for reference. Generally you will want to use the seedNodes property on the cluster, which aggregates the seed nodes from all data centers in the cluster. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly seedNodes?: SeedNode[]; @@ -1749,8 +1498,27 @@ export interface DataCenterResourceProperties { diskSku?: string; /** Number of disk used for data centers. Default value is 4. */ diskCapacity?: number; - /** If the azure data center has Availability Zone support, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. */ + /** If the data center has Availability Zone feature, apply it to the Virtual Machine ScaleSet that host the cassandra data center virtual machines. */ availabilityZone?: boolean; + /** Ldap authentication method properties. This feature is in preview. */ + authenticationMethodLdapProperties?: AuthenticationMethodLdapProperties; +} + +/** Ldap authentication method properties. This feature is in preview. */ +export interface AuthenticationMethodLdapProperties { + /** Hostname of the LDAP server. */ + serverHostname?: string; + /** Port of the LDAP server. */ + serverPort?: number; + /** Distinguished name of the look up user account, who can look up user details on authentication. */ + serviceUserDistinguishedName?: string; + /** Password of the look up user. */ + serviceUserPassword?: string; + /** Distinguished name of the object to start the recursive search of users from. */ + searchBaseDistinguishedName?: string; + /** Template to use for searching. Defaults to (cn=%s) where %s will be replaced by the username used to login. */ + searchFilterTemplate?: string; + serverCertificates?: Certificate[]; } /** Properties of a managed Cassandra cluster public status. */ @@ -1807,7 +1575,7 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa hostID?: string; /** The rack this node is part of. */ rack?: string; - /** The timestamp when these statistics were captured. */ + /** The timestamp at which that snapshot of these usage statistics were taken. */ timestamp?: string; /** The amount of disk used, in kB, of the directory /var/lib/cassandra. */ diskUsedKB?: number; @@ -1825,1266 +1593,2719 @@ export interface ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDa cpuUsage?: number; } -/** Configuration values for periodic mode backup */ -export interface PeriodicModeProperties { - /** An integer representing the interval in minutes between two backups */ - backupIntervalInMinutes?: number; - /** An integer representing the time (in hours) that each backup is retained */ - backupRetentionIntervalInHours?: number; - /** Enum to indicate type of backup residency */ - backupStorageRedundancy?: BackupStorageRedundancy; +/** The set of data plane operations permitted through this Role Definition. */ +export interface Privilege { + /** An Azure Cosmos DB Mongo DB Resource. */ + resource?: PrivilegeResource; + /** An array of actions that are allowed. */ + actions?: string[]; } -/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ -export type ProxyResource = Resource & {}; +/** An Azure Cosmos DB Mongo DB Resource. */ +export interface PrivilegeResource { + /** The database name the role is applied. */ + db?: string; + /** The collection name the role is applied. */ + collection?: string; +} -/** The object representing periodic mode backup policy. */ -export type PeriodicModeBackupPolicy = BackupPolicy & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Periodic"; - /** Configuration values for periodic mode backup */ - periodicModeProperties?: PeriodicModeProperties; -}; +/** The set of roles permitted through this Role Definition. */ +export interface Role { + /** The database name the role is applied. */ + db?: string; + /** The role name. */ + role?: string; +} -/** The object representing continuous mode backup policy. */ -export type ContinuousModeBackupPolicy = BackupPolicy & { - /** Polymorphic discriminator, which specifies the different types this object can be */ - type: "Continuous"; -}; +/** Parameters to create and update an Azure Cosmos DB Mongo Role Definition. */ +export interface MongoRoleDefinitionCreateUpdateParameters { + /** A user-friendly name for the Role Definition. Must be unique for the database account. */ + roleName?: string; + /** Indicates whether the Role Definition was built-in or user created. */ + type?: MongoRoleDefinitionType; + /** The database name for which access is being granted for this Role Definition. */ + databaseName?: string; + /** A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege. */ + privileges?: Privilege[]; + /** The set of roles inherited by this Role Definition. */ + roles?: Role[]; +} -/** An Azure Cosmos DB database account. */ -export type DatabaseAccountGetResults = ARMResourceProperties & { - /** Indicates the type of database account. This can only be set at database account creation. */ - kind?: DatabaseAccountKind; - /** Identity for the resource. */ - identity?: ManagedServiceIdentity; +/** The relevant Mongo Role Definitions. */ +export interface MongoRoleDefinitionListResult { /** - * The system meta data relating to this resource. + * List of Mongo Role Definitions and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly systemData?: SystemData; + readonly value?: MongoRoleDefinitionGetResults[]; +} + +/** Parameters to create and update an Azure Cosmos DB Mongo User Definition. */ +export interface MongoUserDefinitionCreateUpdateParameters { + /** The user name for User Definition. */ + userName?: string; + /** The password for User Definition. Response does not contain user password. */ + password?: string; + /** The database name for which access is being granted for this User Definition. */ + databaseName?: string; + /** A custom definition for the USer Definition. */ + customData?: string; + /** The set of roles inherited by the User Definition. */ + roles?: Role[]; + /** The Mongo Auth mechanism. For now, we only support auth mechanism SCRAM-SHA-256. */ + mechanisms?: string; +} + +/** The relevant User Definition. */ +export interface MongoUserDefinitionListResult { /** - * The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. + * List of User Definition and their properties * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: string; + readonly value?: MongoUserDefinitionGetResults[]; +} + +/** A list of notebook workspace resources */ +export interface NotebookWorkspaceListResult { + /** Array of notebook workspace resources */ + value?: NotebookWorkspace[]; +} + +/** The connection info for the given notebook workspace */ +export interface NotebookWorkspaceConnectionInfoResult { /** - * The connection endpoint for the Cosmos DB database account. + * Specifies auth token used for connecting to Notebook server (uses token-based auth). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly documentEndpoint?: string; + readonly authToken?: string; /** - * The offer type for the Cosmos DB database account. Default value: Standard. + * Specifies the endpoint of Notebook server. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly databaseAccountOfferType?: "Standard"; - /** List of IpRules. */ - ipRules?: IpAddressOrRange[]; - /** Flag to indicate whether to enable/disable Virtual Network ACL rules. */ - isVirtualNetworkFilterEnabled?: boolean; - /** Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */ - enableAutomaticFailover?: boolean; - /** The consistency policy for the Cosmos DB database account. */ - consistencyPolicy?: ConsistencyPolicy; - /** List of Cosmos DB capabilities for the account */ - capabilities?: Capability[]; + readonly notebookServerEndpoint?: string; +} + +/** A list of private endpoint connections */ +export interface PrivateEndpointConnectionListResult { + /** Array of private endpoint connections */ + value?: PrivateEndpointConnection[]; +} + +/** A list of private link resources */ +export interface PrivateLinkResourceListResult { + /** Array of private link resources */ + value?: PrivateLinkResource[]; +} + +/** The set of data plane operations permitted through this Role Definition. */ +export interface Permission { + /** An array of data actions that are allowed. */ + dataActions?: string[]; + /** An array of data actions that are denied. */ + notDataActions?: string[]; +} + +/** Parameters to create and update an Azure Cosmos DB SQL Role Definition. */ +export interface SqlRoleDefinitionCreateUpdateParameters { + /** A user-friendly name for the Role Definition. Must be unique for the database account. */ + roleName?: string; + /** Indicates whether the Role Definition was built-in or user created. */ + type?: RoleDefinitionType; + /** A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist. */ + assignableScopes?: string[]; + /** The set of operations allowed through this Role Definition. */ + permissions?: Permission[]; +} + +/** The relevant Role Definitions. */ +export interface SqlRoleDefinitionListResult { /** - * An array that contains the write location for the Cosmos DB account. + * List of Role Definitions and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly writeLocations?: Location[]; + readonly value?: SqlRoleDefinitionGetResults[]; +} + +/** Parameters to create and update an Azure Cosmos DB SQL Role Assignment. */ +export interface SqlRoleAssignmentCreateUpdateParameters { + /** The unique identifier for the associated Role Definition. */ + roleDefinitionId?: string; + /** The data plane resource path for which access is being granted through this Role Assignment. */ + scope?: string; + /** The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. */ + principalId?: string; +} + +/** The relevant Role Assignments. */ +export interface SqlRoleAssignmentListResult { /** - * An array that contains of the read locations enabled for the Cosmos DB account. + * List of Role Assignments and their properties * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly readLocations?: Location[]; + readonly value?: SqlRoleAssignmentGetResults[]; +} + +/** The List operation response, that contains the restorable database accounts and their properties. */ +export interface RestorableDatabaseAccountsListResult { /** - * An array that contains all of the locations enabled for the Cosmos DB account. + * List of restorable database accounts and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly locations?: Location[]; + readonly value?: RestorableDatabaseAccountGetResult[]; +} + +/** A Azure Cosmos DB restorable database account. */ +export interface RestorableDatabaseAccountGetResult { /** - * An array that contains the regions ordered by their failover priorities. + * The unique resource identifier of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly failoverPolicies?: FailoverPolicy[]; - /** List of Virtual Network ACL rules configured for the Cosmos DB account. */ - virtualNetworkRules?: VirtualNetworkRule[]; + readonly id?: string; /** - * List of Private Endpoint Connections configured for the Cosmos DB account. + * The name of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly privateEndpointConnections?: PrivateEndpointConnection[]; - /** Enables the account to write in multiple locations */ - enableMultipleWriteLocations?: boolean; - /** Enables the cassandra connector on the Cosmos DB C* account */ - enableCassandraConnector?: boolean; - /** The cassandra connector offer type for the Cosmos DB database C* account. */ - connectorOffer?: ConnectorOffer; - /** Disable write operations on metadata resources (databases, containers, throughput) via account keys */ - disableKeyBasedMetadataWriteAccess?: boolean; - /** The URI of the key vault */ - keyVaultKeyUri?: string; - /** The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. */ - defaultIdentity?: string; - /** Whether requests from Public Network are allowed */ - publicNetworkAccess?: PublicNetworkAccess; - /** Flag to indicate whether Free Tier is enabled. */ - enableFreeTier?: boolean; - /** API specific properties. */ - apiProperties?: ApiProperties; - /** Flag to indicate whether to enable storage analytics. */ - enableAnalyticalStorage?: boolean; - /** Analytical storage specific properties. */ - analyticalStorageConfiguration?: AnalyticalStorageConfiguration; + readonly name?: string; /** - * A unique identifier assigned to the database account + * The type of Azure resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly instanceId?: string; - /** Enum to indicate the mode of account creation. */ - createMode?: CreateMode; - /** Parameters to indicate the information about the restore. */ - restoreParameters?: RestoreParameters; - /** The object representing the policy for taking backups on an account. */ - backupPolicy?: BackupPolicyUnion; - /** The CORS policy for the Cosmos DB database account. */ - cors?: CorsPolicy[]; - /** Indicates what services are allowed to bypass firewall checks. */ - networkAclBypass?: NetworkAclBypass; - /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ - networkAclBypassResourceIds?: string[]; - /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ - disableLocalAuth?: boolean; - /** The object that represents all properties related to capacity enforcement on an account. */ - capacity?: Capacity; -}; + readonly type?: string; + /** The location of the resource group to which the resource belongs. */ + location?: string; + /** The name of the global database account */ + accountName?: string; + /** The creation time of the restorable database account (ISO-8601 format). */ + creationTime?: Date; + /** The time at which the restorable database account has been deleted (ISO-8601 format). */ + deletionTime?: Date; + /** + * The API type of the restorable database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly apiType?: ApiType; + /** + * List of regions where the of the database account can be restored from. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly restorableLocations?: RestorableLocationResource[]; +} -/** Parameters to create and update Cosmos DB database accounts. */ -export type DatabaseAccountCreateUpdateParameters = ARMResourceProperties & { - /** Indicates the type of database account. This can only be set at database account creation. */ - kind?: DatabaseAccountKind; - /** Identity for the resource. */ - identity?: ManagedServiceIdentity; - /** The consistency policy for the Cosmos DB account. */ - consistencyPolicy?: ConsistencyPolicy; - /** An array that contains the georeplication locations enabled for the Cosmos DB account. */ - locations: Location[]; - /** The offer type for the database */ - databaseAccountOfferType: "Standard"; - /** List of IpRules. */ - ipRules?: IpAddressOrRange[]; - /** Flag to indicate whether to enable/disable Virtual Network ACL rules. */ - isVirtualNetworkFilterEnabled?: boolean; - /** Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */ - enableAutomaticFailover?: boolean; - /** List of Cosmos DB capabilities for the account */ - capabilities?: Capability[]; - /** List of Virtual Network ACL rules configured for the Cosmos DB account. */ - virtualNetworkRules?: VirtualNetworkRule[]; - /** Enables the account to write in multiple locations */ - enableMultipleWriteLocations?: boolean; - /** Enables the cassandra connector on the Cosmos DB C* account */ - enableCassandraConnector?: boolean; - /** The cassandra connector offer type for the Cosmos DB database C* account. */ - connectorOffer?: ConnectorOffer; - /** Disable write operations on metadata resources (databases, containers, throughput) via account keys */ - disableKeyBasedMetadataWriteAccess?: boolean; - /** The URI of the key vault */ - keyVaultKeyUri?: string; - /** The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. */ - defaultIdentity?: string; - /** Whether requests from Public Network are allowed */ - publicNetworkAccess?: PublicNetworkAccess; - /** Flag to indicate whether Free Tier is enabled. */ - enableFreeTier?: boolean; - /** API specific properties. Currently, supported only for MongoDB API. */ - apiProperties?: ApiProperties; - /** Flag to indicate whether to enable storage analytics. */ - enableAnalyticalStorage?: boolean; - /** Analytical storage specific properties. */ - analyticalStorageConfiguration?: AnalyticalStorageConfiguration; - /** Enum to indicate the mode of account creation. */ - createMode?: CreateMode; - /** The object representing the policy for taking backups on an account. */ - backupPolicy?: BackupPolicyUnion; - /** The CORS policy for the Cosmos DB database account. */ - cors?: CorsPolicy[]; - /** Indicates what services are allowed to bypass firewall checks. */ - networkAclBypass?: NetworkAclBypass; - /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ - networkAclBypassResourceIds?: string[]; - /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ - disableLocalAuth?: boolean; - /** Parameters to indicate the information about the restore. */ - restoreParameters?: RestoreParameters; - /** The object that represents all properties related to capacity enforcement on an account. */ - capacity?: Capacity; -}; - -/** An Azure Cosmos DB SQL database. */ -export type SqlDatabaseGetResults = ARMResourceProperties & { - resource?: SqlDatabaseGetPropertiesResource; - options?: SqlDatabaseGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB SQL database. */ -export type SqlDatabaseCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a SQL database */ - resource: SqlDatabaseResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB resource throughput. */ -export type ThroughputSettingsGetResults = ARMResourceProperties & { - resource?: ThroughputSettingsGetPropertiesResource; -}; - -/** Parameters to update Cosmos DB resource throughput. */ -export type ThroughputSettingsUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a resource throughput */ - resource: ThroughputSettingsResource; -}; - -/** An Azure Cosmos DB container. */ -export type SqlContainerGetResults = ARMResourceProperties & { - resource?: SqlContainerGetPropertiesResource; - options?: SqlContainerGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB container. */ -export type SqlContainerCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a container */ - resource: SqlContainerResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB storedProcedure. */ -export type SqlStoredProcedureGetResults = ARMResourceProperties & { - resource?: SqlStoredProcedureGetPropertiesResource; -}; - -/** Parameters to create and update Cosmos DB storedProcedure. */ -export type SqlStoredProcedureCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a storedProcedure */ - resource: SqlStoredProcedureResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB userDefinedFunction. */ -export type SqlUserDefinedFunctionGetResults = ARMResourceProperties & { - resource?: SqlUserDefinedFunctionGetPropertiesResource; -}; - -/** Parameters to create and update Cosmos DB userDefinedFunction. */ -export type SqlUserDefinedFunctionCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a userDefinedFunction */ - resource: SqlUserDefinedFunctionResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB trigger. */ -export type SqlTriggerGetResults = ARMResourceProperties & { - resource?: SqlTriggerGetPropertiesResource; -}; - -/** Parameters to create and update Cosmos DB trigger. */ -export type SqlTriggerCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a trigger */ - resource: SqlTriggerResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB MongoDB database. */ -export type MongoDBDatabaseGetResults = ARMResourceProperties & { - resource?: MongoDBDatabaseGetPropertiesResource; - options?: MongoDBDatabaseGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB MongoDB database. */ -export type MongoDBDatabaseCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a MongoDB database */ - resource: MongoDBDatabaseResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB MongoDB collection. */ -export type MongoDBCollectionGetResults = ARMResourceProperties & { - resource?: MongoDBCollectionGetPropertiesResource; - options?: MongoDBCollectionGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB MongoDB collection. */ -export type MongoDBCollectionCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a MongoDB collection */ - resource: MongoDBCollectionResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB Table. */ -export type TableGetResults = ARMResourceProperties & { - resource?: TableGetPropertiesResource; - options?: TableGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB Table. */ -export type TableCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a Table */ - resource: TableResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB Cassandra keyspace. */ -export type CassandraKeyspaceGetResults = ARMResourceProperties & { - resource?: CassandraKeyspaceGetPropertiesResource; - options?: CassandraKeyspaceGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB Cassandra keyspace. */ -export type CassandraKeyspaceCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a Cassandra keyspace */ - resource: CassandraKeyspaceResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB Cassandra table. */ -export type CassandraTableGetResults = ARMResourceProperties & { - resource?: CassandraTableGetPropertiesResource; - options?: CassandraTableGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB Cassandra table. */ -export type CassandraTableCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a Cassandra table */ - resource: CassandraTableResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB Gremlin database. */ -export type GremlinDatabaseGetResults = ARMResourceProperties & { - resource?: GremlinDatabaseGetPropertiesResource; - options?: GremlinDatabaseGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB Gremlin database. */ -export type GremlinDatabaseCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a Gremlin database */ - resource: GremlinDatabaseResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** An Azure Cosmos DB Gremlin graph. */ -export type GremlinGraphGetResults = ARMResourceProperties & { - resource?: GremlinGraphGetPropertiesResource; - options?: GremlinGraphGetPropertiesOptions; -}; - -/** Parameters to create and update Cosmos DB Gremlin graph. */ -export type GremlinGraphCreateUpdateParameters = ARMResourceProperties & { - /** The standard JSON format of a Gremlin graph */ - resource: GremlinGraphResource; - /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ - options?: CreateUpdateOptions; -}; - -/** The access keys for the given database account. */ -export type DatabaseAccountListKeysResult = DatabaseAccountListReadOnlyKeysResult & { +/** Properties of the regional restorable account. */ +export interface RestorableLocationResource { /** - * Base 64 encoded value of the primary read-write key. + * The location of the regional restorable account. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly primaryMasterKey?: string; + readonly locationName?: string; /** - * Base 64 encoded value of the secondary read-write key. + * The instance id of the regional restorable account. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly secondaryMasterKey?: string; -}; - -/** The metric values for a single partition. */ -export type PartitionMetric = Metric & { + readonly regionalDatabaseAccountInstanceId?: string; /** - * The partition id (GUID identifier) of the metric values. + * The creation time of the regional restorable database account (ISO-8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partitionId?: string; + readonly creationTime?: Date; /** - * The partition key range id (integer identifier) of the metric values. + * The time at which the regional restorable database account has been deleted (ISO-8601 format). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partitionKeyRangeId?: string; -}; + readonly deletionTime?: Date; +} -/** Represents percentile metrics values. */ -export type PercentileMetricValue = MetricValue & { +/** Properties of the regional restorable account. */ +export interface ContinuousBackupRestoreLocation { + /** The name of the continuous backup restore location. */ + location?: string; +} + +/** Backup information of a resource. */ +export interface BackupInformation { /** - * The 10th percentile value for the metric. + * Information about the status of continuous backups. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p10?: number; + readonly continuousBackupInformation?: ContinuousBackupInformation; +} + +/** Information about the status of continuous backups. */ +export interface ContinuousBackupInformation { + /** The latest restorable timestamp for a resource. */ + latestRestorableTimestamp?: string; +} + +/** The List operation response, that contains the SQL database events and their properties. */ +export interface RestorableSqlDatabasesListResult { /** - * The 25th percentile value for the metric. + * List of SQL database events and their properties. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p25?: number; + readonly value?: RestorableSqlDatabaseGetResult[]; +} + +/** An Azure Cosmos DB SQL database event */ +export interface RestorableSqlDatabaseGetResult { /** - * The 50th percentile value for the metric. + * The unique resource Identifier of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p50?: number; + readonly id?: string; /** - * The 75th percentile value for the metric. + * The name of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p75?: number; + readonly name?: string; /** - * The 90th percentile value for the metric. + * The type of Azure resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p90?: number; + readonly type?: string; + /** The resource of an Azure Cosmos DB SQL database event */ + resource?: RestorableSqlDatabasePropertiesResource; +} + +/** The resource of an Azure Cosmos DB SQL database event */ +export interface RestorableSqlDatabasePropertiesResource { /** - * The 95th percentile value for the metric. + * A system generated property. A unique identifier. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p95?: number; + readonly rid?: string; /** - * The 99th percentile value for the metric. + * The operation type of this database event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly p99?: number; -}; - -/** The partition level usage data for a usage request. */ -export type PartitionUsage = Usage & { + readonly operationType?: OperationType; /** - * The partition id (GUID identifier) of the usages. + * The time when this database event happened. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partitionId?: string; + readonly eventTimestamp?: string; /** - * The partition key range id (integer identifier) of the usages. + * The name of the SQL database. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly partitionKeyRangeId?: string; -}; - -export type SqlDatabaseGetPropertiesResource = SqlDatabaseResource & - ExtendedResourceProperties & { - /** A system generated property that specified the addressable path of the collections resource. */ - colls?: string; - /** A system generated property that specifies the addressable path of the users resource. */ - users?: string; - }; - -/** Cosmos DB SQL database resource object */ -export type RestorableSqlDatabasePropertiesResourceDatabase = SqlDatabaseResource & - ExtendedResourceProperties & { - /** - * A system generated property that specified the addressable path of the collections resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly colls?: string; - /** - * A system generated property that specifies the addressable path of the users resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly users?: string; - /** - * A system generated property that specifies the addressable path of the database resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly self?: string; - }; - -export type ThroughputSettingsGetPropertiesResource = ThroughputSettingsResource & - ExtendedResourceProperties & {}; - -export type SqlContainerGetPropertiesResource = SqlContainerResource & - ExtendedResourceProperties & {}; - -export type SqlStoredProcedureGetPropertiesResource = SqlStoredProcedureResource & - ExtendedResourceProperties & {}; - -export type SqlUserDefinedFunctionGetPropertiesResource = SqlUserDefinedFunctionResource & - ExtendedResourceProperties & {}; - -export type SqlTriggerGetPropertiesResource = SqlTriggerResource & - ExtendedResourceProperties & {}; - -export type MongoDBDatabaseGetPropertiesResource = MongoDBDatabaseResource & - ExtendedResourceProperties & {}; - -export type MongoDBCollectionGetPropertiesResource = MongoDBCollectionResource & - ExtendedResourceProperties & {}; - -export type TableGetPropertiesResource = TableResource & - ExtendedResourceProperties & {}; - -export type CassandraKeyspaceGetPropertiesResource = CassandraKeyspaceResource & - ExtendedResourceProperties & {}; - -export type CassandraTableGetPropertiesResource = CassandraTableResource & - ExtendedResourceProperties & {}; - -export type GremlinDatabaseGetPropertiesResource = GremlinDatabaseResource & - ExtendedResourceProperties & {}; - -export type GremlinGraphGetPropertiesResource = GremlinGraphResource & - ExtendedResourceProperties & {}; - -/** Cosmos DB SQL container resource object */ -export type RestorableSqlContainerPropertiesResourceContainer = SqlContainerResource & - ExtendedResourceProperties & { - /** - * A system generated property that specifies the addressable path of the container resource. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly self?: string; - }; - -export type SqlDatabaseGetPropertiesOptions = OptionsResource & {}; - -export type SqlContainerGetPropertiesOptions = OptionsResource & {}; - -export type MongoDBDatabaseGetPropertiesOptions = OptionsResource & {}; - -export type MongoDBCollectionGetPropertiesOptions = OptionsResource & {}; - -export type TableGetPropertiesOptions = OptionsResource & {}; + readonly ownerId?: string; + /** + * The resource ID of the SQL database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; + /** Cosmos DB SQL database resource object */ + database?: RestorableSqlDatabasePropertiesResourceDatabase; +} -export type CassandraKeyspaceGetPropertiesOptions = OptionsResource & {}; +/** The List operation response, that contains the SQL container events and their properties. */ +export interface RestorableSqlContainersListResult { + /** + * List of SQL container events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableSqlContainerGetResult[]; +} -export type CassandraTableGetPropertiesOptions = OptionsResource & {}; +/** An Azure Cosmos DB SQL container event */ +export interface RestorableSqlContainerGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource of an Azure Cosmos DB SQL container event */ + resource?: RestorableSqlContainerPropertiesResource; +} -export type GremlinDatabaseGetPropertiesOptions = OptionsResource & {}; +/** The resource of an Azure Cosmos DB SQL container event */ +export interface RestorableSqlContainerPropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this container event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The when this container event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this SQL container. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this SQL container. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; + /** Cosmos DB SQL container resource object */ + container?: RestorableSqlContainerPropertiesResourceContainer; +} -export type GremlinGraphGetPropertiesOptions = OptionsResource & {}; +/** The List operation response, that contains the restorable SQL resources. */ +export interface RestorableSqlResourcesListResult { + /** + * List of restorable SQL resources, including the database and collection names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DatabaseRestoreResource[]; +} -/** Cosmos DB location get result */ -export type LocationGetResult = ARMProxyResource & { - /** Cosmos DB location metadata */ - properties?: LocationProperties; -}; +/** The List operation response, that contains the MongoDB database events and their properties. */ +export interface RestorableMongodbDatabasesListResult { + /** + * List of MongoDB database events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableMongodbDatabaseGetResult[]; +} -/** A notebook workspace resource */ -export type NotebookWorkspace = ARMProxyResource & { +/** An Azure Cosmos DB MongoDB database event */ +export interface RestorableMongodbDatabaseGetResult { /** - * Specifies the endpoint of Notebook server. + * The unique resource Identifier of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly notebookServerEndpoint?: string; + readonly id?: string; /** - * Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. + * The name of the ARM resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly status?: string; -}; - -/** Parameters to create a notebook workspace resource */ -export type NotebookWorkspaceCreateUpdateParameters = ARMProxyResource & {}; + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource of an Azure Cosmos DB MongoDB database event */ + resource?: RestorableMongodbDatabasePropertiesResource; +} -/** A private link resource */ -export type PrivateLinkResource = ARMProxyResource & { +/** The resource of an Azure Cosmos DB MongoDB database event */ +export interface RestorableMongodbDatabasePropertiesResource { /** - * The private link resource group id. + * A system generated property. A unique identifier. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly groupId?: string; + readonly rid?: string; /** - * The private link resource required member names. + * The operation type of this database event. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requiredMembers?: string[]; + readonly operationType?: OperationType; /** - * The private link resource required zone names. + * The time when this database event happened. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly requiredZoneNames?: string[]; -}; - -/** An Azure Cosmos DB SQL Role Definition. */ -export type SqlRoleDefinitionGetResults = ARMProxyResource & { - /** A user-friendly name for the Role Definition. Must be unique for the database account. */ - roleName?: string; - /** Indicates whether the Role Definition was built-in or user created. */ - typePropertiesType?: RoleDefinitionType; - /** A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist. */ - assignableScopes?: string[]; + readonly eventTimestamp?: string; + /** + * The name of this MongoDB database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this MongoDB database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** The List operation response, that contains the MongoDB collection events and their properties. */ +export interface RestorableMongodbCollectionsListResult { + /** + * List of MongoDB collection events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableMongodbCollectionGetResult[]; +} + +/** An Azure Cosmos DB MongoDB collection event */ +export interface RestorableMongodbCollectionGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource of an Azure Cosmos DB MongoDB collection event */ + resource?: RestorableMongodbCollectionPropertiesResource; +} + +/** The resource of an Azure Cosmos DB MongoDB collection event */ +export interface RestorableMongodbCollectionPropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this collection event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this collection event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this MongoDB collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this MongoDB collection. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** The List operation response, that contains the restorable MongoDB resources. */ +export interface RestorableMongodbResourcesListResult { + /** + * List of restorable MongoDB resources, including the database and collection names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: DatabaseRestoreResource[]; +} + +/** The List operation response, that contains the Gremlin database events and their properties. */ +export interface RestorableGremlinDatabasesListResult { + /** + * List of Gremlin database events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableGremlinDatabaseGetResult[]; +} + +/** An Azure Cosmos DB Gremlin database event */ +export interface RestorableGremlinDatabaseGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource of an Azure Cosmos DB Gremlin database event */ + resource?: RestorableGremlinDatabasePropertiesResource; +} + +/** The resource of an Azure Cosmos DB Gremlin database event */ +export interface RestorableGremlinDatabasePropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this database event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this database event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this Gremlin database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this Gremlin database. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** The List operation response, that contains the Gremlin graph events and their properties. */ +export interface RestorableGremlinGraphsListResult { + /** + * List of Gremlin graph events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableGremlinGraphGetResult[]; +} + +/** An Azure Cosmos DB Gremlin graph event */ +export interface RestorableGremlinGraphGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource of an Azure Cosmos DB Gremlin graph event */ + resource?: RestorableGremlinGraphPropertiesResource; +} + +/** The resource of an Azure Cosmos DB Gremlin graph event */ +export interface RestorableGremlinGraphPropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this graph event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this graph event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this Gremlin graph. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this Gremlin graph. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** The List operation response, that contains the restorable Gremlin resources. */ +export interface RestorableGremlinResourcesListResult { + /** + * List of restorable Gremlin resources, including the gremlin database and graph names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: GremlinDatabaseRestoreResource[]; +} + +/** The List operation response, that contains the Table events and their properties. */ +export interface RestorableTablesListResult { + /** + * List of Table events and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: RestorableTableGetResult[]; +} + +/** An Azure Cosmos DB Table event */ +export interface RestorableTableGetResult { + /** + * The unique resource Identifier of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * The name of the ARM resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The type of Azure resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** The resource of an Azure Cosmos DB Table event */ + resource?: RestorableTablePropertiesResource; +} + +/** The resource of an Azure Cosmos DB Table event */ +export interface RestorableTablePropertiesResource { + /** + * A system generated property. A unique identifier. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly rid?: string; + /** + * The operation type of this table event. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly operationType?: OperationType; + /** + * The time when this table event happened. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventTimestamp?: string; + /** + * The name of this Table. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerId?: string; + /** + * The resource ID of this Table. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly ownerResourceId?: string; +} + +/** List of restorable table names. */ +export interface RestorableTableResourcesListResult { + /** + * List of restorable table names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: string[]; +} + +/** The List operation response, that contains the Service Resource and their properties. */ +export interface ServiceResourceListResult { + /** + * List of Service Resource and their properties. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly value?: ServiceResource[]; +} + +/** Services response resource. */ +export interface ServiceResourceProperties { + /** Polymorphic discriminator, which specifies the different types this object can be */ + serviceType: + | "DataTransfer" + | "SqlDedicatedGateway" + | "GraphAPICompute" + | "MaterializedViewsBuilder"; + /** Describes unknown properties. The value of an unknown property can be of "any" type. */ + [property: string]: any; + /** + * Time of the last state change (ISO-8601 format). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly creationTime?: Date; + /** Instance type for the service. */ + instanceSize?: ServiceSize; + /** Instance count for the service. */ + instanceCount?: number; + /** + * Describes the status of a service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ServiceStatus; +} + +/** Parameters for Create or Update Request for ServiceResource */ +export interface ServiceResourceCreateUpdateParameters { + /** Instance type for the service. */ + instanceSize?: ServiceSize; + /** Instance count for the service. */ + instanceCount?: number; + /** ServiceType for the service. */ + serviceType?: ServiceType; +} + +/** Configuration values for periodic mode backup */ +export interface PeriodicModeProperties { + /** An integer representing the interval in minutes between two backups */ + backupIntervalInMinutes?: number; + /** An integer representing the time (in hours) that each backup is retained */ + backupRetentionIntervalInHours?: number; + /** Enum to indicate type of backup residency */ + backupStorageRedundancy?: BackupStorageRedundancy; +} + +/** Describes the service response property. */ +export interface DataTransferServiceResource { + /** Properties for DataTransferServiceResource. */ + properties?: DataTransferServiceResourceProperties; +} + +/** Resource for a regional service location. */ +export interface RegionalServiceResource { + /** + * The regional service name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * The location name. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly location?: string; + /** + * Describes the status of a service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: ServiceStatus; +} + +/** Describes the service response property for SqlDedicatedGateway. */ +export interface SqlDedicatedGatewayServiceResource { + /** Properties for SqlDedicatedGatewayServiceResource. */ + properties?: SqlDedicatedGatewayServiceResourceProperties; +} + +/** Describes the service response property for GraphAPICompute. */ +export interface GraphAPIComputeServiceResource { + /** Properties for GraphAPIComputeServiceResource. */ + properties?: GraphAPIComputeServiceResourceProperties; +} + +/** Describes the service response property for MaterializedViewsBuilder. */ +export interface MaterializedViewsBuilderServiceResource { + /** Properties for MaterializedViewsBuilderServiceResource. */ + properties?: MaterializedViewsBuilderServiceResourceProperties; +} + +/** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ +export type ProxyResource = Resource & {}; + +/** The object representing periodic mode backup policy. */ +export type PeriodicModeBackupPolicy = BackupPolicy & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Periodic"; + /** Configuration values for periodic mode backup */ + periodicModeProperties?: PeriodicModeProperties; +}; + +/** The object representing continuous mode backup policy. */ +export type ContinuousModeBackupPolicy = BackupPolicy & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + type: "Continuous"; +}; + +/** An Azure Cosmos DB database account. */ +export type DatabaseAccountGetResults = ARMResourceProperties & { + /** Indicates the type of database account. This can only be set at database account creation. */ + kind?: DatabaseAccountKind; + /** + * The system meta data relating to this resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; + /** + * The status of the Cosmos DB account at the time the operation was called. The status can be one of following. 'Creating' – the Cosmos DB account is being created. When an account is in Creating state, only properties that are specified as input for the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – the Cosmos DB account deletion failed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; + /** + * The connection endpoint for the Cosmos DB database account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly documentEndpoint?: string; + /** + * The offer type for the Cosmos DB database account. Default value: Standard. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly databaseAccountOfferType?: "Standard"; + /** List of IpRules. */ + ipRules?: IpAddressOrRange[]; + /** Flag to indicate whether to enable/disable Virtual Network ACL rules. */ + isVirtualNetworkFilterEnabled?: boolean; + /** Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */ + enableAutomaticFailover?: boolean; + /** The consistency policy for the Cosmos DB database account. */ + consistencyPolicy?: ConsistencyPolicy; + /** List of Cosmos DB capabilities for the account */ + capabilities?: Capability[]; + /** + * An array that contains the write location for the Cosmos DB account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly writeLocations?: Location[]; + /** + * An array that contains of the read locations enabled for the Cosmos DB account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly readLocations?: Location[]; + /** + * An array that contains all of the locations enabled for the Cosmos DB account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: Location[]; + /** + * An array that contains the regions ordered by their failover priorities. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly failoverPolicies?: FailoverPolicy[]; + /** List of Virtual Network ACL rules configured for the Cosmos DB account. */ + virtualNetworkRules?: VirtualNetworkRule[]; + /** + * List of Private Endpoint Connections configured for the Cosmos DB account. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly privateEndpointConnections?: PrivateEndpointConnection[]; + /** Enables the account to write in multiple locations */ + enableMultipleWriteLocations?: boolean; + /** Enables the cassandra connector on the Cosmos DB C* account */ + enableCassandraConnector?: boolean; + /** The cassandra connector offer type for the Cosmos DB database C* account. */ + connectorOffer?: ConnectorOffer; + /** Disable write operations on metadata resources (databases, containers, throughput) via account keys */ + disableKeyBasedMetadataWriteAccess?: boolean; + /** The URI of the key vault */ + keyVaultKeyUri?: string; + /** The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. */ + defaultIdentity?: string; + /** Whether requests from Public Network are allowed */ + publicNetworkAccess?: PublicNetworkAccess; + /** Flag to indicate whether Free Tier is enabled. */ + enableFreeTier?: boolean; + /** API specific properties. */ + apiProperties?: ApiProperties; + /** Flag to indicate whether to enable storage analytics. */ + enableAnalyticalStorage?: boolean; + /** Analytical storage specific properties. */ + analyticalStorageConfiguration?: AnalyticalStorageConfiguration; + /** + * A unique identifier assigned to the database account + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly instanceId?: string; + /** Enum to indicate the mode of account creation. */ + createMode?: CreateMode; + /** Parameters to indicate the information about the restore. */ + restoreParameters?: RestoreParameters; + /** The object representing the policy for taking backups on an account. */ + backupPolicy?: BackupPolicyUnion; + /** The CORS policy for the Cosmos DB database account. */ + cors?: CorsPolicy[]; + /** Indicates what services are allowed to bypass firewall checks. */ + networkAclBypass?: NetworkAclBypass; + /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ + networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; + /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ + disableLocalAuth?: boolean; + /** The object that represents all properties related to capacity enforcement on an account. */ + capacity?: Capacity; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; +}; + +/** Parameters to create and update Cosmos DB database accounts. */ +export type DatabaseAccountCreateUpdateParameters = ARMResourceProperties & { + /** Indicates the type of database account. This can only be set at database account creation. */ + kind?: DatabaseAccountKind; + /** The consistency policy for the Cosmos DB account. */ + consistencyPolicy?: ConsistencyPolicy; + /** An array that contains the georeplication locations enabled for the Cosmos DB account. */ + locations: Location[]; + /** The offer type for the database */ + databaseAccountOfferType: "Standard"; + /** List of IpRules. */ + ipRules?: IpAddressOrRange[]; + /** Flag to indicate whether to enable/disable Virtual Network ACL rules. */ + isVirtualNetworkFilterEnabled?: boolean; + /** Enables automatic failover of the write region in the rare event that the region is unavailable due to an outage. Automatic failover will result in a new write region for the account and is chosen based on the failover priorities configured for the account. */ + enableAutomaticFailover?: boolean; + /** List of Cosmos DB capabilities for the account */ + capabilities?: Capability[]; + /** List of Virtual Network ACL rules configured for the Cosmos DB account. */ + virtualNetworkRules?: VirtualNetworkRule[]; + /** Enables the account to write in multiple locations */ + enableMultipleWriteLocations?: boolean; + /** Enables the cassandra connector on the Cosmos DB C* account */ + enableCassandraConnector?: boolean; + /** The cassandra connector offer type for the Cosmos DB database C* account. */ + connectorOffer?: ConnectorOffer; + /** Disable write operations on metadata resources (databases, containers, throughput) via account keys */ + disableKeyBasedMetadataWriteAccess?: boolean; + /** The URI of the key vault */ + keyVaultKeyUri?: string; + /** The default identity for accessing key vault used in features like customer managed keys. The default identity needs to be explicitly set by the users. It can be "FirstPartyIdentity", "SystemAssignedIdentity" and more. */ + defaultIdentity?: string; + /** Whether requests from Public Network are allowed */ + publicNetworkAccess?: PublicNetworkAccess; + /** Flag to indicate whether Free Tier is enabled. */ + enableFreeTier?: boolean; + /** API specific properties. Currently, supported only for MongoDB API. */ + apiProperties?: ApiProperties; + /** Flag to indicate whether to enable storage analytics. */ + enableAnalyticalStorage?: boolean; + /** Analytical storage specific properties. */ + analyticalStorageConfiguration?: AnalyticalStorageConfiguration; + /** Enum to indicate the mode of account creation. */ + createMode?: CreateMode; + /** The object representing the policy for taking backups on an account. */ + backupPolicy?: BackupPolicyUnion; + /** The CORS policy for the Cosmos DB database account. */ + cors?: CorsPolicy[]; + /** Indicates what services are allowed to bypass firewall checks. */ + networkAclBypass?: NetworkAclBypass; + /** An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. */ + networkAclBypassResourceIds?: string[]; + /** The Object representing the different Diagnostic log settings for the Cosmos DB Account. */ + diagnosticLogSettings?: DiagnosticLogSettings; + /** Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. */ + disableLocalAuth?: boolean; + /** Parameters to indicate the information about the restore. */ + restoreParameters?: RestoreParameters; + /** The object that represents all properties related to capacity enforcement on an account. */ + capacity?: Capacity; + /** Flag to indicate whether to enable MaterializedViews on the Cosmos DB account */ + enableMaterializedViews?: boolean; +}; + +/** An Azure Cosmos DB Graph resource. */ +export type GraphResourceGetResults = ARMResourceProperties & { + resource?: GraphResourceGetPropertiesResource; + options?: GraphResourceGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Graph resource. */ +export type GraphResourceCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Graph resource */ + resource: GraphResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB SQL database. */ +export type SqlDatabaseGetResults = ARMResourceProperties & { + resource?: SqlDatabaseGetPropertiesResource; + options?: SqlDatabaseGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB SQL database. */ +export type SqlDatabaseCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a SQL database */ + resource: SqlDatabaseResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB resource throughput. */ +export type ThroughputSettingsGetResults = ARMResourceProperties & { + resource?: ThroughputSettingsGetPropertiesResource; +}; + +/** Parameters to update Cosmos DB resource throughput. */ +export type ThroughputSettingsUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a resource throughput */ + resource: ThroughputSettingsResource; +}; + +/** An Azure Cosmos DB container. */ +export type SqlContainerGetResults = ARMResourceProperties & { + resource?: SqlContainerGetPropertiesResource; + options?: SqlContainerGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB container. */ +export type SqlContainerCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a container */ + resource: SqlContainerResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB storedProcedure. */ +export type SqlStoredProcedureGetResults = ARMResourceProperties & { + resource?: SqlStoredProcedureGetPropertiesResource; +}; + +/** Parameters to create and update Cosmos DB storedProcedure. */ +export type SqlStoredProcedureCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a storedProcedure */ + resource: SqlStoredProcedureResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB userDefinedFunction. */ +export type SqlUserDefinedFunctionGetResults = ARMResourceProperties & { + resource?: SqlUserDefinedFunctionGetPropertiesResource; +}; + +/** Parameters to create and update Cosmos DB userDefinedFunction. */ +export type SqlUserDefinedFunctionCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a userDefinedFunction */ + resource: SqlUserDefinedFunctionResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB trigger. */ +export type SqlTriggerGetResults = ARMResourceProperties & { + resource?: SqlTriggerGetPropertiesResource; +}; + +/** Parameters to create and update Cosmos DB trigger. */ +export type SqlTriggerCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a trigger */ + resource: SqlTriggerResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB MongoDB database. */ +export type MongoDBDatabaseGetResults = ARMResourceProperties & { + resource?: MongoDBDatabaseGetPropertiesResource; + options?: MongoDBDatabaseGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB MongoDB database. */ +export type MongoDBDatabaseCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a MongoDB database */ + resource: MongoDBDatabaseResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB MongoDB collection. */ +export type MongoDBCollectionGetResults = ARMResourceProperties & { + resource?: MongoDBCollectionGetPropertiesResource; + options?: MongoDBCollectionGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB MongoDB collection. */ +export type MongoDBCollectionCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a MongoDB collection */ + resource: MongoDBCollectionResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB Table. */ +export type TableGetResults = ARMResourceProperties & { + resource?: TableGetPropertiesResource; + options?: TableGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Table. */ +export type TableCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Table */ + resource: TableResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB Cassandra keyspace. */ +export type CassandraKeyspaceGetResults = ARMResourceProperties & { + resource?: CassandraKeyspaceGetPropertiesResource; + options?: CassandraKeyspaceGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Cassandra keyspace. */ +export type CassandraKeyspaceCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Cassandra keyspace */ + resource: CassandraKeyspaceResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB Cassandra table. */ +export type CassandraTableGetResults = ARMResourceProperties & { + resource?: CassandraTableGetPropertiesResource; + options?: CassandraTableGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Cassandra table. */ +export type CassandraTableCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Cassandra table */ + resource: CassandraTableResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB Gremlin database. */ +export type GremlinDatabaseGetResults = ARMResourceProperties & { + resource?: GremlinDatabaseGetPropertiesResource; + options?: GremlinDatabaseGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Gremlin database. */ +export type GremlinDatabaseCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Gremlin database */ + resource: GremlinDatabaseResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB Gremlin graph. */ +export type GremlinGraphGetResults = ARMResourceProperties & { + resource?: GremlinGraphGetPropertiesResource; + options?: GremlinGraphGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Gremlin graph. */ +export type GremlinGraphCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Gremlin graph */ + resource: GremlinGraphResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** An Azure Cosmos DB Cassandra view. */ +export type CassandraViewGetResults = ARMResourceProperties & { + resource?: CassandraViewGetPropertiesResource; + options?: CassandraViewGetPropertiesOptions; +}; + +/** Parameters to create and update Cosmos DB Cassandra view. */ +export type CassandraViewCreateUpdateParameters = ARMResourceProperties & { + /** The standard JSON format of a Cassandra view */ + resource: CassandraViewResource; + /** A key-value pair of options to be applied for the request. This corresponds to the headers sent with the request. */ + options?: CreateUpdateOptions; +}; + +/** The access keys for the given database account. */ +export type DatabaseAccountListKeysResult = DatabaseAccountListReadOnlyKeysResult & { + /** + * Base 64 encoded value of the primary read-write key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly primaryMasterKey?: string; + /** + * Base 64 encoded value of the secondary read-write key. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly secondaryMasterKey?: string; +}; + +/** The metric values for a single partition. */ +export type PartitionMetric = Metric & { + /** + * The partition id (GUID identifier) of the metric values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partitionId?: string; + /** + * The partition key range id (integer identifier) of the metric values. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partitionKeyRangeId?: string; +}; + +/** Represents percentile metrics values. */ +export type PercentileMetricValue = MetricValue & { + /** + * The 10th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p10?: number; + /** + * The 25th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p25?: number; + /** + * The 50th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p50?: number; + /** + * The 75th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p75?: number; + /** + * The 90th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p90?: number; + /** + * The 95th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p95?: number; + /** + * The 99th percentile value for the metric. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly p99?: number; +}; + +/** The partition level usage data for a usage request. */ +export type PartitionUsage = Usage & { + /** + * The partition id (GUID identifier) of the usages. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partitionId?: string; + /** + * The partition key range id (integer identifier) of the usages. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly partitionKeyRangeId?: string; +}; + +export type GraphResourceGetPropertiesResource = GraphResource & {}; + +export type GraphResourceGetPropertiesOptions = OptionsResource & {}; + +export type SqlDatabaseGetPropertiesOptions = OptionsResource & {}; + +export type SqlContainerGetPropertiesOptions = OptionsResource & {}; + +export type MongoDBDatabaseGetPropertiesOptions = OptionsResource & {}; + +export type MongoDBCollectionGetPropertiesOptions = OptionsResource & {}; + +export type TableGetPropertiesOptions = OptionsResource & {}; + +export type CassandraKeyspaceGetPropertiesOptions = OptionsResource & {}; + +export type CassandraTableGetPropertiesOptions = OptionsResource & {}; + +export type GremlinDatabaseGetPropertiesOptions = OptionsResource & {}; + +export type GremlinGraphGetPropertiesOptions = OptionsResource & {}; + +export type CassandraViewGetPropertiesOptions = OptionsResource & {}; + +export type SqlDatabaseGetPropertiesResource = SqlDatabaseResource & + ExtendedResourceProperties & { + /** A system generated property that specified the addressable path of the collections resource. */ + colls?: string; + /** A system generated property that specifies the addressable path of the users resource. */ + users?: string; + }; + +/** Cosmos DB SQL database resource object */ +export type RestorableSqlDatabasePropertiesResourceDatabase = SqlDatabaseResource & + ExtendedResourceProperties & { + /** + * A system generated property that specified the addressable path of the collections resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly colls?: string; + /** + * A system generated property that specifies the addressable path of the users resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly users?: string; + /** + * A system generated property that specifies the addressable path of the database resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly self?: string; + }; + +export type ThroughputSettingsGetPropertiesResource = ThroughputSettingsResource & + ExtendedResourceProperties & {}; + +export type ClientEncryptionKeyGetPropertiesResource = ClientEncryptionKeyResource & + ExtendedResourceProperties & {}; + +export type SqlContainerGetPropertiesResource = SqlContainerResource & + ExtendedResourceProperties & {}; + +export type SqlStoredProcedureGetPropertiesResource = SqlStoredProcedureResource & + ExtendedResourceProperties & {}; + +export type SqlUserDefinedFunctionGetPropertiesResource = SqlUserDefinedFunctionResource & + ExtendedResourceProperties & {}; + +export type SqlTriggerGetPropertiesResource = SqlTriggerResource & + ExtendedResourceProperties & {}; + +export type MongoDBDatabaseGetPropertiesResource = MongoDBDatabaseResource & + ExtendedResourceProperties & {}; + +export type MongoDBCollectionGetPropertiesResource = MongoDBCollectionResource & + ExtendedResourceProperties & {}; + +export type TableGetPropertiesResource = TableResource & + ExtendedResourceProperties & {}; + +export type CassandraKeyspaceGetPropertiesResource = CassandraKeyspaceResource & + ExtendedResourceProperties & {}; + +export type CassandraTableGetPropertiesResource = CassandraTableResource & + ExtendedResourceProperties & {}; + +export type GremlinDatabaseGetPropertiesResource = GremlinDatabaseResource & + ExtendedResourceProperties & {}; + +export type GremlinGraphGetPropertiesResource = GremlinGraphResource & + ExtendedResourceProperties & {}; + +export type CassandraViewGetPropertiesResource = CassandraViewResource & + ExtendedResourceProperties & {}; + +/** Cosmos DB SQL container resource object */ +export type RestorableSqlContainerPropertiesResourceContainer = SqlContainerResource & + ExtendedResourceProperties & { + /** + * A system generated property that specifies the addressable path of the container resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly self?: string; + }; + +/** Client Encryption Key. */ +export type ClientEncryptionKeyGetResults = ARMProxyResource & { + resource?: ClientEncryptionKeyGetPropertiesResource; +}; + +/** Cosmos DB location get result */ +export type LocationGetResult = ARMProxyResource & { + /** Cosmos DB location metadata */ + properties?: LocationProperties; +}; + +/** Parameters to create Data Transfer Job */ +export type CreateJobRequest = ARMProxyResource & { + /** Data Transfer Create Job Properties */ + properties: DataTransferJobProperties; +}; + +/** A Cosmos DB Data Transfer Job */ +export type DataTransferJobGetResults = ARMProxyResource & { + /** + * Job Name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly jobName?: string; + /** Source DataStore details */ + source?: DataTransferDataSourceSinkUnion; + /** Destination DataStore details */ + destination?: DataTransferDataSourceSinkUnion; + /** + * Job Status + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; + /** + * Percentage of completion. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly percentageComplete?: number; + /** + * Last Updated Time (ISO-8601 format). + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly lastUpdatedUtcTime?: Date; + /** Worker count */ + workerCount?: number; + /** + * Error response for Faulted job + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly error?: ErrorResponse; +}; + +/** A restorable backup of a Cassandra cluster. */ +export type BackupResource = ARMProxyResource & { + properties?: BackupResourceProperties; +}; + +/** A managed Cassandra data center. */ +export type DataCenterResource = ARMProxyResource & { + /** Properties of a managed Cassandra data center. */ + properties?: DataCenterResourceProperties; +}; + +/** An Azure Cosmos DB Mongo Role Definition. */ +export type MongoRoleDefinitionGetResults = ARMProxyResource & { + /** A user-friendly name for the Role Definition. Must be unique for the database account. */ + roleName?: string; + /** Indicates whether the Role Definition was built-in or user created. */ + typePropertiesType?: MongoRoleDefinitionType; + /** The database name for which access is being granted for this Role Definition. */ + databaseName?: string; + /** A set of privileges contained by the Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Scopes higher than Database are not enforceable as privilege. */ + privileges?: Privilege[]; + /** The set of roles inherited by this Role Definition. */ + roles?: Role[]; +}; + +/** An Azure Cosmos DB User Definition */ +export type MongoUserDefinitionGetResults = ARMProxyResource & { + /** The user name for User Definition. */ + userName?: string; + /** The password for User Definition. Response does not contain user password. */ + password?: string; + /** The database name for which access is being granted for this User Definition. */ + databaseName?: string; + /** A custom definition for the USer Definition. */ + customData?: string; + /** The set of roles inherited by the User Definition. */ + roles?: Role[]; + /** The Mongo Auth mechanism. For now, we only support auth mechanism SCRAM-SHA-256. */ + mechanisms?: string; +}; + +/** A notebook workspace resource */ +export type NotebookWorkspace = ARMProxyResource & { + /** + * Specifies the endpoint of Notebook server. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly notebookServerEndpoint?: string; + /** + * Status of the notebook workspace. Possible values are: Creating, Online, Deleting, Failed, Updating. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly status?: string; +}; + +/** Parameters to create a notebook workspace resource */ +export type NotebookWorkspaceCreateUpdateParameters = ARMProxyResource & {}; + +/** A private link resource */ +export type PrivateLinkResource = ARMProxyResource & { + /** + * The private link resource group id. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredMembers?: string[]; + /** + * The private link resource required zone names. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly requiredZoneNames?: string[]; +}; + +/** An Azure Cosmos DB SQL Role Definition. */ +export type SqlRoleDefinitionGetResults = ARMProxyResource & { + /** A user-friendly name for the Role Definition. Must be unique for the database account. */ + roleName?: string; + /** Indicates whether the Role Definition was built-in or user created. */ + typePropertiesType?: RoleDefinitionType; + /** A set of fully qualified Scopes at or below which Role Assignments may be created using this Role Definition. This will allow application of this Role Definition on the entire database account or any underlying Database / Collection. Must have at least one element. Scopes higher than Database account are not enforceable as assignable Scopes. Note that resources referenced in assignable Scopes need not exist. */ + assignableScopes?: string[]; /** The set of operations allowed through this Role Definition. */ permissions?: Permission[]; }; -/** An Azure Cosmos DB Role Assignment */ -export type SqlRoleAssignmentGetResults = ARMProxyResource & { - /** The unique identifier for the associated Role Definition. */ - roleDefinitionId?: string; - /** The data plane resource path for which access is being granted through this Role Assignment. */ - scope?: string; - /** The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. */ - principalId?: string; -}; +/** An Azure Cosmos DB Role Assignment */ +export type SqlRoleAssignmentGetResults = ARMProxyResource & { + /** The unique identifier for the associated Role Definition. */ + roleDefinitionId?: string; + /** The data plane resource path for which access is being granted through this Role Assignment. */ + scope?: string; + /** The unique identifier for the associated AAD principal in the AAD graph to which access is being granted through this Role Assignment. Tenant ID for the principal is inferred using the tenant associated with the subscription. */ + principalId?: string; +}; + +/** Properties for the database account. */ +export type ServiceResource = ARMProxyResource & { + /** Services response resource. */ + properties?: ServiceResourcePropertiesUnion; +}; + +/** A CosmosDB Cassandra API data source/sink */ +export type CosmosCassandraDataTransferDataSourceSink = DataTransferDataSourceSink & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBCassandra"; + keyspaceName: string; + tableName: string; +}; + +/** A CosmosDB Cassandra API data source/sink */ +export type CosmosSqlDataTransferDataSourceSink = DataTransferDataSourceSink & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "CosmosDBSql"; + databaseName: string; + containerName: string; +}; + +/** An Azure Blob Storage data source/sink */ +export type AzureBlobDataTransferDataSourceSink = DataTransferDataSourceSink & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + component: "AzureBlobStorage"; + containerName: string; + endpointUrl?: string; +}; + +/** Representation of a managed Cassandra cluster. */ +export type ClusterResource = ManagedCassandraARMResourceProperties & { + /** Properties of a managed Cassandra cluster. */ + properties?: ClusterResourceProperties; +}; + +/** Properties for DataTransferServiceResource. */ +export type DataTransferServiceResourceProperties = ServiceResourceProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + serviceType: "DataTransfer"; + /** + * An array that contains all of the locations for the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: DataTransferRegionalServiceResource[]; +}; + +/** Properties for SqlDedicatedGatewayServiceResource. */ +export type SqlDedicatedGatewayServiceResourceProperties = ServiceResourceProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + serviceType: "SqlDedicatedGateway"; + /** SqlDedicatedGateway endpoint for the service. */ + sqlDedicatedGatewayEndpoint?: string; + /** + * An array that contains all of the locations for the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: SqlDedicatedGatewayRegionalServiceResource[]; +}; + +/** Properties for GraphAPIComputeServiceResource. */ +export type GraphAPIComputeServiceResourceProperties = ServiceResourceProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + serviceType: "GraphAPICompute"; + /** GraphAPICompute endpoint for the service. */ + graphApiComputeEndpoint?: string; + /** + * An array that contains all of the locations for the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: GraphAPIComputeRegionalServiceResource[]; +}; + +/** Properties for MaterializedViewsBuilderServiceResource. */ +export type MaterializedViewsBuilderServiceResourceProperties = ServiceResourceProperties & { + /** Polymorphic discriminator, which specifies the different types this object can be */ + serviceType: "MaterializedViewsBuilder"; + /** + * An array that contains all of the locations for the service. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly locations?: MaterializedViewsBuilderRegionalServiceResource[]; +}; + +/** Resource for a regional service location. */ +export type DataTransferRegionalServiceResource = RegionalServiceResource & {}; + +/** Resource for a regional service location. */ +export type SqlDedicatedGatewayRegionalServiceResource = RegionalServiceResource & { + /** + * The regional endpoint for SqlDedicatedGateway. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sqlDedicatedGatewayEndpoint?: string; +}; + +/** Resource for a regional service location. */ +export type GraphAPIComputeRegionalServiceResource = RegionalServiceResource & { + /** + * The regional endpoint for GraphAPICompute. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly graphApiComputeEndpoint?: string; +}; + +/** Resource for a regional service location. */ +export type MaterializedViewsBuilderRegionalServiceResource = RegionalServiceResource & {}; + +/** A private endpoint connection */ +export type PrivateEndpointConnection = ProxyResource & { + /** Private endpoint which the connection belongs to. */ + privateEndpoint?: PrivateEndpointProperty; + /** Connection State of the Private Endpoint Connection. */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + /** Group id of the private endpoint. */ + groupId?: string; + /** Provisioning state of the private endpoint. */ + provisioningState?: string; +}; + +/** Known values of {@link DatabaseAccountKind} that the service accepts. */ +export enum KnownDatabaseAccountKind { + GlobalDocumentDB = "GlobalDocumentDB", + MongoDB = "MongoDB", + Parse = "Parse" +} + +/** + * Defines values for DatabaseAccountKind. \ + * {@link KnownDatabaseAccountKind} can be used interchangeably with DatabaseAccountKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **GlobalDocumentDB** \ + * **MongoDB** \ + * **Parse** + */ +export type DatabaseAccountKind = string; + +/** Known values of {@link ConnectorOffer} that the service accepts. */ +export enum KnownConnectorOffer { + Small = "Small" +} + +/** + * Defines values for ConnectorOffer. \ + * {@link KnownConnectorOffer} can be used interchangeably with ConnectorOffer, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Small** + */ +export type ConnectorOffer = string; + +/** Known values of {@link PublicNetworkAccess} that the service accepts. */ +export enum KnownPublicNetworkAccess { + Enabled = "Enabled", + Disabled = "Disabled" +} + +/** + * Defines values for PublicNetworkAccess. \ + * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Enabled** \ + * **Disabled** + */ +export type PublicNetworkAccess = string; + +/** Known values of {@link ServerVersion} that the service accepts. */ +export enum KnownServerVersion { + Three2 = "3.2", + Three6 = "3.6", + Four0 = "4.0" +} + +/** + * Defines values for ServerVersion. \ + * {@link KnownServerVersion} can be used interchangeably with ServerVersion, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **3.2** \ + * **3.6** \ + * **4.0** + */ +export type ServerVersion = string; + +/** Known values of {@link AnalyticalStorageSchemaType} that the service accepts. */ +export enum KnownAnalyticalStorageSchemaType { + WellDefined = "WellDefined", + FullFidelity = "FullFidelity" +} + +/** + * Defines values for AnalyticalStorageSchemaType. \ + * {@link KnownAnalyticalStorageSchemaType} can be used interchangeably with AnalyticalStorageSchemaType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **WellDefined** \ + * **FullFidelity** + */ +export type AnalyticalStorageSchemaType = string; + +/** Known values of {@link CreateMode} that the service accepts. */ +export enum KnownCreateMode { + Default = "Default", + Restore = "Restore" +} + +/** + * Defines values for CreateMode. \ + * {@link KnownCreateMode} can be used interchangeably with CreateMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Default** \ + * **Restore** + */ +export type CreateMode = string; + +/** Known values of {@link RestoreMode} that the service accepts. */ +export enum KnownRestoreMode { + PointInTime = "PointInTime" +} + +/** + * Defines values for RestoreMode. \ + * {@link KnownRestoreMode} can be used interchangeably with RestoreMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **PointInTime** + */ +export type RestoreMode = string; + +/** Known values of {@link BackupPolicyType} that the service accepts. */ +export enum KnownBackupPolicyType { + Periodic = "Periodic", + Continuous = "Continuous" +} + +/** + * Defines values for BackupPolicyType. \ + * {@link KnownBackupPolicyType} can be used interchangeably with BackupPolicyType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Periodic** \ + * **Continuous** + */ +export type BackupPolicyType = string; + +/** Known values of {@link BackupPolicyMigrationStatus} that the service accepts. */ +export enum KnownBackupPolicyMigrationStatus { + Invalid = "Invalid", + InProgress = "InProgress", + Completed = "Completed", + Failed = "Failed" +} + +/** + * Defines values for BackupPolicyMigrationStatus. \ + * {@link KnownBackupPolicyMigrationStatus} can be used interchangeably with BackupPolicyMigrationStatus, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Invalid** \ + * **InProgress** \ + * **Completed** \ + * **Failed** + */ +export type BackupPolicyMigrationStatus = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** Known values of {@link KeyKind} that the service accepts. */ +export enum KnownKeyKind { + Primary = "primary", + Secondary = "secondary", + PrimaryReadonly = "primaryReadonly", + SecondaryReadonly = "secondaryReadonly" +} + +/** + * Defines values for KeyKind. \ + * {@link KnownKeyKind} can be used interchangeably with KeyKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **primary** \ + * **secondary** \ + * **primaryReadonly** \ + * **secondaryReadonly** + */ +export type KeyKind = string; + +/** Known values of {@link UnitType} that the service accepts. */ +export enum KnownUnitType { + Count = "Count", + Bytes = "Bytes", + Seconds = "Seconds", + Percent = "Percent", + CountPerSecond = "CountPerSecond", + BytesPerSecond = "BytesPerSecond", + Milliseconds = "Milliseconds" +} + +/** + * Defines values for UnitType. \ + * {@link KnownUnitType} can be used interchangeably with UnitType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Count** \ + * **Bytes** \ + * **Seconds** \ + * **Percent** \ + * **CountPerSecond** \ + * **BytesPerSecond** \ + * **Milliseconds** + */ +export type UnitType = string; + +/** Known values of {@link PrimaryAggregationType} that the service accepts. */ +export enum KnownPrimaryAggregationType { + None = "None", + Average = "Average", + Total = "Total", + Minimum = "Minimum", + Maximum = "Maximum", + Last = "Last" +} + +/** + * Defines values for PrimaryAggregationType. \ + * {@link KnownPrimaryAggregationType} can be used interchangeably with PrimaryAggregationType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **None** \ + * **Average** \ + * **Total** \ + * **Minimum** \ + * **Maximum** \ + * **Last** + */ +export type PrimaryAggregationType = string; + +/** Known values of {@link IndexingMode} that the service accepts. */ +export enum KnownIndexingMode { + Consistent = "consistent", + Lazy = "lazy", + None = "none" +} + +/** + * Defines values for IndexingMode. \ + * {@link KnownIndexingMode} can be used interchangeably with IndexingMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **consistent** \ + * **lazy** \ + * **none** + */ +export type IndexingMode = string; + +/** Known values of {@link DataType} that the service accepts. */ +export enum KnownDataType { + String = "String", + Number = "Number", + Point = "Point", + Polygon = "Polygon", + LineString = "LineString", + MultiPolygon = "MultiPolygon" +} + +/** + * Defines values for DataType. \ + * {@link KnownDataType} can be used interchangeably with DataType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **String** \ + * **Number** \ + * **Point** \ + * **Polygon** \ + * **LineString** \ + * **MultiPolygon** + */ +export type DataType = string; + +/** Known values of {@link IndexKind} that the service accepts. */ +export enum KnownIndexKind { + Hash = "Hash", + Range = "Range", + Spatial = "Spatial" +} + +/** + * Defines values for IndexKind. \ + * {@link KnownIndexKind} can be used interchangeably with IndexKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Hash** \ + * **Range** \ + * **Spatial** + */ +export type IndexKind = string; + +/** Known values of {@link CompositePathSortOrder} that the service accepts. */ +export enum KnownCompositePathSortOrder { + Ascending = "ascending", + Descending = "descending" +} + +/** + * Defines values for CompositePathSortOrder. \ + * {@link KnownCompositePathSortOrder} can be used interchangeably with CompositePathSortOrder, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **ascending** \ + * **descending** + */ +export type CompositePathSortOrder = string; + +/** Known values of {@link SpatialType} that the service accepts. */ +export enum KnownSpatialType { + Point = "Point", + LineString = "LineString", + Polygon = "Polygon", + MultiPolygon = "MultiPolygon" +} + +/** + * Defines values for SpatialType. \ + * {@link KnownSpatialType} can be used interchangeably with SpatialType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Point** \ + * **LineString** \ + * **Polygon** \ + * **MultiPolygon** + */ +export type SpatialType = string; + +/** Known values of {@link PartitionKind} that the service accepts. */ +export enum KnownPartitionKind { + Hash = "Hash", + Range = "Range", + MultiHash = "MultiHash" +} + +/** + * Defines values for PartitionKind. \ + * {@link KnownPartitionKind} can be used interchangeably with PartitionKind, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Hash** \ + * **Range** \ + * **MultiHash** + */ +export type PartitionKind = string; + +/** Known values of {@link ConflictResolutionMode} that the service accepts. */ +export enum KnownConflictResolutionMode { + LastWriterWins = "LastWriterWins", + Custom = "Custom" +} + +/** + * Defines values for ConflictResolutionMode. \ + * {@link KnownConflictResolutionMode} can be used interchangeably with ConflictResolutionMode, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **LastWriterWins** \ + * **Custom** + */ +export type ConflictResolutionMode = string; + +/** Known values of {@link TriggerType} that the service accepts. */ +export enum KnownTriggerType { + Pre = "Pre", + Post = "Post" +} -/** A managed Cassandra data center. */ -export type DataCenterResource = ARMProxyResource & { - /** Properties of a managed Cassandra data center. */ - properties?: DataCenterResourceProperties; -}; +/** + * Defines values for TriggerType. \ + * {@link KnownTriggerType} can be used interchangeably with TriggerType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Pre** \ + * **Post** + */ +export type TriggerType = string; -/** Representation of a managed Cassandra cluster. */ -export type ClusterResource = ManagedCassandraARMResourceProperties & { - /** Properties of a managed Cassandra cluster. */ - properties?: ClusterResourceProperties; -}; +/** Known values of {@link TriggerOperation} that the service accepts. */ +export enum KnownTriggerOperation { + All = "All", + Create = "Create", + Update = "Update", + Delete = "Delete", + Replace = "Replace" +} -/** A private endpoint connection */ -export type PrivateEndpointConnection = ProxyResource & { - /** Private endpoint which the connection belongs to. */ - privateEndpoint?: PrivateEndpointProperty; - /** Connection State of the Private Endpoint Connection. */ - privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; - /** Group id of the private endpoint. */ - groupId?: string; - /** Provisioning state of the private endpoint. */ - provisioningState?: string; -}; +/** + * Defines values for TriggerOperation. \ + * {@link KnownTriggerOperation} can be used interchangeably with TriggerOperation, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **All** \ + * **Create** \ + * **Update** \ + * **Delete** \ + * **Replace** + */ +export type TriggerOperation = string; -/** Known values of {@link DatabaseAccountKind} that the service accepts. */ -export enum KnownDatabaseAccountKind { - GlobalDocumentDB = "GlobalDocumentDB", - MongoDB = "MongoDB", - Parse = "Parse" +/** Known values of {@link BackupStorageRedundancy} that the service accepts. */ +export enum KnownBackupStorageRedundancy { + Geo = "Geo", + Local = "Local", + Zone = "Zone" } /** - * Defines values for DatabaseAccountKind. \ - * {@link KnownDatabaseAccountKind} can be used interchangeably with DatabaseAccountKind, + * Defines values for BackupStorageRedundancy. \ + * {@link KnownBackupStorageRedundancy} can be used interchangeably with BackupStorageRedundancy, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **GlobalDocumentDB** \ - * **MongoDB** \ - * **Parse** + * **Geo** \ + * **Local** \ + * **Zone** */ -export type DatabaseAccountKind = string; +export type BackupStorageRedundancy = string; -/** Known values of {@link ConnectorOffer} that the service accepts. */ -export enum KnownConnectorOffer { - Small = "Small" +/** Known values of {@link DataTransferComponent} that the service accepts. */ +export enum KnownDataTransferComponent { + CosmosDBCassandra = "CosmosDBCassandra", + CosmosDBSql = "CosmosDBSql", + AzureBlobStorage = "AzureBlobStorage" } /** - * Defines values for ConnectorOffer. \ - * {@link KnownConnectorOffer} can be used interchangeably with ConnectorOffer, + * Defines values for DataTransferComponent. \ + * {@link KnownDataTransferComponent} can be used interchangeably with DataTransferComponent, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Small** + * **CosmosDBCassandra** \ + * **CosmosDBSql** \ + * **AzureBlobStorage** */ -export type ConnectorOffer = string; +export type DataTransferComponent = string; -/** Known values of {@link PublicNetworkAccess} that the service accepts. */ -export enum KnownPublicNetworkAccess { - Enabled = "Enabled", - Disabled = "Disabled" +/** Known values of {@link ManagedCassandraProvisioningState} that the service accepts. */ +export enum KnownManagedCassandraProvisioningState { + Creating = "Creating", + Updating = "Updating", + Deleting = "Deleting", + Succeeded = "Succeeded", + Failed = "Failed", + Canceled = "Canceled" } /** - * Defines values for PublicNetworkAccess. \ - * {@link KnownPublicNetworkAccess} can be used interchangeably with PublicNetworkAccess, + * Defines values for ManagedCassandraProvisioningState. \ + * {@link KnownManagedCassandraProvisioningState} can be used interchangeably with ManagedCassandraProvisioningState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Enabled** \ - * **Disabled** + * **Creating** \ + * **Updating** \ + * **Deleting** \ + * **Succeeded** \ + * **Failed** \ + * **Canceled** */ -export type PublicNetworkAccess = string; +export type ManagedCassandraProvisioningState = string; -/** Known values of {@link ServerVersion} that the service accepts. */ -export enum KnownServerVersion { - Three2 = "3.2", - Three6 = "3.6", - Four0 = "4.0" +/** Known values of {@link AuthenticationMethod} that the service accepts. */ +export enum KnownAuthenticationMethod { + None = "None", + Cassandra = "Cassandra", + Ldap = "Ldap" } /** - * Defines values for ServerVersion. \ - * {@link KnownServerVersion} can be used interchangeably with ServerVersion, + * Defines values for AuthenticationMethod. \ + * {@link KnownAuthenticationMethod} can be used interchangeably with AuthenticationMethod, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **3.2** \ - * **3.6** \ - * **4.0** + * **None** \ + * **Cassandra** \ + * **Ldap** */ -export type ServerVersion = string; +export type AuthenticationMethod = string; -/** Known values of {@link AnalyticalStorageSchemaType} that the service accepts. */ -export enum KnownAnalyticalStorageSchemaType { - WellDefined = "WellDefined", - FullFidelity = "FullFidelity" +/** Known values of {@link ManagedCassandraResourceIdentityType} that the service accepts. */ +export enum KnownManagedCassandraResourceIdentityType { + SystemAssigned = "SystemAssigned", + None = "None" } /** - * Defines values for AnalyticalStorageSchemaType. \ - * {@link KnownAnalyticalStorageSchemaType} can be used interchangeably with AnalyticalStorageSchemaType, + * Defines values for ManagedCassandraResourceIdentityType. \ + * {@link KnownManagedCassandraResourceIdentityType} can be used interchangeably with ManagedCassandraResourceIdentityType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **WellDefined** \ - * **FullFidelity** + * **SystemAssigned** \ + * **None** */ -export type AnalyticalStorageSchemaType = string; +export type ManagedCassandraResourceIdentityType = string; -/** Known values of {@link CreateMode} that the service accepts. */ -export enum KnownCreateMode { - Default = "Default", - Restore = "Restore" +/** Known values of {@link ConnectionState} that the service accepts. */ +export enum KnownConnectionState { + Unknown = "Unknown", + OK = "OK", + OperatorToDataCenterNetworkError = "OperatorToDataCenterNetworkError", + DatacenterToDatacenterNetworkError = "DatacenterToDatacenterNetworkError", + InternalOperatorToDataCenterCertificateError = "InternalOperatorToDataCenterCertificateError", + InternalError = "InternalError" } /** - * Defines values for CreateMode. \ - * {@link KnownCreateMode} can be used interchangeably with CreateMode, + * Defines values for ConnectionState. \ + * {@link KnownConnectionState} can be used interchangeably with ConnectionState, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Default** \ - * **Restore** + * **Unknown** \ + * **OK** \ + * **OperatorToDataCenterNetworkError** \ + * **DatacenterToDatacenterNetworkError** \ + * **InternalOperatorToDataCenterCertificateError** \ + * **InternalError** */ -export type CreateMode = string; +export type ConnectionState = string; -/** Known values of {@link RestoreMode} that the service accepts. */ -export enum KnownRestoreMode { - PointInTime = "PointInTime" +/** Known values of {@link NodeState} that the service accepts. */ +export enum KnownNodeState { + Normal = "Normal", + Leaving = "Leaving", + Joining = "Joining", + Moving = "Moving", + Stopped = "Stopped" +} + +/** + * Defines values for NodeState. \ + * {@link KnownNodeState} can be used interchangeably with NodeState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Normal** \ + * **Leaving** \ + * **Joining** \ + * **Moving** \ + * **Stopped** + */ +export type NodeState = string; + +/** Known values of {@link NotebookWorkspaceName} that the service accepts. */ +export enum KnownNotebookWorkspaceName { + Default = "default" +} + +/** + * Defines values for NotebookWorkspaceName. \ + * {@link KnownNotebookWorkspaceName} can be used interchangeably with NotebookWorkspaceName, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **default** + */ +export type NotebookWorkspaceName = string; + +/** Known values of {@link ApiType} that the service accepts. */ +export enum KnownApiType { + MongoDB = "MongoDB", + Gremlin = "Gremlin", + Cassandra = "Cassandra", + Table = "Table", + Sql = "Sql", + GremlinV2 = "GremlinV2" +} + +/** + * Defines values for ApiType. \ + * {@link KnownApiType} can be used interchangeably with ApiType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **MongoDB** \ + * **Gremlin** \ + * **Cassandra** \ + * **Table** \ + * **Sql** \ + * **GremlinV2** + */ +export type ApiType = string; + +/** Known values of {@link OperationType} that the service accepts. */ +export enum KnownOperationType { + Create = "Create", + Replace = "Replace", + Delete = "Delete", + SystemOperation = "SystemOperation" } /** - * Defines values for RestoreMode. \ - * {@link KnownRestoreMode} can be used interchangeably with RestoreMode, + * Defines values for OperationType. \ + * {@link KnownOperationType} can be used interchangeably with OperationType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **PointInTime** + * **Create** \ + * **Replace** \ + * **Delete** \ + * **SystemOperation** */ -export type RestoreMode = string; +export type OperationType = string; -/** Known values of {@link BackupPolicyType} that the service accepts. */ -export enum KnownBackupPolicyType { - Periodic = "Periodic", - Continuous = "Continuous" +/** Known values of {@link ServiceSize} that the service accepts. */ +export enum KnownServiceSize { + CosmosD4S = "Cosmos.D4s", + CosmosD8S = "Cosmos.D8s", + CosmosD16S = "Cosmos.D16s" } /** - * Defines values for BackupPolicyType. \ - * {@link KnownBackupPolicyType} can be used interchangeably with BackupPolicyType, + * Defines values for ServiceSize. \ + * {@link KnownServiceSize} can be used interchangeably with ServiceSize, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Periodic** \ - * **Continuous** + * **Cosmos.D4s** \ + * **Cosmos.D8s** \ + * **Cosmos.D16s** */ -export type BackupPolicyType = string; +export type ServiceSize = string; -/** Known values of {@link BackupPolicyMigrationStatus} that the service accepts. */ -export enum KnownBackupPolicyMigrationStatus { - Invalid = "Invalid", - InProgress = "InProgress", - Completed = "Completed", - Failed = "Failed" +/** Known values of {@link ServiceType} that the service accepts. */ +export enum KnownServiceType { + SqlDedicatedGateway = "SqlDedicatedGateway", + DataTransfer = "DataTransfer", + GraphAPICompute = "GraphAPICompute", + MaterializedViewsBuilder = "MaterializedViewsBuilder" } /** - * Defines values for BackupPolicyMigrationStatus. \ - * {@link KnownBackupPolicyMigrationStatus} can be used interchangeably with BackupPolicyMigrationStatus, + * Defines values for ServiceType. \ + * {@link KnownServiceType} can be used interchangeably with ServiceType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Invalid** \ - * **InProgress** \ - * **Completed** \ - * **Failed** + * **SqlDedicatedGateway** \ + * **DataTransfer** \ + * **GraphAPICompute** \ + * **MaterializedViewsBuilder** */ -export type BackupPolicyMigrationStatus = string; +export type ServiceType = string; -/** Known values of {@link CreatedByType} that the service accepts. */ -export enum KnownCreatedByType { - User = "User", - Application = "Application", - ManagedIdentity = "ManagedIdentity", - Key = "Key" +/** Known values of {@link ServiceStatus} that the service accepts. */ +export enum KnownServiceStatus { + Creating = "Creating", + Running = "Running", + Updating = "Updating", + Deleting = "Deleting", + Error = "Error", + Stopped = "Stopped" } /** - * Defines values for CreatedByType. \ - * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, + * Defines values for ServiceStatus. \ + * {@link KnownServiceStatus} can be used interchangeably with ServiceStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **User** \ - * **Application** \ - * **ManagedIdentity** \ - * **Key** + * **Creating** \ + * **Running** \ + * **Updating** \ + * **Deleting** \ + * **Error** \ + * **Stopped** */ -export type CreatedByType = string; +export type ServiceStatus = string; -/** Known values of {@link KeyKind} that the service accepts. */ -export enum KnownKeyKind { - Primary = "primary", - Secondary = "secondary", - PrimaryReadonly = "primaryReadonly", - SecondaryReadonly = "secondaryReadonly" +/** Known values of {@link NodeStatus} that the service accepts. */ +export enum KnownNodeStatus { + Up = "Up", + Down = "Down" } /** - * Defines values for KeyKind. \ - * {@link KnownKeyKind} can be used interchangeably with KeyKind, + * Defines values for NodeStatus. \ + * {@link KnownNodeStatus} can be used interchangeably with NodeStatus, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **primary** \ - * **secondary** \ - * **primaryReadonly** \ - * **secondaryReadonly** + * **Up** \ + * **Down** */ -export type KeyKind = string; +export type NodeStatus = string; +/** Defines values for DefaultConsistencyLevel. */ +export type DefaultConsistencyLevel = + | "Eventual" + | "Session" + | "BoundedStaleness" + | "Strong" + | "ConsistentPrefix"; +/** Defines values for NetworkAclBypass. */ +export type NetworkAclBypass = "None" | "AzureServices"; +/** Defines values for EnableFullTextQuery. */ +export type EnableFullTextQuery = "None" | "True" | "False"; +/** Defines values for ResourceIdentityType. */ +export type ResourceIdentityType = + | "SystemAssigned" + | "UserAssigned" + | "SystemAssigned,UserAssigned" + | "None"; +/** Defines values for MongoRoleDefinitionType. */ +export type MongoRoleDefinitionType = "BuiltInRole" | "CustomRole"; +/** Defines values for RoleDefinitionType. */ +export type RoleDefinitionType = "BuiltInRole" | "CustomRole"; + +/** Optional parameters. */ +export interface DatabaseAccountsGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type DatabaseAccountsGetResponse = DatabaseAccountGetResults; + +/** Optional parameters. */ +export interface DatabaseAccountsUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the update operation. */ +export type DatabaseAccountsUpdateResponse = DatabaseAccountGetResults; + +/** Optional parameters. */ +export interface DatabaseAccountsCreateOrUpdateOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the createOrUpdate operation. */ +export type DatabaseAccountsCreateOrUpdateResponse = DatabaseAccountGetResults; + +/** Optional parameters. */ +export interface DatabaseAccountsDeleteOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseAccountsFailoverPriorityChangeOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseAccountsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type DatabaseAccountsListResponse = DatabaseAccountsListResult; + +/** Optional parameters. */ +export interface DatabaseAccountsListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type DatabaseAccountsListByResourceGroupResponse = DatabaseAccountsListResult; + +/** Optional parameters. */ +export interface DatabaseAccountsListKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listKeys operation. */ +export type DatabaseAccountsListKeysResponse = DatabaseAccountListKeysResult; + +/** Optional parameters. */ +export interface DatabaseAccountsListConnectionStringsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listConnectionStrings operation. */ +export type DatabaseAccountsListConnectionStringsResponse = DatabaseAccountListConnectionStringsResult; + +/** Optional parameters. */ +export interface DatabaseAccountsOfflineRegionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseAccountsOnlineRegionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseAccountsGetReadOnlyKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getReadOnlyKeys operation. */ +export type DatabaseAccountsGetReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult; + +/** Optional parameters. */ +export interface DatabaseAccountsListReadOnlyKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listReadOnlyKeys operation. */ +export type DatabaseAccountsListReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult; + +/** Optional parameters. */ +export interface DatabaseAccountsRegenerateKeyOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface DatabaseAccountsCheckNameExistsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the checkNameExists operation. */ +export type DatabaseAccountsCheckNameExistsResponse = { + body: boolean; +}; + +/** Optional parameters. */ +export interface DatabaseAccountsListMetricsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMetrics operation. */ +export type DatabaseAccountsListMetricsResponse = MetricListResult; + +/** Optional parameters. */ +export interface DatabaseAccountsListUsagesOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ + filter?: string; +} + +/** Contains response data for the listUsages operation. */ +export type DatabaseAccountsListUsagesResponse = UsagesResult; + +/** Optional parameters. */ +export interface DatabaseAccountsListMetricDefinitionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMetricDefinitions operation. */ +export type DatabaseAccountsListMetricDefinitionsResponse = MetricDefinitionsListResult; + +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link UnitType} that the service accepts. */ -export enum KnownUnitType { - Count = "Count", - Bytes = "Bytes", - Seconds = "Seconds", - Percent = "Percent", - CountPerSecond = "CountPerSecond", - BytesPerSecond = "BytesPerSecond", - Milliseconds = "Milliseconds" -} +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; -/** - * Defines values for UnitType. \ - * {@link KnownUnitType} can be used interchangeably with UnitType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Count** \ - * **Bytes** \ - * **Seconds** \ - * **Percent** \ - * **CountPerSecond** \ - * **BytesPerSecond** \ - * **Milliseconds** - */ -export type UnitType = string; +/** Optional parameters. */ +export interface DatabaseListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link PrimaryAggregationType} that the service accepts. */ -export enum KnownPrimaryAggregationType { - None = "None", - Average = "Average", - Total = "Total", - Minimum = "Minimum", - Maximum = "Maximum", - Last = "Last" +/** Contains response data for the listMetrics operation. */ +export type DatabaseListMetricsResponse = MetricListResult; + +/** Optional parameters. */ +export interface DatabaseListUsagesOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ + filter?: string; } -/** - * Defines values for PrimaryAggregationType. \ - * {@link KnownPrimaryAggregationType} can be used interchangeably with PrimaryAggregationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Average** \ - * **Total** \ - * **Minimum** \ - * **Maximum** \ - * **Last** - */ -export type PrimaryAggregationType = string; +/** Contains response data for the listUsages operation. */ +export type DatabaseListUsagesResponse = UsagesResult; -/** Known values of {@link IndexingMode} that the service accepts. */ -export enum KnownIndexingMode { - Consistent = "consistent", - Lazy = "lazy", - None = "none" -} +/** Optional parameters. */ +export interface DatabaseListMetricDefinitionsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for IndexingMode. \ - * {@link KnownIndexingMode} can be used interchangeably with IndexingMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **consistent** \ - * **lazy** \ - * **none** - */ -export type IndexingMode = string; +/** Contains response data for the listMetricDefinitions operation. */ +export type DatabaseListMetricDefinitionsResponse = MetricDefinitionsListResult; -/** Known values of {@link DataType} that the service accepts. */ -export enum KnownDataType { - String = "String", - Number = "Number", - Point = "Point", - Polygon = "Polygon", - LineString = "LineString", - MultiPolygon = "MultiPolygon" -} +/** Optional parameters. */ +export interface CollectionListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for DataType. \ - * {@link KnownDataType} can be used interchangeably with DataType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **String** \ - * **Number** \ - * **Point** \ - * **Polygon** \ - * **LineString** \ - * **MultiPolygon** - */ -export type DataType = string; +/** Contains response data for the listMetrics operation. */ +export type CollectionListMetricsResponse = MetricListResult; -/** Known values of {@link IndexKind} that the service accepts. */ -export enum KnownIndexKind { - Hash = "Hash", - Range = "Range", - Spatial = "Spatial" +/** Optional parameters. */ +export interface CollectionListUsagesOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ + filter?: string; } -/** - * Defines values for IndexKind. \ - * {@link KnownIndexKind} can be used interchangeably with IndexKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Hash** \ - * **Range** \ - * **Spatial** - */ -export type IndexKind = string; +/** Contains response data for the listUsages operation. */ +export type CollectionListUsagesResponse = UsagesResult; -/** Known values of {@link CompositePathSortOrder} that the service accepts. */ -export enum KnownCompositePathSortOrder { - Ascending = "ascending", - Descending = "descending" -} +/** Optional parameters. */ +export interface CollectionListMetricDefinitionsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for CompositePathSortOrder. \ - * {@link KnownCompositePathSortOrder} can be used interchangeably with CompositePathSortOrder, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **ascending** \ - * **descending** - */ -export type CompositePathSortOrder = string; +/** Contains response data for the listMetricDefinitions operation. */ +export type CollectionListMetricDefinitionsResponse = MetricDefinitionsListResult; -/** Known values of {@link SpatialType} that the service accepts. */ -export enum KnownSpatialType { - Point = "Point", - LineString = "LineString", - Polygon = "Polygon", - MultiPolygon = "MultiPolygon" -} +/** Optional parameters. */ +export interface CollectionRegionListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for SpatialType. \ - * {@link KnownSpatialType} can be used interchangeably with SpatialType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Point** \ - * **LineString** \ - * **Polygon** \ - * **MultiPolygon** - */ -export type SpatialType = string; +/** Contains response data for the listMetrics operation. */ +export type CollectionRegionListMetricsResponse = MetricListResult; -/** Known values of {@link PartitionKind} that the service accepts. */ -export enum KnownPartitionKind { - Hash = "Hash", - Range = "Range", - MultiHash = "MultiHash" -} +/** Optional parameters. */ +export interface DatabaseAccountRegionListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for PartitionKind. \ - * {@link KnownPartitionKind} can be used interchangeably with PartitionKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Hash** \ - * **Range** \ - * **MultiHash** - */ -export type PartitionKind = string; +/** Contains response data for the listMetrics operation. */ +export type DatabaseAccountRegionListMetricsResponse = MetricListResult; -/** Known values of {@link ConflictResolutionMode} that the service accepts. */ -export enum KnownConflictResolutionMode { - LastWriterWins = "LastWriterWins", - Custom = "Custom" -} +/** Optional parameters. */ +export interface PercentileSourceTargetListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ConflictResolutionMode. \ - * {@link KnownConflictResolutionMode} can be used interchangeably with ConflictResolutionMode, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **LastWriterWins** \ - * **Custom** - */ -export type ConflictResolutionMode = string; +/** Contains response data for the listMetrics operation. */ +export type PercentileSourceTargetListMetricsResponse = PercentileMetricListResult; -/** Known values of {@link TriggerType} that the service accepts. */ -export enum KnownTriggerType { - Pre = "Pre", - Post = "Post" -} +/** Optional parameters. */ +export interface PercentileTargetListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for TriggerType. \ - * {@link KnownTriggerType} can be used interchangeably with TriggerType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Pre** \ - * **Post** - */ -export type TriggerType = string; +/** Contains response data for the listMetrics operation. */ +export type PercentileTargetListMetricsResponse = PercentileMetricListResult; -/** Known values of {@link TriggerOperation} that the service accepts. */ -export enum KnownTriggerOperation { - All = "All", - Create = "Create", - Update = "Update", - Delete = "Delete", - Replace = "Replace" -} +/** Optional parameters. */ +export interface PercentileListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for TriggerOperation. \ - * {@link KnownTriggerOperation} can be used interchangeably with TriggerOperation, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **All** \ - * **Create** \ - * **Update** \ - * **Delete** \ - * **Replace** - */ -export type TriggerOperation = string; +/** Contains response data for the listMetrics operation. */ +export type PercentileListMetricsResponse = PercentileMetricListResult; -/** Known values of {@link BackupStorageRedundancy} that the service accepts. */ -export enum KnownBackupStorageRedundancy { - Geo = "Geo", - Local = "Local", - Zone = "Zone" -} +/** Optional parameters. */ +export interface CollectionPartitionRegionListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for BackupStorageRedundancy. \ - * {@link KnownBackupStorageRedundancy} can be used interchangeably with BackupStorageRedundancy, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Geo** \ - * **Local** \ - * **Zone** - */ -export type BackupStorageRedundancy = string; +/** Contains response data for the listMetrics operation. */ +export type CollectionPartitionRegionListMetricsResponse = PartitionMetricListResult; -/** Known values of {@link NotebookWorkspaceName} that the service accepts. */ -export enum KnownNotebookWorkspaceName { - Default = "default" -} +/** Optional parameters. */ +export interface CollectionPartitionListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for NotebookWorkspaceName. \ - * {@link KnownNotebookWorkspaceName} can be used interchangeably with NotebookWorkspaceName, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **default** - */ -export type NotebookWorkspaceName = string; +/** Contains response data for the listMetrics operation. */ +export type CollectionPartitionListMetricsResponse = PartitionMetricListResult; -/** Known values of {@link ApiType} that the service accepts. */ -export enum KnownApiType { - MongoDB = "MongoDB", - Gremlin = "Gremlin", - Cassandra = "Cassandra", - Table = "Table", - Sql = "Sql", - GremlinV2 = "GremlinV2" +/** Optional parameters. */ +export interface CollectionPartitionListUsagesOptionalParams + extends coreClient.OperationOptions { + /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ + filter?: string; } -/** - * Defines values for ApiType. \ - * {@link KnownApiType} can be used interchangeably with ApiType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **MongoDB** \ - * **Gremlin** \ - * **Cassandra** \ - * **Table** \ - * **Sql** \ - * **GremlinV2** - */ -export type ApiType = string; +/** Contains response data for the listUsages operation. */ +export type CollectionPartitionListUsagesResponse = PartitionUsagesResult; -/** Known values of {@link OperationType} that the service accepts. */ -export enum KnownOperationType { - Create = "Create", - Replace = "Replace", - Delete = "Delete", - SystemOperation = "SystemOperation" -} +/** Optional parameters. */ +export interface PartitionKeyRangeIdListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for OperationType. \ - * {@link KnownOperationType} can be used interchangeably with OperationType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Create** \ - * **Replace** \ - * **Delete** \ - * **SystemOperation** - */ -export type OperationType = string; +/** Contains response data for the listMetrics operation. */ +export type PartitionKeyRangeIdListMetricsResponse = PartitionMetricListResult; -/** Known values of {@link ManagedCassandraProvisioningState} that the service accepts. */ -export enum KnownManagedCassandraProvisioningState { - Creating = "Creating", - Updating = "Updating", - Deleting = "Deleting", - Succeeded = "Succeeded", - Failed = "Failed", - Canceled = "Canceled" -} +/** Optional parameters. */ +export interface PartitionKeyRangeIdRegionListMetricsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedCassandraProvisioningState. \ - * {@link KnownManagedCassandraProvisioningState} can be used interchangeably with ManagedCassandraProvisioningState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Creating** \ - * **Updating** \ - * **Deleting** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** - */ -export type ManagedCassandraProvisioningState = string; +/** Contains response data for the listMetrics operation. */ +export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListResult; -/** Known values of {@link AuthenticationMethod} that the service accepts. */ -export enum KnownAuthenticationMethod { - None = "None", - Cassandra = "Cassandra" -} +/** Optional parameters. */ +export interface GraphResourcesListGraphsOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for AuthenticationMethod. \ - * {@link KnownAuthenticationMethod} can be used interchangeably with AuthenticationMethod, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **None** \ - * **Cassandra** - */ -export type AuthenticationMethod = string; +/** Contains response data for the listGraphs operation. */ +export type GraphResourcesListGraphsResponse = GraphResourcesListResult; -/** Known values of {@link ManagedCassandraResourceIdentityType} that the service accepts. */ -export enum KnownManagedCassandraResourceIdentityType { - SystemAssigned = "SystemAssigned", - None = "None" -} +/** Optional parameters. */ +export interface GraphResourcesGetGraphOptionalParams + extends coreClient.OperationOptions {} -/** - * Defines values for ManagedCassandraResourceIdentityType. \ - * {@link KnownManagedCassandraResourceIdentityType} can be used interchangeably with ManagedCassandraResourceIdentityType, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **SystemAssigned** \ - * **None** - */ -export type ManagedCassandraResourceIdentityType = string; +/** Contains response data for the getGraph operation. */ +export type GraphResourcesGetGraphResponse = GraphResourceGetResults; -/** Known values of {@link ConnectionState} that the service accepts. */ -export enum KnownConnectionState { - Unknown = "Unknown", - OK = "OK", - OperatorToDataCenterNetworkError = "OperatorToDataCenterNetworkError", - DatacenterToDatacenterNetworkError = "DatacenterToDatacenterNetworkError", - InternalOperatorToDataCenterCertificateError = "InternalOperatorToDataCenterCertificateError", - InternalError = "InternalError" +/** Optional parameters. */ +export interface GraphResourcesCreateUpdateGraphOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for ConnectionState. \ - * {@link KnownConnectionState} can be used interchangeably with ConnectionState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Unknown** \ - * **OK** \ - * **OperatorToDataCenterNetworkError** \ - * **DatacenterToDatacenterNetworkError** \ - * **InternalOperatorToDataCenterCertificateError** \ - * **InternalError** - */ -export type ConnectionState = string; +/** Contains response data for the createUpdateGraph operation. */ +export type GraphResourcesCreateUpdateGraphResponse = GraphResourceGetResults; -/** Known values of {@link NodeState} that the service accepts. */ -export enum KnownNodeState { - Normal = "Normal", - Leaving = "Leaving", - Joining = "Joining", - Moving = "Moving", - Stopped = "Stopped" +/** Optional parameters. */ +export interface GraphResourcesDeleteGraphResourceOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for NodeState. \ - * {@link KnownNodeState} can be used interchangeably with NodeState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Normal** \ - * **Leaving** \ - * **Joining** \ - * **Moving** \ - * **Stopped** - */ -export type NodeState = string; +/** Optional parameters. */ +export interface SqlResourcesListSqlDatabasesOptionalParams + extends coreClient.OperationOptions {} -/** Known values of {@link NodeStatus} that the service accepts. */ -export enum KnownNodeStatus { - Up = "Up", - Down = "Down" +/** Contains response data for the listSqlDatabases operation. */ +export type SqlResourcesListSqlDatabasesResponse = SqlDatabaseListResult; + +/** Optional parameters. */ +export interface SqlResourcesGetSqlDatabaseOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getSqlDatabase operation. */ +export type SqlResourcesGetSqlDatabaseResponse = SqlDatabaseGetResults; + +/** Optional parameters. */ +export interface SqlResourcesCreateUpdateSqlDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** - * Defines values for NodeStatus. \ - * {@link KnownNodeStatus} can be used interchangeably with NodeStatus, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Up** \ - * **Down** - */ -export type NodeStatus = string; -/** Defines values for ResourceIdentityType. */ -export type ResourceIdentityType = - | "SystemAssigned" - | "UserAssigned" - | "SystemAssigned,UserAssigned" - | "None"; -/** Defines values for DefaultConsistencyLevel. */ -export type DefaultConsistencyLevel = - | "Eventual" - | "Session" - | "BoundedStaleness" - | "Strong" - | "ConsistentPrefix"; -/** Defines values for NetworkAclBypass. */ -export type NetworkAclBypass = "None" | "AzureServices"; -/** Defines values for RoleDefinitionType. */ -export type RoleDefinitionType = "BuiltInRole" | "CustomRole"; +/** Contains response data for the createUpdateSqlDatabase operation. */ +export type SqlResourcesCreateUpdateSqlDatabaseResponse = SqlDatabaseGetResults; + +/** Optional parameters. */ +export interface SqlResourcesDeleteSqlDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface DatabaseAccountsGetOptionalParams +export interface SqlResourcesGetSqlDatabaseThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type DatabaseAccountsGetResponse = DatabaseAccountGetResults; +/** Contains response data for the getSqlDatabaseThroughput operation. */ +export type SqlResourcesGetSqlDatabaseThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface DatabaseAccountsUpdateOptionalParams +export interface SqlResourcesUpdateSqlDatabaseThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3092,11 +4313,11 @@ export interface DatabaseAccountsUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type DatabaseAccountsUpdateResponse = DatabaseAccountGetResults; +/** Contains response data for the updateSqlDatabaseThroughput operation. */ +export type SqlResourcesUpdateSqlDatabaseThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface DatabaseAccountsCreateOrUpdateOptionalParams +export interface SqlResourcesMigrateSqlDatabaseToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3104,11 +4325,11 @@ export interface DatabaseAccountsCreateOrUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the createOrUpdate operation. */ -export type DatabaseAccountsCreateOrUpdateResponse = DatabaseAccountGetResults; +/** Contains response data for the migrateSqlDatabaseToAutoscale operation. */ +export type SqlResourcesMigrateSqlDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface DatabaseAccountsDeleteOptionalParams +export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3116,8 +4337,25 @@ export interface DatabaseAccountsDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the migrateSqlDatabaseToManualThroughput operation. */ +export type SqlResourcesMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; + /** Optional parameters. */ -export interface DatabaseAccountsFailoverPriorityChangeOptionalParams +export interface SqlResourcesListClientEncryptionKeysOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listClientEncryptionKeys operation. */ +export type SqlResourcesListClientEncryptionKeysResponse = ClientEncryptionKeysListResult; + +/** Optional parameters. */ +export interface SqlResourcesGetClientEncryptionKeyOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getClientEncryptionKey operation. */ +export type SqlResourcesGetClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; + +/** Optional parameters. */ +export interface SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3125,36 +4363,53 @@ export interface DatabaseAccountsFailoverPriorityChangeOptionalParams resumeFrom?: string; } +/** Contains response data for the createUpdateClientEncryptionKey operation. */ +export type SqlResourcesCreateUpdateClientEncryptionKeyResponse = ClientEncryptionKeyGetResults; + /** Optional parameters. */ -export interface DatabaseAccountsListOptionalParams +export interface SqlResourcesListSqlContainersOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type DatabaseAccountsListResponse = DatabaseAccountsListResult; +/** Contains response data for the listSqlContainers operation. */ +export type SqlResourcesListSqlContainersResponse = SqlContainerListResult; /** Optional parameters. */ -export interface DatabaseAccountsListByResourceGroupOptionalParams +export interface SqlResourcesGetSqlContainerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroup operation. */ -export type DatabaseAccountsListByResourceGroupResponse = DatabaseAccountsListResult; +/** Contains response data for the getSqlContainer operation. */ +export type SqlResourcesGetSqlContainerResponse = SqlContainerGetResults; /** Optional parameters. */ -export interface DatabaseAccountsListKeysOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesCreateUpdateSqlContainerOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listKeys operation. */ -export type DatabaseAccountsListKeysResponse = DatabaseAccountListKeysResult; +/** Contains response data for the createUpdateSqlContainer operation. */ +export type SqlResourcesCreateUpdateSqlContainerResponse = SqlContainerGetResults; /** Optional parameters. */ -export interface DatabaseAccountsListConnectionStringsOptionalParams +export interface SqlResourcesDeleteSqlContainerOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SqlResourcesGetSqlContainerThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listConnectionStrings operation. */ -export type DatabaseAccountsListConnectionStringsResponse = DatabaseAccountListConnectionStringsResult; +/** Contains response data for the getSqlContainerThroughput operation. */ +export type SqlResourcesGetSqlContainerThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface DatabaseAccountsOfflineRegionOptionalParams +export interface SqlResourcesUpdateSqlContainerThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3162,8 +4417,11 @@ export interface DatabaseAccountsOfflineRegionOptionalParams resumeFrom?: string; } +/** Contains response data for the updateSqlContainerThroughput operation. */ +export type SqlResourcesUpdateSqlContainerThroughputResponse = ThroughputSettingsGetResults; + /** Optional parameters. */ -export interface DatabaseAccountsOnlineRegionOptionalParams +export interface SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3171,22 +4429,37 @@ export interface DatabaseAccountsOnlineRegionOptionalParams resumeFrom?: string; } +/** Contains response data for the migrateSqlContainerToAutoscale operation. */ +export type SqlResourcesMigrateSqlContainerToAutoscaleResponse = ThroughputSettingsGetResults; + /** Optional parameters. */ -export interface DatabaseAccountsGetReadOnlyKeysOptionalParams +export interface SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Contains response data for the migrateSqlContainerToManualThroughput operation. */ +export type SqlResourcesMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults; + +/** Optional parameters. */ +export interface SqlResourcesListSqlStoredProceduresOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getReadOnlyKeys operation. */ -export type DatabaseAccountsGetReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult; +/** Contains response data for the listSqlStoredProcedures operation. */ +export type SqlResourcesListSqlStoredProceduresResponse = SqlStoredProcedureListResult; /** Optional parameters. */ -export interface DatabaseAccountsListReadOnlyKeysOptionalParams +export interface SqlResourcesGetSqlStoredProcedureOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listReadOnlyKeys operation. */ -export type DatabaseAccountsListReadOnlyKeysResponse = DatabaseAccountListReadOnlyKeysResult; +/** Contains response data for the getSqlStoredProcedure operation. */ +export type SqlResourcesGetSqlStoredProcedureResponse = SqlStoredProcedureGetResults; /** Optional parameters. */ -export interface DatabaseAccountsRegenerateKeyOptionalParams +export interface SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3194,190 +4467,264 @@ export interface DatabaseAccountsRegenerateKeyOptionalParams resumeFrom?: string; } +/** Contains response data for the createUpdateSqlStoredProcedure operation. */ +export type SqlResourcesCreateUpdateSqlStoredProcedureResponse = SqlStoredProcedureGetResults; + /** Optional parameters. */ -export interface DatabaseAccountsCheckNameExistsOptionalParams +export interface SqlResourcesDeleteSqlStoredProcedureOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SqlResourcesListSqlUserDefinedFunctionsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the checkNameExists operation. */ -export type DatabaseAccountsCheckNameExistsResponse = { - body: boolean; -}; +/** Contains response data for the listSqlUserDefinedFunctions operation. */ +export type SqlResourcesListSqlUserDefinedFunctionsResponse = SqlUserDefinedFunctionListResult; /** Optional parameters. */ -export interface DatabaseAccountsListMetricsOptionalParams +export interface SqlResourcesGetSqlUserDefinedFunctionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type DatabaseAccountsListMetricsResponse = MetricListResult; +/** Contains response data for the getSqlUserDefinedFunction operation. */ +export type SqlResourcesGetSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults; /** Optional parameters. */ -export interface DatabaseAccountsListUsagesOptionalParams +export interface SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams extends coreClient.OperationOptions { - /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ - filter?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listUsages operation. */ -export type DatabaseAccountsListUsagesResponse = UsagesResult; +/** Contains response data for the createUpdateSqlUserDefinedFunction operation. */ +export type SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults; /** Optional parameters. */ -export interface DatabaseAccountsListMetricDefinitionsOptionalParams +export interface SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SqlResourcesListSqlTriggersOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetricDefinitions operation. */ -export type DatabaseAccountsListMetricDefinitionsResponse = MetricDefinitionsListResult; +/** Contains response data for the listSqlTriggers operation. */ +export type SqlResourcesListSqlTriggersResponse = SqlTriggerListResult; /** Optional parameters. */ -export interface OperationsListOptionalParams +export interface SqlResourcesGetSqlTriggerOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; +/** Contains response data for the getSqlTrigger operation. */ +export type SqlResourcesGetSqlTriggerResponse = SqlTriggerGetResults; /** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesCreateUpdateSqlTriggerOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; +/** Contains response data for the createUpdateSqlTrigger operation. */ +export type SqlResourcesCreateUpdateSqlTriggerResponse = SqlTriggerGetResults; /** Optional parameters. */ -export interface DatabaseListMetricsOptionalParams +export interface SqlResourcesDeleteSqlTriggerOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SqlResourcesGetSqlRoleDefinitionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type DatabaseListMetricsResponse = MetricListResult; +/** Contains response data for the getSqlRoleDefinition operation. */ +export type SqlResourcesGetSqlRoleDefinitionResponse = SqlRoleDefinitionGetResults; /** Optional parameters. */ -export interface DatabaseListUsagesOptionalParams +export interface SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams extends coreClient.OperationOptions { - /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ - filter?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listUsages operation. */ -export type DatabaseListUsagesResponse = UsagesResult; +/** Contains response data for the createUpdateSqlRoleDefinition operation. */ +export type SqlResourcesCreateUpdateSqlRoleDefinitionResponse = SqlRoleDefinitionGetResults; /** Optional parameters. */ -export interface DatabaseListMetricDefinitionsOptionalParams +export interface SqlResourcesDeleteSqlRoleDefinitionOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} + +/** Optional parameters. */ +export interface SqlResourcesListSqlRoleDefinitionsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetricDefinitions operation. */ -export type DatabaseListMetricDefinitionsResponse = MetricDefinitionsListResult; +/** Contains response data for the listSqlRoleDefinitions operation. */ +export type SqlResourcesListSqlRoleDefinitionsResponse = SqlRoleDefinitionListResult; /** Optional parameters. */ -export interface CollectionListMetricsOptionalParams +export interface SqlResourcesGetSqlRoleAssignmentOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type CollectionListMetricsResponse = MetricListResult; +/** Contains response data for the getSqlRoleAssignment operation. */ +export type SqlResourcesGetSqlRoleAssignmentResponse = SqlRoleAssignmentGetResults; /** Optional parameters. */ -export interface CollectionListUsagesOptionalParams +export interface SqlResourcesCreateUpdateSqlRoleAssignmentOptionalParams extends coreClient.OperationOptions { - /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ - filter?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listUsages operation. */ -export type CollectionListUsagesResponse = UsagesResult; +/** Contains response data for the createUpdateSqlRoleAssignment operation. */ +export type SqlResourcesCreateUpdateSqlRoleAssignmentResponse = SqlRoleAssignmentGetResults; /** Optional parameters. */ -export interface CollectionListMetricDefinitionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listMetricDefinitions operation. */ -export type CollectionListMetricDefinitionsResponse = MetricDefinitionsListResult; +export interface SqlResourcesDeleteSqlRoleAssignmentOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface CollectionRegionListMetricsOptionalParams +export interface SqlResourcesListSqlRoleAssignmentsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type CollectionRegionListMetricsResponse = MetricListResult; +/** Contains response data for the listSqlRoleAssignments operation. */ +export type SqlResourcesListSqlRoleAssignmentsResponse = SqlRoleAssignmentListResult; /** Optional parameters. */ -export interface DatabaseAccountRegionListMetricsOptionalParams - extends coreClient.OperationOptions {} +export interface SqlResourcesRetrieveContinuousBackupInformationOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listMetrics operation. */ -export type DatabaseAccountRegionListMetricsResponse = MetricListResult; +/** Contains response data for the retrieveContinuousBackupInformation operation. */ +export type SqlResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; /** Optional parameters. */ -export interface PercentileSourceTargetListMetricsOptionalParams +export interface MongoDBResourcesListMongoDBDatabasesOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type PercentileSourceTargetListMetricsResponse = PercentileMetricListResult; +/** Contains response data for the listMongoDBDatabases operation. */ +export type MongoDBResourcesListMongoDBDatabasesResponse = MongoDBDatabaseListResult; /** Optional parameters. */ -export interface PercentileTargetListMetricsOptionalParams +export interface MongoDBResourcesGetMongoDBDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type PercentileTargetListMetricsResponse = PercentileMetricListResult; +/** Contains response data for the getMongoDBDatabase operation. */ +export type MongoDBResourcesGetMongoDBDatabaseResponse = MongoDBDatabaseGetResults; /** Optional parameters. */ -export interface PercentileListMetricsOptionalParams - extends coreClient.OperationOptions {} +export interface MongoDBResourcesCreateUpdateMongoDBDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listMetrics operation. */ -export type PercentileListMetricsResponse = PercentileMetricListResult; +/** Contains response data for the createUpdateMongoDBDatabase operation. */ +export type MongoDBResourcesCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults; /** Optional parameters. */ -export interface CollectionPartitionRegionListMetricsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listMetrics operation. */ -export type CollectionPartitionRegionListMetricsResponse = PartitionMetricListResult; +export interface MongoDBResourcesDeleteMongoDBDatabaseOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} /** Optional parameters. */ -export interface CollectionPartitionListMetricsOptionalParams +export interface MongoDBResourcesGetMongoDBDatabaseThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMetrics operation. */ -export type CollectionPartitionListMetricsResponse = PartitionMetricListResult; +/** Contains response data for the getMongoDBDatabaseThroughput operation. */ +export type MongoDBResourcesGetMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface CollectionPartitionListUsagesOptionalParams +export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputOptionalParams extends coreClient.OperationOptions { - /** An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names). */ - filter?: string; + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; } -/** Contains response data for the listUsages operation. */ -export type CollectionPartitionListUsagesResponse = PartitionUsagesResult; +/** Contains response data for the updateMongoDBDatabaseThroughput operation. */ +export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface PartitionKeyRangeIdListMetricsOptionalParams - extends coreClient.OperationOptions {} +export interface MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listMetrics operation. */ -export type PartitionKeyRangeIdListMetricsResponse = PartitionMetricListResult; +/** Contains response data for the migrateMongoDBDatabaseToAutoscale operation. */ +export type MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface PartitionKeyRangeIdRegionListMetricsOptionalParams - extends coreClient.OperationOptions {} +export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams + extends coreClient.OperationOptions { + /** Delay to wait until next poll, in milliseconds. */ + updateIntervalInMs?: number; + /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ + resumeFrom?: string; +} -/** Contains response data for the listMetrics operation. */ -export type PartitionKeyRangeIdRegionListMetricsResponse = PartitionMetricListResult; +/** Contains response data for the migrateMongoDBDatabaseToManualThroughput operation. */ +export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesListSqlDatabasesOptionalParams +export interface MongoDBResourcesListMongoDBCollectionsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSqlDatabases operation. */ -export type SqlResourcesListSqlDatabasesResponse = SqlDatabaseListResult; +/** Contains response data for the listMongoDBCollections operation. */ +export type MongoDBResourcesListMongoDBCollectionsResponse = MongoDBCollectionListResult; /** Optional parameters. */ -export interface SqlResourcesGetSqlDatabaseOptionalParams +export interface MongoDBResourcesGetMongoDBCollectionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlDatabase operation. */ -export type SqlResourcesGetSqlDatabaseResponse = SqlDatabaseGetResults; +/** Contains response data for the getMongoDBCollection operation. */ +export type MongoDBResourcesGetMongoDBCollectionResponse = MongoDBCollectionGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlDatabaseOptionalParams +export interface MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3385,11 +4732,11 @@ export interface SqlResourcesCreateUpdateSqlDatabaseOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlDatabase operation. */ -export type SqlResourcesCreateUpdateSqlDatabaseResponse = SqlDatabaseGetResults; +/** Contains response data for the createUpdateMongoDBCollection operation. */ +export type MongoDBResourcesCreateUpdateMongoDBCollectionResponse = MongoDBCollectionGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlDatabaseOptionalParams +export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3398,14 +4745,14 @@ export interface SqlResourcesDeleteSqlDatabaseOptionalParams } /** Optional parameters. */ -export interface SqlResourcesGetSqlDatabaseThroughputOptionalParams +export interface MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlDatabaseThroughput operation. */ -export type SqlResourcesGetSqlDatabaseThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the getMongoDBCollectionThroughput operation. */ +export type MongoDBResourcesGetMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesUpdateSqlDatabaseThroughputOptionalParams +export interface MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3413,11 +4760,11 @@ export interface SqlResourcesUpdateSqlDatabaseThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the updateSqlDatabaseThroughput operation. */ -export type SqlResourcesUpdateSqlDatabaseThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the updateMongoDBCollectionThroughput operation. */ +export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesMigrateSqlDatabaseToAutoscaleOptionalParams +export interface MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3425,11 +4772,11 @@ export interface SqlResourcesMigrateSqlDatabaseToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateSqlDatabaseToAutoscale operation. */ -export type SqlResourcesMigrateSqlDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateMongoDBCollectionToAutoscale operation. */ +export type MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams +export interface MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3437,25 +4784,18 @@ export interface SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateSqlDatabaseToManualThroughput operation. */ -export type SqlResourcesMigrateSqlDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; - -/** Optional parameters. */ -export interface SqlResourcesListSqlContainersOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSqlContainers operation. */ -export type SqlResourcesListSqlContainersResponse = SqlContainerListResult; +/** Contains response data for the migrateMongoDBCollectionToManualThroughput operation. */ +export type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesGetSqlContainerOptionalParams +export interface MongoDBResourcesGetMongoRoleDefinitionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlContainer operation. */ -export type SqlResourcesGetSqlContainerResponse = SqlContainerGetResults; +/** Contains response data for the getMongoRoleDefinition operation. */ +export type MongoDBResourcesGetMongoRoleDefinitionResponse = MongoRoleDefinitionGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlContainerOptionalParams +export interface MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3463,11 +4803,11 @@ export interface SqlResourcesCreateUpdateSqlContainerOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlContainer operation. */ -export type SqlResourcesCreateUpdateSqlContainerResponse = SqlContainerGetResults; +/** Contains response data for the createUpdateMongoRoleDefinition operation. */ +export type MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse = MongoRoleDefinitionGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlContainerOptionalParams +export interface MongoDBResourcesDeleteMongoRoleDefinitionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3476,14 +4816,21 @@ export interface SqlResourcesDeleteSqlContainerOptionalParams } /** Optional parameters. */ -export interface SqlResourcesGetSqlContainerThroughputOptionalParams +export interface MongoDBResourcesListMongoRoleDefinitionsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlContainerThroughput operation. */ -export type SqlResourcesGetSqlContainerThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the listMongoRoleDefinitions operation. */ +export type MongoDBResourcesListMongoRoleDefinitionsResponse = MongoRoleDefinitionListResult; /** Optional parameters. */ -export interface SqlResourcesUpdateSqlContainerThroughputOptionalParams +export interface MongoDBResourcesGetMongoUserDefinitionOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the getMongoUserDefinition operation. */ +export type MongoDBResourcesGetMongoUserDefinitionResponse = MongoUserDefinitionGetResults; + +/** Optional parameters. */ +export interface MongoDBResourcesCreateUpdateMongoUserDefinitionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3491,11 +4838,11 @@ export interface SqlResourcesUpdateSqlContainerThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the updateSqlContainerThroughput operation. */ -export type SqlResourcesUpdateSqlContainerThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the createUpdateMongoUserDefinition operation. */ +export type MongoDBResourcesCreateUpdateMongoUserDefinitionResponse = MongoUserDefinitionGetResults; /** Optional parameters. */ -export interface SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams +export interface MongoDBResourcesDeleteMongoUserDefinitionOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3503,11 +4850,15 @@ export interface SqlResourcesMigrateSqlContainerToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateSqlContainerToAutoscale operation. */ -export type SqlResourcesMigrateSqlContainerToAutoscaleResponse = ThroughputSettingsGetResults; +/** Optional parameters. */ +export interface MongoDBResourcesListMongoUserDefinitionsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listMongoUserDefinitions operation. */ +export type MongoDBResourcesListMongoUserDefinitionsResponse = MongoUserDefinitionListResult; /** Optional parameters. */ -export interface SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams +export interface MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3515,25 +4866,25 @@ export interface SqlResourcesMigrateSqlContainerToManualThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateSqlContainerToManualThroughput operation. */ -export type SqlResourcesMigrateSqlContainerToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the retrieveContinuousBackupInformation operation. */ +export type MongoDBResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; /** Optional parameters. */ -export interface SqlResourcesListSqlStoredProceduresOptionalParams +export interface TableResourcesListTablesOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listSqlStoredProcedures operation. */ -export type SqlResourcesListSqlStoredProceduresResponse = SqlStoredProcedureListResult; +/** Contains response data for the listTables operation. */ +export type TableResourcesListTablesResponse = TableListResult; /** Optional parameters. */ -export interface SqlResourcesGetSqlStoredProcedureOptionalParams +export interface TableResourcesGetTableOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlStoredProcedure operation. */ -export type SqlResourcesGetSqlStoredProcedureResponse = SqlStoredProcedureGetResults; +/** Contains response data for the getTable operation. */ +export type TableResourcesGetTableResponse = TableGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams +export interface TableResourcesCreateUpdateTableOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3541,11 +4892,11 @@ export interface SqlResourcesCreateUpdateSqlStoredProcedureOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlStoredProcedure operation. */ -export type SqlResourcesCreateUpdateSqlStoredProcedureResponse = SqlStoredProcedureGetResults; +/** Contains response data for the createUpdateTable operation. */ +export type TableResourcesCreateUpdateTableResponse = TableGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlStoredProcedureOptionalParams +export interface TableResourcesDeleteTableOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3554,21 +4905,14 @@ export interface SqlResourcesDeleteSqlStoredProcedureOptionalParams } /** Optional parameters. */ -export interface SqlResourcesListSqlUserDefinedFunctionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSqlUserDefinedFunctions operation. */ -export type SqlResourcesListSqlUserDefinedFunctionsResponse = SqlUserDefinedFunctionListResult; - -/** Optional parameters. */ -export interface SqlResourcesGetSqlUserDefinedFunctionOptionalParams +export interface TableResourcesGetTableThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlUserDefinedFunction operation. */ -export type SqlResourcesGetSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults; +/** Contains response data for the getTableThroughput operation. */ +export type TableResourcesGetTableThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams +export interface TableResourcesUpdateTableThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3576,11 +4920,11 @@ export interface SqlResourcesCreateUpdateSqlUserDefinedFunctionOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlUserDefinedFunction operation. */ -export type SqlResourcesCreateUpdateSqlUserDefinedFunctionResponse = SqlUserDefinedFunctionGetResults; +/** Contains response data for the updateTableThroughput operation. */ +export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams +export interface TableResourcesMigrateTableToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3588,22 +4932,11 @@ export interface SqlResourcesDeleteSqlUserDefinedFunctionOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface SqlResourcesListSqlTriggersOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSqlTriggers operation. */ -export type SqlResourcesListSqlTriggersResponse = SqlTriggerListResult; - -/** Optional parameters. */ -export interface SqlResourcesGetSqlTriggerOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSqlTrigger operation. */ -export type SqlResourcesGetSqlTriggerResponse = SqlTriggerGetResults; +/** Contains response data for the migrateTableToAutoscale operation. */ +export type TableResourcesMigrateTableToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlTriggerOptionalParams +export interface TableResourcesMigrateTableToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3611,11 +4944,11 @@ export interface SqlResourcesCreateUpdateSqlTriggerOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlTrigger operation. */ -export type SqlResourcesCreateUpdateSqlTriggerResponse = SqlTriggerGetResults; +/** Contains response data for the migrateTableToManualThroughput operation. */ +export type TableResourcesMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlTriggerOptionalParams +export interface TableResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3623,15 +4956,25 @@ export interface SqlResourcesDeleteSqlTriggerOptionalParams resumeFrom?: string; } +/** Contains response data for the retrieveContinuousBackupInformation operation. */ +export type TableResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; + /** Optional parameters. */ -export interface SqlResourcesGetSqlRoleDefinitionOptionalParams +export interface CassandraResourcesListCassandraKeyspacesOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listCassandraKeyspaces operation. */ +export type CassandraResourcesListCassandraKeyspacesResponse = CassandraKeyspaceListResult; + +/** Optional parameters. */ +export interface CassandraResourcesGetCassandraKeyspaceOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlRoleDefinition operation. */ -export type SqlResourcesGetSqlRoleDefinitionResponse = SqlRoleDefinitionGetResults; +/** Contains response data for the getCassandraKeyspace operation. */ +export type CassandraResourcesGetCassandraKeyspaceResponse = CassandraKeyspaceGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams +export interface CassandraResourcesCreateUpdateCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3639,11 +4982,11 @@ export interface SqlResourcesCreateUpdateSqlRoleDefinitionOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlRoleDefinition operation. */ -export type SqlResourcesCreateUpdateSqlRoleDefinitionResponse = SqlRoleDefinitionGetResults; +/** Contains response data for the createUpdateCassandraKeyspace operation. */ +export type CassandraResourcesCreateUpdateCassandraKeyspaceResponse = CassandraKeyspaceGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlRoleDefinitionOptionalParams +export interface CassandraResourcesDeleteCassandraKeyspaceOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3652,21 +4995,14 @@ export interface SqlResourcesDeleteSqlRoleDefinitionOptionalParams } /** Optional parameters. */ -export interface SqlResourcesListSqlRoleDefinitionsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSqlRoleDefinitions operation. */ -export type SqlResourcesListSqlRoleDefinitionsResponse = SqlRoleDefinitionListResult; - -/** Optional parameters. */ -export interface SqlResourcesGetSqlRoleAssignmentOptionalParams +export interface CassandraResourcesGetCassandraKeyspaceThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getSqlRoleAssignment operation. */ -export type SqlResourcesGetSqlRoleAssignmentResponse = SqlRoleAssignmentGetResults; +/** Contains response data for the getCassandraKeyspaceThroughput operation. */ +export type CassandraResourcesGetCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesCreateUpdateSqlRoleAssignmentOptionalParams +export interface CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3674,11 +5010,11 @@ export interface SqlResourcesCreateUpdateSqlRoleAssignmentOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateSqlRoleAssignment operation. */ -export type SqlResourcesCreateUpdateSqlRoleAssignmentResponse = SqlRoleAssignmentGetResults; +/** Contains response data for the updateCassandraKeyspaceThroughput operation. */ +export type CassandraResourcesUpdateCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesDeleteSqlRoleAssignmentOptionalParams +export interface CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3686,15 +5022,11 @@ export interface SqlResourcesDeleteSqlRoleAssignmentOptionalParams resumeFrom?: string; } -/** Optional parameters. */ -export interface SqlResourcesListSqlRoleAssignmentsOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listSqlRoleAssignments operation. */ -export type SqlResourcesListSqlRoleAssignmentsResponse = SqlRoleAssignmentListResult; +/** Contains response data for the migrateCassandraKeyspaceToAutoscale operation. */ +export type CassandraResourcesMigrateCassandraKeyspaceToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface SqlResourcesRetrieveContinuousBackupInformationOptionalParams +export interface CassandraResourcesMigrateCassandraKeyspaceToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3702,25 +5034,25 @@ export interface SqlResourcesRetrieveContinuousBackupInformationOptionalParams resumeFrom?: string; } -/** Contains response data for the retrieveContinuousBackupInformation operation. */ -export type SqlResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; +/** Contains response data for the migrateCassandraKeyspaceToManualThroughput operation. */ +export type CassandraResourcesMigrateCassandraKeyspaceToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesListMongoDBDatabasesOptionalParams +export interface CassandraResourcesListCassandraTablesOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMongoDBDatabases operation. */ -export type MongoDBResourcesListMongoDBDatabasesResponse = MongoDBDatabaseListResult; +/** Contains response data for the listCassandraTables operation. */ +export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult; /** Optional parameters. */ -export interface MongoDBResourcesGetMongoDBDatabaseOptionalParams +export interface CassandraResourcesGetCassandraTableOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getMongoDBDatabase operation. */ -export type MongoDBResourcesGetMongoDBDatabaseResponse = MongoDBDatabaseGetResults; +/** Contains response data for the getCassandraTable operation. */ +export type CassandraResourcesGetCassandraTableResponse = CassandraTableGetResults; /** Optional parameters. */ -export interface MongoDBResourcesCreateUpdateMongoDBDatabaseOptionalParams +export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3728,11 +5060,11 @@ export interface MongoDBResourcesCreateUpdateMongoDBDatabaseOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateMongoDBDatabase operation. */ -export type MongoDBResourcesCreateUpdateMongoDBDatabaseResponse = MongoDBDatabaseGetResults; +/** Contains response data for the createUpdateCassandraTable operation. */ +export type CassandraResourcesCreateUpdateCassandraTableResponse = CassandraTableGetResults; /** Optional parameters. */ -export interface MongoDBResourcesDeleteMongoDBDatabaseOptionalParams +export interface CassandraResourcesDeleteCassandraTableOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3741,14 +5073,14 @@ export interface MongoDBResourcesDeleteMongoDBDatabaseOptionalParams } /** Optional parameters. */ -export interface MongoDBResourcesGetMongoDBDatabaseThroughputOptionalParams +export interface CassandraResourcesGetCassandraTableThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getMongoDBDatabaseThroughput operation. */ -export type MongoDBResourcesGetMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the getCassandraTableThroughput operation. */ +export type CassandraResourcesGetCassandraTableThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputOptionalParams +export interface CassandraResourcesUpdateCassandraTableThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3756,11 +5088,11 @@ export interface MongoDBResourcesUpdateMongoDBDatabaseThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the updateMongoDBDatabaseThroughput operation. */ -export type MongoDBResourcesUpdateMongoDBDatabaseThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the updateCassandraTableThroughput operation. */ +export type CassandraResourcesUpdateCassandraTableThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleOptionalParams +export interface CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3768,11 +5100,11 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateMongoDBDatabaseToAutoscale operation. */ -export type MongoDBResourcesMigrateMongoDBDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateCassandraTableToAutoscale operation. */ +export type CassandraResourcesMigrateCassandraTableToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptionalParams +export interface CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3780,25 +5112,25 @@ export interface MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputOptiona resumeFrom?: string; } -/** Contains response data for the migrateMongoDBDatabaseToManualThroughput operation. */ -export type MongoDBResourcesMigrateMongoDBDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateCassandraTableToManualThroughput operation. */ +export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesListMongoDBCollectionsOptionalParams +export interface CassandraResourcesListCassandraViewsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listMongoDBCollections operation. */ -export type MongoDBResourcesListMongoDBCollectionsResponse = MongoDBCollectionListResult; +/** Contains response data for the listCassandraViews operation. */ +export type CassandraResourcesListCassandraViewsResponse = CassandraViewListResult; /** Optional parameters. */ -export interface MongoDBResourcesGetMongoDBCollectionOptionalParams +export interface CassandraResourcesGetCassandraViewOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getMongoDBCollection operation. */ -export type MongoDBResourcesGetMongoDBCollectionResponse = MongoDBCollectionGetResults; +/** Contains response data for the getCassandraView operation. */ +export type CassandraResourcesGetCassandraViewResponse = CassandraViewGetResults; /** Optional parameters. */ -export interface MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams +export interface CassandraResourcesCreateUpdateCassandraViewOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3806,11 +5138,11 @@ export interface MongoDBResourcesCreateUpdateMongoDBCollectionOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateMongoDBCollection operation. */ -export type MongoDBResourcesCreateUpdateMongoDBCollectionResponse = MongoDBCollectionGetResults; +/** Contains response data for the createUpdateCassandraView operation. */ +export type CassandraResourcesCreateUpdateCassandraViewResponse = CassandraViewGetResults; /** Optional parameters. */ -export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams +export interface CassandraResourcesDeleteCassandraViewOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3819,26 +5151,14 @@ export interface MongoDBResourcesDeleteMongoDBCollectionOptionalParams } /** Optional parameters. */ -export interface MongoDBResourcesGetMongoDBCollectionThroughputOptionalParams +export interface CassandraResourcesGetCassandraViewThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getMongoDBCollectionThroughput operation. */ -export type MongoDBResourcesGetMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults; - -/** Optional parameters. */ -export interface MongoDBResourcesUpdateMongoDBCollectionThroughputOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the updateMongoDBCollectionThroughput operation. */ -export type MongoDBResourcesUpdateMongoDBCollectionThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the getCassandraViewThroughput operation. */ +export type CassandraResourcesGetCassandraViewThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalParams +export interface CassandraResourcesUpdateCassandraViewThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3846,11 +5166,11 @@ export interface MongoDBResourcesMigrateMongoDBCollectionToAutoscaleOptionalPara resumeFrom?: string; } -/** Contains response data for the migrateMongoDBCollectionToAutoscale operation. */ -export type MongoDBResourcesMigrateMongoDBCollectionToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the updateCassandraViewThroughput operation. */ +export type CassandraResourcesUpdateCassandraViewThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptionalParams +export interface CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3858,11 +5178,11 @@ export interface MongoDBResourcesMigrateMongoDBCollectionToManualThroughputOptio resumeFrom?: string; } -/** Contains response data for the migrateMongoDBCollectionToManualThroughput operation. */ -export type MongoDBResourcesMigrateMongoDBCollectionToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateCassandraViewToAutoscale operation. */ +export type CassandraResourcesMigrateCassandraViewToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams +export interface CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3870,25 +5190,25 @@ export interface MongoDBResourcesRetrieveContinuousBackupInformationOptionalPara resumeFrom?: string; } -/** Contains response data for the retrieveContinuousBackupInformation operation. */ -export type MongoDBResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; +/** Contains response data for the migrateCassandraViewToManualThroughput operation. */ +export type CassandraResourcesMigrateCassandraViewToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface TableResourcesListTablesOptionalParams +export interface GremlinResourcesListGremlinDatabasesOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listTables operation. */ -export type TableResourcesListTablesResponse = TableListResult; +/** Contains response data for the listGremlinDatabases operation. */ +export type GremlinResourcesListGremlinDatabasesResponse = GremlinDatabaseListResult; /** Optional parameters. */ -export interface TableResourcesGetTableOptionalParams +export interface GremlinResourcesGetGremlinDatabaseOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getTable operation. */ -export type TableResourcesGetTableResponse = TableGetResults; +/** Contains response data for the getGremlinDatabase operation. */ +export type GremlinResourcesGetGremlinDatabaseResponse = GremlinDatabaseGetResults; /** Optional parameters. */ -export interface TableResourcesCreateUpdateTableOptionalParams +export interface GremlinResourcesCreateUpdateGremlinDatabaseOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3896,11 +5216,11 @@ export interface TableResourcesCreateUpdateTableOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateTable operation. */ -export type TableResourcesCreateUpdateTableResponse = TableGetResults; +/** Contains response data for the createUpdateGremlinDatabase operation. */ +export type GremlinResourcesCreateUpdateGremlinDatabaseResponse = GremlinDatabaseGetResults; /** Optional parameters. */ -export interface TableResourcesDeleteTableOptionalParams +export interface GremlinResourcesDeleteGremlinDatabaseOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3909,14 +5229,14 @@ export interface TableResourcesDeleteTableOptionalParams } /** Optional parameters. */ -export interface TableResourcesGetTableThroughputOptionalParams +export interface GremlinResourcesGetGremlinDatabaseThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getTableThroughput operation. */ -export type TableResourcesGetTableThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the getGremlinDatabaseThroughput operation. */ +export type GremlinResourcesGetGremlinDatabaseThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface TableResourcesUpdateTableThroughputOptionalParams +export interface GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3924,11 +5244,11 @@ export interface TableResourcesUpdateTableThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the updateTableThroughput operation. */ -export type TableResourcesUpdateTableThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the updateGremlinDatabaseThroughput operation. */ +export type GremlinResourcesUpdateGremlinDatabaseThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface TableResourcesMigrateTableToAutoscaleOptionalParams +export interface GremlinResourcesMigrateGremlinDatabaseToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3936,11 +5256,11 @@ export interface TableResourcesMigrateTableToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateTableToAutoscale operation. */ -export type TableResourcesMigrateTableToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateGremlinDatabaseToAutoscale operation. */ +export type GremlinResourcesMigrateGremlinDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface TableResourcesMigrateTableToManualThroughputOptionalParams +export interface GremlinResourcesMigrateGremlinDatabaseToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3948,25 +5268,25 @@ export interface TableResourcesMigrateTableToManualThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateTableToManualThroughput operation. */ -export type TableResourcesMigrateTableToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateGremlinDatabaseToManualThroughput operation. */ +export type GremlinResourcesMigrateGremlinDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface CassandraResourcesListCassandraKeyspacesOptionalParams +export interface GremlinResourcesListGremlinGraphsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listCassandraKeyspaces operation. */ -export type CassandraResourcesListCassandraKeyspacesResponse = CassandraKeyspaceListResult; +/** Contains response data for the listGremlinGraphs operation. */ +export type GremlinResourcesListGremlinGraphsResponse = GremlinGraphListResult; /** Optional parameters. */ -export interface CassandraResourcesGetCassandraKeyspaceOptionalParams +export interface GremlinResourcesGetGremlinGraphOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getCassandraKeyspace operation. */ -export type CassandraResourcesGetCassandraKeyspaceResponse = CassandraKeyspaceGetResults; +/** Contains response data for the getGremlinGraph operation. */ +export type GremlinResourcesGetGremlinGraphResponse = GremlinGraphGetResults; /** Optional parameters. */ -export interface CassandraResourcesCreateUpdateCassandraKeyspaceOptionalParams +export interface GremlinResourcesCreateUpdateGremlinGraphOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3974,11 +5294,11 @@ export interface CassandraResourcesCreateUpdateCassandraKeyspaceOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateCassandraKeyspace operation. */ -export type CassandraResourcesCreateUpdateCassandraKeyspaceResponse = CassandraKeyspaceGetResults; +/** Contains response data for the createUpdateGremlinGraph operation. */ +export type GremlinResourcesCreateUpdateGremlinGraphResponse = GremlinGraphGetResults; /** Optional parameters. */ -export interface CassandraResourcesDeleteCassandraKeyspaceOptionalParams +export interface GremlinResourcesDeleteGremlinGraphOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -3987,14 +5307,14 @@ export interface CassandraResourcesDeleteCassandraKeyspaceOptionalParams } /** Optional parameters. */ -export interface CassandraResourcesGetCassandraKeyspaceThroughputOptionalParams +export interface GremlinResourcesGetGremlinGraphThroughputOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getCassandraKeyspaceThroughput operation. */ -export type CassandraResourcesGetCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the getGremlinGraphThroughput operation. */ +export type GremlinResourcesGetGremlinGraphThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalParams +export interface GremlinResourcesUpdateGremlinGraphThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4002,11 +5322,11 @@ export interface CassandraResourcesUpdateCassandraKeyspaceThroughputOptionalPara resumeFrom?: string; } -/** Contains response data for the updateCassandraKeyspaceThroughput operation. */ -export type CassandraResourcesUpdateCassandraKeyspaceThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the updateGremlinGraphThroughput operation. */ +export type GremlinResourcesUpdateGremlinGraphThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalParams +export interface GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4014,11 +5334,11 @@ export interface CassandraResourcesMigrateCassandraKeyspaceToAutoscaleOptionalPa resumeFrom?: string; } -/** Contains response data for the migrateCassandraKeyspaceToAutoscale operation. */ -export type CassandraResourcesMigrateCassandraKeyspaceToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the migrateGremlinGraphToAutoscale operation. */ +export type GremlinResourcesMigrateGremlinGraphToAutoscaleResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface CassandraResourcesMigrateCassandraKeyspaceToManualThroughputOptionalParams +export interface GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4026,25 +5346,11 @@ export interface CassandraResourcesMigrateCassandraKeyspaceToManualThroughputOpt resumeFrom?: string; } -/** Contains response data for the migrateCassandraKeyspaceToManualThroughput operation. */ -export type CassandraResourcesMigrateCassandraKeyspaceToManualThroughputResponse = ThroughputSettingsGetResults; - -/** Optional parameters. */ -export interface CassandraResourcesListCassandraTablesOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listCassandraTables operation. */ -export type CassandraResourcesListCassandraTablesResponse = CassandraTableListResult; - -/** Optional parameters. */ -export interface CassandraResourcesGetCassandraTableOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getCassandraTable operation. */ -export type CassandraResourcesGetCassandraTableResponse = CassandraTableGetResults; +/** Contains response data for the migrateGremlinGraphToManualThroughput operation. */ +export type GremlinResourcesMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults; /** Optional parameters. */ -export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams +export interface GremlinResourcesRetrieveContinuousBackupInformationOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4052,89 +5358,74 @@ export interface CassandraResourcesCreateUpdateCassandraTableOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateCassandraTable operation. */ -export type CassandraResourcesCreateUpdateCassandraTableResponse = CassandraTableGetResults; +/** Contains response data for the retrieveContinuousBackupInformation operation. */ +export type GremlinResourcesRetrieveContinuousBackupInformationResponse = BackupInformation; /** Optional parameters. */ -export interface CassandraResourcesDeleteCassandraTableOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface LocationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type LocationsListResponse = LocationListResult; /** Optional parameters. */ -export interface CassandraResourcesGetCassandraTableThroughputOptionalParams +export interface LocationsGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getCassandraTableThroughput operation. */ -export type CassandraResourcesGetCassandraTableThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the get operation. */ +export type LocationsGetResponse = LocationGetResult; /** Optional parameters. */ -export interface CassandraResourcesUpdateCassandraTableThroughputOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface DataTransferJobsCreateOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the updateCassandraTableThroughput operation. */ -export type CassandraResourcesUpdateCassandraTableThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the create operation. */ +export type DataTransferJobsCreateResponse = DataTransferJobGetResults; /** Optional parameters. */ -export interface CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface DataTransferJobsGetOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the migrateCassandraTableToAutoscale operation. */ -export type CassandraResourcesMigrateCassandraTableToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the get operation. */ +export type DataTransferJobsGetResponse = DataTransferJobGetResults; /** Optional parameters. */ -export interface CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface DataTransferJobsListByDatabaseAccountOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the migrateCassandraTableToManualThroughput operation. */ -export type CassandraResourcesMigrateCassandraTableToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the listByDatabaseAccount operation. */ +export type DataTransferJobsListByDatabaseAccountResponse = DataTransferJobFeedResults; /** Optional parameters. */ -export interface GremlinResourcesListGremlinDatabasesOptionalParams +export interface DataTransferJobsListByDatabaseAccountNextOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listGremlinDatabases operation. */ -export type GremlinResourcesListGremlinDatabasesResponse = GremlinDatabaseListResult; +/** Contains response data for the listByDatabaseAccountNext operation. */ +export type DataTransferJobsListByDatabaseAccountNextResponse = DataTransferJobFeedResults; /** Optional parameters. */ -export interface GremlinResourcesGetGremlinDatabaseOptionalParams +export interface CassandraClustersListBySubscriptionOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getGremlinDatabase operation. */ -export type GremlinResourcesGetGremlinDatabaseResponse = GremlinDatabaseGetResults; +/** Contains response data for the listBySubscription operation. */ +export type CassandraClustersListBySubscriptionResponse = ListClusters; /** Optional parameters. */ -export interface GremlinResourcesCreateUpdateGremlinDatabaseOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface CassandraClustersListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} -/** Contains response data for the createUpdateGremlinDatabase operation. */ -export type GremlinResourcesCreateUpdateGremlinDatabaseResponse = GremlinDatabaseGetResults; +/** Contains response data for the listByResourceGroup operation. */ +export type CassandraClustersListByResourceGroupResponse = ListClusters; /** Optional parameters. */ -export interface GremlinResourcesDeleteGremlinDatabaseOptionalParams +export interface CassandraClustersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CassandraClustersGetResponse = ClusterResource; + +/** Optional parameters. */ +export interface CassandraClustersDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4143,14 +5434,7 @@ export interface GremlinResourcesDeleteGremlinDatabaseOptionalParams } /** Optional parameters. */ -export interface GremlinResourcesGetGremlinDatabaseThroughputOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getGremlinDatabaseThroughput operation. */ -export type GremlinResourcesGetGremlinDatabaseThroughputResponse = ThroughputSettingsGetResults; - -/** Optional parameters. */ -export interface GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams +export interface CassandraClustersCreateUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4158,11 +5442,11 @@ export interface GremlinResourcesUpdateGremlinDatabaseThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the updateGremlinDatabaseThroughput operation. */ -export type GremlinResourcesUpdateGremlinDatabaseThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the createUpdate operation. */ +export type CassandraClustersCreateUpdateResponse = ClusterResource; /** Optional parameters. */ -export interface GremlinResourcesMigrateGremlinDatabaseToAutoscaleOptionalParams +export interface CassandraClustersUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4170,11 +5454,11 @@ export interface GremlinResourcesMigrateGremlinDatabaseToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateGremlinDatabaseToAutoscale operation. */ -export type GremlinResourcesMigrateGremlinDatabaseToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the update operation. */ +export type CassandraClustersUpdateResponse = ClusterResource; /** Optional parameters. */ -export interface GremlinResourcesMigrateGremlinDatabaseToManualThroughputOptionalParams +export interface CassandraClustersInvokeCommandOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4182,25 +5466,25 @@ export interface GremlinResourcesMigrateGremlinDatabaseToManualThroughputOptiona resumeFrom?: string; } -/** Contains response data for the migrateGremlinDatabaseToManualThroughput operation. */ -export type GremlinResourcesMigrateGremlinDatabaseToManualThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the invokeCommand operation. */ +export type CassandraClustersInvokeCommandResponse = CommandOutput; /** Optional parameters. */ -export interface GremlinResourcesListGremlinGraphsOptionalParams +export interface CassandraClustersListBackupsOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listGremlinGraphs operation. */ -export type GremlinResourcesListGremlinGraphsResponse = GremlinGraphListResult; +/** Contains response data for the listBackups operation. */ +export type CassandraClustersListBackupsResponse = ListBackups; /** Optional parameters. */ -export interface GremlinResourcesGetGremlinGraphOptionalParams +export interface CassandraClustersGetBackupOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getGremlinGraph operation. */ -export type GremlinResourcesGetGremlinGraphResponse = GremlinGraphGetResults; +/** Contains response data for the getBackup operation. */ +export type CassandraClustersGetBackupResponse = BackupResource; /** Optional parameters. */ -export interface GremlinResourcesCreateUpdateGremlinGraphOptionalParams +export interface CassandraClustersDeallocateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4208,11 +5492,8 @@ export interface GremlinResourcesCreateUpdateGremlinGraphOptionalParams resumeFrom?: string; } -/** Contains response data for the createUpdateGremlinGraph operation. */ -export type GremlinResourcesCreateUpdateGremlinGraphResponse = GremlinGraphGetResults; - /** Optional parameters. */ -export interface GremlinResourcesDeleteGremlinGraphOptionalParams +export interface CassandraClustersStartOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4221,14 +5502,28 @@ export interface GremlinResourcesDeleteGremlinGraphOptionalParams } /** Optional parameters. */ -export interface GremlinResourcesGetGremlinGraphThroughputOptionalParams +export interface CassandraClustersStatusOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the getGremlinGraphThroughput operation. */ -export type GremlinResourcesGetGremlinGraphThroughputResponse = ThroughputSettingsGetResults; +/** Contains response data for the status operation. */ +export type CassandraClustersStatusResponse = CassandraClusterPublicStatus; /** Optional parameters. */ -export interface GremlinResourcesUpdateGremlinGraphThroughputOptionalParams +export interface CassandraDataCentersListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type CassandraDataCentersListResponse = ListDataCenters; + +/** Optional parameters. */ +export interface CassandraDataCentersGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type CassandraDataCentersGetResponse = DataCenterResource; + +/** Optional parameters. */ +export interface CassandraDataCentersDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4236,11 +5531,8 @@ export interface GremlinResourcesUpdateGremlinGraphThroughputOptionalParams resumeFrom?: string; } -/** Contains response data for the updateGremlinGraphThroughput operation. */ -export type GremlinResourcesUpdateGremlinGraphThroughputResponse = ThroughputSettingsGetResults; - /** Optional parameters. */ -export interface GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams +export interface CassandraDataCentersCreateUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4248,11 +5540,11 @@ export interface GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams resumeFrom?: string; } -/** Contains response data for the migrateGremlinGraphToAutoscale operation. */ -export type GremlinResourcesMigrateGremlinGraphToAutoscaleResponse = ThroughputSettingsGetResults; +/** Contains response data for the createUpdate operation. */ +export type CassandraDataCentersCreateUpdateResponse = DataCenterResource; /** Optional parameters. */ -export interface GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams +export interface CassandraDataCentersUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4260,22 +5552,8 @@ export interface GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalPa resumeFrom?: string; } -/** Contains response data for the migrateGremlinGraphToManualThroughput operation. */ -export type GremlinResourcesMigrateGremlinGraphToManualThroughputResponse = ThroughputSettingsGetResults; - -/** Optional parameters. */ -export interface LocationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type LocationsListResponse = LocationListResult; - -/** Optional parameters. */ -export interface LocationsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LocationsGetResponse = LocationGetResult; +/** Contains response data for the update operation. */ +export type CassandraDataCentersUpdateResponse = DataCenterResource; /** Optional parameters. */ export interface NotebookWorkspacesListByDatabaseAccountOptionalParams @@ -4419,9 +5697,9 @@ export interface RestorableSqlContainersListOptionalParams extends coreClient.OperationOptions { /** The resource ID of the SQL database. */ restorableSqlDatabaseRid?: string; - /** The snapshot create timestamp after which snapshots need to be listed. */ + /** Restorable Sql containers event feed start time. */ startTime?: string; - /** The snapshot create timestamp before which snapshots need to be listed. */ + /** Restorable Sql containers event feed end time. */ endTime?: string; } @@ -4450,6 +5728,10 @@ export type RestorableMongodbDatabasesListResponse = RestorableMongodbDatabasesL /** Optional parameters. */ export interface RestorableMongodbCollectionsListOptionalParams extends coreClient.OperationOptions { + /** Restorable MongoDB collections event feed start time. */ + startTime?: string; + /** Restorable MongoDB collections event feed end time. */ + endTime?: string; /** The resource ID of the MongoDB database. */ restorableMongodbDatabaseRid?: string; } @@ -4470,112 +5752,71 @@ export interface RestorableMongodbResourcesListOptionalParams export type RestorableMongodbResourcesListResponse = RestorableMongodbResourcesListResult; /** Optional parameters. */ -export interface CassandraClustersListBySubscriptionOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listBySubscription operation. */ -export type CassandraClustersListBySubscriptionResponse = ListClusters; - -/** Optional parameters. */ -export interface CassandraClustersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type CassandraClustersListByResourceGroupResponse = ListClusters; - -/** Optional parameters. */ -export interface CassandraClustersGetOptionalParams +export interface RestorableGremlinDatabasesListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type CassandraClustersGetResponse = ClusterResource; - -/** Optional parameters. */ -export interface CassandraClustersDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +/** Contains response data for the list operation. */ +export type RestorableGremlinDatabasesListResponse = RestorableGremlinDatabasesListResult; /** Optional parameters. */ -export interface CassandraClustersCreateUpdateOptionalParams +export interface RestorableGremlinGraphsListOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** Restorable Gremlin graphs event feed start time. */ + startTime?: string; + /** Restorable Gremlin graphs event feed end time. */ + endTime?: string; + /** The resource ID of the Gremlin database. */ + restorableGremlinDatabaseRid?: string; } -/** Contains response data for the createUpdate operation. */ -export type CassandraClustersCreateUpdateResponse = ClusterResource; +/** Contains response data for the list operation. */ +export type RestorableGremlinGraphsListResponse = RestorableGremlinGraphsListResult; /** Optional parameters. */ -export interface CassandraClustersUpdateOptionalParams +export interface RestorableGremlinResourcesListOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** The location where the restorable resources are located. */ + restoreLocation?: string; + /** The timestamp when the restorable resources existed. */ + restoreTimestampInUtc?: string; } -/** Contains response data for the update operation. */ -export type CassandraClustersUpdateResponse = ClusterResource; +/** Contains response data for the list operation. */ +export type RestorableGremlinResourcesListResponse = RestorableGremlinResourcesListResult; /** Optional parameters. */ -export interface CassandraClustersInvokeCommandOptionalParams +export interface RestorableTablesListOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** Restorable Tables event feed start time. */ + startTime?: string; + /** Restorable Tables event feed end time. */ + endTime?: string; } -/** Contains response data for the invokeCommand operation. */ -export type CassandraClustersInvokeCommandResponse = CommandOutput; - -/** Optional parameters. */ -export interface CassandraClustersDeallocateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +/** Contains response data for the list operation. */ +export type RestorableTablesListResponse = RestorableTablesListResult; /** Optional parameters. */ -export interface CassandraClustersStartOptionalParams +export interface RestorableTableResourcesListOptionalParams extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; + /** The location where the restorable resources are located. */ + restoreLocation?: string; + /** The timestamp when the restorable resources existed. */ + restoreTimestampInUtc?: string; } -/** Optional parameters. */ -export interface CassandraClustersStatusOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the status operation. */ -export type CassandraClustersStatusResponse = CassandraClusterPublicStatus; - -/** Optional parameters. */ -export interface CassandraDataCentersListOptionalParams - extends coreClient.OperationOptions {} - /** Contains response data for the list operation. */ -export type CassandraDataCentersListResponse = ListDataCenters; +export type RestorableTableResourcesListResponse = RestorableTableResourcesListResult; /** Optional parameters. */ -export interface CassandraDataCentersGetOptionalParams +export interface ServiceListOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the get operation. */ -export type CassandraDataCentersGetResponse = DataCenterResource; +/** Contains response data for the list operation. */ +export type ServiceListResponse = ServiceResourceListResult; /** Optional parameters. */ -export interface CassandraDataCentersDeleteOptionalParams +export interface ServiceCreateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4583,20 +5824,17 @@ export interface CassandraDataCentersDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the create operation. */ +export type ServiceCreateResponse = ServiceResource; + /** Optional parameters. */ -export interface CassandraDataCentersCreateUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} +export interface ServiceGetOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the createUpdate operation. */ -export type CassandraDataCentersCreateUpdateResponse = DataCenterResource; +/** Contains response data for the get operation. */ +export type ServiceGetResponse = ServiceResource; /** Optional parameters. */ -export interface CassandraDataCentersUpdateOptionalParams +export interface ServiceDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -4604,9 +5842,6 @@ export interface CassandraDataCentersUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type CassandraDataCentersUpdateResponse = DataCenterResource; - /** Optional parameters. */ export interface CosmosDBManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts index 0a71df6f6b70..186f45b7340f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/mappers.ts @@ -8,78 +8,6 @@ import * as coreClient from "@azure/core-client"; -export const ManagedServiceIdentity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagedServiceIdentity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "Enum", - allowedValues: [ - "SystemAssigned", - "UserAssigned", - "SystemAssigned,UserAssigned", - "None" - ] - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties" - } - } - } - } - } - } -}; - -export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: - "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const IpAddressOrRange: coreClient.CompositeMapper = { type: { name: "Composite", @@ -393,6 +321,29 @@ export const RestoreParameters: coreClient.CompositeMapper = { } } } + }, + gremlinDatabasesToRestore: { + serializedName: "gremlinDatabasesToRestore", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GremlinDatabaseRestoreResource" + } + } + } + }, + tablesToRestore: { + serializedName: "tablesToRestore", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -424,6 +375,32 @@ export const DatabaseRestoreResource: coreClient.CompositeMapper = { } }; +export const GremlinDatabaseRestoreResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinDatabaseRestoreResource", + modelProperties: { + databaseName: { + serializedName: "databaseName", + type: { + name: "String" + } + }, + graphNames: { + serializedName: "graphNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const BackupPolicy: coreClient.CompositeMapper = { type: { name: "Composite", @@ -523,6 +500,22 @@ export const CorsPolicy: coreClient.CompositeMapper = { } }; +export const DiagnosticLogSettings: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DiagnosticLogSettings", + modelProperties: { + enableFullTextQuery: { + serializedName: "enableFullTextQuery", + type: { + name: "Enum", + allowedValues: ["None", "True", "False"] + } + } + } + } +}; + export const Capacity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -624,6 +617,85 @@ export const ARMResourceProperties: coreClient.CompositeMapper = { name: "Dictionary", value: { type: { name: "String" } } } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedServiceIdentity" + } + } + } + } +}; + +export const ManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "UserAssigned", + "SystemAssigned,UserAssigned", + "None" + ] + } + }, + userAssignedIdentities: { + serializedName: "userAssignedIdentities", + type: { + name: "Dictionary", + value: { + type: { + name: "Composite", + className: + "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties" + } + } + } + } + } + } +}; + +export const Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + clientId: { + serializedName: "clientId", + readOnly: true, + type: { + name: "String" + } } } } @@ -826,6 +898,13 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { } } }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings" + } + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -838,6 +917,12 @@ export const DatabaseAccountUpdateParameters: coreClient.CompositeMapper = { name: "Composite", className: "Capacity" } + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean" + } } } } @@ -1526,10 +1611,10 @@ export const MetricAvailability: coreClient.CompositeMapper = { } }; -export const SqlDatabaseListResult: coreClient.CompositeMapper = { +export const GraphResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseListResult", + className: "GraphResourcesListResult", modelProperties: { value: { serializedName: "value", @@ -1539,7 +1624,7 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SqlDatabaseGetResults" + className: "GraphResourceGetResults" } } } @@ -1548,10 +1633,10 @@ export const SqlDatabaseListResult: coreClient.CompositeMapper = { } }; -export const SqlDatabaseResource: coreClient.CompositeMapper = { +export const GraphResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SqlDatabaseResource", + className: "GraphResource", modelProperties: { id: { serializedName: "id", @@ -1564,36 +1649,6 @@ export const SqlDatabaseResource: coreClient.CompositeMapper = { } }; -export const ExtendedResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ExtendedResourceProperties", - modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String" - } - }, - ts: { - serializedName: "_ts", - readOnly: true, - type: { - name: "Number" - } - }, - etag: { - serializedName: "_etag", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - export const OptionsResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1653,16 +1708,84 @@ export const CreateUpdateOptions: coreClient.CompositeMapper = { } }; -export const ThroughputSettingsResource: coreClient.CompositeMapper = { +export const SqlDatabaseListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ThroughputSettingsResource", + className: "SqlDatabaseListResult", modelProperties: { - throughput: { - serializedName: "throughput", + value: { + serializedName: "value", + readOnly: true, type: { - name: "Number" - } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDatabaseGetResults" + } + } + } + } + } + } +}; + +export const SqlDatabaseResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseResource", + modelProperties: { + id: { + serializedName: "id", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const ExtendedResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ExtendedResourceProperties", + modelProperties: { + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String" + } + }, + ts: { + serializedName: "_ts", + readOnly: true, + type: { + name: "Number" + } + }, + etag: { + serializedName: "_etag", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ThroughputSettingsResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ThroughputSettingsResource", + modelProperties: { + throughput: { + serializedName: "throughput", + type: { + name: "Number" + } }, autoscaleSettings: { serializedName: "autoscaleSettings", @@ -1772,6 +1895,135 @@ export const CloudError: coreClient.CompositeMapper = { } }; +export const ClientEncryptionKeysListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeysListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClientEncryptionKeyGetResults" + } + } + } + } + } + } +}; + +export const ClientEncryptionKeyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeyResource", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + encryptionAlgorithm: { + serializedName: "encryptionAlgorithm", + type: { + name: "String" + } + }, + wrappedDataEncryptionKey: { + serializedName: "wrappedDataEncryptionKey", + type: { + name: "ByteArray" + } + }, + keyWrapMetadata: { + serializedName: "keyWrapMetadata", + type: { + name: "Composite", + className: "KeyWrapMetadata" + } + } + } + } +}; + +export const KeyWrapMetadata: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "KeyWrapMetadata", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + value: { + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const ARMProxyResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ARMProxyResource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ClientEncryptionKeyCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeyCreateUpdateParameters", + modelProperties: { + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ClientEncryptionKeyResource" + } + } + } + } +}; + export const SqlContainerListResult: coreClient.CompositeMapper = { type: { name: "Composite", @@ -2837,6 +3089,13 @@ export const LocationProperties: coreClient.CompositeMapper = { name: "Composite", className: "LocationProperties", modelProperties: { + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, supportsAvailabilityZone: { serializedName: "supportsAvailabilityZone", readOnly: true, @@ -2867,49 +3126,20 @@ export const LocationProperties: coreClient.CompositeMapper = { } }; -export const ARMProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ARMProxyResource", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { +export const CassandraViewListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceListResult", + className: "CassandraViewListResult", modelProperties: { value: { serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "NotebookWorkspace" + className: "CassandraViewGetResults" } } } @@ -2918,21 +3148,21 @@ export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { } }; -export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = { +export const CassandraViewResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "NotebookWorkspaceConnectionInfoResult", + className: "CassandraViewResource", modelProperties: { - authToken: { - serializedName: "authToken", - readOnly: true, + id: { + serializedName: "id", + required: true, type: { name: "String" } }, - notebookServerEndpoint: { - serializedName: "notebookServerEndpoint", - readOnly: true, + viewDefinition: { + serializedName: "viewDefinition", + required: true, type: { name: "String" } @@ -2941,32 +3171,1216 @@ export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = } }; -export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { +export const DataTransferJobProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "PrivateEndpointConnectionListResult", + className: "DataTransferJobProperties", modelProperties: { - value: { - serializedName: "value", + jobName: { + serializedName: "jobName", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "PrivateEndpointConnection" - } - } + name: "String" } - } - } - } -}; - -export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkResourceListResult", - modelProperties: { + }, + source: { + serializedName: "source", + type: { + name: "Composite", + className: "DataTransferDataSourceSink" + } + }, + destination: { + serializedName: "destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + }, + percentageComplete: { + serializedName: "percentageComplete", + readOnly: true, + type: { + name: "Number" + } + }, + lastUpdatedUtcTime: { + serializedName: "lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + workerCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "workerCount", + type: { + name: "Number" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const DataTransferDataSourceSink: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: { + serializedName: "component", + clientName: "component" + }, + modelProperties: { + component: { + defaultValue: "CosmosDBCassandra", + serializedName: "component", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const DataTransferJobFeedResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferJobFeedResults", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataTransferJobGetResults" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const ListClusters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListClusters", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ClusterResource" + } + } + } + } + } + } +}; + +export const ClusterResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterResourceProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + restoreFromBackupId: { + serializedName: "restoreFromBackupId", + type: { + name: "String" + } + }, + delegatedManagementSubnetId: { + serializedName: "delegatedManagementSubnetId", + type: { + name: "String" + } + }, + cassandraVersion: { + serializedName: "cassandraVersion", + type: { + name: "String" + } + }, + clusterNameOverride: { + serializedName: "clusterNameOverride", + type: { + name: "String" + } + }, + authenticationMethod: { + serializedName: "authenticationMethod", + type: { + name: "String" + } + }, + initialCassandraAdminPassword: { + serializedName: "initialCassandraAdminPassword", + type: { + name: "String" + } + }, + prometheusEndpoint: { + serializedName: "prometheusEndpoint", + type: { + name: "Composite", + className: "SeedNode" + } + }, + repairEnabled: { + serializedName: "repairEnabled", + type: { + name: "Boolean" + } + }, + clientCertificates: { + serializedName: "clientCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } + } + }, + externalGossipCertificates: { + serializedName: "externalGossipCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } + } + }, + gossipCertificates: { + serializedName: "gossipCertificates", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } + } + }, + externalSeedNodes: { + serializedName: "externalSeedNodes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SeedNode" + } + } + } + }, + seedNodes: { + serializedName: "seedNodes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SeedNode" + } + } + } + }, + hoursBetweenBackups: { + serializedName: "hoursBetweenBackups", + type: { + name: "Number" + } + }, + deallocated: { + serializedName: "deallocated", + type: { + name: "Boolean" + } + }, + cassandraAuditLoggingEnabled: { + serializedName: "cassandraAuditLoggingEnabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const SeedNode: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SeedNode", + modelProperties: { + ipAddress: { + serializedName: "ipAddress", + type: { + name: "String" + } + } + } + } +}; + +export const Certificate: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Certificate", + modelProperties: { + pem: { + serializedName: "pem", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedCassandraARMResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCassandraARMResourceProperties", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } + }, + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "ManagedCassandraManagedServiceIdentity" + } + } + } + } +}; + +export const ManagedCassandraManagedServiceIdentity: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCassandraManagedServiceIdentity", + modelProperties: { + principalId: { + serializedName: "principalId", + readOnly: true, + type: { + name: "String" + } + }, + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + } + } + } +}; + +export const CommandPostBody: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommandPostBody", + modelProperties: { + command: { + serializedName: "command", + required: true, + type: { + name: "String" + } + }, + arguments: { + serializedName: "arguments", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + host: { + serializedName: "host", + required: true, + type: { + name: "String" + } + }, + cassandraStopStart: { + serializedName: "cassandra-stop-start", + type: { + name: "Boolean" + } + }, + readwrite: { + serializedName: "readwrite", + type: { + name: "Boolean" + } + } + } + } +}; + +export const CommandOutput: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CommandOutput", + modelProperties: { + commandOutput: { + serializedName: "commandOutput", + type: { + name: "String" + } + } + } + } +}; + +export const ListBackups: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListBackups", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "BackupResource" + } + } + } + } + } + } +}; + +export const BackupResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupResourceProperties", + modelProperties: { + timestamp: { + serializedName: "timestamp", + type: { + name: "DateTime" + } + } + } + } +}; + +export const ListDataCenters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ListDataCenters", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataCenterResource" + } + } + } + } + } + } +}; + +export const DataCenterResourceProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataCenterResourceProperties", + modelProperties: { + provisioningState: { + serializedName: "provisioningState", + type: { + name: "String" + } + }, + dataCenterLocation: { + serializedName: "dataCenterLocation", + type: { + name: "String" + } + }, + delegatedSubnetId: { + serializedName: "delegatedSubnetId", + type: { + name: "String" + } + }, + nodeCount: { + serializedName: "nodeCount", + type: { + name: "Number" + } + }, + seedNodes: { + serializedName: "seedNodes", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SeedNode" + } + } + } + }, + base64EncodedCassandraYamlFragment: { + serializedName: "base64EncodedCassandraYamlFragment", + type: { + name: "String" + } + }, + managedDiskCustomerKeyUri: { + serializedName: "managedDiskCustomerKeyUri", + type: { + name: "String" + } + }, + backupStorageCustomerKeyUri: { + serializedName: "backupStorageCustomerKeyUri", + type: { + name: "String" + } + }, + sku: { + serializedName: "sku", + type: { + name: "String" + } + }, + diskSku: { + serializedName: "diskSku", + type: { + name: "String" + } + }, + diskCapacity: { + serializedName: "diskCapacity", + type: { + name: "Number" + } + }, + availabilityZone: { + serializedName: "availabilityZone", + type: { + name: "Boolean" + } + }, + authenticationMethodLdapProperties: { + serializedName: "authenticationMethodLdapProperties", + type: { + name: "Composite", + className: "AuthenticationMethodLdapProperties" + } + } + } + } +}; + +export const AuthenticationMethodLdapProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AuthenticationMethodLdapProperties", + modelProperties: { + serverHostname: { + serializedName: "serverHostname", + type: { + name: "String" + } + }, + serverPort: { + serializedName: "serverPort", + type: { + name: "Number" + } + }, + serviceUserDistinguishedName: { + serializedName: "serviceUserDistinguishedName", + type: { + name: "String" + } + }, + serviceUserPassword: { + serializedName: "serviceUserPassword", + type: { + name: "String" + } + }, + searchBaseDistinguishedName: { + serializedName: "searchBaseDistinguishedName", + type: { + name: "String" + } + }, + searchFilterTemplate: { + serializedName: "searchFilterTemplate", + type: { + name: "String" + } + }, + serverCertificates: { + serializedName: "serverCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Certificate" + } + } + } + } + } + } +}; + +export const CassandraClusterPublicStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraClusterPublicStatus", + modelProperties: { + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + reaperStatus: { + serializedName: "reaperStatus", + type: { + name: "Composite", + className: "ManagedCassandraReaperStatus" + } + }, + connectionErrors: { + serializedName: "connectionErrors", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ConnectionError" + } + } + } + }, + dataCenters: { + serializedName: "dataCenters", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CassandraClusterPublicStatusDataCentersItem" + } + } + } + } + } + } +}; + +export const ManagedCassandraReaperStatus: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ManagedCassandraReaperStatus", + modelProperties: { + healthy: { + serializedName: "healthy", + type: { + name: "Boolean" + } + }, + repairRunIds: { + serializedName: "repairRunIds", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + }, + repairSchedules: { + serializedName: "repairSchedules", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } + } + } + } +}; + +export const ConnectionError: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ConnectionError", + modelProperties: { + connectionState: { + serializedName: "connectionState", + type: { + name: "String" + } + }, + iPFrom: { + serializedName: "iPFrom", + type: { + name: "String" + } + }, + iPTo: { + serializedName: "iPTo", + type: { + name: "String" + } + }, + port: { + serializedName: "port", + type: { + name: "Number" + } + }, + exception: { + serializedName: "exception", + type: { + name: "String" + } + } + } + } +}; + +export const CassandraClusterPublicStatusDataCentersItem: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraClusterPublicStatusDataCentersItem", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + seedNodes: { + serializedName: "seedNodes", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + nodes: { + serializedName: "nodes", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: + "ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems" + } + } + } + } + } + } +}; + +export const ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: + "ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems", + modelProperties: { + address: { + serializedName: "address", + type: { + name: "String" + } + }, + state: { + serializedName: "state", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + load: { + serializedName: "load", + type: { + name: "String" + } + }, + tokens: { + serializedName: "tokens", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + size: { + serializedName: "size", + type: { + name: "Number" + } + }, + hostID: { + serializedName: "hostID", + type: { + name: "String" + } + }, + rack: { + serializedName: "rack", + type: { + name: "String" + } + }, + timestamp: { + serializedName: "timestamp", + type: { + name: "String" + } + }, + diskUsedKB: { + serializedName: "diskUsedKB", + type: { + name: "Number" + } + }, + diskFreeKB: { + serializedName: "diskFreeKB", + type: { + name: "Number" + } + }, + memoryUsedKB: { + serializedName: "memoryUsedKB", + type: { + name: "Number" + } + }, + memoryBuffersAndCachedKB: { + serializedName: "memoryBuffersAndCachedKB", + type: { + name: "Number" + } + }, + memoryFreeKB: { + serializedName: "memoryFreeKB", + type: { + name: "Number" + } + }, + memoryTotalKB: { + serializedName: "memoryTotalKB", + type: { + name: "Number" + } + }, + cpuUsage: { + serializedName: "cpuUsage", + type: { + name: "Number" + } + } + } + } +}; + +export const Privilege: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Privilege", + modelProperties: { + resource: { + serializedName: "resource", + type: { + name: "Composite", + className: "PrivilegeResource" + } + }, + actions: { + serializedName: "actions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivilegeResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivilegeResource", + modelProperties: { + db: { + serializedName: "db", + type: { + name: "String" + } + }, + collection: { + serializedName: "collection", + type: { + name: "String" + } + } + } + } +}; + +export const Role: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "Role", + modelProperties: { + db: { + serializedName: "db", + type: { + name: "String" + } + }, + role: { + serializedName: "role", + type: { + name: "String" + } + } + } + } +}; + +export const MongoRoleDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoRoleDefinitionCreateUpdateParameters", + modelProperties: { + roleName: { + serializedName: "properties.roleName", + type: { + name: "String" + } + }, + type: { + serializedName: "properties.type", + type: { + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"] + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + privileges: { + serializedName: "properties.privileges", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Privilege" + } + } + } + }, + roles: { + serializedName: "properties.roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role" + } + } + } + } + } + } +}; + +export const MongoRoleDefinitionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoRoleDefinitionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MongoRoleDefinitionGetResults" + } + } + } + } + } + } +}; + +export const MongoUserDefinitionCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoUserDefinitionCreateUpdateParameters", + modelProperties: { + userName: { + serializedName: "properties.userName", + type: { + name: "String" + } + }, + password: { + serializedName: "properties.password", + type: { + name: "String" + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + customData: { + serializedName: "properties.customData", + type: { + name: "String" + } + }, + roles: { + serializedName: "properties.roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role" + } + } + } + }, + mechanisms: { + serializedName: "properties.mechanisms", + type: { + name: "String" + } + } + } + } +}; + +export const MongoUserDefinitionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoUserDefinitionListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MongoUserDefinitionGetResults" + } + } + } + } + } + } +}; + +export const NotebookWorkspaceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NotebookWorkspaceListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "NotebookWorkspace" + } + } + } + } + } + } +}; + +export const NotebookWorkspaceConnectionInfoResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "NotebookWorkspaceConnectionInfoResult", + modelProperties: { + authToken: { + serializedName: "authToken", + readOnly: true, + type: { + name: "String" + } + }, + notebookServerEndpoint: { + serializedName: "notebookServerEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + } + } + } +}; + +export const PrivateLinkResourceListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { value: { serializedName: "value", type: { @@ -3218,343 +4632,101 @@ export const RestorableDatabaseAccountGetResult: coreClient.CompositeMapper = { type: { name: "Composite", className: "RestorableLocationResource" - } - } - } - } - } - } -}; - -export const RestorableLocationResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableLocationResource", - modelProperties: { - locationName: { - serializedName: "locationName", - readOnly: true, - type: { - name: "String" - } - }, - regionalDatabaseAccountInstanceId: { - serializedName: "regionalDatabaseAccountInstanceId", - readOnly: true, - type: { - name: "String" - } - }, - creationTime: { - serializedName: "creationTime", - readOnly: true, - type: { - name: "DateTime" - } - }, - deletionTime: { - serializedName: "deletionTime", - readOnly: true, - type: { - name: "DateTime" - } - } - } - } -}; - -export const ContinuousBackupRestoreLocation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContinuousBackupRestoreLocation", - modelProperties: { - location: { - serializedName: "location", - type: { - name: "String" - } - } - } - } -}; - -export const BackupInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "BackupInformation", - modelProperties: { - continuousBackupInformation: { - serializedName: "continuousBackupInformation", - type: { - name: "Composite", - className: "ContinuousBackupInformation" - } - } - } - } -}; - -export const ContinuousBackupInformation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ContinuousBackupInformation", - modelProperties: { - latestRestorableTimestamp: { - serializedName: "latestRestorableTimestamp", - type: { - name: "String" - } - } - } - } -}; - -export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlDatabasesListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableSqlDatabaseGetResult" - } - } - } - } - } - } -}; - -export const RestorableSqlDatabaseGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlDatabaseGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResource" - } - } - } - } -}; - -export const RestorableSqlDatabasePropertiesResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResource", - modelProperties: { - rid: { - serializedName: "_rid", - readOnly: true, - type: { - name: "String" - } - }, - operationType: { - serializedName: "operationType", - readOnly: true, - type: { - name: "String" - } - }, - eventTimestamp: { - serializedName: "eventTimestamp", - readOnly: true, - type: { - name: "String" - } - }, - ownerId: { - serializedName: "ownerId", - readOnly: true, - type: { - name: "String" - } - }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, - type: { - name: "String" - } - }, - database: { - serializedName: "database", - type: { - name: "Composite", - className: "RestorableSqlDatabasePropertiesResourceDatabase" - } - } - } - } -}; - -export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlContainersListResult", - modelProperties: { - value: { - serializedName: "value", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "RestorableSqlContainerGetResult" - } - } - } - } - } - } -}; - -export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "RestorableSqlContainerGetResult", - modelProperties: { - id: { - serializedName: "id", - readOnly: true, - type: { - name: "String" - } - }, - name: { - serializedName: "name", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - readOnly: true, - type: { - name: "String" - } - }, - resource: { - serializedName: "properties.resource", - type: { - name: "Composite", - className: "RestorableSqlContainerPropertiesResource" + } + } } } } } }; -export const RestorableSqlContainerPropertiesResource: coreClient.CompositeMapper = { +export const RestorableLocationResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlContainerPropertiesResource", + className: "RestorableLocationResource", modelProperties: { - rid: { - serializedName: "_rid", + locationName: { + serializedName: "locationName", readOnly: true, type: { name: "String" } }, - operationType: { - serializedName: "operationType", + regionalDatabaseAccountInstanceId: { + serializedName: "regionalDatabaseAccountInstanceId", readOnly: true, type: { name: "String" } }, - eventTimestamp: { - serializedName: "eventTimestamp", + creationTime: { + serializedName: "creationTime", readOnly: true, type: { - name: "String" + name: "DateTime" } }, - ownerId: { - serializedName: "ownerId", + deletionTime: { + serializedName: "deletionTime", readOnly: true, type: { - name: "String" + name: "DateTime" } - }, - ownerResourceId: { - serializedName: "ownerResourceId", - readOnly: true, + } + } + } +}; + +export const ContinuousBackupRestoreLocation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ContinuousBackupRestoreLocation", + modelProperties: { + location: { + serializedName: "location", type: { name: "String" } - }, - container: { - serializedName: "container", + } + } + } +}; + +export const BackupInformation: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "BackupInformation", + modelProperties: { + continuousBackupInformation: { + serializedName: "continuousBackupInformation", type: { name: "Composite", - className: "RestorableSqlContainerPropertiesResourceContainer" + className: "ContinuousBackupInformation" } } } } }; -export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { +export const ContinuousBackupInformation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableSqlResourcesListResult", + className: "ContinuousBackupInformation", modelProperties: { - value: { - serializedName: "value", - readOnly: true, + latestRestorableTimestamp: { + serializedName: "latestRestorableTimestamp", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DatabaseRestoreResource" - } - } + name: "String" } } } } }; -export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = { +export const RestorableSqlDatabasesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbDatabasesListResult", + className: "RestorableSqlDatabasesListResult", modelProperties: { value: { serializedName: "value", @@ -3564,7 +4736,7 @@ export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = element: { type: { name: "Composite", - className: "RestorableMongodbDatabaseGetResult" + className: "RestorableSqlDatabaseGetResult" } } } @@ -3573,10 +4745,10 @@ export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = } }; -export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { +export const RestorableSqlDatabaseGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbDatabaseGetResult", + className: "RestorableSqlDatabaseGetResult", modelProperties: { id: { serializedName: "id", @@ -3603,17 +4775,17 @@ export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableMongodbDatabasePropertiesResource" + className: "RestorableSqlDatabasePropertiesResource" } } } } }; -export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMapper = { +export const RestorableSqlDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbDatabasePropertiesResource", + className: "RestorableSqlDatabasePropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -3649,15 +4821,22 @@ export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMa type: { name: "String" } + }, + database: { + serializedName: "database", + type: { + name: "Composite", + className: "RestorableSqlDatabasePropertiesResourceDatabase" + } } } } }; -export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper = { +export const RestorableSqlContainersListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbCollectionsListResult", + className: "RestorableSqlContainersListResult", modelProperties: { value: { serializedName: "value", @@ -3667,7 +4846,7 @@ export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper element: { type: { name: "Composite", - className: "RestorableMongodbCollectionGetResult" + className: "RestorableSqlContainerGetResult" } } } @@ -3676,10 +4855,10 @@ export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper } }; -export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = { +export const RestorableSqlContainerGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbCollectionGetResult", + className: "RestorableSqlContainerGetResult", modelProperties: { id: { serializedName: "id", @@ -3706,17 +4885,17 @@ export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = serializedName: "properties.resource", type: { name: "Composite", - className: "RestorableMongodbCollectionPropertiesResource" + className: "RestorableSqlContainerPropertiesResource" } } } } }; -export const RestorableMongodbCollectionPropertiesResource: coreClient.CompositeMapper = { +export const RestorableSqlContainerPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbCollectionPropertiesResource", + className: "RestorableSqlContainerPropertiesResource", modelProperties: { rid: { serializedName: "_rid", @@ -3752,15 +4931,22 @@ export const RestorableMongodbCollectionPropertiesResource: coreClient.Composite type: { name: "String" } + }, + container: { + serializedName: "container", + type: { + name: "Composite", + className: "RestorableSqlContainerPropertiesResourceContainer" + } } } } }; -export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = { +export const RestorableSqlResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "RestorableMongodbResourcesListResult", + className: "RestorableSqlResourcesListResult", modelProperties: { value: { serializedName: "value", @@ -3779,178 +4965,101 @@ export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = } }; -export const ListClusters: coreClient.CompositeMapper = { +export const RestorableMongodbDatabasesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ListClusters", + className: "RestorableMongodbDatabasesListResult", modelProperties: { value: { serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "ClusterResource" - } - } - } - } - } - } -}; - -export const ClusterResourceProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterResourceProperties", - modelProperties: { - provisioningState: { - serializedName: "provisioningState", - type: { - name: "String" - } - }, - restoreFromBackupId: { - serializedName: "restoreFromBackupId", - type: { - name: "String" - } - }, - delegatedManagementSubnetId: { - serializedName: "delegatedManagementSubnetId", - type: { - name: "String" - } - }, - cassandraVersion: { - serializedName: "cassandraVersion", - type: { - name: "String" - } - }, - clusterNameOverride: { - serializedName: "clusterNameOverride", - type: { - name: "String" - } - }, - authenticationMethod: { - serializedName: "authenticationMethod", - type: { - name: "String" - } - }, - initialCassandraAdminPassword: { - serializedName: "initialCassandraAdminPassword", - type: { - name: "String" - } - }, - prometheusEndpoint: { - serializedName: "prometheusEndpoint", - type: { - name: "Composite", - className: "SeedNode" - } - }, - repairEnabled: { - serializedName: "repairEnabled", - type: { - name: "Boolean" - } - }, - clientCertificates: { - serializedName: "clientCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Certificate" - } - } - } - }, - externalGossipCertificates: { - serializedName: "externalGossipCertificates", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Certificate" - } - } - } - }, - gossipCertificates: { - serializedName: "gossipCertificates", - readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Certificate" - } - } - } - }, - externalSeedNodes: { - serializedName: "externalSeedNodes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SeedNode" - } - } - } - }, - seedNodes: { - serializedName: "seedNodes", readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "SeedNode" + className: "RestorableMongodbDatabaseGetResult" } } } + } + } + } +}; + +export const RestorableMongodbDatabaseGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableMongodbDatabaseGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" + } }, - hoursBetweenBackups: { - serializedName: "hoursBetweenBackups", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Number" + name: "String" } }, - deallocated: { - serializedName: "deallocated", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - cassandraAuditLoggingEnabled: { - serializedName: "cassandraAuditLoggingEnabled", + resource: { + serializedName: "properties.resource", type: { - name: "Boolean" + name: "Composite", + className: "RestorableMongodbDatabasePropertiesResource" } } } } }; -export const SeedNode: coreClient.CompositeMapper = { +export const RestorableMongodbDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SeedNode", + className: "RestorableMongodbDatabasePropertiesResource", modelProperties: { - ipAddress: { - serializedName: "ipAddress", + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String" + } + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String" + } + }, + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String" + } + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String" + } + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, type: { name: "String" } @@ -3959,25 +5068,32 @@ export const SeedNode: coreClient.CompositeMapper = { } }; -export const Certificate: coreClient.CompositeMapper = { +export const RestorableMongodbCollectionsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Certificate", + className: "RestorableMongodbCollectionsListResult", modelProperties: { - pem: { - serializedName: "pem", + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableMongodbCollectionGetResult" + } + } } } } } }; -export const ManagedCassandraARMResourceProperties: coreClient.CompositeMapper = { +export const RestorableMongodbCollectionGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCassandraARMResourceProperties", + className: "RestorableMongodbCollectionGetResult", modelProperties: { id: { serializedName: "id", @@ -4000,51 +5116,53 @@ export const ManagedCassandraARMResourceProperties: coreClient.CompositeMapper = name: "String" } }, - location: { - serializedName: "location", - type: { - name: "String" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - identity: { - serializedName: "identity", + resource: { + serializedName: "properties.resource", type: { name: "Composite", - className: "ManagedCassandraManagedServiceIdentity" + className: "RestorableMongodbCollectionPropertiesResource" } } } } }; -export const ManagedCassandraManagedServiceIdentity: coreClient.CompositeMapper = { +export const RestorableMongodbCollectionPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCassandraManagedServiceIdentity", + className: "RestorableMongodbCollectionPropertiesResource", modelProperties: { - principalId: { - serializedName: "principalId", + rid: { + serializedName: "_rid", readOnly: true, type: { name: "String" } }, - tenantId: { - serializedName: "tenantId", + operationType: { + serializedName: "operationType", readOnly: true, type: { name: "String" } }, - type: { - serializedName: "type", + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String" + } + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String" + } + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, type: { name: "String" } @@ -4053,55 +5171,123 @@ export const ManagedCassandraManagedServiceIdentity: coreClient.CompositeMapper } }; -export const CommandPostBody: coreClient.CompositeMapper = { +export const RestorableMongodbResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CommandPostBody", + className: "RestorableMongodbResourcesListResult", modelProperties: { - command: { - serializedName: "command", - required: true, + value: { + serializedName: "value", + readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DatabaseRestoreResource" + } + } } - }, - arguments: { - serializedName: "arguments", + } + } + } +}; + +export const RestorableGremlinDatabasesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinDatabasesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RestorableGremlinDatabaseGetResult" + } + } + } + } + } + } +}; + +export const RestorableGremlinDatabaseGetResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinDatabaseGetResult", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, + type: { + name: "String" } }, - host: { - serializedName: "host", - required: true, + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - cassandraStopStart: { - serializedName: "cassandra-stop-start", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - readwrite: { - serializedName: "readwrite", + resource: { + serializedName: "properties.resource", type: { - name: "Boolean" + name: "Composite", + className: "RestorableGremlinDatabasePropertiesResource" } } } } }; -export const CommandOutput: coreClient.CompositeMapper = { +export const RestorableGremlinDatabasePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CommandOutput", + className: "RestorableGremlinDatabasePropertiesResource", modelProperties: { - commandOutput: { - serializedName: "commandOutput", + rid: { + serializedName: "_rid", + readOnly: true, + type: { + name: "String" + } + }, + operationType: { + serializedName: "operationType", + readOnly: true, + type: { + name: "String" + } + }, + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, + type: { + name: "String" + } + }, + ownerId: { + serializedName: "ownerId", + readOnly: true, + type: { + name: "String" + } + }, + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, type: { name: "String" } @@ -4110,10 +5296,10 @@ export const CommandOutput: coreClient.CompositeMapper = { } }; -export const ListDataCenters: coreClient.CompositeMapper = { +export const RestorableGremlinGraphsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ListDataCenters", + className: "RestorableGremlinGraphsListResult", modelProperties: { value: { serializedName: "value", @@ -4123,7 +5309,7 @@ export const ListDataCenters: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DataCenterResource" + className: "RestorableGremlinGraphGetResult" } } } @@ -4132,132 +5318,123 @@ export const ListDataCenters: coreClient.CompositeMapper = { } }; -export const DataCenterResourceProperties: coreClient.CompositeMapper = { +export const RestorableGremlinGraphGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataCenterResourceProperties", + className: "RestorableGremlinGraphGetResult", modelProperties: { - provisioningState: { - serializedName: "provisioningState", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - dataCenterLocation: { - serializedName: "dataCenterLocation", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - delegatedSubnetId: { - serializedName: "delegatedSubnetId", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - nodeCount: { - serializedName: "nodeCount", + resource: { + serializedName: "properties.resource", type: { - name: "Number" + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource" } - }, - seedNodes: { - serializedName: "seedNodes", + } + } + } +}; + +export const RestorableGremlinGraphPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableGremlinGraphPropertiesResource", + modelProperties: { + rid: { + serializedName: "_rid", readOnly: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SeedNode" - } - } - } - }, - base64EncodedCassandraYamlFragment: { - serializedName: "base64EncodedCassandraYamlFragment", type: { name: "String" } }, - managedDiskCustomerKeyUri: { - serializedName: "managedDiskCustomerKeyUri", + operationType: { + serializedName: "operationType", + readOnly: true, type: { name: "String" } }, - backupStorageCustomerKeyUri: { - serializedName: "backupStorageCustomerKeyUri", + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, type: { name: "String" } }, - sku: { - serializedName: "sku", + ownerId: { + serializedName: "ownerId", + readOnly: true, type: { name: "String" } }, - diskSku: { - serializedName: "diskSku", + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, type: { name: "String" } - }, - diskCapacity: { - serializedName: "diskCapacity", - type: { - name: "Number" - } - }, - availabilityZone: { - serializedName: "availabilityZone", - type: { - name: "Boolean" - } } } } }; -export const CassandraClusterPublicStatus: coreClient.CompositeMapper = { +export const RestorableGremlinResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraClusterPublicStatus", + className: "RestorableGremlinResourcesListResult", modelProperties: { - eTag: { - serializedName: "eTag", - type: { - name: "String" - } - }, - reaperStatus: { - serializedName: "reaperStatus", - type: { - name: "Composite", - className: "ManagedCassandraReaperStatus" - } - }, - connectionErrors: { - serializedName: "connectionErrors", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ConnectionError" + className: "GremlinDatabaseRestoreResource" } } } - }, - dataCenters: { - serializedName: "dataCenters", + } + } + } +}; + +export const RestorableTablesListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RestorableTablesListResult", + modelProperties: { + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "CassandraClusterPublicStatusDataCentersItem" + className: "RestorableTableGetResult" } } } @@ -4266,66 +5443,79 @@ export const CassandraClusterPublicStatus: coreClient.CompositeMapper = { } }; -export const ManagedCassandraReaperStatus: coreClient.CompositeMapper = { +export const RestorableTableGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagedCassandraReaperStatus", + className: "RestorableTableGetResult", modelProperties: { - healthy: { - serializedName: "healthy", + id: { + serializedName: "id", + readOnly: true, type: { - name: "Boolean" + name: "String" } }, - repairRunIds: { - serializedName: "repairRunIds", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - repairSchedules: { - serializedName: "repairSchedules", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" + } + }, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "RestorableTablePropertiesResource" } } } } }; -export const ConnectionError: coreClient.CompositeMapper = { +export const RestorableTablePropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ConnectionError", + className: "RestorableTablePropertiesResource", modelProperties: { - connectionState: { - serializedName: "connectionState", + rid: { + serializedName: "_rid", + readOnly: true, type: { name: "String" } }, - iPFrom: { - serializedName: "iPFrom", + operationType: { + serializedName: "operationType", + readOnly: true, type: { name: "String" } }, - iPTo: { - serializedName: "iPTo", + eventTimestamp: { + serializedName: "eventTimestamp", + readOnly: true, type: { name: "String" } }, - port: { - serializedName: "port", + ownerId: { + serializedName: "ownerId", + readOnly: true, type: { - name: "Number" + name: "String" } }, - exception: { - serializedName: "exception", + ownerResourceId: { + serializedName: "ownerResourceId", + readOnly: true, type: { name: "String" } @@ -4334,19 +5524,14 @@ export const ConnectionError: coreClient.CompositeMapper = { } }; -export const CassandraClusterPublicStatusDataCentersItem: coreClient.CompositeMapper = { +export const RestorableTableResourcesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraClusterPublicStatusDataCentersItem", + className: "RestorableTableResourcesListResult", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - seedNodes: { - serializedName: "seedNodes", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { @@ -4355,129 +5540,109 @@ export const CassandraClusterPublicStatusDataCentersItem: coreClient.CompositeMa } } } - }, - nodes: { - serializedName: "nodes", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: - "ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems" - } - } - } } } } }; -export const ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems: coreClient.CompositeMapper = { +export const ServiceResourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: - "ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems", + className: "ServiceResourceListResult", modelProperties: { - address: { - serializedName: "address", - type: { - name: "String" - } - }, - state: { - serializedName: "state", - type: { - name: "String" - } - }, - status: { - serializedName: "status", - type: { - name: "String" - } - }, - load: { - serializedName: "load", - type: { - name: "String" - } - }, - tokens: { - serializedName: "tokens", + value: { + serializedName: "value", + readOnly: true, type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "ServiceResource" } } } - }, - size: { - serializedName: "size", - type: { - name: "Number" - } - }, - hostID: { - serializedName: "hostID", - type: { - name: "String" - } - }, - rack: { - serializedName: "rack", + } + } + } +}; + +export const ServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "ServiceResourceProperties", + type: { + name: "Composite", + className: "ServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: { + serializedName: "serviceType", + clientName: "serviceType" + }, + modelProperties: { + creationTime: { + serializedName: "creationTime", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - timestamp: { - serializedName: "timestamp", + instanceSize: { + serializedName: "instanceSize", type: { name: "String" } }, - diskUsedKB: { - serializedName: "diskUsedKB", - type: { - name: "Number" - } - }, - diskFreeKB: { - serializedName: "diskFreeKB", + instanceCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "instanceCount", type: { name: "Number" } }, - memoryUsedKB: { - serializedName: "memoryUsedKB", + serviceType: { + serializedName: "serviceType", + required: true, type: { - name: "Number" + name: "String" } }, - memoryBuffersAndCachedKB: { - serializedName: "memoryBuffersAndCachedKB", + status: { + serializedName: "status", + readOnly: true, type: { - name: "Number" + name: "String" } - }, - memoryFreeKB: { - serializedName: "memoryFreeKB", + } + } + } +}; + +export const ServiceResourceCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceResourceCreateUpdateParameters", + modelProperties: { + instanceSize: { + serializedName: "properties.instanceSize", type: { - name: "Number" + name: "String" } }, - memoryTotalKB: { - serializedName: "memoryTotalKB", + instanceCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.instanceCount", type: { name: "Number" } }, - cpuUsage: { - serializedName: "cpuUsage", + serviceType: { + serializedName: "properties.serviceType", type: { - name: "Number" + name: "String" } } } @@ -4517,6 +5682,100 @@ export const PeriodicModeProperties: coreClient.CompositeMapper = { } }; +export const DataTransferServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferServiceResource", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataTransferServiceResourceProperties" + } + } + } + } +}; + +export const RegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "RegionalServiceResource", + modelProperties: { + name: { + serializedName: "name", + readOnly: true, + type: { + name: "String" + } + }, + location: { + serializedName: "location", + readOnly: true, + type: { + name: "String" + } + }, + status: { + serializedName: "status", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const SqlDedicatedGatewayServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDedicatedGatewayServiceResource", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "SqlDedicatedGatewayServiceResourceProperties" + } + } + } + } +}; + +export const GraphAPIComputeServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphAPIComputeServiceResource", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "GraphAPIComputeServiceResourceProperties" + } + } + } + } +}; + +export const MaterializedViewsBuilderServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResource", + modelProperties: { + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResourceProperties" + } + } + } + } +}; + export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -4572,13 +5831,6 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, systemData: { serializedName: "systemData", type: { @@ -4854,6 +6106,13 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { } } }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings" + } + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -4866,6 +6125,12 @@ export const DatabaseAccountGetResults: coreClient.CompositeMapper = { name: "Composite", className: "Capacity" } + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean" + } } } } @@ -4883,13 +6148,6 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = name: "String" } }, - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "ManagedServiceIdentity" - } - }, consistencyPolicy: { serializedName: "properties.consistencyPolicy", type: { @@ -5078,6 +6336,13 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = } } }, + diagnosticLogSettings: { + serializedName: "properties.diagnosticLogSettings", + type: { + name: "Composite", + className: "DiagnosticLogSettings" + } + }, disableLocalAuth: { serializedName: "properties.disableLocalAuth", type: { @@ -5097,6 +6362,60 @@ export const DatabaseAccountCreateUpdateParameters: coreClient.CompositeMapper = name: "Composite", className: "Capacity" } + }, + enableMaterializedViews: { + serializedName: "properties.enableMaterializedViews", + type: { + name: "Boolean" + } + } + } + } +}; + +export const GraphResourceGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GraphResourceGetPropertiesResource" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "GraphResourceGetPropertiesOptions" + } + } + } + } +}; + +export const GraphResourceCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GraphResource" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions" + } } } } @@ -5619,17 +6938,65 @@ export const GremlinDatabaseGetResults: coreClient.CompositeMapper = { } }; -export const GremlinDatabaseCreateUpdateParameters: coreClient.CompositeMapper = { +export const GremlinDatabaseCreateUpdateParameters: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinDatabaseCreateUpdateParameters", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinDatabaseResource" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "CreateUpdateOptions" + } + } + } + } +}; + +export const GremlinGraphGetResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinGraphGetResults", + modelProperties: { + ...ARMResourceProperties.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "GremlinGraphGetPropertiesResource" + } + }, + options: { + serializedName: "properties.options", + type: { + name: "Composite", + className: "GremlinGraphGetPropertiesOptions" + } + } + } + } +}; + +export const GremlinGraphCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinDatabaseCreateUpdateParameters", + className: "GremlinGraphCreateUpdateParameters", modelProperties: { ...ARMResourceProperties.type.modelProperties, resource: { serializedName: "properties.resource", type: { name: "Composite", - className: "GremlinDatabaseResource" + className: "GremlinGraphResource" } }, options: { @@ -5643,41 +7010,41 @@ export const GremlinDatabaseCreateUpdateParameters: coreClient.CompositeMapper = } }; -export const GremlinGraphGetResults: coreClient.CompositeMapper = { +export const CassandraViewGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphGetResults", + className: "CassandraViewGetResults", modelProperties: { ...ARMResourceProperties.type.modelProperties, resource: { serializedName: "properties.resource", type: { name: "Composite", - className: "GremlinGraphGetPropertiesResource" + className: "CassandraViewGetPropertiesResource" } }, options: { serializedName: "properties.options", type: { name: "Composite", - className: "GremlinGraphGetPropertiesOptions" + className: "CassandraViewGetPropertiesOptions" } } } } }; -export const GremlinGraphCreateUpdateParameters: coreClient.CompositeMapper = { +export const CassandraViewCreateUpdateParameters: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphCreateUpdateParameters", + className: "CassandraViewCreateUpdateParameters", modelProperties: { ...ARMResourceProperties.type.modelProperties, resource: { serializedName: "properties.resource", type: { name: "Composite", - className: "GremlinGraphResource" + className: "CassandraViewResource" } }, options: { @@ -5822,6 +7189,126 @@ export const PartitionUsage: coreClient.CompositeMapper = { } }; +export const GraphResourceGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetPropertiesResource", + modelProperties: { + ...GraphResource.type.modelProperties + } + } +}; + +export const GraphResourceGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphResourceGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const SqlDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const SqlContainerGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlContainerGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const MongoDBDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoDBDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const MongoDBCollectionGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MongoDBCollectionGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const TableGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TableGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const CassandraKeyspaceGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraKeyspaceGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraTableGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinDatabaseGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GremlinGraphGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + +export const CassandraViewGetPropertiesOptions: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetPropertiesOptions", + modelProperties: { + ...OptionsResource.type.modelProperties + } + } +}; + export const SqlDatabaseGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -5888,6 +7375,17 @@ export const ThroughputSettingsGetPropertiesResource: coreClient.CompositeMapper } }; +export const ClientEncryptionKeyGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClientEncryptionKeyGetPropertiesResource", + modelProperties: { + ...ClientEncryptionKeyResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties + } + } +}; + export const SqlContainerGetPropertiesResource: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6009,6 +7507,17 @@ export const GremlinGraphGetPropertiesResource: coreClient.CompositeMapper = { } }; +export const CassandraViewGetPropertiesResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CassandraViewGetPropertiesResource", + modelProperties: { + ...CassandraViewResource.type.modelProperties, + ...ExtendedResourceProperties.type.modelProperties + } + } +}; + export const RestorableSqlContainerPropertiesResourceContainer: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6027,107 +7536,258 @@ export const RestorableSqlContainerPropertiesResourceContainer: coreClient.Compo } }; -export const SqlDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlDatabaseGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties - } - } -}; - -export const SqlContainerGetPropertiesOptions: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SqlContainerGetPropertiesOptions", - modelProperties: { - ...OptionsResource.type.modelProperties - } - } -}; - -export const MongoDBDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { +export const ClientEncryptionKeyGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBDatabaseGetPropertiesOptions", + className: "ClientEncryptionKeyGetResults", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + resource: { + serializedName: "properties.resource", + type: { + name: "Composite", + className: "ClientEncryptionKeyGetPropertiesResource" + } + } } } }; -export const MongoDBCollectionGetPropertiesOptions: coreClient.CompositeMapper = { +export const LocationGetResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MongoDBCollectionGetPropertiesOptions", + className: "LocationGetResult", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "LocationProperties" + } + } } } }; -export const TableGetPropertiesOptions: coreClient.CompositeMapper = { +export const CreateJobRequest: coreClient.CompositeMapper = { type: { name: "Composite", - className: "TableGetPropertiesOptions", + className: "CreateJobRequest", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataTransferJobProperties" + } + } } } }; -export const CassandraKeyspaceGetPropertiesOptions: coreClient.CompositeMapper = { +export const DataTransferJobGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraKeyspaceGetPropertiesOptions", + className: "DataTransferJobGetResults", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + jobName: { + serializedName: "properties.jobName", + readOnly: true, + type: { + name: "String" + } + }, + source: { + serializedName: "properties.source", + type: { + name: "Composite", + className: "DataTransferDataSourceSink" + } + }, + destination: { + serializedName: "properties.destination", + type: { + name: "Composite", + className: "DataTransferDataSourceSink" + } + }, + status: { + serializedName: "properties.status", + readOnly: true, + type: { + name: "String" + } + }, + percentageComplete: { + serializedName: "properties.percentageComplete", + readOnly: true, + type: { + name: "Number" + } + }, + lastUpdatedUtcTime: { + serializedName: "properties.lastUpdatedUtcTime", + readOnly: true, + type: { + name: "DateTime" + } + }, + workerCount: { + constraints: { + InclusiveMinimum: 0 + }, + serializedName: "properties.workerCount", + type: { + name: "Number" + } + }, + error: { + serializedName: "properties.error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } } } }; -export const CassandraTableGetPropertiesOptions: coreClient.CompositeMapper = { +export const BackupResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CassandraTableGetPropertiesOptions", + className: "BackupResource", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "BackupResourceProperties" + } + } } } }; -export const GremlinDatabaseGetPropertiesOptions: coreClient.CompositeMapper = { +export const DataCenterResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinDatabaseGetPropertiesOptions", + className: "DataCenterResource", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "DataCenterResourceProperties" + } + } } } }; -export const GremlinGraphGetPropertiesOptions: coreClient.CompositeMapper = { +export const MongoRoleDefinitionGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "GremlinGraphGetPropertiesOptions", + className: "MongoRoleDefinitionGetResults", modelProperties: { - ...OptionsResource.type.modelProperties + ...ARMProxyResource.type.modelProperties, + roleName: { + serializedName: "properties.roleName", + type: { + name: "String" + } + }, + typePropertiesType: { + serializedName: "properties.type", + type: { + name: "Enum", + allowedValues: ["BuiltInRole", "CustomRole"] + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + privileges: { + serializedName: "properties.privileges", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Privilege" + } + } + } + }, + roles: { + serializedName: "properties.roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role" + } + } + } + } } } }; -export const LocationGetResult: coreClient.CompositeMapper = { +export const MongoUserDefinitionGetResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LocationGetResult", + className: "MongoUserDefinitionGetResults", modelProperties: { ...ARMProxyResource.type.modelProperties, - properties: { - serializedName: "properties", + userName: { + serializedName: "properties.userName", type: { - name: "Composite", - className: "LocationProperties" + name: "String" + } + }, + password: { + serializedName: "properties.password", + type: { + name: "String" + } + }, + databaseName: { + serializedName: "properties.databaseName", + type: { + name: "String" + } + }, + customData: { + serializedName: "properties.customData", + type: { + name: "String" + } + }, + roles: { + serializedName: "properties.roles", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Role" + } + } + } + }, + mechanisms: { + serializedName: "properties.mechanisms", + type: { + name: "String" } } } @@ -6283,17 +7943,100 @@ export const SqlRoleAssignmentGetResults: coreClient.CompositeMapper = { } }; -export const DataCenterResource: coreClient.CompositeMapper = { +export const ServiceResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataCenterResource", + className: "ServiceResource", modelProperties: { ...ARMProxyResource.type.modelProperties, properties: { serializedName: "properties", type: { name: "Composite", - className: "DataCenterResourceProperties" + className: "ServiceResourceProperties" + } + } + } + } +}; + +export const CosmosCassandraDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBCassandra", + type: { + name: "Composite", + className: "CosmosCassandraDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + keyspaceName: { + serializedName: "keyspaceName", + required: true, + type: { + name: "String" + } + }, + tableName: { + serializedName: "tableName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const CosmosSqlDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "CosmosDBSql", + type: { + name: "Composite", + className: "CosmosSqlDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + databaseName: { + serializedName: "databaseName", + required: true, + type: { + name: "String" + } + }, + containerName: { + serializedName: "containerName", + required: true, + type: { + name: "String" + } + } + } + } +}; + +export const AzureBlobDataTransferDataSourceSink: coreClient.CompositeMapper = { + serializedName: "AzureBlobStorage", + type: { + name: "Composite", + className: "AzureBlobDataTransferDataSourceSink", + uberParent: "DataTransferDataSourceSink", + polymorphicDiscriminator: + DataTransferDataSourceSink.type.polymorphicDiscriminator, + modelProperties: { + ...DataTransferDataSourceSink.type.modelProperties, + containerName: { + serializedName: "containerName", + required: true, + type: { + name: "String" + } + }, + endpointUrl: { + serializedName: "endpointUrl", + type: { + name: "String" } } } @@ -6317,6 +8060,184 @@ export const ClusterResource: coreClient.CompositeMapper = { } }; +export const DataTransferServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "DataTransfer", + type: { + name: "Composite", + className: "DataTransferServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataTransferRegionalServiceResource" + } + } + } + } + } + } +}; + +export const SqlDedicatedGatewayServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "SqlDedicatedGateway", + type: { + name: "Composite", + className: "SqlDedicatedGatewayServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + sqlDedicatedGatewayEndpoint: { + serializedName: "sqlDedicatedGatewayEndpoint", + type: { + name: "String" + } + }, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SqlDedicatedGatewayRegionalServiceResource" + } + } + } + } + } + } +}; + +export const GraphAPIComputeServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "GraphAPICompute", + type: { + name: "Composite", + className: "GraphAPIComputeServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + graphApiComputeEndpoint: { + serializedName: "graphApiComputeEndpoint", + type: { + name: "String" + } + }, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "GraphAPIComputeRegionalServiceResource" + } + } + } + } + } + } +}; + +export const MaterializedViewsBuilderServiceResourceProperties: coreClient.CompositeMapper = { + serializedName: "MaterializedViewsBuilder", + type: { + name: "Composite", + className: "MaterializedViewsBuilderServiceResourceProperties", + uberParent: "ServiceResourceProperties", + additionalProperties: { type: { name: "Object" } }, + polymorphicDiscriminator: + ServiceResourceProperties.type.polymorphicDiscriminator, + modelProperties: { + ...ServiceResourceProperties.type.modelProperties, + locations: { + serializedName: "locations", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "MaterializedViewsBuilderRegionalServiceResource" + } + } + } + } + } + } +}; + +export const DataTransferRegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "DataTransferRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties + } + } +}; + +export const SqlDedicatedGatewayRegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SqlDedicatedGatewayRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties, + sqlDedicatedGatewayEndpoint: { + serializedName: "sqlDedicatedGatewayEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const GraphAPIComputeRegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "GraphAPIComputeRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties, + graphApiComputeEndpoint: { + serializedName: "graphApiComputeEndpoint", + readOnly: true, + type: { + name: "String" + } + } + } + } +}; + +export const MaterializedViewsBuilderRegionalServiceResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "MaterializedViewsBuilderRegionalServiceResource", + modelProperties: { + ...RegionalServiceResource.type.modelProperties + } + } +}; + export const PrivateEndpointConnection: coreClient.CompositeMapper = { type: { name: "Composite", @@ -6355,6 +8276,15 @@ export const PrivateEndpointConnection: coreClient.CompositeMapper = { export let discriminators = { BackupPolicy: BackupPolicy, + DataTransferDataSourceSink: DataTransferDataSourceSink, + ServiceResourceProperties: ServiceResourceProperties, "BackupPolicy.Periodic": PeriodicModeBackupPolicy, - "BackupPolicy.Continuous": ContinuousModeBackupPolicy + "BackupPolicy.Continuous": ContinuousModeBackupPolicy, + "DataTransferDataSourceSink.CosmosDBCassandra": CosmosCassandraDataTransferDataSourceSink, + "DataTransferDataSourceSink.CosmosDBSql": CosmosSqlDataTransferDataSourceSink, + "DataTransferDataSourceSink.AzureBlobStorage": AzureBlobDataTransferDataSourceSink, + "ServiceResourceProperties.DataTransfer": DataTransferServiceResourceProperties, + "ServiceResourceProperties.SqlDedicatedGateway": SqlDedicatedGatewayServiceResourceProperties, + "ServiceResourceProperties.GraphAPICompute": GraphAPIComputeServiceResourceProperties, + "ServiceResourceProperties.MaterializedViewsBuilder": MaterializedViewsBuilderServiceResourceProperties }; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts index 9837e7919213..ed70e2586d6c 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/models/parameters.ts @@ -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 body1: OperationParameter = { - parameterPath: "body", - mapper: CommandPostBodyMapper +export const createUpdateParameters1: OperationParameter = { + parameterPath: "createUpdateParameters", + mapper: ServiceResourceCreateUpdateParametersMapper }; -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 -}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts index 8470e9b3795d..f8e74319a6c9 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraClusters.ts @@ -18,6 +18,8 @@ import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListByResourceGroupOptionalParams, + BackupResource, + CassandraClustersListBackupsOptionalParams, CassandraClustersListBySubscriptionResponse, CassandraClustersListByResourceGroupResponse, CassandraClustersGetOptionalParams, @@ -30,6 +32,9 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CassandraClustersListBackupsResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, @@ -128,6 +133,66 @@ export class CassandraClustersImpl implements CassandraClusters { } } + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + public listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listBackupsPagingAll( + resourceGroupName, + clusterName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listBackupsPagingPage( + resourceGroupName, + clusterName, + options + ); + } + }; + } + + private async *listBackupsPagingPage( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams + ): AsyncIterableIterator { + let result = await this._listBackups( + resourceGroupName, + clusterName, + options + ); + yield result.value || []; + } + + private async *listBackupsPagingAll( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listBackupsPagingPage( + resourceGroupName, + clusterName, + options + )) { + yield* page; + } + } + /** * List all managed Cassandra clusters in this subscription. * @param options The options parameters. @@ -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 { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, options }, + listBackupsOperationSpec + ); + } + + /** + * Get the properties of an individual backup of this cluster that is available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param backupId Id of a restorable backup of a Cassandra cluster. + * @param options The options parameters. + */ + getBackup( + resourceGroupName: string, + clusterName: string, + backupId: string, + options?: CassandraClustersGetBackupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, clusterName, backupId, options }, + getBackupOperationSpec + ); + } + /** * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate * the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an @@ -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", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts index c42eb23c1cf0..12248ff0212a 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/cassandraResources.ts @@ -19,6 +19,8 @@ import { CassandraResourcesListCassandraKeyspacesOptionalParams, CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, CassandraResourcesListCassandraKeyspacesResponse, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, @@ -49,7 +51,22 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams, CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, - CassandraResourcesMigrateCassandraTableToManualThroughputResponse + CassandraResourcesMigrateCassandraTableToManualThroughputResponse, + CassandraResourcesListCassandraViewsResponse, + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse } from "../models"; /// @@ -193,6 +210,74 @@ export class CassandraResourcesImpl implements CassandraResources { } } + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + public listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listCassandraViewsPagingAll( + resourceGroupName, + accountName, + keyspaceName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options + ); + } + }; + } + + private async *listCassandraViewsPagingPage( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams + ): AsyncIterableIterator { + let result = await this._listCassandraViews( + resourceGroupName, + accountName, + keyspaceName, + options + ); + yield result.value || []; + } + + private async *listCassandraViewsPagingAll( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listCassandraViewsPagingPage( + resourceGroupName, + accountName, + keyspaceName, + options + )) { + yield* page; + } + } + /** * Lists the Cassandra keyspaces under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -1298,209 +1383,773 @@ export class CassandraResourcesImpl implements CassandraResources { ); return poller.pollUntilDone(); } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listCassandraKeyspacesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceGetResults - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createUpdateCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.CassandraKeyspaceGetResults - }, - 201: { - bodyMapper: Mappers.CassandraKeyspaceGetResults - }, - 202: { - bodyMapper: Mappers.CassandraKeyspaceGetResults - }, - 204: { - bodyMapper: Mappers.CassandraKeyspaceGetResults - } - }, - requestBody: Parameters.createUpdateCassandraKeyspaceParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", - httpMethod: "DELETE", - responses: { 200: {}, 201: {}, 202: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - serializer -}; -const getCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults - } - }, - requestBody: Parameters.updateThroughputParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const migrateCassandraKeyspaceToAutoscaleOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const migrateCassandraKeyspaceToManualThroughputOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 202: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 204: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.keyspaceName - ], - headerParameters: [Parameters.accept], - serializer + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + private _listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, options }, + listCassandraViewsOperationSpec + ); + } + + /** + * Gets the Cassandra view under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, viewName, options }, + getCassandraViewOperationSpec + ); + } + + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + async beginCreateUpdateCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options + }, + createUpdateCassandraViewOperationSpec + ); + 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 { + const poller = await this.beginCreateUpdateCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + createUpdateCassandraViewParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginDeleteCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, keyspaceName, viewName, options }, + deleteCassandraViewOperationSpec + ); + 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 { + const poller = await this.beginDeleteCassandraView( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account + * with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewThroughputOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, keyspaceName, viewName, options }, + getCassandraViewThroughputOperationSpec + ); + } + + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + async beginUpdateCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState< + CassandraResourcesUpdateCassandraViewThroughputResponse + >, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options + }, + updateCassandraViewThroughputOperationSpec + ); + 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 { + const poller = await this.beginUpdateCassandraViewThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + updateThroughputParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToAutoscale( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + ): Promise< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + >, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, keyspaceName, viewName, options }, + migrateCassandraViewToAutoscaleOperationSpec + ); + 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 { + const poller = await this.beginMigrateCassandraViewToAutoscale( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + async beginMigrateCassandraViewToManualThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + >, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, keyspaceName, viewName, options }, + migrateCassandraViewToManualThroughputOperationSpec + ); + 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 { + const poller = await this.beginMigrateCassandraViewToManualThroughput( + resourceGroupName, + accountName, + keyspaceName, + viewName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listCassandraKeyspacesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceListResult + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceGetResults + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createUpdateCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.CassandraKeyspaceGetResults + }, + 201: { + bodyMapper: Mappers.CassandraKeyspaceGetResults + }, + 202: { + bodyMapper: Mappers.CassandraKeyspaceGetResults + }, + 204: { + bodyMapper: Mappers.CassandraKeyspaceGetResults + } + }, + requestBody: Parameters.createUpdateCassandraKeyspaceParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteCassandraKeyspaceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + serializer +}; +const getCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateCassandraKeyspaceThroughputOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults + } + }, + requestBody: Parameters.updateThroughputParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const migrateCassandraKeyspaceToAutoscaleOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToAutoscale", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept], + serializer +}; +const migrateCassandraKeyspaceToManualThroughputOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/cassandraKeyspaces/{keyspaceName}/throughputSettings/default/migrateToManualThroughput", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 204: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.keyspaceName + ], + headerParameters: [Parameters.accept], + serializer }; const listCassandraTablesOperationSpec: coreClient.OperationSpec = { path: @@ -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 +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts new file mode 100644 index 000000000000..2161c154dd36 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/dataTransferJobs.ts @@ -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"; + +/// +/** Class containing DataTransferJobs operations. */ +export class DataTransferJobsImpl implements DataTransferJobs { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class DataTransferJobs class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listByDatabaseAccountPagingAll( + resourceGroupName, + accountName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options + ); + } + }; + } + + private async *listByDatabaseAccountPagingPage( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams + ): AsyncIterableIterator { + let result = await this._listByDatabaseAccount( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listByDatabaseAccountNext( + resourceGroupName, + accountName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listByDatabaseAccountPagingAll( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByDatabaseAccountPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + + /** + * Creates a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param jobCreateParameters Parameters to create Data Transfer Job + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + jobName: string, + jobCreateParameters: CreateJobRequest, + options?: DataTransferJobsCreateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, jobCreateParameters, options }, + createOperationSpec + ); + } + + /** + * Get a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, jobName, options }, + getOperationSpec + ); + } + + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listByDatabaseAccountOperationSpec + ); + } + + /** + * ListByDatabaseAccountNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param nextLink The nextLink from the previous successful call to the ListByDatabaseAccount method. + * @param options The options parameters. + */ + private _listByDatabaseAccountNext( + resourceGroupName: string, + accountName: string, + nextLink: string, + options?: DataTransferJobsListByDatabaseAccountNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, nextLink, options }, + listByDatabaseAccountNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const createOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/dataTransferJobs/{jobName}", + httpMethod: "PUT", + responses: { + 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 +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts new file mode 100644 index 000000000000..a7aea8fe8b90 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/graphResources.ts @@ -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"; + +/// +/** Class containing GraphResources operations. */ +export class GraphResourcesImpl implements GraphResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class GraphResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + public listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listGraphsPagingAll( + resourceGroupName, + accountName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listGraphsPagingPage( + resourceGroupName, + accountName, + options + ); + } + }; + } + + private async *listGraphsPagingPage( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams + ): AsyncIterableIterator { + let result = await this._listGraphs( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + } + + private async *listGraphsPagingAll( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listGraphsPagingPage( + resourceGroupName, + accountName, + options + )) { + yield* page; + } + } + + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + private _listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, options }, + listGraphsOperationSpec + ); + } + + /** + * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + getGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesGetGraphOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, graphName, options }, + getGraphOperationSpec + ); + } + + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + async beginCreateUpdateGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GraphResourcesCreateUpdateGraphResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options + }, + createUpdateGraphOperationSpec + ); + 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 { + const poller = await this.beginCreateUpdateGraph( + resourceGroupName, + accountName, + graphName, + createUpdateGraphParameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + async beginDeleteGraphResource( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, graphName, options }, + deleteGraphResourceOperationSpec + ); + 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 { + const poller = await this.beginDeleteGraphResource( + resourceGroupName, + accountName, + graphName, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listGraphsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GraphResourcesListResult + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getGraphOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.GraphResourceGetResults + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createUpdateGraphOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.GraphResourceGetResults + }, + 201: { + bodyMapper: Mappers.GraphResourceGetResults + }, + 202: { + bodyMapper: Mappers.GraphResourceGetResults + }, + 204: { + bodyMapper: Mappers.GraphResourceGetResults + } + }, + requestBody: Parameters.createUpdateGraphParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteGraphResourceOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/graphs/{graphName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.graphName + ], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts index 647739a73ce3..2035a1546c74 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/gremlinResources.ts @@ -49,7 +49,10 @@ import { GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams, GremlinResourcesMigrateGremlinGraphToAutoscaleResponse, GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams, - GremlinResourcesMigrateGremlinGraphToManualThroughputResponse + GremlinResourcesMigrateGremlinGraphToManualThroughputResponse, + ContinuousBackupRestoreLocation, + GremlinResourcesRetrieveContinuousBackupInformationOptionalParams, + GremlinResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -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 => { + 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 { + 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 +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts index f5d67c730604..5cba7fc94170 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/index.ts @@ -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"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts index 2ce0456f3b02..4623ec4d9ede 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/mongoDBResources.ts @@ -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 { + 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 { + let result = await this._listMongoRoleDefinitions( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + } + + private async *listMongoRoleDefinitionsPagingAll( + resourceGroupName: string, + accountName: string, + options?: MongoDBResourcesListMongoRoleDefinitionsOptionalParams + ): AsyncIterableIterator { + 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 { + 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 { + let result = await this._listMongoUserDefinitions( + resourceGroupName, + accountName, + options + ); + yield result.value || []; + } + + private async *listMongoUserDefinitionsPagingAll( + resourceGroupName: string, + accountName: string, + options?: MongoDBResourcesListMongoUserDefinitionsOptionalParams + ): AsyncIterableIterator { + 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. @@ -1299,33 +1437,51 @@ export class MongoDBResourcesImpl implements MongoDBResources { } /** - * Retrieves continuous backup information for a Mongodb collection. + * 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 databaseName Cosmos DB database name. - * @param collectionName Cosmos DB collection name. - * @param location The name of the continuous backup restore location. * @param options The options parameters. */ - async beginRetrieveContinuousBackupInformation( + getMongoRoleDefinition( + mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, - databaseName: string, - collectionName: string, - location: ContinuousBackupRestoreLocation, - options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams + options?: MongoDBResourcesGetMongoRoleDefinitionOptionalParams + ): Promise { + 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< - MongoDBResourcesRetrieveContinuousBackupInformationResponse + MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse >, - MongoDBResourcesRetrieveContinuousBackupInformationResponse + MongoDBResourcesCreateUpdateMongoRoleDefinitionResponse > > { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec - ): Promise => { + ): Promise => { return this.client.sendOperationRequest(args, spec); }; const sendOperation = async ( @@ -1364,170 +1520,604 @@ export class MongoDBResourcesImpl implements MongoDBResources { const lro = new LroImpl( sendOperation, { + mongoRoleDefinitionId, resourceGroupName, accountName, - databaseName, - collectionName, - location, + createUpdateMongoRoleDefinitionParameters, options }, - retrieveContinuousBackupInformationOperationSpec + createUpdateMongoRoleDefinitionOperationSpec ); return new LroEngine(lro, { resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs, - lroResourceLocationConfig: "location" + intervalInMs: options?.updateIntervalInMs }); } /** - * Retrieves continuous backup information for a Mongodb collection. + * 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 databaseName Cosmos DB database name. - * @param collectionName Cosmos DB collection name. - * @param location The name of the continuous backup restore location. + * @param createUpdateMongoRoleDefinitionParameters The properties required to create or update a Role + * Definition. * @param options The options parameters. */ - async beginRetrieveContinuousBackupInformationAndWait( + async beginCreateUpdateMongoRoleDefinitionAndWait( + mongoRoleDefinitionId: string, resourceGroupName: string, accountName: string, - databaseName: string, - collectionName: string, - location: ContinuousBackupRestoreLocation, - options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams - ): Promise { - const poller = await this.beginRetrieveContinuousBackupInformation( + createUpdateMongoRoleDefinitionParameters: MongoRoleDefinitionCreateUpdateParameters, + options?: MongoDBResourcesCreateUpdateMongoRoleDefinitionOptionalParams + ): Promise { + const poller = await this.beginCreateUpdateMongoRoleDefinition( + mongoRoleDefinitionId, resourceGroupName, accountName, - databaseName, - collectionName, - location, + createUpdateMongoRoleDefinitionParameters, options ); return poller.pollUntilDone(); } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); -const listMongoDBDatabasesOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MongoDBDatabaseListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getMongoDBDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.MongoDBDatabaseGetResults - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createUpdateMongoDBDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.MongoDBDatabaseGetResults - }, - 201: { - bodyMapper: Mappers.MongoDBDatabaseGetResults - }, - 202: { - bodyMapper: Mappers.MongoDBDatabaseGetResults - }, - 204: { - bodyMapper: Mappers.MongoDBDatabaseGetResults - } - }, - requestBody: Parameters.createUpdateMongoDBDatabaseParameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteMongoDBDatabaseOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", - httpMethod: "DELETE", - responses: { 200: {}, 201: {}, 202: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName - ], - serializer -}; -const getMongoDBDatabaseThroughputOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.accountName, - Parameters.databaseName - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateMongoDBDatabaseThroughputOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 201: { - bodyMapper: Mappers.ThroughputSettingsGetResults - }, - 202: { + /** + * 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, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { 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 { + 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 { + 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 { + 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 => { + 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 { + 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, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { 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 { + 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 { + 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. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + async beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + location: ContinuousBackupRestoreLocation, + options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + MongoDBResourcesRetrieveContinuousBackupInformationResponse + >, + MongoDBResourcesRetrieveContinuousBackupInformationResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + collectionName, + location, + options + }, + retrieveContinuousBackupInformationOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "location" + }); + } + + /** + * Retrieves continuous backup information for a Mongodb collection. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param collectionName Cosmos DB collection name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + async beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + collectionName: string, + location: ContinuousBackupRestoreLocation, + options?: MongoDBResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise { + const poller = await this.beginRetrieveContinuousBackupInformation( + resourceGroupName, + accountName, + databaseName, + collectionName, + location, + options + ); + return poller.pollUntilDone(); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listMongoDBDatabasesOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MongoDBDatabaseListResult + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getMongoDBDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.MongoDBDatabaseGetResults + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createUpdateMongoDBDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.MongoDBDatabaseGetResults + }, + 201: { + bodyMapper: Mappers.MongoDBDatabaseGetResults + }, + 202: { + bodyMapper: Mappers.MongoDBDatabaseGetResults + }, + 204: { + bodyMapper: Mappers.MongoDBDatabaseGetResults + } + }, + requestBody: Parameters.createUpdateMongoDBDatabaseParameters, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteMongoDBDatabaseOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}", + httpMethod: "DELETE", + responses: { 200: {}, 201: {}, 202: {}, 204: {} }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + serializer +}; +const getMongoDBDatabaseThroughputOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.accountName, + Parameters.databaseName + ], + headerParameters: [Parameters.accept], + serializer +}; +const updateMongoDBDatabaseThroughputOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/throughputSettings/default", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 201: { + bodyMapper: Mappers.ThroughputSettingsGetResults + }, + 202: { bodyMapper: Mappers.ThroughputSettingsGetResults }, 204: { @@ -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", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts new file mode 100644 index 000000000000..070289b229d2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinDatabases.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { RestorableGremlinDatabases } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + RestorableGremlinDatabaseGetResult, + RestorableGremlinDatabasesListOptionalParams, + RestorableGremlinDatabasesListResponse +} from "../models"; + +/// +/** Class containing RestorableGremlinDatabases operations. */ +export class RestorableGremlinDatabasesImpl + implements RestorableGremlinDatabases { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableGremlinDatabases class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the + * restorable account. This helps in scenario where database was accidentally deleted to get the + * deletion time. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the + * restorable account. This helps in scenario where database was accidentally deleted to get the + * deletion time. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinDatabases", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableGremlinDatabasesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts new file mode 100644 index 000000000000..41317222e7f8 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinGraphs.ts @@ -0,0 +1,132 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { RestorableGremlinGraphs } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + RestorableGremlinGraphGetResult, + RestorableGremlinGraphsListOptionalParams, + RestorableGremlinGraphsListResponse +} from "../models"; + +/// +/** Class containing RestorableGremlinGraphs operations. */ +export class RestorableGremlinGraphsImpl implements RestorableGremlinGraphs { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableGremlinGraphs class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific + * database. This helps in scenario where container was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific + * database. This helps in scenario where container was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGraphs", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableGremlinGraphsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.startTime, + Parameters.endTime, + Parameters.restorableGremlinDatabaseRid + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts new file mode 100644 index 000000000000..c815ae12294e --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableGremlinResources.ts @@ -0,0 +1,134 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { RestorableGremlinResources } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + GremlinDatabaseRestoreResource, + RestorableGremlinResourcesListOptionalParams, + RestorableGremlinResourcesListResponse +} from "../models"; + +/// +/** Class containing RestorableGremlinResources operations. */ +export class RestorableGremlinResourcesImpl + implements RestorableGremlinResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableGremlinResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp + * and location. This helps in scenarios to validate what resources exist at given timestamp and + * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' + * permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp + * and location. This helps in scenarios to validate what resources exist at given timestamp and + * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' + * permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableGremlinResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableGremlinResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.restoreLocation, + Parameters.restoreTimestampInUtc + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts index 4b31a1898033..c2603171f907 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableMongodbCollections.ts @@ -118,6 +118,8 @@ const listOperationSpec: coreClient.OperationSpec = { }, queryParameters: [ Parameters.apiVersion, + Parameters.startTime, + Parameters.endTime, Parameters.restorableMongodbDatabaseRid ], urlParameters: [ diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts new file mode 100644 index 000000000000..12d26ce2cc07 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTableResources.ts @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { 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"; + +/// +/** Class containing RestorableTableResources operations. */ +export class RestorableTableResourcesImpl implements RestorableTableResources { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableTableResources class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Return a list of tables that exist on the account at the given timestamp and location. This helps in + * scenarios to validate what resources exist at given timestamp and location. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Return a list of tables that exist on the account at the given timestamp and location. This helps in + * scenarios to validate what resources exist at given timestamp and location. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTableResources", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableTableResourcesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.restoreLocation, + Parameters.restoreTimestampInUtc + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts new file mode 100644 index 000000000000..159a4b3b576f --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/restorableTables.ts @@ -0,0 +1,131 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { RestorableTables } from "../operationsInterfaces"; +import * as coreClient from "@azure/core-client"; +import * as Mappers from "../models/mappers"; +import * as Parameters from "../models/parameters"; +import { CosmosDBManagementClient } from "../cosmosDBManagementClient"; +import { + RestorableTableGetResult, + RestorableTablesListOptionalParams, + RestorableTablesListResponse +} from "../models"; + +/// +/** Class containing RestorableTables operations. */ +export class RestorableTablesImpl implements RestorableTables { + private readonly client: CosmosDBManagementClient; + + /** + * Initialize a new instance of the class RestorableTables class. + * @param client Reference to the service client + */ + constructor(client: CosmosDBManagementClient) { + this.client = client; + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario + * where table was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + public list( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(location, instanceId, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(location, instanceId, options); + } + }; + } + + private async *listPagingPage( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(location, instanceId, options); + yield result.value || []; + } + + private async *listPagingAll( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + location, + instanceId, + options + )) { + yield* page; + } + } + + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario + * where table was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + private _list( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { location, instanceId, options }, + listOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableTables", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RestorableTablesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.startTime, + Parameters.endTime + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.location1, + Parameters.instanceId + ], + headerParameters: [Parameters.accept], + serializer +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts new file mode 100644 index 000000000000..c3e2b11dffba --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/service.ts @@ -0,0 +1,414 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { 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"; + +/// +/** 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 { + 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 { + let result = await this._list(resourceGroupName, accountName, options); + yield result.value || []; + } + + private async *listPagingAll( + resourceGroupName: string, + accountName: string, + options?: ServiceListOptionalParams + ): AsyncIterableIterator { + 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 { + 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, ServiceCreateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + 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 { + 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 { + 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, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, accountName, 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 { + 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 +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts index da3f6486d66e..4e05e682839e 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/sqlResources.ts @@ -17,6 +17,8 @@ import { LroImpl } from "../lroImpl"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, + ClientEncryptionKeyGetResults, + SqlResourcesListClientEncryptionKeysOptionalParams, SqlContainerGetResults, SqlResourcesListSqlContainersOptionalParams, SqlStoredProcedureGetResults, @@ -45,6 +47,12 @@ import { SqlResourcesMigrateSqlDatabaseToAutoscaleResponse, SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams, SqlResourcesMigrateSqlDatabaseToManualThroughputResponse, + SqlResourcesListClientEncryptionKeysResponse, + SqlResourcesGetClientEncryptionKeyOptionalParams, + SqlResourcesGetClientEncryptionKeyResponse, + ClientEncryptionKeyCreateUpdateParameters, + SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams, + SqlResourcesCreateUpdateClientEncryptionKeyResponse, SqlResourcesListSqlContainersResponse, SqlResourcesGetSqlContainerOptionalParams, SqlResourcesGetSqlContainerResponse, @@ -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 { + const iter = this.listClientEncryptionKeysPagingAll( + resourceGroupName, + accountName, + databaseName, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listClientEncryptionKeysPagingPage( + resourceGroupName, + accountName, + databaseName, + options + ); + } + }; + } + + private async *listClientEncryptionKeysPagingPage( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): AsyncIterableIterator { + let result = await this._listClientEncryptionKeys( + resourceGroupName, + accountName, + databaseName, + options + ); + yield result.value || []; + } + + private async *listClientEncryptionKeysPagingAll( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listClientEncryptionKeysPagingPage( + resourceGroupName, + accountName, + databaseName, + options + )) { + yield* page; + } + } + /** * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -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 { + return this.client.sendOperationRequest( + { resourceGroupName, accountName, databaseName, options }, + listClientEncryptionKeysOperationSpec + ); + } + + /** + * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param options The options parameters. + */ + getClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + options?: SqlResourcesGetClientEncryptionKeyOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + options + }, + getClientEncryptionKeyOperationSpec + ); + } + + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + async beginCreateUpdateClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { + resourceGroupName, + accountName, + databaseName, + clientEncryptionKeyName, + createUpdateClientEncryptionKeyParameters, + options + }, + createUpdateClientEncryptionKeyOperationSpec + ); + 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 { + 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", diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts index be63b4156b94..dc44b8f6ad97 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operations/tableResources.ts @@ -32,7 +32,10 @@ import { TableResourcesMigrateTableToAutoscaleOptionalParams, TableResourcesMigrateTableToAutoscaleResponse, TableResourcesMigrateTableToManualThroughputOptionalParams, - TableResourcesMigrateTableToManualThroughputResponse + TableResourcesMigrateTableToManualThroughputResponse, + ContinuousBackupRestoreLocation, + TableResourcesRetrieveContinuousBackupInformationOptionalParams, + TableResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -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 => { + 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 { + 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 +}; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts index 72642eaf23ab..54abec27aa0f 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraClusters.ts @@ -12,6 +12,8 @@ import { ClusterResource, CassandraClustersListBySubscriptionOptionalParams, CassandraClustersListByResourceGroupOptionalParams, + BackupResource, + CassandraClustersListBackupsOptionalParams, CassandraClustersGetOptionalParams, CassandraClustersGetResponse, CassandraClustersDeleteOptionalParams, @@ -22,6 +24,8 @@ import { CommandPostBody, CassandraClustersInvokeCommandOptionalParams, CassandraClustersInvokeCommandResponse, + CassandraClustersGetBackupOptionalParams, + CassandraClustersGetBackupResponse, CassandraClustersDeallocateOptionalParams, CassandraClustersStartOptionalParams, CassandraClustersStatusOptionalParams, @@ -47,6 +51,17 @@ export interface CassandraClusters { resourceGroupName: string, options?: CassandraClustersListByResourceGroupOptionalParams ): PagedAsyncIterableIterator; + /** + * List the backups of this cluster that are available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param options The options parameters. + */ + listBackups( + resourceGroupName: string, + clusterName: string, + options?: CassandraClustersListBackupsOptionalParams + ): PagedAsyncIterableIterator; /** * Get the properties of a managed Cassandra cluster. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -175,6 +190,19 @@ export interface CassandraClusters { body: CommandPostBody, options?: CassandraClustersInvokeCommandOptionalParams ): Promise; + /** + * Get the properties of an individual backup of this cluster that is available to restore. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Managed Cassandra cluster name. + * @param backupId Id of a restorable backup of a Cassandra cluster. + * @param options The options parameters. + */ + getBackup( + resourceGroupName: string, + clusterName: string, + backupId: string, + options?: CassandraClustersGetBackupOptionalParams + ): Promise; /** * Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will deallocate * the host virtual machine of this cluster, and reserved the data disk. This won't do anything on an diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts index 9623b8474f54..bfa37d392b22 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/cassandraResources.ts @@ -13,6 +13,8 @@ import { CassandraResourcesListCassandraKeyspacesOptionalParams, CassandraTableGetResults, CassandraResourcesListCassandraTablesOptionalParams, + CassandraViewGetResults, + CassandraResourcesListCassandraViewsOptionalParams, CassandraResourcesGetCassandraKeyspaceOptionalParams, CassandraResourcesGetCassandraKeyspaceResponse, CassandraKeyspaceCreateUpdateParameters, @@ -41,7 +43,21 @@ import { CassandraResourcesMigrateCassandraTableToAutoscaleOptionalParams, CassandraResourcesMigrateCassandraTableToAutoscaleResponse, CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams, - CassandraResourcesMigrateCassandraTableToManualThroughputResponse + CassandraResourcesMigrateCassandraTableToManualThroughputResponse, + CassandraResourcesGetCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewResponse, + CassandraViewCreateUpdateParameters, + CassandraResourcesCreateUpdateCassandraViewOptionalParams, + CassandraResourcesCreateUpdateCassandraViewResponse, + CassandraResourcesDeleteCassandraViewOptionalParams, + CassandraResourcesGetCassandraViewThroughputOptionalParams, + CassandraResourcesGetCassandraViewThroughputResponse, + CassandraResourcesUpdateCassandraViewThroughputOptionalParams, + CassandraResourcesUpdateCassandraViewThroughputResponse, + CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse, + CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse } from "../models"; /// @@ -71,6 +87,19 @@ export interface CassandraResources { keyspaceName: string, options?: CassandraResourcesListCassandraTablesOptionalParams ): PagedAsyncIterableIterator; + /** + * Lists the Cassandra materialized views under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param options The options parameters. + */ + listCassandraViews( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + options?: CassandraResourcesListCassandraViewsOptionalParams + ): PagedAsyncIterableIterator; /** * Gets the Cassandra keyspaces under an existing Azure Cosmos DB database account with the provided * name. @@ -490,4 +519,221 @@ export interface CassandraResources { tableName: string, options?: CassandraResourcesMigrateCassandraTableToManualThroughputOptionalParams ): Promise; + /** + * Gets the Cassandra view under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewOptionalParams + ): Promise; + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + beginCreateUpdateCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams + ): Promise< + PollerLike< + PollOperationState, + CassandraResourcesCreateUpdateCassandraViewResponse + > + >; + /** + * Create or update an Azure Cosmos DB Cassandra View + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param createUpdateCassandraViewParameters The parameters to provide for the current Cassandra View. + * @param options The options parameters. + */ + beginCreateUpdateCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + createUpdateCassandraViewParameters: CassandraViewCreateUpdateParameters, + options?: CassandraResourcesCreateUpdateCassandraViewOptionalParams + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginDeleteCassandraView( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Cassandra view. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginDeleteCassandraViewAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesDeleteCassandraViewOptionalParams + ): Promise; + /** + * Gets the RUs per second of the Cassandra view under an existing Azure Cosmos DB database account + * with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + getCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesGetCassandraViewThroughputOptionalParams + ): Promise; + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + beginUpdateCassandraViewThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState< + CassandraResourcesUpdateCassandraViewThroughputResponse + >, + CassandraResourcesUpdateCassandraViewThroughputResponse + > + >; + /** + * Update RUs per second of an Azure Cosmos DB Cassandra view + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param updateThroughputParameters The RUs per second of the parameters to provide for the current + * Cassandra view. + * @param options The options parameters. + */ + beginUpdateCassandraViewThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + updateThroughputParameters: ThroughputSettingsUpdateParameters, + options?: CassandraResourcesUpdateCassandraViewThroughputOptionalParams + ): Promise; + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToAutoscale( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + ): Promise< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + >, + CassandraResourcesMigrateCassandraViewToAutoscaleResponse + > + >; + /** + * Migrate an Azure Cosmos DB Cassandra view from manual throughput to autoscale + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToAutoscaleAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToAutoscaleOptionalParams + ): Promise; + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToManualThroughput( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + ): Promise< + PollerLike< + PollOperationState< + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + >, + CassandraResourcesMigrateCassandraViewToManualThroughputResponse + > + >; + /** + * Migrate an Azure Cosmos DB Cassandra view from autoscale to manual throughput + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param keyspaceName Cosmos DB keyspace name. + * @param viewName Cosmos DB view name. + * @param options The options parameters. + */ + beginMigrateCassandraViewToManualThroughputAndWait( + resourceGroupName: string, + accountName: string, + keyspaceName: string, + viewName: string, + options?: CassandraResourcesMigrateCassandraViewToManualThroughputOptionalParams + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts new file mode 100644 index 000000000000..0d1f0d07b367 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/dataTransferJobs.ts @@ -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"; + +/// +/** Interface representing a DataTransferJobs. */ +export interface DataTransferJobs { + /** + * Get a list of Data Transfer jobs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listByDatabaseAccount( + resourceGroupName: string, + accountName: string, + options?: DataTransferJobsListByDatabaseAccountOptionalParams + ): PagedAsyncIterableIterator; + /** + * Creates a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param jobCreateParameters Parameters to create Data Transfer Job + * @param options The options parameters. + */ + create( + resourceGroupName: string, + accountName: string, + jobName: string, + jobCreateParameters: CreateJobRequest, + options?: DataTransferJobsCreateOptionalParams + ): Promise; + /** + * Get a Data Transfer Job. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param jobName Name of the Data Transfer Job + * @param options The options parameters. + */ + get( + resourceGroupName: string, + accountName: string, + jobName: string, + options?: DataTransferJobsGetOptionalParams + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts new file mode 100644 index 000000000000..53f1fb181489 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/graphResources.ts @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + GraphResourceGetResults, + GraphResourcesListGraphsOptionalParams, + GraphResourcesGetGraphOptionalParams, + GraphResourcesGetGraphResponse, + GraphResourceCreateUpdateParameters, + GraphResourcesCreateUpdateGraphOptionalParams, + GraphResourcesCreateUpdateGraphResponse, + GraphResourcesDeleteGraphResourceOptionalParams +} from "../models"; + +/// +/** Interface representing a GraphResources. */ +export interface GraphResources { + /** + * Lists the graphs under an existing Azure Cosmos DB database account. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param options The options parameters. + */ + listGraphs( + resourceGroupName: string, + accountName: string, + options?: GraphResourcesListGraphsOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets the Graph resource under an existing Azure Cosmos DB database account with the provided name. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + getGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesGetGraphOptionalParams + ): Promise; + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + beginCreateUpdateGraph( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams + ): Promise< + PollerLike< + PollOperationState, + GraphResourcesCreateUpdateGraphResponse + > + >; + /** + * Create or update an Azure Cosmos DB Graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param createUpdateGraphParameters The parameters to provide for the current graph. + * @param options The options parameters. + */ + beginCreateUpdateGraphAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + createUpdateGraphParameters: GraphResourceCreateUpdateParameters, + options?: GraphResourcesCreateUpdateGraphOptionalParams + ): Promise; + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + beginDeleteGraphResource( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams + ): Promise, void>>; + /** + * Deletes an existing Azure Cosmos DB Graph Resource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param graphName Cosmos DB graph resource name. + * @param options The options parameters. + */ + beginDeleteGraphResourceAndWait( + resourceGroupName: string, + accountName: string, + graphName: string, + options?: GraphResourcesDeleteGraphResourceOptionalParams + ): Promise; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts index 41a89b100f9e..d9cf07eb6cd3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/gremlinResources.ts @@ -41,7 +41,10 @@ import { GremlinResourcesMigrateGremlinGraphToAutoscaleOptionalParams, GremlinResourcesMigrateGremlinGraphToAutoscaleResponse, GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams, - GremlinResourcesMigrateGremlinGraphToManualThroughputResponse + GremlinResourcesMigrateGremlinGraphToManualThroughputResponse, + ContinuousBackupRestoreLocation, + GremlinResourcesRetrieveContinuousBackupInformationOptionalParams, + GremlinResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -482,4 +485,45 @@ export interface GremlinResources { graphName: string, options?: GremlinResourcesMigrateGremlinGraphToManualThroughputOptionalParams ): Promise; + /** + * Retrieves continuous backup information for a gremlin graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + databaseName: string, + graphName: string, + location: ContinuousBackupRestoreLocation, + options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + GremlinResourcesRetrieveContinuousBackupInformationResponse + >, + GremlinResourcesRetrieveContinuousBackupInformationResponse + > + >; + /** + * Retrieves continuous backup information for a gremlin graph. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param graphName Cosmos DB graph name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + graphName: string, + location: ContinuousBackupRestoreLocation, + options?: GremlinResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts index f5d67c730604..5cba7fc94170 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/index.ts @@ -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"; diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts index 30673fb40993..818a969142b0 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/mongoDBResources.ts @@ -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; + /** + * 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; + /** + * 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; /** * 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; + /** + * 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; + /** + * 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, 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; + /** + * 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; + /** + * 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; + /** + * 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, 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; /** * Retrieves continuous backup information for a Mongodb collection. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts new file mode 100644 index 000000000000..7a5e14606d0c --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinDatabases.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + RestorableGremlinDatabaseGetResult, + RestorableGremlinDatabasesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableGremlinDatabases. */ +export interface RestorableGremlinDatabases { + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin databases under the + * restorable account. This helps in scenario where database was accidentally deleted to get the + * deletion time. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableGremlinDatabasesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts new file mode 100644 index 000000000000..a73bda76e1cb --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinGraphs.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + RestorableGremlinGraphGetResult, + RestorableGremlinGraphsListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableGremlinGraphs. */ +export interface RestorableGremlinGraphs { + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Gremlin graphs under a specific + * database. This helps in scenario where container was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableGremlinGraphsListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts new file mode 100644 index 000000000000..03a6bb59a335 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableGremlinResources.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + GremlinDatabaseRestoreResource, + RestorableGremlinResourcesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableGremlinResources. */ +export interface RestorableGremlinResources { + /** + * Return a list of gremlin database and graphs combo that exist on the account at the given timestamp + * and location. This helps in scenarios to validate what resources exist at given timestamp and + * location. This API requires 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' + * permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableGremlinResourcesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts new file mode 100644 index 000000000000..c3d8b2578e24 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTableResources.ts @@ -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"; + +/// +/** Interface representing a RestorableTableResources. */ +export interface RestorableTableResources { + /** + * Return a list of tables that exist on the account at the given timestamp and location. This helps in + * scenarios to validate what resources exist at given timestamp and location. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission. + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableTableResourcesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts new file mode 100644 index 000000000000..5e9f06371cba --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/restorableTables.ts @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { + RestorableTableGetResult, + RestorableTablesListOptionalParams +} from "../models"; + +/// +/** Interface representing a RestorableTables. */ +export interface RestorableTables { + /** + * Show the event feed of all mutations done on all the Azure Cosmos DB Tables. This helps in scenario + * where table was accidentally deleted. This API requires + * 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' permission + * @param location Cosmos DB region, with spaces between words and each word capitalized. + * @param instanceId The instanceId GUID of a restorable database account. + * @param options The options parameters. + */ + list( + location: string, + instanceId: string, + options?: RestorableTablesListOptionalParams + ): PagedAsyncIterableIterator; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts new file mode 100644 index 000000000000..c7d0d81613d2 --- /dev/null +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/service.ts @@ -0,0 +1,107 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { + ServiceResource, + ServiceListOptionalParams, + ServiceResourceCreateUpdateParameters, + ServiceCreateOptionalParams, + ServiceCreateResponse, + ServiceGetOptionalParams, + ServiceGetResponse, + ServiceDeleteOptionalParams +} from "../models"; + +/// +/** 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; + /** + * 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, 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; + /** + * 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; + /** + * 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, 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; +} diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts index 006a8232d8c8..2a33b0cd3c31 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/sqlResources.ts @@ -11,6 +11,8 @@ import { PollerLike, PollOperationState } from "@azure/core-lro"; import { SqlDatabaseGetResults, SqlResourcesListSqlDatabasesOptionalParams, + ClientEncryptionKeyGetResults, + SqlResourcesListClientEncryptionKeysOptionalParams, SqlContainerGetResults, SqlResourcesListSqlContainersOptionalParams, SqlStoredProcedureGetResults, @@ -38,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; + /** + * Lists the ClientEncryptionKeys under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param options The options parameters. + */ + listClientEncryptionKeys( + resourceGroupName: string, + accountName: string, + databaseName: string, + options?: SqlResourcesListClientEncryptionKeysOptionalParams + ): PagedAsyncIterableIterator; /** * Lists the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -370,6 +390,64 @@ export interface SqlResources { databaseName: string, options?: SqlResourcesMigrateSqlDatabaseToManualThroughputOptionalParams ): Promise; + /** + * Gets the ClientEncryptionKey under an existing Azure Cosmos DB SQL database. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param options The options parameters. + */ + getClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + options?: SqlResourcesGetClientEncryptionKeyOptionalParams + ): Promise; + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + beginCreateUpdateClientEncryptionKey( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams + ): Promise< + PollerLike< + PollOperationState, + SqlResourcesCreateUpdateClientEncryptionKeyResponse + > + >; + /** + * Create or update a ClientEncryptionKey. This API is meant to be invoked via tools such as the Azure + * Powershell (instead of directly). + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param databaseName Cosmos DB database name. + * @param clientEncryptionKeyName Cosmos DB ClientEncryptionKey name. + * @param createUpdateClientEncryptionKeyParameters The parameters to provide for the client encryption + * key. + * @param options The options parameters. + */ + beginCreateUpdateClientEncryptionKeyAndWait( + resourceGroupName: string, + accountName: string, + databaseName: string, + clientEncryptionKeyName: string, + createUpdateClientEncryptionKeyParameters: ClientEncryptionKeyCreateUpdateParameters, + options?: SqlResourcesCreateUpdateClientEncryptionKeyOptionalParams + ): Promise; /** * Gets the SQL container under an existing Azure Cosmos DB database account. * @param resourceGroupName The name of the resource group. The name is case insensitive. diff --git a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts index b6d7e0d81032..20f6d8c3cb18 100644 --- a/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts +++ b/sdk/cosmosdb/arm-cosmosdb/src/operationsInterfaces/tableResources.ts @@ -25,7 +25,10 @@ import { TableResourcesMigrateTableToAutoscaleOptionalParams, TableResourcesMigrateTableToAutoscaleResponse, TableResourcesMigrateTableToManualThroughputOptionalParams, - TableResourcesMigrateTableToManualThroughputResponse + TableResourcesMigrateTableToManualThroughputResponse, + ContinuousBackupRestoreLocation, + TableResourcesRetrieveContinuousBackupInformationOptionalParams, + TableResourcesRetrieveContinuousBackupInformationResponse } from "../models"; /// @@ -229,4 +232,41 @@ export interface TableResources { tableName: string, options?: TableResourcesMigrateTableToManualThroughputOptionalParams ): Promise; + /** + * Retrieves continuous backup information for a table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformation( + resourceGroupName: string, + accountName: string, + tableName: string, + location: ContinuousBackupRestoreLocation, + options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise< + PollerLike< + PollOperationState< + TableResourcesRetrieveContinuousBackupInformationResponse + >, + TableResourcesRetrieveContinuousBackupInformationResponse + > + >; + /** + * Retrieves continuous backup information for a table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param accountName Cosmos DB database account name. + * @param tableName Cosmos DB table name. + * @param location The name of the continuous backup restore location. + * @param options The options parameters. + */ + beginRetrieveContinuousBackupInformationAndWait( + resourceGroupName: string, + accountName: string, + tableName: string, + location: ContinuousBackupRestoreLocation, + options?: TableResourcesRetrieveContinuousBackupInformationOptionalParams + ): Promise; } diff --git a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/cosmosdb/arm-cosmosdb/tsconfig.json +++ b/sdk/cosmosdb/arm-cosmosdb/tsconfig.json @@ -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" + ] +} \ No newline at end of file