From c12bfc41645bf7142516fbc626d85a7db609403f Mon Sep 17 00:00:00 2001 From: NickKouds Date: Tue, 20 Jun 2023 12:14:40 -0700 Subject: [PATCH] Modified Batch Track 2 Test format and included sanitizers with custom matchers (#35470) * Extended BatchTestBase from TestProxyTestBase and added sanitzations * Added sanitization rule for http url * Updated azure-core-test versions and migrated test files outside of generated folder * Added custom playback rules and matchers * Added test recording json files * Refactored Shared Key test setup --- sdk/batch/azure-compute-batch/pom.xml | 4 +- .../BatchServiceClientTestBase.java | 57 +- .../batch/{generated => }/JobTests.java | 3 +- .../batch/{generated => }/PoolTests.java | 3 +- .../batch/{generated => }/SharedKeyTests.java | 24 +- .../batch/{generated => }/TaskTests.java | 20 +- ...nCRUDJobWithPoolNodeCommunicationMode.json | 364 +++ .../session-records/JobTests.canCrudJob.json | 519 ++++ .../PoolTests.canCRUDLowPriIaaSPool.json | 2346 +++++++++++++++++ .../PoolTests.canCreateDataDisk.json | 273 ++ .../PoolTests.testPoolOData.json | 154 ++ .../SharedKeyTests.testPoolCRUD.json | 367 +++ .../TaskTests.canCRUDTest.json | 679 +++++ .../TaskTests.testJobUser.json | 554 ++++ 14 files changed, 5320 insertions(+), 47 deletions(-) rename sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/{generated => }/BatchServiceClientTestBase.java (90%) rename sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/{generated => }/JobTests.java (99%) rename sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/{generated => }/PoolTests.java (99%) rename sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/{generated => }/SharedKeyTests.java (82%) rename sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/{generated => }/TaskTests.java (93%) create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCRUDJobWithPoolNodeCommunicationMode.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCrudJob.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCRUDLowPriIaaSPool.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCreateDataDisk.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.testPoolOData.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/SharedKeyTests.testPoolCRUD.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.canCRUDTest.json create mode 100644 sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.testJobUser.json diff --git a/sdk/batch/azure-compute-batch/pom.xml b/sdk/batch/azure-compute-batch/pom.xml index a2573d11e232a..2bde23ab67216 100644 --- a/sdk/batch/azure-compute-batch/pom.xml +++ b/sdk/batch/azure-compute-batch/pom.xml @@ -48,7 +48,7 @@ com.azure azure-core - 1.37.0 + 1.40.0 com.azure @@ -76,7 +76,7 @@ com.azure azure-core-test - 1.15.0 + 1.18.0 test diff --git a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/BatchServiceClientTestBase.java b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/BatchServiceClientTestBase.java similarity index 90% rename from sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/BatchServiceClientTestBase.java rename to sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/BatchServiceClientTestBase.java index a51ea496572ce..e3618251246c0 100644 --- a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/BatchServiceClientTestBase.java +++ b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/BatchServiceClientTestBase.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.compute.batch.generated; +package com.azure.compute.batch; import com.azure.compute.batch.*; import com.azure.compute.batch.auth.BatchSharedKeyCredentials; @@ -12,8 +12,13 @@ import com.azure.core.http.policy.HttpLogDetailLevel; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.test.TestBase; +import com.azure.core.test.InterceptorManager; import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.test.models.CustomMatcher; +import com.azure.core.test.models.TestProxyRequestMatcher; +import com.azure.core.test.models.TestProxySanitizer; +import com.azure.core.test.models.TestProxySanitizerType; import com.azure.core.util.Configuration; import com.azure.identity.DefaultAzureCredentialBuilder; @@ -42,7 +47,7 @@ import org.junit.Assert; -class BatchServiceClientTestBase extends TestBase { +class BatchServiceClientTestBase extends TestProxyTestBase { protected BatchServiceClientBuilder batchClientBuilder; protected ApplicationsClient applicationsClient; @@ -67,12 +72,15 @@ class BatchServiceClientTestBase extends TestBase { static final int MAX_LEN_ID = 64; + static String REDACTED = "REDACTED"; + public enum AuthMode { AAD, SharedKey } - + @Override protected void beforeTest() { + super.beforeTest(); batchClientBuilder = new BatchServiceClientBuilder() .endpoint(Configuration.getGlobalConfiguration().get("AZURE_BATCH_ENDPOINT", "endpoint")) @@ -82,8 +90,11 @@ protected void beforeTest() { batchClientBuilder .httpClient(interceptorManager.getPlaybackClient()) .credential(request -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX))); + + addTestRulesOnPlayback(interceptorManager); } else if (getTestMode() == TestMode.RECORD) { batchClientBuilder.addPolicy(interceptorManager.getRecordPolicy()); + addTestSanitizersAndRules(interceptorManager); } authenticateClient(AuthMode.AAD); @@ -99,7 +110,21 @@ protected void beforeTest() { computeNodesClient = batchClientBuilder.buildComputeNodesClient(); computeNodeExtensionsClient = batchClientBuilder.buildComputeNodeExtensionsClient(); } - + + public void addTestRulesOnPlayback(InterceptorManager interceptorManager) { + List customMatchers = new ArrayList<>(); + customMatchers.add(new CustomMatcher().setComparingBodies(false)); + customMatchers.add(new CustomMatcher().setExcludedHeaders(Collections.singletonList("ocp-date"))); + interceptorManager.addMatchers(customMatchers); + } + + public void addTestSanitizersAndRules(InterceptorManager interceptorManager) { + List testProxySanitizers = new ArrayList(); + testProxySanitizers.add(new TestProxySanitizer("$..httpUrl", null,REDACTED, TestProxySanitizerType.BODY_KEY)); + testProxySanitizers.add(new TestProxySanitizer("$..containerUrl", null,REDACTED, TestProxySanitizerType.BODY_KEY)); + interceptorManager.addSanitizers(testProxySanitizers); + } + void authenticateClient(AuthMode auth) { if (getTestMode() == TestMode.RECORD) { if (auth == AuthMode.AAD) { @@ -138,7 +163,7 @@ static String getStringIdWithUserNamePrefix(String name) { } return out.toString(); } - + BatchPool createIfNotExistIaaSPool(String poolId) throws Exception { // Create a pool with 3 Small VMs String poolVmSize = "STANDARD_D1_V2"; @@ -147,7 +172,7 @@ BatchPool createIfNotExistIaaSPool(String poolId) throws Exception { // 10 minutes long poolSteadyTimeoutInSeconds = 10 * 60 * 1000; PoolClient poolClient = batchClientBuilder.buildPoolClient(); - + // Check if pool exists if (!poolExists(poolClient, poolId)) { @@ -164,7 +189,7 @@ BatchPool createIfNotExistIaaSPool(String poolId) throws Exception { // Need VNet to allow security to inject NSGs NetworkConfiguration networkConfiguration = createNetworkConfiguration(); - + BatchPool poolToAdd = new BatchPool(); poolToAdd.setId(poolId).setTargetDedicatedNodes(poolVmCount).setVmSize(poolVmSize) .setVirtualMachineConfiguration(configuration) @@ -172,13 +197,13 @@ BatchPool createIfNotExistIaaSPool(String poolId) throws Exception { .setNetworkConfiguration(networkConfiguration); poolClient.add(poolToAdd); - } + } else { System.out.println(String.format("The %s already exists.", poolId)); //logger.log(createLogRecord(Level.INFO, String.format("The %s already exists.", poolId))); } - - + + long startTime = System.currentTimeMillis(); long elapsedTime = 0L; boolean steady = false; @@ -200,7 +225,7 @@ BatchPool createIfNotExistIaaSPool(String poolId) throws Exception { return pool; } - + NetworkConfiguration createNetworkConfiguration(){ Configuration localConfig = Configuration.getGlobalConfiguration(); String vnetName = localConfig.get("AZURE_VNET", ""); @@ -219,12 +244,12 @@ NetworkConfiguration createNetworkConfiguration(){ PagedIterable networks = manager.networks().listByResourceGroup(vnetResourceGroup); boolean networksFound = false; - + for (Network network: networks) { networksFound = true; break; } - + if (!networksFound) { Network network = manager.networks().define(vnetName) .withRegion(localConfig.get("AZURE_BATCH_REGION")) @@ -244,7 +269,7 @@ NetworkConfiguration createNetworkConfiguration(){ return new NetworkConfiguration().setSubnetId(vNetResourceId); } - + void threadSleepInRecordMode(long millis) throws InterruptedException { // Called for long timeouts which should only happen in Record mode. // Speeds up the tests in Playback mode. @@ -252,7 +277,7 @@ void threadSleepInRecordMode(long millis) throws InterruptedException { Thread.sleep(millis); } } - + static boolean poolExists(PoolClient poolClient, String poolId) { try { poolClient.exists(poolId); diff --git a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/JobTests.java b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/JobTests.java similarity index 99% rename from sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/JobTests.java rename to sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/JobTests.java index 24e278fbc5eec..853ff82825d58 100644 --- a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/JobTests.java +++ b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/JobTests.java @@ -1,12 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -package com.azure.compute.batch.generated; +package com.azure.compute.batch; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import com.azure.compute.batch.JobClient; import com.azure.compute.batch.models.AutoPoolSpecification; import com.azure.compute.batch.models.BatchJob; import com.azure.compute.batch.models.BatchPool; diff --git a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/PoolTests.java b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/PoolTests.java similarity index 99% rename from sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/PoolTests.java rename to sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/PoolTests.java index d9e808e0bf7d4..5409bf6c6c785 100644 --- a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/PoolTests.java +++ b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/PoolTests.java @@ -1,9 +1,8 @@ -package com.azure.compute.batch.generated; +package com.azure.compute.batch; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import com.azure.compute.batch.ComputeNodesClient; import com.azure.compute.batch.models.AllocationState; import com.azure.compute.batch.models.BatchPool; import com.azure.compute.batch.models.BatchPoolResizeParameters; diff --git a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/SharedKeyTests.java b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/SharedKeyTests.java similarity index 82% rename from sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/SharedKeyTests.java rename to sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/SharedKeyTests.java index 021ebd6bacb6c..dd9a407bc808a 100644 --- a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/SharedKeyTests.java +++ b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/SharedKeyTests.java @@ -1,7 +1,5 @@ -package com.azure.compute.batch.generated; +package com.azure.compute.batch; -import com.azure.compute.batch.BatchServiceClientBuilder; -import com.azure.compute.batch.PoolClient; import com.azure.compute.batch.auth.BatchSharedKeyCredentials; import com.azure.compute.batch.models.*; import com.azure.core.credential.AccessToken; @@ -27,7 +25,6 @@ import static java.time.OffsetDateTime.now; public class SharedKeyTests extends BatchServiceClientTestBase { - private static BatchServiceClientBuilder clientBuilderWithSharedKey; private static PoolClient poolClientWithSharedKey; private final String sharedKeyPoolId = "SharedKey-testpool"; private final String vmSize = "STANDARD_D1_V2"; @@ -35,23 +32,10 @@ public class SharedKeyTests extends BatchServiceClientTestBase { @Override protected void beforeTest() { + super.beforeTest(); BatchSharedKeyCredentials sharedKeyCred = getSharedKeyCredentials(); - clientBuilderWithSharedKey = - new BatchServiceClientBuilder() - .endpoint(Configuration.getGlobalConfiguration().get("AZURE_BATCH_ENDPOINT", "endpoint")) - .httpClient(HttpClient.createDefault()) - .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)) - .credential(sharedKeyCred); - - if (getTestMode() == TestMode.PLAYBACK) { - clientBuilderWithSharedKey - .httpClient(interceptorManager.getPlaybackClient()) - .credential(request -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX))); - } else if (getTestMode() == TestMode.RECORD) { - clientBuilderWithSharedKey.addPolicy(interceptorManager.getRecordPolicy()); - } - - poolClientWithSharedKey = clientBuilderWithSharedKey.buildPoolClient(); + batchClientBuilder.credential(sharedKeyCred); + poolClientWithSharedKey = batchClientBuilder.buildPoolClient(); } @Test diff --git a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/TaskTests.java b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/TaskTests.java similarity index 93% rename from sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/TaskTests.java rename to sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/TaskTests.java index 6eb9a21a68acd..1cb994804e018 100644 --- a/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/generated/TaskTests.java +++ b/sdk/batch/azure-compute-batch/src/test/java/com/azure/compute/batch/TaskTests.java @@ -1,6 +1,5 @@ -package com.azure.compute.batch.generated; +package com.azure.compute.batch; -import com.azure.compute.batch.FileClient; import com.azure.compute.batch.models.*; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.BinaryData; @@ -66,7 +65,12 @@ public void testJobUser() throws Exception { Assertions.assertNotNull(task); Assertions.assertEquals(taskId, task.getId()); Assertions.assertEquals("test-user", task.getUserIdentity().getUsername()); - Assertions.assertEquals("msmpi", task.getApplicationPackageReferences().get(0).getApplicationId()); + + //Recording file automatically sanitizes Application Id - Only verify App Id in Record Mode + if (getTestMode() == TestMode.RECORD) { + Assertions.assertEquals("msmpi", task.getApplicationPackageReferences().get(0).getApplicationId()); + } + } finally { try { @@ -103,11 +107,14 @@ public void canCRUDTest() throws Exception { //The Storage operations run only in Record mode. // Playback mode is configured to test Batch operations only. - if (getTestMode() == TestMode.RECORD) { + if (getTestMode() != TestMode.PLAYBACK) { // Create storage container container = createBlobContainer(storageAccountName, storageAccountKey, "testingtaskcreate"); sas = uploadFileToCloud(container, BLOB_FILE_NAME, temp.getAbsolutePath()); } + else { + sas = REDACTED; + } // Associate resource file with task ResourceFile file = new ResourceFile(); @@ -165,9 +172,12 @@ public void canCRUDTest() throws Exception { //The Storage operations run only in Record mode. // Playback mode is configured to test Batch operations only. - if (getTestMode() == TestMode.RECORD) { + if (getTestMode() != TestMode.PLAYBACK) { outputSas = generateContainerSasToken(container); } + else { + outputSas = REDACTED; + } // UPLOAD LOG UploadBatchServiceLogsConfiguration logsConfiguration = new UploadBatchServiceLogsConfiguration(outputSas, OffsetDateTime.now().minusMinutes(-10)); UploadBatchServiceLogsResult uploadBatchServiceLogsResult = batchClientBuilder.buildComputeNodesClient().uploadBatchServiceLogs(liveIaasPoolId, task.getNodeInfo().getNodeId(), logsConfiguration); diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCRUDJobWithPoolNodeCommunicationMode.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCRUDJobWithPoolNodeCommunicationMode.json new file mode 100644 index 0000000000000..374d78f41a17f --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCRUDJobWithPoolNodeCommunicationMode.json @@ -0,0 +1,364 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:33 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "4cbfdf40-6bf1-45b7-ba29-50348e7cff63" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:33 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "09114b24-6b1e-4490-83ba-931bb0e0021d", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "0e6c240b-5ccb-414d-a262-d53d0efbe9a3" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:33 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "46000670-c1f3-4223-bcb3-5571302feb13", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/jobs?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "368", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c34f83e1-2645-4967-bafd-220cb6d7972b" + }, + "RequestBody": { + "id": "BatchUser-Job-canCRUDWithPoolNodeComm", + "poolInfo": { + "autoPoolSpecification": { + "poolLifetimeOption": "job", + "pool": { + "vmSize": "STANDARD_D1_V2", + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "simplified" + } + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088AE174B", + "Last-Modified": "Tue, 13 Jun 2023 20:55:34 GMT", + "Location": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "request-id": "b670889b-cec5-4017-8fa0-e73fcc3f8cf4", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUDWithPoolNodeComm?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "6bb2e4f7-31fb-470e-abc6-7c4ad356c0db" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088AE174B", + "Last-Modified": "Tue, 13 Jun 2023 20:55:34 GMT", + "request-id": "4abb305e-7594-4c13-8795-2946d729be84", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#jobs/@Element", + "id": "BatchUser-Job-canCRUDWithPoolNodeComm", + "url": "REDACTED", + "eTag": "0x8DB6C5088AE174B", + "lastModified": "2023-06-13T20:55:34.9351243Z", + "creationTime": "2023-06-13T20:55:34.9211094Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:55:34.9351243Z", + "priority": 0, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "autoPoolSpecification": { + "poolLifetimeOption": "job", + "keepAlive": false, + "pool": { + "vmSize": "standard_d1_v2", + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "resizeTimeout": "PT15M", + "targetDedicatedNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "simplified" + } + } + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9351243Z", + "poolId": "54C7B3D9-E9C6-4A2D-B7CD-19803436C515" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUDWithPoolNodeComm?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "d97d5e83-4649-40a6-be3d-e888ed04bace" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "request-id": "8c5b46d1-13ab-418c-8b11-131d95db8747", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUDWithPoolNodeComm?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e8ce83d0-ac9a-41bc-9d92-d3cd867d9133" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088AE174B", + "Last-Modified": "Tue, 13 Jun 2023 20:55:34 GMT", + "request-id": "ddb1b354-20c7-4c82-97ec-0dc8e7b9234f", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#jobs/@Element", + "id": "BatchUser-Job-canCRUDWithPoolNodeComm", + "url": "REDACTED", + "eTag": "0x8DB6C5088AE174B", + "lastModified": "2023-06-13T20:55:34.9351243Z", + "creationTime": "2023-06-13T20:55:34.9211094Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:55:35.0451167Z", + "previousState": "active", + "previousStateTransitionTime": "2023-06-13T20:55:34.9351243Z", + "priority": 0, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "autoPoolSpecification": { + "poolLifetimeOption": "job", + "keepAlive": false, + "pool": { + "vmSize": "standard_d1_v2", + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "resizeTimeout": "PT15M", + "targetDedicatedNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "simplified" + } + } + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9351243Z", + "poolId": "54C7B3D9-E9C6-4A2D-B7CD-19803436C515" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUDWithPoolNodeComm?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:51 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "2f280d2a-f5bf-49d9-9f6f-db1f6d47e137" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Content-Length": "326", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:50 GMT", + "request-id": "eefdabcd-258e-4daa-bba2-fa3f8200d277", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element", + "code": "JobNotFound", + "message": { + "lang": "en-US", + "value": "The specified job does not exist.\nRequestId:eefdabcd-258e-4daa-bba2-fa3f8200d277\nTime:2023-06-13T20:55:50.1501998Z" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCrudJob.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCrudJob.json new file mode 100644 index 0000000000000..7bc3f62901d46 --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/JobTests.canCrudJob.json @@ -0,0 +1,519 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:33 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "51e4bc28-d256-452b-bf83-6f38f6d97eb3" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:33 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "a154d886-d4a6-4c1d-a082-ebd4f1088691", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "67b34797-59af-4600-8ab2-787a7e7c7c86" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:33 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "376903c7-0f23-4f9d-836c-bd1e1900ea9e", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/jobs?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "73", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "fa5936ba-cb6a-4541-b828-855548560fbf" + }, + "RequestBody": { + "id": "BatchUser-Job-canCRUD", + "poolInfo": { + "poolId": "BatchUser-testpool" + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088AB57D4", + "Last-Modified": "Tue, 13 Jun 2023 20:55:34 GMT", + "Location": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "request-id": "b76a3735-17bf-4a56-a466-5796568fac6f", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUD?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "f7caaa67-b39d-4ff4-b38b-8a03701dde54" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088AB57D4", + "Last-Modified": "Tue, 13 Jun 2023 20:55:34 GMT", + "request-id": "52b0f13c-8eb4-455c-9975-1fe685618cf0", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#jobs/@Element", + "id": "BatchUser-Job-canCRUD", + "url": "REDACTED", + "eTag": "0x8DB6C5088AB57D4", + "lastModified": "2023-06-13T20:55:34.9171156Z", + "creationTime": "2023-06-13T20:55:34.9021069Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:55:34.9171156Z", + "priority": 0, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "poolId": "BatchUser-testpool" + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9171156Z", + "poolId": "BatchUser-testpool" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + } + }, + { + "RequestUri": "https://REDACTED/jobs?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "443ff883-aceb-4339-9136-6f7b54023dbd" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "request-id": "fc152ba8-c237-4fc9-ae37-55687aa4d58a", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#jobs", + "value": [ + { + "id": "BatchUser-Job-canCRUD", + "url": "REDACTED", + "eTag": "0x8DB6C5088AB57D4", + "lastModified": "2023-06-13T20:55:34.9171156Z", + "creationTime": "2023-06-13T20:55:34.9021069Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:55:34.9171156Z", + "priority": 0, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "poolId": "BatchUser-testpool" + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9171156Z", + "poolId": "BatchUser-testpool" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + }, + { + "id": "BatchUser-Job-canCRUDWithPoolNodeComm", + "url": "REDACTED", + "eTag": "0x8DB6C5088AE174B", + "lastModified": "2023-06-13T20:55:34.9351243Z", + "creationTime": "2023-06-13T20:55:34.9211094Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:55:34.9351243Z", + "priority": 0, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "autoPoolSpecification": { + "poolLifetimeOption": "job", + "keepAlive": false, + "pool": { + "vmSize": "standard_d1_v2", + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "resizeTimeout": "PT15M", + "targetDedicatedNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "simplified" + } + } + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9351243Z", + "poolId": "54C7B3D9-E9C6-4A2D-B7CD-19803436C515" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + }, + { + "id": "job_1", + "url": "REDACTED", + "eTag": "0x8DB33F3EF1482B3", + "lastModified": "2023-04-03T03:31:38.4225459Z", + "creationTime": "2023-04-03T03:31:38.4105511Z", + "state": "active", + "stateTransitionTime": "2023-04-03T03:31:38.4225459Z", + "priority": 0, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "commonEnvironmentSettings": [], + "poolInfo": { + "poolId": "BatchUser-testIaaSpool" + }, + "executionInfo": { + "startTime": "2023-04-03T03:31:38.4225459Z", + "poolId": "BatchUser-testIaaSpool" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUD?api-version=2022-10-01.16.0", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "86", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "a6f835f0-ae67-44de-8f69-616b88627e9f" + }, + "RequestBody": { + "id": "BatchUser-Job-canCRUD", + "priority": 1, + "poolInfo": { + "poolId": "BatchUser-testpool" + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/BatchUser-Job-canCRUD", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088C7E09A", + "Last-Modified": "Tue, 13 Jun 2023 20:55:35 GMT", + "request-id": "cf4c65b6-204b-4f63-9163-e4394d34cba7", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUD?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "144cee7a-5362-4b9f-b786-0000e550604e" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088C7E09A", + "Last-Modified": "Tue, 13 Jun 2023 20:55:35 GMT", + "request-id": "92d3f892-f3ff-45ca-9bd6-903aa56c396a", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#jobs/@Element", + "id": "BatchUser-Job-canCRUD", + "url": "REDACTED", + "eTag": "0x8DB6C5088C7E09A", + "lastModified": "2023-06-13T20:55:35.1041178Z", + "creationTime": "2023-06-13T20:55:34.9021069Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:55:34.9171156Z", + "priority": 1, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "poolId": "BatchUser-testpool" + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9171156Z", + "poolId": "BatchUser-testpool" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUD?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c2902c31-b624-42b8-a6fa-aaf4c0c015a2" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "request-id": "b2c84de3-666b-452d-a0f6-c0fd88135e52", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUD?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:36 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "252865e1-819a-4789-b23f-4b22929b931d" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:34 GMT", + "ETag": "0x8DB6C5088C7E09A", + "Last-Modified": "Tue, 13 Jun 2023 20:55:35 GMT", + "request-id": "79312871-f5c0-4ea3-ad25-acf1aacf9f71", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#jobs/@Element", + "id": "BatchUser-Job-canCRUD", + "url": "REDACTED", + "eTag": "0x8DB6C5088C7E09A", + "lastModified": "2023-06-13T20:55:35.1041178Z", + "creationTime": "2023-06-13T20:55:34.9021069Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:55:35.1891225Z", + "previousState": "active", + "previousStateTransitionTime": "2023-06-13T20:55:34.9171156Z", + "priority": 1, + "maxParallelTasks": -1, + "usesTaskDependencies": false, + "allowTaskPreemption": false, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "maxTaskRetryCount": 0 + }, + "poolInfo": { + "poolId": "BatchUser-testpool" + }, + "executionInfo": { + "startTime": "2023-06-13T20:55:34.9171156Z", + "poolId": "BatchUser-testpool" + }, + "onAllTasksComplete": "noaction", + "onTaskFailure": "noaction" + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-Job-canCRUD?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:55:37 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "7fd926dc-53aa-412f-8932-f04b026342e2" + }, + "RequestBody": null, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "375", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:55:35 GMT", + "request-id": "f06ac33e-68cd-4052-a88c-bfad22661c17", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element", + "code": "JobBeingDeleted", + "message": { + "lang": "en-US", + "value": "The specified job has been marked for deletion and is being garbage collected.\nRequestId:f06ac33e-68cd-4052-a88c-bfad22661c17\nTime:2023-06-13T20:55:36.2985099Z" + } + } + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCRUDLowPriIaaSPool.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCRUDLowPriIaaSPool.json new file mode 100644 index 0000000000000..46352f3205994 --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCRUDLowPriIaaSPool.json @@ -0,0 +1,2346 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "25fba4b4-9e7a-4178-b9c0-eb76bd338a46" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "9bfa4cb9-3268-4739-a5f7-0c9d32e9bf64", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:48:59 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "bd147cfc-73a2-482a-b4bf-dcfe7689bc18" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "6dfb7fd2-a5dc-4b6b-81a3-d683c411e957", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e211cbb2-8eb8-4559-8097-5f3a8338694c" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:59 GMT", + "request-id": "1744fb92-ee12-4fb1-9a33-9216201e4098", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "691", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:49:01 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c75b19bc-05f8-42bd-aaec-e2bb7ba93ed2" + }, + "RequestBody": { + "id": "BatchUser-canCRUDLowPri-testPool", + "vmSize": "STANDARD_D1_V2", + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetDedicatedNodes": 2, + "targetLowPriorityNodes": 2, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "default" + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/BatchUser-canCRUDLowPri-testPool", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "ETag": "0x8DB6C4F9DE42285", + "Last-Modified": "Tue, 13 Jun 2023 20:49:01 GMT", + "Location": "https://sdktest.westus.batch.azure.com/pools/BatchUser-canCRUDLowPri-testPool", + "request-id": "c284563d-a189-4bf2-8e8d-a0842c8b1020", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:02 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "82963362-7c17-46a9-8d75-b46fddc7e9d4" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "ETag": "0x8DB6C4F9DE42285", + "Last-Modified": "Tue, 13 Jun 2023 20:49:01 GMT", + "request-id": "84761a77-1882-4935-b136-10a887dd0002", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:02 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "0a780753-94eb-4132-9601-a43f226146a2" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "ETag": "0x8DB6C4F9DE42285", + "Last-Modified": "Tue, 13 Jun 2023 20:49:01 GMT", + "request-id": "6001123d-57b0-47dc-aafa-a527048df278", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4F9DE42285", + "lastModified": "2023-06-13T20:49:01.0247301Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 2, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "default" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "bf0d2159-5929-4406-8615-bd6e9a9834b3" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:30 GMT", + "ETag": "0x8DB6C4F9DE42285", + "Last-Modified": "Tue, 13 Jun 2023 20:49:01 GMT", + "request-id": "e2d67c99-4b3a-459b-a459-fece9b88bf8a", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4F9DE42285", + "lastModified": "2023-06-13T20:49:01.0247301Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 2, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "default" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:02 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "a9020fa8-399a-4e4c-a743-e7c405090815" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:00 GMT", + "ETag": "0x8DB6C4F9DE42285", + "Last-Modified": "Tue, 13 Jun 2023 20:49:01 GMT", + "request-id": "2c434de2-2aec-489c-bba4-c2bea05e56fb", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4F9DE42285", + "lastModified": "2023-06-13T20:49:01.0247301Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 2, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "default" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c5891345-1acb-47aa-bf80-fa40efe39219" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:30 GMT", + "ETag": "0x8DB6C4F9DE42285", + "Last-Modified": "Tue, 13 Jun 2023 20:49:01 GMT", + "request-id": "74e69080-500b-49d9-ad34-31033219817e", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4F9DE42285", + "lastModified": "2023-06-13T20:49:01.0247301Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-06-13T20:50:02.9694366Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 2, + "targetLowPriorityNodes": 2, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "default", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool/nodes?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "582ce453-4441-436f-a6d4-c77e820fadf6" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:30 GMT", + "request-id": "faab989a-d448-41f1-88aa-f5b95eadc980", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#nodes", + "value": [ + { + "id": "tvmps_6483436eec7f0939a4ce139cfd41e4723e96aaef427603a00d4436672dd3ab96_d", + "url": "REDACTED", + "state": "idle", + "schedulingState": "enabled", + "stateTransitionTime": "2023-06-13T20:50:09.518423Z", + "lastBootTime": "2023-06-13T20:50:09.450717Z", + "allocationTime": "2023-06-13T20:49:52.3463635Z", + "ipAddress": "10.1.0.4", + "affinityId": "TVM:tvmps_6483436eec7f0939a4ce139cfd41e4723e96aaef427603a00d4436672dd3ab96_d", + "vmSize": "standard_d1_v2", + "totalTasksRun": 0, + "totalTasksSucceeded": 0, + "runningTasksCount": 0, + "runningTaskSlotsCount": 0, + "certificateReferences": [], + "isDedicated": true, + "endpointConfiguration": { + "inboundEndpoints": [ + { + "name": "testinbound.0", + "protocol": "tcp", + "publicIPAddress": "20.237.204.30", + "publicFQDN": "dns1c6f8c73-d8a1-4c99-9f35-3a5bb61f1604-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 60000, + "backendPort": 5000 + }, + { + "name": "SSHRule.0", + "protocol": "tcp", + "publicIPAddress": "20.237.204.30", + "publicFQDN": "dns1c6f8c73-d8a1-4c99-9f35-3a5bb61f1604-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 50000, + "backendPort": 22 + } + ] + }, + "nodeAgentInfo": { + "lastUpdateTime": "2023-06-13T20:50:09.450717Z", + "version": "1.10.0" + }, + "virtualMachineInfo": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest", + "exactVersion": "18.04.202305220" + } + } + }, + { + "id": "tvmps_6cf37904737b2ad1402e6a90a7c2d35f1c40e56d5fab419ea38f25ae4d48a75d_p", + "url": "REDACTED", + "state": "idle", + "schedulingState": "enabled", + "stateTransitionTime": "2023-06-13T20:50:08.045942Z", + "lastBootTime": "2023-06-13T20:50:07.987183Z", + "allocationTime": "2023-06-13T20:50:02.3738741Z", + "ipAddress": "10.1.0.6", + "affinityId": "TVM:tvmps_6cf37904737b2ad1402e6a90a7c2d35f1c40e56d5fab419ea38f25ae4d48a75d_p", + "vmSize": "standard_d1_v2", + "totalTasksRun": 0, + "totalTasksSucceeded": 0, + "runningTasksCount": 0, + "runningTaskSlotsCount": 0, + "certificateReferences": [], + "isDedicated": false, + "endpointConfiguration": { + "inboundEndpoints": [ + { + "name": "testinbound.0", + "protocol": "tcp", + "publicIPAddress": "20.237.205.120", + "publicFQDN": "dnsbe370ed9-6e37-4856-8895-f4a2d678c3b7-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 60000, + "backendPort": 5000 + }, + { + "name": "SSHRule.0", + "protocol": "tcp", + "publicIPAddress": "20.237.205.120", + "publicFQDN": "dnsbe370ed9-6e37-4856-8895-f4a2d678c3b7-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 50000, + "backendPort": 22 + } + ] + }, + "nodeAgentInfo": { + "lastUpdateTime": "2023-06-13T20:50:07.987183Z", + "version": "1.10.0" + }, + "virtualMachineInfo": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest", + "exactVersion": "18.04.202305220" + } + } + }, + { + "id": "tvmps_7ad0613ffd5dfb40627b052d4e351d76341ff93a4ffb7757055a838c18f5cc96_p", + "url": "REDACTED", + "state": "idle", + "schedulingState": "enabled", + "stateTransitionTime": "2023-06-13T20:50:15.066687Z", + "lastBootTime": "2023-06-13T20:50:15.003574Z", + "allocationTime": "2023-06-13T20:50:02.3738741Z", + "ipAddress": "10.1.0.7", + "affinityId": "TVM:tvmps_7ad0613ffd5dfb40627b052d4e351d76341ff93a4ffb7757055a838c18f5cc96_p", + "vmSize": "standard_d1_v2", + "totalTasksRun": 0, + "totalTasksSucceeded": 0, + "runningTasksCount": 0, + "runningTaskSlotsCount": 0, + "certificateReferences": [], + "isDedicated": false, + "endpointConfiguration": { + "inboundEndpoints": [ + { + "name": "testinbound.1", + "protocol": "tcp", + "publicIPAddress": "20.237.205.120", + "publicFQDN": "dnsbe370ed9-6e37-4856-8895-f4a2d678c3b7-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 60001, + "backendPort": 5000 + }, + { + "name": "SSHRule.1", + "protocol": "tcp", + "publicIPAddress": "20.237.205.120", + "publicFQDN": "dnsbe370ed9-6e37-4856-8895-f4a2d678c3b7-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 50001, + "backendPort": 22 + } + ] + }, + "nodeAgentInfo": { + "lastUpdateTime": "2023-06-13T20:50:15.003574Z", + "version": "1.10.0" + }, + "virtualMachineInfo": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest", + "exactVersion": "18.04.202305220" + } + } + }, + { + "id": "tvmps_bac8872d47a95dde50c0abce414695400843e84ffccc3923a88e4563321cf46e_d", + "url": "REDACTED", + "state": "idle", + "schedulingState": "enabled", + "stateTransitionTime": "2023-06-13T20:50:15.528707Z", + "lastBootTime": "2023-06-13T20:50:15.44927Z", + "allocationTime": "2023-06-13T20:49:52.3463635Z", + "ipAddress": "10.1.0.5", + "affinityId": "TVM:tvmps_bac8872d47a95dde50c0abce414695400843e84ffccc3923a88e4563321cf46e_d", + "vmSize": "standard_d1_v2", + "totalTasksRun": 0, + "totalTasksSucceeded": 0, + "runningTasksCount": 0, + "runningTaskSlotsCount": 0, + "certificateReferences": [], + "isDedicated": true, + "endpointConfiguration": { + "inboundEndpoints": [ + { + "name": "testinbound.1", + "protocol": "tcp", + "publicIPAddress": "20.237.204.30", + "publicFQDN": "dns1c6f8c73-d8a1-4c99-9f35-3a5bb61f1604-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 60001, + "backendPort": 5000 + }, + { + "name": "SSHRule.1", + "protocol": "tcp", + "publicIPAddress": "20.237.204.30", + "publicFQDN": "dns1c6f8c73-d8a1-4c99-9f35-3a5bb61f1604-azurebatch-cloudservice.westus.cloudapp.azure.com", + "frontendPort": 50001, + "backendPort": 22 + } + ] + }, + "nodeAgentInfo": { + "lastUpdateTime": "2023-06-13T20:50:15.44927Z", + "version": "1.10.0" + }, + "virtualMachineInfo": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest", + "exactVersion": "18.04.202305220" + } + } + } + ] + } + }, + { + "RequestUri": "https://REDACTED/nodecounts?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "85fc66d4-13e5-4108-ba04-0aff0a105a68" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:30 GMT", + "request-id": "eae5c64d-688b-43c2-8c32-164a298a6cc2", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#poolnodecounts", + "value": [ + { + "poolId": "513FFF99-D705-492F-B9DD-B75577627C86", + "dedicated": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + }, + "lowPriority": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + } + }, + { + "poolId": "7A0AFD0B-79EF-42A6-9529-6B692FC33172", + "dedicated": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + }, + "lowPriority": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + } + }, + { + "poolId": "BatchUser-canCRUDLowPri-testPool", + "dedicated": { + "creating": 0, + "idle": 2, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 2 + }, + "lowPriority": { + "creating": 0, + "idle": 2, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 2 + } + }, + { + "poolId": "BatchUser-testpool", + "dedicated": { + "creating": 0, + "idle": 1, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 1 + }, + "lowPriority": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + } + }, + { + "poolId": "nikoudsi-pooltest", + "dedicated": { + "creating": 0, + "idle": 1, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 1 + }, + "lowPriority": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + } + }, + { + "poolId": "PersistOutputsSamplePool", + "dedicated": { + "creating": 0, + "idle": 1, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 1 + }, + "lowPriority": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + } + }, + { + "poolId": "TopNWordsPool", + "dedicated": { + "creating": 0, + "idle": 5, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 5 + }, + "lowPriority": { + "creating": 0, + "idle": 0, + "leavingPool": 0, + "offline": 0, + "preempted": 0, + "rebooting": 0, + "reimaging": 0, + "running": 0, + "starting": 0, + "startTaskFailed": 0, + "unusable": 0, + "unknown": 0, + "waitingForStartTask": 0, + "total": 0 + } + } + ] + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool/updateproperties?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "119", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "ece58beb-10a1-4c3a-a4bb-313bcbcf9dea" + }, + "RequestBody": { + "certificateReferences": [], + "applicationPackageReferences": [], + "metadata": [], + "targetNodeCommunicationMode": "simplified" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Content-Length": "0", + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/BatchUser-canCRUDLowPri-testPool/updateproperties", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:30 GMT", + "ETag": "0x8DB6C4FD3E4FE45", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "e23ff639-5a42-4f90-85fa-59ff1838de98", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "2487d8e9-fc9c-4a76-bdae-d2b9e89fc868" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "ETag": "0x8DB6C4FD3E4FE45", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "78beb47f-9258-4e99-b73c-8a2b0c02c600", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD3E4FE45", + "lastModified": "2023-06-13T20:50:31.6273221Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-06-13T20:50:02.9694366Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 2, + "targetLowPriorityNodes": 2, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "simplified", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "41", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c1cf7683-a303-4c12-9cc3-395a5c3b0846" + }, + "RequestBody": { + "targetNodeCommunicationMode": "classic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/BatchUser-canCRUDLowPri-testPool", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "ETag": "0x8DB6C4FD3F2E10C", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "72504de0-c53c-48aa-b1b1-6edaadb27dc0", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "6358483b-2046-436b-8194-192eea9f6c7b" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "ETag": "0x8DB6C4FD3F2E10C", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "611257fc-4c94-49a7-bc39-baa4c607c91b", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD3F2E10C", + "lastModified": "2023-06-13T20:50:31.7183244Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-06-13T20:50:02.9694366Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 2, + "targetLowPriorityNodes": 2, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool/resize?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "53", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "f8003bff-505a-4ec9-a0b8-3671b8df8977" + }, + "RequestBody": { + "targetDedicatedNodes": 1, + "targetLowPriorityNodes": 1 + }, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/BatchUser-canCRUDLowPri-testPool/resize", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "ETag": "0x8DB6C4FD403AA06", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "02f4b55e-9158-4c4d-9053-2fa76a02f979", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "be01119f-e950-418e-a18b-321a0a12fdea" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "ETag": "0x8DB6C4FD403AA06", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "05e129b9-e326-449f-b0a0-240f2e908d96", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD403AA06", + "lastModified": "2023-06-13T20:50:31.828327Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:01.0247301Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:31.828327Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 2, + "targetLowPriorityNodes": 1, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "f49e0625-47b7-492f-ad83-c471d7124523" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "934432a5-098c-478a-855d-7d610f06639d", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e9902cd3-e2d2-4907-bb86-6babaaa4cf48" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:31 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "088919cd-46d4-45fa-98c1-782cde5eb513", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 2, + "targetLowPriorityNodes": 1, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:50:48 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "f8b1603d-c784-4c83-8c45-964bb4b556a3" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:50:46 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "23dadbcd-6161-48fc-8327-1307c3bf81d8", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:51:03 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "aecfd200-9471-4d95-954a-57c8b3762f53" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:51:01 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "a1540a0e-0db0-4360-bf42-ff7820a05072", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:51:18 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e7b5f249-df7b-4906-938f-d6d6d2ac7ffc" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:51:16 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "226487c5-7b8b-49d2-b72f-80c758fdb024", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:51:33 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "f02f3509-f5d2-485d-a5ab-35d0a6bf6a94" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:51:32 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "09056df7-1c31-4df7-860a-8f0120873a24", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:51:48 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "3220f116-e76c-470f-b122-4c784f81f9e4" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:51:46 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "5fb64102-9b95-486f-afe5-e5abf0b6761b", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:52:03 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "2488c8d4-6e46-4aa2-87aa-d2cbf2c523cf" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:52:01 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "6f3dfbe1-36eb-4fbc-a6a2-48e8da40b758", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:52:18 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "6f1aa064-0e0e-4a66-9f3e-28e64b2f8388" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:52:16 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "23c84f82-5762-413b-9bd6-7401c8181145", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:52:33 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "dd2ffb36-84ec-4adf-873b-911e462b2d3d" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:52:32 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "fb63dfb2-4fb1-4663-88e8-f727529b0fad", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:52:48 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "a9b4a162-88d0-40c0-929d-ac7fe69e456a" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:52:47 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "0626d9ca-a1b5-467c-938f-437b233f8f80", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:53:03 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "9f2e3d0e-9416-4e2d-b792-bff4d8c21adb" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:53:02 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "9861e777-117a-4b3f-928c-0677a8d0b85d", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 2, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:53:18 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "cda97978-3129-4e09-aba6-60cd5418aadf" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:53:16 GMT", + "ETag": "0x8DB6C4FD413888E", + "Last-Modified": "Tue, 13 Jun 2023 20:50:31 GMT", + "request-id": "43826943-363f-48ac-8370-4a71f942e266", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-canCRUDLowPri-testPool", + "url": "REDACTED", + "eTag": "0x8DB6C4FD413888E", + "lastModified": "2023-06-13T20:50:31.9323278Z", + "creationTime": "2023-06-13T20:49:01.0247301Z", + "state": "deleting", + "stateTransitionTime": "2023-06-13T20:50:31.9323278Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:50:42.2664543Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT7M9.497S", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 1, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none", + "endpointConfiguration": { + "inboundNATPools": [ + { + "name": "testinbound", + "protocol": "tcp", + "backendPort": 5000, + "frontendPortRangeStart": 60000, + "frontendPortRangeEnd": 60040 + } + ] + } + }, + "targetNodeCommunicationMode": "classic", + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:53:33 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "642e2e4b-3bfc-441d-9500-e563807f28c3" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Content-Length": "328", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:53:31 GMT", + "request-id": "b56a46f9-8367-4f2e-83ba-665681eb95aa", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element", + "code": "PoolNotFound", + "message": { + "lang": "en-US", + "value": "The specified pool does not exist.\nRequestId:b56a46f9-8367-4f2e-83ba-665681eb95aa\nTime:2023-06-13T20:53:32.5802258Z" + } + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-canCRUDLowPri-testPool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:53:33 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "76a1baa2-4639-470a-84d4-f230e0e60763" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:53:31 GMT", + "request-id": "78c6bab4-21d1-49a4-bdf5-3f678e96b6cf", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCreateDataDisk.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCreateDataDisk.json new file mode 100644 index 0000000000000..a893c7e52abc2 --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.canCreateDataDisk.json @@ -0,0 +1,273 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "ad655e66-fa5f-4b16-aca0-9c39d23143f6" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "d7e6b97c-61a3-405b-9562-7ed05b36ddc0", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:48:59 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "06295488-3f92-49f9-b518-f1c48806f8ec" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "e9ad8044-b5f4-4806-950f-a653bab76c90", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "487", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "ee9f7d46-32a2-4ce2-a588-d9dcb5999882" + }, + "RequestBody": { + "id": "BatchUser-testpool3", + "vmSize": "STANDARD_D1_V2", + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04", + "dataDisks": [ + { + "lun": 50, + "diskSizeGB": 50 + } + ] + }, + "targetDedicatedNodes": 0, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet" + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/BatchUser-testpool3", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "ETag": "0x8DB6C4F9D7819F2", + "Last-Modified": "Tue, 13 Jun 2023 20:49:00 GMT", + "Location": "https://sdktest.westus.batch.azure.com/pools/BatchUser-testpool3", + "request-id": "faff78c7-8554-4248-8f0e-aa6442b0658c", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool3?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:01 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "17121514-f224-416e-8ba7-7ba47dadfb32" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "ETag": "0x8DB6C4F9D7819F2", + "Last-Modified": "Tue, 13 Jun 2023 20:49:00 GMT", + "request-id": "5bb703c6-3b98-4da9-b9f4-d7bd987afd95", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool3", + "url": "REDACTED", + "eTag": "0x8DB6C4F9D7819F2", + "lastModified": "2023-06-13T20:49:00.3167218Z", + "creationTime": "2023-06-13T20:49:00.3167218Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:49:00.3167218Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:49:00.3167218Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 0, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04", + "dataDisks": [ + { + "lun": 50, + "caching": "none", + "diskSizeGB": 50, + "storageAccountType": "standard_lrs" + } + ] + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none" + } + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool3?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:01 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "3b1fa7a4-1bf0-476d-9002-6849a6b672aa" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "ETag": "0x8DB6C4F9D7819F2", + "Last-Modified": "Tue, 13 Jun 2023 20:49:00 GMT", + "request-id": "4d2511ef-0800-4e0c-8078-f6dab97248d9", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool3?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:01 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "16b14e67-4a89-412e-b355-75db1a152eeb" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:49:01 GMT", + "request-id": "0d06de50-3af4-4c00-bd32-72176a9e9b78", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.testPoolOData.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.testPoolOData.json new file mode 100644 index 0000000000000..5fa4db06ecf96 --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/PoolTests.testPoolOData.json @@ -0,0 +1,154 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e19b16d7-05ab-4bd2-9513-1a7125470aa8" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "62fade33-9a3b-4bc0-b9cb-2b1ff0372a55", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:48:59 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e406e262-fcb5-4ca9-97d9-cd8be6e02a3a" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:57 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "3cc73668-eb47-4c9a-bd0e-df682ded0318", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:49:00 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "95736860-b65b-4cd9-8355-3c78dd854a42" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:48:59 GMT", + "request-id": "33b8b3c4-0276-4762-ac51-a6b4963cc1e7", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools", + "value": [ + { + "id": "513FFF99-D705-492F-B9DD-B75577627C86", + "state": "active" + }, + { + "id": "7A0AFD0B-79EF-42A6-9529-6B692FC33172", + "state": "active" + }, + { + "id": "BatchUser-testpool", + "state": "active" + }, + { + "id": "nikoudsi-pooltest", + "state": "active" + }, + { + "id": "PersistOutputsSamplePool", + "state": "active" + }, + { + "id": "TopNWordsPool", + "state": "active" + } + ] + } + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/SharedKeyTests.testPoolCRUD.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/SharedKeyTests.testPoolCRUD.json new file mode 100644 index 0000000000000..4edc255426196 --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/SharedKeyTests.testPoolCRUD.json @@ -0,0 +1,367 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "296", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Fri, 16 Jun 2023 20:48:54 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c9b97ca0-70f8-4e17-a561-965084ca47b4" + }, + "RequestBody": { + "id": "SharedKey-testpool", + "vmSize": "STANDARD_D1_V2", + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetDedicatedNodes": 2, + "targetNodeCommunicationMode": "default" + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/SharedKey-testpool", + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:54 GMT", + "ETag": "0x8DB6EAB19808AC4", + "Last-Modified": "Fri, 16 Jun 2023 20:48:54 GMT", + "Location": "https://sdktest.westus.batch.azure.com/pools/SharedKey-testpool", + "request-id": "316a7378-74f2-4187-8b2c-f620e1e660bb", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Fri, 16 Jun 2023 20:48:55 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "8958aaf1-77b3-4f1c-9539-857771411579" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:54 GMT", + "ETag": "0x8DB6EAB19808AC4", + "Last-Modified": "Fri, 16 Jun 2023 20:48:54 GMT", + "request-id": "e9253c73-8f27-45ff-ac68-b6b0bad213d8", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Fri, 16 Jun 2023 20:48:55 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "ea592586-4300-4ca7-8054-5916708cc561" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:54 GMT", + "ETag": "0x8DB6EAB19808AC4", + "Last-Modified": "Fri, 16 Jun 2023 20:48:54 GMT", + "request-id": "97d2ce09-babf-445d-a4bf-ac57fd1f13de", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "SharedKey-testpool", + "url": "REDACTED", + "eTag": "0x8DB6EAB19808AC4", + "lastModified": "2023-06-16T20:48:54.937466Z", + "creationTime": "2023-06-16T20:48:54.937466Z", + "state": "active", + "stateTransitionTime": "2023-06-16T20:48:54.937466Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-16T20:48:54.937466Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "default" + } + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool/updateproperties?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "147", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Fri, 16 Jun 2023 20:48:55 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "3be4af7b-78d6-4157-9ddd-b3cae5bc6017" + }, + "RequestBody": { + "certificateReferences": [], + "applicationPackageReferences": [], + "metadata": [ + { + "name": "foo", + "value": "bar" + } + ], + "targetNodeCommunicationMode": "simplified" + }, + "StatusCode": 204, + "ResponseHeaders": { + "Content-Length": "0", + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/SharedKey-testpool/updateproperties", + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "ETag": "0x8DB6EAB1A6E6DCF", + "Last-Modified": "Fri, 16 Jun 2023 20:48:56 GMT", + "request-id": "f76f083e-409e-4bfc-a1ae-6156aa83ddcb", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e6bc15d3-7983-462b-a0e7-8441d53b3744" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "ETag": "0x8DB6EAB1A6E6DCF", + "Last-Modified": "Fri, 16 Jun 2023 20:48:56 GMT", + "request-id": "197aebac-04e6-4b87-9702-bf85c4ab80b3", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "SharedKey-testpool", + "url": "REDACTED", + "eTag": "0x8DB6EAB1A6E6DCF", + "lastModified": "2023-06-16T20:48:56.4964815Z", + "creationTime": "2023-06-16T20:48:54.937466Z", + "state": "active", + "stateTransitionTime": "2023-06-16T20:48:54.937466Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-16T20:48:54.937466Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "metadata": [ + { + "name": "foo", + "value": "bar" + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "simplified" + } + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "87", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "b9d4dd5d-b47d-4f86-9009-82528721563f" + }, + "RequestBody": { + "metadata": [ + { + "name": "key1", + "value": "value1" + } + ], + "targetNodeCommunicationMode": "classic" + }, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/SharedKey-testpool", + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "ETag": "0x8DB6EAB1A7E7357", + "Last-Modified": "Fri, 16 Jun 2023 20:48:56 GMT", + "request-id": "7c7e2789-72c3-4ebd-a257-c0f447ffb161", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "ocp-date": "Fri, 16 Jun 2023 20:48:56 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "0f756c10-52e4-4d9c-84b0-1d30c8c89ae5" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "ETag": "0x8DB6EAB1A7E7357", + "Last-Modified": "Fri, 16 Jun 2023 20:48:56 GMT", + "request-id": "a4477b33-ae7c-4ebe-9b07-01d296422c91", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "SharedKey-testpool", + "url": "REDACTED", + "eTag": "0x8DB6EAB1A7E7357", + "lastModified": "2023-06-16T20:48:56.6014807Z", + "creationTime": "2023-06-16T20:48:54.937466Z", + "state": "active", + "stateTransitionTime": "2023-06-16T20:48:54.937466Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-16T20:48:54.937466Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 2, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "certificateReferences": [], + "metadata": [ + { + "name": "key1", + "value": "value1" + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/SharedKey-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Fri, 16 Jun 2023 20:48:57 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "3b94c35c-3755-4930-841a-daac17698000" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Fri, 16 Jun 2023 20:48:56 GMT", + "request-id": "b66962e2-0509-4921-9a5c-b49b5f704cdb", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.canCRUDTest.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.canCRUDTest.json new file mode 100644 index 0000000000000..c6a62a24cf462 --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.canCRUDTest.json @@ -0,0 +1,679 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:07 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "48ff7e11-3fc0-44c6-959b-2ad70f8ce63c" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:08 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "acbf0375-371e-4232-be58-1b1f376a6610", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:09 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "d954218b-3366-4e42-9561-6b33ff387007" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:08 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "eec17e72-a0c2-4eca-96db-ae81738ecfd9", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testIaaSpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:09 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "19486591-ff34-4504-96b1-389235f5126d" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:08 GMT", + "request-id": "0735b05b-9641-4d2f-8f64-4c63f3497197", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "577", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "d8a49cce-364f-4877-a5bb-7aa5bb7ae224" + }, + "RequestBody": { + "id": "BatchUser-testIaaSpool", + "vmSize": "STANDARD_D1_V2", + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetDedicatedNodes": 1, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet" + }, + "userAccounts": [ + { + "name": "test-user", + "password": "REDACTED", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ] + }, + "StatusCode": 409, + "ResponseHeaders": { + "Content-Length": "326", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:10 GMT", + "request-id": "fb667a41-0560-4b7c-904a-e6ff23494c31", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element", + "code": "PoolExists", + "message": { + "lang": "en-US", + "value": "The specified pool already exists.\nRequestId:fb667a41-0560-4b7c-904a-e6ff23494c31\nTime:2023-06-13T20:59:10.8066821Z" + } + } + }, + { + "RequestUri": "https://REDACTED/jobs?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "77", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "1a7fdb9c-4cf4-4680-876d-f4c48e27f297" + }, + "RequestBody": { + "id": "BatchUser-canCRUDTest", + "poolInfo": { + "poolId": "BatchUser-testIaaSpool" + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:10 GMT", + "ETag": "0x8DB6C51096D33E1", + "Last-Modified": "Tue, 13 Jun 2023 20:59:10 GMT", + "Location": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "request-id": "a7c27e67-b167-41c3-b09b-661655fb823d", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "147", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:59:12 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "59de79a3-a27c-49bb-af89-09c06ac40392" + }, + "RequestBody": { + "id": "mytask", + "commandLine": "/bin/bash -c \u0027set -e; set -o pipefail; cat test.txt\u0027", + "resourceFiles": [ + { + "httpUrl": "REDACTED", + "filePath": "test.txt" + } + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/BatchUser-canCRUDTest/tasks/mytask", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "ETag": "0x8DB6C5109B9022A", + "Last-Modified": "Tue, 13 Jun 2023 20:59:11 GMT", + "Location": "https://sdktest.westus.batch.azure.com/jobs/BatchUser-canCRUDTest/tasks/mytask", + "request-id": "02611808-983c-4c37-a130-8c0334db4e0e", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks/mytask?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:12 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "ea483141-84ed-4d6b-b4b4-66f0dc49be93" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "ETag": "0x8DB6C5109B9022A", + "Last-Modified": "Tue, 13 Jun 2023 20:59:11 GMT", + "request-id": "0c7f1108-be27-4018-a119-20d2814353ad", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks/@Element", + "id": "mytask", + "url": "REDACTED", + "eTag": "0x8DB6C5109B9022A", + "creationTime": "2023-06-13T20:59:11.4327594Z", + "lastModified": "2023-06-13T20:59:11.4327594Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:59:11.4327594Z", + "commandLine": "/bin/bash -c \u0027set -e; set -o pipefail; cat test.txt\u0027", + "resourceFiles": [ + { + "httpUrl": "REDACTED", + "filePath": "test.txt" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "retentionTime": "P7D", + "maxTaskRetryCount": 0 + }, + "requiredSlots": 1, + "executionInfo": { + "retryCount": 0, + "requeueCount": 0 + } + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:12 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "21ba0a77-7334-4440-9539-62e98ff8c8f9" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "request-id": "8e5c95c2-04b1-484d-ba49-f9ce9855cd83", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "url": "REDACTED", + "eTag": "0x8DB6C5109B9022A", + "creationTime": "2023-06-13T20:59:11.4327594Z", + "lastModified": "2023-06-13T20:59:11.4327594Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:59:11.4327594Z", + "commandLine": "/bin/bash -c \u0027set -e; set -o pipefail; cat test.txt\u0027", + "resourceFiles": [ + { + "httpUrl": "REDACTED", + "filePath": "test.txt" + } + ], + "userIdentity": { + "autoUser": { + "scope": "pool", + "elevationLevel": "nonadmin" + } + }, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "retentionTime": "P7D", + "maxTaskRetryCount": 0 + }, + "requiredSlots": 1, + "executionInfo": { + "retryCount": 0, + "requeueCount": 0 + } + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:12 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "1cb4147d-9817-43a9-97d2-c96c9bb34521" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "request-id": "baaf22e4-06b4-4910-a758-4c86a61698a4", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "state": "active" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:22 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "30f82514-8cb1-4018-a6b0-372f27dd68d9" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:21 GMT", + "request-id": "73195216-ed98-4b57-9b89-b4d4c5231f08", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "state": "active" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:32 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "5ab69cc2-42f5-4e4c-9f02-75461da7b561" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:31 GMT", + "request-id": "bb56102c-5534-4062-a2d5-4caf22b868ca", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "state": "active" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:42 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "17408b67-c56f-49cf-b977-b337d0c92ad3" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:41 GMT", + "request-id": "15688fab-f78b-40f4-a494-c87ce24f3bce", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "state": "active" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:52 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "a3b3c165-0c06-448a-882f-9b735aee12dc" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:51 GMT", + "request-id": "c0b0b92c-f45c-49ca-954e-e392ba9a4a1c", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "state": "active" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks?api-version=2022-10-01.16.0\u0026%24select=id%2C%20state", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:02 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "db756bee-f3d5-4c33-a08b-2c4fddacd1c2" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:01 GMT", + "request-id": "5dbcdf5a-df8c-4482-8857-323c8d5048fb", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks", + "value": [ + { + "id": "mytask", + "state": "active" + } + ] + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks/mytask?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:12 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "21d7bea1-0f52-47ee-91c1-956698ec3532" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:10 GMT", + "request-id": "a6139254-4c59-484e-9e6b-90bdf0aa3d01", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest/tasks/mytask?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:12 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "9cd1b9b0-2322-44be-b8a5-bf27e4c1f9da" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Content-Length": "328", + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "request-id": "0ca0d14a-d89d-4694-b295-594b178f3ae2", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#Microsoft.Azure.Batch.Protocol.Entities.Container.errors/@Element", + "code": "TaskNotFound", + "message": { + "lang": "en-US", + "value": "The specified task does not exist.\nRequestId:0ca0d14a-d89d-4694-b295-594b178f3ae2\nTime:2023-06-13T21:00:11.9820754Z" + } + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-canCRUDTest?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:13 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c4688cf3-e897-491f-b2d0-ac50e78875d0" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "request-id": "f6c06663-ab0f-42b5-af29-a467bf37f1f4", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testIaaSpool?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:13 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "2a899ab0-ec8a-4755-9ac3-56657d1b1337" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "request-id": "08c68332-2213-49e2-96f1-6e61b96cd632", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + } + ], + "Variables": {} +} diff --git a/sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.testJobUser.json b/sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.testJobUser.json new file mode 100644 index 0000000000000..f8ac6281f569b --- /dev/null +++ b/sdk/batch/azure-compute-batch/src/test/resources/session-records/TaskTests.testJobUser.json @@ -0,0 +1,554 @@ +{ + "Entries": [ + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:07 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e6088e80-0a79-4015-8187-c4b7dcceae7c" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:08 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "67a054ba-cb04-4e3c-a10d-12558b934d16", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:09 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "c31110b4-6d92-4e8d-b024-18fd2f0b31ee" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:08 GMT", + "ETag": "0x8DB3F73C018A6ED", + "Last-Modified": "Mon, 17 Apr 2023 18:44:17 GMT", + "request-id": "05c7926b-8322-4a4b-90d5-4c234a2cc13e", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testpool", + "url": "REDACTED", + "eTag": "0x8DB3F73C018A6ED", + "lastModified": "2023-04-17T18:44:17.9687149Z", + "creationTime": "2023-04-17T18:44:17.9687149Z", + "state": "active", + "stateTransitionTime": "2023-04-17T18:44:17.9687149Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-04-17T18:45:19.9722567Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testIaaSpool?api-version=2022-10-01.16.0", + "RequestMethod": "HEAD", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:09 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "49888c06-8443-45d2-a5e1-1a70d8036588" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:08 GMT", + "request-id": "0c141acc-261a-4dc1-a609-0998396c1c3e", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "577", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "56cc9e0f-6214-4c95-a471-22859865635a" + }, + "RequestBody": { + "id": "BatchUser-testIaaSpool", + "vmSize": "STANDARD_D1_V2", + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "targetDedicatedNodes": 1, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet" + }, + "userAccounts": [ + { + "name": "test-user", + "password": "REDACTED", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/pools/BatchUser-testIaaSpool", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:10 GMT", + "ETag": "0x8DB6C51093A69F5", + "Last-Modified": "Tue, 13 Jun 2023 20:59:10 GMT", + "Location": "https://sdktest.westus.batch.azure.com/pools/BatchUser-testIaaSpool", + "request-id": "3ccf31b6-41dd-4e36-a671-c97a88b244bd", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testIaaSpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "459e9eb7-0e0a-4fd3-80d3-21e9cd26f43b" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:10 GMT", + "ETag": "0x8DB6C51093A69F5", + "Last-Modified": "Tue, 13 Jun 2023 20:59:10 GMT", + "request-id": "eedb04e8-ed99-4d4d-9c03-b058b3e9e610", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testIaaSpool", + "url": "REDACTED", + "eTag": "0x8DB6C51093A69F5", + "lastModified": "2023-06-13T20:59:10.6031093Z", + "creationTime": "2023-06-13T20:59:10.6031093Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:59:10.6031093Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:59:10.6031093Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none" + } + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testIaaSpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 20:59:41 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "a641b7d5-6abb-4197-80ea-8a729c9c16ba" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 20:59:40 GMT", + "ETag": "0x8DB6C51093A69F5", + "Last-Modified": "Tue, 13 Jun 2023 20:59:10 GMT", + "request-id": "c599f155-5d55-4aef-a9ac-3ebd3a2c4d56", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testIaaSpool", + "url": "REDACTED", + "eTag": "0x8DB6C51093A69F5", + "lastModified": "2023-06-13T20:59:10.6031093Z", + "creationTime": "2023-06-13T20:59:10.6031093Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:59:10.6031093Z", + "allocationState": "resizing", + "allocationStateTransitionTime": "2023-06-13T20:59:10.6031093Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 0, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none" + } + } + }, + { + "RequestUri": "https://REDACTED/pools/BatchUser-testIaaSpool?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "ac13bb1a-dd84-4ba8-af85-0b84f93a3ac6" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:09 GMT", + "ETag": "0x8DB6C51093A69F5", + "Last-Modified": "Tue, 13 Jun 2023 20:59:10 GMT", + "request-id": "fe3cd1a8-0b26-4aea-8fbc-c919a7236200", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#pools/@Element", + "id": "BatchUser-testIaaSpool", + "url": "REDACTED", + "eTag": "0x8DB6C51093A69F5", + "lastModified": "2023-06-13T20:59:10.6031093Z", + "creationTime": "2023-06-13T20:59:10.6031093Z", + "state": "active", + "stateTransitionTime": "2023-06-13T20:59:10.6031093Z", + "allocationState": "steady", + "allocationStateTransitionTime": "2023-06-13T21:00:08.166045Z", + "vmSize": "standard_d1_v2", + "resizeTimeout": "PT15M", + "currentDedicatedNodes": 1, + "targetDedicatedNodes": 1, + "currentLowPriorityNodes": 0, + "targetLowPriorityNodes": 0, + "enableAutoScale": false, + "enableInterNodeCommunication": false, + "userAccounts": [ + { + "name": "test-user", + "elevationLevel": "admin", + "linuxUserConfiguration": { + "uid": 5, + "gid": 5 + } + } + ], + "taskSlotsPerNode": 1, + "taskSchedulingPolicy": { + "nodeFillType": "Spread" + }, + "virtualMachineConfiguration": { + "imageReference": { + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "latest" + }, + "nodeAgentSKUId": "batch.node.ubuntu 18.04" + }, + "networkConfiguration": { + "subnetId": "/subscriptions/65634139-3762-476b-946d-e221f4cdc2bf/resourceGroups/nikoudsiSDKTest/providers/Microsoft.Network/virtualNetworks/myVnet/subnets/MySubnet", + "dynamicVNetAssignmentScope": "none" + }, + "currentNodeCommunicationMode": "classic" + } + }, + { + "RequestUri": "https://REDACTED/jobs?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "73", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "e9e5f83c-6af8-491c-8234-e7264c40a01f" + }, + "RequestBody": { + "id": "BatchUser-testJobUser", + "poolInfo": { + "poolId": "BatchUser-testpool" + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:09 GMT", + "ETag": "0x8DB6C512D214E38", + "Last-Modified": "Tue, 13 Jun 2023 21:00:10 GMT", + "Location": "https://sdktest.westus.batch.azure.com/jobs/job-1", + "request-id": "f6a6855b-0ace-4a04-a144-f8ca4faa7f13", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-testJobUser/tasks?api-version=2022-10-01.16.0", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "151", + "Content-Type": "application/json; odata=minimalmetadata", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "39f632d9-6175-4bd6-bfeb-6d2f63a286bc" + }, + "RequestBody": { + "id": "mytask", + "commandLine": "cmd /c echo hello", + "userIdentity": { + "username": "test-user" + }, + "applicationPackageReferences": [ + { + "applicationId": "REDACTED" + } + ] + }, + "StatusCode": 201, + "ResponseHeaders": { + "DataServiceId": "https://sdktest.westus.batch.azure.com/jobs/BatchUser-testJobUser/tasks/mytask", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:09 GMT", + "ETag": "0x8DB6C512D294608", + "Last-Modified": "Tue, 13 Jun 2023 21:00:10 GMT", + "Location": "https://sdktest.westus.batch.azure.com/jobs/BatchUser-testJobUser/tasks/mytask", + "request-id": "306355c8-6a4a-4fcf-aa2f-25610e42ae25", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-testJobUser/tasks/mytask?api-version=2022-10-01.16.0", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "96cfb6cb-a1b6-4360-9fda-cbc7a3c94b2f" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Content-Type": "application/json; odata=minimalmetadata", + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:09 GMT", + "ETag": "0x8DB6C512D294608", + "Last-Modified": "Tue, 13 Jun 2023 21:00:10 GMT", + "request-id": "a44325a5-bfca-4b7e-b288-aa5a6e154f5e", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": { + "odata.metadata": "https://sdktest.westus.batch.azure.com/$metadata#tasks/@Element", + "id": "mytask", + "url": "REDACTED", + "eTag": "0x8DB6C512D294608", + "creationTime": "2023-06-13T21:00:10.888756Z", + "lastModified": "2023-06-13T21:00:10.888756Z", + "state": "active", + "stateTransitionTime": "2023-06-13T21:00:10.888756Z", + "commandLine": "cmd /c echo hello", + "applicationPackageReferences": [ + { + "applicationId": "REDACTED" + } + ], + "userIdentity": { + "username": "test-user" + }, + "constraints": { + "maxWallClockTime": "P10675199DT2H48M5.4775807S", + "retentionTime": "P7D", + "maxTaskRetryCount": 0 + }, + "requiredSlots": 1, + "executionInfo": { + "retryCount": 0, + "requeueCount": 0 + } + } + }, + { + "RequestUri": "https://REDACTED/jobs/BatchUser-testJobUser?api-version=2022-10-01.16.0", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "0", + "Date": "Tue, 13 Jun 2023 21:00:11 GMT", + "User-Agent": "azsdk-java-azure-compute-batch/1.0.0-beta.1 (14; Windows 10; 10.0)", + "x-ms-client-request-id": "7fad9da1-e6a3-425b-a3d8-ba1af6019f03" + }, + "RequestBody": null, + "StatusCode": 202, + "ResponseHeaders": { + "DataServiceVersion": "3.0", + "Date": "Tue, 13 Jun 2023 21:00:10 GMT", + "request-id": "7c5b8e61-b8de-4e42-bc63-f83f5dfaa656", + "Server": "Microsoft-HTTPAPI/2.0", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": "nosniff" + }, + "ResponseBody": null + } + ], + "Variables": {} +}