Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add single execution history endpoint, refactor copy paste code for j… #23816

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,7 @@
"$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": "#/parameters/JobNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -157,11 +152,7 @@
"$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"
"$ref": "#/parameters/JobNameParameter"
},
{
"name": "JobEnvelope",
Expand Down Expand Up @@ -224,11 +215,7 @@
"$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"
"$ref": "#/parameters/JobNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -281,11 +268,7 @@
"$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"
"$ref": "#/parameters/JobNameParameter"
},
{
"name": "JobEnvelope",
Expand Down Expand Up @@ -345,12 +328,7 @@
"$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": "#/parameters/JobNameParameter"
},
{
"name": "template",
Expand Down Expand Up @@ -416,20 +394,10 @@
"$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\\._\\(\\)]+$"
"$ref": "#/parameters/JobNameParameter"
},
{
"name": "jobExecutionName",
"in": "path",
"description": "Job execution name.",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
"$ref": "#/parameters/JobExecutionNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -480,21 +448,10 @@
"$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\\._\\(\\)]+$"
"$ref": "#/parameters/JobNameParameter"
trajkobal marked this conversation as resolved.
Show resolved Hide resolved
},
{
"name": "jobExecutionName",
"in": "body",
"description": "List of all job executions that should be stopped.",
"required": true,
"schema": {
"$ref": "#/definitions/JobExecutionNamesCollection"
}
"$ref": "#/parameters/JobExecutionNameParameter"
}
],
"responses": {
Expand Down Expand Up @@ -545,12 +502,7 @@
"$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": "#/parameters/JobNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
Expand Down Expand Up @@ -587,6 +539,58 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}": {
"get": {
"tags": [
"Jobs"
],
"summary": "Get details of a single job execution",
"operationId": "JobExecution",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/JobNameParameter"
},
{
"$ref": "#/parameters/JobExecutionNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"name": "$filter",
"in": "query",
"description": "The filter to apply on the operation.",
"required": false,
"type": "string"
}
trajkobal marked this conversation as resolved.
Show resolved Hide resolved
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/JobExecution"
}
},
"default": {
"description": "Common error response.",
"schema": {
"$ref": "./CommonDefinitions.json#/definitions/DefaultErrorResponse"
}
}
},
"x-ms-examples": {
"Get a single Job Execution": {
"$ref": "./examples/Job_Execution_Get.json"
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets": {
"post": {
"tags": [
Expand All @@ -605,12 +609,7 @@
"$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\\._\\(\\)]+$"
"$ref": "#/parameters/JobNameParameter"
}
],
"responses": {
Expand All @@ -635,6 +634,24 @@
}
}
},
"parameters": {
"JobNameParameter": {
"name": "jobName",
"in": "path",
"description": "Job Name",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
},
"JobExecutionNameParameter": {
"name": "jobExecutionName",
"in": "path",
"description": "Job execution name.",
"required": true,
"type": "string",
"pattern": "^[-\\w\\._\\(\\)]+$"
}
},
"definitions": {
"JobConfiguration": {
"description": "Non versioned Container Apps Job configuration properties",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"parameters": {
"subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345",
"resourceGroupName": "rg",
"jobName": "testcontainerAppsJob0",
"jobExecutionName": "jobExecution1",
"api-version": "2023-04-01-preview"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": {
"name": "testcontainerAppJob-27944454",
"status": "Running",
"startTime": "2023-02-13T20:37:30+00:00",
"endTime": "2023-02-13T20:47:30+00:00",
"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"
]
}
]
}
}
}
}
}
}