Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
cc4122b
add new sdk
cjmsft Feb 7, 2024
5f1d5a7
update version
cjmsft Feb 8, 2024
b7ccf0a
update sdk
cjmsft Feb 14, 2024
c54e806
cli changes for PRPP
kushalwarke1 Feb 16, 2024
53b0ab3
variable name fix, added test case
kushalwarke1 Feb 19, 2024
374e7f7
Add mode in copy job
niteshvijay-ms Jan 16, 2024
f9e78fc
Add complete job API
niteshvijay-ms Feb 19, 2024
1a61375
Add test
niteshvijay-ms Feb 20, 2024
ca8f496
history.rst changes
kushalwarke1 Feb 21, 2024
c873cf5
Merge pull request #2 from carjackson-msft/users/kushalwarke1/prpp-au…
Feb 21, 2024
32d29a6
Add history
niteshvijay-ms Feb 21, 2024
bd63d86
Merge branch 'main' into online-container-copy
niteshvijay1995 Feb 21, 2024
a1140ef
Merge pull request #3 from carjackson-msft/online-container-copy
niteshvijay1995 Feb 25, 2024
df53a19
Introduce disable_ttl parameter
minhokang242 Feb 14, 2024
931fdf7
Syntax error fixes
minhokang242 Feb 16, 2024
3182044
Update tests
minhokang242 Feb 16, 2024
c4761fe
Fix syntax error
minhokang242 Feb 22, 2024
7fe0549
Change test location to WestCentralUS where 0201 batch1 is completed,…
minhokang242 Feb 23, 2024
ebfcbed
Update history file
minhokang242 Feb 23, 2024
7d4dc54
Merge pull request #1 from carjackson-msft/users/minhokang/restore_wi…
Feb 27, 2024
21ba542
Changed cluster deallocate force input to string
DrewKaufmann Feb 28, 2024
3f493c7
add missing changes from stable https://github.com/Azure/azure-cli/pu…
cjmsft Feb 28, 2024
e53c8c6
add stable changes https://github.com/Azure/azure-cli/pull/27175/files
cjmsft Feb 28, 2024
f779e16
https://github.com/Azure/azure-cli/pull/27322/files
cjmsft Feb 28, 2024
f42f44f
add missing stable changes from https://github.com/Azure/azure-cli/pu…
cjmsft Feb 28, 2024
a0f675b
Revert "https://github.com/Azure/azure-cli/pull/27322/files"
cjmsft Feb 29, 2024
be4709e
add missing stable changes for minimal tls version from https://githu…
cjmsft Feb 29, 2024
d4f4abe
nit
cjmsft Feb 29, 2024
9de20ee
Revert "nit"
cjmsft Feb 29, 2024
e8e6279
Revert "add missing stable changes for minimal tls version from https…
cjmsft Feb 29, 2024
cbf8bf0
fix style checl
cjmsft Mar 1, 2024
e5a86ec
Address multi character short flag issue
minhokang242 Mar 1, 2024
24a9ef5
Add missing parameters
minhokang242 Mar 1, 2024
ea6e462
Fix syntax issue
minhokang242 Mar 1, 2024
eccd1f1
Remove short flag
minhokang242 Mar 1, 2024
81ed5d1
Merge pull request #5 from carjackson-msft/users/minhokang/disable_tt…
Mar 1, 2024
bcec1d3
fix test
cjmsft Mar 2, 2024
679d530
poc for test changes
AgarwalVivek Mar 2, 2024
7a72305
inital changes in custom.py
AgarwalVivek Mar 2, 2024
583371c
removing recordings
AgarwalVivek Mar 3, 2024
e50adf7
changes in params as well as test and recording for sql ntbr flow
AgarwalVivek Mar 3, 2024
97f1003
fixing imports
AgarwalVivek Mar 3, 2024
e24067c
fixing test
AgarwalVivek Mar 3, 2024
e6eeded
test changes
AgarwalVivek Mar 3, 2024
ea5c847
fixing recordings
AgarwalVivek Mar 4, 2024
1da7c14
config name change from --enable-per-region-per-partition-autoscale t…
kushalwarke1 Mar 4, 2024
f9f5103
Merge branch 'main' into users/kushalwarke1/prpp-autoscale-config-nam…
kushalwarke1 Mar 4, 2024
5cb8da7
Merge branch 'main' of https://github.com/carjackson-msft/azure-cli-e…
cjmsft Mar 4, 2024
b600c43
Merge pull request #6 from carjackson-msft/users/kushalwarke1/prpp-au…
Mar 4, 2024
1316cbb
re-record tests
cjmsft Mar 4, 2024
e4afed6
nit style
cjmsft Mar 4, 2024
8cc7ddb
Revert "fixing recordings"
AgarwalVivek Mar 4, 2024
9844b1f
Revert "removing recordings"
AgarwalVivek Mar 4, 2024
dc181d7
fixing incorrect merge
AgarwalVivek Mar 4, 2024
eafb9f8
Merge branch 'main' of https://github.com/carjackson-msft/azure-cli-e…
AgarwalVivek Mar 4, 2024
46deedd
Added test
DrewKaufmann Mar 5, 2024
1d606d7
6 out of 8 test failures
AgarwalVivek Mar 5, 2024
6a9983d
fixing remaining 2 tests
AgarwalVivek Mar 5, 2024
2092f64
fixing style issues
AgarwalVivek Mar 5, 2024
c2815dc
Merge pull request #7 from carjackson-msft/users/agarwalvivek/inaccou…
AgarwalVivek Mar 6, 2024
8c55c7e
Update HISTORY.rst to reflect changes ported from stable CLI
Mar 6, 2024
830ed63
Merge branch 'users/dkaufmann/force-deallocate-header-change' of http…
cjmsft Mar 7, 2024
686c036
re-record cassandra tests
cjmsft Mar 7, 2024
f20eeea
Update version to 1.0.0 due to breaking changes
Mar 8, 2024
8f0f757
azdev style fixes
cjmsft Mar 12, 2024
a518fe4
Merge branch 'main' of https://github.com/carjackson-msft/azure-cli-e…
cjmsft Mar 12, 2024
1da4eaf
azdev style fixes
cjmsft Mar 12, 2024
5bfbf4e
azdev style fixes
cjmsft Mar 12, 2024
8cf2f33
azdev style fixes
cjmsft Mar 12, 2024
ab9e872
azdev style fixes
cjmsft Mar 12, 2024
3672ffd
azdev style fixes
cjmsft Mar 12, 2024
5f90f18
Update HISTORY.rst version to 1.0.0
Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/cosmosdb-preview/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@

