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=2025-01-01

URI-parametrar

Name I Obligatorisk Typ Description
managedInstanceName
path True

string

Namnet på den hanterade instansen.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

startStopScheduleName
path True

StartStopScheduleName

Namnet på start-/stoppschemat för den hanterade instansen.

subscriptionId
path True

string (uuid)

ID för målprenumerationen. Värdet måste vara ett UUID.

api-version
query True

string

minLength: 1

Den API-version som ska användas för den här åtgärden.

Begärandetext

Name Obligatorisk Typ Description
properties.scheduleList True

ScheduleItem[]

Lista över scheman.

properties.description

string

Beskrivningen av schemat.

properties.timeZoneId

string

Schemats tidszon.

Svar

Name Typ Description
200 OK

StartStopManagedInstanceSchedule

Resursens 'StartStopManagedInstanceSchedule'-uppdateringsoperation lyckades

201 Created

StartStopManagedInstanceSchedule

Resursen 'StartStopManagedInstanceSchedule' skapade operationen lyckades

Other Status Codes

ErrorResponse

Ett oväntat felsvar.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow.

Typ: oauth2
Flow: implicit
Auktoriseringswebbadress: https://login.microsoftonline.com/common/oauth2/authorize

Omfattningar

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

Creates or updates the managed instance's Start/Stop schedule with all optional parameters specified.
Creates or updates the managed instance's Start/Stop schedule with no optional parameters specified.

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=2025-01-01

{
  "properties": {
    "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"
      }
    ],
    "timeZoneId": "Central European Standard Time"
  }
}

Exempelsvar

{
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/startStopSchedules",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
  "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"
  },
  "systemData": {
    "createdAt": "2021-08-26T04:41:33.937Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2021-08-27T04:41:33.937Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  }
}
{
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/startStopSchedules",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
  "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"
  },
  "systemData": {
    "createdAt": "2021-08-26T04:41:33.937Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2021-08-26T04:41:33.937Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  }
}

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=2025-01-01

{
  "properties": {
    "scheduleList": [
      {
        "startDay": "Thursday",
        "startTime": "18:00",
        "stopDay": "Thursday",
        "stopTime": "17:00"
      },
      {
        "startDay": "Thursday",
        "startTime": "15:00",
        "stopDay": "Thursday",
        "stopTime": "14:00"
      }
    ]
  }
}

Exempelsvar

{
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/startStopSchedules",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
  "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"
  },
  "systemData": {
    "createdAt": "2021-08-26T04:41:33.937Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2021-08-27T04:41:33.937Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  }
}
{
  "name": "default",
  "type": "Microsoft.Sql/managedInstances/startStopSchedules",
  "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/schedulerg/providers/Microsoft.Sql/managedInstances/schedulemi/startStopSchedules/default",
  "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"
  },
  "systemData": {
    "createdAt": "2021-08-26T04:41:33.937Z",
    "createdBy": "string",
    "createdByType": "User",
    "lastModifiedAt": "2021-08-26T04:41:33.937Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User"
  }
}

Definitioner

Name Description
createdByType

Den typ av identitet som skapade resursen.

DayOfWeek

Underhållsdag.

ErrorAdditionalInfo

Resurshanteringsfelet ytterligare information.

ErrorDetail

Detaljerna om felet.

ErrorResponse

Felsvar

ScheduleItem

Schemalägg information som beskriver när servern ska startas eller stoppas.

StartStopManagedInstanceSchedule

Start-/stoppschema för den hanterade instansen.

StartStopScheduleName
systemData

Metadata som rör skapande och senaste ändring av resursen.

createdByType

Den typ av identitet som skapade resursen.

Värde Description
User
Application
ManagedIdentity
Key

DayOfWeek

Underhållsdag.

Värde Description
Sunday

söndag

Monday

Måndag

Tuesday

Tisdag

Wednesday

Onsdag

Thursday

Torsdag

Friday

Fredag

Saturday

lördag

ErrorAdditionalInfo

Resurshanteringsfelet ytterligare information.

Name Typ Description
info

object

Den ytterligare informationen.

type

string

Typen av ytterligare information.

ErrorDetail

Detaljerna om felet.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Felet ytterligare information.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felet objektet.

ScheduleItem

Schemalägg information som beskriver när servern ska startas eller stoppas.

Name Typ Description
startDay

DayOfWeek

Startdag.

startTime

string

Starttid.

stopDay

DayOfWeek

Stoppdag.

stopTime

string

Stopptid.

StartStopManagedInstanceSchedule

Start-/stoppschema för den hanterade instansen.

Name Typ Standardvärde Description
id

string (arm-id)

Fullständigt kvalificerat resurs-ID för resursen. T.ex. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

Namnet på resursen

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

ScheduleItem[]

Lista över scheman.

properties.timeZoneId

string

UTC

Schemats tidszon.

systemData

systemData

Azure Resource Manager-metadata som innehåller creationBy och modifiedBy-information.

type

string

Resurstypen. T.ex. "Microsoft. Compute/virtualMachines" eller "Microsoft. Storage/storageAccounts"

StartStopScheduleName

Värde Description
default

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

createdByType

Den typ av identitet som skapade resursen.

lastModifiedAt

string (date-time)

Tidsstämpeln för senaste ändring av resurs (UTC)

lastModifiedBy

string

Identiteten som senast ändrade resursen.

lastModifiedByType

createdByType

Den typ av identitet som senast ändrade resursen.