{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "StartStopManagedInstanceSchedules" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules": { "get": { "operationId": "StartStopManagedInstanceSchedules_ListByInstance", "tags": [ "StartStopManagedInstanceSchedules" ], "description": "Lists the managed instance's Start/Stop schedules.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/StartStopManagedInstanceScheduleListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Lists the managed instance's Start/Stop schedules.": { "$ref": "./examples/StartStopManagedInstanceScheduleList.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/startStopSchedules/{startStopScheduleName}": { "get": { "operationId": "StartStopManagedInstanceSchedules_Get", "tags": [ "StartStopManagedInstanceSchedules" ], "description": "Gets the managed instance's Start/Stop schedule.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "startStopScheduleName", "in": "path", "description": "Name of the managed instance Start/Stop schedule.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "StartStopScheduleName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/StartStopManagedInstanceSchedule" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Gets the managed instance's Start/Stop schedule.": { "$ref": "./examples/StartStopManagedInstanceScheduleGet.json" } } }, "put": { "operationId": "StartStopManagedInstanceSchedules_CreateOrUpdate", "tags": [ "StartStopManagedInstanceSchedules" ], "description": "Creates or updates the managed instance's Start/Stop schedule.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "startStopScheduleName", "in": "path", "description": "Name of the managed instance Start/Stop schedule.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "StartStopScheduleName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "parameters", "in": "body", "description": "The requested managed instance Start/Stop schedule.", "required": true, "schema": { "$ref": "#/definitions/StartStopManagedInstanceSchedule" } } ], "responses": { "200": { "description": "Resource 'StartStopManagedInstanceSchedule' update operation succeeded", "schema": { "$ref": "#/definitions/StartStopManagedInstanceSchedule" } }, "201": { "description": "Resource 'StartStopManagedInstanceSchedule' create operation succeeded", "schema": { "$ref": "#/definitions/StartStopManagedInstanceSchedule" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Creates or updates the managed instance's Start/Stop schedule with all optional parameters specified.": { "$ref": "./examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json" }, "Creates or updates the managed instance's Start/Stop schedule with no optional parameters specified.": { "$ref": "./examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json" } } }, "delete": { "operationId": "StartStopManagedInstanceSchedules_Delete", "tags": [ "StartStopManagedInstanceSchedules" ], "description": "Deletes the managed instance's Start/Stop schedule.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "startStopScheduleName", "in": "path", "description": "Name of the managed instance Start/Stop schedule.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "StartStopScheduleName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Resource deleted successfully." }, "204": { "description": "Resource does not exist." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Deletes the managed instance's Start/Stop schedule.": { "$ref": "./examples/StartStopManagedInstanceScheduleDelete.json" } } } } }, "definitions": { "ScheduleItem": { "type": "object", "description": "Schedule info describing when the server should be started or stopped.", "properties": { "startDay": { "$ref": "./common.json#/definitions/DayOfWeek", "description": "Start day." }, "startTime": { "type": "string", "description": "Start time." }, "stopDay": { "$ref": "./common.json#/definitions/DayOfWeek", "description": "Stop day." }, "stopTime": { "type": "string", "description": "Stop time." } }, "required": [ "startDay", "startTime", "stopDay", "stopTime" ] }, "StartStopManagedInstanceSchedule": { "type": "object", "description": "Managed instance's Start/Stop schedule.", "properties": { "properties": { "$ref": "#/definitions/StartStopManagedInstanceScheduleProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "StartStopManagedInstanceScheduleListResult": { "type": "object", "description": "The response of a StartStopManagedInstanceSchedule list operation.", "properties": { "value": { "type": "array", "description": "The StartStopManagedInstanceSchedule items on this page", "items": { "$ref": "#/definitions/StartStopManagedInstanceSchedule" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "StartStopManagedInstanceScheduleProperties": { "type": "object", "description": "Properties of managed instance's Start/Stop schedule.", "properties": { "description": { "type": "string", "description": "The description of the schedule.", "default": "" }, "timeZoneId": { "type": "string", "description": "The time zone of the schedule.", "default": "UTC" }, "scheduleList": { "type": "array", "description": "Schedule list.", "items": { "$ref": "#/definitions/ScheduleItem" }, "x-ms-identifiers": [] }, "nextRunAction": { "type": "string", "description": "Next action to be executed (Start or Stop)", "readOnly": true }, "nextExecutionTime": { "type": "string", "description": "Timestamp when the next action will be executed in the corresponding schedule time zone.", "readOnly": true } }, "required": [ "scheduleList" ] } }, "parameters": {} }