{
  "openapi": "3.0.0",
  "info": {
    "title": "AutomationManagement",
    "version": "2017-05-15-preview",
    "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/preview/2017-05-15-preview/sourceControlSyncJob.json"
  },
  "servers": [
    {
      "url": "https://management.azure.com/"
    }
  ],
  "paths": {
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs": {
      "get": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The source control name.",
            "in": "path",
            "name": "sourceControlName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The filter to apply on the operation.",
            "in": "query",
            "name": "$filter",
            "required": false,
            "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/SourceControlSyncJobListResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "SourceControlSyncJob"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations"
        },
        "description": "Retrieve a list of source control sync jobs.",
        "operationId": "SourceControlSyncJob_ListByAutomationAccount",
        "x-ms-examples": {
          "Get a list of source control sync jobs": {
            "$ref": "./examples/sourceControlSyncJob/getAllSourceControlSyncJobs.json"
          }
        },
        "x-ms-pageable": {
          "nextLinkName": "nextLink"
        }
      }
    },
    "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName}/sourceControlSyncJobs/{sourceControlSyncJobId}": {
      "get": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The source control name.",
            "in": "path",
            "name": "sourceControlName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The source control sync job id.",
            "in": "path",
            "name": "sourceControlSyncJobId",
            "required": true,
            "schema": {
              "format": "uuid",
              "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/SourceControlSyncJobById"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "SourceControlSyncJob"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations"
        },
        "description": "Retrieve the source control sync job identified by job id.",
        "operationId": "SourceControlSyncJob_Get",
        "x-ms-examples": {
          "Get a source control sync job by job id": {
            "$ref": "./examples/sourceControlSyncJob/getSourceControlSyncJob.json"
          }
        }
      },
      "put": {
        "parameters": [
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ResourceGroupNameParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/AutomationAccountNameParameter"
          },
          {
            "description": "The source control name.",
            "in": "path",
            "name": "sourceControlName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The source control sync job id.",
            "in": "path",
            "name": "sourceControlSyncJobId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/SubscriptionIdParameter"
          },
          {
            "$ref": "../../common/v1/definitions.json#/components/parameters/ApiVersionParameter"
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SourceControlSyncJob"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "../../common/v1/definitions.json#/definitions/ErrorResponse"
                }
              }
            },
            "description": "Automation error response describing why the operation failed."
          }
        },
        "tags": [
          "SourceControlSyncJob"
        ],
        "externalDocs": {
          "url": "http://aka.ms/azureautomationsdk/sourcecontrolsyncjoboperations"
        },
        "description": "Creates the sync job for a source control.",
        "operationId": "SourceControlSyncJob_Create",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SourceControlSyncJobCreateParameters"
              }
            }
          },
          "description": "The parameters supplied to the create source control sync job operation.",
          "required": true
        },
        "x-ms-examples": {
          "Create or update a source control sync job": {
            "$ref": "./examples/sourceControlSyncJob/createSourceControlSyncJob.json"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SourceControlSyncJob": {
        "description": "Definition of the source control sync job.",
        "properties": {
          "id": {
            "description": "Resource id.",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "Resource name.",
            "readOnly": true,
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/SourceControlSyncJobProperties",
            "description": "The properties of the source control sync job.",
            "x-ms-client-flatten": true
          },
          "type": {
            "description": "Resource type.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "SourceControlSyncJobById": {
        "description": "Definition of the source control sync job.",
        "properties": {
          "id": {
            "description": "The id of the job.",
            "type": "string"
          },
          "properties": {
            "$ref": "#/components/schemas/SourceControlSyncJobByIdProperties",
            "description": "The properties of the source control sync job.",
            "x-ms-client-flatten": true
          }
        },
        "type": "object"
      },
      "SourceControlSyncJobByIdProperties": {
        "description": "Definition of source control sync job properties.",
        "properties": {
          "creationTime": {
            "description": "The creation time of the job.",
            "format": "date-time",
            "nullable": false,
            "readOnly": true,
            "type": "string"
          },
          "endTime": {
            "description": "The end time of the job.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "exception": {
            "description": "The exceptions that occurred while running the sync job.",
            "type": "string"
          },
          "provisioningState": {
            "description": "The provisioning state of the job.",
            "enum": [
              "Completed",
              "Failed",
              "Running"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "provisioningState"
            }
          },
          "sourceControlSyncJobId": {
            "description": "The source control sync job id.",
            "type": "string"
          },
          "startTime": {
            "description": "The start time of the job.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "syncType": {
            "description": "The sync type.",
            "enum": [
              "PartialSync",
              "FullSync"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "syncType"
            }
          }
        },
        "type": "object"
      },
      "SourceControlSyncJobCreateParameters": {
        "description": "The parameters supplied to the create source control sync job operation.",
        "properties": {
          "properties": {
            "$ref": "#/components/schemas/SourceControlSyncJobCreateProperties",
            "description": "The properties of the source control sync job.",
            "x-ms-client-flatten": true
          }
        },
        "required": [
          "properties"
        ],
        "type": "object"
      },
      "SourceControlSyncJobCreateProperties": {
        "description": "Definition of create source control sync job properties.",
        "properties": {
          "commitId": {
            "description": "The commit id of the source control sync job. If not syncing to a commitId, enter an empty string.",
            "minLength": 0,
            "type": "string"
          }
        },
        "required": [
          "commitId"
        ],
        "type": "object"
      },
      "SourceControlSyncJobListResult": {
        "description": "The response model for the list source control sync jobs operation.",
        "properties": {
          "nextLink": {
            "description": "The next link.",
            "type": "string"
          },
          "value": {
            "description": "The list of source control sync jobs.",
            "items": {
              "$ref": "#/components/schemas/SourceControlSyncJob"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "SourceControlSyncJobProperties": {
        "description": "Definition of source control sync job properties.",
        "properties": {
          "creationTime": {
            "description": "The creation time of the job.",
            "format": "date-time",
            "nullable": false,
            "readOnly": true,
            "type": "string"
          },
          "endTime": {
            "description": "The end time of the job.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "provisioningState": {
            "description": "The provisioning state of the job.",
            "enum": [
              "Completed",
              "Failed",
              "Running"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "provisioningState"
            }
          },
          "sourceControlSyncJobId": {
            "description": "The source control sync job id.",
            "type": "string"
          },
          "startTime": {
            "description": "The start time of the job.",
            "format": "date-time",
            "nullable": true,
            "readOnly": true,
            "type": "string"
          },
          "syncType": {
            "description": "The sync type.",
            "enum": [
              "PartialSync",
              "FullSync"
            ],
            "type": "string",
            "x-ms-enum": {
              "modelAsString": true,
              "name": "syncType"
            }
          }
        },
        "type": "object"
      }
    },
    "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"
      ]
    }
  ]
}