Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.AppPlatform to add versi…
Browse files Browse the repository at this point in the history
…on preview/2021-09-01-preview (Azure#16468)

* Add dump API

* add new line at the end of line

* change cases

* typo

* response

* add api for start/stop azure spring cloud instance

* fix lint error

Co-authored-by: Yinglue Zhang <yinglzh@microsoft.com>
Co-authored-by: caiqing <caiqing@microsoft.com>
Co-authored-by: YinglueZhang-MS <78456380+YinglueZhang-MS@users.noreply.github.com>
  • Loading branch information
4 people authored and LeiWang3 committed Mar 31, 2022
1 parent 94afc3d commit 6725a3b
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,108 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop": {
"post": {
"tags": [
"AppPlatform"
],
"description": "Stop a Service.",
"operationId": "Services_Stop",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
}
],
"responses": {
"202": {
"description": "Accepted. The response indicates the stop operation is performed in the background."
},
"404": {
"description": "Not found. The response indicates the service does not exist.",
"x-ms-error-response": true
},
"409": {
"description": "Conflict. The response indicates the exiting Service is now updating.",
"x-ms-error-response": true
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Services_Stop": {
"$ref": "./examples/Services_Stop.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start": {
"post": {
"tags": [
"AppPlatform"
],
"description": "Start a Service.",
"operationId": "Services_Start",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
}
],
"responses": {
"202": {
"description": "Accepted. The response indicates the stop operation is performed in the background."
},
"404": {
"description": "Not found. The response indicates the service does not exist.",
"x-ms-error-response": true
},
"409": {
"description": "Conflict. The response indicates the exiting Service is now updating.",
"x-ms-error-response": true
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Services_Start": {
"$ref": "./examples/Services_Start.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default": {
"get": {
"tags": [
Expand Down Expand Up @@ -2768,6 +2870,189 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump": {
"post": {
"tags": [
"AppPlatform"
],
"description": "Generate Heap Dump",
"operationId": "Deployments_GenerateHeapDump",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AppNameParameter"
},
{
"$ref": "#/parameters/DeploymentNameParameter"
},
{
"name": "diagnosticParameters",
"in": "body",
"description": "Parameters for the diagnostic operation",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosticParameters"
}
}
],
"responses": {
"202": {
"description": "Accepted. The response indicates a heap dump is generating."
},
"200": {
"description": "Success. A heap dump was generated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Deployments_GenerateHeapDump": {
"$ref": "./examples/Deployments_GenerateHeapDump.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump": {
"post": {
"tags": [
"AppPlatform"
],
"description": "Generate Thread Dump",
"operationId": "Deployments_GenerateThreadDump",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AppNameParameter"
},
{
"$ref": "#/parameters/DeploymentNameParameter"
},
{
"name": "diagnosticParameters",
"in": "body",
"description": "Parameters for the diagnostic operation",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosticParameters"
}
}
],
"responses": {
"202": {
"description": "Accepted. The response indicates a thread dump is generating."
},
"200": {
"description": "Success. A thread dump was generated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Deployments_GenerateHeapDump": {
"$ref": "./examples/Deployments_GenerateThreadDump.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/StartJFR": {
"post": {
"tags": [
"AppPlatform"
],
"description": "Start JFR",
"operationId": "Deployments_StartJFR",
"parameters": [
{
"$ref": "#/parameters/ApiVersionParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServiceNameParameter"
},
{
"$ref": "#/parameters/AppNameParameter"
},
{
"$ref": "#/parameters/DeploymentNameParameter"
},
{
"name": "diagnosticParameters",
"in": "body",
"description": "Parameters for the diagnostic operation",
"required": true,
"schema": {
"$ref": "#/definitions/DiagnosticParameters"
}
}
],
"responses": {
"202": {
"description": "Accepted. The response indicates a JFR is starting."
},
"200": {
"description": "Success. A JFR generated."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "#/definitions/CloudError"
}
}
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "azure-async-operation"
},
"x-ms-examples": {
"Deployments_StartJFR": {
"$ref": "./examples/Deployments_StartJFR.json"
}
}
}
},
"/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring": {
"get": {
"tags": [
Expand Down Expand Up @@ -3061,6 +3346,19 @@
"description": "ServiceInstanceEntity GUID which uniquely identifies a created resource",
"type": "string",
"readOnly": true
},
"powerState": {
"description": "Power state of the Service",
"enum": [
"Running",
"Stopped"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"name": "PowerState",
"modelAsString": true
}
}
}
},
Expand Down Expand Up @@ -4591,6 +4889,24 @@
}
}
},
"DiagnosticParameters": {
"description": "Diagnostic parameters of diagnostic operations",
"type": "object",
"properties": {
"appInstance": {
"description": "App instance name",
"type": "string"
},
"filePath": {
"description": "Your target file path in your own BYOS",
"type": "string"
},
"duration": {
"description": "Duration of your JFR. 1 min can be represented by 1m or 60s.",
"type": "string"
}
}
},
"ServiceResourceList": {
"description": "Object that includes an array of Service resources and a possible link for next set",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"diagnosticParameters": {
"appInstance": "myappinstance",
"filePath": "/byos/diagnose"
},
"api-version": "2021-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"serviceName": "myservice",
"appName": "myapp",
"deploymentName": "mydeployment"
},
"responses": {
"200": {},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"parameters": {
"diagnosticParameters": {
"appInstance": "myappinstance",
"filePath": "/byos/diagnose"
},
"api-version": "2021-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "myResourceGroup",
"serviceName": "myservice",
"appName": "myapp",
"deploymentName": "mydeployment"
},
"responses": {
"200": {},
"202": {}
}
}
Loading

0 comments on commit 6725a3b

Please sign in to comment.