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 |
---|---|---|---|---|
database
|
path | True |
string |
The name of the database to get maintenance windows for. |
resource
|
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. |
server
|
path | True |
string |
The name of the server. |
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
The API version to use for the request. |
maintenance
|
query | True |
string |
Maintenance window name. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Successfully retrieved maintenance windows settings. |
|
Other Status Codes |
*** Error Responses: *** |
Examples
Gets maintenance window settings for a selected database.
Sample request
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 |
---|---|
Day |
Day of maintenance window. |
Maintenance |
Maintenance windows. |
Maintenance |
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 |
Maintenance window time range. |
|
type |
string |
Resource type. |
MaintenanceWindowTimeRange
Maintenance window time range.
Name | Type | Description |
---|---|---|
dayOfWeek |
Day of maintenance window. |
|
duration |
string |
Duration of maintenance window in minutes. |
startTime |
string |
Start time minutes offset from 12am. |