次の方法で共有


Job Router Administration Operations - Upsert Exception Policy

例外ポリシーを作成または更新します。

PATCH {endpoint}/routing/exceptionPolicies/{exceptionPolicyId}?api-version=2023-11-01

URI パラメーター

名前 / 必須 説明
endpoint
path True

string

通信リソースの URI

exceptionPolicyId
path True

string

例外ポリシーの ID。

api-version
query True

string

この操作に使用する API バージョン。

要求ヘッダー

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

名前 必須 説明
If-Match

string

要求は、エンティティがこの文字列と一致する場合にのみ続行する必要があります。

If-Unmodified-Since

string

date-time-rfc7231

要求は、エンティティがこの時刻より後に変更されなかった場合にのみ続行する必要があります。

要求本文

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

名前 説明
exceptionRules

ExceptionRule[]

例外ポリシーの例外規則のコレクション。

name

string

このポリシーのフレンドリ名。

応答

名前 説明
200 OK

ExceptionPolicy

要求は成功しました。

ヘッダー

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

ExceptionPolicy

要求が成功し、結果として新しいリソースが作成されました。

ヘッダー

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

Azure.Core.Foundations.ErrorResponse

予期しないエラー応答。

ヘッダー

x-ms-error-code: string

セキュリティ

AadOauth2Auth

Azure Active Directory OAuth2 フロー

型: oauth2
フロー: accessCode
Authorization URL (承認 URL): https://login.microsoftonline.com/common/oauth2/authorize
Token URL (トークン URL): https://login.microsoftonline.com/common/oauth2/token

スコープ

名前 説明
https://communication.azure.com/.default

Creates an exception policy
Updates an exception policy

Creates an exception policy

要求のサンプル

PATCH https://contoso.westus.communications.azure.com/routing/exceptionPolicies/cf1cda69-6f41-45ac-b252-213293f1b1cb?api-version=2023-11-01

{
  "name": "Main",
  "exceptionRules": [
    {
      "id": "MaxWaitTimeExceeded",
      "actions": [
        {
          "kind": "reclassify",
          "classificationPolicyId": "Main",
          "labelsToUpsert": {
            "escalated": true
          }
        }
      ],
      "trigger": {
        "kind": "waitTime",
        "thresholdSeconds": 20
      }
    }
  ]
}

応答のサンプル

{
  "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb",
  "name": "Main",
  "exceptionRules": [
    {
      "id": "MaxWaitTimeExceeded",
      "trigger": {
        "kind": "waitTime",
        "thresholdSeconds": 20
      },
      "actions": [
        {
          "id": "babd4f6f-916e-4e91-9c89-e0bb05a2c425",
          "kind": "reclassify",
          "classificationPolicyId": "Main",
          "labelsToUpsert": {
            "escalated": true
          }
        }
      ]
    }
  ],
  "etag": "etag"
}
{
  "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb",
  "name": "Main",
  "exceptionRules": [
    {
      "id": "MaxWaitTimeExceeded",
      "trigger": {
        "kind": "waitTime",
        "thresholdSeconds": 20
      },
      "actions": [
        {
          "id": "babd4f6f-916e-4e91-9c89-e0bb05a2c425",
          "kind": "reclassify",
          "classificationPolicyId": "Main",
          "labelsToUpsert": {
            "escalated": true
          }
        }
      ]
    }
  ],
  "etag": "etag"
}

Updates an exception policy

要求のサンプル

PATCH https://contoso.westus.communications.azure.com/routing/exceptionPolicies/cf1cda69-6f41-45ac-b252-213293f1b1cb?api-version=2023-11-01

{
  "name": "Main test",
  "exceptionRules": [
    {
      "id": "MaxWaitTimeExceeded",
      "actions": [
        {
          "kind": "reclassify",
          "classificationPolicyId": "Main",
          "labelsToUpsert": {
            "escalated": true
          }
        }
      ],
      "trigger": {
        "kind": "waitTime",
        "thresholdSeconds": 20
      }
    }
  ]
}

応答のサンプル

