Skip to content

Commit

Permalink
[CosmosDB] Introduce new features from latest swagger 11-15-Preview a…
Browse files Browse the repository at this point in the history
…nd add test coverage (#34743)

* generated code using autorest

* fix mongo collection functions in Custom/RestorableCosmosDBAccountResource.cs

* Fix breaking changes that coming from the safeflatten

* InAccount restore changes for all api kinds

* resolve build errors and update mongo db inaccount restore tests

* update session records

* resolve build errors after merge conflicts

* regenerated changes using dotnet build /t:GenerateCode

* update default values

* fix test with default identity

* updated with eng\scripts\CodeChecks.ps1 -ServiceDirectory cosmosdb

* update sesion records for failing pipeline

* update sesion records for failing pipeline

* update inaccount restore tests to use static time and session records for table and gremlin tests

* Update recording

* Update recording

* update session records for sql and mongo and disable mongo inaccount restore tests

* update generated files with latest

* updated test case for burst capacity

* update session records for database account operations

* updated test case to not enable burst capacity in account creation (#2)

* recorded all tests in DatabaseAccount (#3)

* updated test case to not enable burst capacity in account creation

* recorded all tests in DatabaseAccount

* session recordings of DatabaseAccountTests

* cross region restore updated test

* test recordings update

* updated recordings

* added new group cross region restore

* udpated recordings with playback verification

* updated RestorabledatabaseAccountTests groupo

* update session records for private end point tests

* Rename BackupResource to CassandraClusterBackupResource

* Update API

* update changelog for new sdk release

---------

Co-authored-by: Arthur Ma <arthurma@microsoft.com>
Co-authored-by: Wei Hu <huwe@microsoft.com>
Co-authored-by: Richa Sharma <richasharma@microsoft.com>
Co-authored-by: Richa Sharma <richasharma.amu@gmail.com>
Co-authored-by: dsapaliga <dsapaliga@microsoft.com>
  • Loading branch information
6 people authored Apr 26, 2023
1 parent dd90afe commit 169daa5
Show file tree
Hide file tree
Showing 569 changed files with 439,467 additions and 240,513 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<ItemGroup>
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute">
<_Parameter1>TestProxyPath</_Parameter1>
<_Parameter2>$(NuGetPackageRoot)azure.sdk.tools.testproxy\$(TestProxyVersion)\tools\net6.0\any\Azure.Sdk.Tools.TestProxy.dll</_Parameter2>
<_Parameter2>$(NuGetPackageRoot)\azure.sdk.tools.testproxy\$(TestProxyVersion)\tools\net6.0\any\Azure.Sdk.Tools.TestProxy.dll</_Parameter2>
</AssemblyAttribute>
</ItemGroup>
</Project>
11 changes: 5 additions & 6 deletions sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# Release History

## 1.4.0-beta.1 (Unreleased)
## 1.4.0-beta.1 (2023-04-28)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Updated Microsoft.DocumentDB RP API version to `2022-11-15-preview`
- Added support for restoring deleted table and gremlin resources within the same account
- Added support for cross region restore
- Added support for enabling burst capacity of the CosmosDB account

## 1.3.0 (2023-04-11)

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;

// Custom code to restore the safeflattened property

namespace Azure.ResourceManager.CosmosDB.Models
{
/// <summary> Parameters to create and update Cosmos DB SQL database. </summary>
public partial class CosmosDBSqlDatabaseCreateOrUpdateContent : TrackedResourceData
{
/// <summary> Name of the Cosmos DB SQL database. </summary>
public string ResourceDatabaseName
{
get => Resource is null ? default : Resource.DatabaseName;
set
{
if (Resource is null)
Resource = new CosmosDBSqlDatabaseResourceInfo(value);
else
Resource.DatabaseName = value;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;

// Custom code to restore the safeflattened property

namespace Azure.ResourceManager.CosmosDB.Models
{
/// <summary> Parameters to create and update Cosmos DB Table. </summary>
public partial class CosmosDBTableCreateOrUpdateContent : TrackedResourceData
{
/// <summary> Name of the Cosmos DB table. </summary>
public string ResourceTableName
{
get => Resource is null ? default : Resource.TableName;
set
{
if (Resource is null)
Resource = new CosmosDBTableResourceInfo(value);
else
Resource.TableName = value;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;

// Custom code to restore the safeflattened property

namespace Azure.ResourceManager.CosmosDB.Models
{
/// <summary> Parameters to create and update Cosmos DB Gremlin database. </summary>
public partial class GremlinDatabaseCreateOrUpdateContent : TrackedResourceData
{
/// <summary> Name of the Cosmos DB Gremlin database. </summary>
public string ResourceDatabaseName
{
get => Resource is null ? default : Resource.DatabaseName;
set
{
if (Resource is null)
Resource = new GremlinDatabaseResourceInfo(value);
else
Resource.DatabaseName = value;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Models;

// Custom code to restore the safeflattened property

namespace Azure.ResourceManager.CosmosDB.Models
{
/// <summary> Parameters to create and update Cosmos DB MongoDB database. </summary>
public partial class MongoDBDatabaseCreateOrUpdateContent : TrackedResourceData
{
/// <summary> Name of the Cosmos DB MongoDB database. </summary>
public string ResourceDatabaseName
{
get => Resource is null ? default : Resource.DatabaseName;
set
{
if (Resource is null)
Resource = new MongoDBDatabaseResourceInfo(value);
else
Resource.DatabaseName = value;
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 169daa5

Please sign in to comment.