BatchClient.GetPool Method

Definition

Overloads

GetPool(String, Nullable<Int32>, Nullable<DateTimeOffset>, IEnumerable<String>, IEnumerable<String>, RequestConditions, RequestContext)

[Protocol Method] Gets information about the specified Pool.

GetPool(String, Nullable<Int32>, Nullable<DateTimeOffset>, IEnumerable<String>, IEnumerable<String>, RequestConditions, CancellationToken)

Gets information about the specified Pool.

GetPool(String, Nullable<Int32>, Nullable<DateTimeOffset>, IEnumerable<String>, IEnumerable<String>, RequestConditions, RequestContext)

Source:
BatchClient.cs

[Protocol Method] Gets information about the specified Pool.

public virtual Azure.Response GetPool (string poolId, int? timeOutInSeconds, DateTimeOffset? ocpdate, System.Collections.Generic.IEnumerable<string> select, System.Collections.Generic.IEnumerable<string> expand, Azure.RequestConditions requestConditions, Azure.RequestContext context);
abstract member GetPool : string * Nullable<int> * Nullable<DateTimeOffset> * seq<string> * seq<string> * Azure.RequestConditions * Azure.RequestContext -> Azure.Response
override this.GetPool : string * Nullable<int> * Nullable<DateTimeOffset> * seq<string> * seq<string> * Azure.RequestConditions * Azure.RequestContext -> Azure.Response
Public Overridable Function GetPool (poolId As String, timeOutInSeconds As Nullable(Of Integer), ocpdate As Nullable(Of DateTimeOffset), select As IEnumerable(Of String), expand As IEnumerable(Of String), requestConditions As RequestConditions, context As RequestContext) As Response

Parameters

poolId
String

The ID of the Pool to get.

timeOutInSeconds
Nullable<Int32>

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.".

ocpdate
Nullable<DateTimeOffset>

The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.

select
IEnumerable<String>

An OData $select clause.

expand
IEnumerable<String>

An OData $expand clause.

requestConditions
RequestConditions

The content to send as the request conditions of the request.

context
RequestContext

The request context, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

poolId is null.

poolId is an empty string, and was expected to be non-empty.

Service returned a non-success status code.

Examples

This sample shows how to call GetPool and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
BatchClient client = new BatchClient(endpoint, credential);

Response response = client.GetPool("<poolId>", null, null, null, null, null, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.ToString());

This sample shows how to call GetPool with all parameters and parse the result.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
BatchClient client = new BatchClient(endpoint, credential);

Response response = client.GetPool("<poolId>", 1234, DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), new string[] { "<select>" }, new string[] { "<expand>" }, null, null);

JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("displayName").ToString());
Console.WriteLine(result.GetProperty("url").ToString());
Console.WriteLine(result.GetProperty("eTag").ToString());
Console.WriteLine(result.GetProperty("lastModified").ToString());
Console.WriteLine(result.GetProperty("creationTime").ToString());
Console.WriteLine(result.GetProperty("state").ToString());
Console.WriteLine(result.GetProperty("stateTransitionTime").ToString());
Console.WriteLine(result.GetProperty("allocationState").ToString());
Console.WriteLine(result.GetProperty("allocationStateTransitionTime").ToString());
Console.WriteLine(result.GetProperty("vmSize").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("publisher").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("offer").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("sku").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("virtualMachineImageId").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("imageReference").GetProperty("exactVersion").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodeAgentSKUId").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("windowsConfiguration").GetProperty("enableAutomaticUpdates").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("lun").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("caching").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("diskSizeGB").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("dataDisks")[0].GetProperty("storageAccountType").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("licenseType").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerImageNames")[0].ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("username").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("password").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("registryServer").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("containerConfiguration").GetProperty("containerRegistries")[0].GetProperty("identityReference").GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("diskEncryptionConfiguration").GetProperty("targets")[0].ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("nodePlacementConfiguration").GetProperty("policy").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("publisher").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("typeHandlerVersion").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("autoUpgradeMinorVersion").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("enableAutomaticUpgrade").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("settings").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("protectedSettings").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("extensions")[0].GetProperty("provisionAfterExtensions")[0].ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("ephemeralOSDiskSettings").GetProperty("placement").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("caching").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("diskSizeGB").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("managedDisk").GetProperty("storageAccountType").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("osDisk").GetProperty("writeAcceleratorEnabled").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("encryptionAtHost").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("securityType").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("secureBootEnabled").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("securityProfile").GetProperty("uefiSettings").GetProperty("vTpmEnabled").ToString());
Console.WriteLine(result.GetProperty("virtualMachineConfiguration").GetProperty("serviceArtifactReference").GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("resizeTimeout").ToString());
Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("resizeErrors")[0].GetProperty("values")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("resourceTags").GetProperty("<key>").ToString());
Console.WriteLine(result.GetProperty("currentDedicatedNodes").ToString());
Console.WriteLine(result.GetProperty("currentLowPriorityNodes").ToString());
Console.WriteLine(result.GetProperty("targetDedicatedNodes").ToString());
Console.WriteLine(result.GetProperty("targetLowPriorityNodes").ToString());
Console.WriteLine(result.GetProperty("enableAutoScale").ToString());
Console.WriteLine(result.GetProperty("autoScaleFormula").ToString());
Console.WriteLine(result.GetProperty("autoScaleEvaluationInterval").ToString());
Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("timestamp").ToString());
Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("results").ToString());
Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("code").ToString());
Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("message").ToString());
Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("autoScaleRun").GetProperty("error").GetProperty("values")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("enableInterNodeCommunication").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("subnetId").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("dynamicVNetAssignmentScope").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("protocol").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("backendPort").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeStart").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("frontendPortRangeEnd").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("priority").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("access").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourceAddressPrefix").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("endpointConfiguration").GetProperty("inboundNATPools")[0].GetProperty("networkSecurityGroupRules")[0].GetProperty("sourcePortRanges")[0].ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("provision").ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("publicIPAddressConfiguration").GetProperty("ipAddressIds")[0].ToString());
Console.WriteLine(result.GetProperty("networkConfiguration").GetProperty("enableAcceleratedNetworking").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("commandLine").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("containerRunOptions").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("imageName").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("username").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("password").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("registryServer").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("registry").GetProperty("identityReference").GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("containerSettings").GetProperty("workingDirectory").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("autoStorageContainerName").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("storageContainerUrl").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("httpUrl").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("blobPrefix").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("filePath").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("fileMode").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("resourceFiles")[0].GetProperty("identityReference").GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("environmentSettings")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("username").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("scope").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("userIdentity").GetProperty("autoUser").GetProperty("elevationLevel").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("maxTaskRetryCount").ToString());
Console.WriteLine(result.GetProperty("startTask").GetProperty("waitForSuccess").ToString());
Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("applicationId").ToString());
Console.WriteLine(result.GetProperty("applicationPackageReferences")[0].GetProperty("version").ToString());
Console.WriteLine(result.GetProperty("taskSlotsPerNode").ToString());
Console.WriteLine(result.GetProperty("taskSchedulingPolicy").GetProperty("nodeFillType").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("password").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("elevationLevel").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("uid").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("gid").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("linuxUserConfiguration").GetProperty("sshPrivateKey").ToString());
Console.WriteLine(result.GetProperty("userAccounts")[0].GetProperty("windowsUserConfiguration").GetProperty("loginMode").ToString());
Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("metadata")[0].GetProperty("value").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("url").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("lastUpdateTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("lastUpdateTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("usageStats").GetProperty("dedicatedCoreTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("startTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("lastUpdateTime").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgCPUPercentage").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgMemoryGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakMemoryGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("avgDiskGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("peakDiskGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadIOps").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteIOps").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskReadGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("diskWriteGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkReadGiB").ToString());
Console.WriteLine(result.GetProperty("stats").GetProperty("resourceStats").GetProperty("networkWriteGiB").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountName").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("containerName").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("accountKey").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("sasKey").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("blobfuseOptions").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("relativeMountPath").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureBlobFileSystemConfiguration").GetProperty("identityReference").GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("source").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("relativeMountPath").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("nfsMountConfiguration").GetProperty("mountOptions").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("username").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("source").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("relativeMountPath").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("mountOptions").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("cifsMountConfiguration").GetProperty("password").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountName").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("azureFileUrl").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("accountKey").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("relativeMountPath").ToString());
Console.WriteLine(result.GetProperty("mountConfiguration")[0].GetProperty("azureFileShareConfiguration").GetProperty("mountOptions").ToString());
Console.WriteLine(result.GetProperty("identity").GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("resourceId").ToString());
Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("clientId").ToString());
Console.WriteLine(result.GetProperty("identity").GetProperty("userAssignedIdentities")[0].GetProperty("principalId").ToString());
Console.WriteLine(result.GetProperty("targetNodeCommunicationMode").ToString());
Console.WriteLine(result.GetProperty("currentNodeCommunicationMode").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("mode").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("disableAutomaticRollback").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("enableAutomaticOSUpgrade").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("useRollingUpgradePolicy").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("automaticOSUpgradePolicy").GetProperty("osRollingUpgradeDeferral").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("enableCrossZoneUpgrade").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxBatchInstancePercent").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyInstancePercent").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("maxUnhealthyUpgradedInstancePercent").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("pauseTimeBetweenBatches").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("prioritizeUnhealthyInstances").ToString());
Console.WriteLine(result.GetProperty("upgradePolicy").GetProperty("rollingUpgradePolicy").GetProperty("rollbackFailedInstancesOnPolicyBreach").ToString());

