Job Router Administration Operations - Upsert Queue

Creates or updates a queue.

PATCH {endpoint}/routing/queues/{queueId}?api-version=2023-11-01

URI Parameters

Name In Required Type Description
endpoint
path True

string

Uri of your Communication resource

queueId
path True

string

Id of a queue.

api-version
query True

string

The API version to use for this operation.

Request Header

Media Types: "application/merge-patch+json"

Name Required Type Description
If-Match

string

The request should only proceed if an entity matches this string.

If-Unmodified-Since

string

date-time-rfc7231

The request should only proceed if the entity was not modified after this time.

Request Body

Media Types: "application/merge-patch+json"

Name Type Description
distributionPolicyId

string

Id of a distribution policy that will determine how a job is distributed to workers.

exceptionPolicyId

string

Id of an exception policy that determines various job escalation rules.

labels

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.

name

string

Friendly name of this queue.

Responses

Name Type Description
200 OK

RouterQueue

The request has succeeded.

Headers

  • ETag: string
  • Last-Modified: string
201 Created

RouterQueue

The request has succeeded and a new resource has been created as a result.

Headers

  • ETag: string
  • Last-Modified: string
Other Status Codes

Azure.Core.Foundations.ErrorResponse

An unexpected error response.

Headers

x-ms-error-code: string

Examples

Creates a queue
Updates a queue

Creates a queue

Sample request

PATCH https://contoso.westus.communications.azure.com/routing/queues/QueueId?api-version=2023-11-01

{
  "distributionPolicyId": "MainDistributionPolicy",
  "name": "Main",
  "labels": {},
  "exceptionPolicyId": "MainExceptionPolicy"
}

Sample response

{
  "id": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68",
  "name": "Main",
  "distributionPolicyId": "MainDistributionPolicy",
  "labels": {},
  "exceptionPolicyId": "MainExceptionPolicy",
  "etag": "etag"
}
{
  "id": "246d5a06-c04a-4b6b-8a34-02bbd9fdad68",
  "name": "Main",
  "distributionPolicyId": "MainDistributionPolicy",
  "labels": {},
  "exceptionPolicyId": "MainExceptionPolicy",
  "etag": "etag"
}

Updates a queue

Sample request

PATCH https://contoso.westus.communications.azure.com/routing/queues/MainQueue?api-version=2023-11-01

{
  "distributionPolicyId": "MainDistributionPolicy",
  "name": "Main"
}

Sample response

{
  "id": "MainQueue",
  "name": "Main",
  "distributionPolicyId": "MainDistributionPolicy",
  "labels": {},
  "exceptionPolicyId": "MainExceptionPolicy",
  "etag": "etag"
}
{
  "id": "MainQueue",
  "name": "Main",
  "distributionPolicyId": "MainDistributionPolicy",
  "labels": {},
  "exceptionPolicyId": "MainExceptionPolicy",
  "etag": "etag"
}

Definitions

Name Description
Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

RouterQueue

A queue that can contain jobs to be routed.

RouterQueueCreateOrUpdate

A queue that can contain jobs to be routed.

Azure.Core.Foundations.Error

The error object.

Name Type Description
code

string

One of a server-defined set of error codes.

details

Azure.Core.Foundations.Error[]

An array of details about specific errors that led to this reported error.

innererror

Azure.Core.Foundations.InnerError

An object containing more specific information than the current object about the error.

message

string

A human-readable representation of the error.

target

string

The target of the error.

Azure.Core.Foundations.ErrorResponse

A response containing error details.

Name Type Description
error

Azure.Core.Foundations.Error

The error object.

Azure.Core.Foundations.InnerError

An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

Name Type Description
code

string

One of a server-defined set of error codes.

innererror

Azure.Core.Foundations.InnerError

Inner error.

RouterQueue

A queue that can contain jobs to be routed.

Name Type Description
distributionPolicyId

string

Id of a distribution policy that will determine how a job is distributed to workers.

etag

string

The entity tag for this resource.

exceptionPolicyId

string

Id of an exception policy that determines various job escalation rules.

id

string

Id of a queue.

labels

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.

name

string

Friendly name of this queue.

RouterQueueCreateOrUpdate

A queue that can contain jobs to be routed.

Name Type Description
distributionPolicyId

string

Id of a distribution policy that will determine how a job is distributed to workers.

exceptionPolicyId

string

Id of an exception policy that determines various job escalation rules.

labels

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.

name

string

Friendly name of this queue.