Class: Azure::Batch::Mgmt::V2018_12_01::Models::StartTask
- Inherits:
-
Object
- Object
- Azure::Batch::Mgmt::V2018_12_01::Models::StartTask
- Includes:
- MsRestAzure
- Defined in:
- lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb
Overview
A task which is run when a compute node joins a pool in the Azure Batch service, or when the compute node is rebooted or reimaged.
Instance Attribute Summary collapse
-
#command_line ⇒ String
does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion.
-
#container_settings ⇒ TaskContainerSettings
which the start task runs.
-
#environment_settings ⇒ Array<EnvironmentSetting>
settings for the start task.
-
#max_task_retry_count ⇒ Integer
The Batch service retries a task if its exit code is nonzero.
-
#resource_files ⇒ Array<ResourceFile>
will download to the compute node before running the command line.
-
#user_identity ⇒ UserIdentity
runs.
-
#wait_for_success ⇒ Boolean
task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node.
Class Method Summary collapse
-
.mapper ⇒ Object
Mapper for StartTask class as Ruby Hash.
Instance Attribute Details
#command_line ⇒ String
does not run under a shell, and therefore cannot take advantage of shell features such as environment variable expansion. If you want to take advantage of such features, you should invoke the shell in the command line, for example using “cmd /c MyCommand” in Windows or “/bin/sh -c MyCommand” in Linux. Required if any other properties of the startTask are specified.
24 25 26 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 24 def command_line @command_line end |
#container_settings ⇒ TaskContainerSettings
which the start task runs. When this is specified, all directories recursively below the AZ_BATCH_NODE_ROOT_DIR (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
70 71 72 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 70 def container_settings @container_settings end |
#environment_settings ⇒ Array<EnvironmentSetting>
settings for the start task.
32 33 34 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 32 def environment_settings @environment_settings end |
#max_task_retry_count ⇒ Integer
The Batch service retries a task if its exit code is nonzero. Note that this value specifically controls the number of retries. The Batch service will try the task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries the task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry the task. If the maximum retry count is -1, the Batch service retries the task without limit.
47 48 49 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 47 def max_task_retry_count @max_task_retry_count end |
#resource_files ⇒ Array<ResourceFile>
will download to the compute node before running the command line.
28 29 30 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 28 def resource_files @resource_files end |
#user_identity ⇒ UserIdentity
runs. If omitted, the task runs as a non-administrative user unique to the task.
37 38 39 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 37 def user_identity @user_identity end |
#wait_for_success ⇒ Boolean
task to complete successfully (that is, to exit with exit code 0) before scheduling any tasks on the compute node. If true and the start task fails on a compute node, the Batch service retries the start task up to its maximum retry count (maxTaskRetryCount). If the task has still not completed successfully after all retries, then the Batch service marks the compute node unusable, and will not schedule tasks to it. This condition can be detected via the node state and scheduling error detail. If false, the Batch service will not wait for the start task to complete. In this case, other tasks can start executing on the compute node while the start task is still running; and even if the start task fails, new tasks will continue to be scheduled on the node. The default is false.
62 63 64 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 62 def wait_for_success @wait_for_success end |
Class Method Details
.mapper ⇒ Object
Mapper for StartTask class as Ruby Hash. This will be used for serialization/deserialization.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/2018-12-01/generated/azure_mgmt_batch/models/start_task.rb', line 77 def self.mapper() { client_side_validation: true, required: false, serialized_name: 'StartTask', type: { name: 'Composite', class_name: 'StartTask', model_properties: { command_line: { client_side_validation: true, required: false, serialized_name: 'commandLine', type: { name: 'String' } }, resource_files: { client_side_validation: true, required: false, serialized_name: 'resourceFiles', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'ResourceFileElementType', type: { name: 'Composite', class_name: 'ResourceFile' } } } }, environment_settings: { client_side_validation: true, required: false, serialized_name: 'environmentSettings', type: { name: 'Sequence', element: { client_side_validation: true, required: false, serialized_name: 'EnvironmentSettingElementType', type: { name: 'Composite', class_name: 'EnvironmentSetting' } } } }, user_identity: { client_side_validation: true, required: false, serialized_name: 'userIdentity', type: { name: 'Composite', class_name: 'UserIdentity' } }, max_task_retry_count: { client_side_validation: true, required: false, serialized_name: 'maxTaskRetryCount', type: { name: 'Number' } }, wait_for_success: { client_side_validation: true, required: false, serialized_name: 'waitForSuccess', type: { name: 'Boolean' } }, container_settings: { client_side_validation: true, required: false, serialized_name: 'containerSettings', type: { name: 'Composite', class_name: 'TaskContainerSettings' } } } } } end |