Maintenance Windows - Get

Gets maintenance windows settings for a database.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/maintenanceWindows/current?maintenanceWindowName={maintenanceWindowName}&api-version=2021-11-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database to get maintenance windows for.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True

string

The name of the server.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

api-version
query True

string

The API version to use for the request.

maintenanceWindowName
query True

string

Maintenance window name.

Responses

Name Type Description
200 OK

MaintenanceWindows

Successfully retrieved maintenance windows settings.

Other Status Codes

*** Error Responses: ***

Examples

Gets maintenance window settings for a selected database.

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenanceWindows/current?maintenanceWindowName=current&api-version=2021-11-01

Sample response

{
  "properties": {
    "timeRanges": [
      {
        "dayOfWeek": "Saturday",
        "startTime": "00:00:00",
        "duration": "PT60M"
      }
    ]
  },
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/servers/testsvr/databases/testdb/maintenancewindows/current",
  "name": "current",
  "type": "Microsoft.Sql/servers/databases/maintenancewindows"
}

Definitions

Name Description
DayOfWeek

Day of maintenance window.

MaintenanceWindows

Maintenance windows.

MaintenanceWindowTimeRange

Maintenance window time range.

DayOfWeek

Day of maintenance window.

Name Type Description
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

MaintenanceWindows

Maintenance windows.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.timeRanges

MaintenanceWindowTimeRange[]

Maintenance window time range.

type

string

Resource type.

MaintenanceWindowTimeRange

Maintenance window time range.

Name Type Description
dayOfWeek

DayOfWeek

Day of maintenance window.

duration

string

Duration of maintenance window in minutes.

startTime

string

Start time minutes offset from 12am.