Skip to content

Commit

Permalink
Add Azure Batch data plane Swagger samples (Azure#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthchr authored and jhendrixMSFT committed Mar 31, 2017
1 parent 17824f2 commit b9eb5a8
Show file tree
Hide file tree
Showing 68 changed files with 2,336 additions and 7 deletions.
63 changes: 63 additions & 0 deletions batch/2017-01-01.4.0/examples/AccountListNodeAgentSkus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "batch.node.centos 7",
"verifiedImageReferences": [
{
"publisher": "OpenLogic",
"offer": "CentOS",
"sku": "7.2",
"version": "latest"
},
{
"publisher": "OpenLogic",
"offer": "CentOS",
"sku": "7.1",
"version": "latest"
}
],
"osType": "linux"
},
{
"id": "batch.node.debian 8",
"verifiedImageReferences": [
{
"publisher": "Credativ",
"offer": "Debian",
"sku": "8",
"version": "latest"
}
],
"osType": "linux"
},
{
"id": "batch.node.windows amd64",
"verifiedImageReferences": [
{
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2012-R2-Datacenter",
"version": "latest"
},
{
"publisher": "MicrosoftWindowsServer",
"offer": "WindowsServer",
"sku": "2012-Datacenter",
"version": "latest"
}
],
"osType": "windows"
}
]
}
}
}
}
19 changes: 19 additions & 0 deletions batch/2017-01-01.4.0/examples/CertificateAdd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT",
"certificate": {
"thumbprintAlgorithm":"sha1",
"thumbprint":"0123456789abcdef0123456789abcdef01234567",
"data":"#####...",
"certificateFormat":"pfx",
"password":"certpassword"
}
},
"responses": {
"201": {
"body": ""
}
}
}
14 changes: 14 additions & 0 deletions batch/2017-01-01.4.0/examples/CertificateCancelDelete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"thumbprintAlgorithm": "sha1",
"thumbprint": "0123456789abcdef0123456789abcdef01234567",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"204": {
"body": ""
}
}
}
14 changes: 14 additions & 0 deletions batch/2017-01-01.4.0/examples/CertificateDelete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"thumbprintAlgorithm": "sha1",
"thumbprint": "0123456789abcdef0123456789abcdef01234567",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"202": {
"body": ""
}
}
}
33 changes: 33 additions & 0 deletions batch/2017-01-01.4.0/examples/CertificateGet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"thumbprintAlgorithm": "sha1",
"thumbprint": "0123456789abcdef0123456789abcdef01234567",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"200": {
"body": {
"thumbprint": "0123456789abcdef0123456789abcdef01234567",
"thumbprintAlgorithm": "sha1",
"url": "https://account.region.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=0123456789abcdef0123456789abcdef01234567)",
"state": "deleteFailed",
"stateTransitionTime": "2014-07-31T21:12:58.236Z",
"previousState": "deleting",
"previousStateTransitionTime": "2014-07-31T21:11:58.236Z",
"publicData": "#####...",
"deleteCertificateError": {
"code": "PoolsReferencingCertificate",
"message": "The specified certificate is being used by the below mentioned pool(s)",
"values": [
{
"name": "Pools",
"value": "mypool1"
}
]
}
}
}
}
}
35 changes: 35 additions & 0 deletions batch/2017-01-01.4.0/examples/CertificateList.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"200": {
"body": {
"value": [
{
"thumbprint": "0123456789abcdef0123456789abcdef01234567",
"thumbprintAlgorithm": "sha1",
"url": "https://account.region.batch.azure.com/certificates(thumbprintAlgorithm=sha1,thumbprint=0123456789abcdef0123456789abcdef01234567)",
"state": "deleteFailed",
"stateTransitionTime": "2014-07-31T21:12:58.236Z",
"previousState": "deleting",
"previousStateTransitionTime": "2014-07-31T21:11:58.236Z",
"publicData": "#####...",
"deleteCertificateError": {
"code": "PoolsReferencingCertificate",
"message": "The specified certificate is being used by the below mentioned pool(s)",
"values": [
{
"name": "Pools",
"value": "mypool1"
}
]
}
}
]
}
}
}
}
16 changes: 16 additions & 0 deletions batch/2017-01-01.4.0/examples/FileDeleteFromNode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"poolId": "poolId",
"nodeId": "tvm-1695681911_1-20161122t193202z",
"filePath": "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT",
"recursive": "false"
},
"responses": {
"200": {
"body": ""
}
}
}
16 changes: 16 additions & 0 deletions batch/2017-01-01.4.0/examples/FileDeleteFromTask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"jobId": "jobId",
"taskId": "task1",
"filePath": "wd\\testFile.txt",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT",
"recursive": "false"
},
"responses": {
"200": {
"body": ""
}
}
}
20 changes: 20 additions & 0 deletions batch/2017-01-01.4.0/examples/FileGetPropertiesFromNode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"poolId": "poolId",
"nodeId": "nodeId",
"filePath": "workitems\\jobId\\job-1\\task1\\wd\\testFile.txt",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"200": {
"ocp-creation-time": "Fri, 17 Feb 2017 00:00:00 GMT",
"Last-Modified": "Fri, 17 Feb 2017 00:00:00 GMT",
"ocp-batch-file-isdirectory": "false",
"Content-Length": "17",
"Content-Type": "application/octet-stream",
"body": ""
}
}
}
20 changes: 20 additions & 0 deletions batch/2017-01-01.4.0/examples/FileGetPropertiesFromTask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"jobId": "jobId",
"taskId": "taskId",
"filePath": "wd\\testFile.txt",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT"
},
"responses": {
"200": {
"ocp-creation-time": "Fri, 17 Feb 2017 00:00:00 GMT",
"Last-Modified": "Fri, 17 Feb 2017 00:00:00 GMT",
"ocp-batch-file-isdirectory": "false",
"Content-Length": "17",
"Content-Type": "application/octet-stream",
"body": ""
}
}
}
45 changes: 45 additions & 0 deletions batch/2017-01-01.4.0/examples/FileListFromNode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"poolId": "poolId",
"nodeId": "tvm-1695681911_1-20161122t193202z",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT",
"recursive": "false"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "shared",
"url": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_2-20140919t215614z/files/shared",
"isDirectory": true
},
{
"name": "startup\\ProcessEnv.cmd",
"url": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_2-20140919t215614z/files/startup\\ProcessEnv.cmd",
"isDirectory": false,
"properties": {
"creationTime": "2014-09-19T21:56:17.679195Z",
"lastModified": "2014-09-19T21:56:17.679195Z",
"contentLength": 1813,
"contentType": "application/octet-stream"
}
},
{
"name": "startup\\stderr.txt",
"url": "https://account.region.batch.azure.com/pools/poolId/nodes/tvm-2167304207_2-20140919t215614z/files/startup\\stderr.txt",
"isDirectory": false,
"properties": {
"creationTime": "2014-09-19T21:56:17.5590855Z",
"lastModified": "2014-09-19T21:56:17.5590855Z",
"contentLength": 0,
"contentType": "application/octet-stream"
}
}
]
}
}
}
}
40 changes: 40 additions & 0 deletions batch/2017-01-01.4.0/examples/FileListFromTask.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"jobId": "jobId",
"taskId": "taskId",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT",
"recursive": "false"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "startup\\ProcessEnv.cmd",
"url": "https://account.region.batch.azure.com/jobs/jobId/tasks/taskId/files/startup\\ProcessEnv.cmd",
"isDirectory": false,
"properties": {
"creationTime": "2014-09-19T21:56:17.679195Z",
"lastModified": "2014-09-19T21:56:17.679195Z",
"contentLength": 1813,
"contentType": "application/octet-stream"
}
},
{
"name": "startup\\stderr.txt",
"url": "https://account.region.batch.azure.com/jobs/jobId/tasks/taskId/files/startup\\stderr.txt",
"isDirectory": false,
"properties": {
"creationTime": "2014-09-19T21:56:17.5590855Z",
"lastModified": "2014-09-19T21:56:17.5590855Z",
"contentLength": 0,
"contentType": "application/octet-stream"
}
}
]
}
}
}
}
19 changes: 19 additions & 0 deletions batch/2017-01-01.4.0/examples/JobAdd_Basic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"parameters": {
"api-version": "2017-01-01.4.0",
"client-request-id": "00000000-0000-0000-0000-000000000000",
"ocp-data": "Fri, 17 Feb 2017 00:00:00 GMT",
"job": {
"id": "jobId",
"priority": 0,
"poolInfo": {
"poolId": "poolId"
}
}
},
"responses": {
"201": {
"body": ""
}
}
}
Loading

0 comments on commit b9eb5a8

Please sign in to comment.