{
  "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb",
  "name": "Main test",
  "exceptionRules": [
    {
      "id": "MaxWaitTimeExceeded",
      "trigger": {
        "kind": "waitTime",
        "thresholdSeconds": 20
      },
      "actions": [
        {
          "id": "babd4f6f-916e-4e91-9c89-e0bb05a2c425",
          "kind": "reclassify",
          "classificationPolicyId": "Main",
          "labelsToUpsert": {
            "escalated": true
          }
        }
      ]
    }
  ],
  "etag": "etag"
}
{
  "id": "cf1cda69-6f41-45ac-b252-213293f1b1cb",
  "name": "Main test",
  "exceptionRules": [
    {
      "id": "MaxWaitTimeExceeded",
      "trigger": {
        "kind": "waitTime",
        "thresholdSeconds": 20
      },
      "actions": [
        {
          "id": "babd4f6f-916e-4e91-9c89-e0bb05a2c425",
          "kind": "reclassify",
          "classificationPolicyId": "Main",
          "labelsToUpsert": {
            "escalated": true
          }
        }
      ]
    }
  ],
  "etag": "etag"
}

定義

名前 説明
Azure.Core.Foundations.Error

エラー オブジェクト。

Azure.Core.Foundations.ErrorResponse

エラーの詳細を含む応答。

Azure.Core.Foundations.InnerError

エラーに関するより具体的な情報を含むオブジェクト。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

CancelExceptionAction

ジョブを取り消し済みとしてマークするアクション。

ExceptionActionKind

サポートされている例外アクションの種類の識別子。

ExceptionPolicy

例外がトリガーされたときに実行するアクションを定義するポリシー。

ExceptionPolicyCreateOrUpdate

例外がトリガーされたときに実行するアクションを定義するポリシー。

ExceptionRule

特定のトリガーに対して実行するアクションを定義するルール。

ExceptionTriggerKind

サポートされている例外トリガーの種類の識別子。

LabelOperator

ラベル値に対してサポートされている操作について説明します。

ManualReclassifyExceptionAction

キュー、優先度、およびワーカー セレクターを指定してジョブを手動で再分類するアクション。

QueueLengthExceptionTrigger

キューの長さを超えた場合の例外アクションのトリガー。

ReclassifyExceptionAction

ジョブのラベルを変更し、再分類するアクション。

RouterWorkerSelector

worker 選択のラベルのセットに対して満たす必要がある条件について説明します。

RouterWorkerSelectorStatus

ワーカー セレクターの状態について説明します。

WaitTimeExceptionTrigger

待機時間を超えた場合に例外アクションをトリガーします。

Azure.Core.Foundations.Error

エラー オブジェクト。

名前 説明
code

string

サーバー定義の一連のエラー コードの 1 つ。

details

Azure.Core.Foundations.Error[]

この報告されたエラーの原因となった特定のエラーに関する詳細の配列。

innererror

Azure.Core.Foundations.InnerError

エラーに関する現在のオブジェクトよりも具体的な情報を含むオブジェクト。

message

string

エラーの人間が判読できる表現。

target

string

エラーのターゲット。

Azure.Core.Foundations.ErrorResponse

エラーの詳細を含む応答。

名前 説明
error

Azure.Core.Foundations.Error

エラー オブジェクト。

Azure.Core.Foundations.InnerError

エラーに関するより具体的な情報を含むオブジェクト。 Microsoft One API のガイドラインに従って - https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses.

名前 説明
code

string

サーバー定義の一連のエラー コードの 1 つ。

innererror

Azure.Core.Foundations.InnerError

内部エラー。

CancelExceptionAction

ジョブを取り消し済みとしてマークするアクション。

名前 説明
dispositionCode

string

ジョブの結果を示し、このフィールドに独自のカスタム値を設定します。

id

string

例外アクションの一意の ID。

kind string:

cancel

ExceptionAction のサブタイプを記述する型識別子。

note

string

現在のタイムスタンプを持つジョブの Notes コレクションに追加されるメモ。

ExceptionActionKind

サポートされている例外アクションの種類の識別子。

名前 説明
cancel

string

CancelExceptionAction の識別子の値。

