diff --git a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs index 1fd65c400cba..4fbeaa28c22b 100644 --- a/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.JobRouter/api/Azure.Communication.JobRouter.netstandard2.0.cs @@ -652,26 +652,26 @@ public UpdateExceptionPolicyOptions(string exceptionPolicyId) { } public partial class UpdateJobOptions { public UpdateJobOptions(string jobId) { } - public string ChannelId { get { throw null; } set { } } - public string ChannelReference { get { throw null; } set { } } - public string ClassificationPolicyId { get { throw null; } set { } } - public string DispositionCode { get { throw null; } set { } } + public string? ChannelId { get { throw null; } set { } } + public string? ChannelReference { get { throw null; } set { } } + public string? ClassificationPolicyId { get { throw null; } set { } } + public string? DispositionCode { get { throw null; } set { } } public string JobId { get { throw null; } } - public System.Collections.Generic.IDictionary Labels { get { throw null; } } - public Azure.Communication.JobRouter.JobMatchingMode MatchingMode { get { throw null; } set { } } - public System.Collections.Generic.List Notes { get { throw null; } } + public System.Collections.Generic.IDictionary Labels { get { throw null; } } + public Azure.Communication.JobRouter.JobMatchingMode? MatchingMode { get { throw null; } set { } } + public System.Collections.Generic.List Notes { get { throw null; } } public int? Priority { get { throw null; } set { } } - public string QueueId { get { throw null; } set { } } + public string? QueueId { get { throw null; } set { } } public System.Collections.Generic.List RequestedWorkerSelectors { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } } public partial class UpdateQueueOptions { public UpdateQueueOptions(string queueId) { } - public string DistributionPolicyId { get { throw null; } set { } } - public string ExceptionPolicyId { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Labels { get { throw null; } } - public string Name { get { throw null; } set { } } + public string? DistributionPolicyId { get { throw null; } set { } } + public string? ExceptionPolicyId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Labels { get { throw null; } } + public string? Name { get { throw null; } set { } } public string QueueId { get { throw null; } } } public partial class UpdateWorkerOptions @@ -679,9 +679,9 @@ public partial class UpdateWorkerOptions public UpdateWorkerOptions(string workerId) { } public bool? AvailableForOffers { get { throw null; } set { } } public System.Collections.Generic.IDictionary ChannelConfigurations { get { throw null; } } - public System.Collections.Generic.IDictionary Labels { get { throw null; } } + public System.Collections.Generic.IDictionary Labels { get { throw null; } } public System.Collections.Generic.IDictionary QueueAssignments { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } public int? TotalCapacity { get { throw null; } set { } } public string WorkerId { get { throw null; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Extensions.cs b/sdk/communication/Azure.Communication.JobRouter/src/Extensions.cs index 322899891f72..de546620226f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Extensions.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Extensions.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable using System.Collections.Generic; using System.Linq; using System.Text.Json; @@ -9,10 +10,12 @@ namespace Azure.Communication.JobRouter { internal static class Extensions { - public static IDictionary Append(this IDictionary first, IDictionary second) + public static IDictionary Append(this IDictionary first, IDictionary second) { second.ToList().ForEach(pair => first[pair.Key] = pair.Value); return second; } } } + +#nullable restore diff --git a/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs b/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs index 94e52608386b..697b5a6c19e2 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/JobRouterClient.cs @@ -1167,7 +1167,7 @@ public virtual async Task> CreateWorkerAsync( foreach (var queueAssignment in options.QueueAssignments) { - request.QueueAssignments[queueAssignment.Key] = new RouterQueueAssignment(); + request.QueueAssignments[queueAssignment.Key] = queueAssignment.Value; } foreach (var label in options.Labels) @@ -1182,10 +1182,7 @@ public virtual async Task> CreateWorkerAsync( foreach (var channel in options.ChannelConfigurations) { - request.ChannelConfigurations[channel.Key] = new ChannelConfiguration(channel.Value.CapacityCostPerJob) - { - MaxNumberOfJobs = channel.Value.MaxNumberOfJobs - }; + request.ChannelConfigurations[channel.Key] = channel.Value; } var response = await RestClient.UpsertWorkerAsync( @@ -1222,7 +1219,7 @@ public virtual Response CreateWorker( foreach (var queueAssignment in options.QueueAssignments) { - request.QueueAssignments[queueAssignment.Key] = new RouterQueueAssignment(); + request.QueueAssignments[queueAssignment.Key] = queueAssignment.Value; } foreach (var label in options.Labels) @@ -1237,10 +1234,7 @@ public virtual Response CreateWorker( foreach (var channel in options.ChannelConfigurations) { - request.ChannelConfigurations[channel.Key] = new ChannelConfiguration(channel.Value.CapacityCostPerJob) - { - MaxNumberOfJobs = channel.Value.MaxNumberOfJobs - }; + request.ChannelConfigurations[channel.Key] = channel.Value; } var response = RestClient.UpsertWorker( @@ -1270,13 +1264,13 @@ public virtual async Task> UpdateWorkerAsync( { var request = new RouterWorker() { - TotalCapacity = options.TotalCapacity, + TotalCapacity = options?.TotalCapacity, AvailableForOffers = options?.AvailableForOffers }; foreach (var queueAssignment in options.QueueAssignments) { - request.QueueAssignments[queueAssignment.Key] = new RouterQueueAssignment(); + request.QueueAssignments[queueAssignment.Key] = queueAssignment.Value; } foreach (var label in options.Labels) @@ -1291,10 +1285,7 @@ public virtual async Task> UpdateWorkerAsync( foreach (var channel in options.ChannelConfigurations) { - request.ChannelConfigurations[channel.Key] = new ChannelConfiguration(channel.Value.CapacityCostPerJob) - { - MaxNumberOfJobs = channel.Value.MaxNumberOfJobs - }; + request.ChannelConfigurations[channel.Key] = channel.Value; } var response = await RestClient.UpsertWorkerAsync( @@ -1331,7 +1322,7 @@ public virtual Response UpdateWorker( foreach (var queueAssignment in options.QueueAssignments) { - request.QueueAssignments[queueAssignment.Key] = new RouterQueueAssignment(); + request.QueueAssignments[queueAssignment.Key] = queueAssignment.Value; } foreach (var label in options.Labels) @@ -1346,10 +1337,7 @@ public virtual Response UpdateWorker( foreach (var channel in options.ChannelConfigurations) { - request.ChannelConfigurations[channel.Key] = new ChannelConfiguration(channel.Value.CapacityCostPerJob) - { - MaxNumberOfJobs = channel.Value.MaxNumberOfJobs - }; + request.ChannelConfigurations[channel.Key] = channel.Value; } var response = RestClient.UpsertWorker( diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/ReclassifyExceptionAction.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/ReclassifyExceptionAction.cs index 2b31281f7d7d..12151e5a77fe 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/ReclassifyExceptionAction.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/ReclassifyExceptionAction.cs @@ -19,7 +19,7 @@ internal IDictionary _labelsToUpsert get { return LabelsToUpsert != null && LabelsToUpsert.Count != 0 - ? LabelsToUpsert?.ToDictionary(x => x.Key, x => x.Value.Value) + ? LabelsToUpsert?.ToDictionary(x => x.Key, x => x.Value?.Value) : new ChangeTrackingDictionary(); } set diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs index c055b550f824..c8887150f83e 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterJob.cs @@ -66,7 +66,7 @@ internal IDictionary _labels get { return Labels != null && Labels.Count != 0 - ? Labels?.ToDictionary(x => x.Key, x => x.Value.Value) + ? Labels?.ToDictionary(x => x.Key, x => x.Value?.Value) : new ChangeTrackingDictionary(); } set @@ -87,7 +87,7 @@ internal IDictionary _tags get { return Tags != null && Tags.Count != 0 - ? Tags?.ToDictionary(x => x.Key, x => x.Value.Value) + ? Tags?.ToDictionary(x => x.Key, x => x.Value?.Value) : new ChangeTrackingDictionary(); } set diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs index 8956a5f77586..36ddcd04f866 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterQueue.cs @@ -15,7 +15,7 @@ internal IDictionary _labels get { return Labels != null && Labels.Count != 0 - ? Labels?.ToDictionary(x => x.Key, x => x.Value.Value) + ? Labels?.ToDictionary(x => x.Key, x => x.Value?.Value) : new ChangeTrackingDictionary(); } set diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs index 74cb9d1c32d3..47774d33b16c 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/RouterWorker.cs @@ -39,7 +39,7 @@ internal IDictionary _labels get { return Labels != null && Labels.Count != 0 - ? Labels?.ToDictionary(x => x.Key, x => x.Value.Value) + ? Labels?.ToDictionary(x => x.Key, x => x.Value?.Value) : new ChangeTrackingDictionary(); } set @@ -60,7 +60,7 @@ internal IDictionary _tags get { return Tags != null && Tags.Count != 0 - ? Tags?.ToDictionary(x => x.Key, x => x.Value.Value) + ? Tags?.ToDictionary(x => x.Key, x => x.Value?.Value) : new ChangeTrackingDictionary(); } set diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateJobOptions.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateJobOptions.cs index 632deb83f938..74e2d1c5e0af 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateJobOptions.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateJobOptions.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable using System; using System.Collections.Generic; using System.Text; @@ -34,38 +35,38 @@ public UpdateJobOptions(string jobId) /// /// A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. /// - public IDictionary Labels { get; } = new Dictionary(); + public IDictionary Labels { get; } = new Dictionary(); /// Reference to an external parent context, eg. call ID. - public string ChannelReference { get; set; } + public string? ChannelReference { get; set; } /// The Id of the Queue that this job is queued to. - public string QueueId { get; set; } + public string? QueueId { get; set; } /// The Id of the Classification policy used for classifying a job. - public string ClassificationPolicyId { get; set; } + public string? ClassificationPolicyId { get; set; } /// The channel identifier. eg. voice, chat, etc. - public string ChannelId { get; set; } + public string? ChannelId { get; set; } /// The priority of this job (range from -100 to 100). public int? Priority { get; set; } /// Reason code for cancelled or closed jobs. - public string DispositionCode { get; set; } + public string? DispositionCode { get; set; } /// A collection of manually specified label selectors, which a worker must satisfy in order to process this job. public List RequestedWorkerSelectors { get; } = new List(); /// Notes attached to a job, sorted by timestamp. - public List Notes { get; } = new List(); + public List Notes { get; } = new List(); /// A set of non-identifying attributes attached to this job. - public IDictionary Tags { get; } = new Dictionary(); + public IDictionary Tags { get; } = new Dictionary(); /// /// If provided, will determine how job matching will be carried out. /// - public JobMatchingMode MatchingMode { get; set; } + public JobMatchingMode? MatchingMode { get; set; } } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateQueueOptions.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateQueueOptions.cs index 83ad94592da5..f565694f22b2 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateQueueOptions.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateQueueOptions.cs @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +#nullable enable using System; using System.Collections.Generic; -using System.Text; using Azure.Core; namespace Azure.Communication.JobRouter @@ -31,17 +31,17 @@ public UpdateQueueOptions(string queueId) public string QueueId { get; } /// The ID of the distribution policy that will determine how a job is distributed to workers. - public string DistributionPolicyId { get; set; } + public string? DistributionPolicyId { get; set; } /// The name of this queue. - public string Name { get; set; } + public string? Name { get; set; } /// (Optional) The ID of the exception policy that determines various job escalation rules. - public string ExceptionPolicyId { get; set; } + public string? ExceptionPolicyId { get; set; } /// /// A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. /// - public IDictionary Labels { get; } = new Dictionary(); + public IDictionary Labels { get; } = new Dictionary(); } } diff --git a/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateWorkerOptions.cs b/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateWorkerOptions.cs index d7973ed31035..a3c3055cd473 100644 --- a/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateWorkerOptions.cs +++ b/sdk/communication/Azure.Communication.JobRouter/src/Models/UpdateWorkerOptions.cs @@ -40,12 +40,12 @@ public UpdateWorkerOptions(string workerId) /// /// A set of key/value pairs that are identifying attributes used by the rules engines to make decisions. /// - public IDictionary Labels { get; } = new Dictionary(); + public IDictionary Labels { get; } = new Dictionary(); /// /// A set of non-identifying attributes attached to this worker. /// - public IDictionary Tags { get; } = new Dictionary(); + public IDictionary Tags { get; } = new Dictionary(); /// The channel(s) this worker can handle and their impact on the workers capacity. public IDictionary ChannelConfigurations { get; } = new Dictionary(); diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/Infrastructure/RouterLiveTestBase.cs b/sdk/communication/Azure.Communication.JobRouter/tests/Infrastructure/RouterLiveTestBase.cs index c44c97d6ef31..52a111411a20 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/Infrastructure/RouterLiveTestBase.cs +++ b/sdk/communication/Azure.Communication.JobRouter/tests/Infrastructure/RouterLiveTestBase.cs @@ -125,7 +125,7 @@ protected async Task> CreateQueueAsync(string? uniqueIdent var createDistributionPolicyResponse = await CreateDistributionPolicy(uniqueIdentifier); var queueId = GenerateUniqueId($"{IdPrefix}-{uniqueIdentifier}"); var queueName = "DefaultQueue-Sdk-Test" + queueId; - var queueLabels = new Dictionary { ["Label_1"] = new("Value_1") }; + var queueLabels = new Dictionary { ["Label_1"] = new("Value_1") }; var createQueueResponse = await routerClient.CreateQueueAsync( new CreateQueueOptions(queueId, createDistributionPolicyResponse.Value.Id) { @@ -161,7 +161,7 @@ protected async Task> CreateDistributionPolicy(stri #region Support assertions - protected void AssertQueueResponseIsEqual(Response upsertQueueResponse, string queueId, string distributionPolicyId, string? queueName = default, IDictionary? queueLabels = default, string? exceptionPolicyId = default) + protected void AssertQueueResponseIsEqual(Response upsertQueueResponse, string queueId, string distributionPolicyId, string? queueName = default, IDictionary? queueLabels = default, string? exceptionPolicyId = default) { var response = upsertQueueResponse.Value; @@ -177,7 +177,7 @@ protected void AssertQueueResponseIsEqual(Response upsertQue labelsWithID.Add("Id", new LabelValue(queueId)); } - Assert.AreEqual(labelsWithID.ToDictionary(x => x.Key, x => x.Value.Value), response.Labels.ToDictionary(x => x.Key, x => x.Value.Value)); + Assert.AreEqual(labelsWithID.ToDictionary(x => x.Key, x => x.Value?.Value), response.Labels.ToDictionary(x => x.Key, x => x.Value?.Value)); } if (exceptionPolicyId != default) @@ -186,12 +186,16 @@ protected void AssertQueueResponseIsEqual(Response upsertQue } } - protected void AssertRegisteredWorkerIsValid(Response routerWorkerResponse, string workerId, IEnumerable queueAssignmentList, int? totalCapacity, IDictionary? workerLabels = default, Dictionary? channelConfigList = default) + protected void AssertRegisteredWorkerIsValid(Response routerWorkerResponse, string workerId, + IDictionary queueAssignments, int? totalCapacity, + IDictionary? workerLabels = default, + IDictionary? channelConfigList = default, + IDictionary? workerTags = default) { var response = routerWorkerResponse.Value; Assert.AreEqual(workerId, response.Id); - Assert.AreEqual(queueAssignmentList.Count(), response.QueueAssignments.Count); + Assert.AreEqual(queueAssignments.Count(), response.QueueAssignments.Count); Assert.AreEqual(totalCapacity, response.TotalCapacity); if (workerLabels != default) @@ -201,6 +205,12 @@ protected void AssertRegisteredWorkerIsValid(Response routerWorker Assert.AreEqual(labelsWithID, response.Labels); } + if (workerTags != default) + { + var tags = workerTags.ToDictionary(k => k.Key, k => k.Value); + Assert.AreEqual(tags, response.Tags); + } + if (channelConfigList != default) { Assert.AreEqual(channelConfigList.Count, response.ChannelConfigurations.Count); diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/JobQueueLiveTests.cs b/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/JobQueueLiveTests.cs index eda57d394cae..863b83a5b059 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/JobQueueLiveTests.cs +++ b/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/JobQueueLiveTests.cs @@ -27,7 +27,7 @@ public async Task CreateQueueTest() var createDistributionPolicyResponse = await CreateDistributionPolicy(nameof(CreateQueueTest)); var queueId = GenerateUniqueId(IdPrefix, nameof(CreateQueueTest)); var queueName = "DefaultQueueWithLabels" + queueId; - var queueLabels = new Dictionary() { ["Label_1"] = new LabelValue("Value_1") }; + var queueLabels = new Dictionary() { ["Label_1"] = new LabelValue("Value_1") }; var createQueueResponse = await routerClient.CreateQueueAsync( new CreateQueueOptions(queueId, createDistributionPolicyResponse.Value.Id) @@ -47,20 +47,33 @@ public async Task UpdateQueueTest() var createDistributionPolicyResponse = await CreateDistributionPolicy(nameof(CreateQueueTest)); var queueId = GenerateUniqueId(IdPrefix, nameof(CreateQueueTest)); var queueName = "DefaultQueueWithLabels" + queueId; - var queueLabels = new Dictionary() { ["Label_1"] = new LabelValue("Value_1") }; + var queueLabels = new Dictionary + { + ["Label_1"] = new LabelValue("Value_1"), + ["Label_2"] = new LabelValue(2), + ["Label_3"] = new LabelValue(true) + }; var createQueueResponse = await routerClient.CreateQueueAsync( new CreateQueueOptions(queueId, createDistributionPolicyResponse.Value.Id) { Name = queueName, - Labels = { ["Label_1"] = new LabelValue("Value_1") } + Labels = + { + ["Label_1"] = new LabelValue("Value_1"), + ["Label_2"] = new LabelValue(2), + ["Label_3"] = new LabelValue(true) + } }); AddForCleanup(new Task(async () => await routerClient.DeleteQueueAsync(createQueueResponse.Value.Id))); AssertQueueResponseIsEqual(createQueueResponse, queueId, createDistributionPolicyResponse.Value.Id, queueName, queueLabels); - var updatedLabels = new Dictionary(createQueueResponse.Value.Labels.ToDictionary(x => x.Key, x => x.Value)) + var updatedLabels = new Dictionary(createQueueResponse.Value.Labels.ToDictionary(x => x.Key, x => (LabelValue?)x.Value)) { - ["Label2"] = new("Value2") + ["Label_1"] = null, + ["Label_2"] = new LabelValue(null), + ["Label_3"] = new LabelValue("Value_Updated_3"), + ["Label_4"] = new LabelValue("Value_4") }; var updateOptions = new UpdateQueueOptions(queueId); @@ -68,7 +81,11 @@ public async Task UpdateQueueTest() var updatedQueueResponse = await routerClient.UpdateQueueAsync(updateOptions); - AssertQueueResponseIsEqual(updatedQueueResponse, queueId, createDistributionPolicyResponse.Value.Id, queueName, updatedLabels); + AssertQueueResponseIsEqual(updatedQueueResponse, queueId, createDistributionPolicyResponse.Value.Id, queueName, new Dictionary + { + ["Label_3"] = new LabelValue("Value_Updated_3"), + ["Label_4"] = new LabelValue("Value_4") + }); } [Test] diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterJobLiveTests.cs b/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterJobLiveTests.cs index caf36b74ff04..6ad4f4176a0f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterJobLiveTests.cs +++ b/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterJobLiveTests.cs @@ -493,6 +493,71 @@ public async Task CreateJobWithScheduleAndSuspendMode() Assert.IsNull(createJob1.MatchingMode.QueueAndMatchMode); } + [Test] + public async Task UpdateJobTest() + { + JobRouterClient routerClient = CreateRouterClientWithConnectionString(); + var channelId = GenerateUniqueId($"{nameof(UpdateJobTest)}-Channel"); + + // Setup queue + var createQueueResponse = await CreateQueueAsync(nameof(UpdateJobTest)); + var createQueue = createQueueResponse.Value; + + // Create 1 job + var jobId1 = GenerateUniqueId($"{IdPrefix}{nameof(UpdateJobTest)}1"); + var labels = new Dictionary + { + ["Label_1"] = new LabelValue("Value_1"), + ["Label_2"] = new LabelValue(2), + ["Label_3"] = new LabelValue(true) + }; + var tags = new Dictionary + { + ["Tag_1"] = new LabelValue("Value_1"), + ["Tag_2"] = new LabelValue(2), + ["Tag_3"] = new LabelValue(true) + }; + + var createJobOptions = new CreateJobOptions(jobId1, channelId, createQueue.Id); + createJobOptions.Labels.Append(labels); + createJobOptions.Tags.Append(tags); + + var createJobResponse = await routerClient.CreateJobAsync(createJobOptions); + AddForCleanup(new Task(async () => await routerClient.DeleteJobAsync(createJobResponse.Value.Id))); + + var updatedLabels = new Dictionary + { + ["Label_1"] = null, + ["Label_2"] = new LabelValue(null), + ["Label_3"] = new LabelValue("Value_Updated_3"), + ["Label_4"] = new LabelValue("Value_4") + }; + var updatedTags = new Dictionary + { + ["Tag_1"] = null, + ["Tag_2"] = new LabelValue(null), + ["Tag_3"] = new LabelValue("Value_Updated_3"), + ["Tag_4"] = new LabelValue("Value_4") + }; + + var updateOptions = new UpdateJobOptions(jobId1); + updateOptions.Labels.Append(updatedLabels); + updateOptions.Tags.Append(updatedTags); + + var updateJobResponse = await routerClient.UpdateJobAsync(updateOptions); + + Assert.AreEqual(updateJobResponse.Value.Labels, new Dictionary + { + ["Label_3"] = new LabelValue("Value_Updated_3"), + ["Label_4"] = new LabelValue("Value_4") + }); + Assert.AreEqual(updateJobResponse.Value.Tags, new Dictionary + { + ["Tag_3"] = new LabelValue("Value_Updated_3"), + ["Tag_4"] = new LabelValue("Value_4") + }); + } + [Test] public async Task ReclassifyJob() { diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterWorkerLiveTests.cs b/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterWorkerLiveTests.cs index 4dcb31da9cb4..f09f29bf7f22 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterWorkerLiveTests.cs +++ b/sdk/communication/Azure.Communication.JobRouter/tests/RouterClients/RouterWorkerLiveTests.cs @@ -34,17 +34,17 @@ public async Task CreateWorkerTest() var channelConfig1 = new ChannelConfiguration(20) { MaxNumberOfJobs = 5 }; - var channelConfigList = new Dictionary() + var channelConfigList = new Dictionary() { ["ACS_Chat_Channel"] = channelConfig1 }; - var workerLabels = new Dictionary() + var workerLabels = new Dictionary() { ["test_label_1"] = new LabelValue("testLabel"), ["test_label_2"] = new LabelValue(12), }; - var queueAssignmentList = new string[] { createQueueResponse.Value.Id }; + var queueAssignments = new Dictionary {{ createQueueResponse.Value.Id, new RouterQueueAssignment() }}; var routerWorkerResponse = await routerClient.CreateWorkerAsync( new CreateWorkerOptions(workerId, totalCapacity) @@ -60,7 +60,7 @@ public async Task CreateWorkerTest() AddForCleanup(new Task(async () => await routerClient.DeleteWorkerAsync(workerId))); Assert.NotNull(routerWorkerResponse.Value); - AssertRegisteredWorkerIsValid(routerWorkerResponse, workerId, queueAssignmentList, + AssertRegisteredWorkerIsValid(routerWorkerResponse, workerId, queueAssignments, totalCapacity, workerLabels, channelConfigList); } @@ -247,6 +247,77 @@ public async Task GetWorkersTest() await routerClient.DeleteWorkerAsync(expectedWorkerIds[2]); await routerClient.DeleteWorkerAsync(expectedWorkerIds[3]); } + + [Test] + public async Task UpdateWorkerTest() + { + JobRouterClient routerClient = CreateRouterClientWithConnectionString(); + + // Setup queue + var createQueueResponse = await CreateQueueAsync(nameof(UpdateWorkerTest)); + + // Register worker + var workerId = GenerateUniqueId($"{IdPrefix}{nameof(UpdateWorkerTest)}"); + var totalCapacity = 100; + var channelConfigList = new Dictionary() + { + ["ACS_Chat_Channel"] = new(20) { MaxNumberOfJobs = 5 }, + ["ACS_Voice_Channel"] = new(10) { MaxNumberOfJobs = 3} + }; + var workerLabels = new Dictionary() + { + ["test_label_1"] = new("testLabel"), + ["test_label_2"] = new(12), + }; + var workerTags = new Dictionary() + { + ["test_tag_1"] = new("tag"), + ["test_tag_2"] = new(12), + }; + + var queueAssignments = new Dictionary {{ createQueueResponse.Value.Id, new RouterQueueAssignment() }}; + + var createWorkerOptions = new CreateWorkerOptions(workerId, totalCapacity) + { + AvailableForOffers = true + }; + createWorkerOptions.Labels.Append(workerLabels); + createWorkerOptions.ChannelConfigurations.Append(channelConfigList); + createWorkerOptions.QueueAssignments.Append(queueAssignments); + createWorkerOptions.Tags.Append(workerTags); + + var routerWorkerResponse = await routerClient.CreateWorkerAsync(createWorkerOptions); + AddForCleanup(new Task(async () => await routerClient.DeleteWorkerAsync(workerId))); + + Assert.NotNull(routerWorkerResponse.Value); + AssertRegisteredWorkerIsValid(routerWorkerResponse, workerId, queueAssignments, + totalCapacity, workerLabels, channelConfigList, workerTags); + + // Remove queue assignment, channel configuration and label + queueAssignments[createQueueResponse.Value.Id] = null; + channelConfigList[channelConfigList.First().Key] = null; + workerLabels[workerLabels.First().Key] = null; + workerTags[workerTags.First().Key] = null; + + var updateWorkerOptions = new UpdateWorkerOptions(workerId) + { + AvailableForOffers = false + }; + updateWorkerOptions.Labels.Append(workerLabels); + updateWorkerOptions.ChannelConfigurations.Append(channelConfigList); + updateWorkerOptions.QueueAssignments.Append(queueAssignments); + updateWorkerOptions.Tags.Append(workerTags); + + var updateWorkerResponse = await routerClient.UpdateWorkerAsync(updateWorkerOptions); + + updateWorkerOptions.ChannelConfigurations.Remove(channelConfigList.First().Key); + updateWorkerOptions.Labels.Remove(workerLabels.First().Key); + updateWorkerOptions.Tags.Remove(workerTags.First().Key); + + AssertRegisteredWorkerIsValid(updateWorkerResponse, workerId, new Dictionary(), + totalCapacity, updateWorkerOptions.Labels, updateWorkerOptions.ChannelConfigurations, updateWorkerOptions.Tags); + } + #endregion Worker Tests } } diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemoveProperty.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemoveProperty.json index 4861f58d2c15..7f16bcb6cc99 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemoveProperty.json +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemoveProperty.json @@ -1,22 +1,22 @@ { "Entries": [ { - "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "199", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-5499aac6dde21ce0f862102035ade0f7-428eb6aee5e2436e-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "e5ca2a1077c04ed2ad41915e423592a4", + "traceparent": "00-989ea1759d1f2a7592575c88464d52c2-5e88e57e8a2dbe3e-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "39e11b12f5b7b4c66eacbe128980527e", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:30 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:18 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "LongestIdleDistributionPolicyDF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", + "name": "LongestIdleDistributionPolicyE84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -28,17 +28,17 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:30 GMT", - "ETag": "\u00220b009550-0000-0d00-0000-649de9ab0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:31 GMT", - "trace-id": "5499aac6-dde2-1ce0-f862-102035ade0f7", + "Date": "Tue, 25 Jul 2023 15:15:17 GMT", + "ETag": "\u00220200ecfb-0000-0700-0000-64bfe7060000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:18 GMT", + "trace-id": "989ea175-9d1f-2a75-9257-5c88464d52c2", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0q\u002BmdZAAAAABoisZRDaQ\u002BRrXw2bmyXvB2U0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0Bue/ZAAAAAB9iPKCS5oOQJ1cnsmf3B44WVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", - "name": "LongestIdleDistributionPolicyDF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", + "id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", + "name": "LongestIdleDistributionPolicyE84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -49,23 +49,23 @@ } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-a4decd3dc57d929dbd5b8bf456afc2cd-d180d5cece6930fc-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "28ce6e3e0d514191d6cfe75ad76a50bc", + "traceparent": "00-15a958d2dd350599266e965ac18fb3a5-3a37ef379c6ef024-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6608487bec362cba8e4abae407ceb280", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:31 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:18 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "DefaultQueueWithLabelsDF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", - "distributionPolicyId": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", + "name": "DefaultQueueWithLabelsE84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", + "distributionPolicyId": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", "labels": { "Label_1": "Value_1" } @@ -74,37 +74,37 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:31 GMT", - "ETag": "\u00220501021e-0000-0d00-0000-649de9ac0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:32 GMT", - "trace-id": "a4decd3d-c57d-929d-bd5b-8bf456afc2cd", + "Date": "Tue, 25 Jul 2023 15:15:18 GMT", + "ETag": "\u002202007b2f-0000-0700-0000-64bfe7060000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:18 GMT", + "trace-id": "15a958d2-dd35-0599-266e-965ac18fb3a5", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0q\u002BmdZAAAAABaORQ/vQJKQ7QbP6QSFBUMU0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0Bue/ZAAAAAC5pQthSseeRr2BTcPoz/ajWVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", - "name": "DefaultQueueWithLabelsDF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", - "distributionPolicyId": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", + "id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", + "name": "DefaultQueueWithLabelsE84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", + "distributionPolicyId": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", "labels": { "Label_1": "Value_1", - "Id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50" + "Id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C" } } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "13", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-f2d1bc62470f7efa3676f49c31e8977d-06229e9e51876360-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "00588f8df09bbb615752b93095754c22", + "traceparent": "00-7547dd0fcb12669950ce5786e2f856d1-bd082226d47eeeae-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "ff4238ae6bbbe607e27194796e3fb06a", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:31 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:19 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -114,34 +114,34 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:31 GMT", - "ETag": "\u002205010e1e-0000-0d00-0000-649de9ac0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:32 GMT", - "trace-id": "f2d1bc62-470f-7efa-3676-f49c31e8977d", + "Date": "Tue, 25 Jul 2023 15:15:18 GMT", + "ETag": "\u002202007c2f-0000-0700-0000-64bfe7060000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:18 GMT", + "trace-id": "7547dd0f-cb12-6699-50ce-5786e2f856d1", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0rOmdZAAAAABva\u002Bgas8mvRr1eBcrb1jvSU0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0Bue/ZAAAAAB8hQ8unKTIQZWqpemdLXbbWVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", - "distributionPolicyId": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", + "id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", + "distributionPolicyId": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", "labels": { "Label_1": "Value_1", - "Id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50" + "Id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C" } } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C?api-version=2022-07-18-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-6690bdbb4f46ae4447591ddcae2cc1c8-75355acc94428895-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "50d7c8c4d59b03ba98880ef090777743", + "traceparent": "00-e689aca8cbded3c2e561393b7826d440-409eadf96c8e4337-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6e78e0b6be2925c661b4aa6c3ae2ad9f", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:31 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:19 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -149,27 +149,27 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:32 GMT", - "ETag": "\u002205010e1e-0000-0d00-0000-649de9ac0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:32 GMT", - "trace-id": "6690bdbb-4f46-ae44-4759-1ddcae2cc1c8", + "Date": "Tue, 25 Jul 2023 15:15:18 GMT", + "ETag": "\u002202007c2f-0000-0700-0000-64bfe7060000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:18 GMT", + "trace-id": "e689aca8-cbde-d3c2-e561-393b7826d440", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0rOmdZAAAAAAJhDPkAK0wQpg\u002BDNVnn159U0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0B\u002Be/ZAAAAAB428PkKw3iQ4rxhSTHTUKqWVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", - "distributionPolicyId": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50", + "id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", + "distributionPolicyId": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C", "labels": { "Label_1": "Value_1", - "Id": "DF60B9A069B8ED3D9E139D1379367BA5EAE70C2811BDD7FB50" + "Id": "E84CD5120EA5E601FE1B296975C11525B47AD7ABDC161C270C" } } } ], "Variables": { "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", - "id-prefix": "sdk-6C3bRXq5zEG2x7Ff_rzHPg-", - "RandomSeed": "1484987808" + "id-prefix": "sdk-b7shfpgbL0G1RZX4pNxgng-", + "RandomSeed": "1577877602" } } diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemovePropertyAsync.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemovePropertyAsync.json index cebc4c201bda..7bf982a5ae3f 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemovePropertyAsync.json +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/CreateQueueAndRemovePropertyAsync.json @@ -1,22 +1,22 @@ { "Entries": [ { - "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "199", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-be88a78f8eb3d5a4e18255fc3aab4849-2ff4333073fbd5b6-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "50eb6a13243f428e9f6eca89374bc1dd", + "traceparent": "00-8d27ef222d2369f32817cba4c7e695f4-5a09e70c32cd6ae7-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1f32ef86a940030eeb3bb75139a9347b", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:39 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:19 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "LongestIdleDistributionPolicy63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", + "name": "LongestIdleDistributionPolicy5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -28,17 +28,17 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:40 GMT", - "ETag": "\u00220b00a650-0000-0d00-0000-649de9b50000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:41 GMT", - "trace-id": "be88a78f-8eb3-d5a4-e182-55fc3aab4849", + "Date": "Tue, 25 Jul 2023 15:15:19 GMT", + "ETag": "\u00220200edfb-0000-0700-0000-64bfe7070000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:19 GMT", + "trace-id": "8d27ef22-2d23-69f3-2817-cba4c7e695f4", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0tOmdZAAAAABQMrPSrCTlSJiUJuUDxlrIU0pDMjExMDUxMjAyMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0B\u002Be/ZAAAAAAQo3A2BfE7RYkgYU2nCr/YWVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", - "name": "LongestIdleDistributionPolicy63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", + "id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", + "name": "LongestIdleDistributionPolicy5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -49,23 +49,23 @@ } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "190", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-3239c643e8760ace2376c142b70a93c8-b22f8674e3c05ee2-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "9e2ca8c7475184cbf7f93271b4abeaaf", + "traceparent": "00-cedafbb42efeea113c6626ebc22a39ff-ba8821dc955a7a2e-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "29239839ad3f3f8cab2d9cb213a99a55", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:40 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:20 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "DefaultQueueWithLabels63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", - "distributionPolicyId": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", + "name": "DefaultQueueWithLabels5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", + "distributionPolicyId": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", "labels": { "Label_1": "Value_1" } @@ -74,37 +74,37 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:41 GMT", - "ETag": "\u00220501ef1e-0000-0d00-0000-649de9b50000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:41 GMT", - "trace-id": "3239c643-e876-0ace-2376-c142b70a93c8", + "Date": "Tue, 25 Jul 2023 15:15:19 GMT", + "ETag": "\u002202007d2f-0000-0700-0000-64bfe7070000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:19 GMT", + "trace-id": "cedafbb4-2efe-ea11-3c66-26ebc22a39ff", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0temdZAAAAACxESe4rVs7RqDTCPPZbli/U0pDMjExMDUxMjAyMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0B\u002Be/ZAAAAAB/D1h3bHpfTLb4lNz5SIALWVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", - "name": "DefaultQueueWithLabels63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", - "distributionPolicyId": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", + "id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", + "name": "DefaultQueueWithLabels5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", + "distributionPolicyId": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", "labels": { "Label_1": "Value_1", - "Id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA" + "Id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1" } } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "13", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-0792439783a08b444e639ac52bdb9fff-a50022a61539421a-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "7b2f03a3bd546a14bda32a5430fdd2b8", + "traceparent": "00-cf42ffd10fc24951f24d11c5cea51f24-3fdba26a35f0dc62-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "b7e3c72777cd95a1b1e8de34b9b89a7a", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:41 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:20 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { @@ -114,34 +114,34 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:41 GMT", - "ETag": "\u00220501f71e-0000-0d00-0000-649de9b60000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:42 GMT", - "trace-id": "07924397-83a0-8b44-4e63-9ac52bdb9fff", + "Date": "Tue, 25 Jul 2023 15:15:19 GMT", + "ETag": "\u002202007e2f-0000-0700-0000-64bfe7080000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:20 GMT", + "trace-id": "cf42ffd1-0fc2-4951-f24d-11c5cea51f24", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0temdZAAAAAAeYQXRYAQ0Sq4I\u002Bqk/TFV8U0pDMjExMDUxMjAyMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0COe/ZAAAAADzgtonIsj8RJMObj1dBQXMWVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", - "distributionPolicyId": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", + "id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", + "distributionPolicyId": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", "labels": { "Label_1": "Value_1", - "Id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA" + "Id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1" } } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1?api-version=2022-07-18-preview", "RequestMethod": "GET", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "traceparent": "00-73be40ede855615134c44e2e2051d56b-861fe482a2f7e16b-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "9c7c5605a263cbb49e665946f21d8ef4", + "traceparent": "00-94814633378ad5bc1e156bd7f0f24e29-2aa49090d415ed07-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "63230317fcffd87d63f273130c5bef42", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:41 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:20 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": null, @@ -149,27 +149,27 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:41 GMT", - "ETag": "\u00220501f71e-0000-0d00-0000-649de9b60000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:42 GMT", - "trace-id": "73be40ed-e855-6151-34c4-4e2e2051d56b", + "Date": "Tue, 25 Jul 2023 15:15:20 GMT", + "ETag": "\u002202007e2f-0000-0700-0000-64bfe7080000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:20 GMT", + "trace-id": "94814633-378a-d5bc-1e15-6bd7f0f24e29", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0tumdZAAAAAAJ4fOAOGPdRI1l/H8MC331U0pDMjExMDUxMjAyMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0COe/ZAAAAAAekcKh13yTTb7K1prhtsX2WVRPMjIxMDkwODIwMDQ3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", - "distributionPolicyId": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA", + "id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", + "distributionPolicyId": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1", "labels": { "Label_1": "Value_1", - "Id": "63B163A68DE67862C29B005D58F84B512094E4AF360C2739DA" + "Id": "5E1AF4429A476CA44325700755B75BCD186664A8E09E208BC1" } } } ], "Variables": { "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", - "id-prefix": "sdk-VEDJt3UIfkedCqSxPV4fpA-", - "RandomSeed": "685150182" + "id-prefix": "sdk-aePcic5FH0ytTXcx2YMDQw-", + "RandomSeed": "1007409602" } } diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTest.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTest.json index cec3442a43e0..197cbb03dbd4 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTest.json +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTest.json @@ -1,22 +1,22 @@ { "Entries": [ { - "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "199", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-2c925e9eaf8fe05603942d0d3245448b-42f1d8ce672c141c-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "ca323a6a6e1e828ef564ec1f5add57fc", + "traceparent": "00-fcf70f1e1ecab0e9f85b3fffd1838d2b-b0b812e1fe388ad7-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "99359bdeda9715b874c1dbdc2bb251d3", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:33 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:46 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "LongestIdleDistributionPolicyAA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", + "name": "LongestIdleDistributionPolicy58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -28,17 +28,17 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:33 GMT", - "ETag": "\u00220b009c50-0000-0d00-0000-649de9ae0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:34 GMT", - "trace-id": "2c925e9e-af8f-e056-0394-2d0d3245448b", + "Date": "Tue, 25 Jul 2023 15:15:46 GMT", + "ETag": "\u00220200f6fb-0000-0700-0000-64bfe7230000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:47 GMT", + "trace-id": "fcf70f1e-1eca-b0e9-f85b-3fffd1838d2b", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0rumdZAAAAABAsxuMJePpQYyL8jaJqf4SU0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0Iue/ZAAAAADu7G8P17hbTqLFSoen2UjRWVRPMjIxMDkwODE4MDM3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "name": "LongestIdleDistributionPolicyAA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", + "id": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "name": "LongestIdleDistributionPolicy58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -49,98 +49,104 @@ } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "190", + "Content-Length": "217", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-3ac72ae9c10f384f9d7abc9a5b336a6a-976c0dcd3ed756fb-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "1dace607611b2c3119162e1e5888d387", + "traceparent": "00-67d600e0f37ce31d5d639519c317a2c7-17a55d12bf7d977e-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "fbe1fe4fddd717d4afab83186cc0c05c", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:33 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:47 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "DefaultQueueWithLabelsAA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "distributionPolicyId": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", + "name": "DefaultQueueWithLabels58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "distributionPolicyId": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", "labels": { - "Label_1": "Value_1" + "Label_1": "Value_1", + "Label_2": 2, + "Label_3": true } }, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:34 GMT", - "ETag": "\u00220501451e-0000-0d00-0000-649de9ae0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:34 GMT", - "trace-id": "3ac72ae9-c10f-384f-9d7a-bc9a5b336a6a", + "Date": "Tue, 25 Jul 2023 15:15:46 GMT", + "ETag": "\u00220200842f-0000-0700-0000-64bfe7230000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:47 GMT", + "trace-id": "67d600e0-f37c-e31d-5d63-9519c317a2c7", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0rumdZAAAAAA8qAMtrpXhRrA6\u002BFhmP7TgU0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0I\u002Be/ZAAAAAD2i\u002B\u002Bv/wXdSonhBbkEkjdZWVRPMjIxMDkwODE4MDM3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "name": "DefaultQueueWithLabelsAA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "distributionPolicyId": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", + "id": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "name": "DefaultQueueWithLabels58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "distributionPolicyId": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", "labels": { "Label_1": "Value_1", - "Id": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64" + "Label_2": 2, + "Label_3": true, + "Id": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108" } } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "108", + "Content-Length": "148", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-bed9e570bf8049c71e6961158673dbac-b30e44fe26abea6c-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "080013f5162d8c4d7fd6e790fabbfd19", + "traceparent": "00-03f3f6ab5f73ac3bf8246aa8deffbc11-c933cdfad794a5e6-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c8f572d083a628e2386188ace147920a", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:34 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:47 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { "labels": { - "Label_1": "Value_1", - "Id": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "Label2": "Value2" + "Label_1": null, + "Label_2": null, + "Label_3": "Value_Updated_3", + "Id": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "Label_4": "Value_4" } }, "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:34 GMT", - "ETag": "\u002205014c1e-0000-0d00-0000-649de9af0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:35 GMT", - "trace-id": "bed9e570-bf80-49c7-1e69-61158673dbac", + "Date": "Tue, 25 Jul 2023 15:15:47 GMT", + "ETag": "\u00220200852f-0000-0700-0000-64bfe7230000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:47 GMT", + "trace-id": "03f3f6ab-5f73-ac3b-f824-6aa8deffbc11", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0r\u002BmdZAAAAABpPEAJfeMzTYSSlDg\u002BOhX9U0pDMjExMDUxMjAxMDUzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0I\u002Be/ZAAAAABMkOWxjO88TKHkPL3Tdf9SWVRPMjIxMDkwODE4MDM3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "name": "DefaultQueueWithLabelsAA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "distributionPolicyId": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", + "id": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "name": "DefaultQueueWithLabels58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "distributionPolicyId": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", "labels": { - "Label_1": "Value_1", - "Id": "AA80D32B169FE369592D13C7F3B267B20CD1909648BA0C9C64", - "Label2": "Value2" + "Label_3": "Value_Updated_3", + "Id": "58AF15A6721B45ABBEFC460BBE789ED19753F7F2FC076A1108", + "Label_4": "Value_4" } } } ], "Variables": { "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", - "id-prefix": "sdk-1rVszZ_VC0SLf6CdQDmH7w-", - "RandomSeed": "1252768369" + "id-prefix": "sdk-A191dErR50OzBsmco2HqNg-", + "RandomSeed": "302004433" } } diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTestAsync.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTestAsync.json index e60376c24602..454911d573e4 100644 --- a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTestAsync.json +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/JobQueueLiveTests/UpdateQueueTestAsync.json @@ -1,22 +1,22 @@ { "Entries": [ { - "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", "Content-Length": "199", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-d5d1106a488096f1a196c9f455f4dc9b-c0ddd3529fea3ca5-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "2db80592d0be8665501f1deb4a6dc83c", + "traceparent": "00-7e22c0b3c1139345411ec519c81b5632-9c06f7f0a50b0e37-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f937b8f8a587bff8a9636b579566a8b7", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:50 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:48 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "LongestIdleDistributionPolicy879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", + "name": "LongestIdleDistributionPolicy23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -28,17 +28,17 @@ "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:51 GMT", - "ETag": "\u00220b00bb50-0000-0d00-0000-649de9bf0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:51 GMT", - "trace-id": "d5d1106a-4880-96f1-a196-c9f455f4dc9b", + "Date": "Tue, 25 Jul 2023 15:15:47 GMT", + "ETag": "\u00220200f9fb-0000-0700-0000-64bfe7240000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:48 GMT", + "trace-id": "7e22c0b3-c113-9345-411e-c519c81b5632", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0v\u002BmdZAAAAADTvsB9w6OkTIYqXW1Ck6rMU0pDMjExMDUxMjAxMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0I\u002Be/ZAAAAADOhbVn0oT2Q7Rcd/U/NJPEWVRPMjIxMDkwODE4MDM3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "name": "LongestIdleDistributionPolicy879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", + "id": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "name": "LongestIdleDistributionPolicy23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", "offerExpiresAfterSeconds": 30, "mode": { "kind": "longest-idle", @@ -49,98 +49,104 @@ } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "190", + "Content-Length": "217", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-1ca1b1889f905dfe54b6c5eb1c8097cd-35908434a1c9f967-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "4fb41c3e94fed99cc8493cf770922fe4", + "traceparent": "00-364975cb8b70c68bfbf2147a5d380e81-686f8a3a7f04f927-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "664c38a16c7b61bb64666ef7971370a7", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:51 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:48 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { - "name": "DefaultQueueWithLabels879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "distributionPolicyId": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", + "name": "DefaultQueueWithLabels23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "distributionPolicyId": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", "labels": { - "Label_1": "Value_1" + "Label_1": "Value_1", + "Label_2": 2, + "Label_3": true } }, "StatusCode": 200, "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:51 GMT", - "ETag": "\u00220501d41f-0000-0d00-0000-649de9bf0000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:51 GMT", - "trace-id": "1ca1b188-9f90-5dfe-54b6-c5eb1c8097cd", + "Date": "Tue, 25 Jul 2023 15:15:47 GMT", + "ETag": "\u00220200862f-0000-0700-0000-64bfe7240000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:48 GMT", + "trace-id": "364975cb-8b70-c68b-fbf2-147a5d380e81", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0v\u002BmdZAAAAADixt6nMXO8QYYxrhtrXnFEU0pDMjExMDUxMjAxMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0JOe/ZAAAAAD3toVPqLN9RpYnnEaX1G8iWVRPMjIxMDkwODE4MDM3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "name": "DefaultQueueWithLabels879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "distributionPolicyId": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", + "id": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "name": "DefaultQueueWithLabels23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "distributionPolicyId": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", "labels": { "Label_1": "Value_1", - "Id": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82" + "Label_2": 2, + "Label_3": true, + "Id": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF" } } }, { - "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82?api-version=2022-07-18-preview", + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF?api-version=2022-07-18-preview", "RequestMethod": "PATCH", "RequestHeaders": { "Accept": "application/json", "Authorization": "Sanitized", - "Content-Length": "108", + "Content-Length": "148", "Content-Type": "application/merge-patch\u002Bjson", - "traceparent": "00-53659be5d50078081b48cdc1b42e9eb0-05c61cd91eba098c-00", - "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230629.1 (.NET 6.0.18; Microsoft Windows 10.0.22621)", - "x-ms-client-request-id": "955f49a512cb51d7768209d62a51cdcb", + "traceparent": "00-5081a4cddeafa25a49eb3ff2478d9bb9-5e8974b529274008-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "9c63500274d196a81a130efdaf1cd966", "x-ms-content-sha256": "Sanitized", - "x-ms-date": "Thu, 29 Jun 2023 20:29:51 GMT", + "x-ms-date": "Tue, 25 Jul 2023 15:15:48 GMT", "x-ms-return-client-request-id": "true" }, "RequestBody": { "labels": { - "Label_1": "Value_1", - "Id": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "Label2": "Value2" + "Label_1": null, + "Label_2": null, + "Label_3": "Value_Updated_3", + "Id": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "Label_4": "Value_4" } }, "StatusCode": 201, "ResponseHeaders": { "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", "Content-Type": "application/json; charset=utf-8", - "Date": "Thu, 29 Jun 2023 20:29:51 GMT", - "ETag": "\u00220501e01f-0000-0d00-0000-649de9c00000\u0022", - "Last-Modified": "Thu, 29 Jun 2023 20:29:52 GMT", - "trace-id": "53659be5-d500-7808-1b48-cdc1b42e9eb0", + "Date": "Tue, 25 Jul 2023 15:15:48 GMT", + "ETag": "\u00220200872f-0000-0700-0000-64bfe7240000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:15:48 GMT", + "trace-id": "5081a4cd-deaf-a25a-49eb-3ff2478d9bb9", "Transfer-Encoding": "chunked", - "X-Azure-Ref": "0wOmdZAAAAAAjYnA6l61ETKQcC1IKRw20U0pDMjExMDUxMjAxMDIzAGYwOWE0YzEzLTIxZjEtNDhlYy05Y2Y3LTY2NTQ1Njg0YjY0Mg==", + "X-Azure-Ref": "0JOe/ZAAAAADt40gYT6nPSanAvy1mw1DeWVRPMjIxMDkwODE4MDM3AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", "X-Cache": "CONFIG_NOCACHE" }, "ResponseBody": { - "id": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "name": "DefaultQueueWithLabels879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "distributionPolicyId": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", + "id": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "name": "DefaultQueueWithLabels23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "distributionPolicyId": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", "labels": { - "Label_1": "Value_1", - "Id": "879A1E448742B5F6061BC80CCC278490A93A04CC75E5043F82", - "Label2": "Value2" + "Label_3": "Value_Updated_3", + "Id": "23AA710D0A47CDA7C13CB01F9973F1C1AA80DEF38085C45DAF", + "Label_4": "Value_4" } } } ], "Variables": { "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", - "id-prefix": "sdk-_qwy9BeafkyJWmlfxiqRug-", - "RandomSeed": "1745506822" + "id-prefix": "sdk-2yJoDbTIbk6z0EOR63kqOg-", + "RandomSeed": "898735755" } } diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterJobLiveTests/UpdateJobTest.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterJobLiveTests/UpdateJobTest.json new file mode 100644 index 000000000000..6ad30af3bf71 --- /dev/null +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterJobLiveTests/UpdateJobTest.json @@ -0,0 +1,234 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/E0A1A31687FBF522C2B30A9DAE2A77B8B2ED1770C95F0B1784?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "199", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-87fa9697f33b3d3f419ada59bef07973-97a4ffcfed4b79f2-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8ca1ccdd88e412e06f7a0a1fa1034055", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:13 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "LongestIdleDistributionPolicyE0A1A31687FBF522C2B30A9DAE2A77B8B2ED1770C95F0B1784", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1 + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:13 GMT", + "ETag": "\u00220200fdfb-0000-0700-0000-64bfe73d0000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:13 GMT", + "trace-id": "87fa9697-f33b-3d3f-419a-da59bef07973", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Pee/ZAAAAAB335AGMoZpRK4Z1fCCuv9vWVRPMjIxMDkwODE5MDIzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "E0A1A31687FBF522C2B30A9DAE2A77B8B2ED1770C95F0B1784", + "name": "LongestIdleDistributionPolicyE0A1A31687FBF522C2B30A9DAE2A77B8B2ED1770C95F0B1784", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1, + "bypassSelectors": false + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "189", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-467db369f3f138874e7465b601150c53-3c3409031ff785e5-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "2cf8395b9d16fac6ea457642084d3a4f", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:14 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "DefaultQueue-Sdk-Test185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59", + "distributionPolicyId": "E0A1A31687FBF522C2B30A9DAE2A77B8B2ED1770C95F0B1784", + "labels": { + "Label_1": "Value_1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:13 GMT", + "ETag": "\u00220200882f-0000-0700-0000-64bfe73e0000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:14 GMT", + "trace-id": "467db369-f3f1-3887-4e74-65b601150c53", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Pee/ZAAAAADkgqVZlAG3QZR9P6pce6KdWVRPMjIxMDkwODE5MDIzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59", + "name": "DefaultQueue-Sdk-Test185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59", + "distributionPolicyId": "E0A1A31687FBF522C2B30A9DAE2A77B8B2ED1770C95F0B1784", + "labels": { + "Label_1": "Value_1", + "Id": "185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59" + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/jobs/CF98CE43F2A2230DC06B8F4E261C5DB9FA3EBFD9D02D9C3536?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "237", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-fd075d245925edbff8af7f9ee0e19387-3c66824aa01071da-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4d9b946b5e3637c6f3814576e8a44b32", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:14 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelId": "330F1904A1E1071777D5787008E835EF10E67F97AAEE1FD1B8", + "queueId": "185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59", + "labels": { + "Label_1": "Value_1", + "Label_2": 2, + "Label_3": true + }, + "tags": { + "Tag_1": "Value_1", + "Tag_2": 2, + "Tag_3": true + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:13 GMT", + "ETag": "\u002200000000-0000-0000-494a-1f16228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:14 GMT", + "trace-id": "fd075d24-5925-edbf-f8af-7f9ee0e19387", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Pue/ZAAAAACIHE8ZxXRBRaGy7izEWZWVWVRPMjIxMDkwODE5MDIzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "CF98CE43F2A2230DC06B8F4E261C5DB9FA3EBFD9D02D9C3536", + "status": "created", + "channelId": "330F1904A1E1071777D5787008E835EF10E67F97AAEE1FD1B8", + "queueId": "185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59", + "priority": 1, + "requestedWorkerSelectors": [], + "attachedWorkerSelectors": [], + "labels": { + "Label_1": "Value_1", + "Label_2": 2, + "Label_3": true + }, + "assignments": {}, + "tags": { + "Tag_1": "Value_1", + "Tag_2": 2, + "Tag_3": true + }, + "notes": {}, + "matchingMode": { + "modeType": "queueAndMatchMode", + "queueAndMatchMode": {} + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/jobs/CF98CE43F2A2230DC06B8F4E261C5DB9FA3EBFD9D02D9C3536?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "169", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-010a1aa712d730a3a3aa205b98f4121a-fa2d94f5b37b4c3b-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "8e29f3bb3d9e3f9305a6a19f119e0921", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:14 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "labels": { + "Label_1": null, + "Label_2": null, + "Label_3": "Value_Updated_3", + "Label_4": "Value_4" + }, + "tags": { + "Tag_1": null, + "Tag_2": null, + "Tag_3": "Value_Updated_3", + "Tag_4": "Value_4" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:14 GMT", + "ETag": "\u002200000003-0000-0000-acbe-7616228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:14 GMT", + "trace-id": "010a1aa7-12d7-30a3-a3aa-205b98f4121a", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Pue/ZAAAAACHoFPApM\u002BdTJY1PiqdTrbXWVRPMjIxMDkwODE5MDIzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "CF98CE43F2A2230DC06B8F4E261C5DB9FA3EBFD9D02D9C3536", + "status": "queued", + "enqueuedAt": "2023-07-25T15:16:14.48077\u002B00:00", + "channelId": "330F1904A1E1071777D5787008E835EF10E67F97AAEE1FD1B8", + "queueId": "185AB591166B82254456D8603F82DBFC75BACEBA00C679EB59", + "priority": 1, + "requestedWorkerSelectors": [], + "attachedWorkerSelectors": [], + "labels": { + "Label_3": "Value_Updated_3", + "Label_4": "Value_4" + }, + "assignments": {}, + "tags": { + "Tag_3": "Value_Updated_3", + "Tag_4": "Value_4" + }, + "notes": {}, + "matchingMode": { + "modeType": "queueAndMatchMode", + "queueAndMatchMode": {} + } + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "id-prefix": "sdk-9b77udicYkGKSDxXiFP85g-", + "RandomSeed": "1308596331" + } +} diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterJobLiveTests/UpdateJobTestAsync.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterJobLiveTests/UpdateJobTestAsync.json new file mode 100644 index 000000000000..8c2d5da89f84 --- /dev/null +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterJobLiveTests/UpdateJobTestAsync.json @@ -0,0 +1,266 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/A9990450C1595806B2079DBBC20EFCE673B87B1CF2F32BA384?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "199", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-cc386c9d50fcaf2a2e405e9b491d3d46-d7541b814d82131f-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4a9352fa80a40c729b72103527c93ac9", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:33 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "LongestIdleDistributionPolicyA9990450C1595806B2079DBBC20EFCE673B87B1CF2F32BA384", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1 + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:33 GMT", + "ETag": "\u0022020007fc-0000-0700-0000-64bfe7510000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:33 GMT", + "trace-id": "cc386c9d-50fc-af2a-2e40-5e9b491d3d46", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Uee/ZAAAAABEPZfN5u4tRpV7Kao2TZ3KWVRPMjIxMDkwODE4MDE5AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "A9990450C1595806B2079DBBC20EFCE673B87B1CF2F32BA384", + "name": "LongestIdleDistributionPolicyA9990450C1595806B2079DBBC20EFCE673B87B1CF2F32BA384", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1, + "bypassSelectors": false + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "189", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-8334c003086d38adc34088c54813fc9a-71acd74c7dfed914-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "54f525c5b8409c25499e637a960e001b", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:34 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "DefaultQueue-Sdk-Test35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6", + "distributionPolicyId": "A9990450C1595806B2079DBBC20EFCE673B87B1CF2F32BA384", + "labels": { + "Label_1": "Value_1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:33 GMT", + "ETag": "\u002202008c2f-0000-0700-0000-64bfe7520000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:34 GMT", + "trace-id": "8334c003-086d-38ad-c340-88c54813fc9a", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Uee/ZAAAAADykLnZvuYYTr2\u002BdYc8kNwUWVRPMjIxMDkwODE4MDE5AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6", + "name": "DefaultQueue-Sdk-Test35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6", + "distributionPolicyId": "A9990450C1595806B2079DBBC20EFCE673B87B1CF2F32BA384", + "labels": { + "Label_1": "Value_1", + "Id": "35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6" + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/jobs/C5D7E5AA44C22A1775BADA61B46AAEAD4AABA7263266B33C4E?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "237", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-8031f45d892c85d222f96c3150439401-4d22de8e3f0f7266-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "4ce883b6b09b7ef3e3f4d8f7d50743e7", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:34 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "channelId": "330F1904A1E1071777D5787008E835EF10E67F97AAEE1FD1B8", + "queueId": "35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6", + "labels": { + "Label_1": "Value_1", + "Label_2": 2, + "Label_3": true + }, + "tags": { + "Tag_1": "Value_1", + "Tag_2": 2, + "Tag_3": true + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:33 GMT", + "ETag": "\u002200000000-0000-0000-de92-0b22228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:34 GMT", + "trace-id": "8031f45d-892c-85d2-22f9-6c3150439401", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Uue/ZAAAAAD0DyGPh5/mRI\u002BrQQYwjuSVWVRPMjIxMDkwODE4MDE5AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "C5D7E5AA44C22A1775BADA61B46AAEAD4AABA7263266B33C4E", + "status": "created", + "channelId": "330F1904A1E1071777D5787008E835EF10E67F97AAEE1FD1B8", + "queueId": "35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6", + "priority": 1, + "requestedWorkerSelectors": [], + "attachedWorkerSelectors": [], + "labels": { + "Label_1": "Value_1", + "Label_2": 2, + "Label_3": true + }, + "assignments": {}, + "tags": { + "Tag_1": "Value_1", + "Tag_2": 2, + "Tag_3": true + }, + "notes": {}, + "matchingMode": { + "modeType": "queueAndMatchMode", + "queueAndMatchMode": {} + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/jobs/C5D7E5AA44C22A1775BADA61B46AAEAD4AABA7263266B33C4E?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "169", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-2131aa32ce2c4930407e8ca90a76a4c4-25a7906669af6fa6-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "6539dfe99537421c2df600051cf8758d", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:34 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "labels": { + "Label_1": null, + "Label_2": null, + "Label_3": "Value_Updated_3", + "Label_4": "Value_4" + }, + "tags": { + "Tag_1": null, + "Tag_2": null, + "Tag_3": "Value_Updated_3", + "Tag_4": "Value_4" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:34 GMT", + "ETag": "\u002200000003-0000-0000-c999-5822228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:34 GMT", + "trace-id": "2131aa32-ce2c-4930-407e-8ca90a76a4c4", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Uue/ZAAAAAAgShEk06ljQaK1v5VuifCNWVRPMjIxMDkwODE4MDE5AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "C5D7E5AA44C22A1775BADA61B46AAEAD4AABA7263266B33C4E", + "status": "queued", + "enqueuedAt": "2023-07-25T15:16:34.4508575\u002B00:00", + "channelId": "330F1904A1E1071777D5787008E835EF10E67F97AAEE1FD1B8", + "queueId": "35E3719D268079D8DF738921E3868A4D177D370ADDAC298DE6", + "priority": 1, + "requestedWorkerSelectors": [], + "attachedWorkerSelectors": [], + "labels": { + "Label_3": "Value_Updated_3", + "Label_4": "Value_4" + }, + "assignments": {}, + "tags": { + "Tag_3": "Value_Updated_3", + "Tag_4": "Value_4" + }, + "notes": {}, + "matchingMode": { + "modeType": "queueAndMatchMode", + "queueAndMatchMode": {} + } + } + }, + { + "RequestUri": "https://rsarkar-sdktest.int.communication.azure.net/routing/jobs/C5D7E5AA44C22A1775BADA61B46AAEAD4AABA7263266B33C4E?api-version=2022-07-18-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "HMAC-SHA256 SignedHeaders=x-ms-date;host;x-ms-content-sha256\u0026Signature=9wlO8PwCQy9wONk8bOtP7F8sSyCCfiXl\u002BkvQwX2A2zo=", + "traceparent": "00-27620c2f6f92195a3457011b467ba07c-831e3d1d72197484-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "e0854b7e9e87fb05b02433c025d062ff", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Tue, 25 Jul 2023 15:16:35 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:34 GMT", + "trace-id": "27620c2f-6f92-195a-3457-011b467ba07c", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Uue/ZAAAAABOe79VoXdjTZErYYC2O3fBWVRPMjIxMDkwODE4MDE5AGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "communicationError": { + "code": "Conflict", + "message": "Validation failed: \r\n -- JobStatus: The job is neither closed nor cancelled", + "target": "/routing/jobs/C5D7E5AA44C22A1775BADA61B46AAEAD4AABA7263266B33C4E" + } + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "id-prefix": "sdk-snqMs3A3DUOv5bLzWOgBzA-", + "RandomSeed": "43283493" + } +} diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterWorkerLiveTests/UpdateWorkerTest.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterWorkerLiveTests/UpdateWorkerTest.json new file mode 100644 index 000000000000..2a5f05dcc399 --- /dev/null +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterWorkerLiveTests/UpdateWorkerTest.json @@ -0,0 +1,295 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/8DEABD608379EA97605B39615E21CE93173639A817C2045E6C?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "199", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-d4c2a4f1cc89e028cdc44337594209d6-04da291f307465d1-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "de9a9acf76295ea2e6ef3228398ce38b", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:50 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "LongestIdleDistributionPolicy8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1 + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:50 GMT", + "ETag": "\u0022020015fc-0000-0700-0000-64bfe7630000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:51 GMT", + "trace-id": "d4c2a4f1-cc89-e028-cdc4-4337594209d6", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Y\u002Be/ZAAAAAD8f5U1IN7fRKmF9JNhHB3gWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "name": "LongestIdleDistributionPolicy8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1, + "bypassSelectors": false + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "189", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-66a948d6f4095f5cf1daa868399755c3-229e4f32dfded99a-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c320696725abc2093d99558d78e037df", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:51 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "DefaultQueue-Sdk-Test7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11", + "distributionPolicyId": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "labels": { + "Label_1": "Value_1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:50 GMT", + "ETag": "\u00220200922f-0000-0700-0000-64bfe7630000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:51 GMT", + "trace-id": "66a948d6-f409-5f5c-f1da-a868399755c3", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Y\u002Be/ZAAAAADAE1Lrx9fVRYGaK1Sd9h9YWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11", + "name": "DefaultQueue-Sdk-Test7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11", + "distributionPolicyId": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "labels": { + "Label_1": "Value_1", + "Id": "7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11" + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/workers/8DEABD608379EA97605B39615E21CE93173639A817C2045E6C?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "381", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-1125e10fcd7b59aa98061d69b15df1a3-ab044d0b0044dbfb-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1ce5b4d3fe5470672e81612b3c34c63a", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:52 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "queueAssignments": { + "7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11": {} + }, + "totalCapacity": 100, + "labels": { + "test_label_1": "testLabel", + "test_label_2": 12 + }, + "tags": { + "test_tag_1": "tag", + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Chat_Channel": { + "capacityCostPerJob": 20, + "maxNumberOfJobs": 5 + }, + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "availableForOffers": true + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:51 GMT", + "ETag": "\u002200000001-0000-0000-8392-8d2c228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:51 GMT", + "trace-id": "1125e10f-cd7b-59aa-9806-1d69b15df1a3", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0Y\u002Be/ZAAAAABjgnkGL69CR591273V3gNlWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "state": "active", + "queueAssignments": { + "7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11": {} + }, + "totalCapacity": 100, + "labels": { + "test_label_1": "testLabel", + "test_label_2": 12, + "Id": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C" + }, + "tags": { + "test_tag_1": "tag", + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Chat_Channel": { + "capacityCostPerJob": 20, + "maxNumberOfJobs": 5 + }, + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/workers/8DEABD608379EA97605B39615E21CE93173639A817C2045E6C?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "315", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-44298ca1070920e574d9e955032c9e89-b7d5e9c57d042f97-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "eaac854831c4a91390d7a0902115e506", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:16:52 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "queueAssignments": { + "7C5DDE620305E2C610F74BECA96091E2C26F9C67DC81CF8F11": null + }, + "labels": { + "test_label_1": null, + "test_label_2": 12 + }, + "tags": { + "test_tag_1": null, + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Chat_Channel": null, + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "availableForOffers": false + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:52 GMT", + "ETag": "\u002200000004-0000-0000-ac96-0f2d228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:16:52 GMT", + "trace-id": "44298ca1-0709-20e5-74d9-e955032c9e89", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0ZOe/ZAAAAAC\u002BLZExMR8NQqjQ8NwyjxzFWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "state": "inactive", + "queueAssignments": {}, + "totalCapacity": 100, + "labels": { + "Id": "8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "test_label_2": 12 + }, + "tags": { + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": false + } + }, + { + "RequestUri": "https://rsarkar-sdktest.int.communication.azure.net/routing/distributionPolicies/8DEABD608379EA97605B39615E21CE93173639A817C2045E6C?api-version=2022-07-18-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "HMAC-SHA256 SignedHeaders=x-ms-date;host;x-ms-content-sha256\u0026Signature=QEva4IETkTVgHxOajAnuzajsX2N0h5cPRx/RigVnWEs=", + "traceparent": "00-9e6e5f8517a89106615d25625209d6cc-499ddfabe8588e4f-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "f3441bd34d33a21aa13c8b7d5dd74e18", + "x-ms-content-sha256": "47DEQpj8HBSa\u002B/TImW\u002B5JCeuQeRkm5NMpJWZG3hSuFU=", + "x-ms-date": "Tue, 25 Jul 2023 15:16:53 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:16:52 GMT", + "trace-id": "9e6e5f85-17a8-9106-615d-25625209d6cc", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0ZOe/ZAAAAABx4irp3WoZQKhr7XrDKTOlWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "communicationError": { + "code": "BadRequest", + "message": "One or more validation errors occurred.", + "target": "/routing/distributionPolicies/8DEABD608379EA97605B39615E21CE93173639A817C2045E6C", + "details": [ + { + "code": "QueueExistsWithDistributionPolicy", + "message": "There is a queue with this distribution policy" + } + ] + } + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "id-prefix": "sdk-KfnOJoTijEKMq_676GASXQ-", + "RandomSeed": "1695534273" + } +} diff --git a/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterWorkerLiveTests/UpdateWorkerTestAsync.json b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterWorkerLiveTests/UpdateWorkerTestAsync.json new file mode 100644 index 000000000000..b1a4fdcf00b2 --- /dev/null +++ b/sdk/communication/Azure.Communication.JobRouter/tests/SessionRecords/RouterWorkerLiveTests/UpdateWorkerTestAsync.json @@ -0,0 +1,257 @@ +{ + "Entries": [ + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/distributionPolicies/5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "199", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-2a4ad8de0ab4ae21cd1b2ea000ec06c3-a0b9d4739504f329-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "c753c01bb8283315e17b69f97e67397b", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:17:06 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "LongestIdleDistributionPolicy5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1 + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:17:06 GMT", + "ETag": "\u002202001afc-0000-0700-0000-64bfe7730000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:17:07 GMT", + "trace-id": "2a4ad8de-0ab4-ae21-cd1b-2ea000ec06c3", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0c\u002Be/ZAAAAADLpy2JkCJNS7ZabsHispPwWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "name": "LongestIdleDistributionPolicy5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "offerExpiresAfterSeconds": 30, + "mode": { + "kind": "longest-idle", + "minConcurrentOffers": 1, + "maxConcurrentOffers": 1, + "bypassSelectors": false + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/queues/EC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "189", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-7214c7a10b9810425345995820da1882-fb1f9081c6e33fcb-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "69a5f185100c21759d63c2b750ce3007", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:17:07 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "name": "DefaultQueue-Sdk-TestEC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1", + "distributionPolicyId": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "labels": { + "Label_1": "Value_1" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:17:06 GMT", + "ETag": "\u00220200962f-0000-0700-0000-64bfe7730000\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:17:07 GMT", + "trace-id": "7214c7a1-0b98-1042-5345-995820da1882", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0c\u002Be/ZAAAAAC9J2o6233VTb3mZuce3Ha3WVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "EC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1", + "name": "DefaultQueue-Sdk-TestEC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1", + "distributionPolicyId": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "labels": { + "Label_1": "Value_1", + "Id": "EC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1" + } + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/workers/5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "381", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-de4b2b7b293386d7912b5bd6e499eaa2-6dcc01bd902bf96e-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "1dc4b493bc0e968bedd2037d3c096855", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:17:07 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "queueAssignments": { + "EC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1": {} + }, + "totalCapacity": 100, + "labels": { + "test_label_1": "testLabel", + "test_label_2": 12 + }, + "tags": { + "test_tag_1": "tag", + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Chat_Channel": { + "capacityCostPerJob": 20, + "maxNumberOfJobs": 5 + }, + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "availableForOffers": true + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:17:06 GMT", + "ETag": "\u002200000001-0000-0000-1336-e635228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:17:07 GMT", + "trace-id": "de4b2b7b-2933-86d7-912b-5bd6e499eaa2", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0c\u002Be/ZAAAAAAD\u002B6KJUPCxT4zYw\u002BAGBJguWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "state": "active", + "queueAssignments": { + "EC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1": {} + }, + "totalCapacity": 100, + "labels": { + "test_label_1": "testLabel", + "test_label_2": 12, + "Id": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB" + }, + "tags": { + "test_tag_1": "tag", + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Chat_Channel": { + "capacityCostPerJob": 20, + "maxNumberOfJobs": 5 + }, + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": true + } + }, + { + "RequestUri": "https://sanitized.comminication.azure.com/routing/workers/5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB?api-version=2022-07-18-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "315", + "Content-Type": "application/merge-patch\u002Bjson", + "traceparent": "00-65a8c868300bd9ed3f7635f6e7c6ce50-ba4697c9845b4b24-00", + "User-Agent": "azsdk-net-Communication.JobRouter/1.0.0-alpha.20230725.1 (.NET 7.0.9; Microsoft Windows 10.0.22621)", + "x-ms-client-request-id": "068d0547f3870acd4b3129c4f65de313", + "x-ms-content-sha256": "Sanitized", + "x-ms-date": "Tue, 25 Jul 2023 15:17:08 GMT", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "queueAssignments": { + "EC85B61EEF33F2C36F99C3754872E9BF8DB5FB8DB0FCC4EAC1": null + }, + "labels": { + "test_label_1": null, + "test_label_2": 12 + }, + "tags": { + "test_tag_1": null, + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Chat_Channel": null, + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "availableForOffers": false + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2021-04-07-preview1, 2022-07-18-preview", + "Content-Type": "application/json; charset=utf-8", + "Date": "Tue, 25 Jul 2023 15:17:07 GMT", + "ETag": "\u002200000004-0000-0000-9f10-6236228ddb08\u0022", + "Last-Modified": "Tue, 25 Jul 2023 15:17:08 GMT", + "trace-id": "65a8c868-300b-d9ed-3f76-35f6e7c6ce50", + "Transfer-Encoding": "chunked", + "X-Azure-Ref": "0c\u002Be/ZAAAAADQn41NUk49SaxbPVXR\u002Bc4eWVRPMjIxMDkwODIwMDMzAGNjOTI3NThkLTA1ZjctNGFkNi1hYTVlLTBmYTk3MThkODk4NQ==", + "X-Cache": "CONFIG_NOCACHE" + }, + "ResponseBody": { + "id": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "state": "inactive", + "queueAssignments": {}, + "totalCapacity": 100, + "labels": { + "Id": "5281EF1C64BF94E9157C17C511A503D60942574DDF8F3DB0CB", + "test_label_2": 12 + }, + "tags": { + "test_tag_2": 12 + }, + "channelConfigurations": { + "ACS_Voice_Channel": { + "capacityCostPerJob": 10, + "maxNumberOfJobs": 3 + } + }, + "offers": [], + "assignedJobs": [], + "loadRatio": 0, + "availableForOffers": false + } + } + ], + "Variables": { + "COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING": "endpoint=https://sanitized.communication.azure.com/;accesskey=Kg==", + "id-prefix": "sdk-RKj4x_1dckSw6ft2Lkf8Xw-", + "RandomSeed": "176299528" + } +}