Skip to content

Commit b80ac0f

Browse files
authored
Add ContainerApp Start/Stop for 2023-04-01-preview (#23497)
* Add ContainerApp Start/Stop for 2023-04-01-preview * Fix validation error * Fix validation error * Change example to add location in header * Fix lint error * Fix lint issue * Fix lint issue * Fix lint issue * Fix lint issue * Fix lint issue * Fix lint issue * Fix lint issue * Fix lint issue
1 parent 2ea2211 commit b80ac0f

File tree

3 files changed

+144
-0
lines changed

3 files changed

+144
-0
lines changed

specification/app/resource-manager/Microsoft.App/preview/2023-04-01-preview/ContainerApps.json

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,118 @@
483483
}
484484
}
485485
}
486+
},
487+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start": {
488+
"post": {
489+
"tags": [
490+
"ContainerApps"
491+
],
492+
"summary": "Start a container app",
493+
"operationId": "ContainerApps_Start",
494+
"parameters": [
495+
{
496+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
497+
},
498+
{
499+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
500+
},
501+
{
502+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
503+
},
504+
{
505+
"name": "containerAppName",
506+
"in": "path",
507+
"description": "Name of the Container App.",
508+
"required": true,
509+
"type": "string",
510+
"pattern": "^[-\\w\\._\\(\\)]+$"
511+
}
512+
],
513+
"responses": {
514+
"200": {
515+
"description": "Container App started successfully."
516+
},
517+
"202": {
518+
"description": "Start operation is in progress.",
519+
"headers": {
520+
"Location": {
521+
"type": "string"
522+
}
523+
}
524+
},
525+
"default": {
526+
"description": "Common error response.",
527+
"schema": {
528+
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
529+
}
530+
}
531+
},
532+
"x-ms-examples": {
533+
"Start Container App": {
534+
"$ref": "./examples/ContainerApps_Start.json"
535+
}
536+
},
537+
"x-ms-long-running-operation": true,
538+
"x-ms-long-running-operation-options": {
539+
"final-state-via": "location"
540+
}
541+
}
542+
},
543+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop": {
544+
"post": {
545+
"tags": [
546+
"ContainerApps"
547+
],
548+
"summary": "Stop a container app",
549+
"operationId": "ContainerApps_Stop",
550+
"parameters": [
551+
{
552+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
553+
},
554+
{
555+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
556+
},
557+
{
558+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
559+
},
560+
{
561+
"name": "containerAppName",
562+
"in": "path",
563+
"description": "Name of the Container App.",
564+
"required": true,
565+
"type": "string",
566+
"pattern": "^[-\\w\\._\\(\\)]+$"
567+
}
568+
],
569+
"responses": {
570+
"200": {
571+
"description": "Container App stopped successfully."
572+
},
573+
"202": {
574+
"description": "Stop operation is in progress.",
575+
"headers": {
576+
"Location": {
577+
"type": "string"
578+
}
579+
}
580+
},
581+
"default": {
582+
"description": "Common error response.",
583+
"schema": {
584+
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
585+
}
586+
}
587+
},
588+
"x-ms-examples": {
589+
"Stop Container App": {
590+
"$ref": "./examples/ContainerApps_Stop.json"
591+
}
592+
},
593+
"x-ms-long-running-operation": true,
594+
"x-ms-long-running-operation-options": {
595+
"final-state-via": "location"
596+
}
597+
}
486598
}
487599
},
488600
"definitions": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
4+
"resourceGroupName": "rg",
5+
"containerAppName": "testWorkerApp0",
6+
"api-version": "2023-04-01-preview"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {
11+
"headers": {
12+
"location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/containerApps/testWorkerApp0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-04-01-preview"
13+
}
14+
}
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
4+
"resourceGroupName": "rg",
5+
"containerAppName": "testWorkerApp0",
6+
"api-version": "2023-04-01-preview"
7+
},
8+
"responses": {
9+
"200": {},
10+
"202": {
11+
"headers": {
12+
"location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/containerApps/testWorkerApp0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2023-04-01-preview"
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)