Release History
===============
1.0.0
* Add support for Per-Region Per-Partition Autoscale. '--enable-prpp-autoscale' parameter can be used during account create/update.
* Add support for Restore with Time-To-Live Disabled. '--disable-ttl' parameter can be used during restore.
* Add support for online mode in container copy job.
* Add support for minimum allowed TLS version configuration
* BREAKING CHANGE: az cosmosdb create/update: Rename --enable-public-network true/false to --public-network-access ENABLED/DISABLED/SECUREDBYPERIMETER
* BREAKING CHANGE: az cosmosdb restore: Rename --enable-public-network true/false to --public-network-access ENABLED/DISABLED

++++++
0.26.0
* Add '--enable-priority-based-execution' and '--default-priority-level' parameter for create/update database account.
* Add support for cross account container copy
* Add Non-CMK to CMK support
* Removed preview tag from CMK related properties

++++++
0.25.0
* Add support for performing database merge for Sql and MongoDB database account.

Expand Down
10 changes: 10 additions & 0 deletions src/cosmosdb-preview/azext_cosmosdb_preview/_help.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down Expand Up @@ -884,6 +885,15 @@
az cosmosdb copy cancel -g "rg1" --account-name "acc1" --job-name "j1"
"""

helps['cosmosdb copy complete'] = """
type: command
short-summary: "Completes an online container copy job."
examples:
- name: Complete job j1
text: |-
az cosmosdb copy complete -g "rg1" --account-name "acc1" --job-name "j1"
"""

helps['cosmosdb sql container merge'] = """
type: command
short-summary: "Merges the partitions of a sql container."
Expand Down
36 changes: 25 additions & 11 deletions src/cosmosdb-preview/azext_cosmosdb_preview/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ def load_arguments(self, _):
c.argument('databases_to_restore', nargs='+', action=CreateDatabaseRestoreResource, is_preview=True, arg_group='Restore')
c.argument('gremlin_databases_to_restore', nargs='+', action=CreateGremlinDatabaseRestoreResource, is_preview=True, arg_group='Restore')
c.argument('tables_to_restore', nargs='+', action=CreateTableRestoreResource, is_preview=True, arg_group='Restore')
c.argument('enable_partition_merge', arg_type=get_three_state_flag(), help="Flag to enable partition merge on the account.")

