次の方法で共有


Job Router Administration Operations - Upsert Classification Policy

分類ポリシーを作成または更新します。

PATCH {endpoint}/routing/classificationPolicies/{classificationPolicyId}?api-version=2023-11-01

URI パラメーター

名前 / 必須 説明
classificationPolicyId
path True

string

分類ポリシーの ID。

endpoint
path True

string

通信リソースの URI

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"

名前 説明
fallbackQueueId

string

キュー セレクターの添付ファイルで一致するものが見つからないかどうかを選択するフォールバック キューの ID。

name

string

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

prioritizationRule RouterRuleCreateOrUpdate:

ジョブの優先度スコアを決定するルール。

queueSelectorAttachments QueueSelectorAttachment[]:

ジョブのキューを解決するために使用されるキュー セレクターの添付ファイル。

workerSelectorAttachments WorkerSelectorAttachment[]:

ワーカー セレクターをジョブにアタッチするために使用されるワーカー セレクターの添付ファイル。

応答

名前 説明
200 OK

ClassificationPolicy

要求は成功しました。

ヘッダー

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

ClassificationPolicy

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

ヘッダー

  • 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 a Classification Policy
Updates a Classification Policy

Creates a Classification Policy

要求のサンプル

PATCH https://contoso.westus.communications.azure.com/routing/classificationPolicies/90eb00c4-234e-4df7-a231-ef7895518384?api-version=2023-11-01

{
  "name": "Main",
  "fallbackQueueId": "MainQueue",
  "queueSelectorAttachments": [
    {
      "kind": "conditional",
      "condition": {
        "kind": "expression",
        "language": "powerFx",
        "expression": "1 = 1"
      },
      "queueSelectors": [
        {
          "key": "foo",
          "labelOperator": "equal",
          "value": "bar"
        }
      ]
    }
  ],
  "prioritizationRule": {
    "kind": "static",
    "value": "2"
  }
}

応答のサンプル

{
  "id": "90eb00c4-234e-4df7-a231-ef7895518384",
  "name": "Main",
  "fallbackQueueId": "MainQueue",
  "queueSelectorAttachments": [
    {
      "kind": "conditional",
      "condition": {
        "kind": "expression",
        "language": "powerFx",
        "expression": "1 = 1"
      },
      "queueSelectors": [
        {
          "key": "foo",
          "labelOperator": "equal",
          "value": "bar"
        }
      ]
    }
  ],
  "prioritizationRule": {
    "kind": "static",
    "value": "2"
  },
  "workerSelectorAttachments": [],
  "etag": "etag"
}
{
  "id": "90eb00c4-234e-4df7-a231-ef7895518384",
  "name": "Main",
  "fallbackQueueId": "MainQueue",
  "queueSelectorAttachments": [
    {
      "kind": "conditional",
      "condition": {
        "kind": "expression",
        "language": "powerFx",
        "expression": "1 = 1"
      },
      "queueSelectors": [
        {
          "key": "foo",
          "labelOperator": "equal",
          "value": "bar"
        }
      ]
    }
  ],
  "prioritizationRule": {
    "kind": "static",
    "value": "2"
  },
  "workerSelectorAttachments": [],
  "etag": "etag"
}

Updates a Classification Policy

要求のサンプル

PATCH https://contoso.westus.communications.azure.com/routing/classificationPolicies/90eb00c4-234e-4df7-a231-ef7895518384?api-version=2023-11-01

{
  "name": "MainUpdate"
}

応答のサンプル

