| | | 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 |
| | | 12 | | { |
| | | 13 | | using Microsoft.Rest; |
| | | 14 | | using Microsoft.Rest.Azure; |
| | | 15 | | using Models; |
| | | 16 | | using System.IO; |
| | | 17 | | using System.Threading; |
| | | 18 | | using System.Threading.Tasks; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Extension methods for ComputeNodeOperations. |
| | | 22 | | /// </summary> |
| | | 23 | | public static partial class ComputeNodeOperationsExtensions |
| | | 24 | | { |
| | | 25 | | /// <summary> |
| | | 26 | | /// Adds a user Account to the specified Compute Node. |
| | | 27 | | /// </summary> |
| | | 28 | | /// <remarks> |
| | | 29 | | /// You can add a user Account to a Compute Node only when it is in the idle or |
| | | 30 | | /// running state. |
| | | 31 | | /// </remarks> |
| | | 32 | | /// <param name='operations'> |
| | | 33 | | /// The operations group for this extension method. |
| | | 34 | | /// </param> |
| | | 35 | | /// <param name='poolId'> |
| | | 36 | | /// The ID of the Pool that contains the Compute Node. |
| | | 37 | | /// </param> |
| | | 38 | | /// <param name='nodeId'> |
| | | 39 | | /// The ID of the machine on which you want to create a user Account. |
| | | 40 | | /// </param> |
| | | 41 | | /// <param name='user'> |
| | | 42 | | /// The user Account to be created. |
| | | 43 | | /// </param> |
| | | 44 | | /// <param name='computeNodeAddUserOptions'> |
| | | 45 | | /// Additional parameters for the operation |
| | | 46 | | /// </param> |
| | | 47 | | public static ComputeNodeAddUserHeaders AddUser(this IComputeNodeOperations operations, string poolId, strin |
| | | 48 | | { |
| | 0 | 49 | | return operations.AddUserAsync(poolId, nodeId, user, computeNodeAddUserOptions).GetAwaiter().GetResult() |
| | | 50 | | } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// Adds a user Account to the specified Compute Node. |
| | | 54 | | /// </summary> |
| | | 55 | | /// <remarks> |
| | | 56 | | /// You can add a user Account to a Compute Node only when it is in the idle or |
| | | 57 | | /// running state. |
| | | 58 | | /// </remarks> |
| | | 59 | | /// <param name='operations'> |
| | | 60 | | /// The operations group for this extension method. |
| | | 61 | | /// </param> |
| | | 62 | | /// <param name='poolId'> |
| | | 63 | | /// The ID of the Pool that contains the Compute Node. |
| | | 64 | | /// </param> |
| | | 65 | | /// <param name='nodeId'> |
| | | 66 | | /// The ID of the machine on which you want to create a user Account. |
| | | 67 | | /// </param> |
| | | 68 | | /// <param name='user'> |
| | | 69 | | /// The user Account to be created. |
| | | 70 | | /// </param> |
| | | 71 | | /// <param name='computeNodeAddUserOptions'> |
| | | 72 | | /// Additional parameters for the operation |
| | | 73 | | /// </param> |
| | | 74 | | /// <param name='cancellationToken'> |
| | | 75 | | /// The cancellation token. |
| | | 76 | | /// </param> |
| | | 77 | | public static async Task<ComputeNodeAddUserHeaders> AddUserAsync(this IComputeNodeOperations operations, str |
| | | 78 | | { |
| | 0 | 79 | | using (var _result = await operations.AddUserWithHttpMessagesAsync(poolId, nodeId, user, computeNodeAddU |
| | | 80 | | { |
| | 0 | 81 | | return _result.Headers; |
| | | 82 | | } |
| | 0 | 83 | | } |
| | | 84 | | |
| | | 85 | | /// <summary> |
| | | 86 | | /// Deletes a user Account from the specified Compute Node. |
| | | 87 | | /// </summary> |
| | | 88 | | /// <remarks> |
| | | 89 | | /// You can delete a user Account to a Compute Node only when it is in the idle |
| | | 90 | | /// or running state. |
| | | 91 | | /// </remarks> |
| | | 92 | | /// <param name='operations'> |
| | | 93 | | /// The operations group for this extension method. |
| | | 94 | | /// </param> |
| | | 95 | | /// <param name='poolId'> |
| | | 96 | | /// The ID of the Pool that contains the Compute Node. |
| | | 97 | | /// </param> |
| | | 98 | | /// <param name='nodeId'> |
| | | 99 | | /// The ID of the machine on which you want to delete a user Account. |
| | | 100 | | /// </param> |
| | | 101 | | /// <param name='userName'> |
| | | 102 | | /// The name of the user Account to delete. |
| | | 103 | | /// </param> |
| | | 104 | | /// <param name='computeNodeDeleteUserOptions'> |
| | | 105 | | /// Additional parameters for the operation |
| | | 106 | | /// </param> |
| | | 107 | | public static ComputeNodeDeleteUserHeaders DeleteUser(this IComputeNodeOperations operations, string poolId, |
| | | 108 | | { |
| | 0 | 109 | | return operations.DeleteUserAsync(poolId, nodeId, userName, computeNodeDeleteUserOptions).GetAwaiter().G |
| | | 110 | | } |
| | | 111 | | |
| | | 112 | | /// <summary> |
| | | 113 | | /// Deletes a user Account from the specified Compute Node. |
| | | 114 | | /// </summary> |
| | | 115 | | /// <remarks> |
| | | 116 | | /// You can delete a user Account to a Compute Node only when it is in the idle |
| | | 117 | | /// or running state. |
| | | 118 | | /// </remarks> |
| | | 119 | | /// <param name='operations'> |
| | | 120 | | /// The operations group for this extension method. |
| | | 121 | | /// </param> |
| | | 122 | | /// <param name='poolId'> |
| | | 123 | | /// The ID of the Pool that contains the Compute Node. |
| | | 124 | | /// </param> |
| | | 125 | | /// <param name='nodeId'> |
| | | 126 | | /// The ID of the machine on which you want to delete a user Account. |
| | | 127 | | /// </param> |
| | | 128 | | /// <param name='userName'> |
| | | 129 | | /// The name of the user Account to delete. |
| | | 130 | | /// </param> |
| | | 131 | | /// <param name='computeNodeDeleteUserOptions'> |
| | | 132 | | /// Additional parameters for the operation |
| | | 133 | | /// </param> |
| | | 134 | | /// <param name='cancellationToken'> |
| | | 135 | | /// The cancellation token. |
| | | 136 | | /// </param> |
| | | 137 | | public static async Task<ComputeNodeDeleteUserHeaders> DeleteUserAsync(this IComputeNodeOperations operation |
| | | 138 | | { |
| | 0 | 139 | | using (var _result = await operations.DeleteUserWithHttpMessagesAsync(poolId, nodeId, userName, computeN |
| | | 140 | | { |
| | 0 | 141 | | return _result.Headers; |
| | | 142 | | } |
| | 0 | 143 | | } |
| | | 144 | | |
| | | 145 | | /// <summary> |
| | | 146 | | /// Updates the password and expiration time of a user Account on the specified |
| | | 147 | | /// Compute Node. |
| | | 148 | | /// </summary> |
| | | 149 | | /// <remarks> |
| | | 150 | | /// This operation replaces of all the updatable properties of the Account. For |
| | | 151 | | /// example, if the expiryTime element is not specified, the current value is |
| | | 152 | | /// replaced with the default value, not left unmodified. You can update a user |
| | | 153 | | /// Account on a Compute Node only when it is in the idle or running state. |
| | | 154 | | /// </remarks> |
| | | 155 | | /// <param name='operations'> |
| | | 156 | | /// The operations group for this extension method. |
| | | 157 | | /// </param> |
| | | 158 | | /// <param name='poolId'> |
| | | 159 | | /// The ID of the Pool that contains the Compute Node. |
| | | 160 | | /// </param> |
| | | 161 | | /// <param name='nodeId'> |
| | | 162 | | /// The ID of the machine on which you want to update a user Account. |
| | | 163 | | /// </param> |
| | | 164 | | /// <param name='userName'> |
| | | 165 | | /// The name of the user Account to update. |
| | | 166 | | /// </param> |
| | | 167 | | /// <param name='nodeUpdateUserParameter'> |
| | | 168 | | /// The parameters for the request. |
| | | 169 | | /// </param> |
| | | 170 | | /// <param name='computeNodeUpdateUserOptions'> |
| | | 171 | | /// Additional parameters for the operation |
| | | 172 | | /// </param> |
| | | 173 | | public static ComputeNodeUpdateUserHeaders UpdateUser(this IComputeNodeOperations operations, string poolId, |
| | | 174 | | { |
| | 0 | 175 | | return operations.UpdateUserAsync(poolId, nodeId, userName, nodeUpdateUserParameter, computeNodeUpdateUs |
| | | 176 | | } |
| | | 177 | | |
| | | 178 | | /// <summary> |
| | | 179 | | /// Updates the password and expiration time of a user Account on the specified |
| | | 180 | | /// Compute Node. |
| | | 181 | | /// </summary> |
| | | 182 | | /// <remarks> |
| | | 183 | | /// This operation replaces of all the updatable properties of the Account. For |
| | | 184 | | /// example, if the expiryTime element is not specified, the current value is |
| | | 185 | | /// replaced with the default value, not left unmodified. You can update a user |
| | | 186 | | /// Account on a Compute Node only when it is in the idle or running state. |
| | | 187 | | /// </remarks> |
| | | 188 | | /// <param name='operations'> |
| | | 189 | | /// The operations group for this extension method. |
| | | 190 | | /// </param> |
| | | 191 | | /// <param name='poolId'> |
| | | 192 | | /// The ID of the Pool that contains the Compute Node. |
| | | 193 | | /// </param> |
| | | 194 | | /// <param name='nodeId'> |
| | | 195 | | /// The ID of the machine on which you want to update a user Account. |
| | | 196 | | /// </param> |
| | | 197 | | /// <param name='userName'> |
| | | 198 | | /// The name of the user Account to update. |
| | | 199 | | /// </param> |
| | | 200 | | /// <param name='nodeUpdateUserParameter'> |
| | | 201 | | /// The parameters for the request. |
| | | 202 | | /// </param> |
| | | 203 | | /// <param name='computeNodeUpdateUserOptions'> |
| | | 204 | | /// Additional parameters for the operation |
| | | 205 | | /// </param> |
| | | 206 | | /// <param name='cancellationToken'> |
| | | 207 | | /// The cancellation token. |
| | | 208 | | /// </param> |
| | | 209 | | public static async Task<ComputeNodeUpdateUserHeaders> UpdateUserAsync(this IComputeNodeOperations operation |
| | | 210 | | { |
| | 0 | 211 | | using (var _result = await operations.UpdateUserWithHttpMessagesAsync(poolId, nodeId, userName, nodeUpda |
| | | 212 | | { |
| | 0 | 213 | | return _result.Headers; |
| | | 214 | | } |
| | 0 | 215 | | } |
| | | 216 | | |
| | | 217 | | /// <summary> |
| | | 218 | | /// Gets information about the specified Compute Node. |
| | | 219 | | /// </summary> |
| | | 220 | | /// <param name='operations'> |
| | | 221 | | /// The operations group for this extension method. |
| | | 222 | | /// </param> |
| | | 223 | | /// <param name='poolId'> |
| | | 224 | | /// The ID of the Pool that contains the Compute Node. |
| | | 225 | | /// </param> |
| | | 226 | | /// <param name='nodeId'> |
| | | 227 | | /// The ID of the Compute Node that you want to get information about. |
| | | 228 | | /// </param> |
| | | 229 | | /// <param name='computeNodeGetOptions'> |
| | | 230 | | /// Additional parameters for the operation |
| | | 231 | | /// </param> |
| | | 232 | | public static ComputeNode Get(this IComputeNodeOperations operations, string poolId, string nodeId, ComputeN |
| | | 233 | | { |
| | 0 | 234 | | return operations.GetAsync(poolId, nodeId, computeNodeGetOptions).GetAwaiter().GetResult(); |
| | | 235 | | } |
| | | 236 | | |
| | | 237 | | /// <summary> |
| | | 238 | | /// Gets information about the specified Compute Node. |
| | | 239 | | /// </summary> |
| | | 240 | | /// <param name='operations'> |
| | | 241 | | /// The operations group for this extension method. |
| | | 242 | | /// </param> |
| | | 243 | | /// <param name='poolId'> |
| | | 244 | | /// The ID of the Pool that contains the Compute Node. |
| | | 245 | | /// </param> |
| | | 246 | | /// <param name='nodeId'> |
| | | 247 | | /// The ID of the Compute Node that you want to get information about. |
| | | 248 | | /// </param> |
| | | 249 | | /// <param name='computeNodeGetOptions'> |
| | | 250 | | /// Additional parameters for the operation |
| | | 251 | | /// </param> |
| | | 252 | | /// <param name='cancellationToken'> |
| | | 253 | | /// The cancellation token. |
| | | 254 | | /// </param> |
| | | 255 | | public static async Task<ComputeNode> GetAsync(this IComputeNodeOperations operations, string poolId, string |
| | | 256 | | { |
| | 0 | 257 | | using (var _result = await operations.GetWithHttpMessagesAsync(poolId, nodeId, computeNodeGetOptions, nu |
| | | 258 | | { |
| | 0 | 259 | | return _result.Body; |
| | | 260 | | } |
| | 0 | 261 | | } |
| | | 262 | | |
| | | 263 | | /// <summary> |
| | | 264 | | /// Restarts the specified Compute Node. |
| | | 265 | | /// </summary> |
| | | 266 | | /// <remarks> |
| | | 267 | | /// You can restart a Compute Node only if it is in an idle or running state. |
| | | 268 | | /// </remarks> |
| | | 269 | | /// <param name='operations'> |
| | | 270 | | /// The operations group for this extension method. |
| | | 271 | | /// </param> |
| | | 272 | | /// <param name='poolId'> |
| | | 273 | | /// The ID of the Pool that contains the Compute Node. |
| | | 274 | | /// </param> |
| | | 275 | | /// <param name='nodeId'> |
| | | 276 | | /// The ID of the Compute Node that you want to restart. |
| | | 277 | | /// </param> |
| | | 278 | | /// <param name='nodeRebootOption'> |
| | | 279 | | /// When to reboot the Compute Node and what to do with currently running |
| | | 280 | | /// Tasks. The default value is requeue. Possible values include: 'requeue', |
| | | 281 | | /// 'terminate', 'taskCompletion', 'retainedData' |
| | | 282 | | /// </param> |
| | | 283 | | /// <param name='computeNodeRebootOptions'> |
| | | 284 | | /// Additional parameters for the operation |
| | | 285 | | /// </param> |
| | | 286 | | public static ComputeNodeRebootHeaders Reboot(this IComputeNodeOperations operations, string poolId, string |
| | | 287 | | { |
| | 0 | 288 | | return operations.RebootAsync(poolId, nodeId, nodeRebootOption, computeNodeRebootOptions).GetAwaiter().G |
| | | 289 | | } |
| | | 290 | | |
| | | 291 | | /// <summary> |
| | | 292 | | /// Restarts the specified Compute Node. |
| | | 293 | | /// </summary> |
| | | 294 | | /// <remarks> |
| | | 295 | | /// You can restart a Compute Node only if it is in an idle or running state. |
| | | 296 | | /// </remarks> |
| | | 297 | | /// <param name='operations'> |
| | | 298 | | /// The operations group for this extension method. |
| | | 299 | | /// </param> |
| | | 300 | | /// <param name='poolId'> |
| | | 301 | | /// The ID of the Pool that contains the Compute Node. |
| | | 302 | | /// </param> |
| | | 303 | | /// <param name='nodeId'> |
| | | 304 | | /// The ID of the Compute Node that you want to restart. |
| | | 305 | | /// </param> |
| | | 306 | | /// <param name='nodeRebootOption'> |
| | | 307 | | /// When to reboot the Compute Node and what to do with currently running |
| | | 308 | | /// Tasks. The default value is requeue. Possible values include: 'requeue', |
| | | 309 | | /// 'terminate', 'taskCompletion', 'retainedData' |
| | | 310 | | /// </param> |
| | | 311 | | /// <param name='computeNodeRebootOptions'> |
| | | 312 | | /// Additional parameters for the operation |
| | | 313 | | /// </param> |
| | | 314 | | /// <param name='cancellationToken'> |
| | | 315 | | /// The cancellation token. |
| | | 316 | | /// </param> |
| | | 317 | | public static async Task<ComputeNodeRebootHeaders> RebootAsync(this IComputeNodeOperations operations, strin |
| | | 318 | | { |
| | 0 | 319 | | using (var _result = await operations.RebootWithHttpMessagesAsync(poolId, nodeId, nodeRebootOption, comp |
| | | 320 | | { |
| | 0 | 321 | | return _result.Headers; |
| | | 322 | | } |
| | 0 | 323 | | } |
| | | 324 | | |
| | | 325 | | /// <summary> |
| | | 326 | | /// Reinstalls the operating system on the specified Compute Node. |
| | | 327 | | /// </summary> |
| | | 328 | | /// <remarks> |
| | | 329 | | /// You can reinstall the operating system on a Compute Node only if it is in |
| | | 330 | | /// an idle or running state. This API can be invoked only on Pools created |
| | | 331 | | /// with the cloud service configuration property. |
| | | 332 | | /// </remarks> |
| | | 333 | | /// <param name='operations'> |
| | | 334 | | /// The operations group for this extension method. |
| | | 335 | | /// </param> |
| | | 336 | | /// <param name='poolId'> |
| | | 337 | | /// The ID of the Pool that contains the Compute Node. |
| | | 338 | | /// </param> |
| | | 339 | | /// <param name='nodeId'> |
| | | 340 | | /// The ID of the Compute Node that you want to restart. |
| | | 341 | | /// </param> |
| | | 342 | | /// <param name='nodeReimageOption'> |
| | | 343 | | /// When to reimage the Compute Node and what to do with currently running |
| | | 344 | | /// Tasks. The default value is requeue. Possible values include: 'requeue', |
| | | 345 | | /// 'terminate', 'taskCompletion', 'retainedData' |
| | | 346 | | /// </param> |
| | | 347 | | /// <param name='computeNodeReimageOptions'> |
| | | 348 | | /// Additional parameters for the operation |
| | | 349 | | /// </param> |
| | | 350 | | public static ComputeNodeReimageHeaders Reimage(this IComputeNodeOperations operations, string poolId, strin |
| | | 351 | | { |
| | 0 | 352 | | return operations.ReimageAsync(poolId, nodeId, nodeReimageOption, computeNodeReimageOptions).GetAwaiter( |
| | | 353 | | } |
| | | 354 | | |
| | | 355 | | /// <summary> |
| | | 356 | | /// Reinstalls the operating system on the specified Compute Node. |
| | | 357 | | /// </summary> |
| | | 358 | | /// <remarks> |
| | | 359 | | /// You can reinstall the operating system on a Compute Node only if it is in |
| | | 360 | | /// an idle or running state. This API can be invoked only on Pools created |
| | | 361 | | /// with the cloud service configuration property. |
| | | 362 | | /// </remarks> |
| | | 363 | | /// <param name='operations'> |
| | | 364 | | /// The operations group for this extension method. |
| | | 365 | | /// </param> |
| | | 366 | | /// <param name='poolId'> |
| | | 367 | | /// The ID of the Pool that contains the Compute Node. |
| | | 368 | | /// </param> |
| | | 369 | | /// <param name='nodeId'> |
| | | 370 | | /// The ID of the Compute Node that you want to restart. |
| | | 371 | | /// </param> |
| | | 372 | | /// <param name='nodeReimageOption'> |
| | | 373 | | /// When to reimage the Compute Node and what to do with currently running |
| | | 374 | | /// Tasks. The default value is requeue. Possible values include: 'requeue', |
| | | 375 | | /// 'terminate', 'taskCompletion', 'retainedData' |
| | | 376 | | /// </param> |
| | | 377 | | /// <param name='computeNodeReimageOptions'> |
| | | 378 | | /// Additional parameters for the operation |
| | | 379 | | /// </param> |
| | | 380 | | /// <param name='cancellationToken'> |
| | | 381 | | /// The cancellation token. |
| | | 382 | | /// </param> |
| | | 383 | | public static async Task<ComputeNodeReimageHeaders> ReimageAsync(this IComputeNodeOperations operations, str |
| | | 384 | | { |
| | 0 | 385 | | using (var _result = await operations.ReimageWithHttpMessagesAsync(poolId, nodeId, nodeReimageOption, co |
| | | 386 | | { |
| | 0 | 387 | | return _result.Headers; |
| | | 388 | | } |
| | 0 | 389 | | } |
| | | 390 | | |
| | | 391 | | /// <summary> |
| | | 392 | | /// Disables Task scheduling on the specified Compute Node. |
| | | 393 | | /// </summary> |
| | | 394 | | /// <remarks> |
| | | 395 | | /// You can disable Task scheduling on a Compute Node only if its current |
| | | 396 | | /// scheduling state is enabled. |
| | | 397 | | /// </remarks> |
| | | 398 | | /// <param name='operations'> |
| | | 399 | | /// The operations group for this extension method. |
| | | 400 | | /// </param> |
| | | 401 | | /// <param name='poolId'> |
| | | 402 | | /// The ID of the Pool that contains the Compute Node. |
| | | 403 | | /// </param> |
| | | 404 | | /// <param name='nodeId'> |
| | | 405 | | /// The ID of the Compute Node on which you want to disable Task scheduling. |
| | | 406 | | /// </param> |
| | | 407 | | /// <param name='nodeDisableSchedulingOption'> |
| | | 408 | | /// What to do with currently running Tasks when disabling Task scheduling on |
| | | 409 | | /// the Compute Node. The default value is requeue. Possible values include: |
| | | 410 | | /// 'requeue', 'terminate', 'taskCompletion' |
| | | 411 | | /// </param> |
| | | 412 | | /// <param name='computeNodeDisableSchedulingOptions'> |
| | | 413 | | /// Additional parameters for the operation |
| | | 414 | | /// </param> |
| | | 415 | | public static ComputeNodeDisableSchedulingHeaders DisableScheduling(this IComputeNodeOperations operations, |
| | | 416 | | { |
| | 0 | 417 | | return operations.DisableSchedulingAsync(poolId, nodeId, nodeDisableSchedulingOption, computeNodeDisable |
| | | 418 | | } |
| | | 419 | | |
| | | 420 | | /// <summary> |
| | | 421 | | /// Disables Task scheduling on the specified Compute Node. |
| | | 422 | | /// </summary> |
| | | 423 | | /// <remarks> |
| | | 424 | | /// You can disable Task scheduling on a Compute Node only if its current |
| | | 425 | | /// scheduling state is enabled. |
| | | 426 | | /// </remarks> |
| | | 427 | | /// <param name='operations'> |
| | | 428 | | /// The operations group for this extension method. |
| | | 429 | | /// </param> |
| | | 430 | | /// <param name='poolId'> |
| | | 431 | | /// The ID of the Pool that contains the Compute Node. |
| | | 432 | | /// </param> |
| | | 433 | | /// <param name='nodeId'> |
| | | 434 | | /// The ID of the Compute Node on which you want to disable Task scheduling. |
| | | 435 | | /// </param> |
| | | 436 | | /// <param name='nodeDisableSchedulingOption'> |
| | | 437 | | /// What to do with currently running Tasks when disabling Task scheduling on |
| | | 438 | | /// the Compute Node. The default value is requeue. Possible values include: |
| | | 439 | | /// 'requeue', 'terminate', 'taskCompletion' |
| | | 440 | | /// </param> |
| | | 441 | | /// <param name='computeNodeDisableSchedulingOptions'> |
| | | 442 | | /// Additional parameters for the operation |
| | | 443 | | /// </param> |
| | | 444 | | /// <param name='cancellationToken'> |
| | | 445 | | /// The cancellation token. |
| | | 446 | | /// </param> |
| | | 447 | | public static async Task<ComputeNodeDisableSchedulingHeaders> DisableSchedulingAsync(this IComputeNodeOperat |
| | | 448 | | { |
| | 0 | 449 | | using (var _result = await operations.DisableSchedulingWithHttpMessagesAsync(poolId, nodeId, nodeDisable |
| | | 450 | | { |
| | 0 | 451 | | return _result.Headers; |
| | | 452 | | } |
| | 0 | 453 | | } |
| | | 454 | | |
| | | 455 | | /// <summary> |
| | | 456 | | /// Enables Task scheduling on the specified Compute Node. |
| | | 457 | | /// </summary> |
| | | 458 | | /// <remarks> |
| | | 459 | | /// You can enable Task scheduling on a Compute Node only if its current |
| | | 460 | | /// scheduling state is disabled |
| | | 461 | | /// </remarks> |
| | | 462 | | /// <param name='operations'> |
| | | 463 | | /// The operations group for this extension method. |
| | | 464 | | /// </param> |
| | | 465 | | /// <param name='poolId'> |
| | | 466 | | /// The ID of the Pool that contains the Compute Node. |
| | | 467 | | /// </param> |
| | | 468 | | /// <param name='nodeId'> |
| | | 469 | | /// The ID of the Compute Node on which you want to enable Task scheduling. |
| | | 470 | | /// </param> |
| | | 471 | | /// <param name='computeNodeEnableSchedulingOptions'> |
| | | 472 | | /// Additional parameters for the operation |
| | | 473 | | /// </param> |
| | | 474 | | public static ComputeNodeEnableSchedulingHeaders EnableScheduling(this IComputeNodeOperations operations, st |
| | | 475 | | { |
| | 0 | 476 | | return operations.EnableSchedulingAsync(poolId, nodeId, computeNodeEnableSchedulingOptions).GetAwaiter() |
| | | 477 | | } |
| | | 478 | | |
| | | 479 | | /// <summary> |
| | | 480 | | /// Enables Task scheduling on the specified Compute Node. |
| | | 481 | | /// </summary> |
| | | 482 | | /// <remarks> |
| | | 483 | | /// You can enable Task scheduling on a Compute Node only if its current |
| | | 484 | | /// scheduling state is disabled |
| | | 485 | | /// </remarks> |
| | | 486 | | /// <param name='operations'> |
| | | 487 | | /// The operations group for this extension method. |
| | | 488 | | /// </param> |
| | | 489 | | /// <param name='poolId'> |
| | | 490 | | /// The ID of the Pool that contains the Compute Node. |
| | | 491 | | /// </param> |
| | | 492 | | /// <param name='nodeId'> |
| | | 493 | | /// The ID of the Compute Node on which you want to enable Task scheduling. |
| | | 494 | | /// </param> |
| | | 495 | | /// <param name='computeNodeEnableSchedulingOptions'> |
| | | 496 | | /// Additional parameters for the operation |
| | | 497 | | /// </param> |
| | | 498 | | /// <param name='cancellationToken'> |
| | | 499 | | /// The cancellation token. |
| | | 500 | | /// </param> |
| | | 501 | | public static async Task<ComputeNodeEnableSchedulingHeaders> EnableSchedulingAsync(this IComputeNodeOperatio |
| | | 502 | | { |
| | 0 | 503 | | using (var _result = await operations.EnableSchedulingWithHttpMessagesAsync(poolId, nodeId, computeNodeE |
| | | 504 | | { |
| | 0 | 505 | | return _result.Headers; |
| | | 506 | | } |
| | 0 | 507 | | } |
| | | 508 | | |
| | | 509 | | /// <summary> |
| | | 510 | | /// Gets the settings required for remote login to a Compute Node. |
| | | 511 | | /// </summary> |
| | | 512 | | /// <remarks> |
| | | 513 | | /// Before you can remotely login to a Compute Node using the remote login |
| | | 514 | | /// settings, you must create a user Account on the Compute Node. This API can |
| | | 515 | | /// be invoked only on Pools created with the virtual machine configuration |
| | | 516 | | /// property. For Pools created with a cloud service configuration, see the |
| | | 517 | | /// GetRemoteDesktop API. |
| | | 518 | | /// </remarks> |
| | | 519 | | /// <param name='operations'> |
| | | 520 | | /// The operations group for this extension method. |
| | | 521 | | /// </param> |
| | | 522 | | /// <param name='poolId'> |
| | | 523 | | /// The ID of the Pool that contains the Compute Node. |
| | | 524 | | /// </param> |
| | | 525 | | /// <param name='nodeId'> |
| | | 526 | | /// The ID of the Compute Node for which to obtain the remote login settings. |
| | | 527 | | /// </param> |
| | | 528 | | /// <param name='computeNodeGetRemoteLoginSettingsOptions'> |
| | | 529 | | /// Additional parameters for the operation |
| | | 530 | | /// </param> |
| | | 531 | | public static ComputeNodeGetRemoteLoginSettingsResult GetRemoteLoginSettings(this IComputeNodeOperations ope |
| | | 532 | | { |
| | 0 | 533 | | return operations.GetRemoteLoginSettingsAsync(poolId, nodeId, computeNodeGetRemoteLoginSettingsOptions). |
| | | 534 | | } |
| | | 535 | | |
| | | 536 | | /// <summary> |
| | | 537 | | /// Gets the settings required for remote login to a Compute Node. |
| | | 538 | | /// </summary> |
| | | 539 | | /// <remarks> |
| | | 540 | | /// Before you can remotely login to a Compute Node using the remote login |
| | | 541 | | /// settings, you must create a user Account on the Compute Node. This API can |
| | | 542 | | /// be invoked only on Pools created with the virtual machine configuration |
| | | 543 | | /// property. For Pools created with a cloud service configuration, see the |
| | | 544 | | /// GetRemoteDesktop API. |
| | | 545 | | /// </remarks> |
| | | 546 | | /// <param name='operations'> |
| | | 547 | | /// The operations group for this extension method. |
| | | 548 | | /// </param> |
| | | 549 | | /// <param name='poolId'> |
| | | 550 | | /// The ID of the Pool that contains the Compute Node. |
| | | 551 | | /// </param> |
| | | 552 | | /// <param name='nodeId'> |
| | | 553 | | /// The ID of the Compute Node for which to obtain the remote login settings. |
| | | 554 | | /// </param> |
| | | 555 | | /// <param name='computeNodeGetRemoteLoginSettingsOptions'> |
| | | 556 | | /// Additional parameters for the operation |
| | | 557 | | /// </param> |
| | | 558 | | /// <param name='cancellationToken'> |
| | | 559 | | /// The cancellation token. |
| | | 560 | | /// </param> |
| | | 561 | | public static async Task<ComputeNodeGetRemoteLoginSettingsResult> GetRemoteLoginSettingsAsync(this IComputeN |
| | | 562 | | { |
| | 0 | 563 | | using (var _result = await operations.GetRemoteLoginSettingsWithHttpMessagesAsync(poolId, nodeId, comput |
| | | 564 | | { |
| | 0 | 565 | | return _result.Body; |
| | | 566 | | } |
| | 0 | 567 | | } |
| | | 568 | | |
| | | 569 | | /// <summary> |
| | | 570 | | /// Gets the Remote Desktop Protocol file for the specified Compute Node. |
| | | 571 | | /// </summary> |
| | | 572 | | /// <remarks> |
| | | 573 | | /// Before you can access a Compute Node by using the RDP file, you must create |
| | | 574 | | /// a user Account on the Compute Node. This API can only be invoked on Pools |
| | | 575 | | /// created with a cloud service configuration. For Pools created with a |
| | | 576 | | /// virtual machine configuration, see the GetRemoteLoginSettings API. |
| | | 577 | | /// </remarks> |
| | | 578 | | /// <param name='operations'> |
| | | 579 | | /// The operations group for this extension method. |
| | | 580 | | /// </param> |
| | | 581 | | /// <param name='poolId'> |
| | | 582 | | /// The ID of the Pool that contains the Compute Node. |
| | | 583 | | /// </param> |
| | | 584 | | /// <param name='nodeId'> |
| | | 585 | | /// The ID of the Compute Node for which you want to get the Remote Desktop |
| | | 586 | | /// Protocol file. |
| | | 587 | | /// </param> |
| | | 588 | | /// <param name='computeNodeGetRemoteDesktopOptions'> |
| | | 589 | | /// Additional parameters for the operation |
| | | 590 | | /// </param> |
| | | 591 | | public static Stream GetRemoteDesktop(this IComputeNodeOperations operations, string poolId, string nodeId, |
| | | 592 | | { |
| | 0 | 593 | | return operations.GetRemoteDesktopAsync(poolId, nodeId, computeNodeGetRemoteDesktopOptions).GetAwaiter() |
| | | 594 | | } |
| | | 595 | | |
| | | 596 | | /// <summary> |
| | | 597 | | /// Gets the Remote Desktop Protocol file for the specified Compute Node. |
| | | 598 | | /// </summary> |
| | | 599 | | /// <remarks> |
| | | 600 | | /// Before you can access a Compute Node by using the RDP file, you must create |
| | | 601 | | /// a user Account on the Compute Node. This API can only be invoked on Pools |
| | | 602 | | /// created with a cloud service configuration. For Pools created with a |
| | | 603 | | /// virtual machine configuration, see the GetRemoteLoginSettings API. |
| | | 604 | | /// </remarks> |
| | | 605 | | /// <param name='operations'> |
| | | 606 | | /// The operations group for this extension method. |
| | | 607 | | /// </param> |
| | | 608 | | /// <param name='poolId'> |
| | | 609 | | /// The ID of the Pool that contains the Compute Node. |
| | | 610 | | /// </param> |
| | | 611 | | /// <param name='nodeId'> |
| | | 612 | | /// The ID of the Compute Node for which you want to get the Remote Desktop |
| | | 613 | | /// Protocol file. |
| | | 614 | | /// </param> |
| | | 615 | | /// <param name='computeNodeGetRemoteDesktopOptions'> |
| | | 616 | | /// Additional parameters for the operation |
| | | 617 | | /// </param> |
| | | 618 | | /// <param name='cancellationToken'> |
| | | 619 | | /// The cancellation token. |
| | | 620 | | /// </param> |
| | | 621 | | public static async Task<Stream> GetRemoteDesktopAsync(this IComputeNodeOperations operations, string poolId |
| | | 622 | | { |
| | 0 | 623 | | var _result = await operations.GetRemoteDesktopWithHttpMessagesAsync(poolId, nodeId, computeNodeGetRemot |
| | 0 | 624 | | _result.Request.Dispose(); |
| | 0 | 625 | | return _result.Body; |
| | 0 | 626 | | } |
| | | 627 | | |
| | | 628 | | /// <summary> |
| | | 629 | | /// Upload Azure Batch service log files from the specified Compute Node to |
| | | 630 | | /// Azure Blob Storage. |
| | | 631 | | /// </summary> |
| | | 632 | | /// <remarks> |
| | | 633 | | /// This is for gathering Azure Batch service log files in an automated fashion |
| | | 634 | | /// from Compute Nodes if you are experiencing an error and wish to escalate to |
| | | 635 | | /// Azure support. The Azure Batch service log files should be shared with |
| | | 636 | | /// Azure support to aid in debugging issues with the Batch service. |
| | | 637 | | /// </remarks> |
| | | 638 | | /// <param name='operations'> |
| | | 639 | | /// The operations group for this extension method. |
| | | 640 | | /// </param> |
| | | 641 | | /// <param name='poolId'> |
| | | 642 | | /// The ID of the Pool that contains the Compute Node. |
| | | 643 | | /// </param> |
| | | 644 | | /// <param name='nodeId'> |
| | | 645 | | /// The ID of the Compute Node from which you want to upload the Azure Batch |
| | | 646 | | /// service log files. |
| | | 647 | | /// </param> |
| | | 648 | | /// <param name='uploadBatchServiceLogsConfiguration'> |
| | | 649 | | /// The Azure Batch service log files upload configuration. |
| | | 650 | | /// </param> |
| | | 651 | | /// <param name='computeNodeUploadBatchServiceLogsOptions'> |
| | | 652 | | /// Additional parameters for the operation |
| | | 653 | | /// </param> |
| | | 654 | | public static UploadBatchServiceLogsResult UploadBatchServiceLogs(this IComputeNodeOperations operations, st |
| | | 655 | | { |
| | 0 | 656 | | return operations.UploadBatchServiceLogsAsync(poolId, nodeId, uploadBatchServiceLogsConfiguration, compu |
| | | 657 | | } |
| | | 658 | | |
| | | 659 | | /// <summary> |
| | | 660 | | /// Upload Azure Batch service log files from the specified Compute Node to |
| | | 661 | | /// Azure Blob Storage. |
| | | 662 | | /// </summary> |
| | | 663 | | /// <remarks> |
| | | 664 | | /// This is for gathering Azure Batch service log files in an automated fashion |
| | | 665 | | /// from Compute Nodes if you are experiencing an error and wish to escalate to |
| | | 666 | | /// Azure support. The Azure Batch service log files should be shared with |
| | | 667 | | /// Azure support to aid in debugging issues with the Batch service. |
| | | 668 | | /// </remarks> |
| | | 669 | | /// <param name='operations'> |
| | | 670 | | /// The operations group for this extension method. |
| | | 671 | | /// </param> |
| | | 672 | | /// <param name='poolId'> |
| | | 673 | | /// The ID of the Pool that contains the Compute Node. |
| | | 674 | | /// </param> |
| | | 675 | | /// <param name='nodeId'> |
| | | 676 | | /// The ID of the Compute Node from which you want to upload the Azure Batch |
| | | 677 | | /// service log files. |
| | | 678 | | /// </param> |
| | | 679 | | /// <param name='uploadBatchServiceLogsConfiguration'> |
| | | 680 | | /// The Azure Batch service log files upload configuration. |
| | | 681 | | /// </param> |
| | | 682 | | /// <param name='computeNodeUploadBatchServiceLogsOptions'> |
| | | 683 | | /// Additional parameters for the operation |
| | | 684 | | /// </param> |
| | | 685 | | /// <param name='cancellationToken'> |
| | | 686 | | /// The cancellation token. |
| | | 687 | | /// </param> |
| | | 688 | | public static async Task<UploadBatchServiceLogsResult> UploadBatchServiceLogsAsync(this IComputeNodeOperatio |
| | | 689 | | { |
| | 0 | 690 | | using (var _result = await operations.UploadBatchServiceLogsWithHttpMessagesAsync(poolId, nodeId, upload |
| | | 691 | | { |
| | 0 | 692 | | return _result.Body; |
| | | 693 | | } |
| | 0 | 694 | | } |
| | | 695 | | |
| | | 696 | | /// <summary> |
| | | 697 | | /// Lists the Compute Nodes in the specified Pool. |
| | | 698 | | /// </summary> |
| | | 699 | | /// <param name='operations'> |
| | | 700 | | /// The operations group for this extension method. |
| | | 701 | | /// </param> |
| | | 702 | | /// <param name='poolId'> |
| | | 703 | | /// The ID of the Pool from which you want to list Compute Nodes. |
| | | 704 | | /// </param> |
| | | 705 | | /// <param name='computeNodeListOptions'> |
| | | 706 | | /// Additional parameters for the operation |
| | | 707 | | /// </param> |
| | | 708 | | public static IPage<ComputeNode> List(this IComputeNodeOperations operations, string poolId, ComputeNodeList |
| | | 709 | | { |
| | 0 | 710 | | return operations.ListAsync(poolId, computeNodeListOptions).GetAwaiter().GetResult(); |
| | | 711 | | } |
| | | 712 | | |
| | | 713 | | /// <summary> |
| | | 714 | | /// Lists the Compute Nodes in the specified Pool. |
| | | 715 | | /// </summary> |
| | | 716 | | /// <param name='operations'> |
| | | 717 | | /// The operations group for this extension method. |
| | | 718 | | /// </param> |
| | | 719 | | /// <param name='poolId'> |
| | | 720 | | /// The ID of the Pool from which you want to list Compute Nodes. |
| | | 721 | | /// </param> |
| | | 722 | | /// <param name='computeNodeListOptions'> |
| | | 723 | | /// Additional parameters for the operation |
| | | 724 | | /// </param> |
| | | 725 | | /// <param name='cancellationToken'> |
| | | 726 | | /// The cancellation token. |
| | | 727 | | /// </param> |
| | | 728 | | public static async Task<IPage<ComputeNode>> ListAsync(this IComputeNodeOperations operations, string poolId |
| | | 729 | | { |
| | 0 | 730 | | using (var _result = await operations.ListWithHttpMessagesAsync(poolId, computeNodeListOptions, null, ca |
| | | 731 | | { |
| | 0 | 732 | | return _result.Body; |
| | | 733 | | } |
| | 0 | 734 | | } |
| | | 735 | | |
| | | 736 | | /// <summary> |
| | | 737 | | /// Lists the Compute Nodes in the specified Pool. |
| | | 738 | | /// </summary> |
| | | 739 | | /// <param name='operations'> |
| | | 740 | | /// The operations group for this extension method. |
| | | 741 | | /// </param> |
| | | 742 | | /// <param name='nextPageLink'> |
| | | 743 | | /// The NextLink from the previous successful call to List operation. |
| | | 744 | | /// </param> |
| | | 745 | | /// <param name='computeNodeListNextOptions'> |
| | | 746 | | /// Additional parameters for the operation |
| | | 747 | | /// </param> |
| | | 748 | | public static IPage<ComputeNode> ListNext(this IComputeNodeOperations operations, string nextPageLink, Compu |
| | | 749 | | { |
| | 0 | 750 | | return operations.ListNextAsync(nextPageLink, computeNodeListNextOptions).GetAwaiter().GetResult(); |
| | | 751 | | } |
| | | 752 | | |
| | | 753 | | /// <summary> |
| | | 754 | | /// Lists the Compute Nodes in the specified Pool. |
| | | 755 | | /// </summary> |
| | | 756 | | /// <param name='operations'> |
| | | 757 | | /// The operations group for this extension method. |
| | | 758 | | /// </param> |
| | | 759 | | /// <param name='nextPageLink'> |
| | | 760 | | /// The NextLink from the previous successful call to List operation. |
| | | 761 | | /// </param> |
| | | 762 | | /// <param name='computeNodeListNextOptions'> |
| | | 763 | | /// Additional parameters for the operation |
| | | 764 | | /// </param> |
| | | 765 | | /// <param name='cancellationToken'> |
| | | 766 | | /// The cancellation token. |
| | | 767 | | /// </param> |
| | | 768 | | public static async Task<IPage<ComputeNode>> ListNextAsync(this IComputeNodeOperations operations, string ne |
| | | 769 | | { |
| | 0 | 770 | | using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, computeNodeListNextOpt |
| | | 771 | | { |
| | 0 | 772 | | return _result.Body; |
| | | 773 | | } |
| | 0 | 774 | | } |
| | | 775 | | |
| | | 776 | | } |
| | | 777 | | } |