Aracılığıyla paylaş


İş Yönlendiricisi olaylarına abone olma

Bu kılavuzda İş Yönlendiricisi olayları için abonelik ayarlama adımları ve bunların nasıl alınıp alınamayacağı özetlenmiştir.

Event Grid hakkında daha fazla bilgi için Event Grid belgelerine bakın.

Önkoşullar

Event Grid aboneliği oluşturma

Bu şablon, İş Yönlendiricisi olayları için depolama kuyruğuna event grid aboneliği dağıtır. Depolama hesabı, kuyruk veya sistem konusu yoksa, bunlar da oluşturulur.

Azure'a Dağıt

Parametreler

  • Azure İletişim Hizmetleri Kaynak Adı: Azure İletişim Hizmetleri kaynağınızın adı. Örneğin, kaynağınızın uç noktası ise https://contoso.communication.azure.netolarak ayarlayın contoso.
  • Depolama Adı: Azure Depolama Hesabınızın adı. Yoksa oluşturulur.
  • Olay Alt Adı: Oluşturulacak olay aboneliğinin adı.
  • Sistem Konusu Adı: Azure İletişim Hizmetleri kaynağınızda olay abonelikleriniz varsa, adı Azure İletişim Hizmetleri kaynağınızın sekmesinde bulun System TopicEvents. Aksi takdirde, Azure İletişim Hizmetleri kaynak adının kendisi gibi benzersiz bir ad belirtin.
  • Kuyruk Adı: Depolama Hesabınızdaki Kuyruğunuzun adı. Yoksa oluşturulur.

Dağıtılan kaynaklar

Aşağıdaki kaynaklar çözümün bir parçası olarak dağıtılır

  • Depolama Hesabı: Depolama hesabı adı yoksa.
  • Depolama Kuyruğu: Kuyruk depolama hesabında yoksa.
  • Event Grid Sistem Konusu: Konu yoksa.
  • Event Grid Aboneliği: Depolama kuyruğundaki tüm İş Yönlendiricisi olayları için bir abonelik.

Hızlı başlangıç: Azure Depolama Kuyruğu aracılığıyla Event Grid olaylarını alma

Yeni bir C# uygulaması oluşturma

Bir konsol penceresinde (cmd, PowerShell veya Bash gibi), adlı EventReceiveryeni bir konsol uygulaması oluşturmak için komutunu kullanındotnet new. Bu komut, tek bir kaynak dosyayla basit bir "Merhaba Dünya" C# projesi oluşturur: Program.cs.

dotnet new console -o EventReceiver

Dizininizi yeni oluşturulan uygulama klasörüne değiştirin ve komutunu kullanarak dotnet build uygulamanızı derleyin.

cd EventReceiver
dotnet build

Paketleri yükleme

Azure Depolama Kuyrukları ve Event Grid paketlerini yükleyin.

dotnet add package Azure.Storage.Queues
dotnet add package Azure.Messaging.EventGrid

Kuyruktan ileti alma

Aşağıdaki kod parçacığını kopyalayın ve kaynak dosyaya yapıştırın: Program.cs

using Azure.Storage.Queues;
using Azure.Messaging.EventGrid;

// For more detailed tutorials on storage queues, see: https://learn.microsoft.com/azure/storage/queues/storage-tutorial-queues

var queueClient = new QueueClient("<Storage Account Connection String>", "router-events");

while (true)
{
    var msg = await queueClient.ReceiveMessageAsync();
    if (msg.Value == null)
    {
        await Task.Delay(TimeSpan.FromSeconds(1));
        continue;
    }
    var json = Convert.FromBase64String(msg.Value.Body.ToString());
    var evt = EventGridEvent.Parse(BinaryData.FromBytes(json));

    Console.WriteLine($"Received event: {evt.EventType} - {evt.Subject} - {evt.Data}");

    await queueClient.DeleteMessageAsync(msg.Value.MessageId, msg.Value.PopReceipt);
}

Kodu çalıştırma

komutunu kullanarak dotnet run uygulamayı uygulama dizininizden çalıştırın.

dotnet run

Olay Kataloğu

Yönlendirici Olayları

