From d798f996f1424302ecadfdb9730fdbb0ea4997e9 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Tue, 15 Feb 2022 15:51:02 -0800 Subject: [PATCH 01/23] initial commit --- .../communicationservicejobrouter.json | 3427 +++++++++++++++++ ...onPolicies_CreateClassificationPolicy.json | 129 + ...onPolicies_DeleteClassificationPolicy.json | 77 + ...ationPolicies_GetClassificationPolicy.json | 111 + ...istClassificationPoliciesWithPageSize.json | 120 + ...ionPolicies_PatchClassificationPolicy.json | 107 + ...tionPolicies_CreateDistributionPolicy.json | 95 + ...tionPolicies_DeleteDistributionPolicy.json | 74 + ...ibutionPolicies_GetDistributionPolicy.json | 86 + ..._ListDistributionPoliciesWithPageSize.json | 102 + ...utionPolicies_PatchDistributionPolicy.json | 96 + ...ceptionPolicies_CreateExceptionPolicy.json | 115 + ...ceptionPolicies_DeleteExceptionPolicy.json | 74 + .../ExceptionPolicies_GetExceptionPolicy.json | 96 + ...ies_ListExceptionPoliciesWithPageSize.json | 122 + ...xceptionPolicies_PatchExceptionPolicy.json | 116 + .../examples/Jobs_CloseJob.json | 80 + .../examples/Jobs_CompleteJob.json | 79 + .../examples/Jobs_CreateJob.json | 113 + .../examples/Jobs_DeleteJob.json | 50 + .../examples/Jobs_GetInQueuePosition.json | 82 + .../examples/Jobs_GetJob.json | 98 + .../examples/Jobs_GetJobsWithPageSize.json | 127 + .../examples/Jobs_RequestJobCancel.json | 80 + .../examples/Jobs_UpdateJob.json | 102 + .../examples/Offers_AcceptJobOffer.json | 81 + .../examples/Offers_DeclineJobOffer.json | 75 + .../examples/Queues_CreateQueue.json | 89 + .../examples/Queues_DeleteQueue.json | 74 + .../examples/Queues_GetQueue.json | 82 + .../examples/Queues_GetQueueStatistics.json | 80 + .../Queues_ListQueuesWithPageSize.json | 94 + .../examples/Queues_UpdateQueue.json | 88 + .../examples/Workers_CreateWorker.json | 118 + .../examples/Workers_DeleteWorker.json | 50 + .../Workers_DeregisterActiveWorker.json | 101 + .../Workers_DeregisterInactiveWorker.json | 101 + .../Workers_GetAvailableWorkersByChannel.json | 132 + .../examples/Workers_GetWorker.json | 100 + .../Workers_GetWorkersWithPageSize.json | 130 + .../examples/Workers_RegisterWorker.json | 101 + .../examples/Workers_ReleaseAssignment.json | 78 + .../examples/Workers_UpdateWorker.json | 118 + 43 files changed, 7450 insertions(+) create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json new file mode 100644 index 000000000000..57fecf7881ee --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -0,0 +1,3427 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Communication Routing Service", + "description": "Azure Communication Routing Service", + "version": "2021-10-20-preview2" + }, + "paths": { + "/routing/classificationPolicies": { + "post": { + "tags": [ + "ClassificationPolicies" + ], + "summary": "Creates a new classification policy.", + "operationId": "JobRouter_CreateClassificationPolicyV2", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "repeatability-request-id", + "type": "string" + }, + { + "in": "header", + "name": "repeatability-first-sent", + "type": "string" + }, + { + "in": "body", + "name": "classificationPolicy", + "description": "Model of classification policy to create", + "required": true, + "schema": { + "$ref": "#/definitions/ClassificationPolicy" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ClassificationPolicy" + } + } + }, + "x-ms-examples": { + "Creates a Classification policy": { + "$ref": "./examples/ClassificationPolicies_CreateClassificationPolicy.json" + } + } + }, + "get": { + "tags": [ + "ClassificationPolicies" + ], + "summary": "Retrieves existing classification policies", + "operationId": "JobRouter_ListClassificationPolicies", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "maxpagesize", + "description": "Maximum page size", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ClassificationPolicyCollection" + } + } + }, + "x-ms-examples": { + "Get Classification policies with pagination (max page size)": { + "$ref": "./examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/routing/classificationPolicies/{id}": { + "patch": { + "tags": [ + "ClassificationPolicies" + ], + "summary": "Updates a classification policy.", + "operationId": "JobRouter_PatchClassificationPolicyV2", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patch", + "description": "JSON Document containined the partial update for the classification policy", + "schema": { + "$ref": "#/definitions/ClassificationPolicy" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ClassificationPolicy" + } + } + }, + "x-ms-examples": { + "Update a Classification policy": { + "$ref": "./examples/ClassificationPolicies_PatchClassificationPolicy.json" + } + } + }, + "get": { + "tags": [ + "ClassificationPolicies" + ], + "summary": "Retrieves an existing classification policy by Id", + "operationId": "JobRouter_GetClassificationPolicy", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the classification policy", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ClassificationPolicy" + } + } + }, + "x-ms-examples": { + "Get a single Classification policy": { + "$ref": "./examples/ClassificationPolicies_GetClassificationPolicy.json" + } + } + }, + "delete": { + "tags": [ + "ClassificationPolicies" + ], + "summary": "Delete a classification policy by Id", + "operationId": "JobRouter_DeleteClassificationPolicy", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the classification policy", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Delete a Classification policy": { + "$ref": "./examples/ClassificationPolicies_DeleteClassificationPolicy.json" + } + } + } + }, + "/routing/distributionPolicies": { + "post": { + "tags": [ + "DistributionPolicies" + ], + "summary": "Creates a new distribution policy.", + "operationId": "JobRouter_CreateDistributionPolicyV2", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "repeatability-request-id", + "type": "string" + }, + { + "in": "header", + "name": "repeatability-first-sent", + "type": "string" + }, + { + "in": "body", + "name": "distributionPolicy", + "description": "Request to create distribution policy", + "required": true, + "schema": { + "$ref": "#/definitions/DistributionPolicy" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DistributionPolicy" + } + } + }, + "x-ms-examples": { + "Creates a Distribution policy": { + "$ref": "./examples/DistributionPolicies_CreateDistributionPolicy.json" + } + } + }, + "get": { + "tags": [ + "DistributionPolicies" + ], + "summary": "Retrieves existing distribution policies", + "operationId": "JobRouter_ListDistributionPolicies", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "maxpagesize", + "description": "Maximum page size", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DistributionPolicyCollection" + } + } + }, + "x-ms-examples": { + "Get Distribution policies with pagination (max page size)": { + "$ref": "./examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/routing/distributionPolicies/{id}": { + "patch": { + "tags": [ + "DistributionPolicies" + ], + "summary": "Updates a distribution policy.", + "operationId": "JobRouter_PatchDistributionPolicy", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the distribution policy", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patch", + "description": "Model of distribution policy properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", + "schema": { + "$ref": "#/definitions/DistributionPolicy" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DistributionPolicy" + } + } + }, + "x-ms-examples": { + "Update a Distribution policy": { + "$ref": "./examples/DistributionPolicies_PatchDistributionPolicy.json" + } + } + }, + "get": { + "tags": [ + "DistributionPolicies" + ], + "summary": "Retrieves an existing distribution policy by Id", + "operationId": "JobRouter_GetDistributionPolicy", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the distribution policy", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DistributionPolicy" + } + } + }, + "x-ms-examples": { + "Get a single Distribution policy": { + "$ref": "./examples/DistributionPolicies_GetDistributionPolicy.json" + } + } + }, + "delete": { + "tags": [ + "DistributionPolicies" + ], + "summary": "Delete a distribution policy by Id", + "operationId": "JobRouter_DeleteDistributionPolicy", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the distribution policy", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Delete a Distribution policy": { + "$ref": "./examples/DistributionPolicies_DeleteDistributionPolicy.json" + } + } + } + }, + "/routing/exceptionPolicies": { + "post": { + "tags": [ + "ExceptionPolicies" + ], + "summary": "Creates an exception policy", + "operationId": "JobRouter_CreateExceptionPolicyV2", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "repeatability-request-id", + "type": "string" + }, + { + "in": "header", + "name": "repeatability-first-sent", + "type": "string" + }, + { + "in": "body", + "name": "exceptionPolicy", + "description": "Model of exception policy to be created", + "required": true, + "schema": { + "$ref": "#/definitions/ExceptionPolicy" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ExceptionPolicy" + } + } + }, + "x-ms-examples": { + "Create a Exception policy": { + "$ref": "./examples/ExceptionPolicies_CreateExceptionPolicy.json" + } + } + }, + "get": { + "tags": [ + "ExceptionPolicies" + ], + "summary": "Retrieves existing exception policies", + "operationId": "JobRouter_ListExceptionPolicies", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ExceptionPolicyCollection" + } + } + }, + "x-ms-examples": { + "Get Exception policies with pagination (max page size)": { + "$ref": "./examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/routing/exceptionPolicies/{id}": { + "patch": { + "tags": [ + "ExceptionPolicies" + ], + "summary": "Updates an exception policy", + "operationId": "JobRouter_PatchExceptionPolicyV2", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the exception policy", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patchExceptionPolicy", + "description": "Model of exception policy to be updated", + "schema": { + "$ref": "#/definitions/ExceptionPolicy" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ExceptionPolicy" + } + } + }, + "x-ms-examples": { + "Update a Exception policy": { + "$ref": "./examples/ExceptionPolicies_PatchExceptionPolicy.json" + } + } + }, + "get": { + "tags": [ + "ExceptionPolicies" + ], + "summary": "Retrieves an existing exception policy by Id", + "operationId": "JobRouter_GetExceptionPolicy", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the exception policy to retrieve", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ExceptionPolicy" + } + } + }, + "x-ms-examples": { + "Get a single Exception policy": { + "$ref": "./examples/ExceptionPolicies_GetExceptionPolicy.json" + } + } + }, + "delete": { + "tags": [ + "ExceptionPolicies" + ], + "summary": "Deletes a exception policy by Id", + "operationId": "JobRouter_DeleteExceptionPolicy", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the exception policy to delete", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Delete a Exception policy": { + "$ref": "./examples/ExceptionPolicies_DeleteExceptionPolicy.json" + } + } + } + }, + "/routing/jobs": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Creates a new job to be routed.", + "operationId": "JobRouter_CreateJobV2", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "repeatability-request-id", + "type": "string" + }, + { + "in": "header", + "name": "repeatability-first-sent", + "type": "string" + }, + { + "in": "body", + "name": "routerJob", + "description": "Model of job to be created", + "required": true, + "schema": { + "$ref": "#/definitions/RouterJob" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterJob" + } + } + }, + "x-ms-examples": { + "Creates a new Job": { + "$ref": "./examples/Jobs_CreateJob.json" + } + } + }, + "get": { + "tags": [ + "Jobs" + ], + "summary": "Retrieves list of jobs based on filter parameters", + "operationId": "JobRouter_ListJobs", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "status", + "description": "(Optional) If specified, filter jobs by status.", + "type": "string", + "default": "all", + "enum": [ + "all", + "pendingClassification", + "queued", + "assigned", + "completed", + "closed", + "cancelled", + "classificationFailed", + "active" + ], + "x-ms-enum": { + "name": "JobStateSelector", + "modelAsString": false + } + }, + { + "in": "query", + "name": "queueId", + "description": "(Optional) If specified, filter jobs by queue.", + "type": "string" + }, + { + "in": "query", + "name": "channelId", + "description": "(Optional) If specified, filter jobs by channel.", + "type": "string" + }, + { + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobCollection" + } + } + }, + "x-ms-examples": { + "Gets a list of jobs with pagination (max page size)": { + "$ref": "./examples/Jobs_GetJobsWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/routing/jobs/{id}": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Retrieves an existing job by Id", + "operationId": "JobRouter_GetJob", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job to retrieve", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterJob" + } + } + }, + "x-ms-examples": { + "Get a single Job": { + "$ref": "./examples/Jobs_GetJob.json" + } + } + }, + "patch": { + "tags": [ + "Jobs" + ], + "summary": "Update job by id.", + "operationId": "JobRouter_UpdateJob", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "forceClassification", + "description": "If set to true, will force classification. Defaults to false.", + "type": "boolean", + "default": false + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patch", + "description": "Request model for patching a job", + "schema": { + "$ref": "#/definitions/RouterJob" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterJob" + } + } + }, + "x-ms-examples": { + "Update a job": { + "$ref": "./examples/Jobs_UpdateJob.json" + } + } + } + }, + "/routing/jobs/{id}:cancel": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Submits request to cancel an existing job by Id while supplying free-form cancellation reason.", + "operationId": "JobRouter_CancelJobAction", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "cancelJobRequest", + "description": "Request model for cancelling job", + "schema": { + "$ref": "#/definitions/CancelJobRequest" + }, + "x-ms-client-flatten": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/CancelJobResponse" + } + } + }, + "x-ms-examples": { + "Cancels a job": { + "$ref": "./examples/Jobs_RequestJobCancel.json" + } + } + } + }, + "/routing/jobs/{id}:complete": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Completes an assigned job.", + "operationId": "JobRouter_CompleteJobAction", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "completeJobRequest", + "description": "Request model for completing job", + "schema": { + "$ref": "#/definitions/CompleteJobRequest" + }, + "x-ms-client-flatten": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/CompleteJobResponse" + } + } + }, + "x-ms-examples": { + "Completes a job": { + "$ref": "./examples/Jobs_CompleteJob.json" + } + } + } + }, + "/routing/jobs/{id}:close": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Closes a completed job.", + "operationId": "JobRouter_CloseJobAction", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "closeJobRequest", + "description": "Request model for closing job", + "schema": { + "$ref": "#/definitions/CloseJobRequest" + }, + "x-ms-client-flatten": true + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/CloseJobResponse" + } + } + }, + "x-ms-examples": { + "Closes a job": { + "$ref": "./examples/Jobs_CloseJob.json" + } + } + } + }, + "/routing/jobs/{id}/position": { + "get": { + "tags": [ + "Jobs" + ], + "summary": "Gets a job's position details.", + "operationId": "JobRouter_GetInQueuePosition", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobPositionDetails" + } + } + }, + "x-ms-examples": { + "Gets a job position in a queue": { + "$ref": "./examples/Jobs_GetInQueuePosition.json" + } + } + } + }, + "/routing/jobs/{id}:delete": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Deletes a job and all of its traces.", + "operationId": "JobRouter_DeleteJob", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Deletes a job and all of its traces": { + "$ref": "./examples/Jobs_DeleteJob.json" + } + } + } + }, + "/routing/workers/{workerId}/offers/{offerId}:accept": { + "post": { + "tags": [ + "Offers" + ], + "summary": "Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already.", + "operationId": "JobRouter_AcceptJobAction", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "offerId", + "description": "Id of the offer", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "workerId", + "description": "Id of the worker", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/AcceptJobOfferResponse" + } + } + }, + "x-ms-examples": { + "Accept a Job Offer": { + "$ref": "./examples/Offers_AcceptJobOffer.json" + } + } + } + }, + "/routing/workers/{workerId}/offers/{offerId}:decline": { + "post": { + "tags": [ + "Offers" + ], + "summary": "Declines an offer to work on a job.", + "operationId": "JobRouter_DeclineJobAction", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "offerId", + "description": "Id of the offer", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "workerId", + "description": "Id of the worker", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/DeclineJobOfferResponse" + } + } + }, + "x-ms-examples": { + "Decline a Job Offer": { + "$ref": "./examples/Offers_DeclineJobOffer.json" + } + } + } + }, + "/routing/queues": { + "post": { + "tags": [ + "Queues" + ], + "summary": "Creates a queue.", + "operationId": "JobRouter_CreateQueue", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "repeatability-request-id", + "type": "string" + }, + { + "in": "header", + "name": "repeatability-first-sent", + "type": "string" + }, + { + "in": "body", + "name": "jobQueue", + "description": "Model of queue to be created", + "required": true, + "schema": { + "$ref": "#/definitions/JobQueue" + } + } + ], + "responses": { + "201": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobQueue" + } + } + }, + "x-ms-examples": { + "Create a Queue": { + "$ref": "./examples/Queues_CreateQueue.json" + } + } + }, + "get": { + "tags": [ + "Queues" + ], + "summary": "Retrieves existing queues", + "operationId": "JobRouter_ListQueues", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/QueueCollection" + } + } + }, + "x-ms-examples": { + "Get Queues with pagination (max page size)": { + "$ref": "./examples/Queues_ListQueuesWithPageSize.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/routing/queues/{id}": { + "patch": { + "tags": [ + "Queues" + ], + "summary": "Updates a queue.", + "operationId": "JobRouter_UpdateQueue", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the queue", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patch", + "description": "Model of queue properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", + "schema": { + "$ref": "#/definitions/JobQueue" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobQueue" + } + } + }, + "x-ms-examples": { + "Create or Update a Queue": { + "$ref": "./examples/Queues_UpdateQueue.json" + } + } + }, + "get": { + "tags": [ + "Queues" + ], + "summary": "Retrieves an existing queue by Id", + "operationId": "JobRouter_GetQueue", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the queue to retrieve", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/JobQueue" + } + } + }, + "x-ms-examples": { + "Get a single Queue": { + "$ref": "./examples/Queues_GetQueue.json" + } + } + }, + "delete": { + "tags": [ + "Queues" + ], + "summary": "Deletes a queue by Id", + "operationId": "JobRouter_DeleteQueue", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the queue to delete", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Delete a Queue": { + "$ref": "./examples/Queues_DeleteQueue.json" + } + } + } + }, + "/routing/queues/{id}/statistics": { + "get": { + "tags": [ + "Queues" + ], + "summary": "Retrieves a queue's statistics", + "operationId": "JobRouter_GetQueueStatistics", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the queue to retrieve statistics", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/QueueStatistics" + } + } + }, + "x-ms-examples": { + "Get a single Queue": { + "$ref": "./examples/Queues_GetQueueStatistics.json" + } + } + } + }, + "/routing/workers": { + "post": { + "tags": [ + "Workers" + ], + "summary": "Create a worker to process jobs.", + "operationId": "JobRouter_CreateWorker", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "header", + "name": "repeatability-request-id", + "type": "string" + }, + { + "in": "header", + "name": "repeatability-first-sent", + "type": "string" + }, + { + "in": "body", + "name": "routerWorker", + "description": "Request to create a worker", + "required": true, + "schema": { + "$ref": "#/definitions/RouterWorker" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterWorker" + } + } + }, + "x-ms-examples": { + "Create a Worker": { + "$ref": "./examples/Workers_CreateWorker.json" + } + } + }, + "get": { + "tags": [ + "Workers" + ], + "summary": "Retrieves existing workers.", + "operationId": "JobRouter_ListWorkers", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "status", + "description": "(Optional) If specified, select workers by worker status.", + "type": "string", + "default": "all", + "enum": [ + "active", + "draining", + "inactive", + "all" + ], + "x-ms-enum": { + "name": "WorkerStateSelector", + "modelAsString": false + } + }, + { + "in": "query", + "name": "channelId", + "description": "(Optional) If specified, select workers who have a channel configuration with this channel", + "type": "string" + }, + { + "in": "query", + "name": "queueId", + "description": "(Optional) If specified, select workers who are assigned to this queue", + "type": "string" + }, + { + "in": "query", + "name": "hasCapacity", + "description": "(Optional) If set to true, select only workers who have capacity for the channel specified by `channelId` or for any channel\r\n if `channelId` not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false.", + "type": "boolean" + }, + { + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/WorkerCollection" + } + } + }, + "x-ms-examples": { + "List workers with pagination (max page size)": { + "$ref": "./examples/Workers_GetWorkersWithPageSize.json" + }, + "List available Workers by channel": { + "$ref": "./examples/Workers_GetAvailableWorkersByChannel.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } + }, + "/routing/workers/{workerId}": { + "patch": { + "tags": [ + "Workers" + ], + "summary": "Updates a worker.", + "operationId": "JobRouter_UpdateWorker", + "consumes": [ + "application/merge-patch+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workerId", + "description": "Id of the worker", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patch", + "description": "Model of worker properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", + "schema": { + "$ref": "#/definitions/RouterWorker" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterWorker" + } + } + }, + "x-ms-examples": { + "Update a Worker properties": { + "$ref": "./examples/Workers_UpdateWorker.json" + }, + "Register a Worker": { + "$ref": "./examples/Workers_RegisterWorker.json" + }, + "Deregister an active Worker": { + "$ref": "./examples/Workers_DeregisterActiveWorker.json" + }, + "Deregister a inactive Worker": { + "$ref": "./examples/Workers_DeregisterInactiveWorker.json" + } + } + }, + "get": { + "tags": [ + "Workers" + ], + "summary": "Retrieves an existing worker by Id", + "operationId": "JobRouter_GetWorker", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workerId", + "description": "Id of the worker to retrieve", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterWorker" + } + } + }, + "x-ms-examples": { + "Get a single Worker": { + "$ref": "./examples/Workers_GetWorker.json" + } + } + } + }, + "/routing/workers/{workerId}/assignments/{assignmentId}:release": { + "post": { + "tags": [ + "Workers" + ], + "summary": "Releases capacity consumed by an assignment within a workers socket collection.", + "operationId": "JobRouter_ReleaseAssignmentAction", + "consumes": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "workerId", + "description": "Id of the worker to release assignment capacity", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "assignmentId", + "description": "Id of the assignment to release capacity", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "releaseAssignmentRequest", + "description": "Request to release assignment", + "schema": { + "$ref": "#/definitions/ReleaseAssignmentRequest" + } + } + ], + "responses": { + "200": { + "description": "Success" + } + }, + "x-ms-examples": { + "Release a Worker's Assignment": { + "$ref": "./examples/Workers_ReleaseAssignment.json" + } + } + } + }, + "/routing/workers/{workerId}:delete": { + "post": { + "tags": [ + "Workers" + ], + "summary": "Deletes a worker and all of its traces.", + "operationId": "JobRouter_DeleteWorker", + "parameters": [ + { + "in": "path", + "name": "workerId", + "description": "Id of the worker to delete", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Delete a Worker and all of its traces": { + "$ref": "./examples/Workers_DeleteWorker.json" + } + } + } + } + }, + "definitions": { + "AcceptJobOfferResponse": { + "required": [ + "assignmentId", + "jobId", + "workerId" + ], + "type": "object", + "properties": { + "assignmentId": { + "description": "The assignment Id that assigns a worker that has accepted an offer to a job.", + "type": "string" + }, + "jobId": { + "description": "The Id of the job assigned.", + "type": "string" + }, + "workerId": { + "description": "The Id of the worker that has been assigned this job.", + "type": "string" + } + } + }, + "AzureFunctionRule": { + "description": "A rule providing a binding to an HTTP Triggered Azure Function.", + "required": [ + "functionUrl" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RouterRule" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "functionUrl": { + "format": "uri", + "description": "URL for Azure Function", + "type": "string" + }, + "credential": { + "$ref": "#/definitions/AzureFunctionRuleCredential" + } + }, + "x-ms-discriminator-value": "azure-function-rule" + }, + "AzureFunctionRuleCredential": { + "description": "Credentials used to access Azure function rule", + "type": "object", + "properties": { + "functionKey": { + "description": "(Optional) Access key scoped to a particular function", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "appKey": { + "description": "(Optional) Access key scoped to a Azure Function app.\r\nThis key grants access to all functions under the app.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "clientId": { + "description": "(Optional) Client id, when AppKey is provided\r\nIn context of Azure function, this is usually the name of the key", + "maxLength": 500, + "minLength": 0, + "type": "string" + } + } + }, + "BestWorkerMode": { + "description": "Jobs are distributed to the worker with the strongest abilities available.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DistributionMode" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "scoringRule": { + "description": "(Optional)\r\nDefine a scoring rule to use, when calculating a score to determine the best worker.\r\nIf not set, will use a default scoring formula that uses the number of job labels that the worker\r\nlabels match, as well as the number of label selectors the worker labels match and/or exceed\r\nusing a logistic function (https://en.wikipedia.org/wiki/Logistic_function).", + "x-nullable": true + }, + "scoringRuleOptions": { + "$ref": "#/definitions/ScoringRuleOptions" + } + }, + "x-ms-discriminator-value": "best-worker" + }, + "CancelExceptionAction": { + "description": "An action that marks a job as cancelled", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ExceptionAction" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "note": { + "description": "(Optional) A note that will be appended to the jobs' Notes collection with th current timestamp.", + "maxLength": 2000, + "minLength": 0, + "type": "string" + }, + "dispositionCode": { + "description": "(Optional) Indicates the outcome of the job, populate this field with your own custom values.", + "maxLength": 500, + "minLength": 0, + "type": "string" + } + }, + "x-ms-discriminator-value": "cancel" + }, + "CancelJobRequest": { + "description": "Request payload for deleting a job", + "type": "object", + "properties": { + "note": { + "description": "(Optional) A note that will be appended to the jobs' Notes collection with th current timestamp.", + "maxLength": 2000, + "minLength": 0, + "type": "string" + }, + "dispositionCode": { + "description": "Indicates the outcome of the job, populate this field with your own custom values.\r\nIf not provided, default value of \"Cancelled\" is set.", + "maxLength": 500, + "minLength": 0, + "type": "string" + } + } + }, + "CancelJobResponse": { + "type": "object" + }, + "ChannelConfiguration": { + "required": [ + "capacityCostPerJob" + ], + "type": "object", + "properties": { + "capacityCostPerJob": { + "format": "int32", + "description": "The amount of capacity that an instance of a job of this channel will consume of the total worker capacity.", + "type": "integer" + } + } + }, + "ClassificationPolicy": { + "description": "A container for the rules that govern how jobs are classified.", + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of this policy.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Friendly name of this policy.", + "type": "string" + }, + "fallbackQueueId": { + "description": "The fallback queue to select if the queue selector doesn't find a match.", + "type": "string" + }, + "queueSelectors": { + "description": "The queue selectors to resolve a queue for a given job.", + "type": "array", + "items": { }, + "x-nullable": true + }, + "prioritizationRule": { + "description": "The rule to determine a priority score for a given job.", + "x-nullable": true + }, + "workerSelectors": { + "description": "The worker label selectors to attach to a given job.", + "type": "array", + "items": { }, + "x-nullable": true + } + } + }, + "ClassificationPolicyCollection": { + "description": "A paged collection of classification policies.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PagedClassificationPolicy" + } + }, + "nextLink": { + "type": "string", + "readOnly": true + } + } + }, + "CloseJobRequest": { + "description": "Request payload for completing jobs", + "required": [ + "assignmentId" + ], + "type": "object", + "properties": { + "assignmentId": { + "description": "The assignment within which the job is to be closed.", + "maxLength": 50, + "minLength": 0, + "type": "string" + }, + "dispositionCode": { + "description": "Indicates the outcome of the job, populate this field with your own custom values.", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "releaseTime": { + "format": "date-time", + "description": "If not provided, capacity will be released immediately.\r\nIf provided, the future time at which to release the capacity.", + "type": "string", + "x-nullable": true + }, + "note": { + "description": "(Optional) A note that will be appended to the jobs' Notes collection with th current timestamp.", + "maxLength": 2000, + "minLength": 0, + "type": "string" + } + } + }, + "CloseJobResponse": { + "type": "object" + }, + "CompleteJobRequest": { + "description": "Request payload for completing jobs", + "required": [ + "assignmentId" + ], + "type": "object", + "properties": { + "assignmentId": { + "description": "The assignment within the job to complete.", + "maxLength": 50, + "minLength": 0, + "type": "string" + }, + "note": { + "description": "(Optional) A note that will be appended to the jobs' Notes collection with th current timestamp.", + "maxLength": 2000, + "minLength": 0, + "type": "string" + } + } + }, + "CompleteJobResponse": { + "type": "object" + }, + "ConditionalLabelSelector": { + "description": "Describes a set of label selectors that will be attached if the given condition resolves to true", + "required": [ + "condition", + "labelSelectors" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabelSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "condition": { + "description": "The condition that must be true for the label selectors to be attached" + }, + "labelSelectors": { + "description": "The label selectors to attach", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + } + } + }, + "x-ms-discriminator-value": "conditional" + }, + "DeclineJobOfferResponse": { + "type": "object" + }, + "DirectMapRule": { + "description": "A rule that return the same labels as the input labels.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RouterRule" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + } + }, + "x-ms-discriminator-value": "direct-map-rule" + }, + "DistributionMode": { + "description": "Abstract base class for defining a distribution mode", + "required": [ + "kind", + "maxConcurrentOffers", + "minConcurrentOffers" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing a sub-type of Mode", + "type": "string" + }, + "minConcurrentOffers": { + "format": "int32", + "description": "Governs the minimum desired number of active concurrent offers a job can have.", + "type": "integer" + }, + "maxConcurrentOffers": { + "format": "int32", + "description": "Governs the maximum number of active concurrent offers a job can have.", + "type": "integer" + }, + "bypassSelectors": { + "description": "(Optional)\r\nIf set to true, then router will match workers to jobs even if they don't match label selectors.\r\nWarning: You may get workers that are not qualified for the job they are matched with if you set this\r\nvariable to true. This flag is intended more for temporary usage.\r\nBy default, set to false.", + "type": "boolean", + "x-nullable": true + } + }, + "discriminator": "kind" + }, + "DistributionPolicy": { + "description": "Policy governing how jobs are distributed to workers", + "required": [ + "mode", + "offerTTL" + ], + "type": "object", + "properties": { + "id": { + "description": "The unique identifier of the policy.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The human readable name of the policy.", + "type": "string" + }, + "offerTTL": { + "description": "The expiry time of any offers created under this policy will be governed by the offer time to live. Requires input conforming to ISO8601 duration format.", + "type": "string" + }, + "mode": { + "description": "The policy governing the specific distribution method." + } + } + }, + "DistributionPolicyCollection": { + "description": "A paged collection of distribution policies.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PagedDistributionPolicy" + } + }, + "nextLink": { + "type": "string", + "readOnly": true + } + } + }, + "ExceptionAction": { + "description": "The action to take when the exception is triggered", + "required": [ + "kind" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing a sub-type of ExceptionAction", + "type": "string" + } + }, + "discriminator": "kind" + }, + "ExceptionPolicy": { + "description": "A policy that defines actions to execute when exception are triggered.", + "type": "object", + "properties": { + "id": { + "description": "The Id of the exception policy", + "type": "string", + "readOnly": true + }, + "name": { + "description": "(Optional) The name of the exception policy.", + "type": "string" + }, + "exceptionRules": { + "description": "(Optional) A dictionary collection of exception rules on the exception policy. Key is the Id of each exception rule.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ExceptionRule" + }, + "x-nullable": true + } + } + }, + "ExceptionPolicyCollection": { + "description": "A paged collection of exception policies.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PagedExceptionPolicy" + } + }, + "nextLink": { + "type": "string", + "readOnly": true + } + } + }, + "ExceptionRule": { + "description": "A rule that defines actions to execute upon a specific trigger.", + "required": [ + "actions", + "trigger" + ], + "type": "object", + "properties": { + "trigger": { + "description": "The exception trigger for this exception rule" + }, + "actions": { + "description": "A dictionary collection of actions to perform once the exception is triggered. Key is the Id of each exception action.", + "type": "object", + "additionalProperties": { + "description": "The action to take when the exception is triggered" + } + } + } + }, + "ExpressionRule": { + "description": "A rule providing inline expression rules.", + "required": [ + "expression", + "language" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RouterRule" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "language": { + "description": "The expression language to compile to and execute", + "enum": [ + "powerFx" + ], + "type": "string", + "x-ms-enum": { + "name": "ExpressionLanguage", + "modelAsString": false + } + }, + "expression": { + "description": "The string containing the expression to evaluate. Should contain return statement with calculated values.", + "maxLength": 500, + "minLength": 0, + "type": "string" + } + }, + "x-ms-discriminator-value": "expression-rule" + }, + "JobAssignment": { + "required": [ + "assignTime", + "id" + ], + "type": "object", + "properties": { + "id": { + "description": "The Id of the job assignment.", + "type": "string" + }, + "workerId": { + "description": "The Id of the Worker assigned to the job.", + "type": "string" + }, + "assignTime": { + "format": "date-time", + "description": "The assignment time of the job.", + "type": "string" + }, + "completeTime": { + "format": "date-time", + "description": "The time the job was marked as completed after being assigned.", + "type": "string", + "x-nullable": true + }, + "closeTime": { + "format": "date-time", + "description": "The time the job was marked as closed after being completed.", + "type": "string", + "x-nullable": true + } + } + }, + "JobCollection": { + "description": "A paged collection of jobs.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PagedJob" + } + }, + "nextLink": { + "type": "string", + "readOnly": true + } + } + }, + "JobExceptionTrigger": { + "description": "The trigger for this exception rule", + "required": [ + "kind" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing a sub-type of ExceptionTrigger", + "type": "string" + } + }, + "discriminator": "kind" + }, + "JobOffer": { + "required": [ + "capacityCost", + "id", + "jobId" + ], + "type": "object", + "properties": { + "id": { + "description": "The Id of the offer.", + "type": "string" + }, + "jobId": { + "description": "The Id of the job.", + "type": "string" + }, + "capacityCost": { + "format": "int32", + "description": "The capacity cost consumed by the job offer.", + "type": "integer" + }, + "offerTimeUtc": { + "format": "date-time", + "description": "The time the offer was created.", + "type": "string", + "x-nullable": true + }, + "expiryTimeUtc": { + "format": "date-time", + "description": "The time that the offer will expire.", + "type": "string", + "x-nullable": true + } + } + }, + "JobPositionDetails": { + "description": "Dto for JobPositionDetails.", + "required": [ + "estimatedWaitTimeMinutes", + "jobId", + "position", + "queueId", + "queueLength" + ], + "type": "object", + "properties": { + "jobId": { + "description": "Id of the job these details are about.", + "type": "string" + }, + "position": { + "format": "int32", + "description": "Position of the job in question within that queue.", + "type": "integer" + }, + "queueId": { + "description": "Id of the queue this job is enqueued in.", + "type": "string" + }, + "queueLength": { + "format": "int32", + "description": "Length of the queue: total number of enqueued jobs.", + "type": "integer" + }, + "estimatedWaitTimeMinutes": { + "format": "double", + "description": "Estimated wait time of the job rounded up to the nearest minute", + "type": "number" + } + } + }, + "JobQueue": { + "description": "A queue that can contain jobs to be routed.", + "required": [ + "distributionPolicyId" + ], + "type": "object", + "properties": { + "id": { + "description": "The Id of this queue", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of this queue.", + "type": "string" + }, + "distributionPolicyId": { + "description": "The ID of the distribution policy that will determine how a job is distributed to workers.", + "type": "string" + }, + "labels": { + "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "exceptionPolicyId": { + "description": "(Optional) The ID of the exception policy that determines various job escalation rules.", + "type": "string" + } + } + }, + "LabelSelector": { + "description": "Describes a condition that must be met against a set of labels", + "required": [ + "key", + "labelOperator" + ], + "type": "object", + "properties": { + "key": { + "description": "The label key to query against", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "labelOperator": { + "description": "Describes how the value of the label is compared to the value defined on the label selector", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanEqual", + "greaterThan", + "greaterThanEqual" + ], + "type": "string", + "x-ms-enum": { + "name": "LabelOperator", + "modelAsString": false + } + }, + "value": { + "description": "The value to compare against the actual label value with the given operator", + "x-nullable": true + }, + "ttl": { + "description": "Describes how long this label selector is valid. Requires input conforming to ISO8601 duration format.", + "type": "string", + "x-nullable": true + } + } + }, + "LabelSelectorAttachment": { + "required": [ + "kind" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing the type of label selector attachment", + "type": "string" + } + }, + "discriminator": "kind" + }, + "LongestIdleMode": { + "description": "Jobs are directed to the worker who has been idle longest.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DistributionMode" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + } + }, + "x-ms-discriminator-value": "longest-idle" + }, + "ManualReclassifyExceptionAction": { + "description": "An action that manually reclassifies a job by providing the queue, priority and worker selectors.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ExceptionAction" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "queueId": { + "description": "Updated QueueId.", + "maxLength": 50, + "minLength": 0, + "type": "string" + }, + "priority": { + "format": "int32", + "description": "Updated Priority.", + "type": "integer", + "x-nullable": true + }, + "workerSelectors": { + "description": "Updated WorkerSelectors.", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + }, + "x-nullable": true + } + }, + "x-ms-discriminator-value": "manual-reclassify" + }, + "PagedClassificationPolicy": { + "type": "object", + "properties": { + "id": { + "description": "Unique identifier of this policy.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Friendly name of this policy.", + "type": "string" + }, + "fallbackQueueId": { + "description": "The fallback queue to select if the queue selector doesn't find a match.", + "type": "string" + }, + "queueSelectors": { + "description": "The queue selectors to resolve a queue for a given job.", + "type": "array", + "items": { }, + "x-nullable": true + }, + "prioritizationRule": { + "description": "The rule to determine a priority score for a given job.", + "x-nullable": true + }, + "workerSelectors": { + "description": "The worker label selectors to attach to a given job.", + "type": "array", + "items": { }, + "x-nullable": true + } + } + }, + "PagedDistributionPolicy": { + "required": [ + "mode", + "offerTTL" + ], + "type": "object", + "properties": { + "id": { + "description": "The unique identifier of the policy.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The human readable name of the policy.", + "type": "string" + }, + "offerTTL": { + "description": "The expiry time of any offers created under this policy will be governed by the offer time to live. Requires input conforming to ISO8601 duration format.", + "type": "string" + }, + "mode": { + "description": "The policy governing the specific distribution method." + } + } + }, + "PagedExceptionPolicy": { + "type": "object", + "properties": { + "id": { + "description": "The Id of the exception policy", + "type": "string", + "readOnly": true + }, + "name": { + "description": "(Optional) The name of the exception policy.", + "type": "string" + }, + "exceptionRules": { + "description": "(Optional) A dictionary collection of exception rules on the exception policy. Key is the Id of each exception rule.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ExceptionRule" + }, + "x-nullable": true + } + } + }, + "PagedJob": { + "required": [ + "channelId" + ], + "type": "object", + "properties": { + "id": { + "description": "The id of the job.", + "type": "string", + "readOnly": true + }, + "channelReference": { + "description": "Reference to an external parent context, eg. call ID.", + "type": "string" + }, + "jobStatus": { + "description": "The state of the Job.", + "enum": [ + "pendingClassification", + "queued", + "assigned", + "completed", + "closed", + "cancelled", + "classificationFailed" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": false + } + }, + "enqueueTimeUtc": { + "format": "date-time", + "description": "The time a job was queued.", + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "channelId": { + "description": "The channel identifier. eg. voice, chat, etc.", + "type": "string" + }, + "classificationPolicyId": { + "description": "The Id of the Classification policy used for classifying a job.", + "type": "string" + }, + "queueId": { + "description": "The Id of the Queue that this job is queued to.", + "type": "string" + }, + "priority": { + "format": "int32", + "description": "The priority of this job.", + "type": "integer", + "x-nullable": true + }, + "dispositionCode": { + "description": "Reason code for cancelled or closed jobs.", + "type": "string" + }, + "requestedWorkerSelectors": { + "description": "A collection of manually specified label selectors, which a worker must satisfy in order to process this job.", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + }, + "x-nullable": true + }, + "attachedWorkerSelectors": { + "description": "A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job.", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + }, + "readOnly": true, + "x-nullable": true + }, + "labels": { + "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "assignments": { + "description": "A collection of the assignments of the job.\r\nKey is AssignmentId.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/JobAssignment" + }, + "readOnly": true, + "x-nullable": true + }, + "tags": { + "description": "A set of non-identifying attributes attached to this job", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "notes": { + "description": "Notes attached to a job, sorted by timestamp", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-nullable": true + } + } + }, + "PagedQueue": { + "required": [ + "distributionPolicyId" + ], + "type": "object", + "properties": { + "id": { + "description": "The Id of this queue", + "type": "string", + "readOnly": true + }, + "name": { + "description": "The name of this queue.", + "type": "string" + }, + "distributionPolicyId": { + "description": "The ID of the distribution policy that will determine how a job is distributed to workers.", + "type": "string" + }, + "labels": { + "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "exceptionPolicyId": { + "description": "(Optional) The ID of the exception policy that determines various job escalation rules.", + "type": "string" + } + } + }, + "PagedWorker": { + "required": [ + "totalCapacity" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "state": { + "description": "The current state of the worker.", + "enum": [ + "active", + "draining", + "inactive" + ], + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "queueAssignments": { + "description": "The queue(s) that this worker can receive work from.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/QueueAssignment" + }, + "x-nullable": true + }, + "totalCapacity": { + "format": "int32", + "description": "The total capacity score this worker has to manage mulitple concurrent jobs.", + "type": "integer" + }, + "labels": { + "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "tags": { + "description": "A set of non-identifying attributes attached to this worker.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "channelConfigurations": { + "description": "The channel(s) this worker can handle and their impact on the workers capacity.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ChannelConfiguration" + }, + "x-nullable": true + }, + "offers": { + "description": "A list of active offers issued to this worker.", + "type": "array", + "items": { + "$ref": "#/definitions/JobOffer" + }, + "readOnly": true, + "x-nullable": true + }, + "assignedJobs": { + "description": "A list of assigned jobs attached to this worker.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkerAssignment" + }, + "readOnly": true, + "x-nullable": true + }, + "loadRatio": { + "format": "double", + "description": "A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed.", + "type": "number", + "readOnly": true, + "x-nullable": true + }, + "availableForOffers": { + "description": "A flag indicating this worker is open to receive offers or not.", + "type": "boolean", + "x-nullable": true + } + } + }, + "PassThroughLabelSelector": { + "description": "Attaches a label selector where the value is pass through from the job label with the same key", + "required": [ + "key", + "labelOperator" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabelSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "key": { + "description": "The label key to query against", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "labelOperator": { + "description": "Describes how the value of the label is compared to the value pass through", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanEqual", + "greaterThan", + "greaterThanEqual" + ], + "type": "string", + "x-ms-enum": { + "name": "LabelOperator", + "modelAsString": false + } + }, + "ttl": { + "description": "Describes how long the attached label selector is valid. Requires input conforming to ISO8601 duration format.", + "type": "string", + "x-nullable": true + } + }, + "x-ms-discriminator-value": "pass-through" + }, + "QueueAssignment": { + "description": "An assignment of a worker to a queue", + "type": "object" + }, + "QueueCollection": { + "description": "A paged collection of queues.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PagedQueue" + } + }, + "nextLink": { + "type": "string", + "readOnly": true + } + } + }, + "QueueLengthExceptionTrigger": { + "description": "Trigger for an exception action on exceeding queue length", + "required": [ + "threshold" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JobExceptionTrigger" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "threshold": { + "format": "int32", + "description": "Threshold of number of jobs ahead in the queue to for this trigger to fire.", + "type": "integer" + } + }, + "x-ms-discriminator-value": "queue-length" + }, + "QueueStatistics": { + "description": "Statistics for the queue", + "required": [ + "length", + "queueId" + ], + "type": "object", + "properties": { + "queueId": { + "description": "Id of the queue these details are about.", + "type": "string" + }, + "length": { + "format": "int32", + "description": "Length of the queue: total number of enqueued jobs.", + "type": "integer" + }, + "estimatedWaitTimeMinutes": { + "description": "The estimated wait time of this queue rounded up to the nearest minute, grouped by job priority", + "type": "object", + "additionalProperties": { + "format": "double", + "type": "number" + }, + "x-nullable": true + } + } + }, + "ReclassifyExceptionAction": { + "description": "An action that modifies labels on a job and then reclassifies it", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ExceptionAction" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "classificationPolicyId": { + "description": "(optional) The new classification policy that will determine queue, priority and worker selectors.", + "maxLength": 50, + "minLength": 0, + "type": "string" + }, + "labelsToUpsert": { + "description": "(optional) Dictionary containing the labels to update (or add if not existing) in key-value pairs", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + } + }, + "x-ms-discriminator-value": "reclassify" + }, + "ReleaseAssignmentRequest": { + "type": "object", + "properties": { + "releaseTime": { + "format": "date-time", + "description": "If not provided, capacity will be released immediately.\r\nIf provided, the future time at which to release the capacity.", + "type": "string", + "x-nullable": true + } + } + }, + "RepeatabilityHeaders": { + "type": "object", + "properties": { + "repeatabilityRequestId": { + "type": "string" + }, + "repeatabilityFirstSent": { + "type": "string" + } + } + }, + "RoundRobinMode": { + "description": "Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/DistributionMode" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + } + }, + "x-ms-discriminator-value": "round-robin" + }, + "RouterJob": { + "description": "A unit of work to be routed", + "required": [ + "channelId" + ], + "type": "object", + "properties": { + "id": { + "description": "The id of the job.", + "type": "string", + "readOnly": true + }, + "channelReference": { + "description": "Reference to an external parent context, eg. call ID.", + "type": "string" + }, + "jobStatus": { + "description": "The state of the Job.", + "enum": [ + "pendingClassification", + "queued", + "assigned", + "completed", + "closed", + "cancelled", + "classificationFailed" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "JobStatus", + "modelAsString": false + } + }, + "enqueueTimeUtc": { + "format": "date-time", + "description": "The time a job was queued.", + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "channelId": { + "description": "The channel identifier. eg. voice, chat, etc.", + "type": "string" + }, + "classificationPolicyId": { + "description": "The Id of the Classification policy used for classifying a job.", + "type": "string" + }, + "queueId": { + "description": "The Id of the Queue that this job is queued to.", + "type": "string" + }, + "priority": { + "format": "int32", + "description": "The priority of this job.", + "type": "integer", + "x-nullable": true + }, + "dispositionCode": { + "description": "Reason code for cancelled or closed jobs.", + "type": "string" + }, + "requestedWorkerSelectors": { + "description": "A collection of manually specified label selectors, which a worker must satisfy in order to process this job.", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + }, + "x-nullable": true + }, + "attachedWorkerSelectors": { + "description": "A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job.", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + }, + "readOnly": true, + "x-nullable": true + }, + "labels": { + "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "assignments": { + "description": "A collection of the assignments of the job.\r\nKey is AssignmentId.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/JobAssignment" + }, + "readOnly": true, + "x-nullable": true + }, + "tags": { + "description": "A set of non-identifying attributes attached to this job", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "notes": { + "description": "Notes attached to a job, sorted by timestamp", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-nullable": true + } + } + }, + "RouterRule": { + "required": [ + "kind" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing a sub-type of Rule", + "type": "string" + } + }, + "discriminator": "kind" + }, + "RouterWorker": { + "required": [ + "totalCapacity" + ], + "type": "object", + "properties": { + "id": { + "type": "string", + "readOnly": true + }, + "state": { + "description": "The current state of the worker.", + "enum": [ + "active", + "draining", + "inactive" + ], + "type": "string", + "readOnly": true, + "x-nullable": true + }, + "queueAssignments": { + "description": "The queue(s) that this worker can receive work from.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/QueueAssignment" + }, + "x-nullable": true + }, + "totalCapacity": { + "format": "int32", + "description": "The total capacity score this worker has to manage mulitple concurrent jobs.", + "type": "integer" + }, + "labels": { + "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "tags": { + "description": "A set of non-identifying attributes attached to this worker.", + "type": "object", + "additionalProperties": { }, + "x-nullable": true + }, + "channelConfigurations": { + "description": "The channel(s) this worker can handle and their impact on the workers capacity.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/ChannelConfiguration" + }, + "x-nullable": true + }, + "offers": { + "description": "A list of active offers issued to this worker.", + "type": "array", + "items": { + "$ref": "#/definitions/JobOffer" + }, + "readOnly": true, + "x-nullable": true + }, + "assignedJobs": { + "description": "A list of assigned jobs attached to this worker.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkerAssignment" + }, + "readOnly": true, + "x-nullable": true + }, + "loadRatio": { + "format": "double", + "description": "A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed.", + "type": "number", + "readOnly": true, + "x-nullable": true + }, + "availableForOffers": { + "description": "A flag indicating this worker is open to receive offers or not.", + "type": "boolean", + "x-nullable": true + } + } + }, + "RuleEngineLabelSelector": { + "required": [ + "rule" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabelSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "rule": { + "description": "A RouterRule that resolves a collection of LabelSelector to attach" + } + }, + "x-ms-discriminator-value": "rule-engine" + }, + "ScoringRuleOptions": { + "description": "Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode", + "type": "object", + "properties": { + "batchSize": { + "format": "int32", + "description": "(Optional) Set batch size when AllowScoringBatchOfWorkers is set to true", + "type": "integer", + "x-nullable": true + }, + "scoringParameters": { + "description": "(Optional) List of extra parameters from the job that will be sent as part of the payload to scoring rule.\r\nIf not set, the job's labels (sent in the payload as `job`) and the job's worker selectors (sent in the payload as `selectors`)\r\nare added to the payload of the scoring rule by default.\r\nNote: Worker labels are always sent with scoring payload.", + "type": "array", + "items": { + "description": "Supported parameters for scoring workers", + "enum": [ + "jobLabels", + "labelSelectors" + ], + "type": "string", + "x-ms-enum": { + "name": "ScoringRuleParameterSelector", + "modelAsString": false + } + }, + "x-nullable": true + }, + "allowScoringBatchOfWorkers": { + "description": "(Optional)\r\nIf set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`.\r\nBy default, set to false and the parameter name for the worker labels will be sent as `worker`.\r\nNote: If enabled, use BatchSize to set batch size.", + "type": "boolean", + "x-nullable": true + }, + "descendingOrder": { + "description": "(Optional)\r\nIf false, will sort scores by ascending order. By default, set to true.", + "type": "boolean", + "x-nullable": true + } + } + }, + "StaticLabelSelector": { + "description": "Describes a label selector that will always be attached", + "required": [ + "labelSelector" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabelSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "labelSelector": { + "$ref": "#/definitions/LabelSelector" + } + }, + "x-ms-discriminator-value": "static" + }, + "StaticRule": { + "description": "A rule providing static rules that always return the same result, regardless of input.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/RouterRule" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "value": { + "description": "The static value this rule always returns.", + "maxLength": 500, + "minLength": 0, + "x-nullable": true + } + }, + "x-ms-discriminator-value": "static-rule" + }, + "WaitTimeExceptionTrigger": { + "description": "Trigger for an exception action on exceeding wait time", + "required": [ + "threshold" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/JobExceptionTrigger" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "threshold": { + "description": "Threshold for wait time for this trigger. Requires input conforming to ISO8601 duration format.", + "type": "string" + } + }, + "x-ms-discriminator-value": "wait-time" + }, + "WeightedAllocation": { + "description": "A percentage based allocation.", + "required": [ + "labelSelectors", + "weight" + ], + "type": "object", + "properties": { + "weight": { + "format": "double", + "description": "The percentage of this weight, expressed as a fraction of 1.", + "type": "number" + }, + "labelSelectors": { + "description": "A collection of label selectors that will be applied if this allocation is selected.", + "type": "array", + "items": { + "$ref": "#/definitions/LabelSelector" + } + } + } + }, + "WeightedAllocationLabelSelector": { + "description": "Describes multiple sets of label selectors, of which one will be selected and attached according to a weighting", + "required": [ + "allocations" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/LabelSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "allocations": { + "description": "A collection of percentage based weighted allocations.", + "type": "array", + "items": { + "$ref": "#/definitions/WeightedAllocation" + } + } + }, + "x-ms-discriminator-value": "weighted-allocation" + }, + "WorkerAssignment": { + "required": [ + "assignTime", + "capacityCost", + "id", + "jobId" + ], + "type": "object", + "properties": { + "id": { + "description": "The Id of the assignment.", + "type": "string" + }, + "jobId": { + "description": "The Id of the Job assigned.", + "type": "string" + }, + "capacityCost": { + "format": "int32", + "description": "The amount of capacity this assignment has consumed on the worker.", + "type": "integer" + }, + "assignTime": { + "format": "date-time", + "description": "The assignment time of the job.", + "type": "string" + } + } + }, + "WorkerCollection": { + "description": "A paged collection of workers.", + "required": [ + "value" + ], + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PagedWorker" + } + }, + "nextLink": { + "type": "string", + "readOnly": true + } + } + } + }, + "parameters": { + "ApiVersionParameter": { + "in": "query", + "name": "api-version", + "description": "Version of API to invoke.", + "type": "string", + "x-ms-parameter-location": "method" + }, + "Endpoint": { + "in": "path", + "name": "endpoint", + "description": "The endpoint of the Azure Communication resource.", + "required": true, + "type": "string", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + } + }, + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/Endpoint" + } + ] + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json new file mode 100644 index 000000000000..7e4d045acee1 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "classificationPolicy": { + "name": "Main", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "labelOperator": "equal", + "value": "bar" + } + ] + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + } + } + }, + "responses": { + "201": { + "body": { + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "name": "Main", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "labelOperator": "equal", + "value": "bar" + } + ] + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + }, + "workerSelectors": [] + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "Unknown discriminator static", + "target": "/routing/classificationpolicies/MainClassificationPolicy" + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The item was not found.", + "target": "/routing/classificationpolicies/MainClassificationPolicy222" + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "The item was in an unexpected state.", + "target": "/routing/classificationpolicies/MainClassificationPolicy2" + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "Service unavailable." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json new file mode 100644 index 000000000000..b0e33ee887c7 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json @@ -0,0 +1,77 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainClassificationPolicy" + }, + "responses": { + "204": {}, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "Validation failed because: variable used in URI path segments can only contain 0-9 A-Z a-z - . _ ~", + "target": "/routing/classificationpolicies" + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The item was not found.", + "target": "/routing/classificationpolicies/MainClassificationPolicy222" + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "The item was in an unexpected state.", + "target": "/routing/classificationpolicies/MainClassificationPolicy2" + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "Service unavailable." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json new file mode 100644 index 000000000000..af52b7e9c1d4 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainClassificationPolicy" + }, + "responses": { + "200": { + "body": { + "id": "MainClassificationPolicy", + "name": "Main", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "labelOperator": "equal", + "value": "bar" + } + ] + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + }, + "workerSelectors": [ + { + "kind": "pass-through", + "key": "language", + "operator": "equal" + } + ] + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "Unknown discriminator static", + "target": "/routing/classificationpolicies/MainClassificationPolicy" + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The item was not found.", + "target": "/routing/classificationpolicies/MainClassificationPolicy222" + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "The item was in an unexpected state.", + "target": "/routing/classificationpolicies/MainClassificationPolicy2" + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "Service unavailable." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json new file mode 100644 index 000000000000..09bcc33e7b8d --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "maxpagesize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "MainClassificationPolicy", + "name": "Main", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "rule", + "rule": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "If(job.Escalated = true, \"SecondaryQueue\", \"MainQueue\")" + } + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + }, + "workerSelectors": [] + }, + { + "id": "SecondaryClassificationPolicy", + "name": "Secondary", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "rule", + "rule": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "If(job.VIP = true, \"VIPQueue\", \"MainQueue\")" + } + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "1" + }, + "workerSelectors": [] + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json new file mode 100644 index 000000000000..ee634474eb1c --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json @@ -0,0 +1,107 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "patchClassificationPolicy": { + "name": "MainUpdate" + }, + "responses": { + "200": { + "body": { + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "name": "MainUpdate", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "operator": "equal", + "value": "bar" + } + ] + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + }, + "workerSelectors": [] + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "Unknown discriminator static", + "target": "/routing/classificationpolicies/MainClassificationPolicy" + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The item was not found.", + "target": "/routing/classificationpolicies/MainClassificationPolicy222" + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "The item was in an unexpected state.", + "target": "/routing/classificationpolicies/MainClassificationPolicy2" + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "Service unavailable." + } + } + } + } + } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json new file mode 100644 index 000000000000..c8776feef4d3 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "distributionPolicy": { + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 5, + "bypassSelectors": false + }, + "offerTTL": "00:05:00", + "name": "Main" + } + }, + "responses": { + "201": { + "body": { + "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", + "name": "Main", + "offerTTL": "00:05:00", + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 5, + "bypassSelectors": false + } + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json new file mode 100644 index 000000000000..a8d4a80212f4 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainDistributionPolicy" + }, + "responses": { + "204": {}, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json new file mode 100644 index 000000000000..25983b14ebf2 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json @@ -0,0 +1,86 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainDistributionPolicy" + }, + "responses": { + "200": { + "body": { + "id": "MainDistributionPolicy", + "name": "Main", + "offerTTL": "00:05:00", + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 5, + "bypassSelectors": false + } + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json new file mode 100644 index 000000000000..5269c9ea7f87 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "maxpagesize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "SecondaryDistributionPolicy", + "name": "Secondary", + "offerTTL": "00:03:00", + "mode": { + "kind": "round-robin", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 2, + "bypassSelectors": false + } + }, + { + "id": "MainDistributionPolicy", + "name": "Main", + "offerTTL": "00:05:00", + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 5, + "bypassSelectors": false + } + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json new file mode 100644 index 000000000000..461c896b1222 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", + "patch": { + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 5, + "bypassSelectors": false + }, + "offerTTL": "00:05:00", + "name": "Main" + } + }, + "responses": { + "200": { + "body": { + "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", + "name": "Main", + "offerTTL": "00:05:00", + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 5, + "bypassSelectors": false + } + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json new file mode 100644 index 000000000000..f70c7c2e01df --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20-preview2", + "exceptionPolicy": { + "name": "Main", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "actions": { + "MoveJobToEscalatedQueue": { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "escalated": true + } + } + }, + "trigger": { + "kind": "wait-time", + "threshold": "00:20:00" + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb", + "name": "Main", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "trigger": { + "kind": "wait-time", + "threshold": "00:20:00" + }, + "actions": { + "MoveJobToEscalatedQueue": { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "escalated": true + } + } + } + } + } + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json new file mode 100644 index 000000000000..169f16f9555d --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainExceptionPolicy" + }, + "responses": { + "204": {}, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json new file mode 100644 index 000000000000..8821b8d34250 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainExceptionPolicy" + }, + "responses": { + "200": { + "body": { + "id": "MainExceptionPolicy", + "name": "Main", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "trigger": { + "kind": "wait-time", + "threshold": "00:20:00" + }, + "actions": { + "MoveJobToEscalatedQueue": { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "escalated": true + } + } + } + } + } + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json new file mode 100644 index 000000000000..baeece696355 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "maxpagesize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "MainExceptionPolicy", + "name": "Main", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "trigger": { + "kind": "wait-time", + "threshold": "00:20:00" + }, + "actions": { + "MoveJobToEscalatedQueue": { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "escalated": true + } + } + } + } + } + }, + { + "id": "SecondaryExceptionPolicy", + "name": "Secondary", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "trigger": { + "kind": "wait-time", + "threshold": "00:50:00" + }, + "actions": [ + { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "VIP": true + } + } + ] + } + } + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json new file mode 100644 index 000000000000..d1a98be3b6ca --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json @@ -0,0 +1,116 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20-preview2", + "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb", + "patchExceptionPolicy": { + "name": "Main test", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "actions": { + "MoveJobToEscalatedQueue": { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "escalated": true + } + } + }, + "trigger": { + "kind": "wait-time", + "threshold": "00:20:00" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb", + "name": "Main test", + "exceptionRules": { + "MaxWaitTimeExceeded": { + "trigger": { + "kind": "wait-time", + "threshold": "00:20:00" + }, + "actions": { + "MoveJobToEscalatedQueue": { + "kind": "reclassify", + "classificationPolicyId": "Main", + "labelsToUpsert": { + "escalated": true + } + } + } + } + } + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json new file mode 100644 index 000000000000..8cebda1711ed --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958", + "closeJobRequest": { + "assignmentId": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "dispositionCode": "JobCompleted." + } + }, + "responses": { + "200": { + "body": {} + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json new file mode 100644 index 000000000000..69c344c08c0b --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json @@ -0,0 +1,79 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958", + "completeJobRequest": { + "assignmentId": "1d5896f3-8b54-40be-82d3-910323f5e2af" + } + }, + "responses": { + "200": { + "body": {} + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json new file mode 100644 index 000000000000..8d9abe43ff1d --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json @@ -0,0 +1,113 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "routerJob": { + "channelId": "CustomChatChannel", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "queueId": "MainQueue", + "priority": 5, + "requestedWorkerSelectors": [ + { + "key": "Sales", + "labelOperator": "Equal", + "value": true + } + ], + "labels": {} + }, + "repeatabilityRequestId": "5aac88f9-d24a-4c53-9d90-86a801667cbe", + "repeatabilityFirstSent": "Tue, 23 Nov 2021 08:49:37 GMT" + }, + "responses": { + "201": { + "body": { + "id": "383541b3-5637-4af6-8aac-3391da8a578a", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "jobStatus": "queued", + "enqueueTimeUtc": "2021-09-30T23:59:04.5311999+00:00", + "channelId": "CustomChatChannel", + "classificationPolicyId": null, + "queueId": "MainQueue", + "priority": 5, + "dispositionCode": null, + "requestedWorkerSelectors": [ + { + "key": "Sales", + "labelOperator": "equal", + "value": true, + "ttl": null + } + ], + "attachedWorkerSelectors": [], + "labels": {}, + "assignments": {}, + "notes": {} + } + } + }, + "400": { + "body": { + "error": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "error": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + }, + "403": { + "body": { + "error": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "error": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "error": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "error": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "error": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "error": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} \ No newline at end of file diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json new file mode 100644 index 000000000000..f9529e726052 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "workerId": "DefaultWorker" + }, + "responses": { + "204": {}, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json new file mode 100644 index 000000000000..3e6553f29318 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958" + }, + "responses": { + "200": { + "body": { + "jobId": "383541b3-5637-4af6-8aac-3391da8a578a", + "position": 1, + "queueId": "MainQueue", + "queueLength": 3, + "estimatedWaitTimeMin": 4 + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json new file mode 100644 index 000000000000..94ca3e7179b9 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json @@ -0,0 +1,98 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958" + }, + "responses": { + "200": { + "body": { + "id": "8780b28c-7079-4de1-9143-4d369289e958", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "jobStatus": "queued", + "enqueueTimeUtc": "2021-09-30T23:59:04.5311999+00:00", + "channelId": "CustomVoiceChannel", + "classificationPolicyId": null, + "queueId": "MainQueue", + "priority": 5, + "dispositionCode": null, + "requestedWorkerSelectors": [ + { + "key": "Sales", + "labelOperator": "equal", + "value": true, + "ttl": null + } + ], + "attachedWorkerSelectors": [], + "labels": {}, + "assignments": {}, + "notes": {} + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json new file mode 100644 index 000000000000..4ba2bb508420 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json @@ -0,0 +1,127 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "status": "active", + "queueId": null, + "channelId": null, + "maxpagesize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "383541b3-5637-4af6-8aac-3391da8a578a", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "jobStatus": "queued", + "enqueueTimeUtc": "2021-09-30T23:56:21.883322+00:00", + "channelId": "CustomChatChannel", + "classificationPolicyId": null, + "queueId": "MainQueue", + "priority": 5, + "dispositionCode": null, + "workerSelectors": [ + { + "key": "Sales", + "labelOperator": "equal", + "value": true, + "ttl": null + } + ], + "labels": {}, + "assignments": {}, + "notes": {} + }, + { + "id": "c571dd84-1ca7-4606-a77a-f38d9e4ae513", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "jobStatus": "queued", + "enqueueTimeUtc": "2021-09-30T23:57:54.041179+00:00", + "channelId": "CustomChatChannel2", + "classificationPolicyId": null, + "queueId": "MainQueue", + "priority": 5, + "dispositionCode": null, + "workerSelectors": [ + { + "key": "Sales", + "labelOperator": "equal", + "value": true, + "ttl": null + } + ], + "labels": {}, + "assignments": {}, + "notes": {} + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json new file mode 100644 index 000000000000..fbbef4ec99bd --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958", + "cancelJobRequest": { + "note": "User hung up while waiting in queue.", + "dispositionCode": "Disconnected" + } + }, + "responses": { + "200": { + "body": {} + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json new file mode 100644 index 000000000000..cb4ecf22421f --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958", + "updateJobRequest": { + "id": "383541b3-5637-4af6-8aac-3391da8a578a", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af" + } + }, + "responses": { + "200": { + "body": { + "id": "383541b3-5637-4af6-8aac-3391da8a578a", + "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", + "jobStatus": "queued", + "enqueueTimeUtc": "2021-09-30T23:59:04.5311999+00:00", + "channelId": "CustomVoiceChannel", + "classificationPolicyId": null, + "queueId": "MainQueue", + "priority": 5, + "dispositionCode": null, + "requestedWorkerSelectors": [ + { + "key": "Sales", + "labelOperator": "equal", + "value": true, + "ttl": null + } + ], + "attachedWorkerSelectors": [], + "labels": {}, + "assignments": {}, + "notes": {} + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json new file mode 100644 index 000000000000..9b4cae69a543 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "workerId": "DefaultWorker", + "offerId": "1d5896f3-8b54-40be-82d3-910323f5e2af" + }, + "responses": { + "200": { + "body": { + "assignmentId": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68", + "jobId": "632f5345-220b-4e46-b31f-aeaf03cc2df9", + "workerId": "DefaultWorker" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json new file mode 100644 index 000000000000..bea93c580f89 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "workerId": "DefaultWorker", + "offerId": "1d5896f3-8b54-40be-82d3-910323f5e2af" + }, + "responses": { + "204": {}, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json new file mode 100644 index 000000000000..34e72979b5bd --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "jobQueue": { + "distributionPolicyId": "MainDistributionPolicy", + "name": "Main", + "labels": {}, + "exceptionPolicyId": "MainExceptionPolicy" + }, + "repeatabilityRequestId": "5aac88f9-d24a-4c53-9d90-86a801667cbe", + "repeatabilityFirstSent": "Tue, 23 Nov 2021 08:49:37 GMT" + }, + "responses": { + "201": { + "body": { + "id": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68", + "name": "Main", + "distributionPolicyId": "MainDistributionPolicy", + "labels": {}, + "exceptionPolicyId": "MainExceptionPolicy" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json new file mode 100644 index 000000000000..160e842c9813 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainQueue" + }, + "responses": { + "204": {}, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json new file mode 100644 index 000000000000..f98bf1a6f9da --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainQueue" + }, + "responses": { + "200": { + "body": { + "id": "MainQueue", + "name": "Main", + "distributionPolicyId": "MainDistributionPolicy", + "labels": {}, + "exceptionPolicyId": "MainExceptionPolicy" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json new file mode 100644 index 000000000000..c4cf25f31e59 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainQueue" + }, + "responses": { + "200": { + "body": { + "queueId": "MainQueue", + "length": 5, + "estimatedWaitTimeMin": 8 + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json new file mode 100644 index 000000000000..5a501f3b25da --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "maxpagesize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "MainQueue", + "name": "Main", + "distributionPolicyId": "MainDistributionPolicy", + "labels": {}, + "exceptionPolicyId": "MainExceptionPolicy" + }, + { + "id": "SecondaryQueue", + "name": "Secondary", + "distributionPolicyId": "SecondaryDistributionPolicy", + "labels": {}, + "exceptionPolicyId": "SecondaryExceptionPolicy" + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json new file mode 100644 index 000000000000..6055a648b50e --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json @@ -0,0 +1,88 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "MainQueue", + "patch": { + "distributionPolicyId": "MainDistributionPolicy", + "name": "Main", + "labels": {}, + "exceptionPolicyId": "MainExceptionPolicy" + } + }, + "responses": { + "200": { + "body": { + "id": "MainQueue", + "name": "Main", + "distributionPolicyId": "MainDistributionPolicy", + "labels": {}, + "exceptionPolicyId": "MainExceptionPolicy" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json new file mode 100644 index 000000000000..7eef54a048ee --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "routerWorker": { + "totalCapacity": 100, + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 10 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 100 + } + }, + "availableForOffers": true + } + }, + "responses": { + "200": { + "body": { + "id": "system-generate-worker-id", + "state": "active", + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "totalCapacity": 100, + "labels": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 10 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 100 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json new file mode 100644 index 000000000000..f9529e726052 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "workerId": "DefaultWorker" + }, + "responses": { + "204": {}, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json new file mode 100644 index 000000000000..10fbe0d08e78 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "WorkerId", + "patch": { + "availableForOffers": false + } + }, + "responses": { + "200": { + "body": { + "id": "WorkerId", + "state": "draining", + "queueAssignments": { + "MainQueue": { + } + }, + "totalCapacity": 10, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 11 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 10 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": false + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json new file mode 100644 index 000000000000..c25d4df80ff5 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "WorkerId", + "patch": { + "availableForOffers": false + } + }, + "responses": { + "200": { + "body": { + "id": "WorkerId", + "state": "inactive", + "queueAssignments": { + "MainQueue": { + } + }, + "totalCapacity": 10, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 11 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 10 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": false + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json new file mode 100644 index 000000000000..5223d6483d0a --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "status": "active", + "channelId": "CustomChatChannel", + "hasCapacity": true + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "DefaultWorker", + "state": "active", + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "totalCapacity": 100, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 10 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 100 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + }, + { + "id": "SecondWorker", + "state": "active", + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "totalCapacity": 100, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 10 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 100 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json new file mode 100644 index 000000000000..08a16be2a0f8 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "workerId": "DefaultWorker" + }, + "responses": { + "200": { + "body": { + "id": "DefaultWorker", + "state": "active", + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "totalCapacity": 100, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 10 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 100 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json new file mode 100644 index 000000000000..3a530de0b892 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "maxpagesize": 2 + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "DefaultWorker", + "state": "active", + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "totalCapacity": 100, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 10 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 100 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + }, + { + "id": "SecondWorker", + "state": "active", + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": { + } + }, + "totalCapacity": 100, + "labels": {}, + "tags": {}, + "channelConfigurations": [ + { + "capacityCostPerJob": 10 + }, + { + "capacityCostPerJob": 100 + } + ], + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + ], + "nextLink": "null" + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json new file mode 100644 index 000000000000..60d1a45caaf9 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "WorkerId", + "patch": { + "availableForOffers": true + } + }, + "responses": { + "200": { + "body": { + "id": "WorkerId", + "state": "active", + "queueAssignments": { + "MainQueue": { + } + }, + "totalCapacity": 10, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 11 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 10 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json new file mode 100644 index 000000000000..e4ac3c4e4cd9 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "workerId": "DefaultWorker", + "assignmentId": "632f5345-220b-4e46-b31f-aeaf03cc2df9", + "releaseAssignmentRequest": { + "releaseTime": "2021-10-01T00:00:00Z" + } + }, + "responses": { + "200": {}, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json new file mode 100644 index 000000000000..65eb3cb9f0f0 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "WorkerId", + "patch": { + "id": "WorkerId", + "totalCapacity": 10, + "queueAssignments": { + "MainQueue": { + }, + "SecondaryQueue": null + }, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 11 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 10 + } + }, + "availableForOffers": false + } + }, + "responses": { + "200": { + "body": { + "id": "WorkerId", + "state": "inactive", + "queueAssignments": { + "MainQueue": { + } + }, + "totalCapacity": 10, + "labels": {}, + "tags": {}, + "channelConfigurations": { + "CustomChatChannel": { + "capacityCostPerJob": 11 + }, + "CustomVoiceChannel": { + "capacityCostPerJob": 10 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": false + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "The server was unable to process the request sent by the client due to invalid syntax." + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The requested item was not found." + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "The server is currently unable to handle the request." + } + } + } + } +} From fd23ea5d6d27f34374bc2fe3f11b0e9cc73b2ba7 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 17 Feb 2022 15:45:52 -0800 Subject: [PATCH 02/23] add readmes --- .../data-plane/JobRouter/readme.csharp.md | 15 +++++ .../data-plane/JobRouter/readme.md | 55 +++++++++++++++++++ .../data-plane/JobRouter/readme.typescript.md | 13 +++++ 3 files changed, 83 insertions(+) create mode 100644 specification/communication/data-plane/JobRouter/readme.csharp.md create mode 100644 specification/communication/data-plane/JobRouter/readme.md create mode 100644 specification/communication/data-plane/JobRouter/readme.typescript.md diff --git a/specification/communication/data-plane/JobRouter/readme.csharp.md b/specification/communication/data-plane/JobRouter/readme.csharp.md new file mode 100644 index 000000000000..8d4495d93f1b --- /dev/null +++ b/specification/communication/data-plane/JobRouter/readme.csharp.md @@ -0,0 +1,15 @@ +## C + +These settings apply only when `--csharp` is specified on the command line. +Please also specify `--csharp-sdks-folder=`. + +```yaml $(csharp) +csharp: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 1 + clear-output-folder: true + client-side-validation: false + namespace: Microsoft.CommunicationServices + output-folder: $(csharp-sdks-folder)/communicationservices/management/Microsoft.CommunicationServices/GeneratedProtocol +``` \ No newline at end of file diff --git a/specification/communication/data-plane/JobRouter/readme.md b/specification/communication/data-plane/JobRouter/readme.md new file mode 100644 index 000000000000..30869fe70563 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/readme.md @@ -0,0 +1,55 @@ +# communicationservices + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for communicationservices. + +## Getting Started + +To build the SDKs for My API, simply install AutoRest via `npm` (`npm install -g autorest`) and then run: + +> `autorest readme.md` + +To see additional help and options, run: + +> `autorest --help` + +For other options on installation see [Installing AutoRest](https://aka.ms/autorest/install) on the AutoRest github page. + +--- + +## Configuration + +### Basic Information + +These are the global settings for the communicationservices. + +```yaml +openapi-type: data-plane +tag: package-jobrouter-2021-10-20-preview2 +``` + +### Tag: package-jobrouter-2021-10-20-preview2 + +These settings apply only when `--tag=package-jobrouter-2021-10-20-preview2` is specified on the command line. + +```yaml $(tag) == 'package-2021-08-30-preview' +input-file: + - preview/package-2021-08-30-preview/communicationservicesjobrouter.json +title: + Azure Communication Services +``` + +--- + +# Code Generation + +## Swagger to SDK + +This section describes what SDK should be generated by the automatic system. +This is not used by Autorest itself. + +## CSharp + +See configuration in [readme.csharp.md](./readme.csharp.md) + diff --git a/specification/communication/data-plane/JobRouter/readme.typescript.md b/specification/communication/data-plane/JobRouter/readme.typescript.md new file mode 100644 index 000000000000..be9f877fd1c2 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/readme.typescript.md @@ -0,0 +1,13 @@ +## TypeScript + +These settings apply only when `--typescript` is specified on the command line. +Please also specify `--typescript-sdks-folder=`. + +```yaml $(typescript) +typescript: + azure-arm: true + package-name: "communicationservices" + output-folder: "$(typescript-sdks-folder)/packages/communicationservices" + payload-flattening-threshold: 1 + generate-metadata: true +``` From 5b13e2fea56563a3247f8ff6891771b5169f1c85 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 17 Feb 2022 15:58:02 -0800 Subject: [PATCH 03/23] revise readme --- specification/communication/data-plane/JobRouter/readme.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/readme.md b/specification/communication/data-plane/JobRouter/readme.md index 30869fe70563..034ccb739d47 100644 --- a/specification/communication/data-plane/JobRouter/readme.md +++ b/specification/communication/data-plane/JobRouter/readme.md @@ -33,9 +33,9 @@ tag: package-jobrouter-2021-10-20-preview2 These settings apply only when `--tag=package-jobrouter-2021-10-20-preview2` is specified on the command line. -```yaml $(tag) == 'package-2021-08-30-preview' +```yaml $(tag) == 'package-jobrouter-2021-10-20-preview2' input-file: - - preview/package-2021-08-30-preview/communicationservicesjobrouter.json + - preview/package-jobrouter-2021-10-20-preview2/communicationservicesjobrouter.json title: Azure Communication Services ``` @@ -53,3 +53,6 @@ This is not used by Autorest itself. See configuration in [readme.csharp.md](./readme.csharp.md) +## TypeScript + +See configuration in [readme.typescript.md](./readme.typescript.md) \ No newline at end of file From 27732a27dbcb19894e42f6ebe2f3d6374c851a72 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 17 Feb 2022 16:04:08 -0800 Subject: [PATCH 04/23] fix swagger link --- specification/communication/data-plane/JobRouter/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/communication/data-plane/JobRouter/readme.md b/specification/communication/data-plane/JobRouter/readme.md index 034ccb739d47..5e2d28c361d0 100644 --- a/specification/communication/data-plane/JobRouter/readme.md +++ b/specification/communication/data-plane/JobRouter/readme.md @@ -35,7 +35,7 @@ These settings apply only when `--tag=package-jobrouter-2021-10-20-preview2` is ```yaml $(tag) == 'package-jobrouter-2021-10-20-preview2' input-file: - - preview/package-jobrouter-2021-10-20-preview2/communicationservicesjobrouter.json + - preview/jobrouter-2021-10-20-preview2/communicationservicesjobrouter.json title: Azure Communication Services ``` From 006acb0cd80da96ce6675ee8131634ec156c87ec Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 17 Feb 2022 17:27:48 -0800 Subject: [PATCH 05/23] fix swagger link, add closing brace to patch classification example --- ...ionPolicies_PatchClassificationPolicy.json | 205 +++++++++--------- .../data-plane/JobRouter/readme.md | 2 +- 2 files changed, 104 insertions(+), 103 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json index ee634474eb1c..14def16f562d 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json @@ -1,107 +1,108 @@ { - "parameters": { - "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-10-20_preview2", - "id": "90eb00c4-234e-4df7-a231-ef7895518384", - "patchClassificationPolicy": { - "name": "MainUpdate" - }, - "responses": { - "200": { - "body": { - "id": "90eb00c4-234e-4df7-a231-ef7895518384", - "name": "MainUpdate", - "fallbackQueueId": "MainQueue", - "queueSelectors": [ - { - "kind": "conditional", - "condition": { - "kind": "expression-rule", - "language": "PowerFx", - "expression": "1 = 1" - }, - "labelSelectors": [ - { - "key": "foo", - "operator": "equal", - "value": "bar" - } - ] - } - ], - "prioritizationRule": { - "kind": "static-rule", - "value": "2" - }, - "workerSelectors": [] - } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "Unknown discriminator static", - "target": "/routing/classificationpolicies/MainClassificationPolicy" - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The item was not found.", - "target": "/routing/classificationpolicies/MainClassificationPolicy222" - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "The item was in an unexpected state.", - "target": "/routing/classificationpolicies/MainClassificationPolicy2" - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "Service unavailable." - } + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "patchClassificationPolicy": { + "name": "MainUpdate" + }, + "responses": { + "200": { + "body": { + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "name": "MainUpdate", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "operator": "equal", + "value": "bar" } + ] } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + }, + "workerSelectors": [] + } + }, + "400": { + "body": { + "communicationError": { + "code": "BadRequest", + "message": "Unknown discriminator static", + "target": "/routing/classificationpolicies/MainClassificationPolicy" + } + } + }, + "401": { + "body": { + "communicationError": { + "code": "Unauthorized", + "message": "Request is not authorized." + } + } + }, + "403": { + "body": { + "communicationError": { + "code": "Forbidden", + "message": "User is not allowed to perform specified action." + } + } + }, + "404": { + "body": { + "communicationError": { + "code": "NotFound", + "message": "The item was not found.", + "target": "/routing/classificationpolicies/MainClassificationPolicy222" + } + } + }, + "409": { + "body": { + "communicationError": { + "code": "Conflict", + "message": "There was a conflict with the current state of the target resource." + } + } + }, + "412": { + "body": { + "communicationError": { + "code": "PreconditionFailed", + "message": "The item was in an unexpected state.", + "target": "/routing/classificationpolicies/MainClassificationPolicy2" + } + } + }, + "429": { + "body": { + "communicationError": { + "code": "TooManyRequests", + "message": "Rate limit exceeded." + } + } + }, + "503": { + "body": { + "communicationError": { + "code": "ServiceUnavailable", + "message": "Service unavailable." + } } + } } + } +} diff --git a/specification/communication/data-plane/JobRouter/readme.md b/specification/communication/data-plane/JobRouter/readme.md index 5e2d28c361d0..660b3a76527b 100644 --- a/specification/communication/data-plane/JobRouter/readme.md +++ b/specification/communication/data-plane/JobRouter/readme.md @@ -35,7 +35,7 @@ These settings apply only when `--tag=package-jobrouter-2021-10-20-preview2` is ```yaml $(tag) == 'package-jobrouter-2021-10-20-preview2' input-file: - - preview/jobrouter-2021-10-20-preview2/communicationservicesjobrouter.json + - preview/2021-10-20-preview2/communicationservicejobrouter.json title: Azure Communication Services ``` From b67590093fbf6427ae93e25a30557761994cb093 Mon Sep 17 00:00:00 2001 From: Charandeep Parisineti Date: Thu, 24 Feb 2022 12:12:24 -0800 Subject: [PATCH 06/23] Updating with latest swagger and prettier changes --- .../communicationservicejobrouter.json | 508 ++++++++++++------ ...onPolicies_CreateClassificationPolicy.json | 54 +- .../examples/Jobs_CreateJob.json | 2 +- .../examples/Jobs_DeleteJob.json | 2 +- .../examples/Workers_CreateWorker.json | 12 +- .../Workers_DeregisterActiveWorker.json | 3 +- .../Workers_DeregisterInactiveWorker.json | 3 +- .../Workers_GetAvailableWorkersByChannel.json | 12 +- .../examples/Workers_GetWorker.json | 6 +- .../Workers_GetWorkersWithPageSize.json | 12 +- .../examples/Workers_RegisterWorker.json | 3 +- .../examples/Workers_UpdateWorker.json | 6 +- 12 files changed, 406 insertions(+), 217 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 57fecf7881ee..b99743047f3d 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -124,7 +124,7 @@ { "in": "body", "name": "patch", - "description": "JSON Document containined the partial update for the classification policy", + "description": "JSON Document contained the partial update for the classification policy", "schema": { "$ref": "#/definitions/ClassificationPolicy" } @@ -831,6 +831,35 @@ "$ref": "./examples/Jobs_UpdateJob.json" } } + }, + "delete": { + "tags": [ + "Jobs" + ], + "summary": "Deletes a job and all of its traces.", + "operationId": "JobRouter_DeleteJob", + "parameters": [ + { + "in": "path", + "name": "id", + "description": "", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Deletes a job and all of its traces": { + "$ref": "./examples/Jobs_DeleteJob.json" + } + } } }, "/routing/jobs/{id}:cancel": { @@ -1017,37 +1046,6 @@ } } }, - "/routing/jobs/{id}:delete": { - "post": { - "tags": [ - "Jobs" - ], - "summary": "Deletes a job and all of its traces.", - "operationId": "JobRouter_DeleteJob", - "parameters": [ - { - "in": "path", - "name": "id", - "description": "", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "204": { - "description": "Success" - } - }, - "x-ms-examples": { - "Deletes a job and all of its traces": { - "$ref": "./examples/Jobs_DeleteJob.json" - } - } - } - }, "/routing/workers/{workerId}/offers/{offerId}:accept": { "post": { "tags": [ @@ -1597,6 +1595,35 @@ "$ref": "./examples/Workers_GetWorker.json" } } + }, + "delete": { + "tags": [ + "Workers" + ], + "summary": "Deletes a worker and all of its traces.", + "operationId": "JobRouter_DeleteWorker", + "parameters": [ + { + "in": "path", + "name": "workerId", + "description": "Id of the worker to delete", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "204": { + "description": "Success" + } + }, + "x-ms-examples": { + "Delete a Worker and all of its traces": { + "$ref": "./examples/Workers_DeleteWorker.json" + } + } } }, "/routing/workers/{workerId}/assignments/{assignmentId}:release": { @@ -1647,37 +1674,6 @@ } } } - }, - "/routing/workers/{workerId}:delete": { - "post": { - "tags": [ - "Workers" - ], - "summary": "Deletes a worker and all of its traces.", - "operationId": "JobRouter_DeleteWorker", - "parameters": [ - { - "in": "path", - "name": "workerId", - "description": "Id of the worker to delete", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "204": { - "description": "Success" - } - }, - "x-ms-examples": { - "Delete a Worker and all of its traces": { - "$ref": "./examples/Workers_DeleteWorker.json" - } - } - } } }, "definitions": { @@ -1953,7 +1949,37 @@ "CompleteJobResponse": { "type": "object" }, - "ConditionalLabelSelector": { + "ConditionalQueueSelector": { + "description": "Describes a set of label selectors that will be attached if the given condition resolves to true", + "required": [ + "condition", + "labelSelectors" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/QueueSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "condition": { + "description": "The condition that must be true for the label selectors to be attached" + }, + "labelSelectors": { + "description": "The label selectors to attach", + "type": "array", + "items": { + "$ref": "#/definitions/QueueSelector" + } + } + }, + "x-ms-discriminator-value": "conditional" + }, + "ConditionalWorkerSelector": { "description": "Describes a set of label selectors that will be attached if the given condition resolves to true", "required": [ "condition", @@ -1962,7 +1988,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/LabelSelectorAttachment" + "$ref": "#/definitions/WorkerSelectorAttachment" } ], "properties": { @@ -1977,7 +2003,7 @@ "description": "The label selectors to attach", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/WorkerSelector" } } }, @@ -2361,60 +2387,6 @@ } } }, - "LabelSelector": { - "description": "Describes a condition that must be met against a set of labels", - "required": [ - "key", - "labelOperator" - ], - "type": "object", - "properties": { - "key": { - "description": "The label key to query against", - "maxLength": 500, - "minLength": 0, - "type": "string" - }, - "labelOperator": { - "description": "Describes how the value of the label is compared to the value defined on the label selector", - "enum": [ - "equal", - "notEqual", - "lessThan", - "lessThanEqual", - "greaterThan", - "greaterThanEqual" - ], - "type": "string", - "x-ms-enum": { - "name": "LabelOperator", - "modelAsString": false - } - }, - "value": { - "description": "The value to compare against the actual label value with the given operator", - "x-nullable": true - }, - "ttl": { - "description": "Describes how long this label selector is valid. Requires input conforming to ISO8601 duration format.", - "type": "string", - "x-nullable": true - } - } - }, - "LabelSelectorAttachment": { - "required": [ - "kind" - ], - "type": "object", - "properties": { - "kind": { - "description": "The type discriminator describing the type of label selector attachment", - "type": "string" - } - }, - "discriminator": "kind" - }, "LongestIdleMode": { "description": "Jobs are directed to the worker who has been idle longest.", "type": "object", @@ -2460,7 +2432,7 @@ "description": "Updated WorkerSelectors.", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/WorkerSelector" }, "x-nullable": true } @@ -2614,7 +2586,7 @@ "description": "A collection of manually specified label selectors, which a worker must satisfy in order to process this job.", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/WorkerSelector" }, "x-nullable": true }, @@ -2622,7 +2594,7 @@ "description": "A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job.", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/WorkerSelector" }, "readOnly": true, "x-nullable": true @@ -2720,7 +2692,7 @@ }, "totalCapacity": { "format": "int32", - "description": "The total capacity score this worker has to manage mulitple concurrent jobs.", + "description": "The total capacity score this worker has to manage multiple concurrent jobs.", "type": "integer" }, "labels": { @@ -2775,7 +2747,7 @@ } } }, - "PassThroughLabelSelector": { + "PassThroughQueueSelector": { "description": "Attaches a label selector where the value is pass through from the job label with the same key", "required": [ "key", @@ -2784,7 +2756,49 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/LabelSelectorAttachment" + "$ref": "#/definitions/QueueSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "key": { + "description": "The label key to query against", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "labelOperator": { + "description": "Describes how the value of the label is compared to the value pass through", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanEqual", + "greaterThan", + "greaterThanEqual" + ], + "type": "string", + "x-ms-enum": { + "name": "LabelOperator", + "modelAsString": false + } + } + }, + "x-ms-discriminator-value": "pass-through" + }, + "PassThroughWorkerSelector": { + "description": "Attaches a label selector where the value is pass through from the job label with the same key", + "required": [ + "key", + "labelOperator" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WorkerSelectorAttachment" } ], "properties": { @@ -2869,6 +2883,54 @@ }, "x-ms-discriminator-value": "queue-length" }, + "QueueSelector": { + "required": [ + "key", + "labelOperator" + ], + "type": "object", + "properties": { + "key": { + "description": "The label key to query against", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "labelOperator": { + "description": "Describes how the value of the label is compared to the value defined on the label selector", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanEqual", + "greaterThan", + "greaterThanEqual" + ], + "type": "string", + "x-ms-enum": { + "name": "LabelOperator", + "modelAsString": false + } + }, + "value": { + "description": "The value to compare against the actual label value with the given operator", + "x-nullable": true + } + } + }, + "QueueSelectorAttachment": { + "required": [ + "kind" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing the type of label selector attachment", + "type": "string" + } + }, + "discriminator": "kind" + }, "QueueStatistics": { "description": "Statistics for the queue", "required": [ @@ -2897,6 +2959,27 @@ } } }, + "QueueWeightedAllocation": { + "required": [ + "labelSelectors", + "weight" + ], + "type": "object", + "properties": { + "weight": { + "format": "double", + "description": "The percentage of this weight, expressed as a fraction of 1.", + "type": "number" + }, + "labelSelectors": { + "description": "A collection of label selectors that will be applied if this allocation is selected.", + "type": "array", + "items": { + "$ref": "#/definitions/QueueSelector" + } + } + } + }, "ReclassifyExceptionAction": { "description": "An action that modifies labels on a job and then reclassifies it", "type": "object", @@ -3030,7 +3113,7 @@ "description": "A collection of manually specified label selectors, which a worker must satisfy in order to process this job.", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/WorkerSelector" }, "x-nullable": true }, @@ -3038,7 +3121,7 @@ "description": "A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job.", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/WorkerSelector" }, "readOnly": true, "x-nullable": true @@ -3118,7 +3201,7 @@ }, "totalCapacity": { "format": "int32", - "description": "The total capacity score this worker has to manage mulitple concurrent jobs.", + "description": "The total capacity score this worker has to manage multiple concurrent jobs.", "type": "integer" }, "labels": { @@ -3173,14 +3256,35 @@ } } }, - "RuleEngineLabelSelector": { + "RuleEngineQueueSelector": { "required": [ "rule" ], "type": "object", "allOf": [ { - "$ref": "#/definitions/LabelSelectorAttachment" + "$ref": "#/definitions/QueueSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "rule": { + "description": "A RouterRule that resolves a collection of LabelSelector to attach" + } + }, + "x-ms-discriminator-value": "rule-engine" + }, + "RuleEngineWorkerSelector": { + "required": [ + "rule" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WorkerSelectorAttachment" } ], "properties": { @@ -3233,7 +3337,7 @@ } } }, - "StaticLabelSelector": { + "StaticQueueSelector": { "description": "Describes a label selector that will always be attached", "required": [ "labelSelector" @@ -3241,7 +3345,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/LabelSelectorAttachment" + "$ref": "#/definitions/QueueSelectorAttachment" } ], "properties": { @@ -3250,7 +3354,7 @@ "readOnly": true }, "labelSelector": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/QueueSelector" } }, "x-ms-discriminator-value": "static" @@ -3277,6 +3381,28 @@ }, "x-ms-discriminator-value": "static-rule" }, + "StaticWorkerSelector": { + "description": "Describes a label selector that will always be attached", + "required": [ + "labelSelector" + ], + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/WorkerSelectorAttachment" + } + ], + "properties": { + "kind": { + "type": "string", + "readOnly": true + }, + "labelSelector": { + "$ref": "#/definitions/WorkerSelector" + } + }, + "x-ms-discriminator-value": "static" + }, "WaitTimeExceptionTrigger": { "description": "Trigger for an exception action on exceeding wait time", "required": [ @@ -3300,29 +3426,33 @@ }, "x-ms-discriminator-value": "wait-time" }, - "WeightedAllocation": { - "description": "A percentage based allocation.", + "WeightedAllocationQueueSelector": { + "description": "Describes multiple sets of label selectors, of which one will be selected and attached according to a weighting", "required": [ - "labelSelectors", - "weight" + "allocations" ], "type": "object", + "allOf": [ + { + "$ref": "#/definitions/QueueSelectorAttachment" + } + ], "properties": { - "weight": { - "format": "double", - "description": "The percentage of this weight, expressed as a fraction of 1.", - "type": "number" + "kind": { + "type": "string", + "readOnly": true }, - "labelSelectors": { - "description": "A collection of label selectors that will be applied if this allocation is selected.", + "allocations": { + "description": "A collection of percentage based weighted allocations.", "type": "array", "items": { - "$ref": "#/definitions/LabelSelector" + "$ref": "#/definitions/QueueWeightedAllocation" } } - } + }, + "x-ms-discriminator-value": "weighted-allocation-queue-selector" }, - "WeightedAllocationLabelSelector": { + "WeightedAllocationWorkerSelector": { "description": "Describes multiple sets of label selectors, of which one will be selected and attached according to a weighting", "required": [ "allocations" @@ -3330,7 +3460,7 @@ "type": "object", "allOf": [ { - "$ref": "#/definitions/LabelSelectorAttachment" + "$ref": "#/definitions/WorkerSelectorAttachment" } ], "properties": { @@ -3342,11 +3472,11 @@ "description": "A collection of percentage based weighted allocations.", "type": "array", "items": { - "$ref": "#/definitions/WeightedAllocation" + "$ref": "#/definitions/WorkerWeightedAllocation" } } }, - "x-ms-discriminator-value": "weighted-allocation" + "x-ms-discriminator-value": "weighted-allocation-worker-selector" }, "WorkerAssignment": { "required": [ @@ -3395,6 +3525,84 @@ "readOnly": true } } + }, + "WorkerSelector": { + "required": [ + "key", + "labelOperator" + ], + "type": "object", + "properties": { + "key": { + "description": "The label key to query against", + "maxLength": 500, + "minLength": 0, + "type": "string" + }, + "labelOperator": { + "description": "Describes how the value of the label is compared to the value defined on the label selector", + "enum": [ + "equal", + "notEqual", + "lessThan", + "lessThanEqual", + "greaterThan", + "greaterThanEqual" + ], + "type": "string", + "x-ms-enum": { + "name": "LabelOperator", + "modelAsString": false + } + }, + "value": { + "description": "The value to compare against the actual label value with the given operator", + "x-nullable": true + }, + "ttl": { + "description": "Describes how long this label selector is valid. Requires input conforming to ISO8601 duration format.", + "type": "string", + "x-nullable": true + }, + "expedite": { + "description": "Pushes the job to the front of the queue as long as this selector is active.", + "type": "boolean" + } + } + }, + "WorkerSelectorAttachment": { + "required": [ + "kind" + ], + "type": "object", + "properties": { + "kind": { + "description": "The type discriminator describing the type of label selector attachment", + "type": "string" + } + }, + "discriminator": "kind" + }, + "WorkerWeightedAllocation": { + "required": [ + "labelSelectors", + "weight" + ], + "type": "object", + "properties": { + "weight": { + "format": "double", + "description": "The percentage of this weight, expressed as a fraction of 1.", + "type": "number" + }, + "labelSelectors": { + "description": "A collection of label selectors that will be applied if this allocation is selected.", + "type": "array", + "items": { + "$ref": "#/definitions/WorkerSelector" + } + } + } } }, "parameters": { diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json index 7e4d045acee1..ebb58aabc044 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json @@ -1,33 +1,33 @@ { - "parameters": { - "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-10-20_preview2", - "classificationPolicy": { - "name": "Main", - "fallbackQueueId": "MainQueue", - "queueSelectors": [ - { - "kind": "conditional", - "condition": { - "kind": "expression-rule", - "language": "PowerFx", - "expression": "1 = 1" - }, - "labelSelectors": [ - { - "key": "foo", - "labelOperator": "equal", - "value": "bar" - } - ] - } - ], - "prioritizationRule": { - "kind": "static-rule", - "value": "2" + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "classificationPolicy": { + "name": "Main", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "labelOperator": "equal", + "value": "bar" } + ] } - }, + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + } + } + }, "responses": { "201": { "body": { diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json index 8d9abe43ff1d..ef581523d810 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json @@ -110,4 +110,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json index f9529e726052..6ea15c255496 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json @@ -2,7 +2,7 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "workerId": "DefaultWorker" + "id": "8780b28c-7079-4de1-9143-4d369289e958" }, "responses": { "204": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json index 7eef54a048ee..855986ba76dc 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json @@ -5,10 +5,8 @@ "routerWorker": { "totalCapacity": 100, "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "labels": {}, "tags": {}, @@ -29,10 +27,8 @@ "id": "system-generate-worker-id", "state": "active", "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "totalCapacity": 100, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json index 10fbe0d08e78..d5096f40e5d7 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json @@ -13,8 +13,7 @@ "id": "WorkerId", "state": "draining", "queueAssignments": { - "MainQueue": { - } + "MainQueue": {} }, "totalCapacity": 10, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json index c25d4df80ff5..95dde2cab864 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json @@ -13,8 +13,7 @@ "id": "WorkerId", "state": "inactive", "queueAssignments": { - "MainQueue": { - } + "MainQueue": {} }, "totalCapacity": 10, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json index 5223d6483d0a..d6ceaf36a6c6 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json @@ -14,10 +14,8 @@ "id": "DefaultWorker", "state": "active", "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "totalCapacity": 100, "labels": {}, @@ -39,10 +37,8 @@ "id": "SecondWorker", "state": "active", "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "totalCapacity": 100, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json index 08a16be2a0f8..afa3f830128c 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json @@ -10,10 +10,8 @@ "id": "DefaultWorker", "state": "active", "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "totalCapacity": 100, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json index 3a530de0b892..1f373ce6eab2 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json @@ -12,10 +12,8 @@ "id": "DefaultWorker", "state": "active", "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "totalCapacity": 100, "labels": {}, @@ -37,10 +35,8 @@ "id": "SecondWorker", "state": "active", "queueAssignments": { - "MainQueue": { - }, - "SecondaryQueue": { - } + "MainQueue": {}, + "SecondaryQueue": {} }, "totalCapacity": 100, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json index 60d1a45caaf9..d1daa5138a8c 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json @@ -13,8 +13,7 @@ "id": "WorkerId", "state": "active", "queueAssignments": { - "MainQueue": { - } + "MainQueue": {} }, "totalCapacity": 10, "labels": {}, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json index 65eb3cb9f0f0..1cb1bbd16617 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json @@ -7,8 +7,7 @@ "id": "WorkerId", "totalCapacity": 10, "queueAssignments": { - "MainQueue": { - }, + "MainQueue": {}, "SecondaryQueue": null }, "labels": {}, @@ -30,8 +29,7 @@ "id": "WorkerId", "state": "inactive", "queueAssignments": { - "MainQueue": { - } + "MainQueue": {} }, "totalCapacity": 10, "labels": {}, From 4712e6dbfe36d9294580e4a9d30474286982ed26 Mon Sep 17 00:00:00 2001 From: Charandeep Parisineti Date: Thu, 24 Feb 2022 15:45:10 -0800 Subject: [PATCH 07/23] Fix prettier in swagger --- .../communicationservicejobrouter.json | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index b99743047f3d..783d7debcb25 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -1855,7 +1855,7 @@ "queueSelectors": { "description": "The queue selectors to resolve a queue for a given job.", "type": "array", - "items": { }, + "items": {}, "x-nullable": true }, "prioritizationRule": { @@ -1865,7 +1865,7 @@ "workerSelectors": { "description": "The worker label selectors to attach to a given job.", "type": "array", - "items": { }, + "items": {}, "x-nullable": true } } @@ -2378,7 +2378,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "exceptionPolicyId": { @@ -2458,7 +2458,7 @@ "queueSelectors": { "description": "The queue selectors to resolve a queue for a given job.", "type": "array", - "items": { }, + "items": {}, "x-nullable": true }, "prioritizationRule": { @@ -2468,7 +2468,7 @@ "workerSelectors": { "description": "The worker label selectors to attach to a given job.", "type": "array", - "items": { }, + "items": {}, "x-nullable": true } } @@ -2602,7 +2602,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "assignments": { @@ -2617,7 +2617,7 @@ "tags": { "description": "A set of non-identifying attributes attached to this job", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "notes": { @@ -2652,7 +2652,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "exceptionPolicyId": { @@ -2698,13 +2698,13 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "tags": { "description": "A set of non-identifying attributes attached to this worker.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "channelConfigurations": { @@ -3002,7 +3002,7 @@ "labelsToUpsert": { "description": "(optional) Dictionary containing the labels to update (or add if not existing) in key-value pairs", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true } }, @@ -3129,7 +3129,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "assignments": { @@ -3144,7 +3144,7 @@ "tags": { "description": "A set of non-identifying attributes attached to this job", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "notes": { @@ -3207,13 +3207,13 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "tags": { "description": "A set of non-identifying attributes attached to this worker.", "type": "object", - "additionalProperties": { }, + "additionalProperties": {}, "x-nullable": true }, "channelConfigurations": { @@ -3632,4 +3632,4 @@ } ] } -} \ No newline at end of file +} From e045a4d6de6084c74b5f396d322d71c8677c0832 Mon Sep 17 00:00:00 2001 From: Charandeep Parisineti Date: Fri, 25 Feb 2022 15:58:36 -0800 Subject: [PATCH 08/23] Fix examples --- ...onPolicies_CreateClassificationPolicy.json | 67 --------- ...onPolicies_DeleteClassificationPolicy.json | 69 +--------- ...ationPolicies_GetClassificationPolicy.json | 67 --------- ...istClassificationPoliciesWithPageSize.json | 64 --------- ...ionPolicies_PatchClassificationPolicy.json | 127 +++++------------- ...tionPolicies_CreateDistributionPolicy.json | 64 --------- ...tionPolicies_DeleteDistributionPolicy.json | 66 +-------- ...ibutionPolicies_GetDistributionPolicy.json | 64 --------- ..._ListDistributionPoliciesWithPageSize.json | 64 --------- ...utionPolicies_PatchDistributionPolicy.json | 64 --------- ...ceptionPolicies_CreateExceptionPolicy.json | 64 --------- ...ceptionPolicies_DeleteExceptionPolicy.json | 66 +-------- .../ExceptionPolicies_GetExceptionPolicy.json | 64 --------- ...ies_ListExceptionPoliciesWithPageSize.json | 70 +--------- ...xceptionPolicies_PatchExceptionPolicy.json | 64 --------- .../examples/Jobs_CloseJob.json | 64 --------- .../examples/Jobs_CompleteJob.json | 64 --------- .../examples/Jobs_CreateJob.json | 66 +-------- .../examples/Jobs_DeleteJob.json | 42 +----- .../examples/Jobs_GetInQueuePosition.json | 66 +-------- .../examples/Jobs_GetJob.json | 64 --------- .../examples/Jobs_GetJobsWithPageSize.json | 80 ----------- .../examples/Jobs_RequestJobCancel.json | 64 --------- .../examples/Jobs_UpdateJob.json | 64 --------- .../examples/Offers_AcceptJobOffer.json | 64 --------- .../examples/Offers_DeclineJobOffer.json | 66 +-------- .../examples/Queues_CreateQueue.json | 64 --------- .../examples/Queues_DeleteQueue.json | 66 +-------- .../examples/Queues_GetQueue.json | 64 --------- .../examples/Queues_GetQueueStatistics.json | 67 +-------- .../Queues_ListQueuesWithPageSize.json | 64 --------- .../examples/Queues_UpdateQueue.json | 64 --------- .../examples/Workers_CreateWorker.json | 64 --------- .../examples/Workers_DeleteWorker.json | 42 +----- .../Workers_DeregisterActiveWorker.json | 69 +--------- .../Workers_DeregisterInactiveWorker.json | 69 +--------- .../Workers_GetAvailableWorkersByChannel.json | 64 --------- .../examples/Workers_GetWorker.json | 64 --------- .../Workers_GetWorkersWithPageSize.json | 72 +--------- .../examples/Workers_RegisterWorker.json | 69 +--------- .../examples/Workers_ReleaseAssignment.json | 66 +-------- .../examples/Workers_UpdateWorker.json | 67 +-------- 42 files changed, 59 insertions(+), 2724 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json index ebb58aabc044..a4b6a298a78c 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json @@ -57,73 +57,6 @@ }, "workerSelectors": [] } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "Unknown discriminator static", - "target": "/routing/classificationpolicies/MainClassificationPolicy" - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The item was not found.", - "target": "/routing/classificationpolicies/MainClassificationPolicy222" - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "The item was in an unexpected state.", - "target": "/routing/classificationpolicies/MainClassificationPolicy2" - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "Service unavailable." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json index b0e33ee887c7..f9e07ab8ec28 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_DeleteClassificationPolicy.json @@ -5,73 +5,6 @@ "id": "MainClassificationPolicy" }, "responses": { - "204": {}, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "Validation failed because: variable used in URI path segments can only contain 0-9 A-Z a-z - . _ ~", - "target": "/routing/classificationpolicies" - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The item was not found.", - "target": "/routing/classificationpolicies/MainClassificationPolicy222" - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "The item was in an unexpected state.", - "target": "/routing/classificationpolicies/MainClassificationPolicy2" - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "Service unavailable." - } - } - } + "204": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json index af52b7e9c1d4..2e4fafe95854 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_GetClassificationPolicy.json @@ -39,73 +39,6 @@ } ] } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "Unknown discriminator static", - "target": "/routing/classificationpolicies/MainClassificationPolicy" - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The item was not found.", - "target": "/routing/classificationpolicies/MainClassificationPolicy222" - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "The item was in an unexpected state.", - "target": "/routing/classificationpolicies/MainClassificationPolicy2" - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "Service unavailable." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json index 09bcc33e7b8d..dd844f6257ff 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json @@ -51,70 +51,6 @@ ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json index 14def16f562d..3b70732d4be8 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json @@ -5,103 +5,36 @@ "id": "90eb00c4-234e-4df7-a231-ef7895518384", "patchClassificationPolicy": { "name": "MainUpdate" - }, - "responses": { - "200": { - "body": { - "id": "90eb00c4-234e-4df7-a231-ef7895518384", - "name": "MainUpdate", - "fallbackQueueId": "MainQueue", - "queueSelectors": [ - { - "kind": "conditional", - "condition": { - "kind": "expression-rule", - "language": "PowerFx", - "expression": "1 = 1" - }, - "labelSelectors": [ - { - "key": "foo", - "operator": "equal", - "value": "bar" - } - ] - } - ], - "prioritizationRule": { - "kind": "static-rule", - "value": "2" - }, - "workerSelectors": [] - } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "Unknown discriminator static", - "target": "/routing/classificationpolicies/MainClassificationPolicy" - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The item was not found.", - "target": "/routing/classificationpolicies/MainClassificationPolicy222" - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "The item was in an unexpected state.", - "target": "/routing/classificationpolicies/MainClassificationPolicy2" - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "Service unavailable." - } - } + } + }, + "responses": { + "200": { + "body": { + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "name": "MainUpdate", + "fallbackQueueId": "MainQueue", + "queueSelectors": [ + { + "kind": "conditional", + "condition": { + "kind": "expression-rule", + "language": "PowerFx", + "expression": "1 = 1" + }, + "labelSelectors": [ + { + "key": "foo", + "operator": "equal", + "value": "bar" + } + ] + } + ], + "prioritizationRule": { + "kind": "static-rule", + "value": "2" + }, + "workerSelectors": [] } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json index c8776feef4d3..d3346c8afc82 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json @@ -26,70 +26,6 @@ "bypassSelectors": false } } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json index a8d4a80212f4..e4a97db5be54 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_DeleteDistributionPolicy.json @@ -5,70 +5,6 @@ "id": "MainDistributionPolicy" }, "responses": { - "204": {}, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } + "204": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json index 25983b14ebf2..2801669e03e2 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json @@ -17,70 +17,6 @@ "bypassSelectors": false } } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json index 5269c9ea7f87..ba4ac6d62702 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json @@ -33,70 +33,6 @@ ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json index 461c896b1222..41980d606fa7 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json @@ -27,70 +27,6 @@ "bypassSelectors": false } } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json index f70c7c2e01df..70657463926d 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json @@ -46,70 +46,6 @@ } } } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json index 169f16f9555d..d51530b60ab6 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_DeleteExceptionPolicy.json @@ -5,70 +5,6 @@ "id": "MainExceptionPolicy" }, "responses": { - "204": {}, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } + "204": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json index 8821b8d34250..c08b7ac354d2 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_GetExceptionPolicy.json @@ -27,70 +27,6 @@ } } } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json index baeece696355..8745c1e080f2 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json @@ -38,85 +38,21 @@ "kind": "wait-time", "threshold": "00:50:00" }, - "actions": [ - { + "actions": { + "MoveJobToVIPQueue": { "kind": "reclassify", "classificationPolicyId": "Main", "labelsToUpsert": { "VIP": true } } - ] + } } } } ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json index d1a98be3b6ca..45d5c8bc5f0a 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json @@ -47,70 +47,6 @@ } } } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json index 8cebda1711ed..dbc15b62cc11 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json @@ -11,70 +11,6 @@ "responses": { "200": { "body": {} - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json index 69c344c08c0b..e970e5840894 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CompleteJob.json @@ -10,70 +10,6 @@ "responses": { "200": { "body": {} - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json index ef581523d810..d40f9b5c03a4 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json @@ -10,7 +10,7 @@ "requestedWorkerSelectors": [ { "key": "Sales", - "labelOperator": "Equal", + "labelOperator": "equal", "value": true } ], @@ -45,69 +45,5 @@ "notes": {} } } - }, - "400": { - "body": { - "error": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "error": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - }, - "403": { - "body": { - "error": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "error": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "error": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "error": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "error": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "error": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json index 6ea15c255496..78d045502bf1 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_DeleteJob.json @@ -5,46 +5,6 @@ "id": "8780b28c-7079-4de1-9143-4d369289e958" }, "responses": { - "204": {}, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } + "204": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json index 3e6553f29318..636006cb164f 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetInQueuePosition.json @@ -11,71 +11,7 @@ "position": 1, "queueId": "MainQueue", "queueLength": 3, - "estimatedWaitTimeMin": 4 - } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } + "estimatedWaitTimeMinutes": 4 } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json index 94ca3e7179b9..f3eebbae4084 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json @@ -29,70 +29,6 @@ "assignments": {}, "notes": {} } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json index 4ba2bb508420..2e554db8a9be 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJobsWithPageSize.json @@ -21,14 +21,6 @@ "queueId": "MainQueue", "priority": 5, "dispositionCode": null, - "workerSelectors": [ - { - "key": "Sales", - "labelOperator": "equal", - "value": true, - "ttl": null - } - ], "labels": {}, "assignments": {}, "notes": {} @@ -43,14 +35,6 @@ "queueId": "MainQueue", "priority": 5, "dispositionCode": null, - "workerSelectors": [ - { - "key": "Sales", - "labelOperator": "equal", - "value": true, - "ttl": null - } - ], "labels": {}, "assignments": {}, "notes": {} @@ -58,70 +42,6 @@ ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json index fbbef4ec99bd..9da84cdeb5de 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_RequestJobCancel.json @@ -11,70 +11,6 @@ "responses": { "200": { "body": {} - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json index cb4ecf22421f..9a52aa474f4a 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json @@ -33,70 +33,6 @@ "assignments": {}, "notes": {} } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json index 9b4cae69a543..bf2d34a4413c 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_AcceptJobOffer.json @@ -12,70 +12,6 @@ "jobId": "632f5345-220b-4e46-b31f-aeaf03cc2df9", "workerId": "DefaultWorker" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json index bea93c580f89..d924bc7ab360 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Offers_DeclineJobOffer.json @@ -6,70 +6,8 @@ "offerId": "1d5896f3-8b54-40be-82d3-910323f5e2af" }, "responses": { - "204": {}, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } + "200": { + "body": {} } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json index 34e72979b5bd..13307bbb065e 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json @@ -20,70 +20,6 @@ "labels": {}, "exceptionPolicyId": "MainExceptionPolicy" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json index 160e842c9813..d897965a3a2e 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_DeleteQueue.json @@ -5,70 +5,6 @@ "id": "MainQueue" }, "responses": { - "204": {}, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } + "204": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json index f98bf1a6f9da..ea65baf1baf0 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueue.json @@ -13,70 +13,6 @@ "labels": {}, "exceptionPolicyId": "MainExceptionPolicy" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json index c4cf25f31e59..f9b22ff1c9f4 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_GetQueueStatistics.json @@ -8,72 +8,7 @@ "200": { "body": { "queueId": "MainQueue", - "length": 5, - "estimatedWaitTimeMin": 8 - } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } + "length": 5 } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json index 5a501f3b25da..2052845dae81 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_ListQueuesWithPageSize.json @@ -25,70 +25,6 @@ ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json index 6055a648b50e..ef028fe08b7e 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json @@ -19,70 +19,6 @@ "labels": {}, "exceptionPolicyId": "MainExceptionPolicy" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json index 855986ba76dc..ffa114147512 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json @@ -45,70 +45,6 @@ "loadRatio": 0, "availableForOffers": true } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json index f9529e726052..390074591f24 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeleteWorker.json @@ -5,46 +5,6 @@ "workerId": "DefaultWorker" }, "responses": { - "204": {}, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } + "204": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json index d5096f40e5d7..3860b5419c38 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterActiveWorker.json @@ -2,9 +2,10 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "id": "WorkerId", + "workerId": "WorkerId", "patch": { - "availableForOffers": false + "availableForOffers": false, + "totalCapacity": 10 } }, "responses": { @@ -31,70 +32,6 @@ "loadRatio": 0, "availableForOffers": false } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json index 95dde2cab864..ec7841cf6878 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_DeregisterInactiveWorker.json @@ -2,9 +2,10 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "id": "WorkerId", + "workerId": "WorkerId", "patch": { - "availableForOffers": false + "availableForOffers": false, + "totalCapacity": 10 } }, "responses": { @@ -31,70 +32,6 @@ "loadRatio": 0, "availableForOffers": false } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json index d6ceaf36a6c6..ed13c0caa320 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetAvailableWorkersByChannel.json @@ -59,70 +59,6 @@ ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json index afa3f830128c..624807218cbd 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorker.json @@ -29,70 +29,6 @@ "loadRatio": 0, "availableForOffers": true } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json index 1f373ce6eab2..a9d888c46493 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_GetWorkersWithPageSize.json @@ -41,14 +41,14 @@ "totalCapacity": 100, "labels": {}, "tags": {}, - "channelConfigurations": [ - { + "channelConfigurations": { + "CustomEmailChannel": { "capacityCostPerJob": 10 }, - { + "CustomSMSChannel": { "capacityCostPerJob": 100 } - ], + }, "offers": [], "assignedJobs": [], "loadRatio": 0, @@ -57,70 +57,6 @@ ], "nextLink": "null" } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json index d1daa5138a8c..1622edb93d08 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_RegisterWorker.json @@ -2,9 +2,10 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "id": "WorkerId", + "workerId": "WorkerId", "patch": { - "availableForOffers": true + "availableForOffers": true, + "totalCapacity": 10 } }, "responses": { @@ -31,70 +32,6 @@ "loadRatio": 0, "availableForOffers": true } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json index e4ac3c4e4cd9..813253ae36a6 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json @@ -9,70 +9,6 @@ } }, "responses": { - "200": {}, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } - } + "200": {} } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json index 1cb1bbd16617..141b534d2d86 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_UpdateWorker.json @@ -2,9 +2,8 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "id": "WorkerId", + "workerId": "WorkerId", "patch": { - "id": "WorkerId", "totalCapacity": 10, "queueAssignments": { "MainQueue": {}, @@ -47,70 +46,6 @@ "loadRatio": 0, "availableForOffers": false } - }, - "400": { - "body": { - "communicationError": { - "code": "BadRequest", - "message": "The server was unable to process the request sent by the client due to invalid syntax." - } - } - }, - "401": { - "body": { - "communicationError": { - "code": "Unauthorized", - "message": "Request is not authorized." - } - } - }, - "403": { - "body": { - "communicationError": { - "code": "Forbidden", - "message": "User is not allowed to perform specified action." - } - } - }, - "404": { - "body": { - "communicationError": { - "code": "NotFound", - "message": "The requested item was not found." - } - } - }, - "409": { - "body": { - "communicationError": { - "code": "Conflict", - "message": "There was a conflict with the current state of the target resource." - } - } - }, - "412": { - "body": { - "communicationError": { - "code": "PreconditionFailed", - "message": "One or more conditions given in the request header fields evaluated to false when tested on the server." - } - } - }, - "429": { - "body": { - "communicationError": { - "code": "TooManyRequests", - "message": "Rate limit exceeded." - } - } - }, - "503": { - "body": { - "communicationError": { - "code": "ServiceUnavailable", - "message": "The server is currently unable to handle the request." - } - } } } } From a58f0f7019e0290ef0d308080a84d2d2d13364aa Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Wed, 6 Apr 2022 11:03:27 -0700 Subject: [PATCH 09/23] Address many comments --- .../communicationservicejobrouter.json | 702 +++++++++++------- ...nPolicies_UpdateClassificationPolicy.json} | 2 +- ...ionPolicies_UpdateDistributionPolicy.json} | 0 ...eptionPolicies_UpdateExceptionPolicy.json} | 2 +- .../examples/Jobs_ReclassifyJob.json | 16 + .../examples/Jobs_UpdateJob.json | 2 +- 6 files changed, 466 insertions(+), 258 deletions(-) rename specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/{ClassificationPolicies_PatchClassificationPolicy.json => ClassificationPolicies_UpdateClassificationPolicy.json} (96%) rename specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/{DistributionPolicies_PatchDistributionPolicy.json => DistributionPolicies_UpdateDistributionPolicy.json} (100%) rename specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/{ExceptionPolicies_PatchExceptionPolicy.json => ExceptionPolicies_UpdateExceptionPolicy.json} (97%) create mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 783d7debcb25..56f5a3515558 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -12,7 +12,7 @@ "ClassificationPolicies" ], "summary": "Creates a new classification policy.", - "operationId": "JobRouter_CreateClassificationPolicyV2", + "operationId": "JobRouter_CreateClassificationPolicy", "consumes": [ "application/json" ], @@ -20,19 +20,21 @@ "application/json" ], "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "in": "header", "name": "repeatability-request-id", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, { "in": "header", "name": "repeatability-first-sent", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "in": "body", "name": "classificationPolicy", @@ -44,6 +46,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "201": { "description": "Success", "schema": { @@ -80,6 +88,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -104,7 +118,7 @@ "ClassificationPolicies" ], "summary": "Updates a classification policy.", - "operationId": "JobRouter_PatchClassificationPolicyV2", + "operationId": "JobRouter_UpdateClassificationPolicy", "consumes": [ "application/merge-patch+json" ], @@ -115,6 +129,7 @@ { "in": "path", "name": "id", + "description": "The id of classification policy.", "required": true, "type": "string" }, @@ -124,13 +139,20 @@ { "in": "body", "name": "patch", - "description": "JSON Document contained the partial update for the classification policy", + "description": "JSON Document contained the partial update for the classification policy.", + "required": true, "schema": { "$ref": "#/definitions/ClassificationPolicy" } } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -140,7 +162,7 @@ }, "x-ms-examples": { "Update a Classification policy": { - "$ref": "./examples/ClassificationPolicies_PatchClassificationPolicy.json" + "$ref": "./examples/ClassificationPolicies_UpdateClassificationPolicy.json" } } }, @@ -166,6 +188,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -185,6 +213,9 @@ ], "summary": "Delete a classification policy by Id", "operationId": "JobRouter_DeleteClassificationPolicy", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -198,6 +229,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "204": { "description": "Success" } @@ -215,7 +252,7 @@ "DistributionPolicies" ], "summary": "Creates a new distribution policy.", - "operationId": "JobRouter_CreateDistributionPolicyV2", + "operationId": "JobRouter_CreateDistributionPolicy", "consumes": [ "application/json" ], @@ -223,19 +260,21 @@ "application/json" ], "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "in": "header", "name": "repeatability-request-id", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, { "in": "header", "name": "repeatability-first-sent", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "in": "body", "name": "distributionPolicy", @@ -247,6 +286,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "201": { "description": "Success", "schema": { @@ -283,6 +328,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -307,7 +358,7 @@ "DistributionPolicies" ], "summary": "Updates a distribution policy.", - "operationId": "JobRouter_PatchDistributionPolicy", + "operationId": "JobRouter_UpdateDistributionPolicy", "consumes": [ "application/merge-patch+json" ], @@ -335,6 +386,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -344,7 +401,7 @@ }, "x-ms-examples": { "Update a Distribution policy": { - "$ref": "./examples/DistributionPolicies_PatchDistributionPolicy.json" + "$ref": "./examples/DistributionPolicies_UpdateDistributionPolicy.json" } } }, @@ -370,6 +427,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -389,6 +452,9 @@ ], "summary": "Delete a distribution policy by Id", "operationId": "JobRouter_DeleteDistributionPolicy", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -402,6 +468,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "204": { "description": "Success" } @@ -419,7 +491,7 @@ "ExceptionPolicies" ], "summary": "Creates an exception policy", - "operationId": "JobRouter_CreateExceptionPolicyV2", + "operationId": "JobRouter_CreateExceptionPolicy", "consumes": [ "application/json" ], @@ -427,19 +499,21 @@ "application/json" ], "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "in": "header", "name": "repeatability-request-id", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, { "in": "header", "name": "repeatability-first-sent", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "in": "body", "name": "exceptionPolicy", @@ -451,6 +525,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "201": { "description": "Success", "schema": { @@ -487,6 +567,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -511,7 +597,7 @@ "ExceptionPolicies" ], "summary": "Updates an exception policy", - "operationId": "JobRouter_PatchExceptionPolicyV2", + "operationId": "JobRouter_UpdateExceptionPolicy", "consumes": [ "application/merge-patch+json" ], @@ -531,7 +617,7 @@ }, { "in": "body", - "name": "patchExceptionPolicy", + "name": "patch", "description": "Model of exception policy to be updated", "schema": { "$ref": "#/definitions/ExceptionPolicy" @@ -539,6 +625,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -548,7 +640,7 @@ }, "x-ms-examples": { "Update a Exception policy": { - "$ref": "./examples/ExceptionPolicies_PatchExceptionPolicy.json" + "$ref": "./examples/ExceptionPolicies_UpdateExceptionPolicy.json" } } }, @@ -574,6 +666,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -593,6 +691,9 @@ ], "summary": "Deletes a exception policy by Id", "operationId": "JobRouter_DeleteExceptionPolicy", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -606,6 +707,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "204": { "description": "Success" } @@ -623,7 +730,7 @@ "Jobs" ], "summary": "Creates a new job to be routed.", - "operationId": "JobRouter_CreateJobV2", + "operationId": "JobRouter_CreateJob", "consumes": [ "application/json" ], @@ -631,19 +738,21 @@ "application/json" ], "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "in": "header", "name": "repeatability-request-id", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, { "in": "header", "name": "repeatability-first-sent", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "in": "body", "name": "routerJob", @@ -655,6 +764,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "201": { "description": "Success", "schema": { @@ -725,6 +840,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -766,6 +887,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -799,13 +926,6 @@ "required": true, "type": "string" }, - { - "in": "query", - "name": "forceClassification", - "description": "If set to true, will force classification. Defaults to false.", - "type": "boolean", - "default": false - }, { "$ref": "#/parameters/ApiVersionParameter" }, @@ -819,6 +939,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -838,6 +964,9 @@ ], "summary": "Deletes a job and all of its traces.", "operationId": "JobRouter_DeleteJob", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -851,6 +980,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "204": { "description": "Success" } @@ -862,6 +997,61 @@ } } }, + "/routing/jobs/{id}/reclassify": { + "post": { + "tags": [ + "Jobs" + ], + "summary": "Reclassify a job.", + "operationId": "JobRouter_ReclassifyJob", + "consumes": [ + "application/json", + "text/json", + "application/*+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "description": "Id of the job", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "reclassifyJobRequest", + "schema": { + "$ref": "#/definitions/ReclassifyJobRequest" + } + } + ], + "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RouterJob" + } + } + }, + "x-ms-examples": { + "Update a job": { + "$ref": "./examples/Jobs_ReclassifyJob.json" + } + } + } + }, "/routing/jobs/{id}:cancel": { "post": { "tags": [ @@ -897,6 +1087,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -946,6 +1142,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -995,11 +1197,23 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { "$ref": "#/definitions/CloseJobResponse" } + }, + "202": { + "description": "Success", + "schema": { + "$ref": "#/definitions/CloseJobResponse" + } } }, "x-ms-examples": { @@ -1032,6 +1246,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1076,6 +1296,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1120,6 +1346,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1148,19 +1380,21 @@ "application/json" ], "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "in": "header", "name": "repeatability-request-id", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, { "in": "header", "name": "repeatability-first-sent", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "in": "body", "name": "jobQueue", @@ -1172,6 +1406,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "201": { "description": "Success", "schema": { @@ -1208,6 +1448,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1260,6 +1506,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1295,6 +1547,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1314,6 +1572,9 @@ ], "summary": "Deletes a queue by Id", "operationId": "JobRouter_DeleteQueue", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1327,6 +1588,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "204": { "description": "Success" } @@ -1361,6 +1628,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1389,19 +1662,21 @@ "application/json" ], "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - }, { "in": "header", "name": "repeatability-request-id", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, { "in": "header", "name": "repeatability-first-sent", + "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", "type": "string" }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, { "in": "body", "name": "routerWorker", @@ -1413,6 +1688,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1484,6 +1765,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1539,6 +1826,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1583,6 +1876,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "200": { "description": "Success", "schema": { @@ -1602,6 +1901,9 @@ ], "summary": "Deletes a worker and all of its traces.", "operationId": "JobRouter_DeleteWorker", + "produces": [ + "application/json" + ], "parameters": [ { "in": "path", @@ -1615,6 +1917,12 @@ } ], "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, "204": { "description": "Success" } @@ -1625,55 +1933,6 @@ } } } - }, - "/routing/workers/{workerId}/assignments/{assignmentId}:release": { - "post": { - "tags": [ - "Workers" - ], - "summary": "Releases capacity consumed by an assignment within a workers socket collection.", - "operationId": "JobRouter_ReleaseAssignmentAction", - "consumes": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "workerId", - "description": "Id of the worker to release assignment capacity", - "required": true, - "type": "string" - }, - { - "in": "path", - "name": "assignmentId", - "description": "Id of the assignment to release capacity", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "releaseAssignmentRequest", - "description": "Request to release assignment", - "schema": { - "$ref": "#/definitions/ReleaseAssignmentRequest" - } - } - ], - "responses": { - "200": { - "description": "Success" - } - }, - "x-ms-examples": { - "Release a Worker's Assignment": { - "$ref": "./examples/Workers_ReleaseAssignment.json" - } - } - } } }, "definitions": { @@ -1764,8 +2023,7 @@ "readOnly": true }, "scoringRule": { - "description": "(Optional)\r\nDefine a scoring rule to use, when calculating a score to determine the best worker.\r\nIf not set, will use a default scoring formula that uses the number of job labels that the worker\r\nlabels match, as well as the number of label selectors the worker labels match and/or exceed\r\nusing a logistic function (https://en.wikipedia.org/wiki/Logistic_function).", - "x-nullable": true + "$ref": "#/definitions/RouterRule" }, "scoringRuleOptions": { "$ref": "#/definitions/ScoringRuleOptions" @@ -1855,18 +2113,15 @@ "queueSelectors": { "description": "The queue selectors to resolve a queue for a given job.", "type": "array", - "items": {}, - "x-nullable": true + "items": { } }, "prioritizationRule": { - "description": "The rule to determine a priority score for a given job.", - "x-nullable": true + "$ref": "#/definitions/RouterRule" }, "workerSelectors": { "description": "The worker label selectors to attach to a given job.", "type": "array", - "items": {}, - "x-nullable": true + "items": { } } } }, @@ -1908,11 +2163,10 @@ "minLength": 0, "type": "string" }, - "releaseTime": { + "closeTime": { "format": "date-time", - "description": "If not provided, capacity will be released immediately.\r\nIf provided, the future time at which to release the capacity.", - "type": "string", - "x-nullable": true + "description": "If not provided, worker capacity is released immediately along with a JobClosedEvent notification.\r\nIf provided, worker capacity is released along with a JobClosedEvent notification at a future time.", + "type": "string" }, "note": { "description": "(Optional) A note that will be appended to the jobs' Notes collection with th current timestamp.", @@ -1925,6 +2179,9 @@ "CloseJobResponse": { "type": "object" }, + "CommunicationErrorResponse": { + "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/4b3d05177ad63685fbbb69f147ab104b85ecd7f4/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + }, "CompleteJobRequest": { "description": "Request payload for completing jobs", "required": [ @@ -1967,7 +2224,7 @@ "readOnly": true }, "condition": { - "description": "The condition that must be true for the label selectors to be attached" + "$ref": "#/definitions/RouterRule" }, "labelSelectors": { "description": "The label selectors to attach", @@ -1997,7 +2254,7 @@ "readOnly": true }, "condition": { - "description": "The condition that must be true for the label selectors to be attached" + "$ref": "#/definitions/RouterRule" }, "labelSelectors": { "description": "The label selectors to attach", @@ -2053,8 +2310,7 @@ }, "bypassSelectors": { "description": "(Optional)\r\nIf set to true, then router will match workers to jobs even if they don't match label selectors.\r\nWarning: You may get workers that are not qualified for the job they are matched with if you set this\r\nvariable to true. This flag is intended more for temporary usage.\r\nBy default, set to false.", - "type": "boolean", - "x-nullable": true + "type": "boolean" } }, "discriminator": "kind" @@ -2063,7 +2319,7 @@ "description": "Policy governing how jobs are distributed to workers", "required": [ "mode", - "offerTTL" + "offerTTLSeconds" ], "type": "object", "properties": { @@ -2076,12 +2332,13 @@ "description": "The human readable name of the policy.", "type": "string" }, - "offerTTL": { - "description": "The expiry time of any offers created under this policy will be governed by the offer time to live. Requires input conforming to ISO8601 duration format.", - "type": "string" + "offerTTLSeconds": { + "format": "double", + "description": "The expiry time of any offers created under this policy will be governed by the offer time to live.", + "type": "number" }, "mode": { - "description": "The policy governing the specific distribution method." + "$ref": "#/definitions/DistributionMode" } } }, @@ -2136,8 +2393,7 @@ "type": "object", "additionalProperties": { "$ref": "#/definitions/ExceptionRule" - }, - "x-nullable": true + } } } }, @@ -2169,7 +2425,7 @@ "type": "object", "properties": { "trigger": { - "description": "The exception trigger for this exception rule" + "$ref": "#/definitions/JobExceptionTrigger" }, "actions": { "description": "A dictionary collection of actions to perform once the exception is triggered. Key is the Id of each exception action.", @@ -2240,14 +2496,12 @@ "completeTime": { "format": "date-time", "description": "The time the job was marked as completed after being assigned.", - "type": "string", - "x-nullable": true + "type": "string" }, "closeTime": { "format": "date-time", "description": "The time the job was marked as closed after being completed.", - "type": "string", - "x-nullable": true + "type": "string" } } }, @@ -2308,14 +2562,12 @@ "offerTimeUtc": { "format": "date-time", "description": "The time the offer was created.", - "type": "string", - "x-nullable": true + "type": "string" }, "expiryTimeUtc": { "format": "date-time", "description": "The time that the offer will expire.", - "type": "string", - "x-nullable": true + "type": "string" } } }, @@ -2378,8 +2630,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "exceptionPolicyId": { "description": "(Optional) The ID of the exception policy that determines various job escalation rules.", @@ -2425,16 +2676,14 @@ "priority": { "format": "int32", "description": "Updated Priority.", - "type": "integer", - "x-nullable": true + "type": "integer" }, "workerSelectors": { "description": "Updated WorkerSelectors.", "type": "array", "items": { "$ref": "#/definitions/WorkerSelector" - }, - "x-nullable": true + } } }, "x-ms-discriminator-value": "manual-reclassify" @@ -2458,25 +2707,22 @@ "queueSelectors": { "description": "The queue selectors to resolve a queue for a given job.", "type": "array", - "items": {}, - "x-nullable": true + "items": { } }, "prioritizationRule": { - "description": "The rule to determine a priority score for a given job.", - "x-nullable": true + "$ref": "#/definitions/RouterRule" }, "workerSelectors": { "description": "The worker label selectors to attach to a given job.", "type": "array", - "items": {}, - "x-nullable": true + "items": { } } } }, "PagedDistributionPolicy": { "required": [ "mode", - "offerTTL" + "offerTTLSeconds" ], "type": "object", "properties": { @@ -2489,12 +2735,13 @@ "description": "The human readable name of the policy.", "type": "string" }, - "offerTTL": { - "description": "The expiry time of any offers created under this policy will be governed by the offer time to live. Requires input conforming to ISO8601 duration format.", - "type": "string" + "offerTTLSeconds": { + "format": "double", + "description": "The expiry time of any offers created under this policy will be governed by the offer time to live.", + "type": "number" }, "mode": { - "description": "The policy governing the specific distribution method." + "$ref": "#/definitions/DistributionMode" } } }, @@ -2515,8 +2762,7 @@ "type": "object", "additionalProperties": { "$ref": "#/definitions/ExceptionRule" - }, - "x-nullable": true + } } } }, @@ -2557,8 +2803,7 @@ "format": "date-time", "description": "The time a job was queued.", "type": "string", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "channelId": { "description": "The channel identifier. eg. voice, chat, etc.", @@ -2575,8 +2820,7 @@ "priority": { "format": "int32", "description": "The priority of this job.", - "type": "integer", - "x-nullable": true + "type": "integer" }, "dispositionCode": { "description": "Reason code for cancelled or closed jobs.", @@ -2587,8 +2831,7 @@ "type": "array", "items": { "$ref": "#/definitions/WorkerSelector" - }, - "x-nullable": true + } }, "attachedWorkerSelectors": { "description": "A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job.", @@ -2596,14 +2839,12 @@ "items": { "$ref": "#/definitions/WorkerSelector" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "assignments": { "description": "A collection of the assignments of the job.\r\nKey is AssignmentId.", @@ -2611,22 +2852,19 @@ "additionalProperties": { "$ref": "#/definitions/JobAssignment" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "tags": { "description": "A set of non-identifying attributes attached to this job", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "notes": { "description": "Notes attached to a job, sorted by timestamp", "type": "object", "additionalProperties": { "type": "string" - }, - "x-nullable": true + } } } }, @@ -2652,8 +2890,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "exceptionPolicyId": { "description": "(Optional) The ID of the exception policy that determines various job escalation rules.", @@ -2679,16 +2916,14 @@ "inactive" ], "type": "string", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "queueAssignments": { "description": "The queue(s) that this worker can receive work from.", "type": "object", "additionalProperties": { "$ref": "#/definitions/QueueAssignment" - }, - "x-nullable": true + } }, "totalCapacity": { "format": "int32", @@ -2698,22 +2933,19 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "tags": { "description": "A set of non-identifying attributes attached to this worker.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "channelConfigurations": { "description": "The channel(s) this worker can handle and their impact on the workers capacity.", "type": "object", "additionalProperties": { "$ref": "#/definitions/ChannelConfiguration" - }, - "x-nullable": true + } }, "offers": { "description": "A list of active offers issued to this worker.", @@ -2721,8 +2953,7 @@ "items": { "$ref": "#/definitions/JobOffer" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "assignedJobs": { "description": "A list of assigned jobs attached to this worker.", @@ -2730,20 +2961,17 @@ "items": { "$ref": "#/definitions/WorkerAssignment" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "loadRatio": { "format": "double", "description": "A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed.", "type": "number", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "availableForOffers": { "description": "A flag indicating this worker is open to receive offers or not.", - "type": "boolean", - "x-nullable": true + "type": "boolean" } } }, @@ -2828,10 +3056,10 @@ "modelAsString": false } }, - "ttl": { - "description": "Describes how long the attached label selector is valid. Requires input conforming to ISO8601 duration format.", - "type": "string", - "x-nullable": true + "ttlSeconds": { + "format": "double", + "description": "Describes how long the attached label selector is valid in seconds.", + "type": "number" } }, "x-ms-discriminator-value": "pass-through" @@ -2914,7 +3142,7 @@ }, "value": { "description": "The value to compare against the actual label value with the given operator", - "x-nullable": true + "type": "object" } } }, @@ -2954,8 +3182,12 @@ "additionalProperties": { "format": "double", "type": "number" - }, - "x-nullable": true + } + }, + "longestJobWaitTimeMinutes": { + "format": "double", + "description": "The wait time of the job that has been enqueued in this queue for the longest.", + "type": "number" } } }, @@ -3002,33 +3234,13 @@ "labelsToUpsert": { "description": "(optional) Dictionary containing the labels to update (or add if not existing) in key-value pairs", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } } }, "x-ms-discriminator-value": "reclassify" }, - "ReleaseAssignmentRequest": { - "type": "object", - "properties": { - "releaseTime": { - "format": "date-time", - "description": "If not provided, capacity will be released immediately.\r\nIf provided, the future time at which to release the capacity.", - "type": "string", - "x-nullable": true - } - } - }, - "RepeatabilityHeaders": { - "type": "object", - "properties": { - "repeatabilityRequestId": { - "type": "string" - }, - "repeatabilityFirstSent": { - "type": "string" - } - } + "ReclassifyJobRequest": { + "type": "object" }, "RoundRobinMode": { "description": "Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job.", @@ -3084,8 +3296,7 @@ "format": "date-time", "description": "The time a job was queued.", "type": "string", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "channelId": { "description": "The channel identifier. eg. voice, chat, etc.", @@ -3102,8 +3313,7 @@ "priority": { "format": "int32", "description": "The priority of this job.", - "type": "integer", - "x-nullable": true + "type": "integer" }, "dispositionCode": { "description": "Reason code for cancelled or closed jobs.", @@ -3114,8 +3324,7 @@ "type": "array", "items": { "$ref": "#/definitions/WorkerSelector" - }, - "x-nullable": true + } }, "attachedWorkerSelectors": { "description": "A collection of label selectors attached by a classification policy, which a worker must satisfy in order to process this job.", @@ -3123,14 +3332,12 @@ "items": { "$ref": "#/definitions/WorkerSelector" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "assignments": { "description": "A collection of the assignments of the job.\r\nKey is AssignmentId.", @@ -3138,22 +3345,19 @@ "additionalProperties": { "$ref": "#/definitions/JobAssignment" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "tags": { "description": "A set of non-identifying attributes attached to this job", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "notes": { "description": "Notes attached to a job, sorted by timestamp", "type": "object", "additionalProperties": { "type": "string" - }, - "x-nullable": true + } } } }, @@ -3188,16 +3392,14 @@ "inactive" ], "type": "string", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "queueAssignments": { "description": "The queue(s) that this worker can receive work from.", "type": "object", "additionalProperties": { "$ref": "#/definitions/QueueAssignment" - }, - "x-nullable": true + } }, "totalCapacity": { "format": "int32", @@ -3207,22 +3409,19 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "tags": { "description": "A set of non-identifying attributes attached to this worker.", "type": "object", - "additionalProperties": {}, - "x-nullable": true + "additionalProperties": { } }, "channelConfigurations": { "description": "The channel(s) this worker can handle and their impact on the workers capacity.", "type": "object", "additionalProperties": { "$ref": "#/definitions/ChannelConfiguration" - }, - "x-nullable": true + } }, "offers": { "description": "A list of active offers issued to this worker.", @@ -3230,8 +3429,7 @@ "items": { "$ref": "#/definitions/JobOffer" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "assignedJobs": { "description": "A list of assigned jobs attached to this worker.", @@ -3239,20 +3437,17 @@ "items": { "$ref": "#/definitions/WorkerAssignment" }, - "readOnly": true, - "x-nullable": true + "readOnly": true }, "loadRatio": { "format": "double", "description": "A value indicating the workers capacity. A value of '1' means all capacity is consumed. A value of '0' means no capacity is currently consumed.", "type": "number", - "readOnly": true, - "x-nullable": true + "readOnly": true }, "availableForOffers": { "description": "A flag indicating this worker is open to receive offers or not.", - "type": "boolean", - "x-nullable": true + "type": "boolean" } } }, @@ -3272,7 +3467,7 @@ "readOnly": true }, "rule": { - "description": "A RouterRule that resolves a collection of LabelSelector to attach" + "$ref": "#/definitions/RouterRule" } }, "x-ms-discriminator-value": "rule-engine" @@ -3293,7 +3488,7 @@ "readOnly": true }, "rule": { - "description": "A RouterRule that resolves a collection of LabelSelector to attach" + "$ref": "#/definitions/RouterRule" } }, "x-ms-discriminator-value": "rule-engine" @@ -3305,8 +3500,7 @@ "batchSize": { "format": "int32", "description": "(Optional) Set batch size when AllowScoringBatchOfWorkers is set to true", - "type": "integer", - "x-nullable": true + "type": "integer" }, "scoringParameters": { "description": "(Optional) List of extra parameters from the job that will be sent as part of the payload to scoring rule.\r\nIf not set, the job's labels (sent in the payload as `job`) and the job's worker selectors (sent in the payload as `selectors`)\r\nare added to the payload of the scoring rule by default.\r\nNote: Worker labels are always sent with scoring payload.", @@ -3315,25 +3509,22 @@ "description": "Supported parameters for scoring workers", "enum": [ "jobLabels", - "labelSelectors" + "workerSelectors" ], "type": "string", "x-ms-enum": { "name": "ScoringRuleParameterSelector", "modelAsString": false } - }, - "x-nullable": true + } }, "allowScoringBatchOfWorkers": { "description": "(Optional)\r\nIf set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`.\r\nBy default, set to false and the parameter name for the worker labels will be sent as `worker`.\r\nNote: If enabled, use BatchSize to set batch size.", - "type": "boolean", - "x-nullable": true + "type": "boolean" }, "descendingOrder": { "description": "(Optional)\r\nIf false, will sort scores by ascending order. By default, set to true.", - "type": "boolean", - "x-nullable": true + "type": "boolean" } } }, @@ -3376,7 +3567,7 @@ "description": "The static value this rule always returns.", "maxLength": 500, "minLength": 0, - "x-nullable": true + "type": "object" } }, "x-ms-discriminator-value": "static-rule" @@ -3557,12 +3748,12 @@ }, "value": { "description": "The value to compare against the actual label value with the given operator", - "x-nullable": true + "type": "object" }, - "ttl": { - "description": "Describes how long this label selector is valid. Requires input conforming to ISO8601 duration format.", - "type": "string", - "x-nullable": true + "ttlSeconds": { + "format": "double", + "description": "Describes how long this label selector is valid in seconds.", + "type": "number" }, "expedite": { "description": "Pushes the job to the front of the queue as long as this selector is active.", @@ -3610,6 +3801,7 @@ "in": "query", "name": "api-version", "description": "Version of API to invoke.", + "required": true, "type": "string", "x-ms-parameter-location": "method" }, @@ -3632,4 +3824,4 @@ } ] } -} +} \ No newline at end of file diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_UpdateClassificationPolicy.json similarity index 96% rename from specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json rename to specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_UpdateClassificationPolicy.json index 3b70732d4be8..83d7902f6dfd 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_PatchClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_UpdateClassificationPolicy.json @@ -3,7 +3,7 @@ "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", "id": "90eb00c4-234e-4df7-a231-ef7895518384", - "patchClassificationPolicy": { + "patch": { "name": "MainUpdate" } }, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json similarity index 100% rename from specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_PatchDistributionPolicy.json rename to specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_UpdateExceptionPolicy.json similarity index 97% rename from specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json rename to specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_UpdateExceptionPolicy.json index 45d5c8bc5f0a..9dbaa681e61c 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_PatchExceptionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_UpdateExceptionPolicy.json @@ -3,7 +3,7 @@ "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20-preview2", "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb", - "patchExceptionPolicy": { + "patch": { "name": "Main test", "exceptionRules": { "MaxWaitTimeExceeded": { diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json new file mode 100644 index 000000000000..b088572a8386 --- /dev/null +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "endpoint": "https://contoso.westus.communications.azure.com", + "api-version": "2021-10-20_preview2", + "id": "8780b28c-7079-4de1-9143-4d369289e958", + "reclassifyJobRequest": { + } + }, + "responses": { + "200": { + "body": { + "id": "383541b3-5637-4af6-8aac-3391da8a578a", + } + } + } +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json index 9a52aa474f4a..ead4a86cc93e 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json @@ -3,7 +3,7 @@ "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", "id": "8780b28c-7079-4de1-9143-4d369289e958", - "updateJobRequest": { + "patch": { "id": "383541b3-5637-4af6-8aac-3391da8a578a", "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af" } From b4e7259e87c329d90b8cb789fd442c3a4c392911 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Wed, 6 Apr 2022 13:12:25 -0700 Subject: [PATCH 10/23] prettier and avocado fixes --- .../communicationservicejobrouter.json | 32 +++++++++---------- .../examples/Jobs_ReclassifyJob.json | 5 ++- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 56f5a3515558..5241381acf8b 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -2113,7 +2113,7 @@ "queueSelectors": { "description": "The queue selectors to resolve a queue for a given job.", "type": "array", - "items": { } + "items": {} }, "prioritizationRule": { "$ref": "#/definitions/RouterRule" @@ -2121,7 +2121,7 @@ "workerSelectors": { "description": "The worker label selectors to attach to a given job.", "type": "array", - "items": { } + "items": {} } } }, @@ -2630,7 +2630,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "exceptionPolicyId": { "description": "(Optional) The ID of the exception policy that determines various job escalation rules.", @@ -2707,7 +2707,7 @@ "queueSelectors": { "description": "The queue selectors to resolve a queue for a given job.", "type": "array", - "items": { } + "items": {} }, "prioritizationRule": { "$ref": "#/definitions/RouterRule" @@ -2715,7 +2715,7 @@ "workerSelectors": { "description": "The worker label selectors to attach to a given job.", "type": "array", - "items": { } + "items": {} } } }, @@ -2844,7 +2844,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "assignments": { "description": "A collection of the assignments of the job.\r\nKey is AssignmentId.", @@ -2857,7 +2857,7 @@ "tags": { "description": "A set of non-identifying attributes attached to this job", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "notes": { "description": "Notes attached to a job, sorted by timestamp", @@ -2890,7 +2890,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "exceptionPolicyId": { "description": "(Optional) The ID of the exception policy that determines various job escalation rules.", @@ -2933,12 +2933,12 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "tags": { "description": "A set of non-identifying attributes attached to this worker.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "channelConfigurations": { "description": "The channel(s) this worker can handle and their impact on the workers capacity.", @@ -3234,7 +3234,7 @@ "labelsToUpsert": { "description": "(optional) Dictionary containing the labels to update (or add if not existing) in key-value pairs", "type": "object", - "additionalProperties": { } + "additionalProperties": {} } }, "x-ms-discriminator-value": "reclassify" @@ -3337,7 +3337,7 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "assignments": { "description": "A collection of the assignments of the job.\r\nKey is AssignmentId.", @@ -3350,7 +3350,7 @@ "tags": { "description": "A set of non-identifying attributes attached to this job", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "notes": { "description": "Notes attached to a job, sorted by timestamp", @@ -3409,12 +3409,12 @@ "labels": { "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "tags": { "description": "A set of non-identifying attributes attached to this worker.", "type": "object", - "additionalProperties": { } + "additionalProperties": {} }, "channelConfigurations": { "description": "The channel(s) this worker can handle and their impact on the workers capacity.", @@ -3824,4 +3824,4 @@ } ] } -} \ No newline at end of file +} diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json index b088572a8386..27b4f5da691a 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json @@ -3,13 +3,12 @@ "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", "id": "8780b28c-7079-4de1-9143-4d369289e958", - "reclassifyJobRequest": { - } + "reclassifyJobRequest": {} }, "responses": { "200": { "body": { - "id": "383541b3-5637-4af6-8aac-3391da8a578a", + "id": "383541b3-5637-4af6-8aac-3391da8a578a" } } } From 457cf34003283f79e2d730731492df9f026cf8ba Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 7 Apr 2022 15:38:30 -0700 Subject: [PATCH 11/23] fix other issues --- .../communicationservicejobrouter.json | 58 ++++++++++++++++++- .../examples/Jobs_CloseJob.json | 3 + .../examples/Jobs_ReclassifyJob.json | 4 +- .../examples/Jobs_UpdateJob.json | 2 +- .../examples/Workers_ReleaseAssignment.json | 14 ----- 5 files changed, 61 insertions(+), 20 deletions(-) delete mode 100644 specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 5241381acf8b..b637d79cb894 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -380,6 +380,7 @@ "in": "body", "name": "patch", "description": "Model of distribution policy properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", + "required": true, "schema": { "$ref": "#/definitions/DistributionPolicy" } @@ -619,6 +620,7 @@ "in": "body", "name": "patch", "description": "Model of exception policy to be updated", + "required": true, "schema": { "$ref": "#/definitions/ExceptionPolicy" } @@ -1041,7 +1043,7 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/RouterJob" + "$ref": "#/definitions/ReclassifyJobResponse" } } }, @@ -1500,6 +1502,7 @@ "in": "body", "name": "patch", "description": "Model of queue properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", + "required": true, "schema": { "$ref": "#/definitions/JobQueue" } @@ -1820,6 +1823,7 @@ "in": "body", "name": "patch", "description": "Model of worker properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", + "required": true, "schema": { "$ref": "#/definitions/RouterWorker" } @@ -2179,8 +2183,55 @@ "CloseJobResponse": { "type": "object" }, + "CommunicationError": { + "description": "The Communication Services error.", + "type": "object", + "required": [ + "code", + "message" + ], + "properties": { + "code": { + "type": "string", + "description": "The error code." + }, + "message": { + "type": "string", + "description": "The error message." + }, + "target": { + "type": "string", + "readOnly": true, + "description": "The error target." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CommunicationError" + }, + "readOnly": true, + "description": "Further details about specific errors that led to this error." + }, + "innererror": { + "x-ms-client-name": "innerError", + "readOnly": true, + "$ref": "#/definitions/CommunicationError", + "description": "The inner error if any." + } + } + }, "CommunicationErrorResponse": { - "$ref": "https://github.com/Azure/azure-rest-api-specs/blob/4b3d05177ad63685fbbb69f147ab104b85ecd7f4/specification/communication/data-plane/Common/stable/2021-03-07/common.json#/definitions/CommunicationErrorResponse" + "description": "The Communication Services error.", + "type": "object", + "required": [ + "error" + ], + "properties": { + "error": { + "description": "The Communication Services error.", + "$ref": "#/definitions/CommunicationError" + } + } }, "CompleteJobRequest": { "description": "Request payload for completing jobs", @@ -3242,6 +3293,9 @@ "ReclassifyJobRequest": { "type": "object" }, + "ReclassifyJobResponse": { + "type": "object" + }, "RoundRobinMode": { "description": "Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job.", "type": "object", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json index dbc15b62cc11..cf2170ebc654 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CloseJob.json @@ -11,6 +11,9 @@ "responses": { "200": { "body": {} + }, + "202": { + "body": {} } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json index 27b4f5da691a..ff4dfef12ab2 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_ReclassifyJob.json @@ -7,9 +7,7 @@ }, "responses": { "200": { - "body": { - "id": "383541b3-5637-4af6-8aac-3391da8a578a" - } + "body": {} } } } diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json index ead4a86cc93e..9b4a7f3c7ae3 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json @@ -25,7 +25,7 @@ "key": "Sales", "labelOperator": "equal", "value": true, - "ttl": null + "ttlSeconds": null } ], "attachedWorkerSelectors": [], diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json deleted file mode 100644 index 813253ae36a6..000000000000 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_ReleaseAssignment.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "endpoint": "https://contoso.westus.communications.azure.com", - "api-version": "2021-10-20_preview2", - "workerId": "DefaultWorker", - "assignmentId": "632f5345-220b-4e46-b31f-aeaf03cc2df9", - "releaseAssignmentRequest": { - "releaseTime": "2021-10-01T00:00:00Z" - } - }, - "responses": { - "200": {} - } -} From c38104f5322b05f383a65d7d1a715a9821fd4a64 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 11 Apr 2022 11:22:17 -0700 Subject: [PATCH 12/23] add offerttlseonds to examples --- .../2021-10-20-preview2/communicationservicejobrouter.json | 3 --- .../DistributionPolicies_CreateDistributionPolicy.json | 4 ++-- .../examples/DistributionPolicies_GetDistributionPolicy.json | 2 +- ...ributionPolicies_ListDistributionPoliciesWithPageSize.json | 4 ++-- .../DistributionPolicies_UpdateDistributionPolicy.json | 4 ++-- .../preview/2021-10-20-preview2/examples/Jobs_CreateJob.json | 2 +- .../preview/2021-10-20-preview2/examples/Jobs_GetJob.json | 2 +- .../preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json | 1 - 8 files changed, 9 insertions(+), 13 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index b637d79cb894..1e6fc669333e 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -3314,9 +3314,6 @@ }, "RouterJob": { "description": "A unit of work to be routed", - "required": [ - "channelId" - ], "type": "object", "properties": { "id": { diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json index d3346c8afc82..419f4253c246 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json @@ -9,7 +9,7 @@ "maxConcurrentOffers": 5, "bypassSelectors": false }, - "offerTTL": "00:05:00", + "offerTTLSeconds": 300, "name": "Main" } }, @@ -18,7 +18,7 @@ "body": { "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", "name": "Main", - "offerTTL": "00:05:00", + "offerTTLSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json index 2801669e03e2..14f5244193e8 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json @@ -9,7 +9,7 @@ "body": { "id": "MainDistributionPolicy", "name": "Main", - "offerTTL": "00:05:00", + "offerTTLSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json index ba4ac6d62702..aaf9c8647613 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json @@ -11,7 +11,7 @@ { "id": "SecondaryDistributionPolicy", "name": "Secondary", - "offerTTL": "00:03:00", + "offerTTLSeconds": 300, "mode": { "kind": "round-robin", "minConcurrentOffers": 1, @@ -22,7 +22,7 @@ { "id": "MainDistributionPolicy", "name": "Main", - "offerTTL": "00:05:00", + "offerTTLSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json index 41980d606fa7..49955ef122e1 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json @@ -10,7 +10,7 @@ "maxConcurrentOffers": 5, "bypassSelectors": false }, - "offerTTL": "00:05:00", + "offerTTLSeconds": 300, "name": "Main" } }, @@ -19,7 +19,7 @@ "body": { "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", "name": "Main", - "offerTTL": "00:05:00", + "offerTTLSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json index d40f9b5c03a4..fc1b88a5287d 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json @@ -36,7 +36,7 @@ "key": "Sales", "labelOperator": "equal", "value": true, - "ttl": null + "ttlSeconds": null } ], "attachedWorkerSelectors": [], diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json index f3eebbae4084..71a7af26d5fa 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_GetJob.json @@ -21,7 +21,7 @@ "key": "Sales", "labelOperator": "equal", "value": true, - "ttl": null + "ttlSeconds": null } ], "attachedWorkerSelectors": [], diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json index 9b4a7f3c7ae3..9011a05af518 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_UpdateJob.json @@ -4,7 +4,6 @@ "api-version": "2021-10-20_preview2", "id": "8780b28c-7079-4de1-9143-4d369289e958", "patch": { - "id": "383541b3-5637-4af6-8aac-3391da8a578a", "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af" } }, From 3d4f429bea2ce07842640505bd6d33fbaeea4714 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 11 Apr 2022 15:49:49 -0700 Subject: [PATCH 13/23] remove readonlys --- .../communicationservicejobrouter.json | 39 +++++++------------ ...tionPolicies_CreateDistributionPolicy.json | 4 +- ...ibutionPolicies_GetDistributionPolicy.json | 2 +- ..._ListDistributionPoliciesWithPageSize.json | 4 +- ...tionPolicies_UpdateDistributionPolicy.json | 4 +- 5 files changed, 21 insertions(+), 32 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 1e6fc669333e..5856936a9c66 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -1975,8 +1975,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" }, "functionUrl": { "format": "uri", @@ -2023,8 +2022,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" }, "scoringRule": { "$ref": "#/definitions/RouterRule" @@ -2330,8 +2328,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" } }, "x-ms-discriminator-value": "direct-map-rule" @@ -2370,7 +2367,7 @@ "description": "Policy governing how jobs are distributed to workers", "required": [ "mode", - "offerTTLSeconds" + "offerTtlSeconds" ], "type": "object", "properties": { @@ -2383,7 +2380,7 @@ "description": "The human readable name of the policy.", "type": "string" }, - "offerTTLSeconds": { + "offerTtlSeconds": { "format": "double", "description": "The expiry time of any offers created under this policy will be governed by the offer time to live.", "type": "number" @@ -2501,8 +2498,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" }, "language": { "description": "The expression language to compile to and execute", @@ -2699,8 +2695,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" } }, "x-ms-discriminator-value": "longest-idle" @@ -2773,7 +2768,7 @@ "PagedDistributionPolicy": { "required": [ "mode", - "offerTTLSeconds" + "offerTtlSeconds" ], "type": "object", "properties": { @@ -2786,7 +2781,7 @@ "description": "The human readable name of the policy.", "type": "string" }, - "offerTTLSeconds": { + "offerTtlSeconds": { "format": "double", "description": "The expiry time of any offers created under this policy will be governed by the offer time to live.", "type": "number" @@ -2818,9 +2813,6 @@ } }, "PagedJob": { - "required": [ - "channelId" - ], "type": "object", "properties": { "id": { @@ -3151,8 +3143,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" }, "threshold": { "format": "int32", @@ -3306,8 +3297,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" } }, "x-ms-discriminator-value": "round-robin" @@ -3413,6 +3403,7 @@ } }, "RouterRule": { + "description": "A rule of one of the following types:\r\n \r\nStaticRule: A rule providing static rules that always return the same result, regardless of input.\r\nDirectMapRule: A rule that return the same labels as the input labels.\r\nExpressionRule: A rule providing inline expression rules.\r\nAzureFunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.", "required": [ "kind" ], @@ -3611,8 +3602,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" }, "value": { "description": "The static value this rule always returns.", @@ -3658,8 +3648,7 @@ ], "properties": { "kind": { - "type": "string", - "readOnly": true + "type": "string" }, "threshold": { "description": "Threshold for wait time for this trigger. Requires input conforming to ISO8601 duration format.", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json index 419f4253c246..9454f1399497 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json @@ -9,7 +9,7 @@ "maxConcurrentOffers": 5, "bypassSelectors": false }, - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "name": "Main" } }, @@ -18,7 +18,7 @@ "body": { "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", "name": "Main", - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json index 14f5244193e8..7d4ba11ea108 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_GetDistributionPolicy.json @@ -9,7 +9,7 @@ "body": { "id": "MainDistributionPolicy", "name": "Main", - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json index aaf9c8647613..7044e969e8f5 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json @@ -11,7 +11,7 @@ { "id": "SecondaryDistributionPolicy", "name": "Secondary", - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "mode": { "kind": "round-robin", "minConcurrentOffers": 1, @@ -22,7 +22,7 @@ { "id": "MainDistributionPolicy", "name": "Main", - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json index 49955ef122e1..5ff2c3d2e8b7 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_UpdateDistributionPolicy.json @@ -10,7 +10,7 @@ "maxConcurrentOffers": 5, "bypassSelectors": false }, - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "name": "Main" } }, @@ -19,7 +19,7 @@ "body": { "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", "name": "Main", - "offerTTLSeconds": 300, + "offerTtlSeconds": 300, "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, From 550b63b6380420928031df36f8dbd965efc652fd Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 25 Apr 2022 18:22:05 -0700 Subject: [PATCH 14/23] Change to upsert routes --- .../communicationservicejobrouter.json | 888 ++++++------------ ...onPolicies_CreateClassificationPolicy.json | 5 +- ...tionPolicies_CreateDistributionPolicy.json | 5 +- ...ceptionPolicies_CreateExceptionPolicy.json | 5 +- .../examples/Jobs_CreateJob.json | 11 +- .../examples/Queues_CreateQueue.json | 5 +- .../examples/Queues_UpdateQueue.json | 4 +- .../examples/Workers_CreateWorker.json | 29 +- 8 files changed, 311 insertions(+), 641 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 5856936a9c66..193ce83df365 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -6,119 +6,13 @@ "version": "2021-10-20-preview2" }, "paths": { - "/routing/classificationPolicies": { - "post": { - "tags": [ - "ClassificationPolicies" - ], - "summary": "Creates a new classification policy.", - "operationId": "JobRouter_CreateClassificationPolicy", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "header", - "name": "repeatability-request-id", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "in": "header", - "name": "repeatability-first-sent", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "classificationPolicy", - "description": "Model of classification policy to create", - "required": true, - "schema": { - "$ref": "#/definitions/ClassificationPolicy" - } - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ClassificationPolicy" - } - } - }, - "x-ms-examples": { - "Creates a Classification policy": { - "$ref": "./examples/ClassificationPolicies_CreateClassificationPolicy.json" - } - } - }, - "get": { - "tags": [ - "ClassificationPolicies" - ], - "summary": "Retrieves existing classification policies", - "operationId": "JobRouter_ListClassificationPolicies", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "maxpagesize", - "description": "Maximum page size", - "type": "integer", - "format": "int32", - "default": 20 - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ClassificationPolicyCollection" - } - } - }, - "x-ms-examples": { - "Get Classification policies with pagination (max page size)": { - "$ref": "./examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json" - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink", - "itemName": "value" - } - } - }, "/routing/classificationPolicies/{id}": { "patch": { "tags": [ "ClassificationPolicies" ], - "summary": "Updates a classification policy.", - "operationId": "JobRouter_UpdateClassificationPolicy", + "summary": "Upsert a classification policy.", + "operationId": "JobRouter_UpsertClassificationPolicy", "consumes": [ "application/merge-patch+json" ], @@ -129,7 +23,7 @@ { "in": "path", "name": "id", - "description": "The id of classification policy.", + "description": "Id of the classification policy", "required": true, "type": "string" }, @@ -139,7 +33,7 @@ { "in": "body", "name": "patch", - "description": "JSON Document contained the partial update for the classification policy.", + "description": "Model of classification policy properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", "required": true, "schema": { "$ref": "#/definitions/ClassificationPolicy" @@ -161,6 +55,9 @@ } }, "x-ms-examples": { + "Creates a Classification policy": { + "$ref": "./examples/ClassificationPolicies_CreateClassificationPolicy.json" + }, "Update a Classification policy": { "$ref": "./examples/ClassificationPolicies_UpdateClassificationPolicy.json" } @@ -246,71 +143,13 @@ } } }, - "/routing/distributionPolicies": { - "post": { - "tags": [ - "DistributionPolicies" - ], - "summary": "Creates a new distribution policy.", - "operationId": "JobRouter_CreateDistributionPolicy", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "header", - "name": "repeatability-request-id", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "in": "header", - "name": "repeatability-first-sent", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "distributionPolicy", - "description": "Request to create distribution policy", - "required": true, - "schema": { - "$ref": "#/definitions/DistributionPolicy" - } - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DistributionPolicy" - } - } - }, - "x-ms-examples": { - "Creates a Distribution policy": { - "$ref": "./examples/DistributionPolicies_CreateDistributionPolicy.json" - } - } - }, + "/routing/classificationPolicies": { "get": { "tags": [ - "DistributionPolicies" + "ClassificationPolicies" ], - "summary": "Retrieves existing distribution policies", - "operationId": "JobRouter_ListDistributionPolicies", + "summary": "Retrieves existing classification policies", + "operationId": "JobRouter_ListClassificationPolicies", "produces": [ "application/json" ], @@ -337,13 +176,13 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DistributionPolicyCollection" + "$ref": "#/definitions/ClassificationPolicyCollection" } } }, "x-ms-examples": { - "Get Distribution policies with pagination (max page size)": { - "$ref": "./examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json" + "Get Classification policies with pagination (max page size)": { + "$ref": "./examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json" } }, "x-ms-pageable": { @@ -357,8 +196,8 @@ "tags": [ "DistributionPolicies" ], - "summary": "Updates a distribution policy.", - "operationId": "JobRouter_UpdateDistributionPolicy", + "summary": "Upsert a distribution policy.", + "operationId": "JobRouter_UpsertDistributionPolicy", "consumes": [ "application/merge-patch+json" ], @@ -401,6 +240,9 @@ } }, "x-ms-examples": { + "Creates a Distribution policy": { + "$ref": "./examples/DistributionPolicies_CreateDistributionPolicy.json" + }, "Update a Distribution policy": { "$ref": "./examples/DistributionPolicies_UpdateDistributionPolicy.json" } @@ -486,71 +328,13 @@ } } }, - "/routing/exceptionPolicies": { - "post": { - "tags": [ - "ExceptionPolicies" - ], - "summary": "Creates an exception policy", - "operationId": "JobRouter_CreateExceptionPolicy", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "header", - "name": "repeatability-request-id", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "in": "header", - "name": "repeatability-first-sent", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "exceptionPolicy", - "description": "Model of exception policy to be created", - "required": true, - "schema": { - "$ref": "#/definitions/ExceptionPolicy" - } - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/ExceptionPolicy" - } - } - }, - "x-ms-examples": { - "Create a Exception policy": { - "$ref": "./examples/ExceptionPolicies_CreateExceptionPolicy.json" - } - } - }, + "/routing/distributionPolicies": { "get": { "tags": [ - "ExceptionPolicies" + "DistributionPolicies" ], - "summary": "Retrieves existing exception policies", - "operationId": "JobRouter_ListExceptionPolicies", + "summary": "Retrieves existing distribution policies", + "operationId": "JobRouter_ListDistributionPolicies", "produces": [ "application/json" ], @@ -558,7 +342,7 @@ { "in": "query", "name": "maxpagesize", - "description": "Number of objects to return per page", + "description": "Maximum page size", "type": "integer", "format": "int32", "default": 20 @@ -577,13 +361,13 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/ExceptionPolicyCollection" + "$ref": "#/definitions/DistributionPolicyCollection" } } }, "x-ms-examples": { - "Get Exception policies with pagination (max page size)": { - "$ref": "./examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json" + "Get Distribution policies with pagination (max page size)": { + "$ref": "./examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json" } }, "x-ms-pageable": { @@ -597,8 +381,8 @@ "tags": [ "ExceptionPolicies" ], - "summary": "Updates an exception policy", - "operationId": "JobRouter_UpdateExceptionPolicy", + "summary": "Upsert a exception policy.", + "operationId": "JobRouter_UpsertExceptionPolicy", "consumes": [ "application/merge-patch+json" ], @@ -619,7 +403,7 @@ { "in": "body", "name": "patch", - "description": "Model of exception policy to be updated", + "description": "Model of exception policy properties to be patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", "required": true, "schema": { "$ref": "#/definitions/ExceptionPolicy" @@ -641,6 +425,9 @@ } }, "x-ms-examples": { + "Creates a Exception policy": { + "$ref": "./examples/ExceptionPolicies_CreateExceptionPolicy.json" + }, "Update a Exception policy": { "$ref": "./examples/ExceptionPolicies_UpdateExceptionPolicy.json" } @@ -712,123 +499,31 @@ "default": { "description": "Error", "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "204": { - "description": "Success" - } - }, - "x-ms-examples": { - "Delete a Exception policy": { - "$ref": "./examples/ExceptionPolicies_DeleteExceptionPolicy.json" - } - } - } - }, - "/routing/jobs": { - "post": { - "tags": [ - "Jobs" - ], - "summary": "Creates a new job to be routed.", - "operationId": "JobRouter_CreateJob", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "header", - "name": "repeatability-request-id", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "in": "header", - "name": "repeatability-first-sent", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "routerJob", - "description": "Model of job to be created", - "required": true, - "schema": { - "$ref": "#/definitions/RouterJob" - } - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/RouterJob" + "$ref": "#/definitions/CommunicationErrorResponse" } + }, + "204": { + "description": "Success" } }, "x-ms-examples": { - "Creates a new Job": { - "$ref": "./examples/Jobs_CreateJob.json" + "Delete a Exception policy": { + "$ref": "./examples/ExceptionPolicies_DeleteExceptionPolicy.json" } } - }, + } + }, + "/routing/exceptionPolicies": { "get": { "tags": [ - "Jobs" + "ExceptionPolicies" ], - "summary": "Retrieves list of jobs based on filter parameters", - "operationId": "JobRouter_ListJobs", + "summary": "Retrieves existing exception policies", + "operationId": "JobRouter_ListExceptionPolicies", "produces": [ "application/json" ], "parameters": [ - { - "in": "query", - "name": "status", - "description": "(Optional) If specified, filter jobs by status.", - "type": "string", - "default": "all", - "enum": [ - "all", - "pendingClassification", - "queued", - "assigned", - "completed", - "closed", - "cancelled", - "classificationFailed", - "active" - ], - "x-ms-enum": { - "name": "JobStateSelector", - "modelAsString": false - } - }, - { - "in": "query", - "name": "queueId", - "description": "(Optional) If specified, filter jobs by queue.", - "type": "string" - }, - { - "in": "query", - "name": "channelId", - "description": "(Optional) If specified, filter jobs by channel.", - "type": "string" - }, { "in": "query", "name": "maxpagesize", @@ -851,13 +546,13 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/JobCollection" + "$ref": "#/definitions/ExceptionPolicyCollection" } } }, "x-ms-examples": { - "Gets a list of jobs with pagination (max page size)": { - "$ref": "./examples/Jobs_GetJobsWithPageSize.json" + "Get Exception policies with pagination (max page size)": { + "$ref": "./examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json" } }, "x-ms-pageable": { @@ -867,12 +562,14 @@ } }, "/routing/jobs/{id}": { - "get": { + "patch": { "tags": [ "Jobs" ], - "summary": "Retrieves an existing job by Id", - "operationId": "JobRouter_GetJob", + "operationId": "JobRouter_UpsertJob", + "consumes": [ + "application/merge-patch+json" + ], "produces": [ "application/json" ], @@ -880,12 +577,19 @@ { "in": "path", "name": "id", - "description": "Id of the job to retrieve", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" + }, + { + "in": "body", + "name": "patch", + "required": true, + "schema": { + "$ref": "#/definitions/RouterJob" + } } ], "responses": { @@ -903,20 +607,20 @@ } }, "x-ms-examples": { - "Get a single Job": { - "$ref": "./examples/Jobs_GetJob.json" + "Creates a new Job": { + "$ref": "./examples/Jobs_CreateJob.json" + }, + "Update a job": { + "$ref": "./examples/Jobs_UpdateJob.json" } } }, - "patch": { + "get": { "tags": [ "Jobs" ], - "summary": "Update job by id.", - "operationId": "JobRouter_UpdateJob", - "consumes": [ - "application/merge-patch+json" - ], + "summary": "Retrieves an existing job by Id", + "operationId": "JobRouter_GetJob", "produces": [ "application/json" ], @@ -924,20 +628,12 @@ { "in": "path", "name": "id", - "description": "Id of the job", + "description": "Id of the job to retrieve", "required": true, "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "patch", - "description": "Request model for patching a job", - "schema": { - "$ref": "#/definitions/RouterJob" - } } ], "responses": { @@ -955,8 +651,8 @@ } }, "x-ms-examples": { - "Update a job": { - "$ref": "./examples/Jobs_UpdateJob.json" + "Get a single Job": { + "$ref": "./examples/Jobs_GetJob.json" } } }, @@ -1225,24 +921,59 @@ } } }, - "/routing/jobs/{id}/position": { + "/routing/jobs": { "get": { "tags": [ "Jobs" ], - "summary": "Gets a job's position details.", - "operationId": "JobRouter_GetInQueuePosition", + "summary": "Retrieves list of jobs based on filter parameters", + "operationId": "JobRouter_ListJobs", "produces": [ "application/json" ], "parameters": [ { - "in": "path", - "name": "id", - "description": "Id of the job", - "required": true, + "in": "query", + "name": "status", + "description": "(Optional) If specified, filter jobs by status.", + "type": "string", + "default": "all", + "enum": [ + "all", + "pendingClassification", + "queued", + "assigned", + "completed", + "closed", + "cancelled", + "classificationFailed", + "active" + ], + "x-ms-enum": { + "name": "JobStateSelector", + "modelAsString": false + } + }, + { + "in": "query", + "name": "queueId", + "description": "(Optional) If specified, filter jobs by queue.", + "type": "string" + }, + { + "in": "query", + "name": "channelId", + "description": "(Optional) If specified, filter jobs by channel.", "type": "string" }, + { + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 + }, { "$ref": "#/parameters/ApiVersionParameter" } @@ -1257,39 +988,36 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/JobPositionDetails" + "$ref": "#/definitions/JobCollection" } } }, "x-ms-examples": { - "Gets a job position in a queue": { - "$ref": "./examples/Jobs_GetInQueuePosition.json" + "Gets a list of jobs with pagination (max page size)": { + "$ref": "./examples/Jobs_GetJobsWithPageSize.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" } } }, - "/routing/workers/{workerId}/offers/{offerId}:accept": { - "post": { + "/routing/jobs/{id}/position": { + "get": { "tags": [ - "Offers" + "Jobs" ], - "summary": "Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already.", - "operationId": "JobRouter_AcceptJobAction", + "summary": "Gets a job's position details.", + "operationId": "JobRouter_GetInQueuePosition", "produces": [ "application/json" ], "parameters": [ { "in": "path", - "name": "offerId", - "description": "Id of the offer", - "required": true, - "type": "string" - }, - { - "in": "path", - "name": "workerId", - "description": "Id of the worker", + "name": "id", + "description": "Id of the job", "required": true, "type": "string" }, @@ -1307,24 +1035,24 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/AcceptJobOfferResponse" + "$ref": "#/definitions/JobPositionDetails" } } }, "x-ms-examples": { - "Accept a Job Offer": { - "$ref": "./examples/Offers_AcceptJobOffer.json" + "Gets a job position in a queue": { + "$ref": "./examples/Jobs_GetInQueuePosition.json" } } } }, - "/routing/workers/{workerId}/offers/{offerId}:decline": { + "/routing/workers/{workerId}/offers/{offerId}:accept": { "post": { "tags": [ "Offers" ], - "summary": "Declines an offer to work on a job.", - "operationId": "JobRouter_DeclineJobAction", + "summary": "Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already.", + "operationId": "JobRouter_AcceptJobAction", "produces": [ "application/json" ], @@ -1357,93 +1085,41 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/DeclineJobOfferResponse" + "$ref": "#/definitions/AcceptJobOfferResponse" } } }, "x-ms-examples": { - "Decline a Job Offer": { - "$ref": "./examples/Offers_DeclineJobOffer.json" + "Accept a Job Offer": { + "$ref": "./examples/Offers_AcceptJobOffer.json" } } } }, - "/routing/queues": { + "/routing/workers/{workerId}/offers/{offerId}:decline": { "post": { "tags": [ - "Queues" - ], - "summary": "Creates a queue.", - "operationId": "JobRouter_CreateQueue", - "consumes": [ - "application/json" + "Offers" ], + "summary": "Declines an offer to work on a job.", + "operationId": "JobRouter_DeclineJobAction", "produces": [ "application/json" ], "parameters": [ { - "in": "header", - "name": "repeatability-request-id", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "in": "header", - "name": "repeatability-first-sent", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "jobQueue", - "description": "Model of queue to be created", + "in": "path", + "name": "offerId", + "description": "Id of the offer", "required": true, - "schema": { - "$ref": "#/definitions/JobQueue" - } - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "201": { - "description": "Success", - "schema": { - "$ref": "#/definitions/JobQueue" - } - } - }, - "x-ms-examples": { - "Create a Queue": { - "$ref": "./examples/Queues_CreateQueue.json" - } - } - }, - "get": { - "tags": [ - "Queues" - ], - "summary": "Retrieves existing queues", - "operationId": "JobRouter_ListQueues", - "produces": [ - "application/json" - ], - "parameters": [ + "type": "string" + }, { - "in": "query", - "name": "maxpagesize", - "description": "Number of objects to return per page", - "type": "integer", - "format": "int32", - "default": 20 + "in": "path", + "name": "workerId", + "description": "Id of the worker", + "required": true, + "type": "string" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -1459,18 +1135,14 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/QueueCollection" + "$ref": "#/definitions/DeclineJobOfferResponse" } } }, "x-ms-examples": { - "Get Queues with pagination (max page size)": { - "$ref": "./examples/Queues_ListQueuesWithPageSize.json" + "Decline a Job Offer": { + "$ref": "./examples/Offers_DeclineJobOffer.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink", - "itemName": "value" } } }, @@ -1480,7 +1152,7 @@ "Queues" ], "summary": "Updates a queue.", - "operationId": "JobRouter_UpdateQueue", + "operationId": "JobRouter_UpsertQueue", "consumes": [ "application/merge-patch+json" ], @@ -1491,7 +1163,6 @@ { "in": "path", "name": "id", - "description": "Id of the queue", "required": true, "type": "string" }, @@ -1523,8 +1194,11 @@ } }, "x-ms-examples": { - "Create or Update a Queue": { + "Update a Queue": { "$ref": "./examples/Queues_UpdateQueue.json" + }, + "Create a Queue": { + "$ref": "./examples/Queues_CreateQueue.json" } } }, @@ -1608,23 +1282,24 @@ } } }, - "/routing/queues/{id}/statistics": { + "/routing/queues": { "get": { "tags": [ "Queues" ], - "summary": "Retrieves a queue's statistics", - "operationId": "JobRouter_GetQueueStatistics", + "summary": "Retrieves existing queues", + "operationId": "JobRouter_ListQueues", "produces": [ "application/json" ], "parameters": [ { - "in": "path", - "name": "id", - "description": "Id of the queue to retrieve statistics", - "required": true, - "type": "string" + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 }, { "$ref": "#/parameters/ApiVersionParameter" @@ -1640,129 +1315,39 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/QueueStatistics" + "$ref": "#/definitions/QueueCollection" } } }, "x-ms-examples": { - "Get a single Queue": { - "$ref": "./examples/Queues_GetQueueStatistics.json" + "Get Queues with pagination (max page size)": { + "$ref": "./examples/Queues_ListQueuesWithPageSize.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" } } }, - "/routing/workers": { - "post": { - "tags": [ - "Workers" - ], - "summary": "Create a worker to process jobs.", - "operationId": "JobRouter_CreateWorker", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "header", - "name": "repeatability-request-id", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "in": "header", - "name": "repeatability-first-sent", - "description": "As described in https://docs.oasis-open.org/odata/repeatable-requests/v1.0/cs01/repeatable-requests-v1.0-cs01.html.", - "type": "string" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - }, - { - "in": "body", - "name": "routerWorker", - "description": "Request to create a worker", - "required": true, - "schema": { - "$ref": "#/definitions/RouterWorker" - } - } - ], - "responses": { - "default": { - "description": "Error", - "schema": { - "$ref": "#/definitions/CommunicationErrorResponse" - } - }, - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/RouterWorker" - } - } - }, - "x-ms-examples": { - "Create a Worker": { - "$ref": "./examples/Workers_CreateWorker.json" - } - } - }, + "/routing/queues/{id}/statistics": { "get": { "tags": [ - "Workers" + "Queues" ], - "summary": "Retrieves existing workers.", - "operationId": "JobRouter_ListWorkers", + "summary": "Retrieves a queue's statistics", + "operationId": "JobRouter_GetQueueStatistics", "produces": [ "application/json" ], "parameters": [ { - "in": "query", - "name": "status", - "description": "(Optional) If specified, select workers by worker status.", - "type": "string", - "default": "all", - "enum": [ - "active", - "draining", - "inactive", - "all" - ], - "x-ms-enum": { - "name": "WorkerStateSelector", - "modelAsString": false - } - }, - { - "in": "query", - "name": "channelId", - "description": "(Optional) If specified, select workers who have a channel configuration with this channel", - "type": "string" - }, - { - "in": "query", - "name": "queueId", - "description": "(Optional) If specified, select workers who are assigned to this queue", + "in": "path", + "name": "id", + "description": "Id of the queue to retrieve statistics", + "required": true, "type": "string" }, - { - "in": "query", - "name": "hasCapacity", - "description": "(Optional) If set to true, select only workers who have capacity for the channel specified by `channelId` or for any channel\r\n if `channelId` not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false.", - "type": "boolean" - }, - { - "in": "query", - "name": "maxpagesize", - "description": "Number of objects to return per page", - "type": "integer", - "format": "int32", - "default": 20 - }, { "$ref": "#/parameters/ApiVersionParameter" } @@ -1777,21 +1362,14 @@ "200": { "description": "Success", "schema": { - "$ref": "#/definitions/WorkerCollection" + "$ref": "#/definitions/QueueStatistics" } } }, "x-ms-examples": { - "List workers with pagination (max page size)": { - "$ref": "./examples/Workers_GetWorkersWithPageSize.json" - }, - "List available Workers by channel": { - "$ref": "./examples/Workers_GetAvailableWorkersByChannel.json" + "Get a single Queue": { + "$ref": "./examples/Queues_GetQueueStatistics.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink", - "itemName": "value" } } }, @@ -1801,7 +1379,7 @@ "Workers" ], "summary": "Updates a worker.", - "operationId": "JobRouter_UpdateWorker", + "operationId": "JobRouter_UpsertWorker", "consumes": [ "application/merge-patch+json" ], @@ -1844,6 +1422,9 @@ } }, "x-ms-examples": { + "Create a Worker": { + "$ref": "./examples/Workers_CreateWorker.json" + }, "Update a Worker properties": { "$ref": "./examples/Workers_UpdateWorker.json" }, @@ -1937,6 +1518,92 @@ } } } + }, + "/routing/workers": { + "get": { + "tags": [ + "Workers" + ], + "summary": "Retrieves existing workers.", + "operationId": "JobRouter_ListWorkers", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "status", + "description": "(Optional) If specified, select workers by worker status.", + "type": "string", + "default": "all", + "enum": [ + "active", + "draining", + "inactive", + "all" + ], + "x-ms-enum": { + "name": "WorkerStateSelector", + "modelAsString": false + } + }, + { + "in": "query", + "name": "channelId", + "description": "(Optional) If specified, select workers who have a channel configuration with this channel", + "type": "string" + }, + { + "in": "query", + "name": "queueId", + "description": "(Optional) If specified, select workers who are assigned to this queue", + "type": "string" + }, + { + "in": "query", + "name": "hasCapacity", + "description": "(Optional) If set to true, select only workers who have capacity for the channel specified by `channelId` or for any channel\r\n if `channelId` not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false.", + "type": "boolean" + }, + { + "in": "query", + "name": "maxpagesize", + "description": "Number of objects to return per page", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "default": { + "description": "Error", + "schema": { + "$ref": "#/definitions/CommunicationErrorResponse" + } + }, + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/WorkerCollection" + } + } + }, + "x-ms-examples": { + "List workers with pagination (max page size)": { + "$ref": "./examples/Workers_GetWorkersWithPageSize.json" + }, + "List available Workers by channel": { + "$ref": "./examples/Workers_GetAvailableWorkersByChannel.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "value" + } + } } }, "definitions": { @@ -2833,7 +2500,8 @@ "completed", "closed", "cancelled", - "classificationFailed" + "classificationFailed", + "created" ], "type": "string", "readOnly": true, diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json index a4b6a298a78c..ee4b778f8069 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ClassificationPolicies_CreateClassificationPolicy.json @@ -2,7 +2,8 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "classificationPolicy": { + "id": "90eb00c4-234e-4df7-a231-ef7895518384", + "patch": { "name": "Main", "fallbackQueueId": "MainQueue", "queueSelectors": [ @@ -29,7 +30,7 @@ } }, "responses": { - "201": { + "200": { "body": { "id": "90eb00c4-234e-4df7-a231-ef7895518384", "name": "Main", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json index 9454f1399497..5ff2c3d2e8b7 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/DistributionPolicies_CreateDistributionPolicy.json @@ -2,7 +2,8 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "distributionPolicy": { + "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", + "patch": { "mode": { "kind": "longest-idle", "minConcurrentOffers": 1, @@ -14,7 +15,7 @@ } }, "responses": { - "201": { + "200": { "body": { "id": "d9033d56-659c-437a-b5b7-4f3b14301dd4", "name": "Main", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json index 70657463926d..2a1f2244bee1 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/ExceptionPolicies_CreateExceptionPolicy.json @@ -2,7 +2,8 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20-preview2", - "exceptionPolicy": { + "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb", + "patch": { "name": "Main", "exceptionRules": { "MaxWaitTimeExceeded": { @@ -24,7 +25,7 @@ } }, "responses": { - "201": { + "200": { "body": { "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb", "name": "Main", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json index fc1b88a5287d..4ff13ecbcd78 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Jobs_CreateJob.json @@ -2,7 +2,8 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "routerJob": { + "id": "JobId", + "patch": { "channelId": "CustomChatChannel", "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", "queueId": "MainQueue", @@ -15,14 +16,12 @@ } ], "labels": {} - }, - "repeatabilityRequestId": "5aac88f9-d24a-4c53-9d90-86a801667cbe", - "repeatabilityFirstSent": "Tue, 23 Nov 2021 08:49:37 GMT" + } }, "responses": { - "201": { + "200": { "body": { - "id": "383541b3-5637-4af6-8aac-3391da8a578a", + "id": "JobId", "channelReference": "1d5896f3-8b54-40be-82d3-910323f5e2af", "jobStatus": "queued", "enqueueTimeUtc": "2021-09-30T23:59:04.5311999+00:00", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json index 13307bbb065e..7922ca24ce3b 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_CreateQueue.json @@ -2,7 +2,8 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "jobQueue": { + "id": "QueueId", + "patch": { "distributionPolicyId": "MainDistributionPolicy", "name": "Main", "labels": {}, @@ -12,7 +13,7 @@ "repeatabilityFirstSent": "Tue, 23 Nov 2021 08:49:37 GMT" }, "responses": { - "201": { + "200": { "body": { "id": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68", "name": "Main", diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json index ef028fe08b7e..9d86b2f59494 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Queues_UpdateQueue.json @@ -5,9 +5,7 @@ "id": "MainQueue", "patch": { "distributionPolicyId": "MainDistributionPolicy", - "name": "Main", - "labels": {}, - "exceptionPolicyId": "MainExceptionPolicy" + "name": "Main" } }, "responses": { diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json index ffa114147512..141b534d2d86 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/examples/Workers_CreateWorker.json @@ -2,48 +2,49 @@ "parameters": { "endpoint": "https://contoso.westus.communications.azure.com", "api-version": "2021-10-20_preview2", - "routerWorker": { - "totalCapacity": 100, + "workerId": "WorkerId", + "patch": { + "totalCapacity": 10, "queueAssignments": { "MainQueue": {}, - "SecondaryQueue": {} + "SecondaryQueue": null }, "labels": {}, "tags": {}, "channelConfigurations": { "CustomChatChannel": { - "capacityCostPerJob": 10 + "capacityCostPerJob": 11 }, "CustomVoiceChannel": { - "capacityCostPerJob": 100 + "capacityCostPerJob": 10 } }, - "availableForOffers": true + "availableForOffers": false } }, "responses": { "200": { "body": { - "id": "system-generate-worker-id", - "state": "active", + "id": "WorkerId", + "state": "inactive", "queueAssignments": { - "MainQueue": {}, - "SecondaryQueue": {} + "MainQueue": {} }, - "totalCapacity": 100, + "totalCapacity": 10, "labels": {}, + "tags": {}, "channelConfigurations": { "CustomChatChannel": { - "capacityCostPerJob": 10 + "capacityCostPerJob": 11 }, "CustomVoiceChannel": { - "capacityCostPerJob": 100 + "capacityCostPerJob": 10 } }, "offers": [], "assignedJobs": [], "loadRatio": 0, - "availableForOffers": true + "availableForOffers": false } } } From 747ae35d000f645d251475602e892ab40f03f595 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 28 Apr 2022 13:23:59 -0700 Subject: [PATCH 15/23] add descriptions --- .../2021-10-20-preview2/communicationservicejobrouter.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 193ce83df365..36d7b600609f 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -1747,6 +1747,7 @@ } }, "CancelJobResponse": { + "description": "Response payload from cancelling a job", "type": "object" }, "ChannelConfiguration": { @@ -1814,7 +1815,7 @@ } }, "CloseJobRequest": { - "description": "Request payload for completing jobs", + "description": "Request payload for closing jobs", "required": [ "assignmentId" ], @@ -1846,6 +1847,7 @@ } }, "CloseJobResponse": { + "description": "Response payload from closing a job", "type": "object" }, "CommunicationError": { @@ -1920,6 +1922,7 @@ } }, "CompleteJobResponse": { + "description": "Response payload from completing a job", "type": "object" }, "ConditionalQueueSelector": { @@ -1983,6 +1986,7 @@ "x-ms-discriminator-value": "conditional" }, "DeclineJobOfferResponse": { + "description": "Response payload from declining a job", "type": "object" }, "DirectMapRule": { @@ -2950,6 +2954,7 @@ "x-ms-discriminator-value": "reclassify" }, "ReclassifyJobRequest": { + "description": "Request payload for reclassifying jobs", "type": "object" }, "ReclassifyJobResponse": { From 0a55970ae0e4fd0fb58b52607f37089de812871b Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 2 May 2022 14:29:58 -0700 Subject: [PATCH 16/23] add descriptions --- .../communicationservicejobrouter.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 36d7b600609f..a5fd3f0ccbde 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -1608,6 +1608,7 @@ }, "definitions": { "AcceptJobOfferResponse": { + "description": "Response containing Id's for the worker, job, and assignment from an accepted offer", "required": [ "assignmentId", "jobId", @@ -1751,6 +1752,7 @@ "type": "object" }, "ChannelConfiguration": { + "description": "Represents the capacity a job in this channel will consume from a worker", "required": [ "capacityCostPerJob" ], @@ -2192,6 +2194,7 @@ "x-ms-discriminator-value": "expression-rule" }, "JobAssignment": { + "description": "Assigns a job to a worker", "required": [ "assignTime", "id" @@ -2257,6 +2260,7 @@ "discriminator": "kind" }, "JobOffer": { + "description": "An offer of an assignment of work to a worker", "required": [ "capacityCost", "id", @@ -2406,6 +2410,7 @@ "x-ms-discriminator-value": "manual-reclassify" }, "PagedClassificationPolicy": { + "description": "A classification policy returned from a pageable list", "type": "object", "properties": { "id": { @@ -2437,6 +2442,7 @@ } }, "PagedDistributionPolicy": { + "description": "A distribution policy returned from a pageable list", "required": [ "mode", "offerTtlSeconds" @@ -2463,6 +2469,7 @@ } }, "PagedExceptionPolicy": { + "description": "An exception policy returned from a pageable list", "type": "object", "properties": { "id": { @@ -2484,6 +2491,7 @@ } }, "PagedJob": { + "description": "A job returned from a pageable list", "type": "object", "properties": { "id": { @@ -2584,6 +2592,7 @@ } }, "PagedQueue": { + "description": "A queue returned from a pageable list", "required": [ "distributionPolicyId" ], @@ -2614,6 +2623,7 @@ } }, "PagedWorker": { + "description": "A worker returned from a pageable list", "required": [ "totalCapacity" ], @@ -2826,6 +2836,7 @@ "x-ms-discriminator-value": "queue-length" }, "QueueSelector": { + "description": "Describes a condition that must be met against a set of labels for queue selection", "required": [ "key", "labelOperator" @@ -2861,6 +2872,7 @@ } }, "QueueSelectorAttachment": { + "description": "An attachment of label selectors to resolve a queue to a job from a classification policy", "required": [ "kind" ], @@ -2906,6 +2918,7 @@ } }, "QueueWeightedAllocation": { + "description": "Contains the weight percentage and label selectors to be applied if selected for weighted distributions.", "required": [ "labelSelectors", "weight" @@ -2958,6 +2971,7 @@ "type": "object" }, "ReclassifyJobResponse": { + "description": "Response payload from reclassifying a job", "type": "object" }, "RoundRobinMode": { @@ -3090,6 +3104,7 @@ "discriminator": "kind" }, "RouterWorker": { + "description": "An entity for jobs to be routed to", "required": [ "totalCapacity" ], @@ -3167,6 +3182,7 @@ } }, "RuleEngineQueueSelector": { + "description": "Attaches labels to a worker when a RouterRule is resolved", "required": [ "rule" ], @@ -3188,6 +3204,7 @@ "x-ms-discriminator-value": "rule-engine" }, "RuleEngineWorkerSelector": { + "description": "Attaches labels to a worker when a RouterRule is resolved", "required": [ "rule" ], @@ -3383,6 +3400,7 @@ "x-ms-discriminator-value": "weighted-allocation-worker-selector" }, "WorkerAssignment": { + "description": "The assignment for a worker to a job", "required": [ "assignTime", "capacityCost", @@ -3431,6 +3449,7 @@ } }, "WorkerSelector": { + "description": "Describes a condition that must be met against a set of labels for worker selection", "required": [ "key", "labelOperator" @@ -3475,6 +3494,7 @@ } }, "WorkerSelectorAttachment": { + "description": "An attachment which attaches WorkerSelectors to workers", "required": [ "kind" ], @@ -3488,6 +3508,7 @@ "discriminator": "kind" }, "WorkerWeightedAllocation": { + "description": " Contains the weight percentage and label selectors to be applied if selected for weighted distributions.", "required": [ "labelSelectors", "weight" From 151f41aa0e0a587e96d5c8cf19222a23d55c33cc Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 2 May 2022 14:45:27 -0700 Subject: [PATCH 17/23] added empty properties for model validation --- .../communicationservicejobrouter.json | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index a5fd3f0ccbde..2e2509e2dfba 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -1749,7 +1749,8 @@ }, "CancelJobResponse": { "description": "Response payload from cancelling a job", - "type": "object" + "type": "object", + "properties": {} }, "ChannelConfiguration": { "description": "Represents the capacity a job in this channel will consume from a worker", @@ -1850,7 +1851,8 @@ }, "CloseJobResponse": { "description": "Response payload from closing a job", - "type": "object" + "type": "object", + "properties": {} }, "CommunicationError": { "description": "The Communication Services error.", @@ -1925,7 +1927,8 @@ }, "CompleteJobResponse": { "description": "Response payload from completing a job", - "type": "object" + "type": "object", + "properties": {} }, "ConditionalQueueSelector": { "description": "Describes a set of label selectors that will be attached if the given condition resolves to true", @@ -1989,7 +1992,8 @@ }, "DeclineJobOfferResponse": { "description": "Response payload from declining a job", - "type": "object" + "type": "object", + "properties": {} }, "DirectMapRule": { "description": "A rule that return the same labels as the input labels.", @@ -2791,7 +2795,8 @@ }, "QueueAssignment": { "description": "An assignment of a worker to a queue", - "type": "object" + "type": "object", + "properties": {} }, "QueueCollection": { "description": "A paged collection of queues.", @@ -2968,11 +2973,13 @@ }, "ReclassifyJobRequest": { "description": "Request payload for reclassifying jobs", - "type": "object" + "type": "object", + "properties": {} }, "ReclassifyJobResponse": { "description": "Response payload from reclassifying a job", - "type": "object" + "type": "object", + "properties": {} }, "RoundRobinMode": { "description": "Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job.", From 251a64fccef4167933b8b0c0c1aae63f96e8cafb Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 2 May 2022 15:48:48 -0700 Subject: [PATCH 18/23] Add missing descriptions/summaries --- .../communicationservicejobrouter.json | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 2e2509e2dfba..bc7774cc69fe 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -566,6 +566,7 @@ "tags": [ "Jobs" ], + "summary": "Upserts a job.", "operationId": "JobRouter_UpsertJob", "consumes": [ "application/merge-patch+json" @@ -577,6 +578,7 @@ { "in": "path", "name": "id", + "description": "Id of the job", "required": true, "type": "string" }, @@ -586,6 +588,7 @@ { "in": "body", "name": "patch", + "description": "Model of job properties to be created or patched. See also: https://datatracker.ietf.org/doc/html/rfc7386", "required": true, "schema": { "$ref": "#/definitions/RouterJob" @@ -669,7 +672,7 @@ { "in": "path", "name": "id", - "description": "", + "description": "Id of the job", "required": true, "type": "string" }, @@ -724,6 +727,7 @@ { "in": "body", "name": "reclassifyJobRequest", + "description": "Request object for reclassifying a job", "schema": { "$ref": "#/definitions/ReclassifyJobRequest" } @@ -1151,7 +1155,7 @@ "tags": [ "Queues" ], - "summary": "Updates a queue.", + "summary": "Upserts a queue.", "operationId": "JobRouter_UpsertQueue", "consumes": [ "application/merge-patch+json" @@ -1163,6 +1167,7 @@ { "in": "path", "name": "id", + "description": "Id of the queue", "required": true, "type": "string" }, @@ -1378,7 +1383,7 @@ "tags": [ "Workers" ], - "summary": "Updates a worker.", + "summary": "Upserts a worker.", "operationId": "JobRouter_UpsertWorker", "consumes": [ "application/merge-patch+json" From ab5f3a83eee614cbf2f9566ff968d34780ad1e37 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 2 May 2022 16:11:36 -0700 Subject: [PATCH 19/23] Make reclassify an action --- .../2021-10-20-preview2/communicationservicejobrouter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index bc7774cc69fe..0cb64e99bfa3 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -698,7 +698,7 @@ } } }, - "/routing/jobs/{id}/reclassify": { + "/routing/jobs/{id}:reclassify": { "post": { "tags": [ "Jobs" From 89bea253b8b35a2b7acdfccfe4e15db09d747323 Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Mon, 2 May 2022 16:17:59 -0700 Subject: [PATCH 20/23] Fix spell check --- .../2021-10-20-preview2/communicationservicejobrouter.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 0cb64e99bfa3..98bb540c85b2 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -566,7 +566,7 @@ "tags": [ "Jobs" ], - "summary": "Upserts a job.", + "summary": "Upsert a job.", "operationId": "JobRouter_UpsertJob", "consumes": [ "application/merge-patch+json" @@ -1155,7 +1155,7 @@ "tags": [ "Queues" ], - "summary": "Upserts a queue.", + "summary": "Upsert a queue.", "operationId": "JobRouter_UpsertQueue", "consumes": [ "application/merge-patch+json" @@ -1383,7 +1383,7 @@ "tags": [ "Workers" ], - "summary": "Upserts a worker.", + "summary": "Upsert a worker.", "operationId": "JobRouter_UpsertWorker", "consumes": [ "application/merge-patch+json" From c75d10d1b552a0f8c19d18f92caa4a858ffd3e5a Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Tue, 3 May 2022 16:26:09 -0700 Subject: [PATCH 21/23] Add required to requests and remove required attributes from some models --- .../communicationservicejobrouter.json | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 98bb540c85b2..051df5c63046 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -704,7 +704,7 @@ "Jobs" ], "summary": "Reclassify a job.", - "operationId": "JobRouter_ReclassifyJob", + "operationId": "JobRouter_ReclassifyJobAction", "consumes": [ "application/json", "text/json", @@ -748,7 +748,7 @@ } }, "x-ms-examples": { - "Update a job": { + "Reclassify a job": { "$ref": "./examples/Jobs_ReclassifyJob.json" } } @@ -837,6 +837,7 @@ "in": "body", "name": "completeJobRequest", "description": "Request model for completing job", + "required": true, "schema": { "$ref": "#/definitions/CompleteJobRequest" }, @@ -892,6 +893,7 @@ "in": "body", "name": "closeJobRequest", "description": "Request model for closing job", + "required": true, "schema": { "$ref": "#/definitions/CloseJobRequest" }, @@ -2047,10 +2049,6 @@ }, "DistributionPolicy": { "description": "Policy governing how jobs are distributed to workers", - "required": [ - "mode", - "offerTtlSeconds" - ], "type": "object", "properties": { "id": { @@ -2452,10 +2450,6 @@ }, "PagedDistributionPolicy": { "description": "A distribution policy returned from a pageable list", - "required": [ - "mode", - "offerTtlSeconds" - ], "type": "object", "properties": { "id": { @@ -2602,9 +2596,6 @@ }, "PagedQueue": { "description": "A queue returned from a pageable list", - "required": [ - "distributionPolicyId" - ], "type": "object", "properties": { "id": { @@ -2633,9 +2624,6 @@ }, "PagedWorker": { "description": "A worker returned from a pageable list", - "required": [ - "totalCapacity" - ], "type": "object", "properties": { "id": { @@ -3117,9 +3105,6 @@ }, "RouterWorker": { "description": "An entity for jobs to be routed to", - "required": [ - "totalCapacity" - ], "type": "object", "properties": { "id": { From 4e39e2c3bbba2d4b9f648758995981db3716376b Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 5 May 2022 10:20:42 -0700 Subject: [PATCH 22/23] removed csharp readme --- .../data-plane/JobRouter/readme.csharp.md | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 specification/communication/data-plane/JobRouter/readme.csharp.md diff --git a/specification/communication/data-plane/JobRouter/readme.csharp.md b/specification/communication/data-plane/JobRouter/readme.csharp.md deleted file mode 100644 index 8d4495d93f1b..000000000000 --- a/specification/communication/data-plane/JobRouter/readme.csharp.md +++ /dev/null @@ -1,15 +0,0 @@ -## C - -These settings apply only when `--csharp` is specified on the command line. -Please also specify `--csharp-sdks-folder=`. - -```yaml $(csharp) -csharp: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 1 - clear-output-folder: true - client-side-validation: false - namespace: Microsoft.CommunicationServices - output-folder: $(csharp-sdks-folder)/communicationservices/management/Microsoft.CommunicationServices/GeneratedProtocol -``` \ No newline at end of file From cf61b7c5acb865fb8d5e6b9e84ae039d21ff304a Mon Sep 17 00:00:00 2001 From: Cole O'Brien <88212026+rcoleobrien@users.noreply.github.com> Date: Thu, 5 May 2022 10:53:28 -0700 Subject: [PATCH 23/23] change order of worker and offer id parameters to match path --- .../communicationservicejobrouter.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json index 051df5c63046..484a37b5202d 100644 --- a/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json +++ b/specification/communication/data-plane/JobRouter/preview/2021-10-20-preview2/communicationservicejobrouter.json @@ -1065,15 +1065,15 @@ "parameters": [ { "in": "path", - "name": "offerId", - "description": "Id of the offer", + "name": "workerId", + "description": "Id of the worker", "required": true, "type": "string" }, { "in": "path", - "name": "workerId", - "description": "Id of the worker", + "name": "offerId", + "description": "Id of the offer", "required": true, "type": "string" }, @@ -1115,15 +1115,15 @@ "parameters": [ { "in": "path", - "name": "offerId", - "description": "Id of the offer", + "name": "workerId", + "description": "Id of the worker", "required": true, "type": "string" }, { "in": "path", - "name": "workerId", - "description": "Id of the worker", + "name": "offerId", + "description": "Id of the offer", "required": true, "type": "string" },