Applies to

GetPool(String, Nullable<Int32>, Nullable<DateTimeOffset>, IEnumerable<String>, IEnumerable<String>, RequestConditions, CancellationToken)

Source:
BatchClient.cs

Gets information about the specified Pool.

public virtual Azure.Response<Azure.Compute.Batch.BatchPool> GetPool (string poolId, int? timeOutInSeconds = default, DateTimeOffset? ocpdate = default, System.Collections.Generic.IEnumerable<string> select = default, System.Collections.Generic.IEnumerable<string> expand = default, Azure.RequestConditions requestConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPool : string * Nullable<int> * Nullable<DateTimeOffset> * seq<string> * seq<string> * Azure.RequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Compute.Batch.BatchPool>
override this.GetPool : string * Nullable<int> * Nullable<DateTimeOffset> * seq<string> * seq<string> * Azure.RequestConditions * System.Threading.CancellationToken -> Azure.Response<Azure.Compute.Batch.BatchPool>
Public Overridable Function GetPool (poolId As String, Optional timeOutInSeconds As Nullable(Of Integer) = Nothing, Optional ocpdate As Nullable(Of DateTimeOffset) = Nothing, Optional select As IEnumerable(Of String) = Nothing, Optional expand As IEnumerable(Of String) = Nothing, Optional requestConditions As RequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of BatchPool)

Parameters

poolId
String

The ID of the Pool to get.

timeOutInSeconds
Nullable<Int32>

The maximum time that the server can spend processing the request, in seconds. The default is 30 seconds. If the value is larger than 30, the default will be used instead.".

ocpdate
Nullable<DateTimeOffset>

The time the request was issued. Client libraries typically set this to the current system clock time; set it explicitly if you are calling the REST API directly.

select
IEnumerable<String>

An OData $select clause.

expand
IEnumerable<String>

An OData $expand clause.

requestConditions
RequestConditions

The content to send as the request conditions of the request.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

poolId is null.

poolId is an empty string, and was expected to be non-empty.

Examples

This sample shows how to call GetPool.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
BatchClient client = new BatchClient(endpoint, credential);

Response<BatchPool> response = client.GetPool("<poolId>");

This sample shows how to call GetPool with all parameters.

Uri endpoint = new Uri("<https://my-service.azure.com>");
TokenCredential credential = new DefaultAzureCredential();
BatchClient client = new BatchClient(endpoint, credential);

Response<BatchPool> response = client.GetPool("<poolId>", timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), select: new string[] { "<select>" }, expand: new string[] { "<expand>" }, requestConditions: null);

Applies to