-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{RDBMS} az postgres flexible-server backup, az postgres flexible-server db, az postgres flexible-server firewall-rule, az postgres flexible-server long-term-retention, az postgres flexible-server migration, az postgres flexible-server replica create : Add breaking change announcements and --name argument to `
#32560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,12 +3,64 @@ | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # -------------------------------------------------------------------------------------------- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from azure.cli.core.breaking_change import register_argument_deprecate, register_command_group_deprecate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| from azure.cli.core.breaking_change import (register_argument_deprecate, register_command_group_deprecate, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # High availability command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_argument_deprecate('postgres flexible-server create', '--high-availability', redirect='--zonal-resiliency') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_argument_deprecate('postgres flexible-server update', '--high-availability', redirect='--zonal-resiliency') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Index Tuning command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_command_group_deprecate(command_group='postgres flexible-server index-tuning', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| redirect='postgres flexible-server autonomous-tuning', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='Index tuning feature has now expanded its capabilities to support ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'other automatically generated recommendations which are covered by the ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'new command.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # LTR command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server long-term-retention', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --backup-name/-b argument has been deprecated and will be removed ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server long-term-retention', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --name/-n argument will be repurposed to specify the backup name. ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'The --server-name/-s argument will be introduced to specify the server name ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Backup command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server backup', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --backup-name/-b argument has been deprecated and will be removed ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server backup', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --name/-n argument will be repurposed to specify the backup name. ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'The --server-name/-s argument will be introduced to specify the server name ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Database command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server db', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --database-name/-d argument has been deprecated and will be removed ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server db', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --name/-n argument will be repurposed to specify the database name. ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'The --server-name/-s argument will be introduced to specify the server name ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Firewall rule command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server firewall-rule', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --name/-n argument will be repurposed to specify the firewall rule ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'name. The --server-name/-s argument will be introduced to specify the server ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'name in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server firewall-rule', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --rule-name/-r argument has been deprecated and will be removed ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Migration command argument changes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server migration', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --migration-name argument has been deprecated and will be removed ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| register_other_breaking_change('postgres flexible-server migration', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| message='The --name/-n argument will be repurposed to specify the migration name. ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'The --server-name/-s argument will be introduced to specify the server name ' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+23
to
+63
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server long-term-retention', | |
| message='The --name/-n argument will be repurposed to specify the backup name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| # Backup command argument changes | |
| register_other_breaking_change('postgres flexible-server backup', | |
| message='The --backup-name/-b argument has been deprecated and will be removed ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server backup', | |
| message='The --name/-n argument will be repurposed to specify the backup name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| # Database command argument changes | |
| register_other_breaking_change('postgres flexible-server db', | |
| message='The --database-name/-d argument has been deprecated and will be removed ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server db', | |
| message='The --name/-n argument will be repurposed to specify the database name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| # Firewall rule command argument changes | |
| register_other_breaking_change('postgres flexible-server firewall-rule', | |
| message='The --name/-n argument will be repurposed to specify the firewall rule ' | |
| 'name. The --server-name/-s argument will be introduced to specify the server ' | |
| 'name in next breaking change release(2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server firewall-rule', | |
| message='The --rule-name/-r argument has been deprecated and will be removed ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| # Migration command argument changes | |
| register_other_breaking_change('postgres flexible-server migration', | |
| message='The --migration-name argument has been deprecated and will be removed ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server migration', | |
| message='The --name/-n argument will be repurposed to specify the migration name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in next breaking change release(2.86.0) scheduled for May 2026.') | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server long-term-retention', | |
| message='The --name/-n argument will be repurposed to specify the backup name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| # Backup command argument changes | |
| register_other_breaking_change('postgres flexible-server backup', | |
| message='The --backup-name/-b argument has been deprecated and will be removed ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server backup', | |
| message='The --name/-n argument will be repurposed to specify the backup name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| # Database command argument changes | |
| register_other_breaking_change('postgres flexible-server db', | |
| message='The --database-name/-d argument has been deprecated and will be removed ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server db', | |
| message='The --name/-n argument will be repurposed to specify the database name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| # Firewall rule command argument changes | |
| register_other_breaking_change('postgres flexible-server firewall-rule', | |
| message='The --name/-n argument will be repurposed to specify the firewall rule ' | |
| 'name. The --server-name/-s argument will be introduced to specify the server ' | |
| 'name in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server firewall-rule', | |
| message='The --rule-name/-r argument has been deprecated and will be removed ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| # Migration command argument changes | |
| register_other_breaking_change('postgres flexible-server migration', | |
| message='The --migration-name argument has been deprecated and will be removed ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') | |
| register_other_breaking_change('postgres flexible-server migration', | |
| message='The --name/-n argument will be repurposed to specify the migration name. ' | |
| 'The --server-name/-s argument will be introduced to specify the server name ' | |
| 'in the next breaking change release (2.86.0) scheduled for May 2026.') |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -884,6 +884,8 @@ def _flexible_server_params(command_group): | |||||
| with self.argument_context('{} flexible-server replica create'.format(command_group)) as c: | ||||||
| c.argument('source_server', arg_type=source_server_arg_type) | ||||||
| c.argument('replica_name', options_list=['--replica-name'], | ||||||
| help='The name of the server to restore to.') | ||||||
|
||||||
| help='The name of the server to restore to.') | |
| help='The name of the read replica.') |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -591,14 +591,17 @@ def flexible_replica_list_by_server(cmd, client, resource_group_name, server_nam | |||||||||||||
| return client.list_by_server(resource_group_name, server_name) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| def flexible_replica_create(cmd, client, resource_group_name, source_server, replica_name, zone=None, | ||||||||||||||
| def flexible_replica_create(cmd, client, resource_group_name, source_server, replica_name=None, name=None, zone=None, | ||||||||||||||
| location=None, vnet=None, vnet_address_prefix=None, subnet=None, | ||||||||||||||
| subnet_address_prefix=None, private_dns_zone_arguments=None, no_wait=False, | ||||||||||||||
| byok_identity=None, byok_key=None, | ||||||||||||||
| sku_name=None, tier=None, | ||||||||||||||
| storage_gb=None, performance_tier=None, yes=False, tags=None): | ||||||||||||||
| validate_resource_group(resource_group_name) | ||||||||||||||
| replica_name = replica_name.lower() | ||||||||||||||
|
|
||||||||||||||
| if replica_name is None and name is None: | ||||||||||||||
| raise RequiredArgumentMissingError('the following arguments are required: --name') | ||||||||||||||
|
||||||||||||||
| raise RequiredArgumentMissingError('the following arguments are required: --name') | |
| raise RequiredArgumentMissingError('One of the following arguments is required: --name, --replica-name') |
Copilot
AI
Jan 2, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic for handling --name and --replica-name gives priority to --name when both are provided (line 604: replica_name.lower() if name is None else name.lower()). However, there's no warning or error when both arguments are specified simultaneously. This could lead to confusion during the transition period. Consider adding a check to either warn users or raise a MutuallyExclusiveArgumentError when both arguments are provided, to guide users toward using only --name.
| raise RequiredArgumentMissingError('the following arguments are required: --name') | |
| raise RequiredArgumentMissingError('the following arguments are required: --name') | |
| if replica_name is not None and name is not None: | |
| raise MutuallyExclusiveArgumentError('usage error: --name and --replica-name cannot be used together. Please use --name.') |
Uh oh!
There was an error while loading. Please reload this page.