diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/Jobs.json b/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/Jobs.json index 1ea7112205c9..e600f5af7892 100644 --- a/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/Jobs.json +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/Jobs.json @@ -625,6 +625,130 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/resume": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Resumes a suspended job", + "operationId": "Jobs_Resume", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "jobName", + "in": "path", + "description": "Name of the Job.", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$" + } + ], + "responses": { + "200": { + "description": "Job resumed successfully.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "202": { + "description": "Resume operation is in progress.", + "headers": { + "Azure-AsyncOperation": { + "type": "string" + }, + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Resume Job": { + "$ref": "./examples/Jobs_Resume.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/suspend": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Suspends a job", + "operationId": "Jobs_Suspend", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "jobName", + "in": "path", + "description": "Name of the Job.", + "required": true, + "type": "string", + "pattern": "^[-\\w\\._\\(\\)]+$" + } + ], + "responses": { + "200": { + "description": "Job suspended successfully.", + "schema": { + "$ref": "#/definitions/Job" + } + }, + "202": { + "description": "Suspend operation is in progress.", + "headers": { + "Azure-AsyncOperation": { + "type": "string" + }, + "Location": { + "type": "string" + } + } + }, + "default": { + "description": "Common error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Suspend Job": { + "$ref": "./examples/Jobs_Suspend.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + } } }, "parameters": { @@ -794,6 +918,20 @@ "modelAsString": true } }, + "runningState": { + "description": "Current running state of the job", + "enum": [ + "Running", + "Progressing", + "Suspended" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobRunningState", + "modelAsString": true + } + }, "environmentId": { "description": "Resource ID of environment.", "type": "string", diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json b/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json new file mode 100644 index 000000000000..91b2181d0b40 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Resume.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "jobName": "testcontainerAppsJob0", + "api-version": "2024-08-02-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/testcontainerAppsJob0", + "name": "testcontainerAppsJob0", + "type": "Microsoft.App/jobs", + "location": "East US", + "properties": { + "provisioningState": "Succeeded", + "runningState": "Running", + "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + "configuration": { + "replicaTimeout": 10, + "replicaRetryLimit": 10, + "manualTriggerConfig": { + "replicaCompletionCount": 1, + "parallelism": 4 + }, + "triggerType": "Manual", + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] + }, + "template": { + "containers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "volumeMounts": [ + { + "volumeName": "azurefile", + "mountPath": "/mnt/path1", + "subPath": "subPath1" + }, + { + "volumeName": "nfsazurefile", + "mountPath": "/mnt/path2", + "subPath": "subPath2" + } + ] + } + ], + "initContainers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testinitcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], + "volumes": [ + { + "name": "azurefile", + "storageType": "AzureFile", + "storageName": "storage" + }, + { + "name": "nfsazurefile", + "storageType": "NfsAzureFile", + "storageName": "nfsStorage" + } + ] + } + } + } + }, + "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/jobs/testcontainerAppsJob0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-08-02-preview", + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/jobs/testcontainerAppsJob0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-08-02-preview" + } + } + } +} diff --git a/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json b/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json new file mode 100644 index 000000000000..2ddf6d460684 --- /dev/null +++ b/specification/app/resource-manager/Microsoft.App/preview/2024-08-02-preview/examples/Jobs_Suspend.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "subscriptionId": "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345", + "resourceGroupName": "rg", + "jobName": "testcontainerAppsJob0", + "api-version": "2024-08-02-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/testcontainerAppsJob0", + "name": "testcontainerAppsJob0", + "type": "Microsoft.App/jobs", + "location": "East US", + "properties": { + "provisioningState": "Succeeded", + "runningState": "Suspended", + "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube", + "configuration": { + "replicaTimeout": 10, + "replicaRetryLimit": 10, + "manualTriggerConfig": { + "replicaCompletionCount": 1, + "parallelism": 4 + }, + "triggerType": "Manual", + "identitySettings": [ + { + "identity": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + "lifecycle": "All" + }, + { + "identity": "system", + "lifecycle": "Init" + } + ] + }, + "template": { + "containers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + }, + "volumeMounts": [ + { + "volumeName": "azurefile", + "mountPath": "/mnt/path1", + "subPath": "subPath1" + }, + { + "volumeName": "nfsazurefile", + "mountPath": "/mnt/path2", + "subPath": "subPath2" + } + ] + } + ], + "initContainers": [ + { + "image": "repo/testcontainerAppsJob0:v4", + "name": "testinitcontainerAppsJob0", + "resources": { + "cpu": 0.2, + "memory": "100Mi" + } + } + ], + "volumes": [ + { + "name": "azurefile", + "storageType": "AzureFile", + "storageName": "storage" + }, + { + "name": "nfsazurefile", + "storageType": "NfsAzureFile", + "storageName": "nfsStorage" + } + ] + } + } + } + }, + "202": { + "headers": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/jobs/testcontainerAppsJob0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-08-02-preview", + "location": "https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.App/jobs/testcontainerAppsJob0/operationResults/62e4d893-d233-4005-988e-a428d9f77076?api-version=2024-08-02-preview" + } + } + } +} diff --git a/specification/app/resource-manager/sdk-suppressions.yaml b/specification/app/resource-manager/sdk-suppressions.yaml index db9be2989c3a..506aa0821c8e 100644 --- a/specification/app/resource-manager/sdk-suppressions.yaml +++ b/specification/app/resource-manager/sdk-suppressions.yaml @@ -10,3 +10,5 @@ suppressions: - Operation ContainerAppsSourceControlsOperations.begin_create_or_update has a new required parameter x_ms_github_auxiliary - Operation ContainerAppsSourceControlsOperations.begin_delete has a new required parameter x_ms_github_auxiliary - Operation JobsOperations.proxy_get no longer has parameter api_name + - The 'JobsOperations' method 'proxy_get' had its parameter 'api_name' of kind 'positional_or_keyword' deleted or renamed in the current version + - The 'JobsOperations' method 'proxy_get' had its parameter 'api_name' of kind 'positional_or_keyword' deleted or renamed in the current version