Skip to content

Commit 5959050

Browse files
qingcYinglueZhang-MScaiqing
authored
[Hub Generated] Review request for Microsoft.AppPlatform to add version preview/2021-09-01-preview (#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>
1 parent 657d6c5 commit 5959050

File tree

6 files changed

+397
-0
lines changed

6 files changed

+397
-0
lines changed

specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2021-09-01-preview/appplatform.json

Lines changed: 316 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,108 @@
403403
}
404404
}
405405
},
406+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/stop": {
407+
"post": {
408+
"tags": [
409+
"AppPlatform"
410+
],
411+
"description": "Stop a Service.",
412+
"operationId": "Services_Stop",
413+
"parameters": [
414+
{
415+
"$ref": "#/parameters/ApiVersionParameter"
416+
},
417+
{
418+
"$ref": "#/parameters/SubscriptionIdParameter"
419+
},
420+
{
421+
"$ref": "#/parameters/ResourceGroupNameParameter"
422+
},
423+
{
424+
"$ref": "#/parameters/ServiceNameParameter"
425+
}
426+
],
427+
"responses": {
428+
"202": {
429+
"description": "Accepted. The response indicates the stop operation is performed in the background."
430+
},
431+
"404": {
432+
"description": "Not found. The response indicates the service does not exist.",
433+
"x-ms-error-response": true
434+
},
435+
"409": {
436+
"description": "Conflict. The response indicates the exiting Service is now updating.",
437+
"x-ms-error-response": true
438+
},
439+
"default": {
440+
"description": "Error response describing why the operation failed.",
441+
"schema": {
442+
"$ref": "#/definitions/CloudError"
443+
}
444+
}
445+
},
446+
"x-ms-long-running-operation": true,
447+
"x-ms-long-running-operation-options": {
448+
"final-state-via": "azure-async-operation"
449+
},
450+
"x-ms-examples": {
451+
"Services_Stop": {
452+
"$ref": "./examples/Services_Stop.json"
453+
}
454+
}
455+
}
456+
},
457+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/start": {
458+
"post": {
459+
"tags": [
460+
"AppPlatform"
461+
],
462+
"description": "Start a Service.",
463+
"operationId": "Services_Start",
464+
"parameters": [
465+
{
466+
"$ref": "#/parameters/ApiVersionParameter"
467+
},
468+
{
469+
"$ref": "#/parameters/SubscriptionIdParameter"
470+
},
471+
{
472+
"$ref": "#/parameters/ResourceGroupNameParameter"
473+
},
474+
{
475+
"$ref": "#/parameters/ServiceNameParameter"
476+
}
477+
],
478+
"responses": {
479+
"202": {
480+
"description": "Accepted. The response indicates the stop operation is performed in the background."
481+
},
482+
"404": {
483+
"description": "Not found. The response indicates the service does not exist.",
484+
"x-ms-error-response": true
485+
},
486+
"409": {
487+
"description": "Conflict. The response indicates the exiting Service is now updating.",
488+
"x-ms-error-response": true
489+
},
490+
"default": {
491+
"description": "Error response describing why the operation failed.",
492+
"schema": {
493+
"$ref": "#/definitions/CloudError"
494+
}
495+
}
496+
},
497+
"x-ms-long-running-operation": true,
498+
"x-ms-long-running-operation-options": {
499+
"final-state-via": "azure-async-operation"
500+
},
501+
"x-ms-examples": {
502+
"Services_Start": {
503+
"$ref": "./examples/Services_Start.json"
504+
}
505+
}
506+
}
507+
},
406508
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/configServers/default": {
407509
"get": {
408510
"tags": [
@@ -2768,6 +2870,189 @@
27682870
}
27692871
}
27702872
},
2873+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateHeapDump": {
2874+
"post": {
2875+
"tags": [
2876+
"AppPlatform"
2877+
],
2878+
"description": "Generate Heap Dump",
2879+
"operationId": "Deployments_GenerateHeapDump",
2880+
"parameters": [
2881+
{
2882+
"$ref": "#/parameters/ApiVersionParameter"
2883+
},
2884+
{
2885+
"$ref": "#/parameters/SubscriptionIdParameter"
2886+
},
2887+
{
2888+
"$ref": "#/parameters/ResourceGroupNameParameter"
2889+
},
2890+
{
2891+
"$ref": "#/parameters/ServiceNameParameter"
2892+
},
2893+
{
2894+
"$ref": "#/parameters/AppNameParameter"
2895+
},
2896+
{
2897+
"$ref": "#/parameters/DeploymentNameParameter"
2898+
},
2899+
{
2900+
"name": "diagnosticParameters",
2901+
"in": "body",
2902+
"description": "Parameters for the diagnostic operation",
2903+
"required": true,
2904+
"schema": {
2905+
"$ref": "#/definitions/DiagnosticParameters"
2906+
}
2907+
}
2908+
],
2909+
"responses": {
2910+
"202": {
2911+
"description": "Accepted. The response indicates a heap dump is generating."
2912+
},
2913+
"200": {
2914+
"description": "Success. A heap dump was generated."
2915+
},
2916+
"default": {
2917+
"description": "Error response describing why the operation failed.",
2918+
"schema": {
2919+
"$ref": "#/definitions/CloudError"
2920+
}
2921+
}
2922+
},
2923+
"x-ms-long-running-operation": true,
2924+
"x-ms-long-running-operation-options": {
2925+
"final-state-via": "azure-async-operation"
2926+
},
2927+
"x-ms-examples": {
2928+
"Deployments_GenerateHeapDump": {
2929+
"$ref": "./examples/Deployments_GenerateHeapDump.json"
2930+
}
2931+
}
2932+
}
2933+
},
2934+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/generateThreadDump": {
2935+
"post": {
2936+
"tags": [
2937+
"AppPlatform"
2938+
],
2939+
"description": "Generate Thread Dump",
2940+
"operationId": "Deployments_GenerateThreadDump",
2941+
"parameters": [
2942+
{
2943+
"$ref": "#/parameters/ApiVersionParameter"
2944+
},
2945+
{
2946+
"$ref": "#/parameters/SubscriptionIdParameter"
2947+
},
2948+
{
2949+
"$ref": "#/parameters/ResourceGroupNameParameter"
2950+
},
2951+
{
2952+
"$ref": "#/parameters/ServiceNameParameter"
2953+
},
2954+
{
2955+
"$ref": "#/parameters/AppNameParameter"
2956+
},
2957+
{
2958+
"$ref": "#/parameters/DeploymentNameParameter"
2959+
},
2960+
{
2961+
"name": "diagnosticParameters",
2962+
"in": "body",
2963+
"description": "Parameters for the diagnostic operation",
2964+
"required": true,
2965+
"schema": {
2966+
"$ref": "#/definitions/DiagnosticParameters"
2967+
}
2968+
}
2969+
],
2970+
"responses": {
2971+
"202": {
2972+
"description": "Accepted. The response indicates a thread dump is generating."
2973+
},
2974+
"200": {
2975+
"description": "Success. A thread dump was generated."
2976+
},
2977+
"default": {
2978+
"description": "Error response describing why the operation failed.",
2979+
"schema": {
2980+
"$ref": "#/definitions/CloudError"
2981+
}
2982+
}
2983+
},
2984+
"x-ms-long-running-operation": true,
2985+
"x-ms-long-running-operation-options": {
2986+
"final-state-via": "azure-async-operation"
2987+
},
2988+
"x-ms-examples": {
2989+
"Deployments_GenerateHeapDump": {
2990+
"$ref": "./examples/Deployments_GenerateThreadDump.json"
2991+
}
2992+
}
2993+
}
2994+
},
2995+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AppPlatform/Spring/{serviceName}/apps/{appName}/deployments/{deploymentName}/StartJFR": {
2996+
"post": {
2997+
"tags": [
2998+
"AppPlatform"
2999+
],
3000+
"description": "Start JFR",
3001+
"operationId": "Deployments_StartJFR",
3002+
"parameters": [
3003+
{
3004+
"$ref": "#/parameters/ApiVersionParameter"
3005+
},
3006+
{
3007+
"$ref": "#/parameters/SubscriptionIdParameter"
3008+
},
3009+
{
3010+
"$ref": "#/parameters/ResourceGroupNameParameter"
3011+
},
3012+
{
3013+
"$ref": "#/parameters/ServiceNameParameter"
3014+
},
3015+
{
3016+
"$ref": "#/parameters/AppNameParameter"
3017+
},
3018+
{
3019+
"$ref": "#/parameters/DeploymentNameParameter"
3020+
},
3021+
{
3022+
"name": "diagnosticParameters",
3023+
"in": "body",
3024+
"description": "Parameters for the diagnostic operation",
3025+
"required": true,
3026+
"schema": {
3027+
"$ref": "#/definitions/DiagnosticParameters"
3028+
}
3029+
}
3030+
],
3031+
"responses": {
3032+
"202": {
3033+
"description": "Accepted. The response indicates a JFR is starting."
3034+
},
3035+
"200": {
3036+
"description": "Success. A JFR generated."
3037+
},
3038+
"default": {
3039+
"description": "Error response describing why the operation failed.",
3040+
"schema": {
3041+
"$ref": "#/definitions/CloudError"
3042+
}
3043+
}
3044+
},
3045+
"x-ms-long-running-operation": true,
3046+
"x-ms-long-running-operation-options": {
3047+
"final-state-via": "azure-async-operation"
3048+
},
3049+
"x-ms-examples": {
3050+
"Deployments_StartJFR": {
3051+
"$ref": "./examples/Deployments_StartJFR.json"
3052+
}
3053+
}
3054+
}
3055+
},
27713056
"/subscriptions/{subscriptionId}/providers/Microsoft.AppPlatform/Spring": {
27723057
"get": {
27733058
"tags": [
@@ -3061,6 +3346,19 @@
30613346
"description": "ServiceInstanceEntity GUID which uniquely identifies a created resource",
30623347
"type": "string",
30633348
"readOnly": true
3349+
},
3350+
"powerState": {
3351+
"description": "Power state of the Service",
3352+
"enum": [
3353+
"Running",
3354+
"Stopped"
3355+
],
3356+
"type": "string",
3357+
"readOnly": true,
3358+
"x-ms-enum": {
3359+
"name": "PowerState",
3360+
"modelAsString": true
3361+
}
30643362
}
30653363
}
30663364
},
@@ -4591,6 +4889,24 @@
45914889
}
45924890
}
45934891
},
4892+
"DiagnosticParameters": {
4893+
"description": "Diagnostic parameters of diagnostic operations",
4894+
"type": "object",
4895+
"properties": {
4896+
"appInstance": {
4897+
"description": "App instance name",
4898+
"type": "string"
4899+
},
4900+
"filePath": {
4901+
"description": "Your target file path in your own BYOS",
4902+
"type": "string"
4903+
},
4904+
"duration": {
4905+
"description": "Duration of your JFR. 1 min can be represented by 1m or 60s.",
4906+
"type": "string"
4907+
}
4908+
}
4909+
},
45944910
"ServiceResourceList": {
45954911
"description": "Object that includes an array of Service resources and a possible link for next set",
45964912
"type": "object",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parameters": {
3+
"diagnosticParameters": {
4+
"appInstance": "myappinstance",
5+
"filePath": "/byos/diagnose"
6+
},
7+
"api-version": "2021-09-01-preview",
8+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
9+
"resourceGroupName": "myResourceGroup",
10+
"serviceName": "myservice",
11+
"appName": "myapp",
12+
"deploymentName": "mydeployment"
13+
},
14+
"responses": {
15+
"200": {},
16+
"202": {}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"parameters": {
3+
"diagnosticParameters": {
4+
"appInstance": "myappinstance",
5+
"filePath": "/byos/diagnose"
6+
},
7+
"api-version": "2021-09-01-preview",
8+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
9+
"resourceGroupName": "myResourceGroup",
10+
"serviceName": "myservice",
11+
"appName": "myapp",
12+
"deploymentName": "mydeployment"
13+
},
14+
"responses": {
15+
"200": {},
16+
"202": {}
17+
}
18+
}

0 commit comments

Comments
 (0)