From 171c913df22c173ba6bc64261b2517897894cbcc Mon Sep 17 00:00:00 2001 From: Jared Moore Date: Wed, 21 Mar 2018 13:04:04 -0700 Subject: [PATCH] Sql job agent (#2352) * Added jobs.json and examples * Add jobs to readme * Fixed incorrect job schedule examples --- .../examples/CancelJobExecution.json | 14 + .../examples/CreateJobExecution.json | 29 + .../examples/CreateOrUpdateJobAgent.json | 40 + .../examples/CreateOrUpdateJobCredential.json | 38 + .../examples/CreateOrUpdateJobExecution.json | 46 + .../examples/CreateOrUpdateJobMax.json | 60 + .../examples/CreateOrUpdateJobMin.json | 47 + .../examples/CreateOrUpdateJobStepMax.json | 110 + .../examples/CreateOrUpdateJobStepMin.json | 70 + .../CreateOrUpdateJobTargetGroupMax.json | 118 + .../CreateOrUpdateJobTargetGroupMin.json | 40 + .../examples/DeleteJob.json | 14 + .../examples/DeleteJobAgent.json | 14 + .../examples/DeleteJobCredential.json | 14 + .../examples/DeleteJobStep.json | 15 + .../examples/DeleteJobTargetGroup.json | 14 + .../2017-03-01-preview/examples/GetJob.json | 29 + .../examples/GetJobAgent.json | 22 + .../examples/GetJobCredential.json | 22 + .../examples/GetJobExecution.json | 32 + .../examples/GetJobExecutionStep.json | 33 + .../examples/GetJobExecutionTarget.json | 39 + .../examples/GetJobStepByJob.json | 47 + .../examples/GetJobStepByVersion.json | 48 + .../examples/GetJobTargetGroup.json | 49 + .../examples/GetJobVersion.json | 20 + .../examples/ListJobAgentsByServer.json | 34 + .../examples/ListJobCredentialsByAgent.json | 33 + .../examples/ListJobExecutionSteps.json | 35 + .../ListJobExecutionTargetsByExecution.json | 41 + .../ListJobExecutionTargetsByStep.json | 41 + .../examples/ListJobExecutionsByAgent.json | 51 + .../examples/ListJobExecutionsByJob.json | 52 + .../examples/ListJobStepsByJob.json | 82 + .../examples/ListJobStepsByVersion.json | 83 + .../examples/ListJobTargetGroups.json | 52 + .../examples/ListJobVersions.json | 29 + .../examples/ListJobsByAgent.json | 63 + .../examples/ServerBlobAuditingCreateMax.json | 39 + .../examples/UpdateJobAgent.json | 31 + .../preview/2017-03-01-preview/jobs.json | 2677 +++++++++++++++++ 41 files changed, 4367 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CancelJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobCredential.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobCredential.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobStep.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobTargetGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobCredential.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionStep.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionTarget.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByVersion.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobTargetGroup.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobVersion.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobAgentsByServer.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobCredentialsByAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionSteps.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByExecution.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByStep.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByJob.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByVersion.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobTargetGroups.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobVersions.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobsByAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/UpdateJobAgent.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/jobs.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CancelJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CancelJobExecution.json new file mode 100644 index 000000000000..0fcc35717d61 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CancelJobExecution.json @@ -0,0 +1,14 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "jobExecutionId":"5555-6666-7777-8888-999999999999", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateJobExecution.json new file mode 100644 index 000000000000..33bd949cbf77 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateJobExecution.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2016-09-23T01:00:00.0000000Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobAgent.json new file mode 100644 index 000000000000..6995dde1d0d0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobAgent.json @@ -0,0 +1,40 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview", + "parameters":{ + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name":"agent1", + "type":"Microsoft.Sql/servers/jobAgents", + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name":"agent1", + "type":"Microsoft.Sql/servers/jobAgents", + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + }, + "202":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobCredential.json new file mode 100644 index 000000000000..59fd0c72e315 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobCredential.json @@ -0,0 +1,38 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "credentialName":"cred1", + "api-version":"2017-03-01-preview", + "parameters":{ + "properties":{ + "username":"myuser", + "password":"" + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name":"cred1", + "type":"Microsoft.Sql/servers/jobAccounts/credentials", + "properties":{ + "username":"myuser" + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name":"cred1", + "type":"Microsoft.Sql/servers/jobAccounts/credentials", + "properties":{ + "username":"myuser" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobExecution.json new file mode 100644 index 000000000000..ebda400ac79d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobExecution.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-12-18T19:02:00.8707045Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "201": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-05-04T19:02:00.8707045Z", + "currentAttempts": 0, + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + }, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMax.json new file mode 100644 index 000000000000..47ccbb14a422 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMax.json @@ -0,0 +1,60 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "api-version":"2017-03-01-preview", + "parameters":{ + "properties":{ + "description":"my favourite job", + "schedule":{ + "startTime":"2015-09-24T18:30:01Z", + "endTime":"2015-09-24T23:59:59Z", + "type":"Recurring", + "interval":"PT5M", + "enabled":true + } + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name":"job1", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"my favourite job", + "version":0, + "schedule":{ + "startTime":"2015-09-24T18:30:01Z", + "endTime":"2015-09-24T23:59:59Z", + "type":"Recurring", + "interval":"PT5M", + "enabled":true + } + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name":"job1", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"my favourite job", + "version":0, + "schedule":{ + "startTime":"2015-09-24T18:30:01Z", + "endTime":"2015-09-24T23:59:59Z", + "type":"Recurring", + "interval":"PT5M", + "enabled":true + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMin.json new file mode 100644 index 000000000000..6e54f084af4f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobMin.json @@ -0,0 +1,47 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "api-version":"2017-03-01-preview", + "parameters":{ } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name":"job1", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"", + "version":0, + "schedule":{ + "startTime":"0001-01-01T00:00:00Z", + "endTime":"9999-12-31T11:59:59Z", + "type":"Once", + "enabled":false + } + } + } + }, + "201":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name":"job1", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"", + "version":0, + "schedule":{ + "startTime":"0001-01-01T00:00:00Z", + "endTime":"9999-12-31T11:59:59Z", + "type":"Once", + "enabled":false + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMax.json new file mode 100644 index 000000000000..4fd71a24f937 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMax.json @@ -0,0 +1,110 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "stepName":"step1", + "api-version":"2017-03-01-preview", + "parameters":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + } + } + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + } + }, + "201":{ + "body":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMin.json new file mode 100644 index 000000000000..63a3c89525dc --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobStepMin.json @@ -0,0 +1,70 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "stepName":"step1", + "api-version":"2017-03-01-preview", + "parameters":{ + "properties":{ + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action":{ + "value":"select 1" + } + } + } + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 1" + }, + "executionOptions":{ + "timeoutSeconds":43200, + "retryAttempts":10, + "initialRetryIntervalSeconds":1, + "maximumRetryIntervalSeconds":120, + "retryIntervalBackoffMultiplier":2.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + } + }, + "201":{ + "body":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup0", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 1" + }, + "executionOptions":{ + "timeoutSeconds":43200, + "retryAttempts":10, + "initialRetryIntervalSeconds":1, + "maximumRetryIntervalSeconds":120, + "retryIntervalBackoffMultiplier":2.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json new file mode 100644 index 000000000000..d10b57f24fc3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json @@ -0,0 +1,118 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "targetGroupName":"targetGroup1", + "api-version":"2017-03-01-preview", + "parameters":{ + "properties":{ + "members":[ + { + "membershipType":"Exclude", + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + }, + { + "membershipType":"Include", + "type":"SqlServer", + "serverName":"server1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlElasticPool", + "serverName":"server2", + "elasticPoolName":"pool1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlShardMap", + "serverName":"server3", + "shardMapName":"shardMap1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + } + } + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "members":[ + { + "membershipType":"Exclude", + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + }, + { + "membershipType":"Include", + "type":"SqlServer", + "serverName":"server1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlElasticPool", + "serverName":"server2", + "elasticPoolName":"pool1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlShardMap", + "serverName":"server3", + "shardMapName":"shardMap1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name":"targetGroup1", + "type":"Microsoft.Sql/servers/jobAgents/targetGroups" + } + }, + "201":{ + "body":{ + "properties":{ + "members":[ + { + "membershipType":"Exclude", + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + }, + { + "membershipType":"Include", + "type":"SqlServer", + "serverName":"server1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlElasticPool", + "serverName":"server2", + "elasticPoolName":"pool1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlShardMap", + "serverName":"server3", + "shardMapName":"shardMap1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name":"targetGroup1", + "type":"Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json new file mode 100644 index 000000000000..91cebdfb494c --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json @@ -0,0 +1,40 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "targetGroupName":"targetGroup1", + "api-version":"2017-03-01-preview", + "parameters":{ + "properties":{ + "members":[ + ] + } + } + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "members":[ + ] + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name":"targetGroup1", + "type":"Microsoft.Sql/servers/jobAgents/targetGroups" + } + }, + "201":{ + "body":{ + "properties":{ + "members":[ + ] + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name":"targetGroup1", + "type":"Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJob.json new file mode 100644 index 000000000000..b924799c02bd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJob.json @@ -0,0 +1,14 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ }, + "204":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobAgent.json new file mode 100644 index 000000000000..621272a80253 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobAgent.json @@ -0,0 +1,14 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ }, + "202":{ }, + "204":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobCredential.json new file mode 100644 index 000000000000..9de9c1a375c0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobCredential.json @@ -0,0 +1,14 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "credentialName":"cred1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ }, + "204":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobStep.json new file mode 100644 index 000000000000..dee50fcd08fa --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobStep.json @@ -0,0 +1,15 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "stepName":"step1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ }, + "204":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobTargetGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobTargetGroup.json new file mode 100644 index 000000000000..b93e3f88e032 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/DeleteJobTargetGroup.json @@ -0,0 +1,14 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "targetGroupName":"targetGroup1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ }, + "204":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJob.json new file mode 100644 index 000000000000..577437a4fb07 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJob.json @@ -0,0 +1,29 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name":"job1", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"my favourite job", + "version":0, + "schedule":{ + "startTime":"2015-09-24T18:30:01Z", + "endTime":"2015-09-24T23:59:59Z", + "type":"Once", + "enabled":true + } + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobAgent.json new file mode 100644 index 000000000000..cd0f7fe44c55 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobAgent.json @@ -0,0 +1,22 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name":"agent1", + "type":"Microsoft.Sql/servers/jobAgents", + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobCredential.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobCredential.json new file mode 100644 index 000000000000..69798a51034e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobCredential.json @@ -0,0 +1,22 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "credentialName":"cred1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name":"cred1", + "type":"Microsoft.Sql/servers/jobAccounts/credentials", + "properties":{ + "username":"myuser" + } + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecution.json new file mode 100644 index 000000000000..1779769b1655 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecution.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-12-21T19:02:00.8707045Z", + "startTime": "2017-12-21T19:12:00.8707045Z", + "endTime": "2017-12-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-11-13T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/executions" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionStep.json new file mode 100644 index 000000000000..ba4ca6a32bc7 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionStep.json @@ -0,0 +1,33 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"jobAgent1", + "jobName":"job1", + "jobExecutionId":"13572468-1357-2468-3579-135724683579", + "stepName":"step1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "properties":{ + "jobVersion":1, + "stepName":"step1", + "stepId":1, + "jobExecutionId":"9c20948b-f370-4e4f-b5a4-d07be4309935", + "lifecycle":"Succeeded", + "provisioningState":"Succeeded", + "createTime":"2017-12-03T04:33:15.7189151Z", + "startTime":"2017-12-03T04:33:16.176937Z", + "endTime":"2017-12-03T04:33:19.0600862Z", + "currentAttempts":1, + "currentAttemptStartTime":"2017-12-03T04:33:17.4840068Z", + "lastMessage":"Step 1 succeeded." + }, + "id":"/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/account1/jobs/job1/executions/9c20948b-f370-4e4f-b5a4-d07be4309935/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/executions/steps" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionTarget.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionTarget.json new file mode 100644 index 000000000000..2c4395783be3 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobExecutionTarget.json @@ -0,0 +1,39 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"jobAgent1", + "jobName":"job1", + "jobExecutionId":"13572468-1357-2468-3579-135724683579", + "stepName":"step1", + "targetId": "e3bdd712-e86d-47fc-a02d-0b315a44865f", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "properties":{ + "jobVersion":1, + "stepName":"step1", + "stepId":1, + "jobExecutionId":"9c20948b-f370-4e4f-b5a4-d07be4309935", + "lifecycle":"Succeeded", + "provisioningState":"Succeeded", + "createTime":"2017-12-03T04:33:17.5133333Z", + "startTime":"2017-12-03T04:33:18.1230403Z", + "endTime":"2017-12-03T04:33:18.7031029Z", + "currentAttempts":1, + "currentAttemptStartTime":"2017-12-03T04:33:18.2391013Z", + "lastMessage":"Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target":{ + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + } + }, + "id":"/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/account1/jobs/job1/executions/9c20948b-f370-4e4f-b5a4-d07be4309935/steps/step1/targets/e3bdd712-e86d-47fc-a02d-0b315a44865f", + "name":"e3bdd712-e86d-47fc-a02d-0b315a44865f", + "type":"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByJob.json new file mode 100644 index 000000000000..98813e4e3e66 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByJob.json @@ -0,0 +1,47 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "stepName":"step1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByVersion.json new file mode 100644 index 000000000000..a2afa36e10e9 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobStepByVersion.json @@ -0,0 +1,48 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "jobVersion":"1", + "stepName":"step1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobTargetGroup.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobTargetGroup.json new file mode 100644 index 000000000000..bcb8471ad5d8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobTargetGroup.json @@ -0,0 +1,49 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "targetGroupName":"targetGroup1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "properties":{ + "members":[ + { + "membershipType":"Exclude", + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + }, + { + "membershipType":"Include", + "type":"SqlServer", + "serverName":"server1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlElasticPool", + "serverName":"server2", + "elasticPoolName":"pool1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlShardMap", + "serverName":"server3", + "shardMapName":"shardMap1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name":"targetGroup1", + "type":"Microsoft.Sql/servers/jobAgents/targetGroups" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobVersion.json new file mode 100644 index 000000000000..56143c2846b6 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/GetJobVersion.json @@ -0,0 +1,20 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "jobVersion":"1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1", + "name":"1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/versions" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobAgentsByServer.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobAgentsByServer.json new file mode 100644 index 000000000000..66dce5312424 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobAgentsByServer.json @@ -0,0 +1,34 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name":"agent1", + "type":"Microsoft.Sql/servers/jobAgents", + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + } + }, + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/jobAgent2", + "name":"jobAgent2", + "type":"Microsoft.Sql/servers/jobAgents", + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db12" + } + } + ] + } + } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobCredentialsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobCredentialsByAgent.json new file mode 100644 index 000000000000..76c5ebf69cdd --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobCredentialsByAgent.json @@ -0,0 +1,33 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "name":"cred1", + "type":"Microsoft.Sql/servers/jobAccounts/credentials", + "properties":{ + "username":"myuser" + } + }, + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred2", + "name":"cred2", + "type":"Microsoft.Sql/servers/jobAccounts/credentials", + "properties":{ + "username":"anotherUser" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionSteps.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionSteps.json new file mode 100644 index 000000000000..95191ee45412 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionSteps.json @@ -0,0 +1,35 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"jobAgent1", + "jobName":"job1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "value":[ + { + "properties":{ + "jobVersion":1, + "stepName":"step1", + "stepId":1, + "jobExecutionId":"9c20948b-f370-4e4f-b5a4-d07be4309935", + "lifecycle":"Succeeded", + "provisioningState":"Succeeded", + "createTime":"2017-12-03T04:33:15.7189151Z", + "startTime":"2017-12-03T04:33:16.176937Z", + "endTime":"2017-12-03T04:33:19.0600862Z", + "currentAttempts":1, + "currentAttemptStartTime":"2017-12-03T04:33:17.4840068Z", + "lastMessage":"Step 1 succeeded." + }, + "id":"/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/account1/jobs/job1/executions/9c20948b-f370-4e4f-b5a4-d07be4309935/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/executions/steps" + } + ] + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByExecution.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByExecution.json new file mode 100644 index 000000000000..58f19b368e5f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByExecution.json @@ -0,0 +1,41 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"jobAgent1", + "jobName":"job1", + "stepName":"step1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "value":[ + { + "properties":{ + "jobVersion":1, + "stepName":"step1", + "stepId":1, + "jobExecutionId":"9c20948b-f370-4e4f-b5a4-d07be4309935", + "lifecycle":"Succeeded", + "provisioningState":"Succeeded", + "createTime":"2017-12-03T04:33:17.5133333Z", + "startTime":"2017-12-03T04:33:18.1230403Z", + "endTime":"2017-12-03T04:33:18.7031029Z", + "currentAttempts":1, + "currentAttemptStartTime":"2017-12-03T04:33:18.2391013Z", + "lastMessage":"Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target":{ + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + } + }, + "id":"/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/account1/jobs/job1/executions/9c20948b-f370-4e4f-b5a4-d07be4309935/steps/step1/targets/e3bdd712-e86d-47fc-a02d-0b315a44865f", + "name":"e3bdd712-e86d-47fc-a02d-0b315a44865f", + "type":"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + ] + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByStep.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByStep.json new file mode 100644 index 000000000000..58f19b368e5f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionTargetsByStep.json @@ -0,0 +1,41 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"jobAgent1", + "jobName":"job1", + "stepName":"step1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "value":[ + { + "properties":{ + "jobVersion":1, + "stepName":"step1", + "stepId":1, + "jobExecutionId":"9c20948b-f370-4e4f-b5a4-d07be4309935", + "lifecycle":"Succeeded", + "provisioningState":"Succeeded", + "createTime":"2017-12-03T04:33:17.5133333Z", + "startTime":"2017-12-03T04:33:18.1230403Z", + "endTime":"2017-12-03T04:33:18.7031029Z", + "currentAttempts":1, + "currentAttemptStartTime":"2017-12-03T04:33:18.2391013Z", + "lastMessage":"Step 1 succeeded execution on target (server 'server1', database 'database1').", + "target":{ + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + } + }, + "id":"/subscriptions/00000000-0000-0000-0000-000000000001/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/account1/jobs/job1/executions/9c20948b-f370-4e4f-b5a4-d07be4309935/steps/step1/targets/e3bdd712-e86d-47fc-a02d-0b315a44865f", + "name":"e3bdd712-e86d-47fc-a02d-0b315a44865f", + "type":"Microsoft.Sql/servers/jobAgents/jobs/executions/steps/targets" + } + ] + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByAgent.json new file mode 100644 index 000000000000..9b65b5748331 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByAgent.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1//executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByJob.json new file mode 100644 index 000000000000..2e2d7e15e89b --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobExecutionsByJob.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "group1", + "serverName": "server1", + "jobAgentName": "agent1", + "jobName": "job1", + "api-version": "2017-03-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "5555-6666-7777-8888-999999999999", + "lifecycle": "Created", + "provisioningState": "Created", + "createTime": "2017-03-21T19:02:00.8707045Z", + "startTime": "2017-03-21T19:12:00.8707045Z", + "endTime": "2017-03-21T19:22:00.8707045Z", + "currentAttempts": 0, + "currentAttemptStartTime": "2017-03-21T19:12:00.8707045Z", + "lastMessage": "Job execution created." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/5555-6666-7777-8888-999999999999", + "name": "5555-6666-7777-8888-999999999999", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + }, + { + "properties": { + "jobVersion": 1, + "jobExecutionId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "lifecycle": "Succeeded", + "provisioningState": "Succeeded", + "createTime": "2017-12-15T19:02:00.8707045Z", + "startTime": "2017-12-15T19:12:00.8707045Z", + "endTime": "2017-12-15T19:22:00.8707045Z", + "currentAttempts": 1, + "lastMessage": "Job execution succeeded." + }, + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions/aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "name": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", + "type": "Microsoft.Sql/servers/jobAgents/jobs/executions" + } + ], + "nextLink": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/executions?api-version=2017-03-01-preview&%24skip=2" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByJob.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByJob.json new file mode 100644 index 000000000000..28be6d240b73 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByJob.json @@ -0,0 +1,82 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + }, + { + "properties":{ + "stepId":2, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/steps/step2", + "name":"step2", + "type":"Microsoft.Sql/servers/jobAgents/jobs/steps" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByVersion.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByVersion.json new file mode 100644 index 000000000000..eb46c026857d --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobStepsByVersion.json @@ -0,0 +1,83 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "jobVersion":"1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "properties":{ + "stepId":1, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step1", + "name":"step1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + }, + { + "properties":{ + "stepId":2, + "targetGroup":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred1", + "action":{ + "type":"TSql", + "source":"Inline", + "value":"select 2" + }, + "output":{ + "type":"SqlDatabase", + "subscriptionId":"3501b905-a848-4b5d-96e8-b253f62d735a", + "resourceGroup":"group3", + "server":"server3", + "database":"database3", + "schema":"myschema1234", + "table":"mytable5678", + "credential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/cred0" + }, + "executionOptions":{ + "timeoutSeconds":1234, + "retryAttempts":42, + "initialRetryIntervalSeconds":11, + "maximumRetryIntervalSeconds":222, + "retryIntervalBackoffMultiplier":3.0 + } + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1/steps/step2", + "name":"step2", + "type":"Microsoft.Sql/servers/jobAgents/jobs/versions/steps" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobTargetGroups.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobTargetGroups.json new file mode 100644 index 000000000000..b165fb433763 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobTargetGroups.json @@ -0,0 +1,52 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "properties":{ + "members":[ + { + "membershipType":"Exclude", + "type":"SqlDatabase", + "serverName":"server1", + "databaseName":"database1" + }, + { + "membershipType":"Include", + "type":"SqlServer", + "serverName":"server1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlElasticPool", + "serverName":"server2", + "elasticPoolName":"pool1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + }, + { + "membershipType":"Include", + "type":"SqlShardMap", + "serverName":"server3", + "shardMapName":"shardMap1", + "refreshCredential":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/credentials/testCredential" + } + ] + }, + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/targetGroups/targetGroup1", + "name":"targetGroup1", + "type":"Microsoft.Sql/servers/jobAgents/targetGroups" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobVersions.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobVersions.json new file mode 100644 index 000000000000..61224a8b7ae0 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobVersions.json @@ -0,0 +1,29 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "jobName":"job1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value": + [ + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/1", + "name":"1", + "type":"Microsoft.Sql/servers/jobAgents/jobs/versions" + }, + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1/versions/2", + "name":"2", + "type":"Microsoft.Sql/servers/jobAgents/jobs/versions" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobsByAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobsByAgent.json new file mode 100644 index 000000000000..95222e79bf43 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ListJobsByAgent.json @@ -0,0 +1,63 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview" + }, + "responses":{ + "200":{ + "body":{ + "value":[ + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job1", + "name":"job1", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"my favourite job", + "version":0, + "schedule":{ + "startTime":"2015-09-24T18:30:01Z", + "endTime":"2015-09-24T23:59:59Z", + "type":"Recurring", + "interval":"PT5M", + "enabled":true + } + } + }, + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job3", + "name":"job3", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"this job will be scheduled once", + "version":1, + "schedule":{ + "startTime":"2017-07-01T03:45:00Z", + "endTime":"2017-12-27T06:00:00Z", + "type":"Once", + "enabled":true + } + } + }, + { + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1/jobs/job2", + "name":"job2", + "type":"Microsoft.Sql/servers/jobAccounts/jobs", + "properties":{ + "description":"this job will never be automatically scheduled", + "version":1, + "schedule":{ + "startTime":"2017-07-01T03:45:00Z", + "endTime":"2017-12-27T06:00:00Z", + "type":"Once", + "enabled":false + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json new file mode 100644 index 000000000000..74919d55125f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/ServerBlobAuditingCreateMax.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "blobauditingtest-4799", + "serverName": "blobauditingtest-6440", + "blobAuditingPolicyName": "Default", + "api-version": "2017-03-01-preview", + "parameters": { + "properties": { + "state": "Enabled", + "storageAccountAccessKey": "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/blobauditingtest-4799/providers/Microsoft.Sql/servers/blobauditingtest-6440/auditingSettings/Default", + "name": "Default", + "type": "Microsoft.Sql/servers/auditingSettings", + "properties": { + "state": "Enabled", + "storageEndpoint": "https://mystorage.blob.core.windows.net", + "storageAccountAccessKey": "", + "retentionDays": 6, + "storageAccountSubscriptionId": "00000000-1234-0000-5678-000000000000", + "isStorageSecondaryKeyInUse": false, + "auditActionsAndGroups": [ "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", "FAILED_DATABASE_AUTHENTICATION_GROUP", "BATCH_COMPLETED_GROUP" ] + } + } + }, + "202": { } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/UpdateJobAgent.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/UpdateJobAgent.json new file mode 100644 index 000000000000..8d96b1e2658a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/examples/UpdateJobAgent.json @@ -0,0 +1,31 @@ +{ + "parameters":{ + "subscriptionId":"00000000-1111-2222-3333-444444444444", + "resourceGroupName":"group1", + "serverName":"server1", + "jobAgentName":"agent1", + "api-version":"2017-03-01-preview", + "parameters":{ + "tags": { + "mytag1": "myvalue1" + } + } + }, + "responses":{ + "200":{ + "body":{ + "id":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/jobAgents/agent1", + "name":"agent1", + "type":"Microsoft.Sql/servers/jobAgents", + "location":"southeastasia", + "properties":{ + "databaseId":"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Sql/servers/server1/databases/db1" + }, + "tags": { + "mytag1": "myvalue1" + } + } + }, + "202":{ } + } +} diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/jobs.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/jobs.json new file mode 100644 index 000000000000..b16b953a37f2 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/jobs.json @@ -0,0 +1,2677 @@ +{ + "swagger": "2.0", + "info": { + "version": "2017-03-01-preview", + "title": "SqlManagementClient", + "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." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents": { + "get": { + "tags": [ + "JobAgents" + ], + "description": "Gets a list of job agents in a server.", + "operationId": "JobAgents_ListByServer", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job agents.", + "schema": { + "$ref": "#/definitions/JobAgentListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job agents in a server": { + "$ref": "./examples/ListJobAgentsByServer.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}": { + "get": { + "tags": [ + "JobAgents" + ], + "description": "Gets a job agent.", + "operationId": "JobAgents_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be retrieved.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the specified job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server." + } + }, + "x-ms-examples": { + "Get a job agent": { + "$ref": "./examples/GetJobAgent.json" + } + } + }, + "put": { + "tags": [ + "JobAgents" + ], + "description": "Creates or updates a job agent.", + "operationId": "JobAgents_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be created or updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job agent resource state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidDatabaseResourceId - Invalid database resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 JobAgentExceededQuota - Could not create job agent because it would exceed the quota.\n\n * 400 JobAgentAlreadyExists - The job agent already exists on the server.\n\n * 400 JobAgentDatabaseEditionUnsupported - The specified database's service level objective is not supported for use as a job agent database.\n\n * 400 JobAgentDatabaseSecondary - A job agent cannot be linked to a geo-secondary database.\n\n * 400 CannotUseReservedDatabaseName - Cannot use reserved database name in this operation.\n\n * 400 DatabaseDoesNotExist - The requested database was not found\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 SubscriptionNotFound - The requested subscription was not found." + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully created the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create or update a job agent": { + "$ref": "./examples/CreateOrUpdateJobAgent.json" + } + } + }, + "delete": { + "tags": [ + "JobAgents" + ], + "description": "Deletes a job agent.", + "operationId": "JobAgents_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job agent." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server." + }, + "202": { + "description": "Accepted" + }, + "204": { + "description": "The specified job agent does not exist." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Delete a job agent": { + "$ref": "./examples/DeleteJobAgent.json" + } + } + }, + "patch": { + "tags": [ + "JobAgents" + ], + "description": "Updates a job agent.", + "operationId": "JobAgents_Update", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent to be updated.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The update to the job agent.", + "required": true, + "schema": { + "$ref": "#/definitions/JobAgentUpdate" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job agent.", + "schema": { + "$ref": "#/definitions/JobAgent" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 PropertyChangeUnsupported - Property cannot be modified.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Update a job agent's tags.": { + "$ref": "./examples/UpdateJobAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials": { + "get": { + "tags": [ + "JobCredentials" + ], + "description": "Gets a list of jobs credentials.", + "operationId": "JobCredentials_ListByAgent", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job credentials.", + "schema": { + "$ref": "#/definitions/JobCredentialListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List credentials in a job agent": { + "$ref": "./examples/ListJobCredentialsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/credentials/{credentialName}": { + "get": { + "tags": [ + "JobCredentials" + ], + "description": "Gets a jobs credential.", + "operationId": "JobCredentials_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a credential": { + "$ref": "./examples/GetJobCredential.json" + } + } + }, + "put": { + "tags": [ + "JobCredentials" + ], + "description": "Creates or updates a job credential.", + "operationId": "JobCredentials_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job credential state.", + "required": true, + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidJobCredentialUsername - Invalid credential username.\n\n * 403 JobCredentialPermissionError - Azure Resource Manager does not have permission to use or manage the credential.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully created the credential.", + "schema": { + "$ref": "#/definitions/JobCredential" + } + } + }, + "x-ms-examples": { + "Create or update a credential": { + "$ref": "./examples/CreateOrUpdateJobCredential.json" + } + } + }, + "delete": { + "tags": [ + "JobCredentials" + ], + "description": "Deletes a job credential.", + "operationId": "JobCredentials_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "credentialName", + "in": "path", + "description": "The name of the credential.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the credential." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 403 JobCredentialPermissionError - Azure Resource Manager does not have permission to use or manage the credential.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "A credential with the specified name does not exist." + } + }, + "x-ms-examples": { + "Delete a credential": { + "$ref": "./examples/DeleteJobCredential.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/executions": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Lists all executions in a job agent.", + "operationId": "JobExecutions_ListByAgent", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved job executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List all job executions in a job agent.": { + "$ref": "./examples/ListJobExecutionsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}/cancel": { + "post": { + "tags": [ + "JobExecutions" + ], + "description": "Requests cancellation of a job execution.", + "operationId": "JobExecutions_Cancel", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution to cancel.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully requested cancellation of the job execution." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Cancel a job execution.": { + "$ref": "./examples/CancelJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/start": { + "post": { + "tags": [ + "JobExecutions" + ], + "description": "Starts an elastic job execution.", + "operationId": "JobExecutions_Create", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully started an execution for the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "202": { + "description": "Accepted" + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Start a job execution.": { + "$ref": "./examples/CreateJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Lists a job's executions.", + "operationId": "JobExecutions_ListByJob", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "$skip", + "in": "query", + "description": "The number of elements in the collection to skip.", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved job executions.", + "schema": { + "$ref": "#/definitions/JobExecutionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List a job's executions.": { + "$ref": "./examples/ListJobExecutionsByJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/executions/{jobExecutionId}": { + "get": { + "tags": [ + "JobExecutions" + ], + "description": "Gets a job execution.", + "operationId": "JobExecutions_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The id of the job execution", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a job execution.": { + "$ref": "./examples/GetJobExecution.json" + } + } + }, + "put": { + "tags": [ + "JobExecutions" + ], + "description": "Creates or updatess a job execution.", + "operationId": "JobExecutions_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobExecutionId", + "in": "path", + "description": "The job execution id to create the job execution under.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "A job execution for the job with the given id already existed.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "202": { + "description": "Accepted" + }, + "201": { + "description": "Successfully started an execution for the job.", + "schema": { + "$ref": "#/definitions/JobExecution" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Create job execution.": { + "$ref": "./examples/CreateOrUpdateJobExecution.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs": { + "get": { + "tags": [ + "Jobs" + ], + "description": "Gets a list of jobs.", + "operationId": "Jobs_ListByAgent", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of jobs.", + "schema": { + "$ref": "#/definitions/JobListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List jobs in a job agent": { + "$ref": "./examples/ListJobsByAgent.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}": { + "get": { + "tags": [ + "Jobs" + ], + "description": "Gets a job.", + "operationId": "Jobs_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a job": { + "$ref": "./examples/GetJob.json" + } + } + }, + "put": { + "tags": [ + "Jobs" + ], + "description": "Creates or updates a job.", + "operationId": "Jobs_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested job state.", + "required": true, + "schema": { + "$ref": "#/definitions/Job" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidDuration - Invalid duration.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully created the job.", + "schema": { + "$ref": "#/definitions/Job" + } + } + }, + "x-ms-examples": { + "Create a job with default properties": { + "$ref": "./examples/CreateOrUpdateJobMin.json" + }, + "Create a job with all properties specified": { + "$ref": "./examples/CreateOrUpdateJobMax.json" + } + } + }, + "delete": { + "tags": [ + "Jobs" + ], + "description": "Deletes a job.", + "operationId": "Jobs_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "The specified job does not exist." + } + }, + "x-ms-examples": { + "Delete a job": { + "$ref": "./examples/DeleteJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets all job steps in the specified job version.", + "operationId": "JobSteps_ListByVersion", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job steps.", + "schema": { + "$ref": "#/definitions/JobStepListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job steps for the specified version of a job.": { + "$ref": "./examples/ListJobStepsByVersion.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}/steps/{stepName}": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets the specified version of a job step.", + "operationId": "JobSteps_GetByVersion", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get the specified version of a job step.": { + "$ref": "./examples/GetJobStepByVersion.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets all job steps for a job's current version.", + "operationId": "JobSteps_ListByJob", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of job steps.", + "schema": { + "$ref": "#/definitions/JobStepListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List job steps for the latest version of a job.": { + "$ref": "./examples/ListJobStepsByJob.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/steps/{stepName}": { + "get": { + "tags": [ + "JobSteps" + ], + "description": "Gets a job step in a job's current version.", + "operationId": "JobSteps_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get the latest version of a job step.": { + "$ref": "./examples/GetJobStepByJob.json" + } + } + }, + "put": { + "tags": [ + "JobSteps" + ], + "description": "Creates or updates a job step. This will implicitly create a new job version.", + "operationId": "JobSteps_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested state of the job step.", + "required": true, + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 JobStepIdMismatch - Step Id in the specified Job Step URI does not match step id in provided Job Step Resource.\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingJobAccountNameWithUrl - The provided job account name did not match the name in the Url.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully added the job step.", + "schema": { + "$ref": "#/definitions/JobStep" + } + } + }, + "x-ms-examples": { + "Create or update a job step with minimal properties specified.": { + "$ref": "./examples/CreateOrUpdateJobStepMin.json" + }, + "Create or update a job step with all properties specified.": { + "$ref": "./examples/CreateOrUpdateJobStepMax.json" + } + } + }, + "delete": { + "tags": [ + "JobSteps" + ], + "description": "Deletes a job step. This will implicitly create a new job version.", + "operationId": "JobSteps_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "stepName", + "in": "path", + "description": "The name of the job step to delete.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the job step." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "The specified job step does not exist." + } + }, + "x-ms-examples": { + "Delete a job step.": { + "$ref": "./examples/DeleteJobStep.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups": { + "get": { + "tags": [ + "JobTargetGroups" + ], + "description": "Gets all target groups in an agent.", + "operationId": "JobTargetGroups_ListByAgent", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of target groups.", + "schema": { + "$ref": "#/definitions/JobTargetGroupListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all target groups in an agent.": { + "$ref": "./examples/ListJobTargetGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/targetGroups/{targetGroupName}": { + "get": { + "tags": [ + "JobTargetGroups" + ], + "description": "Gets a target group.", + "operationId": "JobTargetGroups_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + } + }, + "x-ms-examples": { + "Get a target group.": { + "$ref": "./examples/GetJobTargetGroup.json" + } + } + }, + "put": { + "tags": [ + "JobTargetGroups" + ], + "description": "Creates or updates a target group.", + "operationId": "JobTargetGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The requested state of the target group.", + "required": true, + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully updated the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidResourceRequestBody - The resource or resource properties in the request body is empty or invalid.\n\n * 400 InvalidResourceId - Invalid resource identifier.\n\n * 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.\n\n * 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.\n\n * 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.\n\n * 400 MismatchingJobAccountNameWithUrl - The provided job account name did not match the name in the Url.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + }, + "201": { + "description": "Successfully created the target group.", + "schema": { + "$ref": "#/definitions/JobTargetGroup" + } + } + }, + "x-ms-examples": { + "Create or update a target group with minimal properties.": { + "$ref": "./examples/CreateOrUpdateJobTargetGroupMin.json" + }, + "Create or update a target group with all properties.": { + "$ref": "./examples/CreateOrUpdateJobTargetGroupMax.json" + } + } + }, + "delete": { + "tags": [ + "JobTargetGroups" + ], + "description": "Deletes a target group.", + "operationId": "JobTargetGroups_Delete", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "targetGroupName", + "in": "path", + "description": "The name of the target group.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully deleted the target group." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 400 ElasticJobsOperationFailed - Elastic jobs management operation failed.\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 ResourceNotFound - The requested resource was not found." + }, + "204": { + "description": "A target group with the specified name does not exist." + } + }, + "x-ms-examples": { + "Delete a target group.": { + "$ref": "./examples/DeleteJobTargetGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions": { + "get": { + "tags": [ + "JobVersions" + ], + "description": "Gets all versions of a job.", + "operationId": "JobVersions_ListByJob", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job to get.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the list of versions.", + "schema": { + "$ref": "#/definitions/JobVersionListResult" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Get all versions of a job.": { + "$ref": "./examples/ListJobVersions.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/jobAgents/{jobAgentName}/jobs/{jobName}/versions/{jobVersion}": { + "get": { + "tags": [ + "JobVersions" + ], + "description": "Gets a job version.", + "operationId": "JobVersions_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "$ref": "#/parameters/ServerNameParameter" + }, + { + "name": "jobAgentName", + "in": "path", + "description": "The name of the job agent.", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "description": "The name of the job.", + "required": true, + "type": "string" + }, + { + "name": "jobVersion", + "in": "path", + "description": "The version of the job to get.", + "required": true, + "type": "integer", + "format": "int32" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the job version.", + "schema": { + "$ref": "#/definitions/JobVersion" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 404 JobAgentNotFound - Specified job agent does not exist in the specified logical server.\n\n * 404 ResourceNotFound - The requested resource was not found.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" + } + }, + "x-ms-examples": { + "Get a version of a job.": { + "$ref": "./examples/GetJobVersion.json" + } + } + } + } + }, + "definitions": { + "JobAgentListResult": { + "description": "A list of Azure SQL job agents.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobAgent" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobAgentProperties": { + "description": "Properties of a job agent.", + "required": [ + "databaseId" + ], + "type": "object", + "properties": { + "databaseId": { + "description": "Resource ID of the database to store job metadata in.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "TrackedResource": { + "description": "ARM tracked top level resource.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "location": { + "description": "Resource location.", + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ] + }, + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "JobAgent": { + "description": "An Azure SQL job agent.", + "required": [ + "location" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/TrackedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobAgentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobAgentUpdate": { + "description": "An update to an Azure SQL job agent.", + "type": "object", + "properties": { + "tags": { + "description": "Resource tags.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "JobCredentialListResult": { + "description": "A list of job credentials.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobCredential" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobCredentialProperties": { + "description": "Properties of a job credential.", + "required": [ + "username", + "password" + ], + "type": "object", + "properties": { + "username": { + "description": "The credential user name.", + "type": "string" + }, + "password": { + "description": "The credential password.", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + } + } + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "JobCredential": { + "description": "A stored credential that can be used by a job to connect to target databases.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobCredentialProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobExecutionListResult": { + "description": "A list of job executions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionProperties": { + "description": "Properties for an Azure SQL Database Elastic job execution.", + "type": "object", + "properties": { + "jobVersion": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "stepName": { + "description": "The job step name.", + "type": "string", + "readOnly": true + }, + "stepId": { + "format": "int32", + "description": "The job step id.", + "type": "integer", + "readOnly": true + }, + "jobExecutionId": { + "format": "uuid", + "description": "The unique identifier of the job execution.", + "type": "string", + "readOnly": true + }, + "lifecycle": { + "description": "The detailed state of the job execution.", + "enum": [ + "Created", + "InProgress", + "WaitingForChildJobExecutions", + "WaitingForRetry", + "Succeeded", + "SucceededWithSkipped", + "Failed", + "TimedOut", + "Canceled", + "Skipped" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionLifecycle", + "modelAsString": true + } + }, + "provisioningState": { + "description": "The ARM provisioning state of the job execution.", + "enum": [ + "Created", + "InProgress", + "Succeeded", + "Failed", + "Canceled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "createTime": { + "format": "date-time", + "description": "The time that the job execution was created.", + "type": "string", + "readOnly": true + }, + "startTime": { + "format": "date-time", + "description": "The time that the job execution started.", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The time that the job execution completed.", + "type": "string", + "readOnly": true + }, + "currentAttempts": { + "format": "int32", + "description": "Number of times the job execution has been attempted.", + "type": "integer" + }, + "currentAttemptStartTime": { + "format": "date-time", + "description": "Start time of the current attempt.", + "type": "string", + "readOnly": true + }, + "lastMessage": { + "description": "The last status or error message.", + "type": "string", + "readOnly": true + }, + "target": { + "$ref": "#/definitions/JobExecutionTarget", + "description": "The target that this execution is executed on.", + "readOnly": true + } + } + }, + "JobExecutionTarget": { + "description": "The target that a job execution is executed on.", + "type": "object", + "properties": { + "type": { + "description": "The type of the target.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The server name.", + "type": "string", + "readOnly": true + }, + "databaseName": { + "description": "The database name.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecution": { + "description": "An execution of a job", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobExecutionProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobListResult": { + "description": "A list of jobs.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/Job" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobProperties": { + "description": "Properties of a job.", + "type": "object", + "properties": { + "description": { + "description": "User-defined description of the job.", + "default": "", + "type": "string" + }, + "version": { + "format": "int32", + "description": "The job version number.", + "type": "integer", + "readOnly": true + }, + "schedule": { + "$ref": "#/definitions/JobSchedule", + "description": "Schedule properties of the job." + } + } + }, + "JobSchedule": { + "description": "Scheduling properties of a job.", + "type": "object", + "properties": { + "startTime": { + "format": "date-time", + "description": "Schedule start time.", + "default": "0001-01-01T00:00:00Z", + "type": "string" + }, + "endTime": { + "format": "date-time", + "description": "Schedule end time.", + "default": "9999-12-31T11:59:59Z", + "type": "string" + }, + "type": { + "description": "Schedule interval type", + "default": "Once", + "enum": [ + "Once", + "Recurring" + ], + "type": "string", + "x-ms-enum": { + "name": "JobScheduleType", + "modelAsString": false + } + }, + "enabled": { + "description": "Whether or not the schedule is enabled.", + "type": "boolean" + }, + "interval": { + "description": "Value of the schedule's recurring interval, if the scheduletype is recurring. ISO8601 duration format.", + "type": "string" + } + } + }, + "Job": { + "description": "A job.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobStepListResult": { + "description": "A list of job steps.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobStep" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobStepProperties": { + "description": "Properties of a job step.", + "required": [ + "targetGroup", + "credential", + "action" + ], + "type": "object", + "properties": { + "stepId": { + "format": "int32", + "description": "The job step's index within the job. If not specified when creating the job step, it will be created as the last step. If not specified when updating the job step, the step id is not modified.", + "type": "integer" + }, + "targetGroup": { + "description": "The resource ID of the target group that the job step will be executed on.", + "type": "string" + }, + "credential": { + "description": "The resource ID of the job credential that will be used to connect to the targets.", + "type": "string" + }, + "action": { + "$ref": "#/definitions/JobStepAction", + "description": "The action payload of the job step." + }, + "output": { + "$ref": "#/definitions/JobStepOutput", + "description": "Output destination properties of the job step." + }, + "executionOptions": { + "$ref": "#/definitions/JobStepExecutionOptions", + "description": "Execution options for the job step." + } + } + }, + "JobStepAction": { + "description": "The action to be executed by a job step.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "type": { + "description": "Type of action being executed by the job step.", + "default": "TSql", + "enum": [ + "TSql" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepActionType", + "modelAsString": true + } + }, + "source": { + "description": "The source of the action to execute.", + "default": "Inline", + "enum": [ + "Inline" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepActionSource", + "modelAsString": true + } + }, + "value": { + "description": "The action value, for example the text of the T-SQL script to execute.", + "type": "string" + } + } + }, + "JobStepOutput": { + "description": "The output configuration of a job step.", + "required": [ + "server", + "database", + "table", + "credential" + ], + "type": "object", + "properties": { + "type": { + "description": "The output destination type.", + "default": "SqlDatabase", + "enum": [ + "SqlDatabase" + ], + "type": "string", + "x-ms-enum": { + "name": "JobStepOutputType", + "modelAsString": true + } + }, + "subscriptionId": { + "format": "uuid", + "description": "The output destination subscription id.", + "type": "string" + }, + "resourceGroup": { + "description": "The output destination resource group.", + "type": "string" + }, + "server": { + "description": "The output destination server name.", + "type": "string" + }, + "database": { + "description": "The output destination database.", + "type": "string" + }, + "schema": { + "description": "The output destination schema.", + "default": "dbo", + "type": "string" + }, + "table": { + "description": "The output destination table.", + "type": "string" + }, + "credential": { + "description": "The resource ID of the credential to use to connect to the output destination.", + "type": "string" + } + } + }, + "JobStepExecutionOptions": { + "description": "The execution options of a job step.", + "type": "object", + "properties": { + "timeoutSeconds": { + "format": "int32", + "description": "Execution timeout for the job step.", + "default": 43200, + "type": "integer" + }, + "retryAttempts": { + "format": "int32", + "description": "Maximum number of times the job step will be reattempted if the first attempt fails.", + "default": 10, + "type": "integer" + }, + "initialRetryIntervalSeconds": { + "format": "int32", + "description": "Initial delay between retries for job step execution.", + "default": 1, + "type": "integer" + }, + "maximumRetryIntervalSeconds": { + "format": "int32", + "description": "The maximum amount of time to wait between retries for job step execution.", + "default": 120, + "type": "integer" + }, + "retryIntervalBackoffMultiplier": { + "format": "float", + "description": "The backoff multiplier for the time between retries.", + "default": 2.0, + "type": "number" + } + } + }, + "JobStep": { + "description": "A job step.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobStepProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobTargetGroupListResult": { + "description": "A list of target groups.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobTargetGroup" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobTargetGroupProperties": { + "description": "Properties of job target group.", + "required": [ + "members" + ], + "type": "object", + "properties": { + "members": { + "description": "Members of the target group.", + "type": "array", + "items": { + "$ref": "#/definitions/JobTarget" + } + } + } + }, + "JobTarget": { + "description": "A job target, for example a specific database or a container of databases that is evaluated during job execution.", + "required": [ + "type" + ], + "type": "object", + "properties": { + "membershipType": { + "description": "Whether the target is included or excluded from the group.", + "default": "Include", + "enum": [ + "Include", + "Exclude" + ], + "type": "string", + "x-ms-enum": { + "name": "JobTargetGroupMembershipType", + "modelAsString": false + } + }, + "type": { + "description": "The target type.", + "enum": [ + "TargetGroup", + "SqlDatabase", + "SqlElasticPool", + "SqlShardMap", + "SqlServer" + ], + "type": "string", + "x-ms-enum": { + "name": "JobTargetType", + "modelAsString": true + } + }, + "serverName": { + "description": "The target server name.", + "type": "string" + }, + "databaseName": { + "description": "The target database name.", + "type": "string" + }, + "elasticPoolName": { + "description": "The target elastic pool name.", + "type": "string" + }, + "shardMapName": { + "description": "The target shard map.", + "type": "string" + }, + "refreshCredential": { + "description": "The resource ID of the credential that is used during job execution to connect to the target and determine the list of databases inside the target.", + "type": "string" + } + } + }, + "JobTargetGroup": { + "description": "A group of job targets.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/JobTargetGroupProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "JobVersionListResult": { + "description": "A list of job versions.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/JobVersion" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "JobVersion": { + "description": "A job version.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": {} + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "The subscription ID that identifies an Azure subscription.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for the request.", + "required": true, + "type": "string", + "x-ms-parameter-location": "client" + }, + "ResourceGroupParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ServerNameParameter": { + "name": "serverName", + "in": "path", + "description": "The name of the server.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "ManagedInstanceNameParameter": { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "DatabaseNameParameter": { + "name": "databaseName", + "in": "path", + "description": "The name of the database.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineInstanceNameParameter": { + "name": "sqlVirtualMachineInstanceName", + "in": "path", + "description": "The name of the SqlVirtualMachineInstance.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "SqlVirtualMachineContainerNameParameter": { + "name": "sqlVirtualMachineContainerName", + "in": "path", + "description": "The name of the SqlVirtualMachineContainer.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "VirtualClusterNameParameter": { + "name": "virtualClusterName", + "in": "path", + "description": "The name of the virtual cluster.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + }, + "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" + } + } + } +} \ No newline at end of file