diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/appplatform.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/appplatform.json index 7926b97e8368..c8b04cbe985e 100644 --- a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/appplatform.json +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/appplatform.json @@ -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": [ @@ -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": [ @@ -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 + } } } }, @@ -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", diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_GenerateHeapDump.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_GenerateHeapDump.json new file mode 100644 index 000000000000..62d191157c49 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_GenerateHeapDump.json @@ -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": {} + } +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_GenerateThreadDump.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_GenerateThreadDump.json new file mode 100644 index 000000000000..62d191157c49 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_GenerateThreadDump.json @@ -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": {} + } +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_StartJFR.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_StartJFR.json new file mode 100644 index 000000000000..62a2467dd009 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Deployments_StartJFR.json @@ -0,0 +1,19 @@ +{ + "parameters": { + "diagnosticParameters": { + "appInstance": "myappinstance", + "filePath": "/byos/diagnose", + "duration": "60s" + }, + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice", + "appName": "myapp", + "deploymentName": "mydeployment" + }, + "responses": { + "200": {}, + "202": {} + } +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Services_Start.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Services_Start.json new file mode 100644 index 000000000000..ad524000f701 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Services_Start.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice" + }, + "responses": { + "202": {}, + "404": {}, + "409": {} + } +} diff --git a/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Services_Stop.json b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Services_Stop.json new file mode 100644 index 000000000000..ad524000f701 --- /dev/null +++ b/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/examples/Services_Stop.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "api-version": "2021-09-01-preview", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "myResourceGroup", + "serviceName": "myservice" + }, + "responses": { + "202": {}, + "404": {}, + "409": {} + } +}