az sql mi start-stop-schedule

Manage the managed instance's start stop schedule.

Commands

Name Description Type Status
az sql mi start-stop-schedule create

Create the managed instance's Start/Stop schedule.

Core GA
az sql mi start-stop-schedule delete

Delete the managed instance's Start/Stop schedule.

Core GA
az sql mi start-stop-schedule list

List the managed instance's Start/Stop schedules.

Core GA
az sql mi start-stop-schedule show

Get the managed instance's Start/Stop schedule.

Core GA
az sql mi start-stop-schedule update

Update the managed instance's Start/Stop schedule.

Core GA

az sql mi start-stop-schedule create

Create the managed instance's Start/Stop schedule.

az sql mi start-stop-schedule create --managed-instance
                                     --resource-group
                                     [--description]
                                     [--schedule-list]
                                     [--timezone-id]

Examples

Create schedule for managed instance.

az sql mi start-stop-schedule create --mi miName -g resourceGroup --subscription subscriptionId --schedule-list "[{'startDay':'Monday','startTime':'10:00 AM','stopDay':'Monday','stopTime':'12:00 AM'}]"

Required Parameters

--managed-instance --mi

The name of the managed instance.

--resource-group -g

Name of the resource group.

Optional Parameters

--description

The description of the schedule.

--schedule-list

Schedule list. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--timezone-id

The time zone of the schedule.

default value: UTC
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql mi start-stop-schedule delete

Delete the managed instance's Start/Stop schedule.

az sql mi start-stop-schedule delete [--ids]
                                     [--managed-instance]
                                     [--resource-group]
                                     [--subscription]
                                     [--yes]

Examples

Delete a managed instance start stop schedule.

az sql mi start-stop-schedule delete --ids resourceId
az sql mi start-stop-schedule delete --mi miName -g resourceGroup --subscription subscriptionId

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance --mi

The name of the managed instance.

--resource-group -g

Name of the resource group.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql mi start-stop-schedule list

List the managed instance's Start/Stop schedules.

az sql mi start-stop-schedule list [--ids]
                                   [--managed-instance]
                                   [--resource-group]
                                   [--subscription]

Examples

Lists the managed instance's start stop schedule.

az sql mi start-stop-schedule list --ids resourceId
az sql mi start-stop-schedule list --mi miName -g resourceGroup --subscription subscriptionId

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance --mi

The name of the managed instance.

--resource-group -g

Name of the resource group.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql mi start-stop-schedule show

Get the managed instance's Start/Stop schedule.

az sql mi start-stop-schedule show [--ids]
                                   [--managed-instance]
                                   [--resource-group]
                                   [--subscription]

Examples

Get the managed instance's start stop schedule.

az sql mi start-stop-schedule show --ids resourceId
az sql mi start-stop-schedule show --mi miName -g resourceGroup --subscription subscriptionId

Optional Parameters

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance --mi

The name of the managed instance.

--resource-group -g

Name of the resource group.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az sql mi start-stop-schedule update

Update the managed instance's Start/Stop schedule.

az sql mi start-stop-schedule update [--add]
                                     [--description]
                                     [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                     [--ids]
                                     [--managed-instance]
                                     [--remove]
                                     [--resource-group]
                                     [--schedule-list]
                                     [--set]
                                     [--subscription]
                                     [--timezone-id]

Examples

Update (override) the managed instance's start stop schedule.

az sql mi start-stop-schedule update --ids resourceId --schedule-list "[{'startDay':'Monday','startTime':'10:00 AM','stopDay':'Monday','stopTime':'12:00 AM'}]"
az sql mi start-stop-schedule update --mi miName -g resourceGroup --subscription subscriptionId --schedule-list "[{'startDay':'Monday','startTime':'10:00 AM','stopDay':'Monday','stopTime':'12:00 AM'}]"

Add schedule items to the managed instance's start stop schedule.

az sql mi start-stop-schedule update --ids resourceId --add schedule_list "{'startDay':'Monday','startTime':'10:00 AM','stopDay':'Monday','stopTime':'12:00 AM'}"

Remove schedule items from the managed instance's start stop schedule.

az sql mi start-stop-schedule update --ids resourceId --remove schedule_list index(0 based)

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--description

The description of the schedule.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--managed-instance --mi

The name of the managed instance.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of the resource group.

--schedule-list

Schedule list. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timezone-id

The time zone of the schedule.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

accepted values: json, jsonc, none, table, tsv, yaml, yamlc
default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.