for scope in ['cosmosdb create', 'cosmosdb update']:
with self.argument_context(scope) as c:
Expand All @@ -324,7 +325,7 @@ def load_arguments(self, _):
c.argument('virtual_network_rules', nargs='+', validator=validate_virtual_network_rules, help='ACL\'s for virtual network')
c.argument('enable_multiple_write_locations', arg_type=get_three_state_flag(), help="Enable Multiple Write Locations")
c.argument('disable_key_based_metadata_write_access', arg_type=get_three_state_flag(), help="Disable write operations on metadata resources (databases, containers, throughput) via account keys")
c.argument('enable_public_network', options_list=['--enable-public-network', '-e'], arg_type=get_three_state_flag(), help="Enable or disable public network access to server.")
c.argument('public_network_access', options_list=['--public-network-access', '-p'], arg_type=get_enum_type(['ENABLED', 'DISABLED', 'SECUREDBYPERIMETER']), help="Sets public network access in server to either Enabled, Disabled, or SecuredByPerimeter.")
c.argument('enable_analytical_storage', arg_type=get_three_state_flag(), help="Flag to enable log storage on the account.")
c.argument('network_acl_bypass', arg_type=get_enum_type(NetworkAclBypass), options_list=['--network-acl-bypass'], help="Flag to enable or disable Network Acl Bypass.")
c.argument('network_acl_bypass_resource_ids', nargs='+', options_list=['--network-acl-bypass-resource-ids', '-i'], help="List of Resource Ids to allow Network Acl Bypass.")
Expand All @@ -340,6 +341,8 @@ 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_prpp_autoscale', arg_type=get_three_state_flag(), help="Enable or disable PerRegionPerPartitionAutoscale.", is_preview=True)
c.argument('enable_partition_merge', arg_type=get_three_state_flag(), help="Flag to enable partition merge on the account.")

with self.argument_context('cosmosdb update') as c:
c.argument('key_uri', help="The URI of the key vault", is_preview=True)
Expand All @@ -354,8 +357,9 @@ def load_arguments(self, _):
c.argument('tables_to_restore', nargs='+', action=CreateTableRestoreResource, is_preview=True)
c.argument('assign_identity', nargs='*', help="Assign system or user assigned identities separated by spaces. Use '[system]' to refer system assigned identity.")
c.argument('default_identity', help="The primary identity to access key vault in CMK related features. e.g. 'FirstPartyIdentity', 'SystemAssignedIdentity' and more.")
c.argument('enable_public_network', options_list=['--enable-public-network', '-e'], arg_type=get_three_state_flag(), help="Enable or disable public network access to server.", is_preview=True)
c.argument('public_network_access', options_list=['--public-network-access', '-p'], arg_type=get_enum_type(['ENABLED', 'DISABLED']), help="Sets public network access in server to either Enabled or Disabled.")
c.argument('source_backup_location', help="This is the location of the source account where backups are located. Provide this value if the source and target are in different locations.", is_preview=True)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True)