Ekinlikler Alt etki alanı Açıklama
RouterJobReceived Job Yönlendirme için yeni bir iş oluşturuldu
RouterJobClassified Job Sınıflandırma ilkesi bir işe uygulandı
RouterJobQueued Job Bir iş başarıyla sıraya alındı
RouterJobClassificationFailed Job Yönlendirici sınıflandırma ilkesini kullanarak işi sınıflandıramadı
RouterJobCompleted Job Bir iş tamamlandı ve kaydırmaya giriyor
RouterJobClosed Job Bir iş kapatıldı ve paketleme tamamlandı
RouterJobCancelled Job bir iş iptal edildi
RouterJobExceptionTriggered Job bir iş özel durumu tetiklendi
RouterJobWorkerSelectorsExpired Job bir işteki bir veya daha fazla çalışan seçicinin süresi doldu
RouterJobUnassigned Job Zaten atanmış bir iş bir çalışandan atanmamış
RouterJobWaitingForActivation Job Zamanlanmış bir işin istenen zamanlanmış zamanı geldi, Yönlendirici contoso'nun iş üzerinde işlem yapmasını bekliyor
RouterJobSchedulingFailed Job Zamanlanmış bir iş istendi ancak Yönlendirici bir iş oluşturamadı
RouterWorkerOfferIssued Worker Bir çalışana iş teklif edildi
RouterWorkerOfferAccepted Worker Bir çalışana teklif kabul edildi
RouterWorkerOfferDeclined Worker Bir çalışana yapılan teklif reddedildi
RouterWorkerOfferRevoked Worker Bir çalışana yapılan teklif iptal edildi
RouterWorkerOfferExpired Worker Çalışana yapılan teklifin süresi doldu
RouterWorkerRegistered Worker Bir çalışan kaydedildi (durum etkin değil/boşaltılıyor durumundan etkin olarak değiştirildi)
RouterWorkerUpdated Worker Aşağıdaki çalışan özelliklerinden biri güncelleştirildi: AvailableForOffers, TotalCapacity, QueueAssignments, ChannelConfigurations, , Labels, Tags
RouterWorkerDeregistered Worker Bir çalışanın kaydı silindi (durum etkin durumdan etkin değil/boşaltmaya değiştirildi)

Microsoft.Communication.RouterJobReceived

Olay Kataloğu'na geri dön

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "jobStatus": "PendingClassification",
    "channelId": "FooVoiceChannelId",
    "classificationPolicyId": "test-policy",
    "queueId": "queue-id",
    "priority": 0,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttlSeconds": 50,
        "expirationTime": "2022-02-17T00:58:25.1736293Z"
      }
    ],
    "scheduledOn": "3/28/2007 7:13:50 PM +00:00",
    "unavailableForMatching": false
  },
  "eventType": "Microsoft.Communication.RouterJobReceived",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelReference string
jobStatus enum Olası Değerler PendingClassification, Kuyruğa Alındı Bu olay gönderildiğinde, sınıflandırma işlemi henüz yürütülmedi veya iş ilişkili bir queueId ile oluşturuldu.
channelId string
classificationPolicyId string ✔️ nullbir iş için belirtildiğinde queueId
queueId string ✔️ nullbir iş için belirtildiğinde classificationPolicyId
öncelik int ✔️ Belirtildiğinde classificationPolicyId null. Doğrudan kuyruk ataması durumunda null olmayan değer.
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
requestedWorkerSelectors List<WorkerSelector> ✔️ Kullanıcı girişlerine göre
scheduledOn DateTimeOffset ✔️ Kullanıcı girişlerine göre
unavailableForMatching bool ✔️ Kullanıcı girişlerine göre

Microsoft.Communication.RouterJobClassified

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/queue/{queue-id}",
  "data": {
    "queueDetails": {
      "id": "625fec06-ab81-4e60-b780-f364ed96ade1",
      "name": "Queue 1",
      "labels": {
        "Language": "en",
        "Product": "Office",
        "Geo": "NA"
      }
    },
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "classificationPolicyId": "test-policy",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "priority": 5,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ]
  },
  "eventType": "Microsoft.Communication.RouterJobClassified",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
queueDetails QueueDetails
jobId string
channelReference string
channelId string
classificationPolicyId string
queueId string ✔️ nullkuyruk seçimi için kullanılmadığında classificationPolicy
öncelik int ✔️ nulliş üzerinde öncelik uygulamak için kullanılmadığında classificationPolicy
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
attachedWorkerSelectors List<WorkerSelector> ✔️ Sınıflandırma ilkesi tarafından eklenen çalışan seçicilerinin listesi

