{ "swagger": "2.0", "info": { "title": "Azure Communication Routing Service", "version": "2023-11-01", "description": "Azure Communication Routing Service", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "x-ms-parameterized-host": { "hostTemplate": "{endpoint}", "useSchemePrefix": false, "parameters": [ { "name": "endpoint", "in": "path", "description": "Uri of your Communication resource", "required": true, "type": "string", "format": "uri", "x-ms-skip-url-encoding": true } ] }, "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "AadOauth2Auth": [ "https://communication.azure.com/.default" ] } ], "securityDefinitions": { "AadOauth2Auth": { "type": "oauth2", "description": "The Azure Active Directory OAuth2 Flow", "flow": "accessCode", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "https://communication.azure.com/.default": "" }, "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" } }, "tags": [], "paths": { "/routing/classificationPolicies": { "get": { "operationId": "JobRouterAdministrationOperations_ListClassificationPolicies", "summary": "Retrieves existing classification policies.", "description": "Retrieves existing classification policies.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "maxpagesize", "in": "query", "description": "Number of objects to return per page.", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PagedClassificationPolicy" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves existing classification policies": { "$ref": "./examples/ClassificationPolicies_ListClassificationPoliciesWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/routing/classificationPolicies/{classificationPolicyId}": { "get": { "operationId": "JobRouterAdministrationOperations_GetClassificationPolicy", "summary": "Retrieves an existing classification policy by Id.", "description": "Retrieves an existing classification policy by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "classificationPolicyId", "in": "path", "description": "Id of a classification policy.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ClassificationPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves an existing classification policy by Id": { "$ref": "./examples/ClassificationPolicies_GetClassificationPolicy.json" } } }, "patch": { "operationId": "JobRouterAdministrationOperations_UpsertClassificationPolicy", "summary": "Creates or updates a classification policy.", "description": "Creates or updates a classification policy.", "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "classificationPolicyId", "in": "path", "description": "Id of a classification policy.", "required": true, "type": "string" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifMatch" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifUnmodifiedSince" }, { "name": "resource", "in": "body", "description": "The resource instance.", "required": true, "schema": { "$ref": "#/definitions/ClassificationPolicyCreateOrUpdate" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ClassificationPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/ClassificationPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Creates a Classification Policy": { "$ref": "./examples/ClassificationPolicies_CreateClassificationPolicy.json" }, "Updates a Classification Policy": { "$ref": "./examples/ClassificationPolicies_UpdateClassificationPolicy.json" } } }, "delete": { "operationId": "JobRouterAdministrationOperations_DeleteClassificationPolicy", "summary": "Delete a classification policy by Id.", "description": "Delete a classification policy by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "classificationPolicyId", "in": "path", "description": "Id of a classification policy.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Delete a classification policy": { "$ref": "./examples/ClassificationPolicies_DeleteClassificationPolicy.json" } } } }, "/routing/distributionPolicies": { "get": { "operationId": "JobRouterAdministrationOperations_ListDistributionPolicies", "summary": "Retrieves existing distribution policies.", "description": "Retrieves existing distribution policies.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "maxpagesize", "in": "query", "description": "Number of objects to return per page.", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PagedDistributionPolicy" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves existing distribution policies": { "$ref": "./examples/DistributionPolicies_ListDistributionPoliciesWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/routing/distributionPolicies/{distributionPolicyId}": { "get": { "operationId": "JobRouterAdministrationOperations_GetDistributionPolicy", "summary": "Retrieves an existing distribution policy by Id.", "description": "Retrieves an existing distribution policy by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "distributionPolicyId", "in": "path", "description": "Id of a distribution policy.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/DistributionPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves an existing distribution policy by Id": { "$ref": "./examples/DistributionPolicies_GetDistributionPolicy.json" } } }, "patch": { "operationId": "JobRouterAdministrationOperations_UpsertDistributionPolicy", "summary": "Creates or updates a distribution policy.", "description": "Creates or updates a distribution policy.", "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "distributionPolicyId", "in": "path", "description": "Id of a distribution policy.", "required": true, "type": "string" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifMatch" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifUnmodifiedSince" }, { "name": "resource", "in": "body", "description": "The resource instance.", "required": true, "schema": { "$ref": "#/definitions/DistributionPolicyCreateOrUpdate" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/DistributionPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/DistributionPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Creates a Distribution policy": { "$ref": "./examples/DistributionPolicies_CreateDistributionPolicy.json" }, "Updates a distribution policy": { "$ref": "./examples/DistributionPolicies_UpdateDistributionPolicy.json" } } }, "delete": { "operationId": "JobRouterAdministrationOperations_DeleteDistributionPolicy", "summary": "Delete a distribution policy by Id.", "description": "Delete a distribution policy by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "distributionPolicyId", "in": "path", "description": "Id of a distribution policy.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Delete a distribution policy": { "$ref": "./examples/DistributionPolicies_DeleteDistributionPolicy.json" } } } }, "/routing/exceptionPolicies": { "get": { "operationId": "JobRouterAdministrationOperations_ListExceptionPolicies", "summary": "Retrieves existing exception policies.", "description": "Retrieves existing exception policies.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "maxpagesize", "in": "query", "description": "Number of objects to return per page.", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PagedExceptionPolicy" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves existing exception policies": { "$ref": "./examples/ExceptionPolicies_ListExceptionPoliciesWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/routing/exceptionPolicies/{exceptionPolicyId}": { "get": { "operationId": "JobRouterAdministrationOperations_GetExceptionPolicy", "summary": "Retrieves an existing exception policy by Id.", "description": "Retrieves an existing exception policy by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "exceptionPolicyId", "in": "path", "description": "Id of an exception policy.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ExceptionPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves an existing exception policy by Id": { "$ref": "./examples/ExceptionPolicies_GetExceptionPolicy.json" } } }, "patch": { "operationId": "JobRouterAdministrationOperations_UpsertExceptionPolicy", "summary": "Creates or updates a exception policy.", "description": "Creates or updates a exception policy.", "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "exceptionPolicyId", "in": "path", "description": "Id of an exception policy.", "required": true, "type": "string" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifMatch" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifUnmodifiedSince" }, { "name": "resource", "in": "body", "description": "The resource instance.", "required": true, "schema": { "$ref": "#/definitions/ExceptionPolicyCreateOrUpdate" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ExceptionPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/ExceptionPolicy" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Creates an exception policy": { "$ref": "./examples/ExceptionPolicies_CreateExceptionPolicy.json" }, "Updates an exception policy": { "$ref": "./examples/ExceptionPolicies_UpdateExceptionPolicy.json" } } }, "delete": { "operationId": "JobRouterAdministrationOperations_DeleteExceptionPolicy", "summary": "Deletes a exception policy by Id.", "description": "Deletes a exception policy by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "exceptionPolicyId", "in": "path", "description": "Id of an exception policy.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Deletes a exception policy": { "$ref": "./examples/ExceptionPolicies_DeleteExceptionPolicy.json" } } } }, "/routing/jobs": { "get": { "operationId": "JobRouterOperations_ListJobs", "summary": "Retrieves list of jobs based on filter parameters.", "description": "Retrieves list of jobs based on filter parameters.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "maxpagesize", "in": "query", "description": "Number of objects to return per page.", "required": false, "type": "integer", "format": "int32" }, { "name": "status", "in": "query", "description": "If specified, filter jobs by status.", "required": false, "type": "string", "default": "all", "enum": [ "all", "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", "waitingForActivation", "active" ], "x-ms-enum": { "name": "RouterJobStatusSelector", "modelAsString": true, "values": [ { "name": "all", "value": "all", "description": "Default" }, { "name": "pendingClassification", "value": "pendingClassification", "description": "Job is waiting to be classified." }, { "name": "queued", "value": "queued", "description": "Job has been queued." }, { "name": "assigned", "value": "assigned", "description": "Job has been assigned to a worker." }, { "name": "completed", "value": "completed", "description": "Job has been completed by a worker." }, { "name": "closed", "value": "closed", "description": "Job has been closed by a worker." }, { "name": "cancelled", "value": "cancelled", "description": "Job has been cancelled." }, { "name": "classificationFailed", "value": "classificationFailed", "description": "Classification process failed for the job." }, { "name": "created", "value": "created", "description": "Job has been created." }, { "name": "pendingSchedule", "value": "pendingSchedule", "description": "Job has been created but not been scheduled yet." }, { "name": "scheduled", "value": "scheduled", "description": "Job has been scheduled successfully." }, { "name": "scheduleFailed", "value": "scheduleFailed", "description": "Job scheduling failed." }, { "name": "waitingForActivation", "value": "waitingForActivation", "description": "Job is in a suspended state and waiting for an update." }, { "name": "active", "value": "active", "description": "Job is in a state of PendingClassification or Queued or Assigned or ClassificationFailed or Completed or PendingSchedule or Scheduled or ScheduleFailed or WaitingForActivation." } ] } }, { "name": "queueId", "in": "query", "description": "If specified, filter jobs by queue.", "required": false, "type": "string" }, { "name": "channelId", "in": "query", "description": "If specified, filter jobs by channel.", "required": false, "type": "string" }, { "name": "classificationPolicyId", "in": "query", "description": "If specified, filter jobs by classificationPolicy.", "required": false, "type": "string" }, { "name": "scheduledBefore", "in": "query", "description": "If specified, filter on jobs that was scheduled before or at given timestamp. Range: (-Inf, scheduledBefore].", "required": false, "type": "string", "format": "date-time" }, { "name": "scheduledAfter", "in": "query", "description": "If specified, filter on jobs that was scheduled at or after given value. Range: [scheduledAfter, +Inf).", "required": false, "type": "string", "format": "date-time" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PagedRouterJob" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves list of active jobs": { "$ref": "./examples/Jobs_GetJobsWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/routing/jobs/{jobId}": { "get": { "operationId": "JobRouterOperations_GetJob", "summary": "Retrieves an existing job by Id.", "description": "Retrieves an existing job by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterJob" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves an existing job by Id": { "$ref": "./examples/Jobs_GetJob.json" } } }, "patch": { "operationId": "JobRouterOperations_UpsertJob", "summary": "Creates or updates a router job.", "description": "Creates or updates a router job.", "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifMatch" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifUnmodifiedSince" }, { "name": "resource", "in": "body", "description": "The resource instance.", "required": true, "schema": { "$ref": "#/definitions/RouterJobCreateOrUpdate" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterJob" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/RouterJob" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Creates a new job": { "$ref": "./examples/Jobs_CreateJob.json" }, "Creates a new scheduled router job": { "$ref": "./examples/Jobs_CreateScheduledJob.json" }, "Updates a router job": { "$ref": "./examples/Jobs_UpdateJob.json" } } }, "delete": { "operationId": "JobRouterOperations_DeleteJob", "summary": "Deletes a job and all of its traces.", "description": "Deletes a job and all of its traces.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Deletes a job and all of its traces": { "$ref": "./examples/Jobs_DeleteJob.json" } } } }, "/routing/jobs/{jobId}:reclassify": { "post": { "operationId": "JobRouterOperations_ReclassifyJob", "summary": "Reclassify a job.", "description": "Reclassify a job.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request object for reclassifying a job.", "required": false, "schema": { "$ref": "#/definitions/ReclassifyJobOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/ReclassifyJobResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Reclassify a job": { "$ref": "./examples/Jobs_ReclassifyJob.json" } } } }, "/routing/jobs/{jobId}:cancel": { "post": { "operationId": "JobRouterOperations_CancelJob", "summary": "Submits request to cancel an existing job by Id while supplying free-form cancellation reason.", "description": "Submits request to cancel an existing job by Id while supplying free-form cancellation reason.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request model for cancelling job.", "required": false, "schema": { "$ref": "#/definitions/CancelJobOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CancelJobResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Cancels a job": { "$ref": "./examples/Jobs_CancelJob.json" }, "Submits request to cancel an existing job": { "$ref": "./examples/Jobs_RequestJobCancel.json" } } } }, "/routing/jobs/{jobId}/assignments/{assignmentId}:complete": { "post": { "operationId": "JobRouterOperations_CompleteJob", "summary": "Completes an assigned job.", "description": "Completes an assigned job.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" }, { "name": "assignmentId", "in": "path", "description": "Id of a job assignment.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request model for completing job.", "required": false, "schema": { "$ref": "#/definitions/CompleteJobOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CompleteJobResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Completes an assigned job": { "$ref": "./examples/Jobs_CompleteJob.json" } } } }, "/routing/jobs/{jobId}/assignments/{assignmentId}:close": { "post": { "operationId": "JobRouterOperations_CloseJob", "summary": "Closes a completed job.", "description": "Closes a completed job.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" }, { "name": "assignmentId", "in": "path", "description": "Id of a job assignment.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request model for closing job.", "required": false, "schema": { "$ref": "#/definitions/CloseJobOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/CloseJobResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Closes a completed job": { "$ref": "./examples/Jobs_CloseJob.json" } } } }, "/routing/jobs/{jobId}/assignments/{assignmentId}:unassign": { "post": { "operationId": "JobRouterOperations_UnassignJob", "summary": "Unassign a job.", "description": "Unassign a job.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of a job.", "required": true, "type": "string" }, { "name": "assignmentId", "in": "path", "description": "Id of a job assignment.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request body for unassign route.", "required": false, "schema": { "$ref": "#/definitions/UnassignJobOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/UnassignJobResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Un-assign a job": { "$ref": "./examples/Jobs_UnassignJob.json" } } } }, "/routing/jobs/{jobId}/position": { "get": { "operationId": "JobRouterOperations_GetInQueuePosition", "summary": "Gets a job's position details.", "description": "Gets a job's position details.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "jobId", "in": "path", "description": "Id of the job.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterJobPositionDetails" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Gets a job's position details": { "$ref": "./examples/Jobs_GetInQueuePosition.json" } } } }, "/routing/queues": { "get": { "operationId": "JobRouterAdministrationOperations_ListQueues", "summary": "Retrieves existing queues.", "description": "Retrieves existing queues.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "maxpagesize", "in": "query", "description": "Number of objects to return per page.", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PagedRouterQueue" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves existing queues": { "$ref": "./examples/Queues_ListQueuesWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/routing/queues/{queueId}": { "get": { "operationId": "JobRouterAdministrationOperations_GetQueue", "summary": "Retrieves an existing queue by Id.", "description": "Retrieves an existing queue by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "queueId", "in": "path", "description": "Id of a queue.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterQueue" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves an existing queue by Id": { "$ref": "./examples/Queues_GetQueue.json" } } }, "patch": { "operationId": "JobRouterAdministrationOperations_UpsertQueue", "summary": "Creates or updates a queue.", "description": "Creates or updates a queue.", "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "queueId", "in": "path", "description": "Id of a queue.", "required": true, "type": "string" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifMatch" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifUnmodifiedSince" }, { "name": "resource", "in": "body", "description": "The resource instance.", "required": true, "schema": { "$ref": "#/definitions/RouterQueueCreateOrUpdate" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterQueue" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/RouterQueue" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Creates a queue": { "$ref": "./examples/Queues_CreateQueue.json" }, "Updates a queue": { "$ref": "./examples/Queues_UpdateQueue.json" } } }, "delete": { "operationId": "JobRouterAdministrationOperations_DeleteQueue", "summary": "Deletes a queue by Id.", "description": "Deletes a queue by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "queueId", "in": "path", "description": "Id of a queue.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Deletes a queue": { "$ref": "./examples/Queues_DeleteQueue.json" } } } }, "/routing/queues/{queueId}/statistics": { "get": { "operationId": "JobRouterOperations_GetQueueStatistics", "summary": "Retrieves a queue's statistics.", "description": "Retrieves a queue's statistics.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "queueId", "in": "path", "description": "Id of the queue to retrieve statistics.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterQueueStatistics" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves a queue's statistics": { "$ref": "./examples/Queues_GetQueueStatistics.json" } } } }, "/routing/workers": { "get": { "operationId": "JobRouterOperations_ListWorkers", "summary": "Retrieves existing workers.", "description": "Retrieves existing workers.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "maxpagesize", "in": "query", "description": "Number of objects to return per page.", "required": false, "type": "integer", "format": "int32" }, { "name": "state", "in": "query", "description": "If specified, select workers by worker state.", "required": false, "type": "string", "default": "all", "enum": [ "active", "draining", "inactive", "all" ], "x-ms-enum": { "name": "RouterWorkerStateSelector", "modelAsString": true, "values": [ { "name": "active", "value": "active", "description": "Worker is active and available to take offers." }, { "name": "draining", "value": "draining", "description": "Worker is not active, if there are existing offers they are being revoked. No new offers are sent." }, { "name": "inactive", "value": "inactive", "description": "Worker is not active. No new offers are sent." }, { "name": "all", "value": "all", "description": "Worker is active or draining or inactive." } ] } }, { "name": "channelId", "in": "query", "description": "If specified, select workers who have a channel configuration with this channel.", "required": false, "type": "string" }, { "name": "queueId", "in": "query", "description": "If specified, select workers who are assigned to this queue.", "required": false, "type": "string" }, { "name": "hasCapacity", "in": "query", "description": "If set to true, select only workers who have capacity for the channel specified by `channelId` or for any channel if `channelId` not specified. If set to false, then will return all workers including workers without any capacity for jobs. Defaults to false.", "required": false, "type": "boolean" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/PagedRouterWorker" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves available worker filtered by channel": { "$ref": "./examples/Workers_GetAvailableWorkersByChannel.json" }, "Retrieves list of workers": { "$ref": "./examples/Workers_GetWorkersWithPageSize.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/routing/workers/{workerId}": { "get": { "operationId": "JobRouterOperations_GetWorker", "summary": "Retrieves an existing worker by Id.", "description": "Retrieves an existing worker by Id.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "workerId", "in": "path", "description": "Id of a worker.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterWorker" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Retrieves an existing worker by Id": { "$ref": "./examples/Workers_GetWorker.json" } } }, "patch": { "operationId": "JobRouterOperations_UpsertWorker", "summary": "Creates or updates a worker.", "description": "Creates or updates a worker.", "consumes": [ "application/merge-patch+json" ], "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "workerId", "in": "path", "description": "Id of a worker.", "required": true, "type": "string" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifMatch" }, { "$ref": "#/parameters/RouterConditionalRequestHeaders.ifUnmodifiedSince" }, { "name": "resource", "in": "body", "description": "The resource instance.", "required": true, "schema": { "$ref": "#/definitions/RouterWorkerCreateOrUpdate" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/RouterWorker" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "201": { "description": "The request has succeeded and a new resource has been created as a result.", "schema": { "$ref": "#/definitions/RouterWorker" }, "headers": { "ETag": { "type": "string", "description": "The entity tag for the response." }, "Last-Modified": { "type": "string", "format": "date-time-rfc7231", "description": "The last modified timestamp." } } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Creates a worker": { "$ref": "./examples/Workers_CreateWorker.json" }, "De-register an active worker": { "$ref": "./examples/Workers_DeregisterActiveWorker.json" }, "De-register an inactive worker": { "$ref": "./examples/Workers_DeregisterInactiveWorker.json" }, "Register a worker": { "$ref": "./examples/Workers_RegisterWorker.json" }, "Updates a worker": { "$ref": "./examples/Workers_UpdateWorker.json" } } }, "delete": { "operationId": "JobRouterOperations_DeleteWorker", "summary": "Deletes a worker and all of its traces.", "description": "Deletes a worker and all of its traces.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "workerId", "in": "path", "description": "Id of a worker.", "required": true, "type": "string" } ], "responses": { "204": { "description": "There is no content to send for this request, but the headers may be useful. " }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Deletes a worker and all of its traces": { "$ref": "./examples/Workers_DeleteWorker.json" } } } }, "/routing/workers/{workerId}/offers/{offerId}:accept": { "post": { "operationId": "JobRouterOperations_AcceptJobOffer", "summary": "Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already.", "description": "Accepts an offer to work on a job and returns a 409/Conflict if another agent accepted the job already.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "workerId", "in": "path", "description": "Id of a worker.", "required": true, "type": "string" }, { "name": "offerId", "in": "path", "description": "Id of an offer.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/AcceptJobOfferResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Accepts an offer to work on a job": { "$ref": "./examples/Offers_AcceptJobOffer.json" } } } }, "/routing/workers/{workerId}/offers/{offerId}:decline": { "post": { "operationId": "JobRouterOperations_DeclineJobOffer", "summary": "Declines an offer to work on a job.", "description": "Declines an offer to work on a job.", "parameters": [ { "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" }, { "name": "workerId", "in": "path", "description": "Id of a worker.", "required": true, "type": "string" }, { "name": "offerId", "in": "path", "description": "Id of an offer.", "required": true, "type": "string" }, { "name": "options", "in": "body", "description": "Request model for declining offer.", "required": false, "schema": { "$ref": "#/definitions/DeclineJobOfferOptions" } } ], "responses": { "200": { "description": "The request has succeeded.", "schema": { "$ref": "#/definitions/DeclineJobOfferResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" }, "headers": { "x-ms-error-code": { "type": "string", "description": "String error code indicating what went wrong." } } } }, "x-ms-examples": { "Declines an offer to work on a job": { "$ref": "./examples/Offers_DeclineJobOffer.json" } } } } }, "definitions": { "AcceptJobOfferResult": { "type": "object", "description": "Response containing ids for the worker, job, and assignment from an accepted offer.", "properties": { "assignmentId": { "type": "string", "description": "Id of job assignment that assigns a worker that has accepted an offer to a job." }, "jobId": { "type": "string", "description": "Id of the job assigned." }, "workerId": { "type": "string", "description": "Id of the worker that has been assigned this job." } }, "required": [ "assignmentId", "jobId", "workerId" ] }, "Azure.Core.Foundations.Error": { "type": "object", "description": "The error object.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "message": { "type": "string", "description": "A human-readable representation of the error." }, "target": { "type": "string", "description": "The target of the error." }, "details": { "type": "array", "description": "An array of details about specific errors that led to this reported error.", "items": { "$ref": "#/definitions/Azure.Core.Foundations.Error" } }, "innererror": { "$ref": "#/definitions/Azure.Core.Foundations.InnerError", "description": "An object containing more specific information than the current object about the error." } }, "required": [ "code", "message" ] }, "Azure.Core.Foundations.ErrorResponse": { "type": "object", "description": "A response containing error details.", "properties": { "error": { "$ref": "#/definitions/Azure.Core.Foundations.Error", "description": "The error object." } }, "required": [ "error" ] }, "Azure.Core.Foundations.InnerError": { "type": "object", "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", "properties": { "code": { "type": "string", "description": "One of a server-defined set of error codes." }, "innererror": { "$ref": "#/definitions/Azure.Core.Foundations.InnerError", "description": "Inner error." } } }, "Azure.Core.eTag": { "type": "string", "description": "The ETag (or entity tag) HTTP response header is an identifier for a specific version of a resource.\nIt lets caches be more efficient and save bandwidth, as a web server does not need to resend a full response if the content was not changed.\n\nIt is a string of ASCII characters placed between double quotes, like \"675af34563dc-tr34\"." }, "BestWorkerMode": { "type": "object", "description": "Jobs are distributed to the worker with the strongest abilities available.", "properties": { "scoringRule": { "$ref": "#/definitions/RouterRule", "description": "Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function)." }, "scoringRuleOptions": { "$ref": "#/definitions/ScoringRuleOptions", "description": "Options to configure 'scoringRule'. If not set, default values are used." } }, "allOf": [ { "$ref": "#/definitions/DistributionMode" } ], "x-ms-discriminator-value": "bestWorker" }, "BestWorkerModeCreateOrUpdate": { "type": "object", "description": "Jobs are distributed to the worker with the strongest abilities available.", "properties": { "scoringRule": { "$ref": "#/definitions/RouterRuleCreateOrUpdate", "description": "Define a scoring rule to use, when calculating a score to determine the best worker. If not set, will use a default scoring formula that uses the number of job labels that the worker labels match, as well as the number of label selectors the worker labels match and/or exceed using a logistic function (https://en.wikipedia.org/wiki/Logistic_function)." }, "scoringRuleOptions": { "$ref": "#/definitions/ScoringRuleOptions", "description": "Options to configure 'scoringRule'. If not set, default values are used." } }, "allOf": [ { "$ref": "#/definitions/DistributionModeCreateOrUpdate" } ], "x-ms-discriminator-value": "bestWorker" }, "CancelExceptionAction": { "type": "object", "description": "An action that marks a job as cancelled.", "properties": { "note": { "type": "string", "description": "A note that will be appended to a job's notes collection with the current timestamp." }, "dispositionCode": { "type": "string", "description": "Indicates the outcome of a job, populate this field with your own custom values." } }, "allOf": [ { "$ref": "#/definitions/ExceptionAction" } ], "x-ms-discriminator-value": "cancel" }, "CancelJobOptions": { "type": "object", "description": "Request payload for cancelling a job.", "properties": { "note": { "type": "string", "description": "A note that will be appended to a job's Notes collection with the current timestamp." }, "dispositionCode": { "type": "string", "description": "Indicates the outcome of a job, populate this field with your own custom values. If not provided, default value of \"Cancelled\" is set." } } }, "CancelJobResult": { "type": "object", "description": "Response payload from cancelling a job." }, "ClassificationPolicy": { "type": "object", "description": "A container for the rules that govern how jobs are classified.", "properties": { "etag": { "$ref": "#/definitions/Azure.Core.eTag", "description": "The entity tag for this resource.", "readOnly": true }, "id": { "type": "string", "description": "Id of a classification policy.", "readOnly": true }, "name": { "type": "string", "description": "Friendly name of this policy." }, "fallbackQueueId": { "type": "string", "description": "Id of a fallback queue to select if queue selector attachments doesn't find a match." }, "queueSelectorAttachments": { "type": "array", "description": "Queue selector attachments used to resolve a queue for a job.", "items": { "$ref": "#/definitions/QueueSelectorAttachment" } }, "prioritizationRule": { "$ref": "#/definitions/RouterRule", "description": "A rule to determine a priority score for a job." }, "workerSelectorAttachments": { "type": "array", "description": "Worker selector attachments used to attach worker selectors to a job.", "items": { "$ref": "#/definitions/WorkerSelectorAttachment" } } }, "required": [ "etag", "id" ] }, "ClassificationPolicyCreateOrUpdate": { "type": "object", "description": "A container for the rules that govern how jobs are classified.", "properties": { "name": { "type": "string", "description": "Friendly name of this policy." }, "fallbackQueueId": { "type": "string", "description": "Id of a fallback queue to select if queue selector attachments doesn't find a match." }, "queueSelectorAttachments": { "type": "array", "description": "Queue selector attachments used to resolve a queue for a job.", "items": { "$ref": "#/definitions/QueueSelectorAttachment" } }, "prioritizationRule": { "$ref": "#/definitions/RouterRuleCreateOrUpdate", "description": "A rule to determine a priority score for a job." }, "workerSelectorAttachments": { "type": "array", "description": "Worker selector attachments used to attach worker selectors to a job.", "items": { "$ref": "#/definitions/WorkerSelectorAttachment" } } } }, "CloseJobOptions": { "type": "object", "description": "Request payload for closing jobs", "properties": { "dispositionCode": { "type": "string", "description": "Indicates the outcome of a job, populate this field with your own custom values." }, "closeAt": { "type": "string", "format": "date-time", "description": "If not provided, worker capacity is released immediately along with a JobClosedEvent notification. If provided, worker capacity is released along with a JobClosedEvent notification at a future time in UTC." }, "note": { "type": "string", "description": "A note that will be appended to a job's Notes collection with the current timestamp." } } }, "CloseJobResult": { "type": "object", "description": "Response payload from closing a job." }, "CompleteJobOptions": { "type": "object", "description": "Request payload for completing jobs.", "properties": { "note": { "type": "string", "description": "A note that will be appended to a job's Notes collection with the current timestamp." } } }, "CompleteJobResult": { "type": "object", "description": "Response payload from completing a job." }, "ConditionalQueueSelectorAttachment": { "type": "object", "description": "Describes a set of queue selectors that will be attached if the given condition resolves to true.", "properties": { "condition": { "$ref": "#/definitions/RouterRule", "description": "The condition that must be true for the queue selectors to be attached." }, "queueSelectors": { "type": "array", "description": "The queue selectors to attach.", "items": { "$ref": "#/definitions/RouterQueueSelector" } } }, "required": [ "condition", "queueSelectors" ], "allOf": [ { "$ref": "#/definitions/QueueSelectorAttachment" } ], "x-ms-discriminator-value": "conditional" }, "ConditionalWorkerSelectorAttachment": { "type": "object", "description": "Describes a set of worker selectors that will be attached if the given condition resolves to true.", "properties": { "condition": { "$ref": "#/definitions/RouterRule", "description": "The condition that must be true for the worker selectors to be attached." }, "workerSelectors": { "type": "array", "description": "The worker selectors to attach.", "items": { "$ref": "#/definitions/RouterWorkerSelector" } } }, "required": [ "condition", "workerSelectors" ], "allOf": [ { "$ref": "#/definitions/WorkerSelectorAttachment" } ], "x-ms-discriminator-value": "conditional" }, "DeclineJobOfferOptions": { "type": "object", "description": "Request payload for declining offers.", "properties": { "retryOfferAt": { "type": "string", "format": "date-time", "description": "If the RetryOfferAt is not provided, then this job will not be offered again to the worker who declined this job unless the worker is de-registered and re-registered. If a RetryOfferAt time is provided, then the job will be re-matched to eligible workers at the retry time in UTC. The worker that declined the job will also be eligible for the job at that time." } } }, "DeclineJobOfferResult": { "type": "object", "description": "Response payload from declining a job." }, "DirectMapRouterRule": { "type": "object", "description": "A rule that return the same labels as the input labels.", "allOf": [ { "$ref": "#/definitions/RouterRule" } ], "x-ms-discriminator-value": "directMap" }, "DirectMapRouterRuleCreateOrUpdate": { "type": "object", "description": "A rule that return the same labels as the input labels.", "allOf": [ { "$ref": "#/definitions/RouterRuleCreateOrUpdate" } ], "x-ms-discriminator-value": "directMap" }, "DistributionMode": { "type": "object", "description": "Abstract base class for defining a distribution mode.", "properties": { "minConcurrentOffers": { "type": "integer", "format": "int32", "description": "Governs the minimum desired number of active concurrent offers a job can have.", "default": 1 }, "maxConcurrentOffers": { "type": "integer", "format": "int32", "description": "Governs the maximum number of active concurrent offers a job can have.", "default": 1 }, "bypassSelectors": { "type": "boolean", "description": "If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false.", "default": false }, "kind": { "$ref": "#/definitions/DistributionModeKind", "description": "The type discriminator describing a sub-type of DistributionMode." } }, "discriminator": "kind", "required": [ "kind" ] }, "DistributionModeCreateOrUpdate": { "type": "object", "description": "Abstract base class for defining a distribution mode.", "properties": { "minConcurrentOffers": { "type": "integer", "format": "int32", "description": "Governs the minimum desired number of active concurrent offers a job can have.", "default": 1 }, "maxConcurrentOffers": { "type": "integer", "format": "int32", "description": "Governs the maximum number of active concurrent offers a job can have.", "default": 1 }, "bypassSelectors": { "type": "boolean", "description": "If set to true, then router will match workers to jobs even if they don't match label selectors. Warning: You may get workers that are not qualified for a job they are matched with if you set this variable to true. This flag is intended more for temporary usage. By default, set to false.", "default": false }, "kind": { "$ref": "#/definitions/DistributionModeKind", "description": "The type discriminator describing a sub-type of DistributionMode." } }, "discriminator": "kind", "required": [ "kind" ] }, "DistributionModeKind": { "type": "string", "description": "Discriminators for supported distribution mode types.", "enum": [ "bestWorker", "longestIdle", "roundRobin" ], "x-ms-enum": { "name": "DistributionModeKind", "modelAsString": true, "values": [ { "name": "bestWorker", "value": "bestWorker", "description": "Discriminator value for BestWorkerMode." }, { "name": "longestIdle", "value": "longestIdle", "description": "Discriminator value for LongestIdleMode." }, { "name": "roundRobin", "value": "roundRobin", "description": "Discriminator value for RoundRobinMode." } ] } }, "DistributionPolicy": { "type": "object", "description": "Policy governing how jobs are distributed to workers", "properties": { "etag": { "$ref": "#/definitions/Azure.Core.eTag", "description": "The entity tag for this resource.", "readOnly": true }, "id": { "type": "string", "description": "Id of a distribution policy.", "readOnly": true }, "name": { "type": "string", "description": "Friendly name of this policy." }, "offerExpiresAfterSeconds": { "type": "number", "format": "double", "description": "Number of seconds after which any offers created under this policy will be expired." }, "mode": { "$ref": "#/definitions/DistributionMode", "description": "Mode governing the specific distribution method." } }, "required": [ "etag", "id" ] }, "DistributionPolicyCreateOrUpdate": { "type": "object", "description": "Policy governing how jobs are distributed to workers", "properties": { "name": { "type": "string", "description": "Friendly name of this policy." }, "offerExpiresAfterSeconds": { "type": "number", "format": "double", "description": "Number of seconds after which any offers created under this policy will be expired." }, "mode": { "$ref": "#/definitions/DistributionModeCreateOrUpdate", "description": "Mode governing the specific distribution method." } } }, "ExceptionAction": { "type": "object", "description": "The action to take when the exception is triggered.", "properties": { "id": { "type": "string", "description": "Unique Id of the exception action." }, "kind": { "$ref": "#/definitions/ExceptionActionKind", "description": "The type discriminator describing a sub-type of ExceptionAction." } }, "discriminator": "kind", "required": [ "kind" ] }, "ExceptionActionKind": { "type": "string", "description": "Discriminators for supported exception action types.", "enum": [ "cancel", "manualReclassify", "reclassify" ], "x-ms-enum": { "name": "ExceptionActionKind", "modelAsString": true, "values": [ { "name": "cancel", "value": "cancel", "description": "Discriminator value for CancelExceptionAction." }, { "name": "manualReclassify", "value": "manualReclassify", "description": "Discriminator value for ManualReclassifyExceptionAction." }, { "name": "reclassify", "value": "reclassify", "description": "Discriminator value for ReclassifyExceptionAction." } ] } }, "ExceptionPolicy": { "type": "object", "description": "A policy that defines actions to execute when exception are triggered.", "properties": { "etag": { "$ref": "#/definitions/Azure.Core.eTag", "description": "The entity tag for this resource.", "readOnly": true }, "id": { "type": "string", "description": "Id of an exception policy.", "readOnly": true }, "name": { "type": "string", "description": "Friendly name of this policy." }, "exceptionRules": { "type": "array", "description": "A collection of exception rules on the exception policy.", "items": { "$ref": "#/definitions/ExceptionRule" } } }, "required": [ "etag", "id" ] }, "ExceptionPolicyCreateOrUpdate": { "type": "object", "description": "A policy that defines actions to execute when exception are triggered.", "properties": { "name": { "type": "string", "description": "Friendly name of this policy." }, "exceptionRules": { "type": "array", "description": "A collection of exception rules on the exception policy.", "items": { "$ref": "#/definitions/ExceptionRule" } } } }, "ExceptionRule": { "type": "object", "description": "A rule that defines actions to execute upon a specific trigger.", "properties": { "id": { "type": "string", "description": "Id of an exception rule." }, "trigger": { "$ref": "#/definitions/ExceptionTrigger", "description": "The trigger for this exception rule." }, "actions": { "type": "array", "description": "A collection of actions to perform once the exception is triggered.", "items": { "$ref": "#/definitions/ExceptionAction" } } }, "required": [ "id", "trigger", "actions" ] }, "ExceptionTrigger": { "type": "object", "description": "Abstract base class for defining a trigger for exception rules.", "properties": { "kind": { "$ref": "#/definitions/ExceptionTriggerKind", "description": "The type discriminator describing a sub-type of ExceptionTrigger." } }, "discriminator": "kind", "required": [ "kind" ] }, "ExceptionTriggerKind": { "type": "string", "description": "Discriminators for supported exception trigger types.", "enum": [ "queueLength", "waitTime" ], "x-ms-enum": { "name": "ExceptionTriggerKind", "modelAsString": true, "values": [ { "name": "queueLength", "value": "queueLength", "description": "Discriminator value for QueueLengthExceptionTrigger." }, { "name": "waitTime", "value": "waitTime", "description": "Discriminator value for WaitTimeExceptionTrigger." } ] } }, "ExpressionRouterRule": { "type": "object", "description": "A rule providing inline expression rules.", "properties": { "language": { "$ref": "#/definitions/ExpressionRouterRuleLanguage", "description": "The expression language to compile to and execute." }, "expression": { "type": "string", "description": "An expression to evaluate. Should contain return statement with calculated values." } }, "required": [ "expression" ], "allOf": [ { "$ref": "#/definitions/RouterRule" } ], "x-ms-discriminator-value": "expression" }, "ExpressionRouterRuleCreateOrUpdate": { "type": "object", "description": "A rule providing inline expression rules.", "properties": { "language": { "$ref": "#/definitions/ExpressionRouterRuleLanguage", "description": "The expression language to compile to and execute." }, "expression": { "type": "string", "description": "An expression to evaluate. Should contain return statement with calculated values." } }, "allOf": [ { "$ref": "#/definitions/RouterRuleCreateOrUpdate" } ], "x-ms-discriminator-value": "expression" }, "ExpressionRouterRuleLanguage": { "type": "string", "description": "Available expression languages that can be configured.", "enum": [ "powerFx" ], "x-ms-enum": { "name": "ExpressionRouterRuleLanguage", "modelAsString": true, "values": [ { "name": "powerFx", "value": "powerFx", "description": "PowerFx" } ] } }, "FunctionRouterRule": { "type": "object", "description": "A rule providing a binding to an HTTP Triggered Azure Function.", "properties": { "functionUri": { "type": "string", "format": "uri", "description": "URL for Azure Function." }, "credential": { "$ref": "#/definitions/FunctionRouterRuleCredential", "description": "Credentials used to access Azure function rule." } }, "required": [ "functionUri" ], "allOf": [ { "$ref": "#/definitions/RouterRule" } ], "x-ms-discriminator-value": "function" }, "FunctionRouterRuleCreateOrUpdate": { "type": "object", "description": "A rule providing a binding to an HTTP Triggered Azure Function.", "properties": { "functionUri": { "type": "string", "format": "uri", "description": "URL for Azure Function." }, "credential": { "$ref": "#/definitions/FunctionRouterRuleCredential", "description": "Credentials used to access Azure function rule." } }, "allOf": [ { "$ref": "#/definitions/RouterRuleCreateOrUpdate" } ], "x-ms-discriminator-value": "function" }, "FunctionRouterRuleCredential": { "type": "object", "description": "Credentials used to access Azure function rule.", "properties": { "functionKey": { "type": "string", "description": "Access key scoped to a particular function." }, "appKey": { "type": "string", "description": "Access key scoped to a Azure Function app. This key grants access to all functions under the app." }, "clientId": { "type": "string", "description": "Client id, when AppKey is provided In context of Azure function, this is usually the name of the key." } } }, "JobMatchingMode": { "type": "object", "description": "A matching mode of one of the following types:\nQueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\nScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\nSuspendMode: Used when matching workers to a job needs to be suspended.", "properties": { "kind": { "$ref": "#/definitions/JobMatchingModeKind", "description": "The type discriminator describing a sub-type of JobMatchingMode." } }, "discriminator": "kind", "required": [ "kind" ] }, "JobMatchingModeCreateOrUpdate": { "type": "object", "description": "A matching mode of one of the following types:\nQueueAndMatchMode: Used when matching worker to a job is required to be done right after job is queued.\nScheduleAndSuspendMode: Used for scheduling jobs to be queued at a future time. At specified time, matching of a worker to the job will not start automatically.\nSuspendMode: Used when matching workers to a job needs to be suspended.", "properties": { "kind": { "$ref": "#/definitions/JobMatchingModeKind", "description": "The type discriminator describing a sub-type of JobMatchingMode." } }, "discriminator": "kind", "required": [ "kind" ] }, "JobMatchingModeKind": { "type": "string", "description": "Discriminators for supported matching mode types.", "enum": [ "queueAndMatch", "scheduleAndSuspend", "suspend" ], "x-ms-enum": { "name": "JobMatchingModeKind", "modelAsString": true, "values": [ { "name": "queueAndMatch", "value": "queueAndMatch", "description": "Discriminator value for QueueAndMatchMode." }, { "name": "scheduleAndSuspend", "value": "scheduleAndSuspend", "description": "Discriminator value for ScheduleAndSuspendMode." }, { "name": "suspend", "value": "suspend", "description": "Discriminator value for SuspendMode." } ] } }, "LabelOperator": { "type": "string", "description": "Describes supported operations on label values.", "enum": [ "equal", "notEqual", "lessThan", "lessThanOrEqual", "greaterThan", "greaterThanOrEqual" ], "x-ms-enum": { "name": "LabelOperator", "modelAsString": true, "values": [ { "name": "equal", "value": "equal", "description": "Equal." }, { "name": "notEqual", "value": "notEqual", "description": "Not Equal." }, { "name": "lessThan", "value": "lessThan", "description": "Less than." }, { "name": "lessThanOrEqual", "value": "lessThanOrEqual", "description": "Less than or equal." }, { "name": "greaterThan", "value": "greaterThan", "description": "Greater than." }, { "name": "greaterThanOrEqual", "value": "greaterThanOrEqual", "description": "Greater than or equal." } ] } }, "LongestIdleMode": { "type": "object", "description": "Jobs are directed to the worker who has been idle longest.", "allOf": [ { "$ref": "#/definitions/DistributionMode" } ], "x-ms-discriminator-value": "longestIdle" }, "LongestIdleModeCreateOrUpdate": { "type": "object", "description": "Jobs are directed to the worker who has been idle longest.", "allOf": [ { "$ref": "#/definitions/DistributionModeCreateOrUpdate" } ], "x-ms-discriminator-value": "longestIdle" }, "ManualReclassifyExceptionAction": { "type": "object", "description": "An action that manually reclassifies a job by providing the queue, priority and worker selectors.", "properties": { "queueId": { "type": "string", "description": "Updated QueueId." }, "priority": { "type": "integer", "format": "int32", "description": "Updated Priority." }, "workerSelectors": { "type": "array", "description": "Updated WorkerSelectors.", "items": { "$ref": "#/definitions/RouterWorkerSelector" } } }, "allOf": [ { "$ref": "#/definitions/ExceptionAction" } ], "x-ms-discriminator-value": "manualReclassify" }, "OAuth2WebhookClientCredential": { "type": "object", "description": "OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/", "properties": { "clientId": { "type": "string", "description": "ClientId for Contoso Authorization server." }, "clientSecret": { "type": "string", "description": "Client secret for Contoso Authorization server." } } }, "PagedClassificationPolicy": { "type": "object", "description": "Paged collection of ClassificationPolicy items", "properties": { "value": { "type": "array", "description": "The ClassificationPolicy items on this page", "items": { "$ref": "#/definitions/ClassificationPolicy" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PagedDistributionPolicy": { "type": "object", "description": "Paged collection of DistributionPolicy items", "properties": { "value": { "type": "array", "description": "The DistributionPolicy items on this page", "items": { "$ref": "#/definitions/DistributionPolicy" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PagedExceptionPolicy": { "type": "object", "description": "Paged collection of ExceptionPolicy items", "properties": { "value": { "type": "array", "description": "The ExceptionPolicy items on this page", "items": { "$ref": "#/definitions/ExceptionPolicy" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PagedRouterJob": { "type": "object", "description": "Paged collection of RouterJob items", "properties": { "value": { "type": "array", "description": "The RouterJob items on this page", "items": { "$ref": "#/definitions/RouterJob" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PagedRouterQueue": { "type": "object", "description": "Paged collection of RouterQueue items", "properties": { "value": { "type": "array", "description": "The RouterQueue items on this page", "items": { "$ref": "#/definitions/RouterQueue" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PagedRouterWorker": { "type": "object", "description": "Paged collection of RouterWorker items", "properties": { "value": { "type": "array", "description": "The RouterWorker items on this page", "items": { "$ref": "#/definitions/RouterWorker" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "PassThroughQueueSelectorAttachment": { "type": "object", "description": "Attaches a queue selector where the value is passed through from a job's label with the same key.", "properties": { "key": { "type": "string", "description": "The label key to query against." }, "labelOperator": { "$ref": "#/definitions/LabelOperator", "description": "Describes how the value of the label is compared to the value pass through." } }, "required": [ "key", "labelOperator" ], "allOf": [ { "$ref": "#/definitions/QueueSelectorAttachment" } ], "x-ms-discriminator-value": "passThrough" }, "PassThroughWorkerSelectorAttachment": { "type": "object", "description": "Attaches a worker selector where the value is passed through from a job's label with the same key.", "properties": { "key": { "type": "string", "description": "The label key to query against." }, "labelOperator": { "$ref": "#/definitions/LabelOperator", "description": "Describes how the value of the label is compared to the value pass through." }, "expiresAfterSeconds": { "type": "number", "format": "double", "description": "Describes how long the attached label selector is valid in seconds." } }, "required": [ "key", "labelOperator" ], "allOf": [ { "$ref": "#/definitions/WorkerSelectorAttachment" } ], "x-ms-discriminator-value": "passThrough" }, "QueueAndMatchMode": { "type": "object", "description": "Describes a matching mode where matching worker to a job is automatically started after job is queued successfully.", "allOf": [ { "$ref": "#/definitions/JobMatchingMode" } ], "x-ms-discriminator-value": "queueAndMatch" }, "QueueAndMatchModeCreateOrUpdate": { "type": "object", "description": "Describes a matching mode where matching worker to a job is automatically started after job is queued successfully.", "allOf": [ { "$ref": "#/definitions/JobMatchingModeCreateOrUpdate" } ], "x-ms-discriminator-value": "queueAndMatch" }, "QueueLengthExceptionTrigger": { "type": "object", "description": "Trigger for an exception action on exceeding queue length.", "properties": { "threshold": { "type": "integer", "format": "int32", "description": "Threshold of number of jobs ahead in the queue to for this trigger to fire." } }, "required": [ "threshold" ], "allOf": [ { "$ref": "#/definitions/ExceptionTrigger" } ], "x-ms-discriminator-value": "queueLength" }, "QueueSelectorAttachment": { "type": "object", "description": "An attachment of queue selectors to resolve a queue to a job from a classification policy.", "properties": { "kind": { "$ref": "#/definitions/QueueSelectorAttachmentKind", "description": "The type discriminator describing a sub-type of QueueSelectorAttachment." } }, "discriminator": "kind", "required": [ "kind" ] }, "QueueSelectorAttachmentKind": { "type": "string", "description": "Discriminators for supported queue selector attachment types.", "enum": [ "conditional", "passThrough", "ruleEngine", "static", "weightedAllocation" ], "x-ms-enum": { "name": "QueueSelectorAttachmentKind", "modelAsString": true, "values": [ { "name": "conditional", "value": "conditional", "description": "Discriminator value for ConditionalQueueSelectorAttachment." }, { "name": "passThrough", "value": "passThrough", "description": "Discriminator value for PassThroughQueueSelectorAttachment." }, { "name": "ruleEngine", "value": "ruleEngine", "description": "Discriminator value for RuleEngineQueueSelectorAttachment." }, { "name": "static", "value": "static", "description": "Discriminator value for StaticQueueSelectorAttachment." }, { "name": "weightedAllocation", "value": "weightedAllocation", "description": "Discriminator value for WeightedAllocationQueueSelectorAttachment." } ] } }, "QueueWeightedAllocation": { "type": "object", "description": "Contains the weight percentage and queue selectors to be applied if selected for weighted distributions.", "properties": { "weight": { "type": "number", "format": "double", "description": "The percentage of this weight, expressed as a fraction of 1." }, "queueSelectors": { "type": "array", "description": "A collection of queue selectors that will be applied if this allocation is selected.", "items": { "$ref": "#/definitions/RouterQueueSelector" } } }, "required": [ "weight", "queueSelectors" ] }, "ReclassifyExceptionAction": { "type": "object", "description": "An action that modifies labels on a job and then reclassifies it.", "properties": { "classificationPolicyId": { "type": "string", "description": "The new classification policy that will determine queue, priority and worker selectors." }, "labelsToUpsert": { "type": "object", "description": "Dictionary containing the labels to update (or add if not existing) in key-value pairs. Values must be primitive values - number, string, boolean.", "additionalProperties": {} } }, "allOf": [ { "$ref": "#/definitions/ExceptionAction" } ], "x-ms-discriminator-value": "reclassify" }, "ReclassifyJobOptions": { "type": "object", "description": "Request payload for reclassifying jobs." }, "ReclassifyJobResult": { "type": "object", "description": "Response payload from reclassifying a job." }, "RoundRobinMode": { "type": "object", "description": "Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job.", "allOf": [ { "$ref": "#/definitions/DistributionMode" } ], "x-ms-discriminator-value": "roundRobin" }, "RoundRobinModeCreateOrUpdate": { "type": "object", "description": "Jobs are distributed in order to workers, starting with the worker that is after the last worker to receive a job.", "allOf": [ { "$ref": "#/definitions/DistributionModeCreateOrUpdate" } ], "x-ms-discriminator-value": "roundRobin" }, "RouterChannel": { "type": "object", "description": "Represents the capacity a job in this channel will consume from a worker.", "properties": { "channelId": { "type": "string", "description": "Id of a channel." }, "capacityCostPerJob": { "type": "integer", "format": "int32", "description": "The amount of capacity that an instance of a job of this channel will consume of the total worker capacity." }, "maxNumberOfJobs": { "type": "integer", "format": "int32", "description": "The maximum number of jobs that can be supported concurrently for this channel. Value must be greater than zero." } }, "required": [ "channelId", "capacityCostPerJob" ] }, "RouterJob": { "type": "object", "description": "A unit of work to be routed", "properties": { "etag": { "$ref": "#/definitions/Azure.Core.eTag", "description": "The entity tag for this resource.", "readOnly": true }, "id": { "type": "string", "description": "Id of a job.", "readOnly": true }, "channelReference": { "type": "string", "description": "Reference to an external parent context, eg. call ID." }, "status": { "$ref": "#/definitions/RouterJobStatus", "description": "The status of the job.", "readOnly": true }, "enqueuedAt": { "type": "string", "format": "date-time", "description": "Timestamp a job was queued in UTC.", "readOnly": true }, "channelId": { "type": "string", "description": "The channel identifier. eg. voice, chat, etc." }, "classificationPolicyId": { "type": "string", "description": "Id of a classification policy used for classifying this job." }, "queueId": { "type": "string", "description": "Id of a queue that this job is queued to." }, "priority": { "type": "integer", "format": "int32", "description": "Priority of this job. Value must be between -100 to 100." }, "dispositionCode": { "type": "string", "description": "Reason code for cancelled or closed jobs." }, "requestedWorkerSelectors": { "type": "array", "description": "A collection of manually specified worker selectors, which a worker must satisfy in order to process this job.", "items": { "$ref": "#/definitions/RouterWorkerSelector" } }, "attachedWorkerSelectors": { "type": "array", "description": "A collection of worker selectors attached by a classification policy, which a worker must satisfy in order to process this job.", "items": { "$ref": "#/definitions/RouterWorkerSelector" }, "readOnly": true }, "labels": { "type": "object", "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "assignments": { "type": "object", "description": "A collection of the assignments of the job. Key is AssignmentId.", "additionalProperties": { "$ref": "#/definitions/RouterJobAssignment" }, "readOnly": true }, "tags": { "type": "object", "description": "A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "notes": { "type": "array", "description": "Notes attached to a job, sorted by timestamp.", "items": { "$ref": "#/definitions/RouterJobNote" } }, "scheduledAt": { "type": "string", "format": "date-time", "description": "If set, job will be scheduled to be enqueued at a given time.", "readOnly": true }, "matchingMode": { "$ref": "#/definitions/JobMatchingMode", "description": "If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode." } }, "required": [ "etag", "id" ] }, "RouterJobAssignment": { "type": "object", "description": "Assignment details of a job to a worker.", "properties": { "assignmentId": { "type": "string", "description": "Id of a job assignment.", "readOnly": true }, "workerId": { "type": "string", "description": "Id of the Worker assigned to the job." }, "assignedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was assigned to a worker in UTC." }, "completedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was marked as completed after being assigned in UTC." }, "closedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the job was marked as closed after being completed in UTC." } }, "required": [ "assignmentId", "assignedAt" ] }, "RouterJobCreateOrUpdate": { "type": "object", "description": "A unit of work to be routed", "properties": { "channelReference": { "type": "string", "description": "Reference to an external parent context, eg. call ID." }, "channelId": { "type": "string", "description": "The channel identifier. eg. voice, chat, etc." }, "classificationPolicyId": { "type": "string", "description": "Id of a classification policy used for classifying this job." }, "queueId": { "type": "string", "description": "Id of a queue that this job is queued to." }, "priority": { "type": "integer", "format": "int32", "description": "Priority of this job. Value must be between -100 to 100." }, "dispositionCode": { "type": "string", "description": "Reason code for cancelled or closed jobs." }, "requestedWorkerSelectors": { "type": "array", "description": "A collection of manually specified worker selectors, which a worker must satisfy in order to process this job.", "items": { "$ref": "#/definitions/RouterWorkerSelector" } }, "labels": { "type": "object", "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "tags": { "type": "object", "description": "A set of non-identifying attributes attached to this job. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "notes": { "type": "array", "description": "Notes attached to a job, sorted by timestamp.", "items": { "$ref": "#/definitions/RouterJobNote" } }, "matchingMode": { "$ref": "#/definitions/JobMatchingModeCreateOrUpdate", "description": "If provided, will determine how job matching will be carried out. Default mode: QueueAndMatchMode." } } }, "RouterJobNote": { "type": "object", "description": "A note attached to a job.", "properties": { "message": { "type": "string", "description": "The message contained in the note." }, "addedAt": { "type": "string", "format": "date-time", "description": "The time at which the note was added in UTC. If not provided, will default to the current time." } }, "required": [ "message" ] }, "RouterJobOffer": { "type": "object", "description": "An offer of a job to a worker.", "properties": { "offerId": { "type": "string", "description": "Id of an offer.", "readOnly": true }, "jobId": { "type": "string", "description": "Id of the job." }, "capacityCost": { "type": "integer", "format": "int32", "description": "The capacity cost consumed by the job offer." }, "offeredAt": { "type": "string", "format": "date-time", "description": "Timestamp when the offer was created in UTC." }, "expiresAt": { "type": "string", "format": "date-time", "description": "Timestamp when the offer will expire in UTC." } }, "required": [ "offerId", "jobId", "capacityCost" ] }, "RouterJobPositionDetails": { "type": "object", "description": "Position and estimated wait time for a job.", "properties": { "jobId": { "type": "string", "description": "Id of the job these details are about." }, "position": { "type": "integer", "format": "int32", "description": "Position of the job in question within that queue." }, "queueId": { "type": "string", "description": "Id of the queue this job is enqueued in." }, "queueLength": { "type": "integer", "format": "int32", "description": "Length of the queue: total number of enqueued jobs." }, "estimatedWaitTimeMinutes": { "type": "number", "format": "double", "description": "Estimated wait time of the job rounded up to the nearest minute." } }, "required": [ "jobId", "position", "queueId", "queueLength", "estimatedWaitTimeMinutes" ] }, "RouterJobStatus": { "type": "string", "description": "Describes the various status of a job.", "enum": [ "pendingClassification", "queued", "assigned", "completed", "closed", "cancelled", "classificationFailed", "created", "pendingSchedule", "scheduled", "scheduleFailed", "waitingForActivation" ], "x-ms-enum": { "name": "RouterJobStatus", "modelAsString": true, "values": [ { "name": "pendingClassification", "value": "pendingClassification", "description": "Job is waiting to be classified." }, { "name": "queued", "value": "queued", "description": "Job has been queued." }, { "name": "assigned", "value": "assigned", "description": "Job has been assigned to a worker." }, { "name": "completed", "value": "completed", "description": "Job has been completed by a worker." }, { "name": "closed", "value": "closed", "description": "Job has been closed by a worker." }, { "name": "cancelled", "value": "cancelled", "description": "Job has been cancelled." }, { "name": "classificationFailed", "value": "classificationFailed", "description": "Classification process failed for the job." }, { "name": "created", "value": "created", "description": "Job has been created." }, { "name": "pendingSchedule", "value": "pendingSchedule", "description": "Job has been created but not been scheduled yet." }, { "name": "scheduled", "value": "scheduled", "description": "Job has been scheduled successfully." }, { "name": "scheduleFailed", "value": "scheduleFailed", "description": "Job scheduling failed." }, { "name": "waitingForActivation", "value": "waitingForActivation", "description": "Job is in a suspended state and waiting for an update." } ] } }, "RouterQueue": { "type": "object", "description": "A queue that can contain jobs to be routed.", "properties": { "etag": { "$ref": "#/definitions/Azure.Core.eTag", "description": "The entity tag for this resource.", "readOnly": true }, "id": { "type": "string", "description": "Id of a queue.", "readOnly": true }, "name": { "type": "string", "description": "Friendly name of this queue." }, "distributionPolicyId": { "type": "string", "description": "Id of a distribution policy that will determine how a job is distributed to workers." }, "labels": { "type": "object", "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "exceptionPolicyId": { "type": "string", "description": "Id of an exception policy that determines various job escalation rules." } }, "required": [ "etag", "id" ] }, "RouterQueueCreateOrUpdate": { "type": "object", "description": "A queue that can contain jobs to be routed.", "properties": { "name": { "type": "string", "description": "Friendly name of this queue." }, "distributionPolicyId": { "type": "string", "description": "Id of a distribution policy that will determine how a job is distributed to workers." }, "labels": { "type": "object", "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "exceptionPolicyId": { "type": "string", "description": "Id of an exception policy that determines various job escalation rules." } } }, "RouterQueueSelector": { "type": "object", "description": "Describes a condition that must be met against a set of labels for queue selection.", "properties": { "key": { "type": "string", "description": "The label key to query against." }, "labelOperator": { "$ref": "#/definitions/LabelOperator", "description": "Describes how the value of the label is compared to the value defined on the label selector." }, "value": { "description": "The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean." } }, "required": [ "key", "labelOperator" ] }, "RouterQueueStatistics": { "type": "object", "description": "Statistics for the queue.", "properties": { "queueId": { "type": "string", "description": "Id of the queue these details are about." }, "length": { "type": "integer", "format": "int32", "description": "Length of the queue: total number of enqueued jobs." }, "estimatedWaitTimeMinutes": { "type": "object", "description": "The estimated wait time of this queue rounded up to the nearest minute, grouped by job priority.", "additionalProperties": { "format": "double", "type": "number" } }, "longestJobWaitTimeMinutes": { "type": "number", "format": "double", "description": "The wait time of the job that has been enqueued in this queue for the longest." } }, "required": [ "queueId", "length" ] }, "RouterRule": { "type": "object", "description": "A rule of one of the following types:\nStaticRule: A rule providing static rules that always return the same result, regardless of input.\nDirectMapRule: A rule that return the same labels as the input labels.\nExpressionRule: A rule providing inline expression rules.\nFunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\nWebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.", "properties": { "kind": { "$ref": "#/definitions/RouterRuleKind", "description": "The type discriminator describing a sub-type of RouterRule" } }, "discriminator": "kind", "required": [ "kind" ] }, "RouterRuleCreateOrUpdate": { "type": "object", "description": "A rule of one of the following types:\nStaticRule: A rule providing static rules that always return the same result, regardless of input.\nDirectMapRule: A rule that return the same labels as the input labels.\nExpressionRule: A rule providing inline expression rules.\nFunctionRule: A rule providing a binding to an HTTP Triggered Azure Function.\nWebhookRule: A rule providing a binding to a webserver following OAuth2.0 authentication protocol.", "properties": { "kind": { "$ref": "#/definitions/RouterRuleKind", "description": "The type discriminator describing a sub-type of RouterRule" } }, "discriminator": "kind", "required": [ "kind" ] }, "RouterRuleKind": { "type": "string", "description": "Discriminators for supported router rule types.", "enum": [ "directMap", "expression", "function", "static", "webhook" ], "x-ms-enum": { "name": "RouterRuleKind", "modelAsString": true, "values": [ { "name": "directMap", "value": "directMap", "description": "Discriminator value for DirectMapRouterRule." }, { "name": "expression", "value": "expression", "description": "Discriminator value for ExpressionRouterRule." }, { "name": "function", "value": "function", "description": "Discriminator value for FunctionRouterRule." }, { "name": "static", "value": "static", "description": "Discriminator value for StaticRouterRule." }, { "name": "webhook", "value": "webhook", "description": "Discriminator value for WebhookRouterRule." } ] } }, "RouterWorker": { "type": "object", "description": "An entity for jobs to be routed to.", "properties": { "etag": { "$ref": "#/definitions/Azure.Core.eTag", "description": "The entity tag for this resource.", "readOnly": true }, "id": { "type": "string", "description": "Id of a worker.", "readOnly": true }, "state": { "$ref": "#/definitions/RouterWorkerState", "description": "Current state of a worker.", "readOnly": true }, "queues": { "type": "array", "description": "Collection of queue(s) that this worker can receive work from.", "items": { "type": "string" } }, "capacity": { "type": "integer", "format": "int32", "description": "The total capacity score this worker has to manage multiple concurrent jobs." }, "labels": { "type": "object", "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "tags": { "type": "object", "description": "A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "channels": { "type": "array", "description": "Collection of channel(s) this worker can handle and their impact on the workers capacity.", "items": { "$ref": "#/definitions/RouterChannel" } }, "offers": { "type": "array", "description": "A list of active offers issued to this worker.", "items": { "$ref": "#/definitions/RouterJobOffer" }, "readOnly": true }, "assignedJobs": { "type": "array", "description": "A list of assigned jobs attached to this worker.", "items": { "$ref": "#/definitions/RouterWorkerAssignment" }, "readOnly": true }, "loadRatio": { "type": "number", "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.", "readOnly": true }, "availableForOffers": { "type": "boolean", "description": "A flag indicating this worker is open to receive offers or not." } }, "required": [ "etag", "id" ] }, "RouterWorkerAssignment": { "type": "object", "description": "The assignment for a worker to a job.", "properties": { "assignmentId": { "type": "string", "description": "Id of the assignment." }, "jobId": { "type": "string", "description": "Id of the job assigned." }, "capacityCost": { "type": "integer", "format": "int32", "description": "The amount of capacity this assignment has consumed on the worker." }, "assignedAt": { "type": "string", "format": "date-time", "description": "The assignment time of the job in UTC." } }, "required": [ "assignmentId", "jobId", "capacityCost", "assignedAt" ] }, "RouterWorkerCreateOrUpdate": { "type": "object", "description": "An entity for jobs to be routed to.", "properties": { "queues": { "type": "array", "description": "Collection of queue(s) that this worker can receive work from.", "items": { "type": "string" } }, "capacity": { "type": "integer", "format": "int32", "description": "The total capacity score this worker has to manage multiple concurrent jobs." }, "labels": { "type": "object", "description": "A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "tags": { "type": "object", "description": "A set of non-identifying attributes attached to this worker. Values must be primitive values - number, string, boolean.", "additionalProperties": {} }, "channels": { "type": "array", "description": "Collection of channel(s) this worker can handle and their impact on the workers capacity.", "items": { "$ref": "#/definitions/RouterChannel" } }, "availableForOffers": { "type": "boolean", "description": "A flag indicating this worker is open to receive offers or not." } } }, "RouterWorkerSelector": { "type": "object", "description": "Describes a condition that must be met against a set of labels for worker selection.", "properties": { "key": { "type": "string", "description": "The label key to query against." }, "labelOperator": { "$ref": "#/definitions/LabelOperator", "description": "Describes how the value of the label is compared to the value defined on the worker selector." }, "value": { "description": "The value to compare against the actual label value with the given operator. Values must be primitive values - number, string, boolean." }, "expiresAfterSeconds": { "type": "number", "format": "double", "description": "Describes how long this label selector is valid in seconds." }, "expedite": { "type": "boolean", "description": "Pushes a job to the front of the queue as long as this selector is active." }, "status": { "$ref": "#/definitions/RouterWorkerSelectorStatus", "description": "Status of the worker selector.", "readOnly": true }, "expiresAt": { "type": "string", "format": "date-time", "description": "The time at which this worker selector expires in UTC.", "readOnly": true } }, "required": [ "key", "labelOperator" ] }, "RouterWorkerSelectorStatus": { "type": "string", "description": "Describes the status of a worker selector.", "enum": [ "active", "expired" ], "x-ms-enum": { "name": "RouterWorkerSelectorStatus", "modelAsString": true, "values": [ { "name": "active", "value": "active", "description": "Worker selector is valid." }, { "name": "expired", "value": "expired", "description": "Worker selector is not valid." } ] } }, "RouterWorkerState": { "type": "string", "description": "Enums for worker states.", "enum": [ "active", "draining", "inactive" ], "x-ms-enum": { "name": "RouterWorkerState", "modelAsString": true, "values": [ { "name": "active", "value": "active", "description": "Worker is active and available to take offers." }, { "name": "draining", "value": "draining", "description": "Worker is not active, if there are existing offers they are being revoked. No new offers are sent." }, { "name": "inactive", "value": "inactive", "description": "Worker is not active. No new offers are sent." } ] } }, "RuleEngineQueueSelectorAttachment": { "type": "object", "description": "Attaches queue selectors to a job when the RouterRule is resolved.", "properties": { "rule": { "$ref": "#/definitions/RouterRule", "description": "A RouterRule that resolves a collection of queue selectors to attach." } }, "required": [ "rule" ], "allOf": [ { "$ref": "#/definitions/QueueSelectorAttachment" } ], "x-ms-discriminator-value": "ruleEngine" }, "RuleEngineWorkerSelectorAttachment": { "type": "object", "description": "Attaches worker selectors to a job when a RouterRule is resolved.", "properties": { "rule": { "$ref": "#/definitions/RouterRule", "description": "A RouterRule that resolves a collection of worker selectors to attach." } }, "required": [ "rule" ], "allOf": [ { "$ref": "#/definitions/WorkerSelectorAttachment" } ], "x-ms-discriminator-value": "ruleEngine" }, "ScheduleAndSuspendMode": { "type": "object", "description": "Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically.", "properties": { "scheduleAt": { "type": "string", "format": "date-time", "description": "Requested schedule time." } }, "required": [ "scheduleAt" ], "allOf": [ { "$ref": "#/definitions/JobMatchingMode" } ], "x-ms-discriminator-value": "scheduleAndSuspend" }, "ScheduleAndSuspendModeCreateOrUpdate": { "type": "object", "description": "Describes a matching mode used for scheduling jobs to be queued at a future time. At the specified time, matching worker to a job will not start automatically.", "properties": { "scheduleAt": { "type": "string", "format": "date-time", "description": "Requested schedule time." } }, "allOf": [ { "$ref": "#/definitions/JobMatchingModeCreateOrUpdate" } ], "x-ms-discriminator-value": "scheduleAndSuspend" }, "ScoringRuleOptions": { "type": "object", "description": "Encapsulates all options that can be passed as parameters for scoring rule with BestWorkerMode.", "properties": { "batchSize": { "type": "integer", "format": "int32", "description": "Set batch size when 'isBatchScoringEnabled' is set to true. Defaults to 20 if not configured.", "default": 20 }, "scoringParameters": { "type": "array", "description": "List of extra parameters from a job that will be sent as part of the payload to scoring rule. If not set, a job's labels (sent in the payload as `job`) and a job's worker selectors (sent in the payload as `selectors`) are added to the payload of the scoring rule by default. Note: Worker labels are always sent with scoring payload.", "default": [ "jobLabels", "workerSelectors" ], "items": { "$ref": "#/definitions/ScoringRuleParameterSelector" } }, "isBatchScoringEnabled": { "type": "boolean", "description": "If set to true, will score workers in batches, and the parameter name of the worker labels will be sent as `workers`. By default, set to false and the parameter name for the worker labels will be sent as `worker`. Note: If enabled, use 'batchSize' to set batch size.", "default": false }, "descendingOrder": { "type": "boolean", "description": "If false, will sort scores by ascending order. By default, set to true.", "default": true } } }, "ScoringRuleParameterSelector": { "type": "string", "description": "Supported parameters for scoring workers used with BestWorkerMode.", "enum": [ "jobLabels", "workerSelectors" ], "x-ms-enum": { "name": "ScoringRuleParameterSelector", "modelAsString": true, "values": [ { "name": "jobLabels", "value": "jobLabels", "description": "Parameter to add job labels to scoring payload. Property is sent as `job`." }, { "name": "workerSelectors", "value": "workerSelectors", "description": "Parameter to add worker selectors from a job to scoring payload. Property is sent as `selectors`." } ] } }, "StaticQueueSelectorAttachment": { "type": "object", "description": "Describes a queue selector that will be attached to a job.", "properties": { "queueSelector": { "$ref": "#/definitions/RouterQueueSelector", "description": "The queue selector to attach." } }, "required": [ "queueSelector" ], "allOf": [ { "$ref": "#/definitions/QueueSelectorAttachment" } ], "x-ms-discriminator-value": "static" }, "StaticRouterRule": { "type": "object", "description": "A rule providing static rules that always return the same result, regardless of input.", "properties": { "value": { "description": "The static value this rule always returns. Values must be primitive values - number, string, boolean." } }, "allOf": [ { "$ref": "#/definitions/RouterRule" } ], "x-ms-discriminator-value": "static" }, "StaticRouterRuleCreateOrUpdate": { "type": "object", "description": "A rule providing static rules that always return the same result, regardless of input.", "properties": { "value": { "description": "The static value this rule always returns. Values must be primitive values - number, string, boolean." } }, "allOf": [ { "$ref": "#/definitions/RouterRuleCreateOrUpdate" } ], "x-ms-discriminator-value": "static" }, "StaticWorkerSelectorAttachment": { "type": "object", "description": "Describes a worker selector that will be attached to a job.", "properties": { "workerSelector": { "$ref": "#/definitions/RouterWorkerSelector", "description": "The worker selector to attach." } }, "required": [ "workerSelector" ], "allOf": [ { "$ref": "#/definitions/WorkerSelectorAttachment" } ], "x-ms-discriminator-value": "static" }, "SuspendMode": { "type": "object", "description": "Describes a matching mode where matching worker to a job is suspended.", "allOf": [ { "$ref": "#/definitions/JobMatchingMode" } ], "x-ms-discriminator-value": "suspend" }, "SuspendModeCreateOrUpdate": { "type": "object", "description": "Describes a matching mode where matching worker to a job is suspended.", "allOf": [ { "$ref": "#/definitions/JobMatchingModeCreateOrUpdate" } ], "x-ms-discriminator-value": "suspend" }, "UnassignJobOptions": { "type": "object", "description": "Request payload for unassigning a job.", "properties": { "suspendMatching": { "type": "boolean", "description": "If SuspendMatching is true, then a job is not queued for re-matching with a worker." } } }, "UnassignJobResult": { "type": "object", "description": "Response payload after a job has been successfully unassigned.", "properties": { "jobId": { "type": "string", "description": "Id of an unassigned job." }, "unassignmentCount": { "type": "integer", "format": "int32", "description": "The number of times a job is unassigned. At a maximum 3." } }, "required": [ "jobId", "unassignmentCount" ] }, "WaitTimeExceptionTrigger": { "type": "object", "description": "Trigger for an exception action on exceeding wait time.", "properties": { "thresholdSeconds": { "type": "number", "format": "double", "description": "Threshold for wait time for this trigger." } }, "required": [ "thresholdSeconds" ], "allOf": [ { "$ref": "#/definitions/ExceptionTrigger" } ], "x-ms-discriminator-value": "waitTime" }, "WebhookRouterRule": { "type": "object", "description": "A rule providing a binding to an external web server.", "properties": { "authorizationServerUri": { "type": "string", "format": "uri", "description": "Uri for Authorization Server." }, "clientCredential": { "$ref": "#/definitions/OAuth2WebhookClientCredential", "description": "OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/" }, "webhookUri": { "type": "string", "format": "uri", "description": "Uri for Contoso's Web Server." } }, "allOf": [ { "$ref": "#/definitions/RouterRule" } ], "x-ms-discriminator-value": "webhook" }, "WebhookRouterRuleCreateOrUpdate": { "type": "object", "description": "A rule providing a binding to an external web server.", "properties": { "authorizationServerUri": { "type": "string", "format": "uri", "description": "Uri for Authorization Server." }, "clientCredential": { "$ref": "#/definitions/OAuth2WebhookClientCredential", "description": "OAuth2.0 Credentials used to Contoso's Authorization server. Reference: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/" }, "webhookUri": { "type": "string", "format": "uri", "description": "Uri for Contoso's Web Server." } }, "allOf": [ { "$ref": "#/definitions/RouterRuleCreateOrUpdate" } ], "x-ms-discriminator-value": "webhook" }, "WeightedAllocationQueueSelectorAttachment": { "type": "object", "description": "Describes multiple sets of queue selectors, of which one will be selected and attached according to a weighting.", "properties": { "allocations": { "type": "array", "description": "A collection of percentage based weighted allocations.", "items": { "$ref": "#/definitions/QueueWeightedAllocation" } } }, "required": [ "allocations" ], "allOf": [ { "$ref": "#/definitions/QueueSelectorAttachment" } ], "x-ms-discriminator-value": "weightedAllocation" }, "WeightedAllocationWorkerSelectorAttachment": { "type": "object", "description": "Describes multiple sets of worker selectors, of which one will be selected and attached according to a weighting.", "properties": { "allocations": { "type": "array", "description": "A collection of percentage based weighted allocations.", "items": { "$ref": "#/definitions/WorkerWeightedAllocation" } } }, "required": [ "allocations" ], "allOf": [ { "$ref": "#/definitions/WorkerSelectorAttachment" } ], "x-ms-discriminator-value": "weightedAllocation" }, "WorkerSelectorAttachment": { "type": "object", "description": "An attachment which attaches worker selectors to a job.", "properties": { "kind": { "$ref": "#/definitions/WorkerSelectorAttachmentKind", "description": "The type discriminator describing a sub-type of WorkerSelectorAttachment." } }, "discriminator": "kind", "required": [ "kind" ] }, "WorkerSelectorAttachmentKind": { "type": "string", "description": "Discriminators for supported worker selector attachment types.", "enum": [ "conditional", "passThrough", "ruleEngine", "static", "weightedAllocation" ], "x-ms-enum": { "name": "WorkerSelectorAttachmentKind", "modelAsString": true, "values": [ { "name": "conditional", "value": "conditional", "description": "Discriminator value for ConditionalWorkerSelectorAttachment." }, { "name": "passThrough", "value": "passThrough", "description": "Discriminator value for PassThroughWorkerSelectorAttachment." }, { "name": "ruleEngine", "value": "ruleEngine", "description": "Discriminator value for RuleEngineWorkerSelectorAttachment." }, { "name": "static", "value": "static", "description": "Discriminator value for StaticWorkerSelectorAttachment." }, { "name": "weightedAllocation", "value": "weightedAllocation", "description": "Discriminator value for WeightedAllocationWorkerSelectorAttachment." } ] } }, "WorkerWeightedAllocation": { "type": "object", "description": "Contains the weight percentage and worker selectors to be applied if selected for weighted distributions.", "properties": { "weight": { "type": "number", "format": "double", "description": "The percentage of this weight, expressed as a fraction of 1." }, "workerSelectors": { "type": "array", "description": "A collection of worker selectors that will be applied if this allocation is selected.", "items": { "$ref": "#/definitions/RouterWorkerSelector" } } }, "required": [ "weight", "workerSelectors" ] } }, "parameters": { "Azure.Core.Foundations.ApiVersionParameter": { "name": "api-version", "in": "query", "description": "The API version to use for this operation.", "required": true, "type": "string", "minLength": 1, "x-ms-parameter-location": "method", "x-ms-client-name": "apiVersion" }, "RouterConditionalRequestHeaders.ifMatch": { "name": "If-Match", "in": "header", "description": "The request should only proceed if an entity matches this string.", "required": false, "type": "string", "x-ms-parameter-location": "method", "x-ms-client-name": "ifMatch" }, "RouterConditionalRequestHeaders.ifUnmodifiedSince": { "name": "If-Unmodified-Since", "in": "header", "description": "The request should only proceed if the entity was not modified after this time.", "required": false, "type": "string", "format": "date-time-rfc7231", "x-ms-parameter-location": "method", "x-ms-client-name": "ifUnmodifiedSince" } } }