Start Stop Managed Instance Schedules - Create Or Update

Yönetilen örneğin Başlatma/Durdurma zamanlamasını oluşturur veya güncelleştirir.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/default?api-version=2023-08-01-preview

URI Parametreleri

Name İçinde Gerekli Tür Description
managedInstanceName
path True

string

Yönetilen örneğin adı.

resourceGroupName
path True

string

Kaynağı içeren kaynak grubunun adı. Bu değeri Azure Resource Manager API'sinden veya portaldan alabilirsiniz.

startStopScheduleName
path True

StartStopScheduleName

Yönetilen örneğin Başlangıç/Durdurma zamanlamasının adı.

subscriptionId
path True

string

Azure aboneliğini tanımlayan abonelik kimliği.

api-version
query True

string

İstek için kullanılacak API sürümü.

İstek Gövdesi

Name Gerekli Tür Description
properties.scheduleList True

ScheduleItem[]

Zamanlama listesi.

properties.description

string

Zamanlamanın açıklaması.

properties.timeZoneId

string

Zamanlamanın saat dilimi.

Yanıtlar

Name Tür Description
200 OK

StartStopManagedInstanceSchedule

Başlat/Durdur zamanlamasını başarıyla ayarlayın.

201 Created

StartStopManagedInstanceSchedule

Başlat/Durdur zamanlaması başarıyla oluşturuldu.

Other Status Codes

ErrorResponse

Hata Yanıtları: **

  • 204 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - Kullanıcı Başlangıç/Durdurma zamanlamasının CRUD işlemini 'varsayılan' zamanlama adından farklı bir zamanlama adıyla gerçekleştirmeye çalıştı

  • 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestParametersInvalid - İsteğin gövdesinde sağlanan parametre kümesi boş veya geçersiz.

  • 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestTimeZoneInvalid - Sağlanan saat dilimi parametresi geçersiz.

  • 400 ManagementServiceStartStopManagedInstanceScheduleCreateOrUpdateRequestScheduleInvalid - Sağlanan Başlatma/Durdurma zamanlaması geçersiz. Zamanlama, zamanlama listesinde öğe içermiyor veya listedeki bazı öğelerin değerleri geçersiz.

  • 400 StartStopOfManagedInstanceIsDisabled - Yönetilen örnekte başlatma ve durdurma işlemi etkinleştirilmedi.

  • 400 ManagementServiceStartStopManagedInstanceScheduleSubscriptionNotEnabledForFeature - Kullanıcı, uygun abonelik özelliği için aboneliğin izin verilenler listesine alınmadan Başlat/Durdur özelliğini kullanmaya çalıştı.

  • 400 ManagementServiceStartStopManagedInstanceScheduleFeatureDisabled - Kullanıcı devre dışı bırakılan zamanlanmış Başlat/Durdur Azure SQL Yönetilen Örneği özelliğini kullanmaya çalıştı.

  • 400 ManagementServiceStartStopManagedInstanceScheduleNotSupportedOnSKU - Verilen SKU'da Zamanlanmış Başlatma/Durdurma işlemi desteklenmiyor.

  • 400 ManagementServiceStopManagedInstanceHostedOnRdfePlatform - Kasım 2022 Özellik Dalgası ile çalışmayan örnekte yürütülmeyi durdurma

  • 400 ManagementServiceStartStopManagedInstanceScheduleOverlap - Zamanlama çiftlerinde çakışma.

  • 400 ManagementServiceStartStopManagedInstanceScheduleSmallTimespan - Birbirini izleyen iki eylem arasındaki süre 1 saatten azdır.

  • 404 ManagementServiceStartStopManagedInstanceScheduleNameInvalid - Kullanıcı Başlangıç/Durdurma zamanlamasının CRUD işlemini 'varsayılan' zamanlama adından farklı bir zamanlama adıyla gerçekleştirmeye çalıştı

  • 404 SubscriptionDoesNotHaveServer - İstenen sunucu bulunamadı

  • 404 ServerNotInSubscriptionResourceGroup - Belirtilen sunucu belirtilen kaynak grubunda ve abonelikte yok.

  • 404 ResourceNotFound - İstenen kaynak bulunamadı.

  • 404 ManagementServiceStartStopManagedInstanceScheduleNotFound - Belirli bir yönetilen örnek için zamanlama yok.

  • 409 ManagementServiceStartStopManagedInstanceScheduleConflictingOperation - Azure SQL Yönetilen Örneği başlatma/durdurma zamanlaması oluşturma/güncelleştirme/silme girişimi başarısız oldu. Zamanlama oluşturulmadı veya devam eden bir zamanlanmış işlemle meşgul olduğundan güncelleştirilemedi/silinemedi. Lütfen isteğinizi daha sonra yeniden deneyin.

