From cd4b4461fece063f693e98e4bc3902cefd4eb8fb Mon Sep 17 00:00:00 2001 From: anandanthony Date: Fri, 10 Feb 2023 03:07:08 -0600 Subject: [PATCH 01/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 111 ++++++++++++++++++ 1 file changed, 111 insertions(+) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 6d4599c88606..4174dfca5486 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -349,6 +349,15 @@ "type": "string", "pattern": "^[-\\w\\._\\(\\)]+$" }, + { + "name": "JobEnvelope", + "in": "body", + "description": "Properties used to create a container apps job", + "required": true, + "schema": { + "$ref": "#/definitions/JobExecutionContainer" + } + }, { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" } @@ -383,6 +392,70 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Terminates execution of a running container apps job", + "operationId": "Job_terminate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "jobName", + "in": "path", + "description": "Name of the Container Apps Job.", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$" + }, + { + "name": "jobExecutionName", + "in": "path", + "description": "Name of the Container Apps Job's Execution.", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$" + } + ], + "responses": { + "200": { + "description": "Container Apps Jobs terminated successfully." + }, + "202": { + "description": "OK", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Terminate a Container Apps Job": { + "$ref": "./examples/Job_Execution_Stop.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop": { "post": { "tags": [ @@ -758,6 +831,44 @@ "description": "Number of parallel replicas of a job that can run at a given time.", "format": "int32", "type": "integer" + }, + "JobExecutionContainer":{ + "description": "Container App base container definition.", + "type": "object", + "properties": { + "image": { + "description": "Container image tag.", + "type": "string" + }, + "name": { + "description": "Custom container name.", + "type": "string" + }, + "command": { + "description": "Container start command.", + "type": "array", + "items": { + "type": "string" + } + }, + "args": { + "description": "Container start command arguments.", + "type": "array", + "items": { + "type": "string" + } + }, + "env": { + "description": "Container environment variables.", + "type": "array", + "items": { + "$ref": "./CommonDefinitions.json#/definitions/EnvironmentVar" + }, + "x-ms-identifiers": [ + "name" + ] + } + } } }, "securityDefinitions": { From 7847035b7e5222ed79b8cfb47d104e2423419307 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Mon, 13 Feb 2023 21:04:17 -0600 Subject: [PATCH 02/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 108 +++++++++++++++++- .../examples/Job_Execution_Stop.json | 17 +++ .../examples/Job_Executions.json | 44 +++++++ .../examples/Job_Start.json | 18 +++ .../2022-11-01-preview/examples/Job_Stop.json | 4 + 5 files changed, 188 insertions(+), 3 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Execution_Stop.json create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 4174dfca5486..578940965828 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -350,7 +350,7 @@ "pattern": "^[-\\w\\._\\(\\)]+$" }, { - "name": "JobEnvelope", + "name": "JobExecution", "in": "body", "description": "Properties used to create a container apps job", "required": true, @@ -480,6 +480,15 @@ "required": true, "type": "string", "pattern": "^[-\\w\\._\\(\\)]+$" + }, + { + "name": "jobExecutionName", + "in": "body", + "description": "List of all job executions that should be stopped.", + "required": true, + "schema": { + "$ref": "#/definitions/JobExecutionName" + } } ], "responses": { @@ -512,6 +521,68 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Get a Container Apps Job's executions", + "operationId": "Job_Executions", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "jobName", + "in": "path", + "description": "Name of the Container Apps Job.", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/JobExecutions" + } + }, + "202": { + "description": "OK", + "headers": { + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse" + } + } + }, + "x-ms-examples": { + "Run a Container Apps Job": { + "$ref": "./examples/Job_Executions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets": { "post": { "tags": [ @@ -832,8 +903,39 @@ "format": "int32", "type": "integer" }, - "JobExecutionContainer":{ - "description": "Container App base container definition.", + "JobExecutionName": { + "description": "Container App's Job execution name.", + "type": "string" + }, + "JobExecutions": { + "description": "Container Apps Jobs executions.", + "type": "object", + "properties": { + "name": { + "$ref": "#/definitions/JobExecutionName" + }, + "status": { + "description": "Job execution status.", + "type": "string" + }, + "startTime": { + "description": "Job execution start time.", + "format": "date-time", + "type": "string" + }, + "jobExecutionContainer": { + "description": "Job's execution container.", + "$ref": "#/definitions/JobExecutionContainer" + }, + "nextLink": { + "description": "Link to next page of resources.", + "type": "string", + "readOnly": true + } + } + }, + "JobExecutionContainer": { + "description": "Container Apps Jobs execution container definition.", "type": "object", "properties": { "image": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Execution_Stop.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Execution_Stop.json new file mode 100644 index 000000000000..9edacb18de15 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Execution_Stop.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "jobName": "testcontainerAppsJob0", + "jobExecutionName": "jobExecution1", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "location" + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json new file mode 100644 index 000000000000..c85f56b838f6 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "jobName": "testcontainerAppsJob0", + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "testcontainerApp0-pjxhsye", + "status": "running", + "startTime": "2023-02-13T20:37:30+00:00", + "jobExecutionContainer": + { + "image": "repo/testcontainerAppsJob0:v1", + "name": "testcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello;done" + ] + } + } + ], + "nextLink": null + } + }, + "202": { + "headers": { + "Location": "location" + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json index 2225ce0be221..55478c09af30 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json @@ -3,6 +3,24 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", + "JobExecution": { + "JobExecutionContainer": + { + "image": "repo/testcontainerAppsJob0:v1", + "name": "testcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello;done" + ] + } + }, "api-version": "2022-11-01-preview" }, "responses": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json index 2225ce0be221..a7d956a4470c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json @@ -3,6 +3,10 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", + "jobExecutionName": [ + "jobExecution1", + "jobExecution2" + ], "api-version": "2022-11-01-preview" }, "responses": { From f58d64bc4b61872d59192f1cca3117e0086ac075 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Thu, 16 Feb 2023 17:54:14 -0600 Subject: [PATCH 03/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 111 +++++++++++++++--- .../examples/Job_Executions.json | 5 +- .../examples/Job_Start.json | 57 ++++++--- 3 files changed, 138 insertions(+), 35 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 578940965828..5f70d43fe179 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -350,12 +350,12 @@ "pattern": "^[-\\w\\._\\(\\)]+$" }, { - "name": "JobExecution", + "name": "template", "in": "body", "description": "Properties used to create a container apps job", "required": true, "schema": { - "$ref": "#/definitions/JobExecutionContainer" + "$ref": "#/definitions/JobExecutionTemplate" } }, { @@ -364,7 +364,10 @@ ], "responses": { "200": { - "description": "Container Apps Jobs started successfully." + "description": "OK", + "schema": { + "$ref": "#/definitions/JobExecutionBase" + } }, "202": { "description": "OK", @@ -462,7 +465,7 @@ "Jobs" ], "summary": "Terminates execution of a running container apps job", - "operationId": "Job_terminate", + "operationId": "Job_terminate_multiple_executions", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -486,8 +489,11 @@ "in": "body", "description": "List of all job executions that should be stopped.", "required": true, - "schema": { - "$ref": "#/definitions/JobExecutionName" + "type": "array", + "items": { + "description": "Name of the job execution.", + "name": "jobExecutionName", + "type": "string" } } ], @@ -551,7 +557,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/JobExecutions" + "$ref": "#/definitions/ContainerAppJobExecutions" } }, "202": { @@ -903,29 +909,80 @@ "format": "int32", "type": "integer" }, - "JobExecutionName": { + "JobExecutionBase": { "description": "Container App's Job execution name.", - "type": "string" + "type": "string", + "properties": { + "name": { + "description": "Job execution name.", + "type": "string" + }, + "id": { + "description": "Job execution Id.", + "type": "string" + } + } }, - "JobExecutions": { - "description": "Container Apps Jobs executions.", + "JobExecution": { + "description": "Container Apps Jobs execution.", "type": "object", "properties": { "name": { "$ref": "#/definitions/JobExecutionName" }, - "status": { - "description": "Job execution status.", + "id": { + "description": "Job execution Id.", + "type": "string" + }, + "Type": { + "description": "Job Type.", "type": "string" }, + "Status": { + "description": "Current running State of the job", + "enum": [ + "Running", + "Processing", + "Stopped", + "Degraded", + "Failed", + "Unknown" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobExecutionRunningState", + "modelAsString": true + } + }, "startTime": { "description": "Job execution start time.", "format": "date-time", "type": "string" }, - "jobExecutionContainer": { + "JobExecutionTemplate": { "description": "Job's execution container.", "$ref": "#/definitions/JobExecutionContainer" + } + } + }, + "ContainerAppJobExecutions": { + "description": "Container App executions collection ARM resource.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecution" + }, + "jobName": { + "description": "Container Apps Job name.", + "type": "string" + } }, "nextLink": { "description": "Link to next page of resources.", @@ -934,6 +991,32 @@ } } }, + "JobExecutionTemplate": { + "description": "Job's execution template, containing container configuration for a job's execution", + "type": "object", + "properties": { + "containers": { + "description": "List of container definitions for the Container Apps Job.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecutionContainer" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "initContainers": { + "description": "List of specialized containers that run before job containers.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecutionContainer" + }, + "x-ms-identifiers": [ + "name" + ] + } + } + }, "JobExecutionContainer": { "description": "Container Apps Jobs execution container definition.", "type": "object", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json index c85f56b838f6..689608653079 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json @@ -9,13 +9,12 @@ "200": { "headers": {}, "body": { - "value": [ + "ContainerAppJobExecutions": [ { "name": "testcontainerApp0-pjxhsye", "status": "running", "startTime": "2023-02-13T20:37:30+00:00", - "jobExecutionContainer": - { + "jobExecutionContainer": { "image": "repo/testcontainerAppsJob0:v1", "name": "testcontainerAppsJob0", "resources": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json index 55478c09af30..0d3be0d326b7 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json @@ -3,28 +3,49 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", - "JobExecution": { - "JobExecutionContainer": - { - "image": "repo/testcontainerAppsJob0:v1", - "name": "testcontainerAppsJob0", - "resources": { - "cpu": 0.2, - "memory": "100Mi" - }, - "command": [ - "/bin/sh" - ], - "args": [ - "-c", - "while true; do echo hello;done" - ] - } + "template": { + "containers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], + "initContainers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testinitcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ] + } + ] }, "api-version": "2022-11-01-preview" }, "responses": { - "200": {}, + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "testcontainerAppsJob0-pjxhsye", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/{containerAppsJobName}/executions/{jobExecutionName}" + } + ] + } + }, "202": { "headers": { "Location": "location" From 51883a507de42906cfcecae4b5b0b908d0a5db1a Mon Sep 17 00:00:00 2001 From: anandanthony Date: Thu, 16 Feb 2023 18:07:43 -0600 Subject: [PATCH 04/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 4 +- .../examples/Job_Executions.json | 38 +++++++++++++------ 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 5f70d43fe179..5d41b351bd8e 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -960,9 +960,9 @@ "format": "date-time", "type": "string" }, - "JobExecutionTemplate": { + "template": { "description": "Job's execution container.", - "$ref": "#/definitions/JobExecutionContainer" + "$ref": "#/definitions/JobExecutionTemplate" } } }, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json index 689608653079..3525cbb8d1e6 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json @@ -14,19 +14,33 @@ "name": "testcontainerApp0-pjxhsye", "status": "running", "startTime": "2023-02-13T20:37:30+00:00", - "jobExecutionContainer": { - "image": "repo/testcontainerAppsJob0:v1", - "name": "testcontainerAppsJob0", - "resources": { - "cpu": 0.2, - "memory": "100Mi" - }, - "command": [ - "/bin/sh" + "template": { + "containers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } ], - "args": [ - "-c", - "while true; do echo hello;done" + "initContainers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testinitcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "command": [ + "/bin/sh" + ], + "args": [ + "-c", + "while true; do echo hello; sleep 10;done" + ] + } ] } } From 20cc73104ebe20711184ec1874fbbec0d1c6f473 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Thu, 16 Feb 2023 18:14:56 -0600 Subject: [PATCH 05/17] update start stop spec for jobs --- .../Microsoft.App/preview/2022-11-01-preview/Jobs.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 5d41b351bd8e..3236885b5f4a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -928,7 +928,8 @@ "type": "object", "properties": { "name": { - "$ref": "#/definitions/JobExecutionName" + "description": "Job execution Name.", + "type": "string" }, "id": { "description": "Job execution Id.", From f6eb5eeab8ebc8d5c8ba4aaee309dafb646e9e6c Mon Sep 17 00:00:00 2001 From: anandanthony Date: Thu, 16 Feb 2023 20:11:59 -0600 Subject: [PATCH 06/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 3236885b5f4a..7386f1ed169e 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -465,7 +465,7 @@ "Jobs" ], "summary": "Terminates execution of a running container apps job", - "operationId": "Job_terminate_multiple_executions", + "operationId": "Job_terminateMultipleExecutions", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -489,11 +489,8 @@ "in": "body", "description": "List of all job executions that should be stopped.", "required": true, - "type": "array", - "items": { - "description": "Name of the job execution.", - "name": "jobExecutionName", - "type": "string" + "schema": { + "$ref": "#/definitions/JobExecutionNamesCollection" } } ], @@ -911,7 +908,7 @@ }, "JobExecutionBase": { "description": "Container App's Job execution name.", - "type": "string", + "type": "object", "properties": { "name": { "description": "Job execution name.", @@ -935,11 +932,11 @@ "description": "Job execution Id.", "type": "string" }, - "Type": { + "type": { "description": "Job Type.", "type": "string" }, - "Status": { + "status": { "description": "Current running State of the job", "enum": [ "Running", @@ -969,20 +966,12 @@ }, "ContainerAppJobExecutions": { "description": "Container App executions collection ARM resource.", - "required": [ - "value" - ], - "type": "object", "properties": { "value": { "description": "Collection of resources.", "type": "array", "items": { "$ref": "#/definitions/JobExecution" - }, - "jobName": { - "description": "Container Apps Job name.", - "type": "string" } }, "nextLink": { @@ -990,6 +979,25 @@ "type": "string", "readOnly": true } + }, + "required": [ + "value" + ] + }, + "JobExecutionNamesCollection": { + "description": "Container App executions names list.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "description": "Collection of resources.", + "type": "array", + "items": { + "$ref": "#/definitions/JobExecutionBase" + } + } } }, "JobExecutionTemplate": { @@ -1053,6 +1061,10 @@ "x-ms-identifiers": [ "name" ] + }, + "resources": { + "$ref": "./CommonDefinitions.json#/definitions/ContainerResources", + "description": "Container resource requirements." } } } From 09d774342e331852ea76441f5238da9f2c87f570 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Thu, 16 Feb 2023 21:13:15 -0600 Subject: [PATCH 07/17] update start stop spec for jobs --- .../Microsoft.App/preview/2022-11-01-preview/Jobs.json | 1 + .../preview/2022-11-01-preview/examples/Job_Executions.json | 2 +- .../preview/2022-11-01-preview/examples/Job_Start.json | 2 +- .../preview/2022-11-01-preview/examples/Job_Stop.json | 5 +---- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 7386f1ed169e..085193ff3ab5 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -966,6 +966,7 @@ }, "ContainerAppJobExecutions": { "description": "Container App executions collection ARM resource.", + "type": "object", "properties": { "value": { "description": "Collection of resources.", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json index 3525cbb8d1e6..1fceb55e1238 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json @@ -9,7 +9,7 @@ "200": { "headers": {}, "body": { - "ContainerAppJobExecutions": [ + "value":[ { "name": "testcontainerApp0-pjxhsye", "status": "running", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json index 0d3be0d326b7..e8b3ba45b674 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json @@ -38,7 +38,7 @@ "200": { "headers": {}, "body": { - "value": [ + "JobExecutionBase": [ { "name": "testcontainerAppsJob0-pjxhsye", "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/{containerAppsJobName}/executions/{jobExecutionName}" diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json index a7d956a4470c..9edacb18de15 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json @@ -3,10 +3,7 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", - "jobExecutionName": [ - "jobExecution1", - "jobExecution2" - ], + "jobExecutionName": "jobExecution1", "api-version": "2022-11-01-preview" }, "responses": { From 535a0b2b451efbbe0333980e1c496a89c94a5a64 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Thu, 16 Feb 2023 22:05:20 -0600 Subject: [PATCH 08/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 2 +- .../examples/Job_Executions.json | 4 ++-- .../examples/Job_Start.json | 8 ++------ .../examples/Job_StopAll.json | 20 +++++++++++++++++++ 4 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 085193ff3ab5..fd48d848edcf 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -515,7 +515,7 @@ }, "x-ms-examples": { "Terminate a Container Apps Job": { - "$ref": "./examples/Job_Stop.json" + "$ref": "./examples/Job_StopMultiple.json" } }, "x-ms-long-running-operation": true, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json index 1fceb55e1238..5afbaca86d3d 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json @@ -9,10 +9,10 @@ "200": { "headers": {}, "body": { - "value":[ + "value": [ { "name": "testcontainerApp0-pjxhsye", - "status": "running", + "status": "Running", "startTime": "2023-02-13T20:37:30+00:00", "template": { "containers": [ diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json index e8b3ba45b674..acd9742f8347 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Start.json @@ -38,12 +38,8 @@ "200": { "headers": {}, "body": { - "JobExecutionBase": [ - { - "name": "testcontainerAppsJob0-pjxhsye", - "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/{containerAppsJobName}/executions/{jobExecutionName}" - } - ] + "name": "testcontainerAppsJob0-pjxhsye", + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/{containerAppsJobName}/executions/{jobExecutionName}" } }, "202": { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json new file mode 100644 index 000000000000..a7d956a4470c --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "jobName": "testcontainerAppsJob0", + "jobExecutionName": [ + "jobExecution1", + "jobExecution2" + ], + "api-version": "2022-11-01-preview" + }, + "responses": { + "200": {}, + "202": { + "headers": { + "Location": "location" + } + } + } +} From ce5902937cf99fca6169884b922d2c79fedc67f1 Mon Sep 17 00:00:00 2001 From: Anand Anthony Francis Date: Thu, 16 Feb 2023 23:24:19 -0600 Subject: [PATCH 09/17] update job specs with start, stop, execution endpoints --- .../preview/2022-11-01-preview/Jobs.json | 2 +- .../2022-11-01-preview/examples/Job_Stop.json | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index fd48d848edcf..00db286bd0e5 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -514,7 +514,7 @@ } }, "x-ms-examples": { - "Terminate a Container Apps Job": { + "Terminate Nultiple Container Apps Job": { "$ref": "./examples/Job_StopMultiple.json" } }, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json deleted file mode 100644 index 9edacb18de15..000000000000 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "parameters": { - "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", - "resourceGroupName": "rg", - "jobName": "testcontainerAppsJob0", - "jobExecutionName": "jobExecution1", - "api-version": "2022-11-01-preview" - }, - "responses": { - "200": {}, - "202": { - "headers": { - "Location": "location" - } - } - } -} From 88465789ddb907d352699914e736cab0400adbbb Mon Sep 17 00:00:00 2001 From: Anand Anthony Francis Date: Thu, 16 Feb 2023 23:32:32 -0600 Subject: [PATCH 10/17] update job specs with start, stop, execution endpoints --- .../Microsoft.App/preview/2022-11-01-preview/Jobs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 00db286bd0e5..0b0605548383 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -514,8 +514,8 @@ } }, "x-ms-examples": { - "Terminate Nultiple Container Apps Job": { - "$ref": "./examples/Job_StopMultiple.json" + "Terminate Multiple Container Apps Job": { + "$ref": "./examples/Job_StopAll.json" } }, "x-ms-long-running-operation": true, From 8fc91c6eb2cdfa03d9daac141469b41fc9bfdd9d Mon Sep 17 00:00:00 2001 From: Anand Anthony Francis Date: Thu, 16 Feb 2023 23:46:04 -0600 Subject: [PATCH 11/17] update job specs with start, stop, execution endpoints --- .../2022-11-01-preview/examples/Job_StopAll.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json index a7d956a4470c..513c4dda210c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json @@ -3,10 +3,12 @@ "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", - "jobExecutionName": [ - "jobExecution1", - "jobExecution2" - ], + "jobExecutionName": { + "value": [ + "jobExecution1", + "jobExecution2" + ] + }, "api-version": "2022-11-01-preview" }, "responses": { From faa7968a3c2ceb6dea9c9355c0348b1c1c9365fa Mon Sep 17 00:00:00 2001 From: anandanthony Date: Fri, 17 Feb 2023 00:53:49 -0600 Subject: [PATCH 12/17] update start stop spec for jobs --- .../Microsoft.App/preview/2022-11-01-preview/Jobs.json | 4 ++-- .../{Job_Execution_Stop.json => Job_Stop_Execution.json} | 0 .../examples/{Job_StopAll.json => Job_Stop_Multiple.json} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/{Job_Execution_Stop.json => Job_Stop_Execution.json} (100%) rename specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/{Job_StopAll.json => Job_Stop_Multiple.json} (95%) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 0b0605548383..48b8903acd67 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -450,7 +450,7 @@ }, "x-ms-examples": { "Terminate a Container Apps Job": { - "$ref": "./examples/Job_Execution_Stop.json" + "$ref": "./examples/Job__Stop_Execution.json" } }, "x-ms-long-running-operation": true, @@ -515,7 +515,7 @@ }, "x-ms-examples": { "Terminate Multiple Container Apps Job": { - "$ref": "./examples/Job_StopAll.json" + "$ref": "./examples/Job_Stop_Multiple.json" } }, "x-ms-long-running-operation": true, diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Execution_Stop.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json similarity index 100% rename from specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Execution_Stop.json rename to specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Execution.json diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json similarity index 95% rename from specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json rename to specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json index 513c4dda210c..787f8970d4d1 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_StopAll.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json @@ -4,7 +4,7 @@ "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", "jobExecutionName": { - "value": [ + "value": [ "jobExecution1", "jobExecution2" ] From efc199d1dd0fb0bf29e8e70eebf32229de2ccbc7 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Fri, 17 Feb 2023 01:06:23 -0600 Subject: [PATCH 13/17] update start stop spec for jobs --- .../Microsoft.App/preview/2022-11-01-preview/Jobs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 48b8903acd67..95e630068f7b 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -450,7 +450,7 @@ }, "x-ms-examples": { "Terminate a Container Apps Job": { - "$ref": "./examples/Job__Stop_Execution.json" + "$ref": "./examples/Job_Stop_Execution.json" } }, "x-ms-long-running-operation": true, From 5413b215e181f8e1fd581656b6122cf2b8c4b902 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Fri, 17 Feb 2023 01:51:55 -0600 Subject: [PATCH 14/17] update start stop spec for jobs --- .../2022-11-01-preview/examples/Job_Stop_Multiple.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json index 787f8970d4d1..5bdafb54535c 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json @@ -4,9 +4,13 @@ "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", "jobExecutionName": { - "value": [ - "jobExecution1", - "jobExecution2" + "value":[ + { + "name": "jobExecution1" + }, + { + "name": "jobExecution2" + } ] }, "api-version": "2022-11-01-preview" From 57b2d9e4090f668566d9e48829ac222c7e772fa3 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Fri, 17 Feb 2023 01:56:34 -0600 Subject: [PATCH 15/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/examples/Job_Stop_Multiple.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json index 5bdafb54535c..1e61cd9ec072 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json @@ -4,7 +4,7 @@ "resourceGroupName": "rg", "jobName": "testcontainerAppsJob0", "jobExecutionName": { - "value":[ + "value": [ { "name": "jobExecution1" }, From 932cf903816c07668b3853fbb982801b81ab42d7 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Fri, 17 Feb 2023 14:58:35 -0600 Subject: [PATCH 16/17] update start stop spec for jobs --- .../preview/2022-11-01-preview/Jobs.json | 14 ++++++-- .../examples/Job_Executions.json | 3 +- .../examples/Job_Stop_Multiple.json | 34 +++++++++++++++++-- 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 95e630068f7b..6d50db2ace3a 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -352,7 +352,7 @@ { "name": "template", "in": "body", - "description": "Properties used to create a container apps job", + "description": "Properties used to start a job instance.", "required": true, "schema": { "$ref": "#/definitions/JobExecutionTemplate" @@ -423,7 +423,7 @@ { "name": "jobExecutionName", "in": "path", - "description": "Name of the Container Apps Job's Execution.", + "description": "Job execution name.", "required": true, "type": "string", "pattern": "^[-\\w\\._\\(\\)]+$" @@ -496,7 +496,10 @@ ], "responses": { "200": { - "description": "Container Apps Jobs terminated successfully." + "description": "List of all the job executions that were requested to be stopped", + "schema": { + "$ref": "#/definitions/ContainerAppJobExecutions" + } }, "202": { "description": "OK", @@ -958,6 +961,11 @@ "format": "date-time", "type": "string" }, + "endTime": { + "description": "Job execution start time.", + "format": "date-time", + "type": "string" + }, "template": { "description": "Job's execution container.", "$ref": "#/definitions/JobExecutionTemplate" diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json index 5afbaca86d3d..1767e6799ea4 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Executions.json @@ -11,9 +11,10 @@ "body": { "value": [ { - "name": "testcontainerApp0-pjxhsye", + "name": "testcontainerAppJob-27944454", "status": "Running", "startTime": "2023-02-13T20:37:30+00:00", + "endTime": "2023-02-13T20:47:30+00:00", "template": { "containers": [ { diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json index 1e61cd9ec072..189abb3a43ca 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/examples/Job_Stop_Multiple.json @@ -6,17 +6,45 @@ "jobExecutionName": { "value": [ { - "name": "jobExecution1" + "name": "jobExecution-27944453" }, { - "name": "jobExecution2" + "name": "jobExecution-27944452" + }, + { + "name": "jobExecution-27944451" } ] }, "api-version": "2022-11-01-preview" }, "responses": { - "200": {}, + "200": { + "headers": {}, + "body": { + "value": [ + { + "name": "jobExecution-27944453", + "status": "Stopped", + "startTime": "2023-02-13T20:37:30+00:00", + "endTime": "2023-02-13T20:47:30+00:00" + }, + { + "name": "jobExecution-27944452", + "status": "Stopped", + "startTime": "2023-02-13T20:37:30+00:00", + "endTime": "2023-02-13T20:47:30+00:00" + }, + { + "name": "jobExecution-27944453", + "status": "Failed", + "startTime": "2023-02-13T20:37:30+00:00", + "endTime": "2023-02-13T20:47:30+00:00" + } + ], + "nextLink": null + } + }, "202": { "headers": { "Location": "location" From ee770b25920084c2adac6ef0e0f5d2e5c6b295c1 Mon Sep 17 00:00:00 2001 From: anandanthony Date: Sun, 19 Feb 2023 19:39:16 -0600 Subject: [PATCH 17/17] update start stop spec for jobs --- .../Microsoft.App/preview/2022-11-01-preview/Jobs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json index 6d50db2ace3a..02c2ad5a5dbc 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2022-11-01-preview/Jobs.json @@ -401,7 +401,7 @@ "Jobs" ], "summary": "Terminates execution of a running container apps job", - "operationId": "Job_terminate", + "operationId": "Jobs_StopExecution", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -465,7 +465,7 @@ "Jobs" ], "summary": "Terminates execution of a running container apps job", - "operationId": "Job_terminateMultipleExecutions", + "operationId": "Jobs_StopMultipleExecutions", "parameters": [ { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" @@ -576,7 +576,7 @@ } }, "x-ms-examples": { - "Run a Container Apps Job": { + "Get a Container Apps Job Executions": { "$ref": "./examples/Job_Executions.json" } },