-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swagger specification and examples for Service Fabric Mesh 2018-09-01…
…-preview release.
- Loading branch information
1 parent
835770d
commit 26f08b0
Showing
39 changed files
with
5,589 additions
and
1 deletion.
There are no files selected for viewing
94 changes: 94 additions & 0 deletions
94
...oft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/create_update.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
"operationId": "Application_Create", | ||
"description": "This example shows how to create or update a application resource.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo", | ||
"applicationResourceName": "sampleApplication", | ||
"applicationResourceDescription": { | ||
"properties": { | ||
"description": "Service Fabric Mesh sample application.", | ||
"services": [ | ||
{ | ||
"name": "helloWorldService", | ||
"properties": { | ||
"description": "SeaBreeze Hello World Service.", | ||
"osType": "Linux", | ||
"codePackages": [ | ||
{ | ||
"name": "helloWorldCode", | ||
"image": "seabreeze/sbz-helloworld:1.0-alpine", | ||
"endpoints": [ | ||
{ | ||
"name": "helloWorldListener", | ||
"port": 80 | ||
} | ||
], | ||
"resources": { | ||
"requests": { | ||
"memoryInGB": 1, | ||
"cpu": 1 | ||
} | ||
} | ||
} | ||
], | ||
"networkRefs": [ | ||
{ | ||
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork", | ||
"endpointRefs": [ | ||
{ | ||
"name": "helloWorldListener" | ||
} | ||
] | ||
} | ||
], | ||
"replicaCount": 1 | ||
} | ||
} | ||
] | ||
}, | ||
"tags": {}, | ||
"location": "EastUS" | ||
} | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"type": "Microsoft.ServiceFabricMesh/applications", | ||
"location": "EastUS", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication", | ||
"name": "sampleApplication", | ||
"tags": {}, | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"description": "Service Fabric Mesh sample application.", | ||
"serviceNames": [ | ||
"helloWorldService" | ||
], | ||
"healthState": "Ok", | ||
"status": "Ready" | ||
} | ||
} | ||
}, | ||
"201": { | ||
"body": { | ||
"type": "Microsoft.ServiceFabricMesh/applications", | ||
"location": "EastUS", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication", | ||
"name": "sampleApplication", | ||
"tags": {}, | ||
"properties": { | ||
"provisioningState": "Updating", | ||
"description": "Service Fabric Mesh sample application.", | ||
"serviceNames": [ | ||
"helloWorldService" | ||
], | ||
"healthState": "Unknown", | ||
"status": "Creating" | ||
} | ||
} | ||
}, | ||
"202": {} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
.../Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/delete.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"operationId": "Application_Delete", | ||
"description": "This example shows how to delete an existing application resource. If the application resource exists and is deleted successfully, an empty response with 200 status code is returned. If the application resource does not exit, an empty response with 204 status code is returned.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo", | ||
"applicationResourceName": "sampleApplication" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": {}, | ||
"204": {} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...ger/Microsoft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"operationId": "Application_Get", | ||
"description": "This example shows how to get a application resource. If the application resource exists, its description is returned along with an OK (200) status code. If the application resource does not exist, an error is returned with an appropriate status code.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo", | ||
"applicationResourceName": "sampleApplication" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"type": "Microsoft.ServiceFabricMesh/applications", | ||
"location": "EastUS", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication", | ||
"name": "sampleApplication", | ||
"tags": {}, | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"description": "Service Fabric Mesh sample application.", | ||
"healthState": "Ok", | ||
"serviceNames": [ | ||
"helloWorldService" | ||
], | ||
"status": "Ready" | ||
} | ||
} | ||
} | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
...viceFabricMesh/preview/2018-09-01-preview/examples/applications/list_byResourceGroup.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"operationId": "Application_ListByResourceGroup", | ||
"description": "This example shows how to list all application resources within a specified resource group.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"type": "Microsoft.ServiceFabricMesh/applications", | ||
"location": "EastUS", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication", | ||
"name": "sampleApplication", | ||
"tags": {}, | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"description": "Service Fabric Mesh sample application.", | ||
"healthState": "Ok", | ||
"serviceNames": [ | ||
"helloWorldService" | ||
], | ||
"status": "Ready" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...iceFabricMesh/preview/2018-09-01-preview/examples/applications/list_bySubscriptionId.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"operationId": "Application_ListBySubscriptionId", | ||
"description": "This example shows how to list all application resources for a specified subscription.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"type": "Microsoft.ServiceFabricMesh/applications", | ||
"location": "EastUS", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication", | ||
"name": "sampleApplication", | ||
"tags": {}, | ||
"properties": { | ||
"provisioningState": "Succeeded", | ||
"description": "Service Fabric Mesh sample application.", | ||
"healthState": "Ok", | ||
"serviceNames": [ | ||
"helloWorldService" | ||
], | ||
"status": "Ready" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
55 changes: 55 additions & 0 deletions
55
...soft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/get.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"operationId": "Service_Get", | ||
"description": "This example shows how to get a service resource for a given application. If the service resource exists, its description is returned along with an OK (200) status code. If the service resource does not exist, an error is returned with an appropriate status code.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo", | ||
"applicationResourceName": "sampleApplication", | ||
"serviceResourceName": "helloWorldService" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"name": "helloWorldService", | ||
"type": "Microsoft.ServiceFabricMesh/services", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication/services/helloWorldService", | ||
"properties": { | ||
"description": "SeaBreeze Hello World Service.", | ||
"osType": "Linux", | ||
"codePackages": [ | ||
{ | ||
"name": "helloWorldCode", | ||
"image": "seabreeze/sbz-helloworld:1.0-alpine", | ||
"endpoints": [ | ||
{ | ||
"name": "helloWorldListener", | ||
"port": 80 | ||
} | ||
], | ||
"resources": { | ||
"requests": { | ||
"memoryInGB": 1, | ||
"cpu": 1 | ||
} | ||
} | ||
} | ||
], | ||
"networkRefs": [ | ||
{ | ||
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork", | ||
"endpointRefs": [ | ||
{ | ||
"name": "helloWorldListener" | ||
} | ||
] | ||
} | ||
], | ||
"replicaCount": 1, | ||
"healthState": "Ok", | ||
"status": "Ready" | ||
} | ||
} | ||
} | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
...oft.ServiceFabricMesh/preview/2018-09-01-preview/examples/applications/services/list.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"operationId": "Service_List", | ||
"description": "This example shows how to list all services of a given application.", | ||
"parameters": { | ||
"api-version": "2018-09-01-privatepreview", | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo", | ||
"applicationResourceName": "sampleApplication" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"name": "helloWorldService", | ||
"type": "Microsoft.ServiceFabricMesh/services", | ||
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sampleApplication/services/helloWorldService", | ||
"properties": { | ||
"description": "SeaBreeze Hello World Service.", | ||
"osType": "Linux", | ||
"codePackages": [ | ||
{ | ||
"name": "helloWorldCode", | ||
"image": "seabreeze/sbz-helloworld:1.0-alpine", | ||
"endpoints": [ | ||
{ | ||
"name": "helloWorldListener", | ||
"port": 80 | ||
} | ||
], | ||
"resources": { | ||
"requests": { | ||
"memoryInGB": 1, | ||
"cpu": 1 | ||
} | ||
} | ||
} | ||
], | ||
"networkRefs": [ | ||
{ | ||
"name": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/networks/sampleNetwork", | ||
"endpointRefs": [ | ||
{ | ||
"name": "helloWorldListener" | ||
} | ||
] | ||
} | ||
], | ||
"replicaCount": 1, | ||
"healthState": "Ok", | ||
"status": "Ready" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...iew/2018-09-01-preview/examples/applications/services/replicas/codepackages/get_logs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"operationId": "CodePackage_GetContainerLogs", | ||
"description": "This example shows how to get logs from the container of service replica. If the container exists, the logs are returned with an OK (200) status code, otherwise an error is returned with an appropriate status code.", | ||
"parameters": { | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"resourceGroupName": "sbz_demo", | ||
"api-version": "6.4-preview", | ||
"applicationResourceName": "sbzDocApp", | ||
"serviceResourceName": "sbzDocService", | ||
"replicaName": "0", | ||
"codePackageName": "sbzDocCode" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"content": " * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)\n * Downloading style https://assets-cdn.github.com/assets/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css\n * Downloading style https://assets-cdn.github.com/assets/github-a698da0d53574b056d3c79ac732d4a70.css\n * Downloading style https://assets-cdn.github.com/assets/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css\n * Cached all downloads in /root/.grip/cache-4.5.2\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET / HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/github-a698da0d53574b056d3c79ac732d4a70.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/static/octicons/octicons.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6 HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/favicon.ico HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:05] \"GET /seabreeze-index.md HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:09] \"GET /seabreeze-api-application_get.md HTTP/1.1\" 200 -\n" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.