Start Stop Managed Instance Schedules - Create Or Update
Skapar eller uppdaterar den hanterade instansens start-/stoppschema.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/default?api-version=2023-08-01
URI-parametrar
Name | I | Obligatorisk | Typ | Description |
---|---|---|---|---|
managed
|
path | True |
string |
Namnet på den hanterade instansen. |
resource
|
path | True |
string |
Namnet på resursgruppen som innehåller resursen. Du kan hämta det här värdet från Azure Resource Manager-API:et eller portalen. |
start
|
path | True |
Namnet på start-/stoppschemat för den hanterade instansen. |
|
subscription
|
path | True |
string |
Det prenumerations-ID som identifierar en Azure-prenumeration. |
api-version
|
query | True |
string |
DEN API-version som ska användas för begäran. |
Begärandetext
Name | Obligatorisk | Typ | Description |
---|---|---|---|
properties.scheduleList | True |
Schemalista. |
|
properties.description |
string |
Beskrivningen av schemat. |
|
properties.timeZoneId |
string |
Schemats tidszon. |
Svar
Name | Typ | Description |
---|---|---|
200 OK |
Ställ in start-/stoppschemat. |
|
201 Created |
Start-/stoppschemat har skapats. |
|
Other Status Codes |
Felsvar: ***
|
Exempel
Creates or updates the managed instance's Start/Stop schedule with all optional parameters specified.
Exempelbegäran
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default?api-version=2023-08-01
{
"properties": {
"timeZoneId": "Central European Standard Time",
"description": "This is a schedule for our Dev/Test environment.",
"scheduleList": [
{
"startDay": "Thursday",
"startTime": "18:00",
"stopDay": "Thursday",
"stopTime": "17:00"
},
{
"startDay": "Thursday",
"startTime": "15:00",
"stopDay": "Thursday",
"stopTime": "14:00"
}
]
}
}
Exempelsvar
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
"name": "default",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-08-26T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-27T04:41:33.937Z"
},
"properties": {
"description": "This is a schedule for our Dev/Test environment.",
"nextExecutionTime": "2021-08-26T14:00:00",
"nextRunAction": "Stop",
"scheduleList": [
{
"startDay": "Thursday",
"startTime": "06:00 PM",
"stopDay": "Thursday",
"stopTime": "05:00 PM"
},
{
"startDay": "Thursday",
"startTime": "03:00 PM",
"stopDay": "Thursday",
"stopTime": "02:00 PM"
}
],
"timeZoneId": "Central European Standard Time"
},
"type": "Microsoft.Sql/managedInstances/startStopSchedules"
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
"name": "default",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-08-26T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-26T04:41:33.937Z"
},
"properties": {
"description": "This is a schedule for our Dev/Test environment.",
"nextExecutionTime": "2021-08-26T14:00:00",
"nextRunAction": "Stop",
"scheduleList": [
{
"startDay": "Thursday",
"startTime": "06:00 PM",
"stopDay": "Thursday",
"stopTime": "05:00 PM"
},
{
"startDay": "Thursday",
"startTime": "03:00 PM",
"stopDay": "Thursday",
"stopTime": "02:00 PM"
}
],
"timeZoneId": "Central European Standard Time"
},
"type": "Microsoft.Sql/managedInstances/startStopSchedules"
}
Creates or updates the managed instance's Start/Stop schedule with no optional parameters specified.
Exempelbegäran
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default?api-version=2023-08-01
{
"properties": {
"scheduleList": [
{
"startDay": "Thursday",
"startTime": "18:00",
"stopDay": "Thursday",
"stopTime": "17:00"
},
{
"startDay": "Thursday",
"startTime": "15:00",
"stopDay": "Thursday",
"stopTime": "14:00"
}
]
}
}
Exempelsvar
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
"name": "default",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-08-26T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-27T04:41:33.937Z"
},
"properties": {
"description": "",
"nextExecutionTime": "2021-08-26T14:00:00",
"nextRunAction": "Stop",
"scheduleList": [
{
"startDay": "Thursday",
"startTime": "06:00 PM",
"stopDay": "Thursday",
"stopTime": "05:00 PM"
},
{
"startDay": "Thursday",
"startTime": "03:00 PM",
"stopDay": "Thursday",
"stopTime": "02:00 PM"
}
],
"timeZoneId": "UTC"
},
"type": "Microsoft.Sql/managedInstances/startStopSchedules"
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
"name": "default",
"systemData": {
"createdBy": "string",
"createdByType": "User",
"createdAt": "2021-08-26T04:41:33.937Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-08-26T04:41:33.937Z"
},
"properties": {
"description": "",
"nextExecutionTime": "2021-08-26T14:00:00",
"nextRunAction": "Stop",
"scheduleList": [
{
"startDay": "Thursday",
"startTime": "06:00 PM",
"stopDay": "Thursday",
"stopTime": "05:00 PM"
},
{
"startDay": "Thursday",
"startTime": "03:00 PM",
"stopDay": "Thursday",
"stopTime": "02:00 PM"
}
],
"timeZoneId": "UTC"
},
"type": "Microsoft.Sql/managedInstances/startStopSchedules"
}
Definitioner
Name | Description |
---|---|
created |
Den typ av identitet som skapade resursen. |
Day |
Startdag. |
Error |
Ytterligare information om resurshanteringsfelet. |
Error |
Felinformationen. |
Error |
Felsvar |
Schedule |
Schemalägg information som beskriver när servern ska startas eller stoppas. |
Start |
Start-/stoppschema för den hanterade instansen. |
Start |
Namnet på start-/stoppschemat för den hanterade instansen. |
system |
Metadata som rör skapande och senaste ändring av resursen. |
createdByType
Den typ av identitet som skapade resursen.
Värde | Description |
---|---|
Application | |
Key | |
ManagedIdentity | |
User |
DayOfWeek
Startdag.
Värde | Description |
---|---|
Friday | |
Monday | |
Saturday | |
Sunday | |
Thursday | |
Tuesday | |
Wednesday |
ErrorAdditionalInfo
Ytterligare information om resurshanteringsfelet.
Name | Typ | Description |
---|---|---|
info |
object |
Ytterligare information. |
type |
string |
Ytterligare informationstyp. |
ErrorDetail
Felinformationen.
Name | Typ | Description |
---|---|---|
additionalInfo |
Ytterligare information om felet. |
|
code |
string |
Felkoden. |
details |
Felinformationen. |
|
message |
string |
Felmeddelandet. |
target |
string |
Felmålet. |
ErrorResponse
Felsvar
Name | Typ | Description |
---|---|---|
error |
Felobjektet. |
ScheduleItem
Schemalägg information som beskriver när servern ska startas eller stoppas.
Name | Typ | Description |
---|---|---|
startDay |
Startdag. |
|
startTime |
string |
Starttid. |
stopDay |
Stoppa dagen. |
|
stopTime |
string |
Stopptid. |
StartStopManagedInstanceSchedule
Start-/stoppschema för den hanterade instansen.
Name | Typ | Standardvärde | Description |
---|---|---|---|
id |
string |
Resurs-ID. |
|
name |
string |
Resursnamn. |
|
properties.description |
string |
Beskrivningen av schemat. |
|
properties.nextExecutionTime |
string |
Tidsstämpel när nästa åtgärd körs i motsvarande tidszon för schemat. |
|
properties.nextRunAction |
string |
Nästa åtgärd som ska köras (Start eller Stopp) |
|
properties.scheduleList |
Schemalista. |
||
properties.timeZoneId |
string |
UTC |
Schemats tidszon. |
systemData |
Systemdata för den schemalagda resursen. |
||
type |
string |
Resurstyp. |
StartStopScheduleName
Namnet på start-/stoppschemat för den hanterade instansen.
Värde | Description |
---|---|
default |
systemData
Metadata som rör skapande och senaste ändring av resursen.
Name | Typ | Description |
---|---|---|
createdAt |
string (date-time) |
Tidsstämpeln för resursskapande (UTC). |
createdBy |
string |
Identiteten som skapade resursen. |
createdByType |
Den typ av identitet som skapade resursen. |
|
lastModifiedAt |
string (date-time) |
Tidsstämpeln för resursens senaste ändring (UTC) |
lastModifiedBy |
string |
Identiteten som senast ändrade resursen. |
lastModifiedByType |
Den typ av identitet som senast ändrade resursen. |