Skip to content

Commit

Permalink
Update Az.CosmosDB-preview-2024 with CosmosDB preview changes (#24165)
Browse files Browse the repository at this point in the history
* apply Az.CosmosDB-preview branch CosmosDB folder to this branch

* Use autorest.powershell to generate management SDK for cosmosDB (#22413)

* remove the custom code since character case change is not treated as a breaking change (#22500)

* regen sdk

* specify header type as string to fix build error

* update autorest file to align with main; regen sdk

* fix casing

* [Cosmos DB] Powershell changes for 2023-03-15 stable API (#21990)

* added tests for listconnectionstrings; updated changelog

* add changes for list connection strings response

* re-record test

* update changelog

* Add location api changes

* Added test recording for location api

* re-record tests

* re-record tests

* Revert "add changes for list connection strings response"

This reverts commit ff3ef0a.

* update changelog, update and re-record account tests

---------

Co-authored-by: Udit Singh <[email protected]>

* CosmosDB - New Restore Parameter (#22585)

* restore new param public network access

* minor fixes

* test change

* stable changes 1

* md param def changed

* reverting test changes for build

* restore ts

* test and test recording

* CosmosDB 2023-09-15 release (#22726) (#22953)

* genrated changes

* help and changelog and test case update

* Powershell model changes for burst capacity

* added customer managed key status to PSDatabaseAccountGetResults.cs

* added recording for MongoOperationsTests and SqlOperationsTest

* added recording for remaining tests

* rerecorded failed tests

* added changes in tests

* Minimal Tls version for create and update

* fixed build errors

* updated tls version in test

* updated commit id

* MinimalTlsVersion to changelog

* Update ChangeLog.md

Added CustomerManagedKeyStatus to the Changelog

* mask 'primaryReadOnlyMasterKey' and 'secondaryReadOnlyMasterKey' in recorded test

* mask 'primaryMasterKey' and 'secondaryMasterKey' in recorded test

* rerecorded account tests

* rerecorded account tests

* rerecorded Cassandra tests

* re-recorded all but mongo and restore tests

---------

Co-authored-by: Richa Sharma <[email protected]>
Co-authored-by: Adrián Sibaja Retana <[email protected]>
Co-authored-by: unknown <[email protected]>
Co-authored-by: AdrianSibajaRetana <[email protected]>

* [CosmosDB] GA PowerShell commands for InAccount Restore of Deleted Database/ Containers feature for SQL/Mongo/Table/Gremlin (#23666)

* changes and generated code

* update tests

* update session records

* update help files

* update changelog

* update session records

* update TestUpdateCosmosDBAccountBackupPolicyToContinuous30Days session record

* update session records

* add notimestamp tests and update few old session records

* regen sdk, fix build error

* fix duplicate code

* nit fix restore tests

* re-record tests

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account (#21736)

* Merge branch 'Az.CosmosDB-preview' of https://github.com/SrinikhilReddy/azure-powershell into features/users/nanarava/enablepmerge

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* Update src/CosmosDB/CosmosDB/ChangeLog.md

Co-authored-by: Jin Lei <[email protected]>

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* CosmosDB: Adds changes to handle enabling partition merge on CosmosDB account.

* Update ChangeLog.md

Remove duplicate line

* Resolve code comments.

---------

Co-authored-by: Jin Lei <[email protected]>

* Replace Start-Sleep with Start-TestSleep for all test cases (#23780)

* re-record account test

* fix typo

* [Cosmos DB] Powershell changes for 2023-04-15 stable API (Continuous 7 GA) (#21685)

* move to new swagger version and prereq

* edit readme.md

* manually generated from autorest

* Continuous 7 days change

* add 2 new test recordings

* fix example issues

* add all test recordings for RestoreTests suite

* fix New-AzCosmosDBAccount.md

* add almost all test recordings

* add 4 more successful recordings. all working now

* no examples

* clean up help file

* add output type to cmdlet

* suppress errors for existing cmdlets

* Revert "suppress errors for existing cmdlets"

This reverts commit f36e275.

* suppress static validation errors for existing commands

---------

Co-authored-by: Xiaogang <[email protected]>
Co-authored-by: Udit Singh <[email protected]>
Co-authored-by: mayankkatwal <[email protected]>
Co-authored-by: Yabo Hu <[email protected]>
Co-authored-by: Richa Sharma <[email protected]>
Co-authored-by: Adrián Sibaja Retana <[email protected]>
Co-authored-by: unknown <[email protected]>
Co-authored-by: AdrianSibajaRetana <[email protected]>
Co-authored-by: ddhamotharan <[email protected]>
Co-authored-by: Srinikhil Naravamakula <[email protected]>
Co-authored-by: Jin Lei <[email protected]>
Co-authored-by: Vincent Dai <[email protected]>
Co-authored-by: vinhms <[email protected]>
  • Loading branch information
14 people authored Feb 25, 2024
1 parent c7768c2 commit 30e6d50
Show file tree
Hide file tree
Showing 297 changed files with 147,731 additions and 65,880 deletions.
535 changes: 532 additions & 3 deletions src/CosmosDB/CosmosDB.Sdk/Generated/CassandraClustersOperations.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,92 @@ public static CommandOutput InvokeCommand(this ICassandraClustersOperations oper
}
}
/// <summary>
/// List the backups of this cluster that are available to restore.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
public static System.Collections.Generic.IEnumerable<BackupResource> ListBackups(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName)
{
return ((ICassandraClustersOperations)operations).ListBackupsAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
}

/// <summary>
/// List the backups of this cluster that are available to restore.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<BackupResource>> ListBackupsAsync(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.ListBackupsWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <summary>
/// Get the properties of an individual backup of this cluster that is
/// available to restore.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
/// <param name='backupId'>
/// Id of a restorable backup of a Cassandra cluster.
/// </param>
public static BackupResource GetBackup(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, string backupId)
{
return ((ICassandraClustersOperations)operations).GetBackupAsync(resourceGroupName, clusterName, backupId).GetAwaiter().GetResult();
}

/// <summary>
/// Get the properties of an individual backup of this cluster that is
/// available to restore.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group. The name is case insensitive.
/// </param>
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
/// <param name='backupId'>
/// Id of a restorable backup of a Cassandra cluster.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task<BackupResource> GetBackupAsync(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, string backupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
using (var _result = await operations.GetBackupWithHttpMessagesAsync(resourceGroupName, clusterName, backupId, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}
/// <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&#39;t do anything on an already deallocated
Expand All @@ -281,9 +367,13 @@ public static CommandOutput InvokeCommand(this ICassandraClustersOperations oper
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
public static void Deallocate(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName)
/// <param name='xMsForceDeallocate'>
/// Force to deallocate a cluster of Cluster Type Production. Force to
/// deallocate a cluster of Cluster Type Production might cause data loss
/// </param>
public static void Deallocate(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, string xMsForceDeallocate = default(string))
{
((ICassandraClustersOperations)operations).DeallocateAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
((ICassandraClustersOperations)operations).DeallocateAsync(resourceGroupName, clusterName, xMsForceDeallocate).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -301,12 +391,16 @@ public static void Deallocate(this ICassandraClustersOperations operations, stri
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
/// <param name='xMsForceDeallocate'>
/// Force to deallocate a cluster of Cluster Type Production. Force to
/// deallocate a cluster of Cluster Type Production might cause data loss
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task DeallocateAsync(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task DeallocateAsync(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, string xMsForceDeallocate = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
(await operations.DeallocateWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false)).Dispose();
(await operations.DeallocateWithHttpMessagesAsync(resourceGroupName, clusterName, xMsForceDeallocate, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
/// <summary>
/// Start the Managed Cassandra Cluster and Associated Data Centers. Start will
Expand Down Expand Up @@ -561,9 +655,13 @@ public static CommandOutput BeginInvokeCommand(this ICassandraClustersOperations
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
public static void BeginDeallocate(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName)
/// <param name='xMsForceDeallocate'>
/// Force to deallocate a cluster of Cluster Type Production. Force to
/// deallocate a cluster of Cluster Type Production might cause data loss
/// </param>
public static void BeginDeallocate(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, string xMsForceDeallocate = default(string))
{
((ICassandraClustersOperations)operations).BeginDeallocateAsync(resourceGroupName, clusterName).GetAwaiter().GetResult();
((ICassandraClustersOperations)operations).BeginDeallocateAsync(resourceGroupName, clusterName, xMsForceDeallocate).GetAwaiter().GetResult();
}

/// <summary>
Expand All @@ -581,12 +679,16 @@ public static void BeginDeallocate(this ICassandraClustersOperations operations,
/// <param name='clusterName'>
/// Managed Cassandra cluster name.
/// </param>
/// <param name='xMsForceDeallocate'>
/// Force to deallocate a cluster of Cluster Type Production. Force to
/// deallocate a cluster of Cluster Type Production might cause data loss
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async System.Threading.Tasks.Task BeginDeallocateAsync(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
public static async System.Threading.Tasks.Task BeginDeallocateAsync(this ICassandraClustersOperations operations, string resourceGroupName, string clusterName, string xMsForceDeallocate = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
{
(await operations.BeginDeallocateWithHttpMessagesAsync(resourceGroupName, clusterName, null, cancellationToken).ConfigureAwait(false)).Dispose();
(await operations.BeginDeallocateWithHttpMessagesAsync(resourceGroupName, clusterName, xMsForceDeallocate, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
/// <summary>
/// Start the Managed Cassandra Cluster and Associated Data Centers. Start will
Expand Down
Loading

0 comments on commit 30e6d50

Please sign in to comment.