Skip to content
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

Documented sql db restore time format #11838

Merged
merged 2 commits into from
Jan 19, 2020
Merged
Changes from all commits
Commits
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: 7 additions & 3 deletions src/azure-cli/azure/cli/command_modules/sql/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ def __repr__(self):

server_configure_help = 'You can configure the default using `az configure --defaults sql-server=<name>`'

time_format_help = 'Time should be in following format: "YYYY-MM-DDTHH:MM:SS".'


def get_location_type_with_default_from_resource_group(cli_ctx):
return CLIArgumentType(
Expand Down Expand Up @@ -484,14 +486,16 @@ def load_arguments(self, _):
arg_group=restore_point_arg_group,
help='The point in time of the source database that will be restored to create the'
' new database. Must be greater than or equal to the source database\'s'
' earliestRestoreDate value. Either --time or --deleted-time (or both) must be specified.')
' earliestRestoreDate value. Either --time or --deleted-time (or both) must be specified. ' +
time_format_help)

c.argument('source_database_deletion_date',
options_list=['--deleted-time'],
arg_group=restore_point_arg_group,
help='If specified, restore from a deleted database instead of from an existing database.'
' Must match the deleted time of a deleted database in the same server.'
' Either --time or --deleted-time (or both) must be specified.')
' Either --time or --deleted-time (or both) must be specified. ' +
time_format_help)

with self.argument_context('sql db show') as c:
# Service tier advisors and transparent data encryption are not included in the first batch
Expand Down Expand Up @@ -1376,7 +1380,7 @@ def _configure_security_policy_storage_params(arg_ctx):
required=True,
help='The point in time of the source database that will be restored to create the'
' new database. Must be greater than or equal to the source database\'s'
' earliestRestoreDate value. Time should be in following format: "YYYY-MM-DDTHH:MM:SS"')
' earliestRestoreDate value. ' + time_format_help)

with self.argument_context('sql midb list') as c:
c.argument('managed_instance_name', id_part=None)
Expand Down