Skip to content

Commit 5792c4b

Browse files
kshittiz7Daniela Vargaskr-santosh
authored
[CosmosDB] Add table and gremlin APIs for point-in-time restore in stable 2022-11-15 (Azure#33662)
* Autogenerated files * fixed test and mongo optional parameter issue * updated version * rebased to main and autogenerated files * Removed track 1 changes * Updated mapping of names in autorest.md * Updated mapping of clientKeyEncryptionClasses * Changed property name from MinimalTlsVersion to CosmosDBMinimalTlsVersion * sessions records * session records * update on property name * updated changelog * update client encryption models * fixed client encryption rename mappings. * update generate code post client encryption rename changes * Renamed ClientEncryptionKeyGetResultData to CosmosDBSqlClientEncryptionKey * Added tests for restorable apis for table/gremlin * Added teardown of restored account * export api * update to property names on api * Increased delay * Updated session records * latest session records * Updated tests * Fix for tear down * Updated KeyWrapMetaData to CosmosDBKeyWrapMetaData * Export API --------- Co-authored-by: Daniela Vargas <[email protected]> Co-authored-by: Santosh Kulkarni <[email protected]>
1 parent 2b4610f commit 5792c4b

File tree

314 files changed

+389193
-68986
lines changed

Some content is hidden

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

314 files changed

+389193
-68986
lines changed

sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 1.3.0-beta.1 (Unreleased)
3+
## 1.3.0 (Unreleased)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
5+
- Updated Microsoft.DocumentDB RP API version to 2022-11-15
6+
- Added table and gremlin restorable apis
7+
- Added CosmosDBMinimalTlsVersion property
128

139
## 1.2.1 (2023-02-13)
1410

sdk/cosmosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs

Lines changed: 182 additions & 2 deletions
Large diffs are not rendered by default.

sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Azure.ResourceManager.CosmosDB.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<Version>1.3.0-beta.1</Version>
4+
<Version>1.3.0</Version>
55
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
66
<ApiCompatVersion>1.2.1</ApiCompatVersion>
77
<PackageId>Azure.ResourceManager.CosmosDB</PackageId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
// <auto-generated/>
5+
6+
#nullable disable
7+
8+
using System;
9+
using System.Globalization;
10+
using System.Threading;
11+
using System.Threading.Tasks;
12+
using Azure;
13+
using Azure.Core;
14+
using Azure.Core.Pipeline;
15+
using Azure.ResourceManager;
16+
using Azure.ResourceManager.CosmosDB.Models;
17+
18+
namespace Azure.ResourceManager.CosmosDB
19+
{
20+
/// <summary>
21+
/// A Class representing a RestorableCosmosDBAccount along with the instance operations that can be performed on it.
22+
/// If you have a <see cref="ResourceIdentifier" /> you can construct a <see cref="RestorableCosmosDBAccountResource" />
23+
/// from an instance of <see cref="ArmClient" /> using the GetRestorableCosmosDBAccountResource method.
24+
/// Otherwise you can get one from its parent resource <see cref="CosmosDBLocationResource" /> using the GetRestorableCosmosDBAccount method.
25+
/// </summary>
26+
public partial class RestorableCosmosDBAccountResource : ArmResource
27+
{
28+
/// <summary>
29+
/// Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires &apos;Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read&apos; permission
30+
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections
31+
/// Operation Id: RestorableMongodbCollections_List
32+
/// </summary>
33+
/// <param name="restorableMongoDBDatabaseRid"> The resource ID of the MongoDB database. </param>
34+
/// <param name="cancellationToken"> The cancellation token to use. </param>
35+
/// <returns> An async collection of <see cref="RestorableMongoDBCollection" /> that may take multiple service requests to iterate over. </returns>
36+
public virtual AsyncPageable<RestorableMongoDBCollection> GetRestorableMongoDBCollectionsAsync(string restorableMongoDBDatabaseRid, CancellationToken cancellationToken)
37+
{
38+
HttpMessage FirstPageRequest(int? pageSizeHint) => _restorableMongoDBCollectionsRestClient.CreateListRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Guid.Parse(Id.Name), restorableMongoDBDatabaseRid, null, null);
39+
return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, RestorableMongoDBCollection.DeserializeRestorableMongoDBCollection, _restorableMongoDBCollectionsClientDiagnostics, Pipeline, "RestorableCosmosDBAccountResource.GetRestorableMongoDBCollections", "value", null, cancellationToken);
40+
}
41+
42+
/// <summary>
43+
/// Show the event feed of all mutations done on all the Azure Cosmos DB MongoDB collections under a specific database. This helps in scenario where container was accidentally deleted. This API requires &apos;Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read&apos; permission
44+
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections
45+
/// Operation Id: RestorableMongodbCollections_List
46+
/// </summary>
47+
/// <param name="restorableMongoDBDatabaseRid"> The resource ID of the MongoDB database. </param>
48+
/// <param name="cancellationToken"> The cancellation token to use. </param>
49+
/// <returns> A collection of <see cref="RestorableMongoDBCollection" /> that may take multiple service requests to iterate over. </returns>
50+
public virtual Pageable<RestorableMongoDBCollection> GetRestorableMongoDBCollections(string restorableMongoDBDatabaseRid, CancellationToken cancellationToken)
51+
{
52+
HttpMessage FirstPageRequest(int? pageSizeHint) => _restorableMongoDBCollectionsRestClient.CreateListRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Guid.Parse(Id.Name), restorableMongoDBDatabaseRid, null, null);
53+
return PageableHelpers.CreatePageable(FirstPageRequest, null, RestorableMongoDBCollection.DeserializeRestorableMongoDBCollection, _restorableMongoDBCollectionsClientDiagnostics, Pipeline, "RestorableCosmosDBAccountResource.GetRestorableMongoDBCollections", "value", null, cancellationToken);
54+
}
55+
}
56+
}

sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.cs

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)