Skip to content

Commit

Permalink
Merge branch 'main' into online-container-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
niteshvijay1995 authored Feb 21, 2024
2 parents 32d29a6 + c873cf5 commit bd63d86
Show file tree
Hide file tree
Showing 5 changed files with 2,073 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/cosmosdb-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Release History
===============
0.27.0
* Add online mode for container copy job.
* Add support for Per-Region Per-Partition Autoscale. '--enable-per-region-per-partition-autoscale' parameter can be used during account create/update.
* Add support for online mode in container copy job.

++++++
0.26.0
Expand Down
1 change: 1 addition & 0 deletions src/cosmosdb-preview/azext_cosmosdb_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ def load_arguments(self, _):
c.argument('enable_burst_capacity', arg_type=get_three_state_flag(), help="Flag to enable burst capacity on the account.", is_preview=True)
c.argument('enable_priority_based_execution', options_list=['--enable-priority-based-execution', '--enable-pbe'], arg_type=get_three_state_flag(), help="Flag to enable priority based execution on the account.", is_preview=True)
c.argument('default_priority_level', arg_type=get_enum_type(DefaultPriorityLevel), help="Default Priority Level of Request if not specified.", is_preview=True)
c.argument('enable_per_region_per_partition_autoscale', arg_type=get_three_state_flag(), help="Enable or disable PerRegionPerPartitionAutoscale.", is_preview=True)

with self.argument_context('cosmosdb update') as c:
c.argument('key_uri', help="The URI of the key vault", is_preview=True)
Expand Down
18 changes: 12 additions & 6 deletions src/cosmosdb-preview/azext_cosmosdb_preview/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,8 @@ def cli_cosmosdb_create(cmd,
enable_materialized_views=None,
enable_burst_capacity=None,
enable_priority_based_execution=None,
default_priority_level=None):
default_priority_level=None,
enable_per_region_per_partition_autoscale=None):
"""Create a new Azure Cosmos DB database account."""

from azure.cli.core.commands.client_factory import get_mgmt_service_client
Expand Down Expand Up @@ -835,7 +836,8 @@ def cli_cosmosdb_create(cmd,
enable_materialized_views=enable_materialized_views,
enable_burst_capacity=enable_burst_capacity,
enable_priority_based_execution=enable_priority_based_execution,
default_priority_level=default_priority_level)
default_priority_level=default_priority_level,
enable_per_region_per_partition_autoscale=enable_per_region_per_partition_autoscale)


# pylint: disable=too-many-branches
Expand Down Expand Up @@ -869,7 +871,8 @@ def cli_cosmosdb_update(client,
enable_materialized_views=None,
enable_burst_capacity=None,
enable_priority_based_execution=None,
default_priority_level=None):
default_priority_level=None,
enable_per_region_per_partition_autoscale=None):
"""Update an existing Azure Cosmos DB database account. """
existing = client.get(resource_group_name, account_name)

Expand Down Expand Up @@ -962,7 +965,8 @@ def cli_cosmosdb_update(client,
enable_materialized_views=enable_materialized_views,
enable_burst_capacity=enable_burst_capacity,
enable_priority_based_execution=enable_priority_based_execution,
default_priority_level=default_priority_level)
default_priority_level=default_priority_level,
enable_per_region_per_partition_autoscale=enable_per_region_per_partition_autoscale)

async_docdb_update = client.begin_update(resource_group_name, account_name, params)
docdb_account = async_docdb_update.result()
Expand Down Expand Up @@ -1167,7 +1171,8 @@ def _create_database_account(client,
enable_burst_capacity=None,
source_backup_location=None,
enable_priority_based_execution=None,
default_priority_level=None):
default_priority_level=None,
enable_per_region_per_partition_autoscale=None):

consistency_policy = None
if default_consistency_level is not None:
Expand Down Expand Up @@ -1306,7 +1311,8 @@ def _create_database_account(client,
enable_materialized_views=enable_materialized_views,
enable_burst_capacity=enable_burst_capacity,
enable_priority_based_execution=enable_priority_based_execution,
default_priority_level=default_priority_level
default_priority_level=default_priority_level,
enable_per_region_per_partition_autoscale=enable_per_region_per_partition_autoscale
)

async_docdb_create = client.begin_create_or_update(resource_group_name, account_name, params)
Expand Down
Loading

0 comments on commit bd63d86

Please sign in to comment.