Skip to content

Commit 3c11c9c

Browse files
authored
[mgmt] cosmosdb preview release (#36606)
Azure/sdk-release-request#6702
1 parent c51f946 commit 3c11c9c

File tree

981 files changed

+46966
-9860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

981 files changed

+46966
-9860
lines changed

sdk/cosmosdb/arm-cosmosdb/CHANGELOG.md

Lines changed: 605 additions & 0 deletions
Large diffs are not rendered by default.

sdk/cosmosdb/arm-cosmosdb/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure CosmosDBManagement client.
44

5-
Azure Cosmos DB Database Service Resource Provider REST API
5+
Azure Cosmos DB Role Based Access Control Resource Provider REST API
66

77
[Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/cosmosdb/arm-cosmosdb) |
88
[Package (NPM)](https://www.npmjs.com/package/@azure/arm-cosmosdb) |
9-
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdb) |
9+
[API reference documentation](https://learn.microsoft.com/javascript/api/@azure/arm-cosmosdb?view=azure-node-preview) |
1010
[Samples](https://github.com/Azure-Samples/azure-samples-js-management)
1111

1212
## Getting started

sdk/cosmosdb/arm-cosmosdb/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"commit": "89e3df4a633bae8cd513487d053308dbb1ff6b58",
2+
"commit": "10b2ccffecf07cf66e6cdda61a77b95c74d78f9a",
33
"readme": "specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/readme.md",
44
"autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=C:\\Users\\v-ziweichen.FAREAST\\Documents\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\cosmos-db\\resource-manager\\Microsoft.DocumentDB\\DocumentDB\\readme.md --use=@autorest/[email protected] --generate-sample=true",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",

sdk/cosmosdb/arm-cosmosdb/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "js",
44
"TagPrefix": "js/cosmosdb/arm-cosmosdb",
5-
"Tag": "js/cosmosdb/arm-cosmosdb_311c540c15"
5+
"Tag": "js/cosmosdb/arm-cosmosdb_01425feaea"
66
}

sdk/cosmosdb/arm-cosmosdb/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for CosmosDBManagementClient.",
6-
"version": "16.4.0",
6+
"version": "17.0.0-beta.2",
77
"engines": {
88
"node": ">=20.0.0"
99
},

sdk/cosmosdb/arm-cosmosdb/review/arm-cosmosdb-node.api.md

Lines changed: 2501 additions & 97 deletions
Large diffs are not rendered by default.

sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersCreateUpdateSample.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4-
import type { ClusterResource} from "@azure/arm-cosmosdb";
5-
import { CosmosDBManagementClient } from "@azure/arm-cosmosdb";
4+
import type {
5+
ClusterResourceAutoGenerated} from "@azure/arm-cosmosdb";
6+
import {
7+
CosmosDBManagementClient,
8+
} from "@azure/arm-cosmosdb";
69
import { DefaultAzureCredential } from "@azure/identity";
710
import "dotenv/config";
811

912
/**
1013
* This sample demonstrates how to Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.
1114
*
1215
* @summary Create or update a managed Cassandra cluster. When updating, you must specify all writable properties. To update only some properties, use PATCH.
13-
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/stable/2025-10-15/examples/CosmosDBManagedCassandraClusterCreate.json
16+
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/preview/2025-11-01-preview/examples/CosmosDBManagedCassandraClusterCreate.json
1417
*/
1518
async function cosmosDbManagedCassandraClusterCreate(): Promise<void> {
1619
const subscriptionId =
1720
process.env["COSMOSDB_SUBSCRIPTION_ID"] ||
18-
"ffffffff-ffff-ffff-ffff-ffffffffffff";
21+
"00000000-0000-0000-0000-000000000000";
1922
const resourceGroupName =
2023
process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg";
2124
const clusterName = "cassandra-prod";
22-
const body: ClusterResource = {
25+
const body: ClusterResourceAutoGenerated = {
2326
location: "West US",
2427
properties: {
2528
authenticationMethod: "Cassandra",

sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeallocateSample.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import "dotenv/config";
99
* This sample demonstrates how to 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 already deallocated cluster. Use Start to restart the cluster.
1010
*
1111
* @summary 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 already deallocated cluster. Use Start to restart the cluster.
12-
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/stable/2025-10-15/examples/CosmosDBManagedCassandraClusterDeallocate.json
12+
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/preview/2025-11-01-preview/examples/CosmosDBManagedCassandraClusterDeallocate.json
1313
*/
1414
async function cosmosDbManagedCassandraClusterDeallocate(): Promise<void> {
1515
const subscriptionId =
1616
process.env["COSMOSDB_SUBSCRIPTION_ID"] ||
17-
"ffffffff-ffff-ffff-ffff-ffffffffffff";
17+
"00000000-0000-0000-0000-000000000000";
1818
const resourceGroupName =
1919
process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg";
2020
const clusterName = "cassandra-prod";

sdk/cosmosdb/arm-cosmosdb/samples-dev/cassandraClustersDeleteSample.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import "dotenv/config";
99
* This sample demonstrates how to Deletes a managed Cassandra cluster.
1010
*
1111
* @summary Deletes a managed Cassandra cluster.
12-
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/stable/2025-10-15/examples/CosmosDBManagedCassandraClusterDelete.json
12+
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/preview/2025-11-01-preview/examples/CosmosDBManagedCassandraClusterDelete.json
1313
*/
1414
async function cosmosDbManagedCassandraClusterDelete(): Promise<void> {
1515
const subscriptionId =
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
4+
import { CosmosDBManagementClient } from "@azure/arm-cosmosdb";
5+
import { DefaultAzureCredential } from "@azure/identity";
6+
import "dotenv/config";
7+
8+
/**
9+
* This sample demonstrates how to Get the properties of an individual backup of this cluster that is available to restore.
10+
*
11+
* @summary Get the properties of an individual backup of this cluster that is available to restore.
12+
* x-ms-original-file: specification/cosmos-db/resource-manager/Microsoft.DocumentDB/DocumentDB/preview/2025-11-01-preview/examples/CosmosDBManagedCassandraBackup.json
13+
*/
14+
async function cosmosDbManagedCassandraBackup(): Promise<void> {
15+
const subscriptionId =
16+
process.env["COSMOSDB_SUBSCRIPTION_ID"] ||
17+
"00000000-0000-0000-0000-000000000000";
18+
const resourceGroupName =
19+
process.env["COSMOSDB_RESOURCE_GROUP"] || "cassandra-prod-rg";
20+
const clusterName = "cassandra-prod";
21+
const backupId = "1611250348";
22+
const credential = new DefaultAzureCredential();
23+
const client = new CosmosDBManagementClient(credential, subscriptionId);
24+
const result = await client.cassandraClusters.getBackup(
25+
resourceGroupName,
26+
clusterName,
27+
backupId,
28+
);
29+
console.log(result);
30+
}
31+
32+
async function main(): Promise<void> {
33+
await cosmosDbManagedCassandraBackup();
34+
}
35+
36+
main().catch(console.error);

0 commit comments

Comments
 (0)