diff --git a/src/azure-cli/azure/cli/command_modules/acr/_params.py b/src/azure-cli/azure/cli/command_modules/acr/_params.py index b0b847b56c5..b0b3ed68b74 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/_params.py +++ b/src/azure-cli/azure/cli/command_modules/acr/_params.py @@ -421,9 +421,9 @@ def load_arguments(self, _): # pylint: disable=too-many-statements with self.argument_context('acr connected-registry update') as c: c.argument('log_level', help='Sets the log level for logging on the instance. Accepted log levels are Debug, Information, Warning, Error, and None.', required=False) c.argument('add_client_token_list', options_list=['--add-client-tokens'], nargs='*', required=False, - help='Client tokens to be added. Use the format "--add-client-tokens [TOKEN_ID1 TOKEN_ID2 ...]" per token id.') + help='Client tokens to be added. Use the format "--add-client-tokens [TOKEN_NAME1 TOKEN_NAME2 ...]" per token id.') c.argument('remove_client_token_list', options_list=['--remove-client-tokens'], nargs='*', required=False, - help='Client tokens to be removed. Use the format "--remove-client-tokens [TOKEN_ID1 TOKEN_ID2 ...]" per token id.') + help='Client tokens to be removed. Use the format "--remove-client-tokens [TOKEN_NAME1 TOKEN_NAME2 ...]" per token id.') c.argument('sync_window', options_list=['--sync-window', '-w'], help='Used to determine the schedule duration. Uses ISO 8601 duration format.', required=False) c.argument('sync_schedule', options_list=['--sync-schedule', '-s'], help='Optional parameter to define the sync schedule. Uses cron expression to determine the schedule. If not specified, the instance is considered always online and attempts to sync every minute.', required=False) c.argument('sync_message_ttl', help='Determines how long the sync messages will be kept in the cloud. Uses ISO 8601 duration format.', required=False) diff --git a/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py b/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py index e34535a62bf..56694acfb80 100644 --- a/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py +++ b/src/azure-cli/azure/cli/command_modules/acr/connected_registry.py @@ -63,7 +63,10 @@ def acr_connected_registry_create(cmd, # pylint: disable=too-many-locals, too-m sync_audit_logs_enabled=False): if bool(sync_token_name) == bool(repositories): - raise CLIError("usage error: you need to provide either --sync-token-name or --repository, but not both.") + raise CLIError("usage error: you must provide either --sync-token-name or --repository, but not both.") + # Check needed since the sync token gateway actions must be at least 5 characters long. + if len(connected_registry_name) < 5: + raise CLIError("argument error: Connected registry name must be at least 5 characters long") registry, resource_group_name = get_registry_by_name(cmd.cli_ctx, registry_name, resource_group_name) subscription_id = get_subscription_id(cmd.cli_ctx)