Partilhar via


BatchClient.UpdateJobSchedule Method

Definition

Overloads

UpdateJobSchedule(String, BatchJobScheduleUpdateContent, Nullable<Int32>, Nullable<DateTimeOffset>, RequestConditions, CancellationToken)

[Protocol Method] Updates the properties of the specified Job Schedule.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
UpdateJobSchedule(String, RequestContent, Nullable<Int32>, Nullable<DateTimeOffset>, RequestConditions, RequestContext)

[Protocol Method] Updates the properties of the specified Job Schedule.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.

UpdateJobSchedule(String, BatchJobScheduleUpdateContent, Nullable<Int32>, Nullable<DateTimeOffset>, RequestConditions, CancellationToken)

Source:
BatchClientCustom.cs

[Protocol Method] Updates the properties of the specified Job Schedule.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response UpdateJobSchedule (string jobScheduleId, Azure.Compute.Batch.BatchJobScheduleUpdateContent jobSchedule, int? timeOutInSeconds = default, DateTimeOffset? ocpdate = default, Azure.RequestConditions requestConditions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member UpdateJobSchedule : string * Azure.Compute.Batch.BatchJobScheduleUpdateContent * Nullable<int> * Nullable<DateTimeOffset> * Azure.RequestConditions * System.Threading.CancellationToken -> Azure.Response
override this.UpdateJobSchedule : string * Azure.Compute.Batch.BatchJobScheduleUpdateContent * Nullable<int> * Nullable<DateTimeOffset> * Azure.RequestConditions * System.Threading.CancellationToken -> Azure.Response
Public Overridable Function UpdateJobSchedule (jobScheduleId As String, jobSchedule As BatchJobScheduleUpdateContent, Optional timeOutInSeconds As Nullable(Of Integer) = Nothing, Optional ocpdate As Nullable(Of DateTimeOffset) = Nothing, Optional requestConditions As RequestConditions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response

Parameters

jobScheduleId
String

The ID of the Job Schedule to update.

jobSchedule
BatchJobScheduleUpdateContent

The options to use for updating the Job Schedule.

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.

requestConditions
RequestConditions

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

cancellationToken
CancellationToken

The cancellation token to use.

Returns

The response returned from the service.

Exceptions

jobScheduleId or jobSchedule is null.

jobScheduleId 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 UpdateJobSchedule.

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

using RequestContent content = RequestContent.Create(new object());
Response response = client.UpdateJobSchedule("<jobScheduleId>", content);

Console.WriteLine(response.Status);

This sample shows how to call UpdateJobSchedule with all parameters and request content.

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

using RequestContent content = RequestContent.Create(new
{
    schedule = new
    {
        doNotRunUntil = "2022-05-10T18:57:31.2311892Z",
        doNotRunAfter = "2022-05-10T18:57:31.2311892Z",
        startWindow = "PT1H23M45S",
        recurrenceInterval = "PT1H23M45S",
    },
    jobSpecification = new
    {
        priority = 1234,
        allowTaskPreemption = true,
        maxParallelTasks = 1234,
        displayName = "<displayName>",
        usesTaskDependencies = true,
        onAllTasksComplete = "noaction",
        onTaskFailure = "noaction",
        networkConfiguration = new
        {
            subnetId = "<subnetId>",
        },
        constraints = new
        {
            maxWallClockTime = "PT1H23M45S",
            maxTaskRetryCount = 1234,
        },
        jobManagerTask = new
        {
            id = "<id>",
            displayName = "<displayName>",
            commandLine = "<commandLine>",
            containerSettings = new
            {
                containerRunOptions = "<containerRunOptions>",
                imageName = "<imageName>",
                registry = new
                {
                    username = "<username>",
                    password = "<password>",
                    registryServer = "<registryServer>",
                    identityReference = new
                    {
                        resourceId = "<resourceId>",
                    },
                },
                workingDirectory = "taskWorkingDirectory",
            },
            resourceFiles = new object[]
            {
                new
                {
                    autoStorageContainerName = "<autoStorageContainerName>",
                    storageContainerUrl = "<storageContainerUrl>",
                    httpUrl = "<httpUrl>",
                    blobPrefix = "<blobPrefix>",
                    filePath = "<filePath>",
                    fileMode = "<fileMode>",
                }
            },
            outputFiles = new object[]
            {
                new
                {
                    filePattern = "<filePattern>",
                    destination = new
                    {
                        container = new
                        {
                            path = "<path>",
                            containerUrl = "<containerUrl>",
                            uploadHeaders = new object[]
                            {
                                new
                                {
                                    name = "<name>",
                                    value = "<value>",
                                }
                            },
                        },
                    },
                    uploadOptions = new
                    {
                        uploadCondition = "tasksuccess",
                    },
                }
            },
            environmentSettings = new object[]
            {
                new
                {
                    name = "<name>",
                    value = "<value>",
                }
            },
            constraints = new
            {
                maxWallClockTime = "PT1H23M45S",
                retentionTime = "PT1H23M45S",
                maxTaskRetryCount = 1234,
            },
            requiredSlots = 1234,
            killJobOnCompletion = true,
            userIdentity = new
            {
                username = "<username>",
                autoUser = new
                {
                    scope = "task",
                    elevationLevel = "nonadmin",
                },
            },
            runExclusive = true,
            applicationPackageReferences = new object[]
            {
                new
                {
                    applicationId = "<applicationId>",
                    version = "<version>",
                }
            },
            authenticationTokenSettings = new
            {
                access = new object[]
                {
                    "job"
                },
            },
            allowLowPriorityNode = true,
        },
        jobPreparationTask = new
        {
            id = "<id>",
            commandLine = "<commandLine>",
            resourceFiles = new object[]
            {
                null
            },
            environmentSettings = new object[]
            {
                null
            },
            waitForSuccess = true,
            rerunOnNodeRebootAfterSuccess = true,
        },
        jobReleaseTask = new
        {
            id = "<id>",
            commandLine = "<commandLine>",
            resourceFiles = new object[]
            {
                null
            },
            environmentSettings = new object[]
            {
                null
            },
            maxWallClockTime = "PT1H23M45S",
            retentionTime = "PT1H23M45S",
        },
        commonEnvironmentSettings = new object[]
        {
            null
        },
        poolInfo = new
        {
            poolId = "<poolId>",
            autoPoolSpecification = new
            {
                autoPoolIdPrefix = "<autoPoolIdPrefix>",
                poolLifetimeOption = "jobschedule",
                keepAlive = true,
                pool = new
                {
                    displayName = "<displayName>",
                    vmSize = "<vmSize>",
                    virtualMachineConfiguration = new
                    {
                        imageReference = new
                        {
                            publisher = "<publisher>",
                            offer = "<offer>",
                            sku = "<sku>",
                            version = "<version>",
                            virtualMachineImageId = "<virtualMachineImageId>",
                        },
                        nodeAgentSKUId = "<nodeAgentSKUId>",
                        windowsConfiguration = new
                        {
                            enableAutomaticUpdates = true,
                        },
                        dataDisks = new object[]
                        {
                            new
                            {
                                lun = 1234,
                                caching = "none",
                                diskSizeGB = 1234,
                                storageAccountType = "standard_lrs",
                            }
                        },
                        licenseType = "<licenseType>",
                        containerConfiguration = new
                        {
                            type = "dockerCompatible",
                            containerImageNames = new object[]
                            {
                                "<containerImageNames>"
                            },
                            containerRegistries = new object[]
                            {
                                null
                            },
                        },
                        diskEncryptionConfiguration = new
                        {
                            targets = new object[]
                            {
                                "osdisk"
                            },
                        },
                        nodePlacementConfiguration = new
                        {
                            policy = "regional",
                        },
                        extensions = new object[]
                        {
                            new
                            {
                                name = "<name>",
                                publisher = "<publisher>",
                                type = "<type>",
                                typeHandlerVersion = "<typeHandlerVersion>",
                                autoUpgradeMinorVersion = true,
                                enableAutomaticUpgrade = true,
                                settings = new
                                {
                                    key = "<settings>",
                                },
                                protectedSettings = new
                                {
                                    key = "<protectedSettings>",
                                },
                                provisionAfterExtensions = new object[]
                                {
                                    "<provisionAfterExtensions>"
                                },
                            }
                        },
                        osDisk = new
                        {
                            ephemeralOSDiskSettings = new
                            {
                                placement = "cachedisk",
                            },
                            caching = "none",
                            diskSizeGB = 1234,
                            managedDisk = new
                            {
                                storageAccountType = "standard_lrs",
                            },
                            writeAcceleratorEnabled = true,
                        },
                        securityProfile = new
                        {
                            encryptionAtHost = true,
                            securityType = "trustedLaunch",
                            uefiSettings = new
                            {
                                secureBootEnabled = true,
                                vTpmEnabled = true,
                            },
                        },
                        serviceArtifactReference = new
                        {
                            id = "<id>",
                        },
                    },
                    taskSlotsPerNode = 1234,
                    taskSchedulingPolicy = new
                    {
                        nodeFillType = "spread",
                    },
                    resizeTimeout = "PT1H23M45S",
                    resourceTags = "<resourceTags>",
                    targetDedicatedNodes = 1234,
                    targetLowPriorityNodes = 1234,
                    enableAutoScale = true,
                    autoScaleFormula = "<autoScaleFormula>",
                    autoScaleEvaluationInterval = "PT1H23M45S",
                    enableInterNodeCommunication = true,
                    networkConfiguration = new
                    {
                        subnetId = "<subnetId>",
                        dynamicVNetAssignmentScope = "none",
                        endpointConfiguration = new
                        {
                            inboundNATPools = new object[]
                            {
                                new
                                {
                                    name = "<name>",
                                    protocol = "tcp",
                                    backendPort = 1234,
                                    frontendPortRangeStart = 1234,
                                    frontendPortRangeEnd = 1234,
                                    networkSecurityGroupRules = new object[]
                                    {
                                        new
                                        {
                                            priority = 1234,
                                            access = "allow",
                                            sourceAddressPrefix = "<sourceAddressPrefix>",
                                            sourcePortRanges = new object[]
                                            {
                                                "<sourcePortRanges>"
                                            },
                                        }
                                    },
                                }
                            },
                        },
                        publicIPAddressConfiguration = new
                        {
                            provision = "batchmanaged",
                            ipAddressIds = new object[]
                            {
                                "<ipAddressIds>"
                            },
                        },
                        enableAcceleratedNetworking = true,
                    },
                    startTask = new
                    {
                        commandLine = "<commandLine>",
                        resourceFiles = new object[]
                        {
                            null
                        },
                        environmentSettings = new object[]
                        {
                            null
                        },
                        maxTaskRetryCount = 1234,
                        waitForSuccess = true,
                    },
                    applicationPackageReferences = new object[]
                    {
                        null
                    },
                    userAccounts = new object[]
                    {
                        new
                        {
                            name = "<name>",
                            password = "<password>",
                            elevationLevel = "nonadmin",
                            linuxUserConfiguration = new
                            {
                                uid = 1234,
                                gid = 1234,
                                sshPrivateKey = "<sshPrivateKey>",
                            },
                            windowsUserConfiguration = new
                            {
                                loginMode = "batch",
                            },
                        }
                    },
                    metadata = new object[]
                    {
                        new
                        {
                            name = "<name>",
                            value = "<value>",
                        }
                    },
                    mountConfiguration = new object[]
                    {
                        new
                        {
                            azureBlobFileSystemConfiguration = new
                            {
                                accountName = "<accountName>",
                                containerName = "<containerName>",
                                accountKey = "<accountKey>",
                                sasKey = "<sasKey>",
                                blobfuseOptions = "<blobfuseOptions>",
                                relativeMountPath = "<relativeMountPath>",
                            },
                            nfsMountConfiguration = new
                            {
                                source = "<source>",
                                relativeMountPath = "<relativeMountPath>",
                                mountOptions = "<mountOptions>",
                            },
                            cifsMountConfiguration = new
                            {
                                username = "<username>",
                                source = "<source>",
                                relativeMountPath = "<relativeMountPath>",
                                mountOptions = "<mountOptions>",
                                password = "<password>",
                            },
                            azureFileShareConfiguration = new
                            {
                                accountName = "<accountName>",
                                azureFileUrl = "<azureFileUrl>",
                                accountKey = "<accountKey>",
                                relativeMountPath = "<relativeMountPath>",
                                mountOptions = "<mountOptions>",
                            },
                        }
                    },
                    targetNodeCommunicationMode = "default",
                    upgradePolicy = new
                    {
                        mode = "automatic",
                        automaticOSUpgradePolicy = new
                        {
                            disableAutomaticRollback = true,
                            enableAutomaticOSUpgrade = true,
                            useRollingUpgradePolicy = true,
                            osRollingUpgradeDeferral = true,
                        },
                        rollingUpgradePolicy = new
                        {
                            enableCrossZoneUpgrade = true,
                            maxBatchInstancePercent = 1234,
                            maxUnhealthyInstancePercent = 1234,
                            maxUnhealthyUpgradedInstancePercent = 1234,
                            pauseTimeBetweenBatches = "PT1H23M45S",
                            prioritizeUnhealthyInstances = true,
                            rollbackFailedInstancesOnPolicyBreach = true,
                        },
                    },
                },
            },
        },
        metadata = new object[]
        {
            null
        },
    },
    metadata = new object[]
    {
        null
    },
});
Response response = client.UpdateJobSchedule("<jobScheduleId>", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null);

Console.WriteLine(response.Status);

Applies to

UpdateJobSchedule(String, RequestContent, Nullable<Int32>, Nullable<DateTimeOffset>, RequestConditions, RequestContext)

Source:
BatchClient.cs

[Protocol Method] Updates the properties of the specified Job Schedule.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual Azure.Response UpdateJobSchedule (string jobScheduleId, Azure.Core.RequestContent content, int? timeOutInSeconds = default, DateTimeOffset? ocpdate = default, Azure.RequestConditions requestConditions = default, Azure.RequestContext context = default);
abstract member UpdateJobSchedule : string * Azure.Core.RequestContent * Nullable<int> * Nullable<DateTimeOffset> * Azure.RequestConditions * Azure.RequestContext -> Azure.Response
override this.UpdateJobSchedule : string * Azure.Core.RequestContent * Nullable<int> * Nullable<DateTimeOffset> * Azure.RequestConditions * Azure.RequestContext -> Azure.Response
Public Overridable Function UpdateJobSchedule (jobScheduleId As String, content As RequestContent, Optional timeOutInSeconds As Nullable(Of Integer) = Nothing, Optional ocpdate As Nullable(Of DateTimeOffset) = Nothing, Optional requestConditions As RequestConditions = Nothing, Optional context As RequestContext = Nothing) As Response

Parameters

jobScheduleId
String

The ID of the Job Schedule to update.

content
RequestContent

The content to send as the body of the request.

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.

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

jobScheduleId or content is null.

jobScheduleId 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 UpdateJobSchedule.

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

using RequestContent content = RequestContent.Create(new object());
Response response = client.UpdateJobSchedule("<jobScheduleId>", content);

Console.WriteLine(response.Status);

This sample shows how to call UpdateJobSchedule with all parameters and request content.

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

using RequestContent content = RequestContent.Create(new
{
    schedule = new
    {
        doNotRunUntil = "2022-05-10T18:57:31.2311892Z",
        doNotRunAfter = "2022-05-10T18:57:31.2311892Z",
        startWindow = "PT1H23M45S",
        recurrenceInterval = "PT1H23M45S",
    },
    jobSpecification = new
    {
        priority = 1234,
        allowTaskPreemption = true,
        maxParallelTasks = 1234,
        displayName = "<displayName>",
        usesTaskDependencies = true,
        onAllTasksComplete = "noaction",
        onTaskFailure = "noaction",
        networkConfiguration = new
        {
            subnetId = "<subnetId>",
        },
        constraints = new
        {
            maxWallClockTime = "PT1H23M45S",
            maxTaskRetryCount = 1234,
        },
        jobManagerTask = new
        {
            id = "<id>",
            displayName = "<displayName>",
            commandLine = "<commandLine>",
            containerSettings = new
            {
                containerRunOptions = "<containerRunOptions>",
                imageName = "<imageName>",
                registry = new
                {
                    username = "<username>",
                    password = "<password>",
                    registryServer = "<registryServer>",
                    identityReference = new
                    {
                        resourceId = "<resourceId>",
                    },
                },
                workingDirectory = "taskWorkingDirectory",
            },
            resourceFiles = new object[]
            {
                new
                {
                    autoStorageContainerName = "<autoStorageContainerName>",
                    storageContainerUrl = "<storageContainerUrl>",
                    httpUrl = "<httpUrl>",
                    blobPrefix = "<blobPrefix>",
                    filePath = "<filePath>",
                    fileMode = "<fileMode>",
                }
            },
            outputFiles = new object[]
            {
                new
                {
                    filePattern = "<filePattern>",
                    destination = new
                    {
                        container = new
                        {
                            path = "<path>",
                            containerUrl = "<containerUrl>",
                            uploadHeaders = new object[]
                            {
                                new
                                {
                                    name = "<name>",
                                    value = "<value>",
                                }
                            },
                        },
                    },
                    uploadOptions = new
                    {
                        uploadCondition = "tasksuccess",
                    },
                }
            },
            environmentSettings = new object[]
            {
                new
                {
                    name = "<name>",
                    value = "<value>",
                }
            },
            constraints = new
            {
                maxWallClockTime = "PT1H23M45S",
                retentionTime = "PT1H23M45S",
                maxTaskRetryCount = 1234,
            },
            requiredSlots = 1234,
            killJobOnCompletion = true,
            userIdentity = new
            {
                username = "<username>",
                autoUser = new
                {
                    scope = "task",
                    elevationLevel = "nonadmin",
                },
            },
            runExclusive = true,
            applicationPackageReferences = new object[]
            {
                new
                {
                    applicationId = "<applicationId>",
                    version = "<version>",
                }
            },
            authenticationTokenSettings = new
            {
                access = new object[]
                {
                    "job"
                },
            },
            allowLowPriorityNode = true,
        },
        jobPreparationTask = new
        {
            id = "<id>",
            commandLine = "<commandLine>",
            resourceFiles = new object[]
            {
                null
            },
            environmentSettings = new object[]
            {
                null
            },
            waitForSuccess = true,
            rerunOnNodeRebootAfterSuccess = true,
        },
        jobReleaseTask = new
        {
            id = "<id>",
            commandLine = "<commandLine>",
            resourceFiles = new object[]
            {
                null
            },
            environmentSettings = new object[]
            {
                null
            },
            maxWallClockTime = "PT1H23M45S",
            retentionTime = "PT1H23M45S",
        },
        commonEnvironmentSettings = new object[]
        {
            null
        },
        poolInfo = new
        {
            poolId = "<poolId>",
            autoPoolSpecification = new
            {
                autoPoolIdPrefix = "<autoPoolIdPrefix>",
                poolLifetimeOption = "jobschedule",
                keepAlive = true,
                pool = new
                {
                    displayName = "<displayName>",
                    vmSize = "<vmSize>",
                    virtualMachineConfiguration = new
                    {
                        imageReference = new
                        {
                            publisher = "<publisher>",
                            offer = "<offer>",
                            sku = "<sku>",
                            version = "<version>",
                            virtualMachineImageId = "<virtualMachineImageId>",
                        },
                        nodeAgentSKUId = "<nodeAgentSKUId>",
                        windowsConfiguration = new
                        {
                            enableAutomaticUpdates = true,
                        },
                        dataDisks = new object[]
                        {
                            new
                            {
                                lun = 1234,
                                caching = "none",
                                diskSizeGB = 1234,
                                storageAccountType = "standard_lrs",
                            }
                        },
                        licenseType = "<licenseType>",
                        containerConfiguration = new
                        {
                            type = "dockerCompatible",
                            containerImageNames = new object[]
                            {
                                "<containerImageNames>"
                            },
                            containerRegistries = new object[]
                            {
                                null
                            },
                        },
                        diskEncryptionConfiguration = new
                        {
                            targets = new object[]
                            {
                                "osdisk"
                            },
                        },
                        nodePlacementConfiguration = new
                        {
                            policy = "regional",
                        },
                        extensions = new object[]
                        {
                            new
                            {
                                name = "<name>",
                                publisher = "<publisher>",
                                type = "<type>",
                                typeHandlerVersion = "<typeHandlerVersion>",
                                autoUpgradeMinorVersion = true,
                                enableAutomaticUpgrade = true,
                                settings = new
                                {
                                    key = "<settings>",
                                },
                                protectedSettings = new
                                {
                                    key = "<protectedSettings>",
                                },
                                provisionAfterExtensions = new object[]
                                {
                                    "<provisionAfterExtensions>"
                                },
                            }
                        },
                        osDisk = new
                        {
                            ephemeralOSDiskSettings = new
                            {
                                placement = "cachedisk",
                            },
                            caching = "none",
                            diskSizeGB = 1234,
                            managedDisk = new
                            {
                                storageAccountType = "standard_lrs",
                            },
                            writeAcceleratorEnabled = true,
                        },
                        securityProfile = new
                        {
                            encryptionAtHost = true,
                            securityType = "trustedLaunch",
                            uefiSettings = new
                            {
                                secureBootEnabled = true,
                                vTpmEnabled = true,
                            },
                        },
                        serviceArtifactReference = new
                        {
                            id = "<id>",
                        },
                    },
                    taskSlotsPerNode = 1234,
                    taskSchedulingPolicy = new
                    {
                        nodeFillType = "spread",
                    },
                    resizeTimeout = "PT1H23M45S",
                    resourceTags = "<resourceTags>",
                    targetDedicatedNodes = 1234,
                    targetLowPriorityNodes = 1234,
                    enableAutoScale = true,
                    autoScaleFormula = "<autoScaleFormula>",
                    autoScaleEvaluationInterval = "PT1H23M45S",
                    enableInterNodeCommunication = true,
                    networkConfiguration = new
                    {
                        subnetId = "<subnetId>",
                        dynamicVNetAssignmentScope = "none",
                        endpointConfiguration = new
                        {
                            inboundNATPools = new object[]
                            {
                                new
                                {
                                    name = "<name>",
                                    protocol = "tcp",
                                    backendPort = 1234,
                                    frontendPortRangeStart = 1234,
                                    frontendPortRangeEnd = 1234,
                                    networkSecurityGroupRules = new object[]
                                    {
                                        new
                                        {
                                            priority = 1234,
                                            access = "allow",
                                            sourceAddressPrefix = "<sourceAddressPrefix>",
                                            sourcePortRanges = new object[]
                                            {
                                                "<sourcePortRanges>"
                                            },
                                        }
                                    },
                                }
                            },
                        },
                        publicIPAddressConfiguration = new
                        {
                            provision = "batchmanaged",
                            ipAddressIds = new object[]
                            {
                                "<ipAddressIds>"
                            },
                        },
                        enableAcceleratedNetworking = true,
                    },
                    startTask = new
                    {
                        commandLine = "<commandLine>",
                        resourceFiles = new object[]
                        {
                            null
                        },
                        environmentSettings = new object[]
                        {
                            null
                        },
                        maxTaskRetryCount = 1234,
                        waitForSuccess = true,
                    },
                    applicationPackageReferences = new object[]
                    {
                        null
                    },
                    userAccounts = new object[]
                    {
                        new
                        {
                            name = "<name>",
                            password = "<password>",
                            elevationLevel = "nonadmin",
                            linuxUserConfiguration = new
                            {
                                uid = 1234,
                                gid = 1234,
                                sshPrivateKey = "<sshPrivateKey>",
                            },
                            windowsUserConfiguration = new
                            {
                                loginMode = "batch",
                            },
                        }
                    },
                    metadata = new object[]
                    {
                        new
                        {
                            name = "<name>",
                            value = "<value>",
                        }
                    },
                    mountConfiguration = new object[]
                    {
                        new
                        {
                            azureBlobFileSystemConfiguration = new
                            {
                                accountName = "<accountName>",
                                containerName = "<containerName>",
                                accountKey = "<accountKey>",
                                sasKey = "<sasKey>",
                                blobfuseOptions = "<blobfuseOptions>",
                                relativeMountPath = "<relativeMountPath>",
                            },
                            nfsMountConfiguration = new
                            {
                                source = "<source>",
                                relativeMountPath = "<relativeMountPath>",
                                mountOptions = "<mountOptions>",
                            },
                            cifsMountConfiguration = new
                            {
                                username = "<username>",
                                source = "<source>",
                                relativeMountPath = "<relativeMountPath>",
                                mountOptions = "<mountOptions>",
                                password = "<password>",
                            },
                            azureFileShareConfiguration = new
                            {
                                accountName = "<accountName>",
                                azureFileUrl = "<azureFileUrl>",
                                accountKey = "<accountKey>",
                                relativeMountPath = "<relativeMountPath>",
                                mountOptions = "<mountOptions>",
                            },
                        }
                    },
                    targetNodeCommunicationMode = "default",
                    upgradePolicy = new
                    {
                        mode = "automatic",
                        automaticOSUpgradePolicy = new
                        {
                            disableAutomaticRollback = true,
                            enableAutomaticOSUpgrade = true,
                            useRollingUpgradePolicy = true,
                            osRollingUpgradeDeferral = true,
                        },
                        rollingUpgradePolicy = new
                        {
                            enableCrossZoneUpgrade = true,
                            maxBatchInstancePercent = 1234,
                            maxUnhealthyInstancePercent = 1234,
                            maxUnhealthyUpgradedInstancePercent = 1234,
                            pauseTimeBetweenBatches = "PT1H23M45S",
                            prioritizeUnhealthyInstances = true,
                            rollbackFailedInstancesOnPolicyBreach = true,
                        },
                    },
                },
            },
        },
        metadata = new object[]
        {
            null
        },
    },
    metadata = new object[]
    {
        null
    },
});
Response response = client.UpdateJobSchedule("<jobScheduleId>", content, timeOutInSeconds: 1234, ocpdate: DateTimeOffset.Parse("Tue, 10 May 2022 18:57:31 GMT"), requestConditions: null);

Console.WriteLine(response.Status);

Applies to