Skip to content

Commit 229cc72

Browse files
authored
Add unassign job route (#19470)
* Add unassign job route * Fix errors * Add custom words * Upgrade version * Revert to previous API version
1 parent 53740f0 commit 229cc72

File tree

3 files changed

+88
-1
lines changed

3 files changed

+88
-1
lines changed

custom-words.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2603,6 +2603,9 @@ getazresiliencystatus
26032603
providerport
26042604
spaceallocationparameter
26052605
cadl
2606+
unassignment
2607+
unassign
2608+
Unassigns
26062609
enrollmentgroups
26072610
scheduledjobs
26082611
getdevices
@@ -2613,4 +2616,4 @@ setx
26132616
verifyx
26142617
removex
26152618
generateverificationcodex
2616-
favorited
2619+
favorited

specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,6 +1052,56 @@
10521052
}
10531053
}
10541054
},
1055+
"/routing/jobs/{jobId}/assignments/{assignmentId}:unassign": {
1056+
"post": {
1057+
"tags": [
1058+
"Jobs"
1059+
],
1060+
"summary": "Un-assign a job.",
1061+
"operationId": "JobRouter_UnassignJobAction",
1062+
"produces": [
1063+
"application/json"
1064+
],
1065+
"parameters": [
1066+
{
1067+
"in": "path",
1068+
"name": "jobId",
1069+
"description": "Id of the job to unassign",
1070+
"required": true,
1071+
"type": "string"
1072+
},
1073+
{
1074+
"in": "path",
1075+
"name": "assignmentId",
1076+
"description": "Id of the assignment to unassign",
1077+
"required": true,
1078+
"type": "string"
1079+
},
1080+
{
1081+
"$ref": "#/parameters/ApiVersionParameter"
1082+
}
1083+
],
1084+
"responses": {
1085+
"default": {
1086+
"description": "Error",
1087+
"schema": {
1088+
"$ref": "#/definitions/CommunicationErrorResponse"
1089+
}
1090+
},
1091+
"200": {
1092+
"description": "Success",
1093+
"schema": {
1094+
"$ref": "#/definitions/UnassignJobResponse"
1095+
}
1096+
}
1097+
},
1098+
"x-ms-examples": {
1099+
"Unassigns a job": {
1100+
"$ref": "./examples/Jobs_UnassignJob.json"
1101+
}
1102+
}
1103+
}
1104+
},
10551105
"/routing/workers/{workerId}/offers/{offerId}:accept": {
10561106
"post": {
10571107
"tags": [
@@ -3322,6 +3372,24 @@
33223372
},
33233373
"x-ms-discriminator-value": "static"
33243374
},
3375+
"UnassignJobResponse": {
3376+
"required": [
3377+
"jobId",
3378+
"unassignmentCount"
3379+
],
3380+
"type": "object",
3381+
"properties": {
3382+
"jobId": {
3383+
"description": "The Id of the job unassigned.",
3384+
"type": "string"
3385+
},
3386+
"unassignmentCount": {
3387+
"format": "int32",
3388+
"description": "The number of times a job is unassigned. At a maximum 3.",
3389+
"type": "integer"
3390+
}
3391+
}
3392+
},
33253393
"WaitTimeExceptionTrigger": {
33263394
"description": "Trigger for an exception action on exceeding wait time",
33273395
"required": [
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"endpoint": "https://contoso.westus.communications.azure.com",
4+
"api-version": "2021-10-20_preview2",
5+
"jobId": "8780b28c-7079-4de1-9143-4d369289e958",
6+
"assignmentId": "1d5896f3-8b54-40be-82d3-910323f5e2af"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"jobId": "8780b28c-7079-4de1-9143-4d369289e958",
12+
"unassignmentCount": 1
13+
}
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)