| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Batch.Protocol.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// A Job Release Task to run on Job completion on any Compute Node where |
| | 20 | | /// the Job has run. |
| | 21 | | /// </summary> |
| | 22 | | /// <remarks> |
| | 23 | | /// The Job Release Task runs when the Job ends, because of one of the |
| | 24 | | /// following: The user calls the Terminate Job API, or the Delete Job API |
| | 25 | | /// while the Job is still active, the Job's maximum wall clock time |
| | 26 | | /// constraint is reached, and the Job is still active, or the Job's Job |
| | 27 | | /// Manager Task completed, and the Job is configured to terminate when the |
| | 28 | | /// Job Manager completes. The Job Release Task runs on each Node where |
| | 29 | | /// Tasks of the Job have run and the Job Preparation Task ran and |
| | 30 | | /// completed. If you reimage a Node after it has run the Job Preparation |
| | 31 | | /// Task, and the Job ends without any further Tasks of the Job running on |
| | 32 | | /// that Node (and hence the Job Preparation Task does not re-run), then |
| | 33 | | /// the Job Release Task does not run on that Compute Node. If a Node |
| | 34 | | /// reboots while the Job Release Task is still running, the Job Release |
| | 35 | | /// Task runs again when the Compute Node starts up. The Job is not marked |
| | 36 | | /// as complete until all Job Release Tasks have completed. The Job Release |
| | 37 | | /// Task runs in the background. It does not occupy a scheduling slot; that |
| | 38 | | /// is, it does not count towards the maxTasksPerNode limit specified on |
| | 39 | | /// the Pool. |
| | 40 | | /// </remarks> |
| | 41 | | public partial class JobReleaseTask |
| | 42 | | { |
| | 43 | | /// <summary> |
| | 44 | | /// Initializes a new instance of the JobReleaseTask class. |
| | 45 | | /// </summary> |
| 973 | 46 | | public JobReleaseTask() |
| | 47 | | { |
| | 48 | | CustomInit(); |
| 973 | 49 | | } |
| | 50 | |
|
| | 51 | | /// <summary> |
| | 52 | | /// Initializes a new instance of the JobReleaseTask class. |
| | 53 | | /// </summary> |
| | 54 | | /// <param name="commandLine">The command line of the Job Release |
| | 55 | | /// Task.</param> |
| | 56 | | /// <param name="id">A string that uniquely identifies the Job Release |
| | 57 | | /// Task within the Job.</param> |
| | 58 | | /// <param name="containerSettings">The settings for the container |
| | 59 | | /// under which the Job Release Task runs.</param> |
| | 60 | | /// <param name="resourceFiles">A list of files that the Batch service |
| | 61 | | /// will download to the Compute Node before running the command line. |
| | 62 | | /// There is a maximum size for the list of resource files. When the |
| | 63 | | /// max size is exceeded, the request will fail and the response error |
| | 64 | | /// code will be RequestEntityTooLarge. If this occurs, the collection |
| | 65 | | /// of ResourceFiles must be reduced in size. This can be achieved |
| | 66 | | /// using .zip files, Application Packages, or Docker |
| | 67 | | /// Containers.</param> |
| | 68 | | /// <param name="environmentSettings">A list of environment variable |
| | 69 | | /// settings for the Job Release Task.</param> |
| | 70 | | /// <param name="maxWallClockTime">The maximum elapsed time that the |
| | 71 | | /// Job Release Task may run on a given Compute Node, measured from the |
| | 72 | | /// time the Task starts. If the Task does not complete within the time |
| | 73 | | /// limit, the Batch service terminates it. The default value is 15 |
| | 74 | | /// minutes. You may not specify a timeout longer than 15 minutes. If |
| | 75 | | /// you do, the Batch service rejects it with an error; if you are |
| | 76 | | /// calling the REST API directly, the HTTP status code is 400 (Bad |
| | 77 | | /// Request).</param> |
| | 78 | | /// <param name="retentionTime">The minimum time to retain the Task |
| | 79 | | /// directory for the Job Release Task on the Compute Node. After this |
| | 80 | | /// time, the Batch service may delete the Task directory and all its |
| | 81 | | /// contents.</param> |
| | 82 | | /// <param name="userIdentity">The user identity under which the Job |
| | 83 | | /// Release Task runs.</param> |
| 0 | 84 | | public JobReleaseTask(string commandLine, string id = default(string), TaskContainerSettings containerSettings = |
| | 85 | | { |
| 0 | 86 | | Id = id; |
| 0 | 87 | | CommandLine = commandLine; |
| 0 | 88 | | ContainerSettings = containerSettings; |
| 0 | 89 | | ResourceFiles = resourceFiles; |
| 0 | 90 | | EnvironmentSettings = environmentSettings; |
| 0 | 91 | | MaxWallClockTime = maxWallClockTime; |
| 0 | 92 | | RetentionTime = retentionTime; |
| 0 | 93 | | UserIdentity = userIdentity; |
| | 94 | | CustomInit(); |
| 0 | 95 | | } |
| | 96 | |
|
| | 97 | | /// <summary> |
| | 98 | | /// An initialization method that performs custom operations like setting defaults |
| | 99 | | /// </summary> |
| | 100 | | partial void CustomInit(); |
| | 101 | |
|
| | 102 | | /// <summary> |
| | 103 | | /// Gets or sets a string that uniquely identifies the Job Release Task |
| | 104 | | /// within the Job. |
| | 105 | | /// </summary> |
| | 106 | | /// <remarks> |
| | 107 | | /// The ID can contain any combination of alphanumeric characters |
| | 108 | | /// including hyphens and underscores and cannot contain more than 64 |
| | 109 | | /// characters. If you do not specify this property, the Batch service |
| | 110 | | /// assigns a default value of 'jobrelease'. No other Task in the Job |
| | 111 | | /// can have the same ID as the Job Release Task. If you try to submit |
| | 112 | | /// a Task with the same id, the Batch service rejects the request with |
| | 113 | | /// error code TaskIdSameAsJobReleaseTask; if you are calling the REST |
| | 114 | | /// API directly, the HTTP status code is 409 (Conflict). |
| | 115 | | /// </remarks> |
| | 116 | | [JsonProperty(PropertyName = "id")] |
| 2331 | 117 | | public string Id { get; set; } |
| | 118 | |
|
| | 119 | | /// <summary> |
| | 120 | | /// Gets or sets the command line of the Job Release Task. |
| | 121 | | /// </summary> |
| | 122 | | /// <remarks> |
| | 123 | | /// The command line does not run under a shell, and therefore cannot |
| | 124 | | /// take advantage of shell features such as environment variable |
| | 125 | | /// expansion. If you want to take advantage of such features, you |
| | 126 | | /// should invoke the shell in the command line, for example using "cmd |
| | 127 | | /// /c MyCommand" in Windows or "/bin/sh -c MyCommand" in Linux. If the |
| | 128 | | /// command line refers to file paths, it should use a relative path |
| | 129 | | /// (relative to the Task working directory), or use the Batch provided |
| | 130 | | /// environment variable |
| | 131 | | /// (https://docs.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables). |
| | 132 | | /// </remarks> |
| | 133 | | [JsonProperty(PropertyName = "commandLine")] |
| 2338 | 134 | | public string CommandLine { get; set; } |
| | 135 | |
|
| | 136 | | /// <summary> |
| | 137 | | /// Gets or sets the settings for the container under which the Job |
| | 138 | | /// Release Task runs. |
| | 139 | | /// </summary> |
| | 140 | | /// <remarks> |
| | 141 | | /// When this is specified, all directories recursively below the |
| | 142 | | /// AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the |
| | 143 | | /// node) are mapped into the container, all Task environment variables |
| | 144 | | /// are mapped into the container, and the Task command line is |
| | 145 | | /// executed in the container. Files produced in the container outside |
| | 146 | | /// of AZ_BATCH_NODE_ROOT_DIR might not be reflected to the host disk, |
| | 147 | | /// meaning that Batch file APIs will not be able to access those |
| | 148 | | /// files. |
| | 149 | | /// </remarks> |
| | 150 | | [JsonProperty(PropertyName = "containerSettings")] |
| 2308 | 151 | | public TaskContainerSettings ContainerSettings { get; set; } |
| | 152 | |
|
| | 153 | | /// <summary> |
| | 154 | | /// Gets or sets a list of files that the Batch service will download |
| | 155 | | /// to the Compute Node before running the command line. There is a |
| | 156 | | /// maximum size for the list of resource files. When the max size is |
| | 157 | | /// exceeded, the request will fail and the response error code will be |
| | 158 | | /// RequestEntityTooLarge. If this occurs, the collection of |
| | 159 | | /// ResourceFiles must be reduced in size. This can be achieved using |
| | 160 | | /// .zip files, Application Packages, or Docker Containers. |
| | 161 | | /// </summary> |
| | 162 | | /// <remarks> |
| | 163 | | /// Files listed under this element are located in the Task's working |
| | 164 | | /// directory. |
| | 165 | | /// </remarks> |
| | 166 | | [JsonProperty(PropertyName = "resourceFiles")] |
| 2339 | 167 | | public IList<ResourceFile> ResourceFiles { get; set; } |
| | 168 | |
|
| | 169 | | /// <summary> |
| | 170 | | /// Gets or sets a list of environment variable settings for the Job |
| | 171 | | /// Release Task. |
| | 172 | | /// </summary> |
| | 173 | | [JsonProperty(PropertyName = "environmentSettings")] |
| 2323 | 174 | | public IList<EnvironmentSetting> EnvironmentSettings { get; set; } |
| | 175 | |
|
| | 176 | | /// <summary> |
| | 177 | | /// Gets or sets the maximum elapsed time that the Job Release Task may |
| | 178 | | /// run on a given Compute Node, measured from the time the Task |
| | 179 | | /// starts. If the Task does not complete within the time limit, the |
| | 180 | | /// Batch service terminates it. The default value is 15 minutes. You |
| | 181 | | /// may not specify a timeout longer than 15 minutes. If you do, the |
| | 182 | | /// Batch service rejects it with an error; if you are calling the REST |
| | 183 | | /// API directly, the HTTP status code is 400 (Bad Request). |
| | 184 | | /// </summary> |
| | 185 | | [JsonProperty(PropertyName = "maxWallClockTime")] |
| 2342 | 186 | | public System.TimeSpan? MaxWallClockTime { get; set; } |
| | 187 | |
|
| | 188 | | /// <summary> |
| | 189 | | /// Gets or sets the minimum time to retain the Task directory for the |
| | 190 | | /// Job Release Task on the Compute Node. After this time, the Batch |
| | 191 | | /// service may delete the Task directory and all its contents. |
| | 192 | | /// </summary> |
| | 193 | | /// <remarks> |
| | 194 | | /// The default is 7 days, i.e. the Task directory will be retained for |
| | 195 | | /// 7 days unless the Compute Node is removed or the Job is deleted. |
| | 196 | | /// </remarks> |
| | 197 | | [JsonProperty(PropertyName = "retentionTime")] |
| 2340 | 198 | | public System.TimeSpan? RetentionTime { get; set; } |
| | 199 | |
|
| | 200 | | /// <summary> |
| | 201 | | /// Gets or sets the user identity under which the Job Release Task |
| | 202 | | /// runs. |
| | 203 | | /// </summary> |
| | 204 | | /// <remarks> |
| | 205 | | /// If omitted, the Task runs as a non-administrative user unique to |
| | 206 | | /// the Task. |
| | 207 | | /// </remarks> |
| | 208 | | [JsonProperty(PropertyName = "userIdentity")] |
| 2344 | 209 | | public UserIdentity UserIdentity { get; set; } |
| | 210 | |
|
| | 211 | | } |
| | 212 | | } |