# Restorable Database Accounts
with self.argument_context('cosmosdb restorable-database-account show') as c:
Expand Down Expand Up @@ -464,21 +468,24 @@ def load_arguments(self, _):
c.argument('dest_nosql', nargs='+', arg_group='Azure Cosmos DB API for NoSQL container copy', action=AddSqlContainerAction, help='Destination NoSql container details')
c.argument('host_copy_on_src', arg_type=get_three_state_flag(), help=argparse.SUPPRESS)
c.argument('worker_count', type=int, help=argparse.SUPPRESS)
c.argument('mode', help='Copy Mode (Online / Offline)')

for scope in [
'cosmosdb copy list',
'cosmosdb copy show',
'cosmosdb copy pause',
'cosmosdb copy resume',
'cosmosdb copy cancel']:
'cosmosdb copy cancel',
'cosmosdb copy complete']:
with self.argument_context(scope) as c:
c.argument('account_name', options_list=["--account-name", "-a"], id_part=None, required=True, help='Azure Cosmos DB account name where the job is created. Use --dest-account value from create job command.')

for scope in [
'cosmosdb copy show',
'cosmosdb copy pause',
'cosmosdb copy resume',
'cosmosdb copy cancel']:
'cosmosdb copy cancel',
'cosmosdb copy complete']:
with self.argument_context(scope) as c:
c.argument('job_name', options_list=['--job-name', '-n'], help='Name of the container copy job.', required=True)

Expand Down Expand Up @@ -563,43 +570,50 @@ def load_arguments(self, _):
with self.argument_context('cosmosdb sql database restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('database_name', options_list=['--name', '-n'], help="Database name", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)

# SQL collection restore
with self.argument_context('cosmosdb sql container restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('database_name', database_name_type, required=True)
c.argument('container_name', options_list=['--name', '-n'], help="Container name", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the container needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the container needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)

# MongoDB database restore
with self.argument_context('cosmosdb mongodb database restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('database_name', options_list=['--name', '-n'], help="Database name", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)

# MongoDB collection restore
with self.argument_context('cosmosdb mongodb collection restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('database_name', database_name_type, required=True)
c.argument('collection_name', options_list=['--name', '-n'], help="Collection name", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the collection needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the collection needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)

# Gremlin database restore
with self.argument_context('cosmosdb gremlin database restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('database_name', options_list=['--name', '-n'], help="Name of the CosmosDB Gremlin database name", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the database needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)

# Gremlin Graph restore
with self.argument_context('cosmosdb gremlin graph restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('database_name', database_name_type, required=True, help='Name of the CosmosDB Gremlin database name')
c.argument('graph_name', options_list=['--name', '-n'], help="Name of the CosmosDB Gremlin graph name", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the graph needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the graph needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)

# Table restore
with self.argument_context('cosmosdb table restore') as c:
c.argument('account_name', account_name_type, id_part=None, required=True)
c.argument('table_name', options_list=['--table-name', '-n'], required=True, help='Name of the CosmosDB Table name')
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the Table needs to be restored to.", required=True)
c.argument('restore_timestamp', options_list=['--restore-timestamp', '-t'], action=UtcDatetimeAction, help="The timestamp to which the Table needs to be restored to.", required=False)
c.argument('disable_ttl', options_list=['--disable-ttl'], arg_type=get_three_state_flag(), help="Enable or disable restoring with ttl disabled.", is_preview=True, required=False)
1 change: 1 addition & 0 deletions src/cosmosdb-preview/azext_cosmosdb_preview/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ def load_command_table(self, _):
g.command('pause', 'pause')
g.command('resume', 'resume')
g.command('cancel', 'cancel')
g.command('complete', 'complete')

# Merge partitions for Sql containers
cosmosdb_sql_sdk = CliCommandType(
Expand Down
Loading