Örnekler

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.

Sample Request

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-preview

{
  "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"
      }
    ]
  }
}

Sample Response

{
  "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.

Sample Request

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-preview

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

Sample Response

{
  "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"
}

Tanımlar

Name Description
createdByType

Kaynağı oluşturan kimliğin türü.

DayOfWeek

Başlangıç günü.

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

ErrorDetail

Hata ayrıntısı.

ErrorResponse

Hata yanıtı

ScheduleItem

Sunucunun ne zaman başlatılması veya durdurulması gerektiğini açıklayan bilgileri zamanlayın.

StartStopManagedInstanceSchedule

Yönetilen örneğin Başlangıç/Durdurma zamanlaması.

StartStopScheduleName

Yönetilen örneğin Başlangıç/Durdurma zamanlamasının adı.

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

createdByType

Kaynağı oluşturan kimliğin türü.

Name Tür Description
Application

string

Key

string

ManagedIdentity

string

User

string

DayOfWeek

Başlangıç günü.

Name Tür Description
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

ErrorAdditionalInfo

Kaynak yönetimi hatası ek bilgileri.

Name Tür Description
info

object

Ek bilgiler.

type

string

Ek bilgi türü.

ErrorDetail

Hata ayrıntısı.

Name Tür Description
additionalInfo

ErrorAdditionalInfo[]

Hata ek bilgileri.

code

string

Hata kodu.

details

ErrorDetail[]

Hata ayrıntıları.

message

string

Hata iletisi.

target

string

Hata hedefi.

ErrorResponse

Hata yanıtı

Name Tür Description
error

ErrorDetail

Hata nesnesi.

ScheduleItem

Sunucunun ne zaman başlatılması veya durdurulması gerektiğini açıklayan bilgileri zamanlayın.

Name Tür Description
startDay

DayOfWeek

Başlangıç günü.

startTime

string

Başlangıç saati.

stopDay

DayOfWeek

Dur günü.

stopTime

string

Zamanı durdur.

StartStopManagedInstanceSchedule

Yönetilen örneğin Başlangıç/Durdurma zamanlaması.

Name Tür Varsayılan değer Description
id

string

Kaynak Kimliği.

name

string

Kaynak adı.

properties.description

string

Zamanlamanın açıklaması.

properties.nextExecutionTime

string

Sonraki eylemin ilgili zamanlama saat diliminde yürütüleceği zaman damgası.

properties.nextRunAction

string

Yürütülecek sonraki eylem (Başlat veya Durdur)

properties.scheduleList

ScheduleItem[]

Zamanlama listesi.

properties.timeZoneId

string

UTC

Zamanlamanın saat dilimi.

systemData

systemData

Zamanlanan kaynağın sistem verileri.

type

string

Kaynak türü.

StartStopScheduleName

Yönetilen örneğin Başlangıç/Durdurma zamanlamasının adı.

Name Tür Description
default

string

systemData

Kaynağın oluşturulması ve son değiştirilmesiyle ilgili meta veriler.

Name Tür Description
createdAt

string

Kaynak oluşturma (UTC) zaman damgası.

createdBy

string

Kaynağı oluşturan kimlik.

createdByType

createdByType

Kaynağı oluşturan kimliğin türü.

lastModifiedAt

string

Kaynağın son değişikliğinin zaman damgası (UTC)

lastModifiedBy

string

Kaynağı son değiştiren kimlik.

lastModifiedByType

createdByType

Kaynağı en son değiştiren kimliğin türü.