Skip to content

Commit

Permalink
[CosmosDB] Add table and gremlin APIs for point-in-time restore in st…
Browse files Browse the repository at this point in the history
…able 2022-11-15 (#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 <danvargas@microsoft.com>
Co-authored-by: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 10, 2023
1 parent 2b4610f commit 5792c4b
Show file tree
Hide file tree
Showing 314 changed files with 389,193 additions and 68,986 deletions.
12 changes: 4 additions & 8 deletions sdk/cosmosdb/Azure.ResourceManager.CosmosDB/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Release History

## 1.3.0-beta.1 (Unreleased)
## 1.3.0 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Updated Microsoft.DocumentDB RP API version to 2022-11-15
- Added table and gremlin restorable apis
- Added CosmosDBMinimalTlsVersion property

## 1.2.1 (2023-02-13)

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>1.3.0-beta.1</Version>
<Version>1.3.0</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.2.1</ApiCompatVersion>
<PackageId>Azure.ResourceManager.CosmosDB</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager;
using Azure.ResourceManager.CosmosDB.Models;

namespace Azure.ResourceManager.CosmosDB
{
/// <summary>
/// A Class representing a RestorableCosmosDBAccount along with the instance operations that can be performed on it.
/// If you have a <see cref="ResourceIdentifier" /> you can construct a <see cref="RestorableCosmosDBAccountResource" />
/// from an instance of <see cref="ArmClient" /> using the GetRestorableCosmosDBAccountResource method.
/// Otherwise you can get one from its parent resource <see cref="CosmosDBLocationResource" /> using the GetRestorableCosmosDBAccount method.
/// </summary>
public partial class RestorableCosmosDBAccountResource : ArmResource
{
/// <summary>
/// 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
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections
/// Operation Id: RestorableMongodbCollections_List
/// </summary>
/// <param name="restorableMongoDBDatabaseRid"> The resource ID of the MongoDB database. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="RestorableMongoDBCollection" /> that may take multiple service requests to iterate over. </returns>
public virtual AsyncPageable<RestorableMongoDBCollection> GetRestorableMongoDBCollectionsAsync(string restorableMongoDBDatabaseRid, CancellationToken cancellationToken)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => _restorableMongoDBCollectionsRestClient.CreateListRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Guid.Parse(Id.Name), restorableMongoDBDatabaseRid, null, null);
return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, RestorableMongoDBCollection.DeserializeRestorableMongoDBCollection, _restorableMongoDBCollectionsClientDiagnostics, Pipeline, "RestorableCosmosDBAccountResource.GetRestorableMongoDBCollections", "value", null, cancellationToken);
}

/// <summary>
/// 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
/// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{instanceId}/restorableMongodbCollections
/// Operation Id: RestorableMongodbCollections_List
/// </summary>
/// <param name="restorableMongoDBDatabaseRid"> The resource ID of the MongoDB database. </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="RestorableMongoDBCollection" /> that may take multiple service requests to iterate over. </returns>
public virtual Pageable<RestorableMongoDBCollection> GetRestorableMongoDBCollections(string restorableMongoDBDatabaseRid, CancellationToken cancellationToken)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => _restorableMongoDBCollectionsRestClient.CreateListRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Guid.Parse(Id.Name), restorableMongoDBDatabaseRid, null, null);
return PageableHelpers.CreatePageable(FirstPageRequest, null, RestorableMongoDBCollection.DeserializeRestorableMongoDBCollection, _restorableMongoDBCollectionsClientDiagnostics, Pipeline, "RestorableCosmosDBAccountResource.GetRestorableMongoDBCollections", "value", null, cancellationToken);
}
}
}

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

0 comments on commit 5792c4b

Please sign in to comment.