Microsoft.Communication.RouterJobQueued

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/queue/{queue-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "priority": 1,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ]
  },
  "eventType": "Microsoft.Communication.RouterJobQueued",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelReference string ✔️
channelId string
queueId string
öncelik int
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
requestedWorkerSelectors List<WorkerSelector> ✔️ İş oluştururken kullanıcı girişi temelinde
attachedWorkerSelectors List<WorkerSelector> ✔️ Sınıflandırma ilkesi tarafından eklenen çalışan seçicilerinin listesi

Microsoft.Communication.RouterJobClassificationFailed

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/classificationpolicy/{classificationpolicy-id}",
  "data": {
    "errors": [
      {
        "code": null,
        "message": "Classification failed due to <reason>",
        "target": null,
        "innerError": null,
        "details": null
      }
    ],
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "classificationPolicyId": "test-policy",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobClassificationFailed",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
hatalar List<CommunicationError>
jobId string
channelReference string
channelId string
classificationPolicyId string
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre

Microsoft.Communication.RouterJobCompleted

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/assignment/{assignment-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "queue-id",
    "assignmentId": "6f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "workerId": "e3a3f2f9-3582-4bfe-9c5a-aa57831a0f88"
  },
  "eventType": "Microsoft.Communication.RouterJobCompleted",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelReference string
channelId string
queueId string
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
assignmentId string
workerId string

Microsoft.Communication.RouterJobClosed

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/assignment/{assignment-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "",
    "dispositionCode": "",
    "workerId": "",
    "assignmentId": "",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobClosed",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelReference string
channelId string
queueId string
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
dispositionCode string ✔️ Kullanıcı girişlerine göre
workerId string
assignmentId string

Microsoft.Communication.RouterJobCancelled

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/disposition/{disposition-code}",
  "data": {
    "note": "Cancelled due to <reason>",
    "dispositionCode": "100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "queueId": ""
  },
  "eventType": "Microsoft.Communication.RouterJobCancelled",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
not string ✔️ Kullanıcı girişlerine göre
dispositionCode string
jobId string
channelReference string
channelId string
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
queueId string ✔️

Microsoft.Communication.RouterJobExceptionTriggered

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/exceptionrule/{rulekey}",
  "data": {
    "ruleKey": "r100",
    "exceptionRuleId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobExceptionTriggered",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
ruleKey string
exceptionRuleId string
jobId string
channelReference string
channelId string
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre

Microsoft.Communication.RouterJobWorkerSelectorsExpired

Olay Kataloğu'na geri dön

{
  "id": "b6d8687a-5a1a-42ae-b8b5-ff7ec338c872",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/queue/{queue-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectorsExpired": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectorsExpired": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ]
  },
  "eventType": "Microsoft.Communication.RouterJobWorkerSelectorsExpired",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelReference string ✔️
queueId string
channelId string
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
requestedWorkerSelectorsExpired List<WorkerSelector> ✔️ İş oluştururken kullanıcı girişi temelinde
attachedWorkerSelectorsExpired List<WorkerSelector> ✔️ Sınıflandırma ilkesi tarafından eklenen çalışan seçicilerinin listesi

Microsoft.Communication.RouterJobUnassigned

Olay Kataloğu'na geri dön

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}/assignment/{assignment-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "assignmentId": "",
    "workerId": "",
    "channelId": "FooVoiceChannelId",
    "channelReference": "test-abc",
    "queueId": "queue-id",    
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterJobUnassigned",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
assignmentId string
workerId string
channelId string
channelReference string
queueId string ✔️ nullbir iş için belirtildiğinde classificationPolicyId
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre

Microsoft.Communication.RouterJobWaitingForActivation

Olay Kataloğu'na geri dön

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelId": "FooVoiceChannelId",
    "channelReference": "test-abc",
    "queueId": "queue-id",    
    "priority": 1,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "scheduledOn": "2022-02-17T00:55:25.1736293Z",
    "unavailableForMatching": false
  },
  "eventType": "Microsoft.Communication.RouterJobWaitingForActivation",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelId string
channelReference string
queueId string ✔️ nullbir iş için belirtildiğinde classificationPolicyId
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
requestedWorkerSelectorsExpired List<WorkerSelector> ✔️ İş oluştururken kullanıcı girişi temelinde
attachedWorkerSelectorsExpired List<WorkerSelector> ✔️ Sınıflandırma ilkesi tarafından eklenen çalışan seçicilerinin listesi
scheduledOn DateTimeOffset ✔️ İş oluştururken kullanıcı girişi temelinde
unavailableForMatching bool ✔️ İş oluştururken kullanıcı girişi temelinde
öncelik int İş oluştururken kullanıcı girişi temelinde

Microsoft.Communication.RouterJobSchedulingFailed

Olay Kataloğu'na geri dön

{
  "id": "acdf8fa5-8ab4-4a65-874a-c1d2a4a97f2e",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "job/{job-id}/channel/{channel-id}",
  "data": {
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelId": "FooVoiceChannelId",
    "channelReference": "test-abc",
    "queueId": "queue-id",    
    "priority": 1,
    "labels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "requestedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "attachedWorkerSelectors": [
      {
        "key": "string",
        "labelOperator": "equal",
        "value": 5,
        "ttl": "P3Y6M4DT12H30M5S"
      }
    ],
    "scheduledOn": "2022-02-17T00:55:25.1736293Z",
    "failureReason": "Error"
  },
  "eventType": "Microsoft.Communication.RouterJobSchedulingFailed",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
jobId string
channelId string
channelReference string
queueId string ✔️ nullbir iş için belirtildiğinde classificationPolicyId
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
requestedWorkerSelectorsExpired List<WorkerSelector> ✔️ İş oluştururken kullanıcı girişi temelinde
attachedWorkerSelectorsExpired List<WorkerSelector> ✔️ Sınıflandırma ilkesi tarafından eklenen çalışan seçicilerinin listesi
scheduledOn DateTimeOffset ✔️ İş oluştururken kullanıcı girişi temelinde
failureReason string ✔️ Sistem belirlendi
öncelik int İş oluştururken kullanıcı girişi temelinde

Çalışan Olayları

Microsoft.Communication.RouterWorkerOfferIssued

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "offerId": "525fec06-ab81-4e60-b780-f364ed96ade1",
    "offeredOn": "2021-06-23T02:43:30.3847144Z",
    "expiresOn": "2021-06-23T02:44:30.3847674Z",
    "jobPriority": 5,
    "jobLabels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "jobTags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferIssued",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string
jobId string
channelReference string
channelId string
queueId string
offerId string
offeredOn DateTimeOffset
expiresOn DateTimeOffset
jobPriority int
jobLabels Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
jobTags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre

Microsoft.Communication.RouterWorkerOfferAccepted

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "jobPriority": 5,
    "jobLabels": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "jobTags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
    "assignmentId": "765fec06-ab81-4e60-b780-f364ed96ade1"
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferAccepted",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string
jobId string
jobPriority int
jobLabels Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
jobTags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
channelReference string
channelId string
queueId string
offerId string
assignmentId string

Microsoft.Communication.RouterWorkerOfferDe eğimli

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1",
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferDeclined",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string
jobId string
channelReference string
channelId string
queueId string
offerId string

Microsoft.Communication.RouterWorkerOfferRevoked

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1"
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferRevoked",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
offerId string
workerId string
jobId string
channelReference string
channelId string
queueId string

Microsoft.Communication.RouterWorkerOfferExpired

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}/job/{job-id}",
  "data": {
    "offerId": "565fec06-ab81-4e60-b780-f364ed96ade1",
    "workerId": "w100",
    "jobId": "7f1df17b-570b-4ae5-9cf5-fe6ff64cc712",
    "channelReference": "test-abc",
    "channelId": "FooVoiceChannelId",
    "queueId": "625fec06-ab81-4e60-b780-f364ed96ade1"
  },
  "eventType": "Microsoft.Communication.RouterWorkerOfferExpired",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string
offerId string
jobId string
channelReference string
channelId string
queueId string

Microsoft.Communication.RouterWorkerRegistered

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}",
  "data": {
    "workerId": "worker3",
    "totalCapacity": 100,
    "queueAssignments": [
      {
        "id": "MyQueueId2",
        "name": "Queue 3",
        "labels": {
          "Language": "en",
          "Product": "Office",
          "Geo": "NA"
        }
      }
    ],
    "labels": {
      "x": "111",
      "y": "111"
    },
    "channelConfigurations": [
      {
        "channelId": "FooVoiceChannelId",
        "capacityCostPerJob": 10,
        "maxNumberOfJobs": 5
      }
    ],
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    }
  },
  "eventType": "Microsoft.Communication.RouterWorkerRegistered",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string
