diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs
index 4ad820aa28e4..c1ee935411bd 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs
@@ -12,26 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.IO;
using System.Linq;
using System.Net;
-using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.Batch;
-using Microsoft.Azure.Batch.Common;
using Microsoft.Azure.Batch.Protocol;
-using Microsoft.Azure.Commands.Batch.Models;
-using Microsoft.Azure.Commands.Batch.Test.ScenarioTests;
-using Microsoft.Azure.Management.Batch;
using Microsoft.Azure.Management.Batch.Models;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
-using Microsoft.Azure.Management.Resources;
-using Microsoft.Azure.Management.Resources.Models;
-using Microsoft.Azure.Test.HttpRecorder;
-using Microsoft.WindowsAzure.Storage.Shared.Protocol;
using Xunit;
using ProxyModels = Microsoft.Azure.Batch.Protocol.Models;
@@ -114,16 +104,22 @@ public static void AssertBatchAccountContextsAreEqual(BatchAccountContext contex
/// Creates a RequestInterceptor that does not contact the Batch Service but instead uses the supplied response body.
///
/// The response the interceptor should return. If none is specified, then a new instance of the response type is instantiated.
+ /// An action to perform on the request.
/// The type of the request parameters.
/// The type of the expected response.
- public static RequestInterceptor CreateNoOpInterceptor(TResponse responseToUse = null)
+ public static RequestInterceptor CreateFakeServiceResponseInterceptor(TResponse responseToUse = null,
+ Action> requestAction = null)
where TParameters : ProxyModels.BatchParameters
where TResponse : ProxyModels.BatchOperationResponse, new()
{
RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
{
- BatchRequest request =
- (BatchRequest)baseRequest;
+ BatchRequest request = (BatchRequest)baseRequest;
+
+ if (requestAction != null)
+ {
+ requestAction(request);
+ }
request.ServiceRequestFunc = (cancellationToken) =>
{
@@ -140,12 +136,12 @@ public static RequestInterceptor CreateNoOpInterceptor(T
/// The interceptor must handle both request types since it's possible for one OM node file method to perform both REST APIs.
///
/// The name of the file to put in the response body.
- public static RequestInterceptor CreateNoOpGetFileAndPropertiesInterceptor(string fileName)
+ public static RequestInterceptor CreateFakGetFileAndPropertiesResponseInterceptor(string fileName)
{
RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
{
BatchRequest fileRequest = baseRequest as
- BatchRequest;
+ BatchRequest;
if (fileRequest != null)
{
@@ -401,6 +397,106 @@ public static ProxyModels.NodeFileListResponse CreateNodeFileListResponse(IEnume
return response;
}
+ ///
+ /// Fabricates a CloudJob that's in the bound state
+ ///
+ public static CloudJob CreateFakeBoundJob(BatchAccountContext context)
+ {
+ string jobId = "testJob";
+
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ ProxyModels.CloudJobGetResponse response = new ProxyModels.CloudJobGetResponse();
+ response.Job = new ProxyModels.CloudJob(jobId, new ProxyModels.PoolInformation());
+
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+
+ return context.BatchOMClient.JobOperations.GetJob(jobId, additionalBehaviors: new BatchClientBehavior[] { interceptor });
+ }
+
+ ///
+ /// Fabricates a CloudJobSchedule that's in the bound state
+ ///
+ public static CloudJobSchedule CreateFakeBoundJobSchedule(BatchAccountContext context)
+ {
+ string jobScheduleId = "testJobSchedule";
+
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ ProxyModels.CloudJobScheduleGetResponse response = new ProxyModels.CloudJobScheduleGetResponse();
+ response.JobSchedule = new ProxyModels.CloudJobSchedule(jobScheduleId, new ProxyModels.Schedule(), new ProxyModels.JobSpecification());
+
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+
+ return context.BatchOMClient.JobScheduleOperations.GetJobSchedule(jobScheduleId, additionalBehaviors: new BatchClientBehavior[] { interceptor });
+ }
+
+ ///
+ /// Fabricates a CloudPool that's in the bound state
+ ///
+ public static CloudPool CreateFakeBoundPool(BatchAccountContext context)
+ {
+ string poolId = "testPool";
+
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ ProxyModels.CloudPoolGetResponse response = new ProxyModels.CloudPoolGetResponse();
+ response.Pool = new ProxyModels.CloudPool(poolId, "small", "4");
+
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+
+ return context.BatchOMClient.PoolOperations.GetPool(poolId, additionalBehaviors: new BatchClientBehavior[] { interceptor });
+ }
+
+ ///
+ /// Fabricates a CloudTask that's in the bound state
+ ///
+ public static CloudTask CreateFakeBoundTask(BatchAccountContext context)
+ {
+ string taskId = "testTask";
+
+ RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
+ {
+ BatchRequest request =
+ (BatchRequest)baseRequest;
+
+ request.ServiceRequestFunc = (cancellationToken) =>
+ {
+ ProxyModels.CloudTaskGetResponse response = new ProxyModels.CloudTaskGetResponse();
+ response.Task = new ProxyModels.CloudTask(taskId, "cmd /c dir /s");
+
+ Task task = Task.FromResult(response);
+ return task;
+ };
+ });
+
+ return context.BatchOMClient.JobOperations.GetTask("jobId", taskId, additionalBehaviors: new BatchClientBehavior[] { interceptor });
+ }
+
///
/// Uses Reflection to set a property value on an object. Can be used to bypass restricted set accessors.
///
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
index 43152a12633a..664581e3a36e 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Commands.Batch.Test.csproj
@@ -178,17 +178,20 @@
+
+
+
@@ -196,6 +199,7 @@
+
@@ -220,6 +224,7 @@
+
@@ -311,6 +316,9 @@
Always
+
+ Always
+
Always
@@ -395,6 +403,9 @@
Always
+
+ Always
+
Always
@@ -428,6 +439,9 @@
Always
+
+ Always
+
Always
@@ -485,6 +499,9 @@
PreserveNewest
+
+ Always
+
Always
@@ -512,6 +529,9 @@
Always
+
+ Always
+
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs
index dd8be1685bb9..460c990c4a53 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/NewBatchComputeNodeUserCommandTests.cs
@@ -62,7 +62,7 @@ public void NewBatchComputeNodeUserParametersTest()
cmdlet.Password = "Password1234";
// Don't go to the service on an Add ComputeNodeUser call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs
index c6a7400f2446..2eca0e574188 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/RemoveBatchComputeNodeUserCommandTests.cs
@@ -61,7 +61,7 @@ public void RemoveBatchComputeNodeUserParametersTest()
cmdlet.Name = "testUser";
// Don't go to the service on a Delete ComputeNodeUser call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs
new file mode 100644
index 000000000000..4e47b5dfee99
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodeUsers/SetBatchComputeNoderUserCommandTests.cs
@@ -0,0 +1,103 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Threading.Tasks;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Collections.Generic;
+using System.Management.Automation;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.ComputeNodeUsers
+{
+ public class SetBatchComputeNodeUserCommandTests
+ {
+ private SetBatchComputeNodeUserCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public SetBatchComputeNodeUserCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new SetBatchComputeNodeUserCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetBatchComputeNodeUserParametersTest()
+ {
+ // Setup cmdlet without the required parameters
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.PoolId = "testPool";
+ cmdlet.ComputeNodeId = "computeNode1";
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.Name = "testUser";
+
+ // Don't go to the service on an Update ComputeNodeUser call
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ // Verify no exceptions when required parameters are set
+ cmdlet.ExecuteCmdlet();
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetBatchComputeNodeUserRequestTest()
+ {
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+ cmdlet.PoolId = "testPool";
+ cmdlet.ComputeNodeId = "computeNode1";
+ cmdlet.Name = "testUser";
+ cmdlet.Password = "Password1234";
+ cmdlet.ExpiryTime = DateTime.Now.AddDays(1);
+
+ string requestPassword = null;
+ DateTime requestExpiryTime = DateTime.Now;
+
+ // Don't go to the service on an Update ComputeNodeUser call
+ Action> extractUserUpdateParametersAction =
+ (request) =>
+ {
+ requestPassword = request.TypedParameters.Password;
+ requestExpiryTime = request.TypedParameters.ExpiryTime.Value;
+ };
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(requestAction: extractUserUpdateParametersAction);
+ cmdlet.AdditionalBehaviors = new List() { interceptor };
+
+ cmdlet.ExecuteCmdlet();
+
+ // Verify the request parameters match expectations
+ Assert.Equal(cmdlet.Password, requestPassword);
+ Assert.Equal(cmdlet.ExpiryTime, requestExpiryTime);
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs
index bc50b520cb26..d4c9999bb166 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/GetBatchComputeNodeCommandTests.cs
@@ -56,7 +56,7 @@ public void GetBatchComputeNodeTest()
// Build a compute node instead of querying the service on a Get ComputeNode call
ComputeNodeGetResponse response = BatchTestHelpers.CreateComputeNodeGetResponse(cmdlet.Id);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -85,7 +85,7 @@ public void ListBatchComputeNodesByODataFilterTest()
// Build some compute nodes instead of querying the service on a List ComputeNodes call
ComputeNodeListResponse response = BatchTestHelpers.CreateComputeNodeListResponse(idsOfConstructedComputeNodes);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -122,7 +122,7 @@ public void ListBatchComputeNodesWithoutFiltersTest()
// Build some compute nodes instead of querying the service on a List ComputeNodes call
ComputeNodeListResponse response = BatchTestHelpers.CreateComputeNodeListResponse(idsOfConstructedComputeNodes);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -164,7 +164,7 @@ public void ListComputeNodesMaxCountTest()
// Build some compute nodes instead of querying the service on a List ComputeNodes call
ComputeNodeListResponse response = BatchTestHelpers.CreateComputeNodeListResponse(idsOfConstructedComputeNodes);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs
index 93ff5dee6f11..8df0bc630cab 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/ResetBatchComputeNodeCommandTests.cs
@@ -61,7 +61,7 @@ public void ResetBatchComputeNodeParametersTest()
cmdlet.Id = "computeNode1";
// Don't go to the service on a Reimage ComputeNode call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs
index fb44eb63feaf..912727edec42 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ComputeNodes/RestartBatchComputeNodeCommandTests.cs
@@ -61,7 +61,7 @@ public void RestartBatchComputeNodeParametersTest()
cmdlet.Id = "computeNode1";
// Don't go to the service on a Reboot ComputeNode call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs
index 3751e165b1f0..9e620de46633 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileCommandTests.cs
@@ -59,7 +59,7 @@ public void GetBatchNodeFileByTaskParametersTest()
// Build a NodeFile instead of querying the service on a List NodeFile call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(new string[] {cmdlet.Name});
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
Assert.Throws(() => cmdlet.ExecuteCmdlet());
@@ -92,7 +92,7 @@ public void GetBatchNodeFileByTaskTest()
// Build a NodeFile instead of querying the service on a Get NodeFile Properties call
NodeFileGetPropertiesResponse response = BatchTestHelpers.CreateNodeFileGetPropertiesResponse(cmdlet.Name);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -122,7 +122,7 @@ public void ListBatchNodeFilesByTaskByODataFilterTest()
// Build some NodeFiles instead of querying the service on a List NodeFiles call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(namesOfConstructedNodeFiles);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -160,7 +160,7 @@ public void ListBatchNodeFilesByTaskWithoutFiltersTest()
// Build some NodeFiles instead of querying the service on a List NodeFiles call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(namesOfConstructedNodeFiles);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -203,7 +203,7 @@ public void ListNodeFilesByTaskMaxCountTest()
// Build some NodeFiles instead of querying the service on a List NodeFiles call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(namesOfConstructedNodeFiles);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -240,7 +240,7 @@ public void GetBatchNodeFileByComputeNodeParametersTest()
// Build a NodeFile instead of querying the service on a List NodeFile call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(new string[] {cmdlet.Name});
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
Assert.Throws(() => cmdlet.ExecuteCmdlet());
@@ -266,7 +266,7 @@ public void GetBatchNodeFileByComputeNodeTest()
// Build a NodeFile instead of querying the service on a Get NodeFile Properties call
NodeFileGetPropertiesResponse response = BatchTestHelpers.CreateNodeFileGetPropertiesResponse(cmdlet.Name);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -296,7 +296,7 @@ public void ListBatchNodeFilesByComputeNodeByODataFilterTest()
// Build some NodeFiles instead of querying the service on a List NodeFiles call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(namesOfConstructedNodeFiles);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -334,7 +334,7 @@ public void ListBatchNodeFilesByComputeNodeWithoutFiltersTest()
// Build some NodeFiles instead of querying the service on a List NodeFiles call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(namesOfConstructedNodeFiles);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -377,7 +377,7 @@ public void ListNodeFilesByComputeNodeMaxCountTest()
// Build some NodeFiles instead of querying the service on a List NodeFiles call
NodeFileListResponse response = BatchTestHelpers.CreateNodeFileListResponse(namesOfConstructedNodeFiles);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs
index b64b0d0c7743..4862ecba06ef 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchNodeFileContentCommandTests.cs
@@ -58,7 +58,7 @@ public void GetBatchNodeFileByTaskParametersTest()
string fileName = "stdout.txt";
// Don't go to the service on a Get NodeFile call or Get NodeFile Properties call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpGetFileAndPropertiesInterceptor(cmdlet.Name);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakGetFileAndPropertiesResponseInterceptor(cmdlet.Name);
cmdlet.AdditionalBehaviors = new List() { interceptor };
using (MemoryStream memStream = new MemoryStream())
@@ -94,7 +94,7 @@ public void GetBatchNodeFileByComputeNodeContentParametersTest()
string fileName = "startup\\stdout.txt";
// Don't go to the service on a Get NodeFile call or Get NodeFile Properties call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpGetFileAndPropertiesInterceptor(cmdlet.Name);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakGetFileAndPropertiesResponseInterceptor(cmdlet.Name);
cmdlet.AdditionalBehaviors = new List() { interceptor };
using (MemoryStream memStream = new MemoryStream())
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs
index 30a2f289f43d..77b8077811c3 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Files/GetBatchRemoteDesktopProtocolFileCommandTests.cs
@@ -56,7 +56,7 @@ public void GetBatchRemoteDesktopProtocolFileParametersTest()
cmdlet.DestinationPath = null;
// Don't go to the service on a Get ComputeNode Remote Desktop call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
using (MemoryStream memStream = new MemoryStream())
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs
index a3064ccfb000..416326ad61eb 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/DisableBatchJobScheduleCommandTests.cs
@@ -55,7 +55,7 @@ public void DisableJobScheduleParametersTest()
cmdlet.Id = "testJobSchedule";
// Don't go to the service on a Disable CloudJobSchedule call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs
index 487e4dabc89e..5279e7b6f503 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/EnableBatchJobScheduleCommandTests.cs
@@ -56,7 +56,7 @@ public void EnableJobScheduleParametersTest()
cmdlet.Id = "testJobSchedule";
// Don't go to the service on an Enable CloudJobSchedule call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs
index 93edb04cec5a..0f18fed55185 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/GetBatchJobScheduleCommandTests.cs
@@ -55,7 +55,7 @@ public void GetBatchJobScheduleTest()
// Build a CloudJobSchedule instead of querying the service on a Get CloudJobSchedule call
CloudJobScheduleGetResponse response = BatchTestHelpers.CreateCloudJobScheduleGetResponse(cmdlet.Id);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -83,7 +83,7 @@ public void ListBatchJobScheduleByODataFilterTest()
// Build some CloudJobSchedules instead of querying the service on a List CloudJobSchedules call
CloudJobScheduleListResponse response = BatchTestHelpers.CreateCloudJobScheduleListResponse(idsOfConstructedJobSchedules);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -119,7 +119,7 @@ public void ListBatchJobSchedulesWithoutFiltersTest()
// Build some CloudJobSchedules instead of querying the service on a List CloudJobSchedules call
CloudJobScheduleListResponse response = BatchTestHelpers.CreateCloudJobScheduleListResponse(idsOfConstructedJobSchedules);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -160,7 +160,7 @@ public void ListJobSchedulesMaxCountTest()
// Build some CloudJobSchedules instead of querying the service on a List CloudJobSchedules call
CloudJobScheduleListResponse response = BatchTestHelpers.CreateCloudJobScheduleListResponse(idsOfConstructedJobSchedules);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs
index 7c83018e061b..019de849c7be 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/NewBatchJobScheduleCommandTests.cs
@@ -55,7 +55,7 @@ public void NewBatchJobScheduleParametersTest()
cmdlet.Id = "testJobSchedule";
// Don't go to the service on an Add CloudJobSchedule call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs
index b2398a33c8f5..5193ced0d128 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/RemoveBatchJobScheduleCommandTests.cs
@@ -59,7 +59,7 @@ public void RemoveBatchJobScheduleParametersTest()
cmdlet.Id = "testJobSchedule";
// Don't go to the service on a Delete CloudJobSchedule call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs
new file mode 100644
index 000000000000..d24ea2f4cd2a
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/SetBatchJobScheduleCommandTests.cs
@@ -0,0 +1,64 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Management.Automation;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.JobSchedules
+{
+ public class SetBatchJobScheduleCommandTests
+ {
+ private SetBatchJobScheduleCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public SetBatchJobScheduleCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new SetBatchJobScheduleCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetBatchJobScheduleParametersTest()
+ {
+ // Setup cmdlet without the required parameters
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.JobSchedule = new PSCloudJobSchedule(BatchTestHelpers.CreateFakeBoundJobSchedule(context));
+
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
+ cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor };
+
+ // Verify that no exceptions occur
+ cmdlet.ExecuteCmdlet();
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs
index 58922ca34a39..4ad66f16d723 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/JobSchedules/StopBatchJobScheduleCommandTests.cs
@@ -55,7 +55,7 @@ public void StopJobScheduleParametersTest()
cmdlet.Id = "testJobSchedule";
// Don't go to the service on a Terminate CloudJobSchedule call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs
index 0687853dd13f..81aa5ecc9a9d 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/DisableBatchJobCommandTests.cs
@@ -21,7 +21,6 @@
using Moq;
using System.Collections.Generic;
using System.Management.Automation;
-using System.Threading.Tasks;
using Xunit;
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
@@ -58,7 +57,7 @@ public void DisableJobParametersTest()
cmdlet.DisableJobOption = DisableJobOption.Terminate;
// Don't go to the service on a Disable CloudJob call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
@@ -78,22 +77,13 @@ public void DisableJobRequestTest()
cmdlet.Id = "testJob";
cmdlet.DisableJobOption = disableOption;
- // Don't go to the service on an Enable AutoScale call
- RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
- {
- BatchRequest request =
- (BatchRequest)baseRequest;
-
- // Grab the disable option off the outgoing request.
- requestDisableOption = request.TypedParameters.DisableJobOption;
-
- request.ServiceRequestFunc = (cancellationToken) =>
+ // Don't go to the service on a Disable CloudJob call
+ Action> extractDisableOptionAction =
+ (request) =>
{
- CloudJobDisableResponse response = new CloudJobDisableResponse();
- Task task = Task.FromResult(response);
- return task;
+ requestDisableOption = request.TypedParameters.DisableJobOption;
};
- });
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(requestAction: extractDisableOptionAction);
cmdlet.AdditionalBehaviors = new List() { interceptor };
cmdlet.ExecuteCmdlet();
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs
index 2f7e9c5435b9..6f423362a7b0 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/EnableBatchJobCommandTests.cs
@@ -55,7 +55,7 @@ public void EnableJobParametersTest()
cmdlet.Id = "testJob";
// Don't go to the service on an Enable CloudJob call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs
index d1b1a2488ef0..8711daf704a4 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/GetBatchJobCommandTests.cs
@@ -55,7 +55,7 @@ public void GetBatchJobTest()
// Build a CloudJob instead of querying the service on a Get CloudJob call
CloudJobGetResponse response = BatchTestHelpers.CreateCloudJobGetResponse(cmdlet.Id);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -84,7 +84,7 @@ public void ListBatchJobsByODataFilterTest()
// Build some CloudJobs instead of querying the service on a List CloudJobs call
CloudJobListResponse response = BatchTestHelpers.CreateCloudJobListResponse(idsOfConstructedJobs);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -121,7 +121,7 @@ public void ListBatchJobsWithoutFiltersTest()
// Build some CloudJobs instead of querying the service on a List CloudJobs call
CloudJobListResponse response = BatchTestHelpers.CreateCloudJobListResponse(idsOfConstructedJobs);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -163,7 +163,7 @@ public void ListJobsMaxCountTest()
// Build some CloudJobs instead of querying the service on a List CloudJobs call
CloudJobListResponse response = BatchTestHelpers.CreateCloudJobListResponse(idsOfConstructedJobs);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs
index 270d4fdf20be..2c69a1fe4c38 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/NewBatchJobCommandTests.cs
@@ -55,7 +55,7 @@ public void NewBatchJobParametersTest()
cmdlet.Id = "testJob";
// Don't go to the service on an Add CloudJob call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs
index 23a561df6363..77f41c41c178 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/RemoveBatchJobCommandTests.cs
@@ -59,7 +59,7 @@ public void RemoveBatchJobParametersTest()
cmdlet.Id = "job-1";
// Don't go to the service on a Delete CloudJob call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs
new file mode 100644
index 000000000000..e54a2543ec4e
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/SetBatchJobCommandTests.cs
@@ -0,0 +1,64 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Management.Automation;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.Jobs
+{
+ public class SetBatchJobCommandTests
+ {
+ private SetBatchJobCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public SetBatchJobCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new SetBatchJobCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetBatchJobParametersTest()
+ {
+ // Setup cmdlet without the required parameters
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.Job = new PSCloudJob(BatchTestHelpers.CreateFakeBoundJob(context));
+
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
+ cmdlet.AdditionalBehaviors = new BatchClientBehavior[] {interceptor};
+
+ // Verify that no exceptions occur
+ cmdlet.ExecuteCmdlet();
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs
index 90f57972cccb..0a099508bb41 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Jobs/StopBatchJobCommandTests.cs
@@ -20,7 +20,6 @@
using Moq;
using System.Collections.Generic;
using System.Management.Automation;
-using System.Threading.Tasks;
using Xunit;
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
@@ -56,7 +55,7 @@ public void StopJobParametersTest()
cmdlet.Id = "testJob";
// Don't go to the service on a Terminate CloudJob call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
@@ -77,21 +76,12 @@ public void StopJobRequestTest()
cmdlet.TerminateReason = terminateReason;
// Don't go to the service on a Terminate CloudJob call
- RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
- {
- BatchRequest request =
- (BatchRequest)baseRequest;
-
- // Grab the terminate reason off the outgoing request
- requestTerminateReason = request.TypedParameters.TerminateReason;
-
- request.ServiceRequestFunc = (cancellationToken) =>
+ Action> extractTerminateReasponAction =
+ (request) =>
{
- CloudJobTerminateResponse response = new CloudJobTerminateResponse();
- Task task = Task.FromResult(response);
- return task;
+ requestTerminateReason = request.TypedParameters.TerminateReason;
};
- });
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(requestAction: extractTerminateReasponAction);
cmdlet.AdditionalBehaviors = new List() { interceptor };
cmdlet.ExecuteCmdlet();
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs
index 8d91defea029..be27c988687c 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/DisableBatchAutoScaleCommandTests.cs
@@ -55,7 +55,7 @@ public void DisableAutoScaleParametersTest()
cmdlet.Id = "testPool";
// Don't go to the service on an Disable AutoScale call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs
index 1f9c1611a5ec..9ce1294d31de 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/EnableBatchAutoScaleCommandTests.cs
@@ -20,7 +20,6 @@
using Moq;
using System.Collections.Generic;
using System.Management.Automation;
-using System.Threading.Tasks;
using Xunit;
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
@@ -60,7 +59,7 @@ public void EnableAutoScaleParametersTest()
cmdlet.AutoScaleFormula = "formula";
// Don't go to the service on an Enable AutoScale call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
@@ -81,21 +80,12 @@ public void EnableAutoScaleRequestTest()
cmdlet.AutoScaleFormula = formula;
// Don't go to the service on an Enable AutoScale call
- RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
- {
- BatchRequest request =
- (BatchRequest)baseRequest;
-
- // Grab the formula off the outgoing request
- requestFormula = request.TypedParameters.AutoScaleFormula;
-
- request.ServiceRequestFunc = (cancellationToken) =>
+ Action> extractFormulaAction =
+ (request) =>
{
- CloudPoolEnableAutoScaleResponse response = new CloudPoolEnableAutoScaleResponse();
- Task task = Task.FromResult(response);
- return task;
+ requestFormula = request.TypedParameters.AutoScaleFormula;
};
- });
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(requestAction: extractFormulaAction);
cmdlet.AdditionalBehaviors = new List() { interceptor };
cmdlet.ExecuteCmdlet();
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs
index 24b905f7a4df..6604ce3a489b 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/GetBatchPoolCommandTests.cs
@@ -55,7 +55,7 @@ public void GetBatchPoolTest()
// Build a CloudPool instead of querying the service on a Get CloudPool call
CloudPoolGetResponse response = BatchTestHelpers.CreateCloudPoolGetResponse(cmdlet.Id);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -83,7 +83,7 @@ public void ListBatchPoolByODataFilterTest()
// Build some CloudPools instead of querying the service on a List CloudPools call
CloudPoolListResponse response = BatchTestHelpers.CreateCloudPoolListResponse(idsOfConstructedPools);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -119,7 +119,7 @@ public void ListBatchPoolWithoutFiltersTest()
// Build some CloudPools instead of querying the service on a List CloudPools call
CloudPoolListResponse response = BatchTestHelpers.CreateCloudPoolListResponse(idsOfConstructedPools);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -160,7 +160,7 @@ public void ListPoolsMaxCountTest()
// Build some CloudPools instead of querying the service on a List CloudPools call
CloudPoolListResponse response = BatchTestHelpers.CreateCloudPoolListResponse(idsOfConstructedPools);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs
index b56337a06acd..a6fe62afe584 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/NewBatchPoolCommandTests.cs
@@ -57,7 +57,7 @@ public void NewBatchPoolParametersTest()
cmdlet.OSFamily = "4";
// Don't go to the service on an Add CloudPool call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs
index 2a03fd3c857e..6e46a6acae83 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/RemoveBatchPoolCommandTests.cs
@@ -59,7 +59,7 @@ public void RemoveBatchPoolParametersTest()
cmdlet.Id = "testPool";
// Don't go to the service on a Delete CloudPool call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs
new file mode 100644
index 000000000000..5a4a7836293c
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolCommandTests.cs
@@ -0,0 +1,64 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Management.Automation;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.Pools
+{
+ public class SetBatchPoolCommandTests
+ {
+ private SetBatchPoolCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public SetBatchPoolCommandTests()
+ {
+ batchClientMock = new Mock();
+ commandRuntimeMock = new Mock();
+ cmdlet = new SetBatchPoolCommand()
+ {
+ CommandRuntime = commandRuntimeMock.Object,
+ BatchClient = batchClientMock.Object,
+ };
+ }
+
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void SetBatchPoolParametersTest()
+ {
+ // Setup cmdlet without the required parameters
+ BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();
+ cmdlet.BatchContext = context;
+
+ Assert.Throws(() => cmdlet.ExecuteCmdlet());
+
+ cmdlet.Pool = new PSCloudPool(BatchTestHelpers.CreateFakeBoundPool(context));
+
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
+ cmdlet.AdditionalBehaviors = new BatchClientBehavior[] { interceptor };
+
+ // Verify that no exceptions occur
+ cmdlet.ExecuteCmdlet();
+ }
+ }
+}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs
index b1130243ad23..13c490f90342 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/SetBatchPoolOSVersionCommandTests.cs
@@ -60,7 +60,7 @@ public void SetPoolOSVersionParametersTest()
cmdlet.TargetOSVersion = "targetOS";
// Don't go to the service on an Upgrade OS call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs
index 5fb517cd1eea..83e9a0001c79 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StartBatchPoolResizeCommandTests.cs
@@ -55,7 +55,7 @@ public void StartPoolResizeParametersTest()
cmdlet.Id = "testPool";
// Don't go to the service on a Resize CloudPool call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs
index 44897d23cb55..24abb03d74ed 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/StopBatchPoolResizeCommandTests.cs
@@ -55,7 +55,7 @@ public void StopPoolResizeParametersTest()
cmdlet.Id = "testPool";
// Don't go to the service on a StopResize CloudPool call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs
index b19496a91359..a425e53cdad3 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Pools/TestBatchAutoScaleCommandTests.cs
@@ -20,7 +20,6 @@
using Moq;
using System.Collections.Generic;
using System.Management.Automation;
-using System.Threading.Tasks;
using Xunit;
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
@@ -60,7 +59,7 @@ public void TestAutoScaleParametersTest()
cmdlet.AutoScaleFormula = "formula";
// Don't go to the service on an Evaluate AutoScale call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameter is set
@@ -81,21 +80,12 @@ public void TestAutoScaleRequestTest()
cmdlet.AutoScaleFormula = formula;
// Don't go to the service on an Evaluate AutoScale call
- RequestInterceptor interceptor = new RequestInterceptor((baseRequest) =>
- {
- BatchRequest request =
- (BatchRequest)baseRequest;
-
- // Grab the formula off the outgoing request.
- requestFormula = request.TypedParameters.AutoScaleFormula;
-
- request.ServiceRequestFunc = (cancellationToken) =>
+ Action> extractFormulaAction =
+ (request) =>
{
- CloudPoolEvaluateAutoScaleResponse response = new CloudPoolEvaluateAutoScaleResponse();
- Task task = Task.FromResult(response);
- return task;
+ requestFormula = request.TypedParameters.AutoScaleFormula;
};
- });
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(requestAction: extractFormulaAction);
cmdlet.AdditionalBehaviors = new List() { interceptor };
cmdlet.ExecuteCmdlet();
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs
index 6f38bbd48e02..f838953cab6d 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.cs
@@ -72,6 +72,30 @@ public void TestCreateComputeNodeUserPipeline()
}
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestUpdateComputeNodeUser()
+ {
+ BatchController controller = BatchController.NewInstance;
+ BatchAccountContext context = null;
+ string computeNodeId = null;
+ string userName = "updateuser";
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-UpdateComputeNodeUser '{0}' '{1}' '{2}' '{3}'", accountName, poolId, computeNodeId, userName) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName);
+ computeNodeId = ScenarioTestHelpers.GetComputeNodeId(controller, context, poolId);
+ ScenarioTestHelpers.CreateComputeNodeUser(controller, context, poolId, computeNodeId, userName);
+ },
+ () =>
+ {
+ ScenarioTestHelpers.DeleteComputeNodeUser(controller, context, poolId, computeNodeId, userName);
+ },
+ TestUtilities.GetCallingClass(),
+ TestUtilities.GetCurrentMethodName());
+ }
+
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDeleteComputeNodeUser()
@@ -114,4 +138,14 @@ protected override void ProcessRecord()
base.ProcessRecord();
}
}
+
+ [Cmdlet(VerbsCommon.Set, "AzureBatchComputeNodeUser_ST")]
+ public class SetBatchComputeNodeUserScenarioTestCommand : SetBatchComputeNodeUserCommand
+ {
+ protected override void ProcessRecord()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ProcessRecord();
+ }
+ }
}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1
index 9c6d105662c9..84bcc3faacfe 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ComputeNodeUserTests.ps1
@@ -41,6 +41,21 @@ function Test-CreateComputeNodeUser
Remove-AzureBatchComputeNodeUser_ST -PoolId $poolId -ComputeNodeId $computeNodeId -Name $userName -Force -BatchContext $context
}
+<#
+.SYNOPSIS
+Tests updating a compute node user
+#>
+function Test-UpdateComputeNodeUser
+{
+ param([string]$accountName, [string]$poolId, [string]$computeNodeId, [string]$userName)
+
+ $context = Get-AzureRMBatchAccountKeys -Name $accountName
+
+ # Basically just validating that we can set the parameters and execute the cmdlet without error.
+ # If a Get user API is added, we can validate that the properties were actually updated.
+ Set-AzureBatchComputeNodeUser_ST $poolId $computeNodeId $userName "Abcdefghijk1234!" -ExpiryTime ([DateTime]::Now.AddDays(5)) -BatchContext $context
+}
+
<#
.SYNOPSIS
Tests deleting a compute node user
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs
index 48042073901e..dd55ac4e7984 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.cs
@@ -144,6 +144,29 @@ public void TestListAllJobSchedules()
TestUtilities.GetCurrentMethodName());
}
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestUpdateJobSchedule()
+ {
+ BatchController controller = BatchController.NewInstance;
+ string jobScheduleId = "testUpdateJobSchedule";
+
+ BatchAccountContext context = null;
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-UpdateJobSchedule '{0}' '{1}'", accountName, jobScheduleId) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName);
+ ScenarioTestHelpers.CreateTestJobSchedule(controller, context, jobScheduleId, null);
+ },
+ () =>
+ {
+ ScenarioTestHelpers.DeleteJobSchedule(controller, context, jobScheduleId);
+ },
+ TestUtilities.GetCallingClass(),
+ TestUtilities.GetCurrentMethodName());
+ }
+
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDeleteJobSchedule()
@@ -302,4 +325,14 @@ protected override void ProcessRecord()
base.ProcessRecord();
}
}
+
+ [Cmdlet(VerbsCommon.Set, "AzureBatchJobSchedule_ST")]
+ public class SetBatchJobScheduleScenarioTestCommand : SetBatchJobScheduleCommand
+ {
+ protected override void ProcessRecord()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ProcessRecord();
+ }
+ }
}
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1
index 3b6302c8d25b..7c2539fc277f 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobScheduleTests.ps1
@@ -328,6 +328,252 @@ function Test-ListAllJobSchedules
Assert-AreEqual $count $jobSchedules.Length
}
+<#
+.SYNOPSIS
+Tests updating a job schedule
+#>
+function Test-UpdateJobSchedule
+{
+ param([string]$accountName, [string]$jobScheduleId)
+
+ $context = Get-AzureRMBatchAccountKeys -Name $accountName
+
+ $jobSchedule = Get-AzureBatchJobSchedule_ST $jobScheduleId -BatchContext $context
+
+ # Define new Schedule properties
+ $schedule = New-Object Microsoft.Azure.Commands.Batch.Models.PSSchedule
+ $schedule.DoNotRunUntil = $doNotRunUntil = New-Object DateTime -ArgumentList @(2020,01,01,12,0,0)
+ $schedule.DoNotRunAfter = $doNotRunAfter = New-Object DateTime -ArgumentList @(2025,01,01,12,0,0)
+ $schedule.StartWindow = $startWindow = [TimeSpan]::FromHours(1)
+ $schedule.RecurrenceInterval = $recurrence = [TimeSpan]::FromDays(1)
+
+ # Define new JobSpecification properties
+
+ $startTask = New-Object Microsoft.Azure.Commands.Batch.Models.PSStartTask
+ $startTaskCmd = "cmd /c dir /s"
+ $startTask.CommandLine = $startTaskCmd
+
+ $poolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolSpecification
+ $poolSpec.TargetDedicated = $targetDedicated = 3
+ $poolSpec.VirtualMachineSize = $vmSize = "small"
+ $poolSpec.OSFamily = $osFamily = "4"
+ $poolSpec.TargetOSVersion = $targetOS = "*"
+ $poolSpec.StartTask = $startTask
+
+ $poolSpec.CertificateReferences = new-object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSCertificateReference]
+ $certRef = New-Object Microsoft.Azure.Commands.Batch.Models.PSCertificateReference
+ $certRef.StoreLocation = $storeLocation = ([Microsoft.Azure.Batch.Common.CertStoreLocation]::LocalMachine)
+ $certRef.StoreName = $storeName = "certStore"
+ $certRef.Thumbprint = $thumbprint = "0123456789ABCDEF"
+ $certRef.ThumbprintAlgorithm = $thumbprintAlgorithm = "sha1"
+ $certRef.Visibility = $visibility = ([Microsoft.Azure.Batch.Common.CertificateVisibility]::StartTask)
+ $poolSpec.CertificateReferences.Add($certRef)
+ $certRefCount = $poolSpec.CertificateReferences.Count
+
+ $autoPoolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSAutoPoolSpecification
+ $autoPoolSpec.PoolSpecification = $poolSpec
+ $autoPoolSpec.AutoPoolIdPrefix = $autoPoolIdPrefix = "TestSpecPrefix"
+ $autoPoolSpec.KeepAlive = $keepAlive = $false
+ $autoPoolSpec.PoolLifeTimeOption = $poolLifeTime = ([Microsoft.Azure.Batch.Common.PoolLifeTimeOption]::JobSchedule)
+
+ $poolInfo = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
+ $poolInfo.AutoPoolSpecification = $autoPoolSpec
+
+ $jobMgr = New-Object Microsoft.Azure.Commands.Batch.Models.PSJobManagerTask
+ $jobMgr.CommandLine = $jobMgrCmd = "cmd /c dir /s"
+ $jobMgr.EnvironmentSettings = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting]
+ $env1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "name1","value1"
+ $env2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "name2","value2"
+ $env1Name = $env1.Name
+ $env1Value = $env1.Value
+ $env2Name = $env2.Name
+ $env2Value = $env2.Value
+ $jobMgr.EnvironmentSettings.Add($env1)
+ $jobMgr.EnvironmentSettings.Add($env2)
+ $envCount = $jobMgr.EnvironmentSettings.Count
+ $jobMgr.ResourceFiles = new-object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSResourceFile]
+ $r1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSResourceFile -ArgumentList "https://testacct.blob.core.windows.net/","filePath"
+ $blobSource = $r1.BlobSource
+ $filePath = $r1.FilePath
+ $jobMgr.ResourceFiles.Add($r1)
+ $resourceFileCount = $jobMgr.ResourceFiles.Count
+ $jobMgr.KillJobOnCompletion = $killOnCompletion = $false
+ $jobMgr.Id = $jobMgrId = "jobManager"
+ $jobMgr.DisplayName = $jobMgrDisplay = "jobManagerDisplay"
+ $jobMgr.RunElevated = $runElevated = $false
+ $jobMgrMaxWallClockTime = [TimeSpan]::FromHours(1)
+ $jobMgr.Constraints = New-Object Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints -ArgumentList @($jobMgrMaxWallClockTime,$null,$null)
+
+ $jobPrep = New-Object Microsoft.Azure.Commands.Batch.Models.PSJobPreparationTask
+ $jobPrep.CommandLine = $jobPrepCmd = "cmd /c dir /s"
+ $jobPrep.EnvironmentSettings = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting]
+ $jobPrepEnv1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "jobPrepName1","jobPrepValue1"
+ $jobPrepEnv2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "jobPrepName2","jobPrepValue2"
+ $jobPrepEnv1Name = $jobPrepEnv1.Name
+ $jobPrepEnv1Value = $jobPrepEnv1.Value
+ $jobPrepEnv2Name = $jobPrepEnv2.Name
+ $jobPrepEnv2Value = $jobPrepEnv2.Value
+ $jobPrep.EnvironmentSettings.Add($jobPrepEnv1)
+ $jobPrep.EnvironmentSettings.Add($jobPrepEnv2)
+ $jobPrepEnvCount = $jobPrep.EnvironmentSettings.Count
+ $jobPrep.ResourceFiles = new-object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSResourceFile]
+ $jobPrepR1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSResourceFile -ArgumentList "https://testacct.blob.core.windows.net/","jobPrepFilePath"
+ $jobPrepBlobSource = $jobPrepR1.BlobSource
+ $jobPrepFilePath = $jobPrepR1.FilePath
+ $jobPrep.ResourceFiles.Add($jobPrepR1)
+ $jobPrepResourceFileCount = $jobPrep.ResourceFiles.Count
+ $jobPrep.Id = $jobPrepId = "jobPrep"
+ $jobPrep.RunElevated = $jobPrepRunElevated = $false
+ $jobPrepRetryCount = 2
+ $jobPrep.Constraints = New-Object Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints -ArgumentList @($null,$null,$jobPrepRetryCount)
+
+ $jobRelease = New-Object Microsoft.Azure.Commands.Batch.Models.PSJobReleaseTask
+ $jobRelease.CommandLine = $jobReleaseCmd = "cmd /c dir /s"
+ $jobRelease.EnvironmentSettings = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting]
+ $jobReleaseEnv1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "jobReleaseName1","jobReleaseValue1"
+ $jobReleaseEnv2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "jobReleaseName2","jobReleaseValue2"
+ $jobReleaseEnv1Name = $jobReleaseEnv1.Name
+ $jobReleaseEnv1Value = $jobReleaseEnv1.Value
+ $jobReleaseEnv2Name = $jobReleaseEnv2.Name
+ $jobReleaseEnv2Value = $jobReleaseEnv2.Value
+ $jobRelease.EnvironmentSettings.Add($jobReleaseEnv1)
+ $jobRelease.EnvironmentSettings.Add($jobReleaseEnv2)
+ $jobReleaseEnvCount = $jobRelease.EnvironmentSettings.Count
+ $jobRelease.ResourceFiles = new-object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSResourceFile]
+ $jobReleaseR1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSResourceFile -ArgumentList "https://testacct.blob.core.windows.net/","jobReleaseFilePath"
+ $jobReleaseBlobSource = $jobReleaseR1.BlobSource
+ $jobReleaseFilePath = $jobReleaseR1.FilePath
+ $jobRelease.ResourceFiles.Add($jobReleaseR1)
+ $jobReleaseResourceFileCount = $jobRelease.ResourceFiles.Count
+ $jobRelease.Id = $jobReleaseId = "jobRelease"
+ $jobRelease.RunElevated = $jobReleaseRunElevated = $false
+
+ $jobConstraints = New-Object Microsoft.Azure.Commands.Batch.Models.PSJobConstraints -ArgumentList @([TimeSpan]::FromDays(1),5)
+ $maxWallClockTime = $jobConstraints.MaxWallClockTime
+ $maxTaskRetry = $jobConstraints.MaxTaskRetryCount
+
+ $jobSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSJobSpecification
+ $jobSpec.JobManagerTask = $jobMgr
+ $jobSpec.JobPreparationTask = $jobPrep
+ $jobSpec.JobReleaseTask = $jobRelease
+ $jobSpec.Constraints = $jobConstraints
+ $jobSpec.PoolInformation = $poolInfo
+ $jobSpec.CommonEnvironmentSettings = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting]
+ $commonEnv1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "commonName1","commonValue1"
+ $commonEnv2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "commonName2","commonValue2"
+ $commonEnv1Name = $commonEnv1.Name
+ $commonEnv1Value = $commonEnv1.Value
+ $commonEnv2Name = $commonEnv2.Name
+ $commonEnv2Value = $commonEnv2.Value
+ $jobSpec.CommonEnvironmentSettings.Add($commonEnv1)
+ $jobSpec.CommonEnvironmentSettings.Add($commonEnv2)
+ $commonEnvCount = $jobSpec.CommonEnvironmentSettings.Count
+ $jobSpec.DisplayName = $jobSpecDisplayName = "jobSpecDisplayName"
+ $jobSpec.Priority = $jobSpecPri = 1
+ $jobSpec.Metadata = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSMetadataItem]
+ $jobSpecMeta1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSMetadataItem -ArgumentList "specMeta1","specMetaValue1"
+ $jobSpecMeta2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSMetadataItem -ArgumentList "specMeta2","specMetaValue2"
+ $jobSpecMeta1Name = $jobSpecMeta1.Name
+ $jobSpecMeta1Value = $jobSpecMeta1.Value
+ $jobSpecMeta2Name = $jobSpecMeta2.Name
+ $jobSpecMeta2Value = $jobSpecMeta2.Value
+ $jobSpec.Metadata.Add($jobSpecMeta1)
+ $jobSpec.Metadata.Add($jobSpecMeta2)
+ $jobSpecMetaCount = $jobSpec.Metadata.Count
+
+ # Define new metadata
+ $metadata = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSMetadataItem]
+ $metadataItem1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSMetadataItem -ArgumentList "jobScheduleMeta1","jobScheduleValue1"
+ $metadata.Add($metadataItem1)
+
+ # Update job schedule
+ $jobSchedule.Schedule = $schedule
+ $jobSchedule.JobSpecification = $jobSpec
+ $jobSchedule.Metadata = $metadata
+
+ $jobSchedule | Set-AzureBatchJobSchedule_ST -BatchContext $context
+
+ # Refresh the job schedule to verify it was updated
+ $jobSchedule = Get-AzureBatchJobSchedule_ST -BatchContext $context
+
+ # Verify Schedule was updated
+ Assert-AreEqual $doNotRunUntil $jobSchedule.Schedule.DoNotRunUntil
+ Assert-AreEqual $doNotRunAfter $jobSchedule.Schedule.DoNotRunAfter
+ Assert-AreEqual $recurrence $jobSchedule.Schedule.RecurrenceInterval
+ Assert-AreEqual $startWindow $jobSchedule.Schedule.StartWindow
+
+ Assert-AreEqual $autoPoolIdPrefix $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.AutoPoolIdPrefix
+ Assert-AreEqual $keepAlive $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.KeepAlive
+ Assert-AreEqual $poolLifeTime $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolLifeTimeOption
+ Assert-AreEqual $targetDedicated $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.TargetDedicated
+ Assert-AreEqual $vmSize $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.VirtualMachineSize
+ Assert-AreEqual $osFamily $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.OSFamily
+ Assert-AreEqual $targetOS $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.TargetOSVersion
+ Assert-AreEqual $certRefCount $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.CertificateReferences.Count
+ Assert-AreEqual $storeLocation $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.CertificateReferences[0].StoreLocation
+ Assert-AreEqual $storeName $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.CertificateReferences[0].StoreName
+ Assert-AreEqual $thumbprint $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.CertificateReferences[0].Thumbprint
+ Assert-AreEqual $thumbprintAlgorithm $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.CertificateReferences[0].ThumbprintAlgorithm
+ Assert-AreEqual $visibility $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.CertificateReferences[0].Visibility
+ Assert-AreEqual $startTaskCmd $jobSchedule.JobSpecification.PoolInformation.AutoPoolSpecification.PoolSpecification.StartTask.CommandLine
+ Assert-AreEqual $commonEnvCount $jobSchedule.JobSpecification.CommonEnvironmentSettings.Count
+ Assert-AreEqual $commonEnv1Name $jobSchedule.JobSpecification.CommonEnvironmentSettings[0].Name
+ Assert-AreEqual $commonEnv1Value $jobSchedule.JobSpecification.CommonEnvironmentSettings[0].Value
+ Assert-AreEqual $commonEnv2Name $jobSchedule.JobSpecification.CommonEnvironmentSettings[1].Name
+ Assert-AreEqual $commonEnv2Value $jobSchedule.JobSpecification.CommonEnvironmentSettings[1].Value
+ Assert-AreEqual $jobSpecDisplayName $jobSchedule.JobSpecification.DisplayName
+ Assert-AreEqual $jobMgrCmd $jobSchedule.JobSpecification.JobManagerTask.CommandLine
+ Assert-AreEqual $envCount $jobSchedule.JobSpecification.JobManagerTask.EnvironmentSettings.Count
+ Assert-AreEqual $env1Name $jobSchedule.JobSpecification.JobManagerTask.EnvironmentSettings[0].Name
+ Assert-AreEqual $env1Value $jobSchedule.JobSpecification.JobManagerTask.EnvironmentSettings[0].Value
+ Assert-AreEqual $env2Name $jobSchedule.JobSpecification.JobManagerTask.EnvironmentSettings[1].Name
+ Assert-AreEqual $env2Value $jobSchedule.JobSpecification.JobManagerTask.EnvironmentSettings[1].Value
+ Assert-AreEqual $resourceFileCount $jobSchedule.JobSpecification.JobManagerTask.ResourceFiles.Count
+ Assert-AreEqual $blobSource $jobSchedule.JobSpecification.JobManagerTask.ResourceFiles[0].BlobSource
+ Assert-AreEqual $filePath $jobSchedule.JobSpecification.JobManagerTask.ResourceFiles[0].FilePath
+ Assert-AreEqual $killOnCompletion $jobSchedule.JobSpecification.JobManagerTask.KillJobOnCompletion
+ Assert-AreEqual $jobMgrId $jobSchedule.JobSpecification.JobManagerTask.Id
+ Assert-AreEqual $jobMgrDisplay $jobSchedule.JobSpecification.JobManagerTask.DisplayName
+ Assert-AreEqual $runElevated $jobSchedule.JobSpecification.JobManagerTask.RunElevated
+ Assert-AreEqual $jobMgrMaxWallClockTime $jobSchedule.JobSpecification.JobManagerTask.Constraints.MaxWallClockTime
+ Assert-AreEqual $jobPrepCmd $jobSchedule.JobSpecification.JobPreparationTask.CommandLine
+ Assert-AreEqual $jobPrepEnvCount $jobSchedule.JobSpecification.JobPreparationTask.EnvironmentSettings.Count
+ Assert-AreEqual $jobPrepEnv1Name $jobSchedule.JobSpecification.JobPreparationTask.EnvironmentSettings[0].Name
+ Assert-AreEqual $jobPrepEnv1Value $jobSchedule.JobSpecification.JobPreparationTask.EnvironmentSettings[0].Value
+ Assert-AreEqual $jobPrepEnv2Name $jobSchedule.JobSpecification.JobPreparationTask.EnvironmentSettings[1].Name
+ Assert-AreEqual $jobPrepEnv2Value $jobSchedule.JobSpecification.JobPreparationTask.EnvironmentSettings[1].Value
+ Assert-AreEqual $jobPrepResourceFileCount $jobSchedule.JobSpecification.JobPreparationTask.ResourceFiles.Count
+ Assert-AreEqual $jobPrepBlobSource $jobSchedule.JobSpecification.JobPreparationTask.ResourceFiles[0].BlobSource
+ Assert-AreEqual $jobPrepFilePath $jobSchedule.JobSpecification.JobPreparationTask.ResourceFiles[0].FilePath
+ Assert-AreEqual $jobPrepId $jobSchedule.JobSpecification.JobPreparationTask.Id
+ Assert-AreEqual $jobPrepRunElevated $jobSchedule.JobSpecification.JobPreparationTask.RunElevated
+ Assert-AreEqual $jobPrepRetryCount $jobSchedule.JobSpecification.JobPreparationTask.Constraints.MaxTaskRetryCount
+ Assert-AreEqual $jobReleaseCmd $jobSchedule.JobSpecification.JobReleaseTask.CommandLine
+ Assert-AreEqual $jobReleaseEnvCount $jobSchedule.JobSpecification.JobReleaseTask.EnvironmentSettings.Count
+ Assert-AreEqual $jobReleaseEnv1Name $jobSchedule.JobSpecification.JobReleaseTask.EnvironmentSettings[0].Name
+ Assert-AreEqual $jobReleaseEnv1Value $jobSchedule.JobSpecification.JobReleaseTask.EnvironmentSettings[0].Value
+ Assert-AreEqual $jobReleaseEnv2Name $jobSchedule.JobSpecification.JobReleaseTask.EnvironmentSettings[1].Name
+ Assert-AreEqual $jobReleaseEnv2Value $jobSchedule.JobSpecification.JobReleaseTask.EnvironmentSettings[1].Value
+ Assert-AreEqual $jobReleaseResourceFileCount $jobSchedule.JobSpecification.JobReleaseTask.ResourceFiles.Count
+ Assert-AreEqual $jobReleaseBlobSource $jobSchedule.JobSpecification.JobReleaseTask.ResourceFiles[0].BlobSource
+ Assert-AreEqual $jobReleaseFilePath $jobSchedule.JobSpecification.JobReleaseTask.ResourceFiles[0].FilePath
+ Assert-AreEqual $jobReleaseId $jobSchedule.JobSpecification.JobReleaseTask.Id
+ Assert-AreEqual $jobReleaseRunElevated $jobSchedule.JobSpecification.JobReleaseTask.RunElevated
+ Assert-AreEqual $maxTaskRetry $jobSchedule.JobSpecification.Constraints.MaxTaskRetryCount
+ Assert-AreEqual $maxWallClockTime $jobSchedule.JobSpecification.Constraints.MaxWallClockTime
+ Assert-AreEqual $jobSpecMetaCount $jobSchedule.JobSpecification.Metadata.Count
+ Assert-AreEqual $jobSpecMeta1Name $jobSchedule.JobSpecification.Metadata[0].Name
+ Assert-AreEqual $jobSpecMeta1Value $jobSchedule.JobSpecification.Metadata[0].Value
+ Assert-AreEqual $jobSpecMeta2Name $jobSchedule.JobSpecification.Metadata[1].Name
+ Assert-AreEqual $jobSpecMeta2Value $jobSchedule.JobSpecification.Metadata[1].Value
+ Assert-AreEqual $jobSpecPri $jobSchedule.JobSpecification.Priority
+
+ # Verify Metadata was updated
+ Assert-AreEqual $metadata.Count $jobSchedule.Metadata.Count
+ Assert-AreEqual $metadata[0].Name $jobSchedule.Metadata[0].Name
+ Assert-AreEqual $metadata[0].Value $jobSchedule.Metadata[0].Value
+}
+
<#
.SYNOPSIS
Tests deleting a job schedule
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs
index c2150acd1050..af3e45330fb3 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.cs
@@ -181,6 +181,15 @@ public void TestListJobsUnderSchedule()
TestUtilities.GetCurrentMethodName());
}
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestUpdateJob()
+ {
+ BatchController controller = BatchController.NewInstance;
+ string jobId = "updateJobTest";
+ controller.RunPsTest(string.Format("Test-UpdateJob '{0}' '{1}'", accountName, jobId));
+ }
+
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDeleteJob()
@@ -300,6 +309,16 @@ protected override void ProcessRecord()
}
}
+ [Cmdlet(VerbsCommon.Set, "AzureBatchJob_ST")]
+ public class SetBatchJobScenarioTestCommand : SetBatchJobCommand
+ {
+ protected override void ProcessRecord()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ProcessRecord();
+ }
+ }
+
[Cmdlet(VerbsCommon.Remove, "AzureBatchJob_ST")]
public class RemoveBatchJobScenarioTestCommand : RemoveBatchJobCommand
{
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1
index e57a62071759..041208cfe5a2 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/JobTests.ps1
@@ -325,6 +325,80 @@ function Test-ListJobsUnderSchedule
Assert-AreEqual $jobId $job.Id
}
+<#
+.SYNOPSIS
+Tests updating a job
+#>
+function Test-UpdateJob
+{
+ param([string]$accountName, [string]$jobId)
+
+ $context = Get-AzureRMBatchAccountKeys -Name $accountName
+
+ # Create the job with an auto pool
+ $poolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolSpecification
+ $poolSpec.TargetDedicated = 3
+ $poolSpec.VirtualMachineSize = "small"
+ $poolSpec.OSFamily = "4"
+ $poolSpec.TargetOSVersion = "*"
+ $poolSpec.Metadata = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSMetadataItem]
+ $poolSpecMetaItem = New-Object Microsoft.Azure.Commands.Batch.Models.PSMetadataItem -ArgumentList "meta1","value1"
+ $poolSpec.Metadata.Add($poolSpecMetaItem)
+
+ $autoPoolSpec = New-Object Microsoft.Azure.Commands.Batch.Models.PSAutoPoolSpecification
+ $autoPoolSpec.PoolSpecification = $poolSpec
+ $autoPoolSpec.AutoPoolIdPrefix = $autoPoolIdPrefix = "TestSpecPrefix"
+ $autoPoolSpec.KeepAlive = $keepAlive = $true
+ $autoPoolSpec.PoolLifeTimeOption = ([Microsoft.Azure.Batch.Common.PoolLifeTimeOption]::Job)
+
+ $poolInformation = New-Object Microsoft.Azure.Commands.Batch.Models.PSPoolInformation
+ $poolInformation.AutoPoolSpecification = $autoPoolSpec
+
+ try
+ {
+ New-AzureBatchJob_ST -Id $jobId -PoolInformation $poolInformation -BatchContext $context
+
+ # Update the job. On the PoolInformation property, only the AutoPoolSpecification.KeepAlive property can be updated, and only when the job is Disabled.
+ $job = Get-AzureBatchJob_ST $jobId -BatchContext $context
+ $job | Disable-AzureBatchJob_ST -DisableJobOption Terminate -BatchContext $context
+
+ $priority = 3
+ $newKeepAlive = !$keepAlive
+ $jobConstraints = New-Object Microsoft.Azure.Commands.Batch.Models.PSJobConstraints -ArgumentList @([TimeSpan]::FromDays(1),5)
+ $maxWallClockTime = $jobConstraints.MaxWallClockTime
+ $maxTaskRetry = $jobConstraints.MaxTaskRetryCount
+ $jobMetadata = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSMetadataItem]
+ $jobMetadataItem = New-Object Microsoft.Azure.Commands.Batch.Models.PSMetadataItem -ArgumentList "jobMeta1","jobValue1"
+ $jobMetadata.Add($jobMetadataItem)
+
+ $job.Priority = $priority
+ $job.Constraints = $jobConstraints
+ $job.PoolInformation.AutoPoolSpecification.KeepAlive = $newKeepAlive
+ $job.Metadata = $jobMetadata
+
+ $job | Set-AzureBatchJob_ST -BatchContext $context
+
+ # Verify the job was updated
+ $job = Get-AzureBatchJob_ST -BatchContext $context
+
+ Assert-AreEqual $priority $job.Priority
+ Assert-AreEqual $newKeepAlive $job.PoolInformation.AutoPoolSpecification.KeepAlive
+ Assert-AreEqual $maxWallClockTime $job.Constraints.MaxWallClockTime
+ Assert-AreEqual $maxTaskRetry $job.Constraints.MaxTaskRetryCount
+ Assert-AreEqual $jobMetadata.Count $job.Metadata.Count
+ Assert-AreEqual $jobMetadata[0].Name $job.Metadata[0].Name
+ Assert-AreEqual $jobMetadata[0].Value $job.Metadata[0].Value
+ }
+ finally
+ {
+ # Cleanup job and autopool
+ Remove-AzureBatchJob_ST $jobId -Force -BatchContext $context
+ Get-AzureBatchPool_ST -Filter "startswith(id,'$autoPoolIdPrefix')" -BatchContext $context | Remove-AzureBatchPool_ST -Force -BatchContext $context
+ }
+
+}
+
+
<#
.SYNOPSIS
Tests deleting a job
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs
index b974f62384ba..a8407f5f40b2 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.cs
@@ -149,6 +149,29 @@ public void TestListAllPools()
TestUtilities.GetCurrentMethodName());
}
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestUpdatePool()
+ {
+ BatchController controller = BatchController.NewInstance;
+ string poolId = "testUpdate";
+
+ BatchAccountContext context = null;
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-UpdatePool '{0}' '{1}'", commonAccountName, poolId) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, commonAccountName);
+ ScenarioTestHelpers.CreateTestPool(controller, context, poolId, 0);
+ },
+ () =>
+ {
+ ScenarioTestHelpers.DeletePool(controller, context, poolId);
+ },
+ TestUtilities.GetCallingClass(),
+ TestUtilities.GetCurrentMethodName());
+ }
+
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDeletePool()
@@ -441,6 +464,16 @@ protected override void ProcessRecord()
}
}
+ [Cmdlet(VerbsCommon.Set, "AzureBatchPool_ST")]
+ public class SetBatchPoolScenarioTestCommand : SetBatchPoolCommand
+ {
+ protected override void ProcessRecord()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ProcessRecord();
+ }
+ }
+
[Cmdlet(VerbsCommon.Remove, "AzureBatchPool_ST")]
public class RemoveBatchPoolScenarioTestCommand : RemoveBatchPoolCommand
{
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1
index 5152c9caa167..a2683abd9370 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/PoolTests.ps1
@@ -164,6 +164,67 @@ function Test-ListAllPools
Assert-AreEqual $count $pools.Length
}
+<#
+.SYNOPSIS
+Tests updating a pool
+#>
+function Test-UpdatePool
+{
+ param([string]$accountName, [string]$poolId)
+
+ $context = Get-AzureRMBatchAccountKeys -Name $accountName
+
+ $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
+
+ # Define new Start Task
+ $startTask = New-Object Microsoft.Azure.Commands.Batch.Models.PSStartTask
+ $startTaskCmd = "cmd /c dir /s"
+ $startTask.CommandLine = $startTaskCmd
+ $startTask.ResourceFiles = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSResourceFile]
+ $blobSource1 = "https://testacct1.blob.core.windows.net/"
+ $filePath1 = "filePath1"
+ $blobSource2 = "https://testacct2.blob.core.windows.net/"
+ $filePath2 = "filePath2"
+ $r1 = New-Object Microsoft.Azure.Commands.Batch.Models.PSResourceFile -ArgumentList @($blobSource1,$filePath1)
+ $r2 = New-Object Microsoft.Azure.Commands.Batch.Models.PSResourceFile -ArgumentList @($blobSource2,$filePath2)
+ $startTask.ResourceFiles.Add($r1)
+ $startTask.ResourceFiles.Add($r2)
+ $resourceFileCount = $startTask.ResourceFiles.Count
+ $startTask.EnvironmentSettings = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting]
+ $envSetting = New-Object Microsoft.Azure.Commands.Batch.Models.PSEnvironmentSetting -ArgumentList "envName","envVal"
+ $startTask.EnvironmentSettings.Add($envSetting)
+
+ # Define new Metadata
+ $metadata = New-Object System.Collections.Generic.List``1[Microsoft.Azure.Commands.Batch.Models.PSMetadataItem]
+ $metadataItem = New-Object Microsoft.Azure.Commands.Batch.Models.PSMetadataItem -ArgumentList "poolMetaName","poolMetaValue"
+ $metadata.Add($metadataItem)
+
+ # TODO: Also set cert refs when the cert cmdlets are implemented
+
+ # Update and refresh pool
+ $pool.StartTask = $startTask
+ $pool.Metadata = $metadata
+
+ $pool | Set-AzureBatchPool_ST -BatchContext $context
+ $pool = Get-AzureBatchPool_ST $poolId -BatchContext $context
+
+ # Verify Start Task was updated
+ Assert-AreEqual $startTaskCmd $pool.StartTask.CommandLine
+ Assert-AreEqual $resourceFileCount $pool.StartTask.ResourceFiles.Count
+ Assert-AreEqual $blobSource1 $pool.StartTask.ResourceFiles[0].BlobSource
+ Assert-AreEqual $filePath1 $pool.StartTask.ResourceFiles[0].FilePath
+ Assert-AreEqual $blobSource2 $pool.StartTask.ResourceFiles[1].BlobSource
+ Assert-AreEqual $filePath2 $pool.StartTask.ResourceFiles[1].FilePath
+ Assert-AreEqual 1 $pool.StartTask.EnvironmentSettings.Count
+ Assert-AreEqual $envSetting.Name $pool.StartTask.EnvironmentSettings[0].Name
+ Assert-AreEqual $envSetting.Value $pool.StartTask.EnvironmentSettings[0].Value
+
+ # Verify Metadata was updated
+ Assert-AreEqual 1 $pool.Metadata.Count
+ Assert-AreEqual $metadataItem.Name $pool.Metadata[0].Name
+ Assert-AreEqual $metadataItem.Value $pool.Metadata[0].Value
+}
+
<#
.SYNOPSIS
Tests deleting a pool
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs
index 9e7a8f1fef1c..fa7b73242d8b 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/ScenarioTestHelpers.cs
@@ -12,30 +12,20 @@
// limitations under the License.
// ----------------------------------------------------------------------------------
-using System.Collections;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
-using System.Net;
using System.Net.Http;
-using System.Net.Http.Headers;
-using System.Text;
using System.Threading;
-using System.Threading.Tasks;
using Microsoft.Azure.Batch;
-using Microsoft.Azure.Batch.Auth;
using Microsoft.Azure.Batch.Common;
using Microsoft.Azure.Batch.Protocol;
-using Microsoft.Azure.Batch.Protocol.Models;
using Microsoft.Azure.Commands.Batch.Models;
using Microsoft.Azure.Management.Batch;
using Microsoft.Azure.Management.Batch.Models;
using System;
-using System.Reflection;
using Microsoft.Azure.Management.Resources;
using Microsoft.Azure.Management.Resources.Models;
using Microsoft.Azure.Test.HttpRecorder;
-using Moq;
using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
using Constants = Microsoft.Azure.Commands.Batch.Utils.Constants;
@@ -428,7 +418,7 @@ public static void WaitForIdleComputeNode(BatchController controller, BatchAccou
}
///
- /// Creates a test user for use in Scenario tests.
+ /// Creates a compute node user for use in Scenario tests.
///
public static void CreateComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName)
{
@@ -445,6 +435,21 @@ public static void CreateComputeNodeUser(BatchController controller, BatchAccoun
client.CreateComputeNodeUser(parameters);
}
+ ///
+ /// Deletes a compute node user for use in Scenario tests.
+ ///
+ public static void DeleteComputeNodeUser(BatchController controller, BatchAccountContext context, string poolId, string computeNodeId, string computeNodeUserName)
+ {
+ RequestInterceptor interceptor = CreateHttpRecordingInterceptor();
+ BatchClientBehavior[] behaviors = new BatchClientBehavior[] { interceptor };
+ BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);
+
+ ComputeNodeUserOperationParameters parameters = new ComputeNodeUserOperationParameters(context, poolId, computeNodeId, computeNodeUserName, behaviors);
+
+ client.DeleteComputeNodeUser(parameters);
+ }
+
+
///
/// Creates an interceptor that can be used to support the HTTP recorder scenario tests.
/// Since the BatchRestClient is not generated from the test infrastructure, the HTTP
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs
index 9292fe5afc09..d0842066e21f 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.cs
@@ -186,6 +186,32 @@ public void TestListTaskPipeline()
TestUtilities.GetCurrentMethodName());
}
+ [Fact]
+ [Trait(Category.AcceptanceType, Category.CheckIn)]
+ public void TestUpdateTask()
+ {
+ BatchController controller = BatchController.NewInstance;
+ string jobId = "updateTaskJob";
+ string taskId = "testTask";
+
+ BatchAccountContext context = null;
+ controller.RunPsTestWorkflow(
+ () => { return new string[] { string.Format("Test-UpdateTask '{0}' '{1}' '{2}'", accountName, jobId, taskId) }; },
+ () =>
+ {
+ context = ScenarioTestHelpers.GetBatchAccountContextWithKeys(controller, accountName);
+ ScenarioTestHelpers.CreateTestJob(controller, context, jobId);
+ // Make the task long running so the constraints can be updated
+ ScenarioTestHelpers.CreateTestTask(controller, context, jobId, taskId, "ping -t localhost -w 60");
+ },
+ () =>
+ {
+ ScenarioTestHelpers.DeleteJob(controller, context, jobId);
+ },
+ TestUtilities.GetCallingClass(),
+ TestUtilities.GetCurrentMethodName());
+ }
+
[Fact]
[Trait(Category.AcceptanceType, Category.CheckIn)]
public void TestDeleteTask()
@@ -284,6 +310,16 @@ protected override void ProcessRecord()
}
}
+ [Cmdlet(VerbsCommon.Set, "AzureBatchTask_ST")]
+ public class SetBatchTaskScenarioTestCommand : SetBatchTaskCommand
+ {
+ protected override void ProcessRecord()
+ {
+ AdditionalBehaviors = new List() { ScenarioTestHelpers.CreateHttpRecordingInterceptor() };
+ base.ProcessRecord();
+ }
+ }
+
[Cmdlet(VerbsCommon.Remove, "AzureBatchTask_ST")]
public class RemoveBatchTaskScenarioTestCommand : RemoveBatchTaskCommand
{
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1 b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1
index 38fcc9eaa164..0949f9f0c9bd 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/TaskTests.ps1
@@ -175,6 +175,35 @@ function Test-ListTaskPipeline
Assert-AreEqual $taskId $task.Id
}
+<#
+.SYNOPSIS
+Tests updating a task
+#>
+function Test-UpdateTask
+{
+ param([string]$accountName, [string]$jobId, [string]$taskId)
+
+ $context = Get-AzureRMBatchAccountKeys -Name $accountName
+
+ $task = Get-AzureBatchTask_ST $jobId $taskId -BatchContext $context
+
+ # Define new task constraints
+ $constraints = New-Object Microsoft.Azure.Commands.Batch.Models.PSTaskConstraints -ArgumentList @([TimeSpan]::FromDays(10),[TimeSpan]::FromDays(2),5)
+ $maxWallClockTime = $constraints.MaxWallClockTime
+ $retentionTime = $constraints.RetentionTime
+ $maxRetryCount = $constraints.MaxRetryCount
+
+ # Update and refresh task
+ $task.Constraints = $constraints
+ $task | Set-AzureBatchTask_ST -BatchContext $context
+ $task = Get-AzureBatchTask_ST $jobId $taskId -BatchContext $context
+
+ # Verify task was updated
+ Assert-AreEqual $maxWallClockTime $task.Constraints.MaxWallClockTime
+ Assert-AreEqual $retentionTime $task.Constraints.RetentionTime
+ Assert-AreEqual $maxRetryCount $constraints.MaxRetryCount
+}
+
<#
.SYNOPSIS
Tests deleting a task
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestUpdateComputeNodeUser.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestUpdateComputeNodeUser.json
new file mode 100644
index 000000000000..c2d52aebf2be
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.ComputeNodeUserTests/TestUpdateComputeNodeUser.json
@@ -0,0 +1,702 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14982"
+ ],
+ "x-ms-request-id": [
+ "9a2d1ff8-d7a9-439b-95a2-85345398d455"
+ ],
+ "x-ms-correlation-request-id": [
+ "9a2d1ff8-d7a9-439b-95a2-85345398d455"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T232232Z:9a2d1ff8-d7a9-439b-95a2-85345398d455"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:32 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14981"
+ ],
+ "x-ms-request-id": [
+ "11114821-1b6c-430b-b9e0-1bce5c768245"
+ ],
+ "x-ms-correlation-request-id": [
+ "11114821-1b6c-430b-b9e0-1bce5c768245"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T232236Z:11114821-1b6c-430b-b9e0-1bce5c768245"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:35 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "0db0e271-d16a-4f26-8fc2-b996b9faaa89"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14961"
+ ],
+ "x-ms-request-id": [
+ "07d11d90-9fd0-4a5c-8c40-00f5194a4988"
+ ],
+ "x-ms-correlation-request-id": [
+ "07d11d90-9fd0-4a5c-8c40-00f5194a4988"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T232233Z:07d11d90-9fd0-4a5c-8c40-00f5194a4988"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:33 GMT"
+ ],
+ "ETag": [
+ "0x8D2B57FB6C7DB91"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "6bcd0700-64cc-4993-a954-c2d15f613db5"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14960"
+ ],
+ "x-ms-request-id": [
+ "7406a3ee-56aa-4be9-9768-515419f26373"
+ ],
+ "x-ms-correlation-request-id": [
+ "7406a3ee-56aa-4be9-9768-515419f26373"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T232236Z:7406a3ee-56aa-4be9-9768-515419f26373"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:35 GMT"
+ ],
+ "ETag": [
+ "0x8D2B57FB8211BF8"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "fd185aec-ac5b-4a97-9962-2cad31d3b1a6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1197"
+ ],
+ "x-ms-request-id": [
+ "2e08b09b-efc6-43b2-9201-55a75ecb6e05"
+ ],
+ "x-ms-correlation-request-id": [
+ "2e08b09b-efc6-43b2-9201-55a75ecb6e05"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T232234Z:2e08b09b-efc6-43b2-9201-55a75ecb6e05"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:33 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "8aeb4a33-928f-437e-b88f-2a0424965318"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1196"
+ ],
+ "x-ms-request-id": [
+ "889eaba1-73fd-4104-8f31-467901e7b5b4"
+ ],
+ "x-ms-correlation-request-id": [
+ "889eaba1-73fd-4104-8f31-467901e7b5b4"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T232236Z:889eaba1-73fd-4104-8f31-467901e7b5b4"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:35 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5f430d06-72ed-44c7-be02-4e25f07fef69"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#nodes\",\r\n \"value\": [\r\n {\r\n \"id\": \"tvm-3257026573_1-20150904t230807z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-09-04T23:12:07.3859341Z\",\r\n \"lastBootTime\": \"2015-09-04T23:12:07.2579351Z\",\r\n \"allocationTime\": \"2015-09-04T23:08:07.1967906Z\",\r\n \"ipAddress\": \"100.64.102.54\",\r\n \"affinityId\": \"TVM:tvm-3257026573_1-20150904t230807z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-09-04T23:12:07.498937Z\",\r\n \"endTime\": \"2015-09-04T23:12:09.2449474Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_2-20150904t230807z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_2-20150904t230807z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-09-04T23:12:07.5096893Z\",\r\n \"lastBootTime\": \"2015-09-04T23:12:07.3976943Z\",\r\n \"allocationTime\": \"2015-09-04T23:08:07.1967906Z\",\r\n \"ipAddress\": \"100.64.118.109\",\r\n \"affinityId\": \"TVM:tvm-3257026573_2-20150904t230807z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-09-04T23:12:07.5566878Z\",\r\n \"endTime\": \"2015-09-04T23:12:08.8916092Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"tvm-3257026573_3-20150904t230807z\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_3-20150904t230807z\",\r\n \"state\": \"idle\",\r\n \"stateTransitionTime\": \"2015-09-04T23:12:43.5013417Z\",\r\n \"lastBootTime\": \"2015-09-04T23:12:43.4243457Z\",\r\n \"allocationTime\": \"2015-09-04T23:08:07.1967906Z\",\r\n \"ipAddress\": \"100.64.90.4\",\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150904t230807z\",\r\n \"vmSize\": \"small\",\r\n \"totalTasksRun\": 0,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c echo hello\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"startTaskInfo\": {\r\n \"state\": \"completed\",\r\n \"startTime\": \"2015-09-04T23:12:43.5293414Z\",\r\n \"endTime\": \"2015-09-04T23:12:44.4623112Z\",\r\n \"exitCode\": 0,\r\n \"retryCount\": 0\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "f135d8c1-7638-4468-ae26-ee7c7b501f1e"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5f430d06-72ed-44c7-be02-4e25f07fef69"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA5MDR0MjMwODA3ei91c2Vycz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"name\": \"updateuser\",\r\n \"isAdmin\": false,\r\n \"expiryTime\": \"0001-01-01T00:00:00\",\r\n \"password\": \"Password1234!\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "121"
+ ],
+ "client-request-id": [
+ "6cb1a18c-b76b-4980-97b4-8ae8028a3805"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "fe799d1a-0db2-4b24-9b33-18b954326a7b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "6cb1a18c-b76b-4980-97b4-8ae8028a3805"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA5MDR0MjMwODA3ei91c2Vycz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"name\": \"updateuser\",\r\n \"isAdmin\": false,\r\n \"expiryTime\": \"0001-01-01T00:00:00\",\r\n \"password\": \"Password1234!\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "121"
+ ],
+ "client-request-id": [
+ "6cb1a18c-b76b-4980-97b4-8ae8028a3805"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "fe799d1a-0db2-4b24-9b33-18b954326a7b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "6cb1a18c-b76b-4980-97b4-8ae8028a3805"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:34 GMT"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA5MDR0MjMwODA3ei91c2Vycy91cGRhdGV1c2VyP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"password\": \"Abcdefghijk1234!\",\r\n \"expiryTime\": \"2015-09-09T16:22:36.258907-07:00\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "91"
+ ],
+ "client-request-id": [
+ "6fdddc8c-217b-42ac-ae03-ff0783c944dc"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "e0e77cc9-e8c0-4187-9762-0422f6a31cd4"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "6fdddc8c-217b-42ac-ae03-ff0783c944dc"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:37 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA5MDR0MjMwODA3ei91c2Vycy91cGRhdGV1c2VyP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "43f72bf5-cb3d-4578-90e8-1f69af67f3f4"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "8da81b4f-1148-46e8-a419-793b17a07960"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "43f72bf5-cb3d-4578-90e8-1f69af67f3f4"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA5MDR0MjMwODA3ei91c2Vycy91cGRhdGV1c2VyP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "43f72bf5-cb3d-4578-90e8-1f69af67f3f4"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "8da81b4f-1148-46e8-a419-793b17a07960"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "43f72bf5-cb3d-4578-90e8-1f69af67f3f4"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testPool/nodes/tvm-3257026573_1-20150904t230807z/users/updateuser?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RQb29sL25vZGVzL3R2bS0zMjU3MDI2NTczXzEtMjAxNTA5MDR0MjMwODA3ei91c2Vycy91cGRhdGV1c2VyP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "43f72bf5-cb3d-4578-90e8-1f69af67f3f4"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "8da81b4f-1148-46e8-a419-793b17a07960"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "43f72bf5-cb3d-4578-90e8-1f69af67f3f4"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:22:36 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestUpdateJobSchedule.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestUpdateJobSchedule.json
new file mode 100644
index 000000000000..3d303c59c398
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobScheduleTests/TestUpdateJobSchedule.json
@@ -0,0 +1,824 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14969"
+ ],
+ "x-ms-request-id": [
+ "4fc3c138-c679-4b12-8110-f774609b96ce"
+ ],
+ "x-ms-correlation-request-id": [
+ "4fc3c138-c679-4b12-8110-f774609b96ce"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T235302Z:4fc3c138-c679-4b12-8110-f774609b96ce"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:01 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14968"
+ ],
+ "x-ms-request-id": [
+ "3e20ea86-f1b3-4a0c-96a8-f9cabc5cee48"
+ ],
+ "x-ms-correlation-request-id": [
+ "3e20ea86-f1b3-4a0c-96a8-f9cabc5cee48"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T235305Z:3e20ea86-f1b3-4a0c-96a8-f9cabc5cee48"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:04 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:53:03 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "3073ea85-1e71-4aea-ba8f-f41ae95808c3"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14990"
+ ],
+ "x-ms-request-id": [
+ "fd86f335-96ae-4d9c-9a2e-d48116762fd9"
+ ],
+ "x-ms-correlation-request-id": [
+ "fd86f335-96ae-4d9c-9a2e-d48116762fd9"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T235303Z:fd86f335-96ae-4d9c-9a2e-d48116762fd9"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B583F92BE6DD"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "5ea90b44-82c1-4f22-a2a0-c9409b332009"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14989"
+ ],
+ "x-ms-request-id": [
+ "b39acad2-216f-4532-b98e-8d1d73d346ea"
+ ],
+ "x-ms-correlation-request-id": [
+ "b39acad2-216f-4532-b98e-8d1d73d346ea"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T235305Z:b39acad2-216f-4532-b98e-8d1d73d346ea"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "ETag": [
+ "0x8D2B583FA6EBE60"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "f62de15b-aa94-420e-ab2b-0d93df7f0186"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1196"
+ ],
+ "x-ms-request-id": [
+ "7575a28f-a29d-4c5d-b426-94d5a57871c8"
+ ],
+ "x-ms-correlation-request-id": [
+ "7575a28f-a29d-4c5d-b426-94d5a57871c8"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T235303Z:7575a28f-a29d-4c5d-b426-94d5a57871c8"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:03 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "338e2e07-a258-4db4-8cb1-3b6c565c530f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1195"
+ ],
+ "x-ms-request-id": [
+ "34d9e96c-e09f-4ed8-af33-dac342983b4c"
+ ],
+ "x-ms-correlation-request-id": [
+ "34d9e96c-e09f-4ed8-af33-dac342983b4c"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150904T235305Z:34d9e96c-e09f-4ed8-af33-dac342983b4c"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"id\": \"testUpdateJobSchedule\",\r\n \"schedule\": {},\r\n \"jobSpecification\": {\r\n \"commonEnvironmentSettings\": [],\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n }\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "179"
+ ],
+ "client-request-id": [
+ "c5661fa0-1888-45dd-89a9-577abb0d2982"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "fd9d541d-b4af-4266-9f39-fa87f4ec705b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "c5661fa0-1888-45dd-89a9-577abb0d2982"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "ETag": [
+ "0x8D2B583FA0BBFA3"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/jobschedules/testUpdateJobSchedule?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0VXBkYXRlSm9iU2NoZWR1bGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "cf423126-b1c8-46b5-8bc2-6986a0bf4574"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobschedules/@Element\",\r\n \"id\": \"testUpdateJobSchedule\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule\",\r\n \"eTag\": \"0x8D2B583FA0BBFA3\",\r\n \"lastModified\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"creationTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"jobSpecification\": {\r\n \"priority\": 0,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"recentJob\": {\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/testUpdateJobSchedule:job-1\",\r\n \"id\": \"testUpdateJobSchedule:job-1\"\r\n }\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:53:05 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "21c13e2e-7c5f-4686-a783-7978e67918a4"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "cf423126-b1c8-46b5-8bc2-6986a0bf4574"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "ETag": [
+ "0x8D2B583FA0BBFA3"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules/testUpdateJobSchedule?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0VXBkYXRlSm9iU2NoZWR1bGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2020-01-01T12:00:00\",\r\n \"doNotRunAfter\": \"2025-01-01T12:00:00\",\r\n \"startWindow\": \"PT1H\",\r\n \"recurrenceInterval\": \"P1D\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 1,\r\n \"displayName\": \"jobSpecDisplayName\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"jobManagerTask\": {\r\n \"id\": \"jobManager\",\r\n \"displayName\": \"jobManagerDisplay\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"filePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"name1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"name2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"PT1H\"\r\n },\r\n \"killJobOnCompletion\": false,\r\n \"runElevated\": false\r\n },\r\n \"jobPreparationTask\": {\r\n \"id\": \"jobPrep\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobPrepFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobPrepName1\",\r\n \"value\": \"jobPrepValue1\"\r\n },\r\n {\r\n \"name\": \"jobPrepName2\",\r\n \"value\": \"jobPrepValue2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxTaskRetryCount\": 2\r\n },\r\n \"runElevated\": false\r\n },\r\n \"jobReleaseTask\": {\r\n \"id\": \"jobRelease\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobReleaseFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobReleaseName1\",\r\n \"value\": \"jobReleaseValue1\"\r\n },\r\n {\r\n \"name\": \"jobReleaseName2\",\r\n \"value\": \"jobReleaseValue2\"\r\n }\r\n ],\r\n \"runElevated\": false\r\n },\r\n \"commonEnvironmentSettings\": [\r\n {\r\n \"name\": \"commonName1\",\r\n \"value\": \"commonValue1\"\r\n },\r\n {\r\n \"name\": \"commonName2\",\r\n \"value\": \"commonValue2\"\r\n }\r\n ],\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"jobschedule\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"targetDedicated\": 3,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\"\r\n },\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"0123456789ABCDEF\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"localmachine\",\r\n \"storeName\": \"certStore\",\r\n \"visibility\": \"starttask\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"specMeta1\",\r\n \"value\": \"specMetaValue1\"\r\n },\r\n {\r\n \"name\": \"specMeta2\",\r\n \"value\": \"specMetaValue2\"\r\n }\r\n ]\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobScheduleMeta1\",\r\n \"value\": \"jobScheduleValue1\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "3380"
+ ],
+ "client-request-id": [
+ "f5f057f7-f7f1-4916-912f-c949cf67d8c2"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:06 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5c7ad423-22fa-43c2-8c9e-f8126ae95dff"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "f5f057f7-f7f1-4916-912f-c949cf67d8c2"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "ETag": [
+ "0x8D2B583FB81DC5F"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules/testUpdateJobSchedule?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0VXBkYXRlSm9iU2NoZWR1bGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2020-01-01T12:00:00\",\r\n \"doNotRunAfter\": \"2025-01-01T12:00:00\",\r\n \"startWindow\": \"PT1H\",\r\n \"recurrenceInterval\": \"P1D\"\r\n },\r\n \"jobSpecification\": {\r\n \"priority\": 1,\r\n \"displayName\": \"jobSpecDisplayName\",\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"jobManagerTask\": {\r\n \"id\": \"jobManager\",\r\n \"displayName\": \"jobManagerDisplay\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"filePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"name1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"name2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"PT1H\"\r\n },\r\n \"killJobOnCompletion\": false,\r\n \"runElevated\": false\r\n },\r\n \"jobPreparationTask\": {\r\n \"id\": \"jobPrep\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobPrepFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobPrepName1\",\r\n \"value\": \"jobPrepValue1\"\r\n },\r\n {\r\n \"name\": \"jobPrepName2\",\r\n \"value\": \"jobPrepValue2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxTaskRetryCount\": 2\r\n },\r\n \"runElevated\": false\r\n },\r\n \"jobReleaseTask\": {\r\n \"id\": \"jobRelease\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobReleaseFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobReleaseName1\",\r\n \"value\": \"jobReleaseValue1\"\r\n },\r\n {\r\n \"name\": \"jobReleaseName2\",\r\n \"value\": \"jobReleaseValue2\"\r\n }\r\n ],\r\n \"runElevated\": false\r\n },\r\n \"commonEnvironmentSettings\": [\r\n {\r\n \"name\": \"commonName1\",\r\n \"value\": \"commonValue1\"\r\n },\r\n {\r\n \"name\": \"commonName2\",\r\n \"value\": \"commonValue2\"\r\n }\r\n ],\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"jobschedule\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"targetDedicated\": 3,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\"\r\n },\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"0123456789ABCDEF\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"localmachine\",\r\n \"storeName\": \"certStore\",\r\n \"visibility\": \"starttask\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"specMeta1\",\r\n \"value\": \"specMetaValue1\"\r\n },\r\n {\r\n \"name\": \"specMeta2\",\r\n \"value\": \"specMetaValue2\"\r\n }\r\n ]\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobScheduleMeta1\",\r\n \"value\": \"jobScheduleValue1\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "3380"
+ ],
+ "client-request-id": [
+ "f5f057f7-f7f1-4916-912f-c949cf67d8c2"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:06 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5c7ad423-22fa-43c2-8c9e-f8126ae95dff"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "f5f057f7-f7f1-4916-912f-c949cf67d8c2"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "ETag": [
+ "0x8D2B583FB81DC5F"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "e99f5214-71bf-4424-8610-b6b7b2fb70de"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:06 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"testUpdateJobSchedule\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule\",\r\n \"eTag\": \"0x8D2B583FB81DC5F\",\r\n \"lastModified\": \"2015-09-04T23:53:07.7596255Z\",\r\n \"creationTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2020-01-01T12:00:00Z\",\r\n \"doNotRunAfter\": \"2025-01-01T12:00:00Z\",\r\n \"startWindow\": \"PT1H\",\r\n \"recurrenceInterval\": \"P1D\"\r\n },\r\n \"jobSpecification\": {\r\n \"displayName\": \"jobSpecDisplayName\",\r\n \"priority\": 1,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"jobManagerTask\": {\r\n \"id\": \"jobManager\",\r\n \"displayName\": \"jobManagerDisplay\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"filePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"name1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"name2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"PT1H\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"runElevated\": false,\r\n \"runExclusive\": true,\r\n \"killJobOnCompletion\": false\r\n },\r\n \"jobPreparationTask\": {\r\n \"id\": \"jobPrep\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobPrepFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobPrepName1\",\r\n \"value\": \"jobPrepValue1\"\r\n },\r\n {\r\n \"name\": \"jobPrepName2\",\r\n \"value\": \"jobPrepValue2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 2\r\n },\r\n \"runElevated\": false,\r\n \"waitForSuccess\": true,\r\n \"rerunOnNodeRebootAfterSuccess\": true\r\n },\r\n \"jobReleaseTask\": {\r\n \"id\": \"jobRelease\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobReleaseFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobReleaseName1\",\r\n \"value\": \"jobReleaseValue1\"\r\n },\r\n {\r\n \"name\": \"jobReleaseName2\",\r\n \"value\": \"jobReleaseValue2\"\r\n }\r\n ],\r\n \"maxWallClockTime\": \"PT15M\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"runElevated\": false\r\n },\r\n \"commonEnvironmentSettings\": [\r\n {\r\n \"name\": \"commonName1\",\r\n \"value\": \"commonValue1\"\r\n },\r\n {\r\n \"name\": \"commonName2\",\r\n \"value\": \"commonValue2\"\r\n }\r\n ],\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"jobschedule\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"0123456789abcdef\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"LocalMachine\",\r\n \"storeName\": \"certStore\",\r\n \"visibility\": \"starttask\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"specMeta1\",\r\n \"value\": \"specMetaValue1\"\r\n },\r\n {\r\n \"name\": \"specMeta2\",\r\n \"value\": \"specMetaValue2\"\r\n }\r\n ]\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2015-09-06T12:00:00Z\",\r\n \"recentJob\": {\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/testUpdateJobSchedule:job-1\",\r\n \"id\": \"testUpdateJobSchedule:job-1\"\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobScheduleMeta1\",\r\n \"value\": \"jobScheduleValue1\"\r\n }\r\n ]\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "c9be8f48-b1d0-4711-b15b-30480d460609"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "e99f5214-71bf-4424-8610-b6b7b2fb70de"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "e99f5214-71bf-4424-8610-b6b7b2fb70de"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:06 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"testUpdateJobSchedule\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule\",\r\n \"eTag\": \"0x8D2B583FB81DC5F\",\r\n \"lastModified\": \"2015-09-04T23:53:07.7596255Z\",\r\n \"creationTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2020-01-01T12:00:00Z\",\r\n \"doNotRunAfter\": \"2025-01-01T12:00:00Z\",\r\n \"startWindow\": \"PT1H\",\r\n \"recurrenceInterval\": \"P1D\"\r\n },\r\n \"jobSpecification\": {\r\n \"displayName\": \"jobSpecDisplayName\",\r\n \"priority\": 1,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"jobManagerTask\": {\r\n \"id\": \"jobManager\",\r\n \"displayName\": \"jobManagerDisplay\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"filePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"name1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"name2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"PT1H\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"runElevated\": false,\r\n \"runExclusive\": true,\r\n \"killJobOnCompletion\": false\r\n },\r\n \"jobPreparationTask\": {\r\n \"id\": \"jobPrep\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobPrepFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobPrepName1\",\r\n \"value\": \"jobPrepValue1\"\r\n },\r\n {\r\n \"name\": \"jobPrepName2\",\r\n \"value\": \"jobPrepValue2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 2\r\n },\r\n \"runElevated\": false,\r\n \"waitForSuccess\": true,\r\n \"rerunOnNodeRebootAfterSuccess\": true\r\n },\r\n \"jobReleaseTask\": {\r\n \"id\": \"jobRelease\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobReleaseFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobReleaseName1\",\r\n \"value\": \"jobReleaseValue1\"\r\n },\r\n {\r\n \"name\": \"jobReleaseName2\",\r\n \"value\": \"jobReleaseValue2\"\r\n }\r\n ],\r\n \"maxWallClockTime\": \"PT15M\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"runElevated\": false\r\n },\r\n \"commonEnvironmentSettings\": [\r\n {\r\n \"name\": \"commonName1\",\r\n \"value\": \"commonValue1\"\r\n },\r\n {\r\n \"name\": \"commonName2\",\r\n \"value\": \"commonValue2\"\r\n }\r\n ],\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"jobschedule\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"0123456789abcdef\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"LocalMachine\",\r\n \"storeName\": \"certStore\",\r\n \"visibility\": \"starttask\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"specMeta1\",\r\n \"value\": \"specMetaValue1\"\r\n },\r\n {\r\n \"name\": \"specMeta2\",\r\n \"value\": \"specMetaValue2\"\r\n }\r\n ]\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2015-09-06T12:00:00Z\",\r\n \"recentJob\": {\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/testUpdateJobSchedule:job-1\",\r\n \"id\": \"testUpdateJobSchedule:job-1\"\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobScheduleMeta1\",\r\n \"value\": \"jobScheduleValue1\"\r\n }\r\n ]\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "c9be8f48-b1d0-4711-b15b-30480d460609"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "e99f5214-71bf-4424-8610-b6b7b2fb70de"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "e99f5214-71bf-4424-8610-b6b7b2fb70de"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:06 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobschedules\",\r\n \"value\": [\r\n {\r\n \"id\": \"testUpdateJobSchedule\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobschedules/testUpdateJobSchedule\",\r\n \"eTag\": \"0x8D2B583FB81DC5F\",\r\n \"lastModified\": \"2015-09-04T23:53:07.7596255Z\",\r\n \"creationTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-04T23:53:05.3078435Z\",\r\n \"schedule\": {\r\n \"doNotRunUntil\": \"2020-01-01T12:00:00Z\",\r\n \"doNotRunAfter\": \"2025-01-01T12:00:00Z\",\r\n \"startWindow\": \"PT1H\",\r\n \"recurrenceInterval\": \"P1D\"\r\n },\r\n \"jobSpecification\": {\r\n \"displayName\": \"jobSpecDisplayName\",\r\n \"priority\": 1,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"jobManagerTask\": {\r\n \"id\": \"jobManager\",\r\n \"displayName\": \"jobManagerDisplay\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"filePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"name1\",\r\n \"value\": \"value1\"\r\n },\r\n {\r\n \"name\": \"name2\",\r\n \"value\": \"value2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"PT1H\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"runElevated\": false,\r\n \"runExclusive\": true,\r\n \"killJobOnCompletion\": false\r\n },\r\n \"jobPreparationTask\": {\r\n \"id\": \"jobPrep\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobPrepFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobPrepName1\",\r\n \"value\": \"jobPrepValue1\"\r\n },\r\n {\r\n \"name\": \"jobPrepName2\",\r\n \"value\": \"jobPrepValue2\"\r\n }\r\n ],\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 2\r\n },\r\n \"runElevated\": false,\r\n \"waitForSuccess\": true,\r\n \"rerunOnNodeRebootAfterSuccess\": true\r\n },\r\n \"jobReleaseTask\": {\r\n \"id\": \"jobRelease\",\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct.blob.core.windows.net/\",\r\n \"filePath\": \"jobReleaseFilePath\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"jobReleaseName1\",\r\n \"value\": \"jobReleaseValue1\"\r\n },\r\n {\r\n \"name\": \"jobReleaseName2\",\r\n \"value\": \"jobReleaseValue2\"\r\n }\r\n ],\r\n \"maxWallClockTime\": \"PT15M\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"runElevated\": false\r\n },\r\n \"commonEnvironmentSettings\": [\r\n {\r\n \"name\": \"commonName1\",\r\n \"value\": \"commonValue1\"\r\n },\r\n {\r\n \"name\": \"commonName2\",\r\n \"value\": \"commonValue2\"\r\n }\r\n ],\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"jobschedule\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"certificateReferences\": [\r\n {\r\n \"thumbprint\": \"0123456789abcdef\",\r\n \"thumbprintAlgorithm\": \"sha1\",\r\n \"storeLocation\": \"LocalMachine\",\r\n \"storeName\": \"certStore\",\r\n \"visibility\": \"starttask\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"specMeta1\",\r\n \"value\": \"specMetaValue1\"\r\n },\r\n {\r\n \"name\": \"specMeta2\",\r\n \"value\": \"specMetaValue2\"\r\n }\r\n ]\r\n },\r\n \"executionInfo\": {\r\n \"nextRunTime\": \"2015-09-06T12:00:00Z\",\r\n \"recentJob\": {\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/testUpdateJobSchedule:job-1\",\r\n \"id\": \"testUpdateJobSchedule:job-1\"\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobScheduleMeta1\",\r\n \"value\": \"jobScheduleValue1\"\r\n }\r\n ]\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "c9be8f48-b1d0-4711-b15b-30480d460609"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "e99f5214-71bf-4424-8610-b6b7b2fb70de"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobschedules/testUpdateJobSchedule?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0VXBkYXRlSm9iU2NoZWR1bGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5324d150-90b5-4c02-ae3a-1edf35bfcdec"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "8f36f1b2-5d56-4ce2-a0c7-ae1be8932ecb"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5324d150-90b5-4c02-ae3a-1edf35bfcdec"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:08 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobschedules/testUpdateJobSchedule?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnNjaGVkdWxlcy90ZXN0VXBkYXRlSm9iU2NoZWR1bGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5324d150-90b5-4c02-ae3a-1edf35bfcdec"
+ ],
+ "ocp-date": [
+ "Fri, 04 Sep 2015 23:53:07 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "8f36f1b2-5d56-4ce2-a0c7-ae1be8932ecb"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5324d150-90b5-4c02-ae3a-1edf35bfcdec"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Fri, 04 Sep 2015 23:53:08 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestUpdateJob.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestUpdateJob.json
new file mode 100644
index 000000000000..d47e94003761
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.JobTests/TestUpdateJob.json
@@ -0,0 +1,2009 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14986"
+ ],
+ "x-ms-request-id": [
+ "4e931d30-e7d8-4b76-96cc-11a239faa35e"
+ ],
+ "x-ms-correlation-request-id": [
+ "4e931d30-e7d8-4b76-96cc-11a239faa35e"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T170456Z:4e931d30-e7d8-4b76-96cc-11a239faa35e"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:04:56 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:04:58 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "70f21b85-8ac2-4730-b2ce-ee5981b73ff5"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14981"
+ ],
+ "x-ms-request-id": [
+ "a4d05947-4cd4-4971-b74c-64d4036ddff0"
+ ],
+ "x-ms-correlation-request-id": [
+ "a4d05947-4cd4-4971-b74c-64d4036ddff0"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T170458Z:a4d05947-4cd4-4971-b74c-64d4036ddff0"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:04:57 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA0924C44"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "3aaf09bd-9e2a-4cfe-8650-d591ff38a709"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "58915c40-8994-449b-a4ee-75198ee415f4"
+ ],
+ "x-ms-correlation-request-id": [
+ "58915c40-8994-449b-a4ee-75198ee415f4"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T170458Z:58915c40-8994-449b-a4ee-75198ee415f4"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:04:57 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"id\": \"updateJobTest\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": true,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"targetDedicated\": 3,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "481"
+ ],
+ "client-request-id": [
+ "eab01adb-2cc6-4e2f-b003-f430e8aeed9d"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:58 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "ce744f59-1ae6-4d27-98ee-3d71e27bd205"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "eab01adb-2cc6-4e2f-b003-f430e8aeed9d"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/job-1"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA16EE474"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/jobs/job-1"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "adee3342-268a-430e-aad8-d503f880c7a6"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA16EE474\",\r\n \"lastModified\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 0,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": true,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9d726e04-6c29-4aa2-a963-a250f291056f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "adee3342-268a-430e-aad8-d503f880c7a6"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA16EE474"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "adee3342-268a-430e-aad8-d503f880c7a6"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs/@Element\",\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA16EE474\",\r\n \"lastModified\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 0,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": true,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9d726e04-6c29-4aa2-a963-a250f291056f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "adee3342-268a-430e-aad8-d503f880c7a6"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA16EE474"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?disable&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9kaXNhYmxlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"disableTasks\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "35"
+ ],
+ "client-request-id": [
+ "61a5ee63-f701-47ff-a038-45ccddc18137"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "73c15663-9b1d-4a1a-9daa-c4d5e767b35a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "61a5ee63-f701-47ff-a038-45ccddc18137"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1A27E9C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?disable&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9kaXNhYmxlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"disableTasks\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "35"
+ ],
+ "client-request-id": [
+ "61a5ee63-f701-47ff-a038-45ccddc18137"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "73c15663-9b1d-4a1a-9daa-c4d5e767b35a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "61a5ee63-f701-47ff-a038-45ccddc18137"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1A27E9C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?disable&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9kaXNhYmxlJmFwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"disableTasks\": \"terminate\"\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "35"
+ ],
+ "client-request-id": [
+ "61a5ee63-f701-47ff-a038-45ccddc18137"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "73c15663-9b1d-4a1a-9daa-c4d5e767b35a"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "61a5ee63-f701-47ff-a038-45ccddc18137"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1A27E9C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "865"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1812287e-8824-44fc-a29f-8304d959e243"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1D6F1EA"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "865"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1812287e-8824-44fc-a29f-8304d959e243"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1D6F1EA"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "865"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1812287e-8824-44fc-a29f-8304d959e243"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1D6F1EA"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "865"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:04:59 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "1812287e-8824-44fc-a29f-8304d959e243"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "490e488b-28b7-4752-abc1-b9659ca9c967"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateJobTest"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "ETag": [
+ "0x8D2B86FA1D6F1EA"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA1D6F1EA\",\r\n \"lastModified\": \"2015-09-08T17:05:00.8760298Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.6823291Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ],\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "473bb7cb-3b3a-4c55-b04e-91eaa243645c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA1D6F1EA\",\r\n \"lastModified\": \"2015-09-08T17:05:00.8760298Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.6823291Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ],\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "473bb7cb-3b3a-4c55-b04e-91eaa243645c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA1D6F1EA\",\r\n \"lastModified\": \"2015-09-08T17:05:00.8760298Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.6823291Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ],\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "473bb7cb-3b3a-4c55-b04e-91eaa243645c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA1D6F1EA\",\r\n \"lastModified\": \"2015-09-08T17:05:00.8760298Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.6823291Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ],\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "473bb7cb-3b3a-4c55-b04e-91eaa243645c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#jobs\",\r\n \"value\": [\r\n {\r\n \"id\": \"updateJobTest\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateJobTest\",\r\n \"eTag\": \"0x8D2B86FA1D6F1EA\",\r\n \"lastModified\": \"2015-09-08T17:05:00.8760298Z\",\r\n \"creationTime\": \"2015-09-08T17:05:00.1750687Z\",\r\n \"state\": \"disabled\",\r\n \"stateTransitionTime\": \"2015-09-08T17:05:00.6823291Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"priority\": 3,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P1D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"poolInfo\": {\r\n \"autoPoolSpecification\": {\r\n \"autoPoolIdPrefix\": \"TestSpecPrefix\",\r\n \"poolLifetimeOption\": \"job\",\r\n \"keepAlive\": false,\r\n \"pool\": {\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n },\r\n \"resizeTimeout\": \"PT5M\",\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ]\r\n }\r\n }\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"jobMeta1\",\r\n \"value\": \"jobValue1\"\r\n }\r\n ],\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T17:05:00.1941108Z\",\r\n \"poolId\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "473bb7cb-3b3a-4c55-b04e-91eaa243645c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "44886d99-3c47-40c6-8ef3-cb52bd71cc41"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9544fdde-61d5-453b-ae44-dd6dbbf6fa95"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9544fdde-61d5-453b-ae44-dd6dbbf6fa95"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9544fdde-61d5-453b-ae44-dd6dbbf6fa95"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9544fdde-61d5-453b-ae44-dd6dbbf6fa95"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9544fdde-61d5-453b-ae44-dd6dbbf6fa95"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateJobTest?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlSm9iVGVzdD9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9544fdde-61d5-453b-ae44-dd6dbbf6fa95"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9dc2ddcb-a79b-4526-a8e7-9701b2d1b901"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?$filter=startswith(id%2C'TestSpecPrefix')&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzPyRmaWx0ZXI9c3RhcnRzd2l0aCUyOGlkJTJDJTI3VGVzdFNwZWNQcmVmaXglMjclMjkmYXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools\",\r\n \"value\": [\r\n {\r\n \"id\": \"TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C\",\r\n \"eTag\": \"0x8D2B86FA13FE576\",\r\n \"lastModified\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"creationTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"allocationState\": \"resizing\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:04:59.8861174Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 3,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"metadata\": [\r\n {\r\n \"name\": \"meta1\",\r\n \"value\": \"value1\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7f60428f-12c0-46a7-9681-d66b8a6d3a91"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "5e207251-c88c-4513-b0d3-2e28885806d8"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/TestSpecPrefix_AFE1F60C-4CDF-4183-8584-6745BB85AE4C?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL1Rlc3RTcGVjUHJlZml4X0FGRTFGNjBDLTRDREYtNDE4My04NTg0LTY3NDVCQjg1QUU0Qz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:05:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "4c8b95f7-1aa5-46a7-a37b-60636d8452cf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "08588cbb-fe11-470f-bdde-1bbb7c21674b"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:05:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestUpdatePool.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestUpdatePool.json
new file mode 100644
index 000000000000..0bccf8a0dc23
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.PoolTests/TestUpdatePool.json
@@ -0,0 +1,842 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14981"
+ ],
+ "x-ms-request-id": [
+ "5940b3fd-364f-49b4-858e-891f6ab931d3"
+ ],
+ "x-ms-correlation-request-id": [
+ "5940b3fd-364f-49b4-858e-891f6ab931d3"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T173605Z:5940b3fd-364f-49b4-858e-891f6ab931d3"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:05 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14980"
+ ],
+ "x-ms-request-id": [
+ "5de7aba1-6ace-4794-983c-412c34f145ff"
+ ],
+ "x-ms-correlation-request-id": [
+ "5de7aba1-6ace-4794-983c-412c34f145ff"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T173608Z:5de7aba1-6ace-4794-983c-412c34f145ff"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:07 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:07 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "c2faa69a-39e6-448d-bba1-f1e59e7fd390"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14983"
+ ],
+ "x-ms-request-id": [
+ "ed88c0ea-d566-447b-a76d-7fafe27af55e"
+ ],
+ "x-ms-correlation-request-id": [
+ "ed88c0ea-d566-447b-a76d-7fafe27af55e"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T173607Z:ed88c0ea-d566-447b-a76d-7fafe27af55e"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:06 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FA6BCD1C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "1fb1bd6f-c831-4a06-8a1b-9d2e39cd7c52"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14982"
+ ],
+ "x-ms-request-id": [
+ "afe7048f-ebb4-4751-9e23-b23e9011190e"
+ ],
+ "x-ms-correlation-request-id": [
+ "afe7048f-ebb4-4751-9e23-b23e9011190e"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T173608Z:afe7048f-ebb4-4751-9e23-b23e9011190e"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:08 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FB5978A4"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "0f79a991-8f22-41c0-869a-dee79fb1f8bf"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1199"
+ ],
+ "x-ms-request-id": [
+ "092d9fd6-fd1e-481b-876e-617ca9a34b9b"
+ ],
+ "x-ms-correlation-request-id": [
+ "092d9fd6-fd1e-481b-876e-617ca9a34b9b"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T173607Z:092d9fd6-fd1e-481b-876e-617ca9a34b9b"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:06 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "9fb6e29f-ea2e-4e1a-81b3-07ec9978fbab"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1198"
+ ],
+ "x-ms-request-id": [
+ "45e6a890-e1e9-4a24-aa7c-4c523808d7fb"
+ ],
+ "x-ms-correlation-request-id": [
+ "45e6a890-e1e9-4a24-aa7c-4c523808d7fb"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T173609Z:45e6a890-e1e9-4a24-aa7c-4c523808d7fb"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:08 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzP2FwaS12ZXJzaW9uPTIwMTUtMDYtMDEuMi4wJnRpbWVvdXQ9MzA=",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"id\": \"testUpdate\",\r\n \"vmSize\": \"small\",\r\n \"osFamily\": \"4\",\r\n \"targetDedicated\": 0,\r\n \"enableInterNodeCommunication\": false\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "135"
+ ],
+ "client-request-id": [
+ "f58ccd4b-11b8-4c6a-a369-6d94adb94d54"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:07 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:08 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "7ab4cba9-d0d9-4cb7-a0ff-7b9b2a63cc2b"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "f58ccd4b-11b8-4c6a-a369-6d94adb94d54"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testUpdate"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:07 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FAE5BB34"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/pools/testUpdate"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/pools/testUpdate?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "0dfd5514-04d5-4c3c-9555-3a72f4286e77"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:08 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdate\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testUpdate\",\r\n \"eTag\": \"0x8D2B873FAE5BB34\",\r\n \"lastModified\": \"2015-09-08T17:36:08.277074Z\",\r\n \"creationTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:36:08.3930748Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:08 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "fad3e6a1-64a9-4f2a-94d5-a999bb620049"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "0dfd5514-04d5-4c3c-9555-3a72f4286e77"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FAE5BB34"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testUpdate?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a053c0a0-770d-4bd4-bb7a-4963366c5f95"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdate\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testUpdate\",\r\n \"eTag\": \"0x8D2B873FBE78D6D\",\r\n \"lastModified\": \"2015-09-08T17:36:09.9667309Z\",\r\n \"creationTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:36:08.3930748Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct1.blob.core.windows.net/\",\r\n \"filePath\": \"filePath1\"\r\n },\r\n {\r\n \"blobSource\": \"https://testacct2.blob.core.windows.net/\",\r\n \"filePath\": \"filePath2\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"envName\",\r\n \"value\": \"envVal\"\r\n }\r\n ],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"poolMetaName\",\r\n \"value\": \"poolMetaValue\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5308dd42-87c7-4aa3-88e1-6175e3ce9fab"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a053c0a0-770d-4bd4-bb7a-4963366c5f95"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FBE78D6D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testUpdate?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a053c0a0-770d-4bd4-bb7a-4963366c5f95"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdate\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testUpdate\",\r\n \"eTag\": \"0x8D2B873FBE78D6D\",\r\n \"lastModified\": \"2015-09-08T17:36:09.9667309Z\",\r\n \"creationTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:36:08.3930748Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct1.blob.core.windows.net/\",\r\n \"filePath\": \"filePath1\"\r\n },\r\n {\r\n \"blobSource\": \"https://testacct2.blob.core.windows.net/\",\r\n \"filePath\": \"filePath2\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"envName\",\r\n \"value\": \"envVal\"\r\n }\r\n ],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"poolMetaName\",\r\n \"value\": \"poolMetaValue\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5308dd42-87c7-4aa3-88e1-6175e3ce9fab"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a053c0a0-770d-4bd4-bb7a-4963366c5f95"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FBE78D6D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testUpdate?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a053c0a0-770d-4bd4-bb7a-4963366c5f95"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#pools/@Element\",\r\n \"id\": \"testUpdate\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/pools/testUpdate\",\r\n \"eTag\": \"0x8D2B873FBE78D6D\",\r\n \"lastModified\": \"2015-09-08T17:36:09.9667309Z\",\r\n \"creationTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"state\": \"active\",\r\n \"stateTransitionTime\": \"2015-09-08T17:36:08.277074Z\",\r\n \"allocationState\": \"steady\",\r\n \"allocationStateTransitionTime\": \"2015-09-08T17:36:08.3930748Z\",\r\n \"osFamily\": \"4\",\r\n \"targetOSVersion\": \"*\",\r\n \"currentOSVersion\": \"*\",\r\n \"vmSize\": \"small\",\r\n \"resizeTimeout\": \"PT5M\",\r\n \"currentDedicated\": 0,\r\n \"targetDedicated\": 0,\r\n \"enableAutoScale\": false,\r\n \"enableInterNodeCommunication\": false,\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct1.blob.core.windows.net/\",\r\n \"filePath\": \"filePath1\"\r\n },\r\n {\r\n \"blobSource\": \"https://testacct2.blob.core.windows.net/\",\r\n \"filePath\": \"filePath2\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"envName\",\r\n \"value\": \"envVal\"\r\n }\r\n ],\r\n \"runElevated\": false,\r\n \"maxTaskRetryCount\": 0,\r\n \"waitForSuccess\": false\r\n },\r\n \"metadata\": [\r\n {\r\n \"name\": \"poolMetaName\",\r\n \"value\": \"poolMetaValue\"\r\n }\r\n ],\r\n \"maxTasksPerNode\": 1,\r\n \"taskSchedulingPolicy\": {\r\n \"nodeFillType\": \"Spread\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "5308dd42-87c7-4aa3-88e1-6175e3ce9fab"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a053c0a0-770d-4bd4-bb7a-4963366c5f95"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FBE78D6D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/pools/testUpdate?updateproperties&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/dXBkYXRlcHJvcGVydGllcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct1.blob.core.windows.net/\",\r\n \"filePath\": \"filePath1\"\r\n },\r\n {\r\n \"blobSource\": \"https://testacct2.blob.core.windows.net/\",\r\n \"filePath\": \"filePath2\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"envName\",\r\n \"value\": \"envVal\"\r\n }\r\n ]\r\n },\r\n \"certificateReferences\": [],\r\n \"metadata\": [\r\n {\r\n \"name\": \"poolMetaName\",\r\n \"value\": \"poolMetaValue\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "575"
+ ],
+ "client-request-id": [
+ "dd2c4e22-065b-40b4-9a45-09c69a75e170"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "0"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "request-id": [
+ "60a1ee09-f23f-4561-a7f5-2af35ce0ac4c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "dd2c4e22-065b-40b4-9a45-09c69a75e170"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testUpdate"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FBE78D6D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 204
+ },
+ {
+ "RequestUri": "/pools/testUpdate?updateproperties&api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/dXBkYXRlcHJvcGVydGllcyZhcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"startTask\": {\r\n \"commandLine\": \"cmd /c dir /s\",\r\n \"resourceFiles\": [\r\n {\r\n \"blobSource\": \"https://testacct1.blob.core.windows.net/\",\r\n \"filePath\": \"filePath1\"\r\n },\r\n {\r\n \"blobSource\": \"https://testacct2.blob.core.windows.net/\",\r\n \"filePath\": \"filePath2\"\r\n }\r\n ],\r\n \"environmentSettings\": [\r\n {\r\n \"name\": \"envName\",\r\n \"value\": \"envVal\"\r\n }\r\n ]\r\n },\r\n \"certificateReferences\": [],\r\n \"metadata\": [\r\n {\r\n \"name\": \"poolMetaName\",\r\n \"value\": \"poolMetaValue\"\r\n }\r\n ]\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "575"
+ ],
+ "client-request-id": [
+ "dd2c4e22-065b-40b4-9a45-09c69a75e170"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "0"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "request-id": [
+ "60a1ee09-f23f-4561-a7f5-2af35ce0ac4c"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "dd2c4e22-065b-40b4-9a45-09c69a75e170"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/pools/testUpdate"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "ETag": [
+ "0x8D2B873FBE78D6D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 204
+ },
+ {
+ "RequestUri": "/pools/testUpdate?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "57654dda-bb01-40f2-9830-45a433d8e4e1"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9bb8bd1f-23be-42d3-b6a2-ce45eb9ade93"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "57654dda-bb01-40f2-9830-45a433d8e4e1"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/pools/testUpdate?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L3Bvb2xzL3Rlc3RVcGRhdGU/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "57654dda-bb01-40f2-9830-45a433d8e4e1"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "9bb8bd1f-23be-42d3-b6a2-ce45eb9ade93"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "57654dda-bb01-40f2-9830-45a433d8e4e1"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 17:36:09 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestUpdateTask.json b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestUpdateTask.json
new file mode 100644
index 000000000000..64bf2e582a37
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/SessionRecords/Microsoft.Azure.Commands.Batch.Test.ScenarioTests.TaskTests/TestUpdateTask.json
@@ -0,0 +1,1016 @@
+{
+ "Entries": [
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14987"
+ ],
+ "x-ms-request-id": [
+ "ea9432fa-9cc4-4a23-a5e4-a1d49cd533d9"
+ ],
+ "x-ms-correlation-request-id": [
+ "ea9432fa-9cc4-4a23-a5e4-a1d49cd533d9"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T180259Z:ea9432fa-9cc4-4a23-a5e4-a1d49cd533d9"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:02:58 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resources?$filter=resourceType%20eq%20'Microsoft.Batch%2FbatchAccounts'&api-version=2014-04-01-preview",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlcz8kZmlsdGVyPXJlc291cmNlVHlwZSUyMGVxJTIwJ01pY3Jvc29mdC5CYXRjaCUyRmJhdGNoQWNjb3VudHMnJmFwaS12ZXJzaW9uPTIwMTQtMDQtMDEtcHJldmlldw==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "User-Agent": [
+ "Microsoft.Azure.Management.Resources.ResourceManagementClient/2.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"name\": \"pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"eastus\"\r\n },\r\n {\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/Default-AzureBatch-WestUS/providers/Microsoft.Batch/batchAccounts/jaschneibatchtest\",\r\n \"name\": \"jaschneibatchtest\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\",\r\n \"location\": \"westus\"\r\n }\r\n ]\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "483"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14986"
+ ],
+ "x-ms-request-id": [
+ "152d9aba-cd51-4703-8c8b-223005e7077f"
+ ],
+ "x-ms-correlation-request-id": [
+ "152d9aba-cd51-4703-8c8b-223005e7077f"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T180302Z:152d9aba-cd51-4703-8c8b-223005e7077f"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:01 GMT"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:00 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "d977cc31-78f6-4398-bee9-87262f364651"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14966"
+ ],
+ "x-ms-request-id": [
+ "55fe863e-4d42-4451-b2cc-8b81e53baadd"
+ ],
+ "x-ms-correlation-request-id": [
+ "55fe863e-4d42-4451-b2cc-8b81e53baadd"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T180300Z:55fe863e-4d42-4451-b2cc-8b81e53baadd"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:02:59 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BBE3A60B"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"name\": \"pstests\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"accountEndpoint\": \"pstests.eastus.batch.azure.com\",\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests\",\r\n \"type\": \"Microsoft.Batch/batchAccounts\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "323"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "585c959c-99ba-467e-92d6-80d04522fcbb"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-reads": [
+ "14965"
+ ],
+ "x-ms-request-id": [
+ "094bf1fa-70ef-4ec1-a600-0959ea9fbddd"
+ ],
+ "x-ms-correlation-request-id": [
+ "094bf1fa-70ef-4ec1-a600-0959ea9fbddd"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T180302Z:094bf1fa-70ef-4ec1-a600-0959ea9fbddd"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:01 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BD0E0B4E"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "df71f5c2-d557-41cd-a265-f7e63d395b63"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1197"
+ ],
+ "x-ms-request-id": [
+ "81de6465-6c34-4cf6-9d37-cdf3f4559c20"
+ ],
+ "x-ms-correlation-request-id": [
+ "81de6465-6c34-4cf6-9d37-cdf3f4559c20"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T180300Z:81de6465-6c34-4cf6-9d37-cdf3f4559c20"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:02:59 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/subscriptions/6368ed38-3570-481f-b4fa-1d0a6e8d3f3b/resourceGroups/default-azurebatch-eastus/providers/Microsoft.Batch/batchAccounts/pstests/listKeys?api-version=2015-07-01",
+ "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvNjM2OGVkMzgtMzU3MC00ODFmLWI0ZmEtMWQwYTZlOGQzZjNiL3Jlc291cmNlR3JvdXBzL2RlZmF1bHQtYXp1cmViYXRjaC1lYXN0dXMvcHJvdmlkZXJzL01pY3Jvc29mdC5CYXRjaC9iYXRjaEFjY291bnRzL3BzdGVzdHMvbGlzdEtleXM/YXBpLXZlcnNpb249MjAxNS0wNy0wMQ==",
+ "RequestMethod": "POST",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "x-ms-version": [
+ "2015-07-01"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Management.Batch.BatchManagementClient/1.0.0.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"accountName\": \"pstests\",\r\n \"primary\": \"XXFZ+jAijJoB8YsqvHU7t0es8xUSVpgCoQ2sK1MxOWPFiMkBl1NhQ2TdzkmA9dH3YfXTaE26kMRRvYG1gax9gw==\",\r\n \"secondary\": \"Wk38jkxm7UKVR3Yp7x5IhHvPdLuzOEwVEXlwrF9DvTp0YhkP8zvG0Kc0BM4kMJP0wu9IEOHMwklmykjgikTchg==\"\r\n}",
+ "ResponseHeaders": {
+ "Content-Length": [
+ "229"
+ ],
+ "Content-Type": [
+ "application/json; charset=utf-8"
+ ],
+ "Expires": [
+ "-1"
+ ],
+ "Pragma": [
+ "no-cache"
+ ],
+ "request-id": [
+ "5ba4c8e7-4ec3-4ee6-92e0-7956db8a67b0"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "x-ms-ratelimit-remaining-subscription-writes": [
+ "1196"
+ ],
+ "x-ms-request-id": [
+ "c50fcfda-399f-404d-8c0d-f00632102c21"
+ ],
+ "x-ms-correlation-request-id": [
+ "c50fcfda-399f-404d-8c0d-f00632102c21"
+ ],
+ "x-ms-routing-request-id": [
+ "WESTUS:20150908T180302Z:c50fcfda-399f-404d-8c0d-f00632102c21"
+ ],
+ "Cache-Control": [
+ "no-cache"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:01 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnM/YXBpLXZlcnNpb249MjAxNS0wNi0wMS4yLjAmdGltZW91dD0zMA==",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"id\": \"updateTaskJob\",\r\n \"priority\": 0,\r\n \"poolInfo\": {\r\n \"poolId\": \"testPool\"\r\n }\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "96"
+ ],
+ "client-request-id": [
+ "c4c8ad9f-ab65-4df9-a2ae-c6491d2d76ce"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:00 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "501e2f0b-dba0-4b71-ab2c-6f17c50d4194"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "c4c8ad9f-ab65-4df9-a2ae-c6491d2d76ce"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/job-1"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:01 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BCDB3F6F"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/jobs/job-1"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"id\": \"testTask\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"runElevated\": true\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "93"
+ ],
+ "client-request-id": [
+ "9932cfc1-5971-439d-a6c8-b52f74e67e8f"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:01 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "07ee97b0-21a2-42b7-8913-17408e3ccfc6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9932cfc1-5971-439d-a6c8-b52f74e67e8f"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BCE3AE0D"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "POST",
+ "RequestBody": "{\r\n \"id\": \"testTask\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"runElevated\": true\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "93"
+ ],
+ "client-request-id": [
+ "9932cfc1-5971-439d-a6c8-b52f74e67e8f"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:01 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "07ee97b0-21a2-42b7-8913-17408e3ccfc6"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "9932cfc1-5971-439d-a6c8-b52f74e67e8f"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BCE3AE0D"
+ ],
+ "Location": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 201
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks/testTask?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcy90ZXN0VGFzaz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "31e9c8a8-17f1-4501-b9f1-eec6d9be8688"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8D2B877BCE3AE0D\",\r\n \"creationTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"lastModified\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"state\": \"running\",\r\n \"stateTransitionTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"runElevated\": true,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"retentionTime\": \"P10675199DT2H48M5.4775807S\",\r\n \"maxTaskRetryCount\": 0\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150904t230807z\",\r\n \"nodeUrl\": \"https://pstests.eastus.batch.azure.com/pools/testpool/nodes/tvm-3257026573_3-20150904t230807z\",\r\n \"poolId\": \"testpool\",\r\n \"nodeId\": \"tvm-3257026573_3-20150904t230807z\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "f87063ed-dd3a-4b10-aa78-c2655d5d8be3"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "31e9c8a8-17f1-4501-b9f1-eec6d9be8688"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BCE3AE0D"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks/testTask?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcy90ZXN0VGFzaz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "ec4c4d75-7ee6-45be-9e99-5ea4c46f32ab"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8D2B877BDC10C3C\",\r\n \"creationTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"lastModified\": \"2015-09-08T18:03:03.682566Z\",\r\n \"state\": \"running\",\r\n \"stateTransitionTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"runElevated\": true,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150904t230807z\",\r\n \"nodeUrl\": \"https://pstests.eastus.batch.azure.com/pools/testpool/nodes/tvm-3257026573_3-20150904t230807z\",\r\n \"poolId\": \"testpool\",\r\n \"nodeId\": \"tvm-3257026573_3-20150904t230807z\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "e95ef3ed-ceb9-4007-b17d-d29e2e1e2aba"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "ec4c4d75-7ee6-45be-9e99-5ea4c46f32ab"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BDC10C3C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks/testTask?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcy90ZXN0VGFzaz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "ec4c4d75-7ee6-45be-9e99-5ea4c46f32ab"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8D2B877BDC10C3C\",\r\n \"creationTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"lastModified\": \"2015-09-08T18:03:03.682566Z\",\r\n \"state\": \"running\",\r\n \"stateTransitionTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"runElevated\": true,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150904t230807z\",\r\n \"nodeUrl\": \"https://pstests.eastus.batch.azure.com/pools/testpool/nodes/tvm-3257026573_3-20150904t230807z\",\r\n \"poolId\": \"testpool\",\r\n \"nodeId\": \"tvm-3257026573_3-20150904t230807z\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "e95ef3ed-ceb9-4007-b17d-d29e2e1e2aba"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "ec4c4d75-7ee6-45be-9e99-5ea4c46f32ab"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BDC10C3C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks/testTask?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcy90ZXN0VGFzaz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "GET",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "ec4c4d75-7ee6-45be-9e99-5ea4c46f32ab"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "{\r\n \"odata.metadata\": \"https://pstests.eastus.batch.azure.com/$metadata#tasks/@Element\",\r\n \"id\": \"testTask\",\r\n \"url\": \"https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask\",\r\n \"eTag\": \"0x8D2B877BDC10C3C\",\r\n \"creationTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"lastModified\": \"2015-09-08T18:03:03.682566Z\",\r\n \"state\": \"running\",\r\n \"stateTransitionTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"previousState\": \"active\",\r\n \"previousStateTransitionTime\": \"2015-09-08T18:03:02.2318093Z\",\r\n \"commandLine\": \"ping -t localhost -w 60\",\r\n \"runElevated\": true,\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n },\r\n \"executionInfo\": {\r\n \"startTime\": \"2015-09-08T18:03:03.1105889Z\",\r\n \"retryCount\": 0,\r\n \"requeueCount\": 0\r\n },\r\n \"nodeInfo\": {\r\n \"affinityId\": \"TVM:tvm-3257026573_3-20150904t230807z\",\r\n \"nodeUrl\": \"https://pstests.eastus.batch.azure.com/pools/testpool/nodes/tvm-3257026573_3-20150904t230807z\",\r\n \"poolId\": \"testpool\",\r\n \"nodeId\": \"tvm-3257026573_3-20150904t230807z\"\r\n }\r\n}",
+ "ResponseHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "e95ef3ed-ceb9-4007-b17d-d29e2e1e2aba"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "ec4c4d75-7ee6-45be-9e99-5ea4c46f32ab"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BDC10C3C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks/testTask?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcy90ZXN0VGFzaz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n }\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "119"
+ ],
+ "client-request-id": [
+ "cd1829f9-a74d-4f4a-bd77-4659603348aa"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "d01a0c6b-6c3b-4cd0-8cb3-c6ebf546aeaa"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "cd1829f9-a74d-4f4a-bd77-4659603348aa"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BDC10C3C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob/tasks/testTask?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYi90YXNrcy90ZXN0VGFzaz9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "PUT",
+ "RequestBody": "{\r\n \"constraints\": {\r\n \"maxWallClockTime\": \"P10D\",\r\n \"retentionTime\": \"P2D\",\r\n \"maxTaskRetryCount\": 5\r\n }\r\n}",
+ "RequestHeaders": {
+ "Content-Type": [
+ "application/json; odata=minimalmetadata"
+ ],
+ "Content-Length": [
+ "119"
+ ],
+ "client-request-id": [
+ "cd1829f9-a74d-4f4a-bd77-4659603348aa"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:02 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Last-Modified": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "d01a0c6b-6c3b-4cd0-8cb3-c6ebf546aeaa"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "cd1829f9-a74d-4f4a-bd77-4659603348aa"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "DataServiceId": [
+ "https://pstests.eastus.batch.azure.com/jobs/updateTaskJob/tasks/testTask"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "ETag": [
+ "0x8D2B877BDC10C3C"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 200
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYj9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a31492a8-9932-419c-8295-5db9691c96b5"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "2680ea09-0088-42a5-98c4-77ca020370e8"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a31492a8-9932-419c-8295-5db9691c96b5"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYj9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a31492a8-9932-419c-8295-5db9691c96b5"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "2680ea09-0088-42a5-98c4-77ca020370e8"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a31492a8-9932-419c-8295-5db9691c96b5"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ },
+ {
+ "RequestUri": "/jobs/updateTaskJob?api-version=2015-06-01.2.0&timeout=30",
+ "EncodedRequestUri": "L2pvYnMvdXBkYXRlVGFza0pvYj9hcGktdmVyc2lvbj0yMDE1LTA2LTAxLjIuMCZ0aW1lb3V0PTMw",
+ "RequestMethod": "DELETE",
+ "RequestBody": "",
+ "RequestHeaders": {
+ "client-request-id": [
+ "a31492a8-9932-419c-8295-5db9691c96b5"
+ ],
+ "ocp-date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "return-client-request-id": [
+ "true"
+ ],
+ "User-Agent": [
+ "Microsoft.Azure.Batch.Protocol.BatchRestClient/2.0.1.0",
+ "AzBatch/2.0.1.0"
+ ]
+ },
+ "ResponseBody": "",
+ "ResponseHeaders": {
+ "Transfer-Encoding": [
+ "chunked"
+ ],
+ "request-id": [
+ "2680ea09-0088-42a5-98c4-77ca020370e8"
+ ],
+ "Strict-Transport-Security": [
+ "max-age=31536000; includeSubDomains"
+ ],
+ "client-request-id": [
+ "a31492a8-9932-419c-8295-5db9691c96b5"
+ ],
+ "DataServiceVersion": [
+ "3.0"
+ ],
+ "Date": [
+ "Tue, 08 Sep 2015 18:03:03 GMT"
+ ],
+ "Server": [
+ "Microsoft-HTTPAPI/2.0"
+ ]
+ },
+ "StatusCode": 202
+ }
+ ],
+ "Names": {},
+ "Variables": {
+ "SubscriptionId": "6368ed38-3570-481f-b4fa-1d0a6e8d3f3b"
+ }
+}
\ No newline at end of file
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs
index e53b3d02727d..93bc34be0a95 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/GetBatchTaskCommandTests.cs
@@ -56,7 +56,7 @@ public void GetBatchTaskParametersTest()
cmdlet.Filter = null;
// Build a CloudTask instead of querying the service on a List CloudTask call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
Assert.Throws(() => cmdlet.ExecuteCmdlet());
@@ -80,7 +80,7 @@ public void GetBatchTaskTest()
// Build a CloudTask instead of querying the service on a Get CloudTask call
CloudTaskGetResponse response = BatchTestHelpers.CreateCloudTaskGetResponse(cmdlet.Id);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -109,7 +109,7 @@ public void ListBatchTasksByODataFilterTest()
// Build some CloudTasks instead of querying the service on a List CloudTasks call
CloudTaskListResponse response = BatchTestHelpers.CreateCloudTaskListResponse(idsOfConstructedTasks);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -146,7 +146,7 @@ public void ListBatchTasksWithoutFiltersTest()
// Build some CloudTasks instead of querying the service on a List CloudTasks call
CloudTaskListResponse response = BatchTestHelpers.CreateCloudTaskListResponse(idsOfConstructedTasks);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
@@ -188,7 +188,7 @@ public void ListTasksMaxCountTest()
// Build some CloudTasks instead of querying the service on a List CloudTasks call
CloudTaskListResponse response = BatchTestHelpers.CreateCloudTaskListResponse(idsOfConstructedTasks);
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor(response);
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor(response);
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Setup the cmdlet to write pipeline output to a list that can be examined later
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs
index cbafce4f22ea..b34da1139b4c 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/NewBatchTaskCommandTests.cs
@@ -59,7 +59,7 @@ public void NewBatchTaskParametersTest()
cmdlet.Id = "testTask";
// Don't go to the service on an Add CloudTask call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs
index a447f2c5de36..158eabdd0736 100644
--- a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/RemoveBatchTaskCommandTests.cs
@@ -60,7 +60,7 @@ public void RemoveBatchTaskParametersTest()
cmdlet.Id = "testTask";
// Don't go to the service on a Delete CloudTask call
- RequestInterceptor interceptor = BatchTestHelpers.CreateNoOpInterceptor();
+ RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor();
cmdlet.AdditionalBehaviors = new List() { interceptor };
// Verify no exceptions when required parameters are set
diff --git a/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs
new file mode 100644
index 000000000000..552d6bc87147
--- /dev/null
+++ b/src/ResourceManager/AzureBatch/Commands.Batch.Test/Tasks/SetBatchTaskCommandTests.cs
@@ -0,0 +1,64 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using Microsoft.Azure.Batch;
+using Microsoft.Azure.Batch.Protocol;
+using Microsoft.Azure.Batch.Protocol.Models;
+using Microsoft.Azure.Commands.Batch.Models;
+using Microsoft.WindowsAzure.Commands.ScenarioTest;
+using Moq;
+using System.Management.Automation;
+using Xunit;
+using BatchClient = Microsoft.Azure.Commands.Batch.Models.BatchClient;
+
+namespace Microsoft.Azure.Commands.Batch.Test.Tasks
+{
+ public class SetBatchTaskCommandTests
+ {
+ private SetBatchTaskCommand cmdlet;
+ private Mock batchClientMock;
+ private Mock commandRuntimeMock;
+
+ public SetBatchTaskCommandTests()
+ {
+ batchClientMock = new Mock