manualReclassify

string

ManualReclassifyExceptionAction の識別子の値。

reclassify

string

ReclassifyExceptionAction の識別子の値。

ExceptionPolicy

例外がトリガーされたときに実行するアクションを定義するポリシー。

名前 説明
etag

string

このリソースのエンティティ タグ。

exceptionRules

ExceptionRule[]

例外ポリシーの例外規則のコレクション。

id

string

例外ポリシーの ID。

name

string

このポリシーのフレンドリ名。

ExceptionPolicyCreateOrUpdate

例外がトリガーされたときに実行するアクションを定義するポリシー。

名前 説明
exceptionRules

ExceptionRule[]

例外ポリシーの例外規則のコレクション。

name

string

このポリシーのフレンドリ名。

ExceptionRule

特定のトリガーに対して実行するアクションを定義するルール。

名前 説明
actions ExceptionAction[]:

例外がトリガーされた後に実行するアクションのコレクション。

id

string

例外ルールの ID。

trigger ExceptionTrigger:

この例外ルールのトリガー。

ExceptionTriggerKind

サポートされている例外トリガーの種類の識別子。

名前 説明
queueLength

string

QueueLengthExceptionTrigger の識別子の値。

waitTime

string

WaitTimeExceptionTrigger の識別子の値。

LabelOperator

ラベル値に対してサポートされている操作について説明します。

名前 説明
equal

string

等しい。

greaterThan

string

より大きい。

greaterThanOrEqual

string

以上。

lessThan

string

未満。

lessThanOrEqual

string

以下。

notEqual

string

等しくない。

ManualReclassifyExceptionAction

キュー、優先度、およびワーカー セレクターを指定してジョブを手動で再分類するアクション。

名前 説明
id

string

例外アクションの一意の ID。

kind string:

manualReclassify

ExceptionAction のサブタイプを記述する型識別子。

priority

integer

優先度が更新されました。

queueId

string

QueueId を更新しました。

workerSelectors

RouterWorkerSelector[]

WorkerSelectors を更新しました。

QueueLengthExceptionTrigger

キューの長さを超えた場合の例外アクションのトリガー。

名前 説明
kind string:

queueLength

ExceptionTrigger のサブタイプを記述する型識別子。

threshold

integer

このトリガーが起動するキュー内のジョブ数のしきい値。

ReclassifyExceptionAction

ジョブのラベルを変更し、再分類するアクション。

名前 説明
classificationPolicyId

string

キュー、優先度、ワーカー セレクターを決定する新しい分類ポリシー。

id

string

例外アクションの一意の ID。

kind string:

reclassify

ExceptionAction のサブタイプを記述する型識別子。

labelsToUpsert

キーと値のペアで更新する (または既存でない場合は追加する) ラベルを含むディクショナリ。 値はプリミティブ値 (数値、文字列、ブール値) である必要があります。

RouterWorkerSelector

worker 選択のラベルのセットに対して満たす必要がある条件について説明します。

名前 説明
expedite

boolean

このセレクターがアクティブである限り、ジョブをキューの先頭にプッシュします。

expiresAfterSeconds

number

このラベル セレクターが有効な時間 (秒単位) について説明します。

expiresAt

string

このワーカー セレクターが UTC で期限切れになる時刻。

key

string

クエリの対象となるラベル キー。

labelOperator

LabelOperator

ラベルの値とワーカー セレクターで定義されている値の比較方法について説明します。

status

RouterWorkerSelectorStatus

ワーカー セレクターの状態。

value

実際のラベル値と特定の演算子と比較する値。 値はプリミティブ値 (数値、文字列、ブール値) である必要があります。

RouterWorkerSelectorStatus

ワーカー セレクターの状態について説明します。

名前 説明
active

string

ワーカー セレクターは有効です。

expired

string

ワーカー セレクターが無効です。

WaitTimeExceptionTrigger

待機時間を超えた場合に例外アクションをトリガーします。

名前 説明
kind string:

waitTime

ExceptionTrigger のサブタイプを記述する型識別子。

thresholdSeconds

number

このトリガーの待機時間のしきい値。