totalCapacity int
queueAssignments List<QueueDetails>
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
channelConfigurations List<ChannelConfiguration>
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre

Microsoft.Communication.RouterWorkerUpdated

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}",
  "data": {
    "workerId": "worker3",
    "availableForOffers": true,
    "totalCapacity": 100,
    "queueAssignments": [
      {
        "id": "MyQueueId2",
        "name": "Queue 3",
        "labels": {
          "Language": "en",
          "Product": "Office",
          "Geo": "NA"
        }
      }
    ],
    "labels": {
      "x": "111",
      "y": "111"
    },
    "channelConfigurations": [
      {
        "channelId": "FooVoiceChannelId",
        "capacityCostPerJob": 10,
        "maxNumberOfJobs": 5
      }
    ],
    "tags": {
      "Locale": "en-us",
      "Segment": "Enterprise",
      "Token": "FooToken"
    },
    "updatedWorkerProperties": [
      "TotalCapacity",
      "Labels",
      "Tags",
      "ChannelConfigurations",
      "AvailableForOffers",
      "QueueAssignments"
    ]
  },
  "eventType": "Microsoft.Communication.RouterWorkerUpdated",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string
totalCapacity int
queueAssignments List<QueueDetails>
Etiket Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
channelConfigurations List<ChannelConfiguration>
tags Dictionary<string, object> ✔️ Kullanıcı girişlerine göre
updatedWorkerProperties List<UpdateWorkerProperty> AvailableForOffers, QueueAssignments, ChannelConfigurations, TotalCapacity, Etiketler ve Etiketler gibi güncelleştirilen Çalışan Özellikleri