{
  "id": "90eb00c4-234e-4df7-a231-ef7895518384",
  "name": "MainUpdate",
  "fallbackQueueId": "MainQueue",
  "queueSelectorAttachments": [
    {
      "kind": "conditional",
      "condition": {
        "kind": "expression",
        "language": "powerFx",
        "expression": "1 = 1"
      },
      "queueSelectors": [
        {
          "key": "foo",
          "labelOperator": "equal",
          "value": "bar"
        }
      ]
    }
  ],
  "prioritizationRule": {
    "kind": "static",
    "value": "2"
  },
  "workerSelectorAttachments": [],
  "etag": "etag"
}
{
  "id": "90eb00c4-234e-4df7-a231-ef7895518384",
  "name": "MainUpdate",
  "fallbackQueueId": "MainQueue",
  "queueSelectorAttachments": [
    {
      "kind": "conditional",
      "condition": {
        "kind": "expression",
        "language": "powerFx",
        "expression": "1 = 1"
      },
      "queueSelectors": [
        {
          "key": "foo",
          "labelOperator": "equal",
          "value": "bar"
        }
      ]
    }
  ],
  "prioritizationRule": {
    "kind": "static",
    "value": "2"
  },
  "workerSelectorAttachments": [],
  "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.

ClassificationPolicy

ジョブの分類方法を管理するルールのコンテナー。

ClassificationPolicyCreateOrUpdate

ジョブの分類方法を管理するルールのコンテナー。

ConditionalQueueSelectorAttachment

指定された条件が true に解決された場合にアタッチされるキュー セレクターのセットについて説明します。

ConditionalWorkerSelectorAttachment

指定された条件が true に解決された場合にアタッチされるワーカー セレクターのセットについて説明します。

DirectMapRouterRule

入力ラベルと同じラベルを返すルール。

DirectMapRouterRuleCreateOrUpdate

入力ラベルと同じラベルを返すルール。

ExpressionRouterRule

インライン式ルールを提供するルール。

ExpressionRouterRuleCreateOrUpdate

インライン式ルールを提供するルール。

ExpressionRouterRuleLanguage

構成できる使用可能な式言語。

FunctionRouterRule

HTTP によってトリガーされる Azure 関数へのバインドを提供する規則。

FunctionRouterRuleCreateOrUpdate

HTTP によってトリガーされる Azure 関数へのバインドを提供する規則。

FunctionRouterRuleCredential

Azure 関数ルールへのアクセスに使用される資格情報。

LabelOperator

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

OAuth2WebhookClientCredential

Contoso の承認サーバーに使用される OAuth2.0 資格情報。 リファレンス: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

PassThroughQueueSelectorAttachment

同じキーを持つジョブのラベルから値が渡されるキュー セレクターをアタッチします。

PassThroughWorkerSelectorAttachment

同じキーを持つジョブのラベルから値が渡されるワーカー セレクターをアタッチします。

QueueSelectorAttachmentKind

サポートされているキュー セレクターの添付ファイルの種類の識別子。

QueueWeightedAllocation

重み付けディストリビューションに対して選択されている場合に適用される重みの割合とキュー セレクターが含まれます。

RouterQueueSelector

キューを選択するために一連のラベルに対して満たす必要がある条件について説明します。

RouterRuleKind

サポートされているルーター 規則の種類の判別子。

RouterWorkerSelector

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

RouterWorkerSelectorStatus

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

RuleEngineQueueSelectorAttachment

RouterRule が解決されたときに、キュー セレクターをジョブにアタッチします。

RuleEngineWorkerSelectorAttachment

RouterRule が解決されたときに、ワーカー セレクターをジョブにアタッチします。

StaticQueueSelectorAttachment

ジョブにアタッチされるキュー セレクターについて説明します。

StaticRouterRule

入力に関係なく、常に同じ結果を返す静的ルールを提供するルール。

StaticRouterRuleCreateOrUpdate

入力に関係なく、常に同じ結果を返す静的ルールを提供するルール。

StaticWorkerSelectorAttachment

ジョブにアタッチされるワーカー セレクターについて説明します。

WebhookRouterRule

外部 Web サーバーへのバインドを提供する規則。

WebhookRouterRuleCreateOrUpdate

外部 Web サーバーへのバインドを提供する規則。

WeightedAllocationQueueSelectorAttachment

複数のキュー セレクターのセットについて説明します。その中の 1 つが選択され、重み付けに従ってアタッチされます。

WeightedAllocationWorkerSelectorAttachment

ワーカー セレクターの複数のセットについて説明します。そのうちの 1 つが選択され、重み付けに従ってアタッチされます。

WorkerSelectorAttachmentKind

サポートされているワーカー セレクターの添付ファイルの種類の識別子。

WorkerWeightedAllocation

加重分布に対して選択されている場合に適用される重みの割合とワーカー セレクターが含まれます。

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

内部エラー。

ClassificationPolicy

ジョブの分類方法を管理するルールのコンテナー。

名前 説明
etag

string

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

fallbackQueueId

string

キュー セレクターの添付ファイルで一致するものが見つからないかどうかを選択するフォールバック キューの ID。

id

string

分類ポリシーの ID。

name

string

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

prioritizationRule RouterRule:

ジョブの優先度スコアを決定するルール。

queueSelectorAttachments QueueSelectorAttachment[]:

ジョブのキューを解決するために使用されるキュー セレクターの添付ファイル。

workerSelectorAttachments WorkerSelectorAttachment[]:

ワーカー セレクターをジョブにアタッチするために使用されるワーカー セレクターの添付ファイル。

ClassificationPolicyCreateOrUpdate

ジョブの分類方法を管理するルールのコンテナー。

名前 説明
fallbackQueueId

string

キュー セレクターの添付ファイルで一致するものが見つからないかどうかを選択するフォールバック キューの ID。

name

string

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

prioritizationRule RouterRuleCreateOrUpdate:

ジョブの優先度スコアを決定するルール。

queueSelectorAttachments QueueSelectorAttachment[]:

ジョブのキューを解決するために使用されるキュー セレクターの添付ファイル。

workerSelectorAttachments WorkerSelectorAttachment[]:

ワーカー セレクターをジョブにアタッチするために使用されるワーカー セレクターの添付ファイル。

ConditionalQueueSelectorAttachment

指定された条件が true に解決された場合にアタッチされるキュー セレクターのセットについて説明します。

名前 説明
condition RouterRule:

キュー セレクターをアタッチするために true にする必要がある条件。

kind string:

conditional

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

queueSelectors

RouterQueueSelector[]

アタッチするキュー セレクター。

ConditionalWorkerSelectorAttachment

指定された条件が true に解決された場合にアタッチされるワーカー セレクターのセットについて説明します。

名前 説明
condition RouterRule:

ワーカー セレクターをアタッチするために true にする必要がある条件。

kind string:

conditional

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

workerSelectors

RouterWorkerSelector[]

アタッチするワーカー セレクター。

DirectMapRouterRule

入力ラベルと同じラベルを返すルール。

名前 説明
kind string:

directMap

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

DirectMapRouterRuleCreateOrUpdate

入力ラベルと同じラベルを返すルール。

名前 説明
kind string:

directMap

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

ExpressionRouterRule

インライン式ルールを提供するルール。

名前 説明
expression

string

評価する式。 計算値を持つ return ステートメントを含める必要があります。

kind string:

expression

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

language

ExpressionRouterRuleLanguage

コンパイルして実行する式言語。

ExpressionRouterRuleCreateOrUpdate

インライン式ルールを提供するルール。

名前 説明
expression

string

評価する式。 計算値を持つ return ステートメントを含める必要があります。

kind string:

expression

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

language

ExpressionRouterRuleLanguage

コンパイルして実行する式言語。

ExpressionRouterRuleLanguage

構成できる使用可能な式言語。

名前 説明
powerFx

string

PowerFx

FunctionRouterRule

HTTP によってトリガーされる Azure 関数へのバインドを提供する規則。

名前 説明
credential

FunctionRouterRuleCredential

Azure 関数ルールへのアクセスに使用される資格情報。

functionUri

string

Azure 関数の URL。

kind string:

function

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

FunctionRouterRuleCreateOrUpdate

HTTP によってトリガーされる Azure 関数へのバインドを提供する規則。

名前 説明
credential

FunctionRouterRuleCredential

Azure 関数ルールへのアクセスに使用される資格情報。

functionUri

string

Azure 関数の URL。

kind string:

function

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

FunctionRouterRuleCredential

Azure 関数ルールへのアクセスに使用される資格情報。

名前 説明
appKey

string

Azure 関数アプリをスコープとしたアクセス キー。 このキーは、アプリのすべての関数へのアクセスを許可します。

clientId

string

クライアント ID。AppKey が Azure 関数のコンテキストで指定されている場合、これは通常、キーの名前です。

functionKey

string

特定の関数をスコープとするアクセス キー。

LabelOperator

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

名前 説明
equal

string

等しい。

greaterThan

string

より大きい。

greaterThanOrEqual

string

以上。

lessThan

string

未満。

lessThanOrEqual

string

以下。

notEqual

string

等しくない。

OAuth2WebhookClientCredential

Contoso の承認サーバーに使用される OAuth2.0 資格情報。 リファレンス: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

名前 説明
clientId

string

Contoso Authorization サーバーの ClientId。

clientSecret

string

Contoso Authorization サーバーのクライアント シークレット。

PassThroughQueueSelectorAttachment

同じキーを持つジョブのラベルから値が渡されるキュー セレクターをアタッチします。

名前 説明
key

string

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

kind string:

passThrough

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

labelOperator

LabelOperator

ラベルの値とパススルー値の比較方法について説明します。

PassThroughWorkerSelectorAttachment

同じキーを持つジョブのラベルから値が渡されるワーカー セレクターをアタッチします。

名前 説明
expiresAfterSeconds

number

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

key

string

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

kind string:

passThrough

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

labelOperator

LabelOperator

ラベルの値とパススルー値の比較方法について説明します。

QueueSelectorAttachmentKind

サポートされているキュー セレクターの添付ファイルの種類の識別子。

名前 説明
conditional

string

ConditionalQueueSelectorAttachment の識別子の値。

passThrough

string

PassThroughQueueSelectorAttachment の識別子の値。

ruleEngine

string

RuleEngineQueueSelectorAttachment の識別子の値。

static

string

StaticQueueSelectorAttachment の識別子の値。

weightedAllocation

string

WeightedAllocationQueueSelectorAttachment の識別子の値。

QueueWeightedAllocation

重み付けディストリビューションに対して選択されている場合に適用される重みの割合とキュー セレクターが含まれます。

名前 説明
queueSelectors

RouterQueueSelector[]

この割り当てが選択されている場合に適用されるキュー セレクターのコレクション。

weight

number

この重量の割合は、1の分数として表される。

RouterQueueSelector

キューを選択するために一連のラベルに対して満たす必要がある条件について説明します。

名前 説明
key

string

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

labelOperator

LabelOperator

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

value

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

RouterRuleKind

サポートされているルーター 規則の種類の判別子。

名前 説明
directMap

string

DirectMapRouterRule の識別子の値。

expression

string

ExpressionRouterRule の識別子の値。

function

string

FunctionRouterRule の識別子の値。

static

string

StaticRouterRule の識別子の値。

webhook

string

WebhookRouterRule の識別子の値。

RouterWorkerSelector

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

名前 説明
expedite

boolean

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

expiresAfterSeconds

number

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

expiresAt

string

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

key

string

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

labelOperator

LabelOperator

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

status

RouterWorkerSelectorStatus

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

value

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

RouterWorkerSelectorStatus

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

名前 説明
active

string

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

expired

string

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

RuleEngineQueueSelectorAttachment

RouterRule が解決されたときに、キュー セレクターをジョブにアタッチします。

名前 説明
kind string:

ruleEngine

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

rule RouterRule:

アタッチするキュー セレクターのコレクションを解決する RouterRule。

RuleEngineWorkerSelectorAttachment

RouterRule が解決されたときに、ワーカー セレクターをジョブにアタッチします。

名前 説明
kind string:

ruleEngine

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

rule RouterRule:

アタッチするワーカー セレクターのコレクションを解決する RouterRule。

StaticQueueSelectorAttachment

ジョブにアタッチされるキュー セレクターについて説明します。

名前 説明
kind string:

static

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

queueSelector

RouterQueueSelector

アタッチするキュー セレクター。

StaticRouterRule

入力に関係なく、常に同じ結果を返す静的ルールを提供するルール。

名前 説明
kind string:

static

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

value

このルールが常に返す静的な値。 値はプリミティブ値 (数値、文字列、ブール値) である必要があります。

StaticRouterRuleCreateOrUpdate

入力に関係なく、常に同じ結果を返す静的ルールを提供するルール。

名前 説明
kind string:

static

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

value

このルールが常に返す静的な値。 値はプリミティブ値 (数値、文字列、ブール値) である必要があります。

StaticWorkerSelectorAttachment

ジョブにアタッチされるワーカー セレクターについて説明します。

名前 説明
kind string:

static

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

workerSelector

RouterWorkerSelector

アタッチするワーカー セレクター。

WebhookRouterRule

外部 Web サーバーへのバインドを提供する規則。

名前 説明
authorizationServerUri

string

承認サーバーの URI。

clientCredential

OAuth2WebhookClientCredential

Contoso の承認サーバーに使用される OAuth2.0 資格情報。 リファレンス: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

kind string:

webhook

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

webhookUri

string

Contoso の Web サーバーの URI。

WebhookRouterRuleCreateOrUpdate

外部 Web サーバーへのバインドを提供する規則。

名前 説明
authorizationServerUri

string

承認サーバーの URI。

clientCredential

OAuth2WebhookClientCredential

Contoso の承認サーバーに使用される OAuth2.0 資格情報。 リファレンス: https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/

kind string:

webhook

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

webhookUri

string

Contoso の Web サーバーの URI。

WeightedAllocationQueueSelectorAttachment

複数のキュー セレクターのセットについて説明します。その中の 1 つが選択され、重み付けに従ってアタッチされます。

名前 説明
allocations

QueueWeightedAllocation[]

パーセンテージベースの重み付け割り当てのコレクション。

kind string:

weightedAllocation

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

WeightedAllocationWorkerSelectorAttachment

ワーカー セレクターの複数のセットについて説明します。そのうちの 1 つが選択され、重み付けに従ってアタッチされます。

名前 説明
allocations

WorkerWeightedAllocation[]

パーセンテージベースの重み付け割り当てのコレクション。

kind string:

weightedAllocation

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

WorkerSelectorAttachmentKind

サポートされているワーカー セレクターの添付ファイルの種類の識別子。

名前 説明
conditional

string

ConditionalWorkerSelectorAttachment の識別子の値。

passThrough

string

PassThroughWorkerSelectorAttachment の識別子の値。

ruleEngine

string

RuleEngineWorkerSelectorAttachment の識別子の値。

static

string

StaticWorkerSelectorAttachment の識別子の値。

weightedAllocation

string

WeightedAllocationWorkerSelectorAttachment の識別子の値。

WorkerWeightedAllocation

加重分布に対して選択されている場合に適用される重みの割合とワーカー セレクターが含まれます。

名前 説明
weight

number

この重量の割合は、1の分数として表される。

workerSelectors

RouterWorkerSelector[]

この割り当てが選択されている場合に適用されるワーカー セレクターのコレクション。