{
  "openapi": "3.0.0",
  "info": {
    "title": "AutomationManagement",
    "version": "2015-10-31",
    "x-ms-code-generation-settings": {
      "useDateTimeOffset": true
    },
    "x-jentic-source-url": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/automation/resource-manager/Microsoft.Automation/stable/2015-10-31/schedule.json"
  },
  "servers": [
    {
      "url": "https://management.azure.com/"
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules": {
      "get": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleListResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "Schedule"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/scheduleoperations"
        },
        "description": "Retrieve a list of schedules.",
        "operationId": "Schedule_ListByAutomationAccount",
        "x-ms-examples": {
          "List schedules by automation account, first 100": {
            "$ref": "./examples/listSchedulesByAutomationAccount_First100.json"
          },
          "List schedules by automation account, next 100": {
            "$ref": "./examples/listSchedulesByAutomationAccount_Next100.json"
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName}": {
      "delete": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The schedule name.",
            "in": "path",
            "name": "scheduleName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "Schedule"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/scheduleoperations"
        },
        "description": "Delete the schedule identified by schedule name.",
        "operationId": "Schedule_Delete",
        "x-ms-examples": {
          "Delete schedule": {
            "$ref": "./examples/deleteSchedule.json"
          }
        }
      },
      "get": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The schedule name.",
            "in": "path",
            "name": "scheduleName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "Schedule"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/scheduleoperations"
        },
        "description": "Retrieve the schedule identified by schedule name.",
        "operationId": "Schedule_Get",
        "x-ms-examples": {
          "Get a schedule": {
            "$ref": "./examples/getSchedule.json"
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The schedule name.",
            "in": "path",
            "name": "scheduleName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "Schedule"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/scheduleoperations"
        },
        "description": "Update the schedule identified by schedule name.",
        "operationId": "Schedule_Update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleUpdateParameters"
              }
            }
          },
          "description": "The parameters supplied to the update schedule operation.",
          "required": true
        },
        "x-ms-examples": {
          "Update a schedule": {
            "$ref": "./examples/updateSchedule.json"
          }
        }
      },
      "put": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The schedule name.",
            "in": "path",
            "name": "scheduleName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "description": "OK"
          },
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schedule"
                }
              }
            },
            "description": "Created"
          },
          "409": {
            "description": "Conflict"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "Schedule"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/scheduleoperations"
        },
        "description": "Create a schedule.",
        "operationId": "Schedule_CreateOrUpdate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleCreateOrUpdateParameters"
              }
            }
          },
          "description": "The parameters supplied to the create or update schedule operation.",
          "required": true
        },
        "x-ms-examples": {
          "Create or update a schedule": {
            "$ref": "./examples/createOrUpdateSchedule.json"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdvancedSchedule": {
        "description": "The properties of the create Advanced Schedule.",
        "properties": {
          "monthDays": {
            "description": "Days of the month that the job should execute on. Must be between 1 and 31.",
            "items": {
              "format": "int32",
              "nullable": false,
              "type": "integer"
            },
            "type": "array"
          },
          "monthlyOccurrences": {
            "description": "Occurrences of days within a month.",
            "items": {
              "$ref": "#/components/schemas/AdvancedScheduleMonthlyOccurrence"
            },
            "type": "array"
          },
          "weekDays": {
            "description": "Days of the week that the job should execute on.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "AdvancedScheduleMonthlyOccurrence": {
        "description": "The properties of the create advanced schedule monthly occurrence.",
        "properties": {
          "day": {
            "description": "Day of the occurrence. Must be one of monday, tuesday, wednesday, thursday, friday, saturday, sunday.",
            "enum": [
              "Monday",
              "Tuesday",
              "Wednesday",
              "Thursday",
              "Friday",
              "Saturday",
              "Sunday"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "ScheduleDay"
            }
          },
          "occurrence": {
            "description": "Occurrence of the week within the month. Must be between 1 and 5",
            "format": "int32",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Schedule": {
        "allOf": [
          {
            "$ref": "../../common/v1/definitions.json#/definitions/ProxyResource"
          }
        ],
        "description": "Definition of the schedule.",
        "properties": {
          "properties": {
            "$ref": "#/components/schemas/ScheduleProperties",
            "description": "Gets or sets the properties of the schedule.",
            "x-ms-client-flatten": true
          }
        },
        "type": "object"
      },
      "ScheduleCreateOrUpdateParameters": {
        "description": "The parameters supplied to the create or update schedule operation.",
        "properties": {
          "name": {
            "description": "Gets or sets the name of the Schedule.",
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/ScheduleCreateOrUpdateProperties",
            "description": "Gets or sets the list of schedule properties.",
            "x-ms-client-flatten": true
          }
        },
        "required": [
          "name",
          "properties"
        ],
        "type": "object"
      },
      "ScheduleCreateOrUpdateProperties": {
        "description": "The parameters supplied to the create or update schedule operation.",
        "properties": {
          "advancedSchedule": {
            "$ref": "#/components/schemas/AdvancedSchedule",
            "description": "Gets or sets the AdvancedSchedule."
          },
          "description": {
            "description": "Gets or sets the description of the schedule.",
            "type": "string"
          },
          "expiryTime": {
            "description": "Gets or sets the end time of the schedule.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "frequency": {
            "$ref": "#/components/schemas/scheduleFrequency",
            "description": "Gets or sets the frequency of the schedule.",
            "type": "string"
          },
          "interval": {
            "description": "Gets or sets the interval of the schedule."
          },
          "startTime": {
            "description": "Gets or sets the start time of the schedule.",
            "format": "date-time",
            "nullable": false,
            "type": "string"
          },
          "timeZone": {
            "description": "Gets or sets the time zone of the schedule.",
            "type": "string"
          }
        },
        "required": [
          "startTime",
          "frequency"
        ],
        "type": "object"
      },
      "ScheduleListResult": {
        "description": "The response model for the list schedule operation.",
        "properties": {
          "nextLink": {
            "description": "Gets or sets the next link.",
            "type": "string"
          },
          "value": {
            "description": "Gets or sets a list of schedules.",
            "items": {
              "$ref": "#/components/schemas/Schedule"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "ScheduleProperties": {
        "description": "Definition of schedule parameters.",
        "properties": {
          "advancedSchedule": {
            "$ref": "#/components/schemas/AdvancedSchedule",
            "description": "Gets or sets the advanced schedule."
          },
          "creationTime": {
            "description": "Gets or sets the creation time.",
            "format": "date-time",
            "nullable": false,
            "type": "string"
          },
          "description": {
            "description": "Gets or sets the description.",
            "type": "string"
          },
          "expiryTime": {
            "description": "Gets or sets the end time of the schedule.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "expiryTimeOffsetMinutes": {
            "description": "Gets or sets the expiry time's offset in minutes.",
            "format": "double",
            "nullable": false,
            "type": "number"
          },
          "frequency": {
            "$ref": "#/components/schemas/scheduleFrequency",
            "description": "Gets or sets the frequency of the schedule.",
            "type": "string"
          },
          "interval": {
            "description": "Gets or sets the interval of the schedule."
          },
          "isEnabled": {
            "default": false,
            "description": "Gets or sets a value indicating whether this schedule is enabled.",
            "type": "boolean"
          },
          "lastModifiedTime": {
            "description": "Gets or sets the last modified time.",
            "format": "date-time",
            "nullable": false,
            "type": "string"
          },
          "nextRun": {
            "description": "Gets or sets the next run time of the schedule.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "nextRunOffsetMinutes": {
            "description": "Gets or sets the next run time's offset in minutes.",
            "format": "double",
            "nullable": false,
            "type": "number"
          },
          "startTime": {
            "description": "Gets or sets the start time of the schedule.",
            "format": "date-time",
            "nullable": false,
            "type": "string"
          },
          "startTimeOffsetMinutes": {
            "description": "Gets the start time's offset in minutes.",
            "format": "double",
            "nullable": false,
            "readOnly": true,
            "type": "number"
          },
          "timeZone": {
            "description": "Gets or sets the time zone of the schedule.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "ScheduleUpdateParameters": {
        "description": "The parameters supplied to the update schedule operation.",
        "properties": {
          "name": {
            "description": "Gets or sets the name of the Schedule.",
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/ScheduleUpdateProperties",
            "description": "Gets or sets the list of schedule properties.",
            "x-ms-client-flatten": true
          }
        },
        "type": "object"
      },
      "ScheduleUpdateProperties": {
        "description": "The parameters supplied to the update schedule operation.",
        "properties": {
          "description": {
            "description": "Gets or sets the description of the schedule.",
            "type": "string"
          },
          "isEnabled": {
            "description": "Gets or sets a value indicating whether this schedule is enabled.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "scheduleFrequency": {
        "description": "Gets or sets the frequency of the schedule.",
        "enum": [
          "OneTime",
          "Day",
          "Hour",
          "Week",
          "Month",
          "Minute"
        ],
        "type": "string",
        "x-ms-enum": {
          "modelAsString": true,
          "name": "ScheduleFrequency",
          "values": [
            {
              "value": "OneTime"
            },
            {
              "value": "Day"
            },
            {
              "value": "Hour"
            },
            {
              "value": "Week"
            },
            {
              "value": "Month"
            },
            {
              "description": "The minimum allowed interval for Minute schedules is 15 minutes.",
              "value": "Minute"
            }
          ]
        }
      }
    },
    "securitySchemes": {
      "azure_auth": {
        "description": "Azure Active Directory OAuth2 Flow",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
            "scopes": {
              "user_impersonation": "impersonate your user account"
            }
          }
        },
        "type": "oauth2"
      }
    }
  },
  "security": [
    {
      "azure_auth": [
        "user_impersonation"
      ]
    }
  ]
}