Microsoft.Communication.RouterWorkerDeregistered

Olay Kataloğu'na geri dön

{
  "id": "1027db4a-17fe-4a7f-ae67-276c3120a29f",
  "topic": "/subscriptions/{subscription-id}/resourceGroups/{group-name}/providers/Microsoft.Communication/communicationServices/{communication-services-resource-name}",
  "subject": "worker/{worker-id}",
  "data": {
    "workerId": "worker3"
  },
  "eventType": "Microsoft.Communication.RouterWorkerDeregistered",
  "dataVersion": "1.0",
  "metadataVersion": "1",
  "eventTime": "2022-02-17T00:55:25.1736293Z"
}

Öznitelik listesi

Öznitelik Tür Null değeri alabilen Açıklama Notlar
workerId string

Model Tanımları

QueueDetails

public class QueueDetails
{
    public string Id { get; set; }
    public string Name { get; set; }
    public Dictionary<string, object>? Labels { get; set; }
}

CommunicationError

public class CommunicationError
{
    public string? Code { get; init; }
    public string Message { get; init; }
    public string? Target { get; init; }
    public CommunicationError? InnerError { get; init; }
    public IEnumerable<CommunicationError>? Details { get; init; }
}

ChannelConfiguration

public class ChannelConfiguration
{
    public string ChannelId { get; set; }
    public int CapacityCostPerJob { get; set; }
    public int? MaxNumberOfJobs { get; set; }
}

UpdatedWorkerProperty

public enum UpdatedWorkerProperty
{
    AvailableForOffers,
    Capacity,
    QueueAssignments,
    Labels,
    Tags,
    ChannelConfigurations
}

WorkerSelector

public class WorkerSelector
{
    public string Key { get; set; }
    public LabelOperator LabelOperator { get; set; }
    public object Value { get; set; }
    public double? TTLSeconds { get; set; }
    public WorkerSelectorState State { get; set; }
    public DateTimeOffset? ExpireTime { get; set; }
}

public enum WorkerSelectorState
{
    Active = 0,
    Expired = 1
}

public enum LabelOperator
{
    Equal,
    NotEqual,
    LessThan,
    LessThanEqual,
    GreaterThan,
    GreaterThanEqual,
}