-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CosmosDB] Add table and gremlin APIs for point-in-time restore in st…
…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
1 parent
2b4610f
commit 5792c4b
Showing
314 changed files
with
389,193 additions
and
68,986 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
184 changes: 182 additions & 2 deletions
184
...mosdb/Azure.ResourceManager.CosmosDB/api/Azure.ResourceManager.CosmosDB.netstandard2.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Azure.ResourceManager.CosmosDB.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
...re.ResourceManager.CosmosDB/src/Customization/Models/RestorableCosmosDBAccountResource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' 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 'Microsoft.DocumentDB/locations/restorableDatabaseAccounts/.../read' 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); | ||
} | ||
} | ||
} |
6 changes: 5 additions & 1 deletion
6
sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountData.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.