Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.batch.inputs.StartTaskArgs Maven / Gradle / Ivy
Go to download
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.batch.inputs;
import com.pulumi.azurenative.batch.inputs.EnvironmentSettingArgs;
import com.pulumi.azurenative.batch.inputs.ResourceFileArgs;
import com.pulumi.azurenative.batch.inputs.TaskContainerSettingsArgs;
import com.pulumi.azurenative.batch.inputs.UserIdentityArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* In some cases the start task may be re-run even though the node was not rebooted. Due to this, start tasks should be idempotent and exit gracefully if the setup they're performing has already been done. Special care should be taken to avoid start tasks which create breakaway process or install/launch services from the start task working directory, as this will block Batch from being able to re-run the start task.
*
*/
public final class StartTaskArgs extends com.pulumi.resources.ResourceArgs {
public static final StartTaskArgs Empty = new StartTaskArgs();
/**
* The command line 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.
*
*/
@Import(name="commandLine")
private @Nullable Output commandLine;
/**
* @return The command line 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.
*
*/
public Optional> commandLine() {
return Optional.ofNullable(this.commandLine);
}
/**
* 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.
*
*/
@Import(name="containerSettings")
private @Nullable Output containerSettings;
/**
* @return 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.
*
*/
public Optional> containerSettings() {
return Optional.ofNullable(this.containerSettings);
}
@Import(name="environmentSettings")
private @Nullable Output> environmentSettings;
public Optional>> environmentSettings() {
return Optional.ofNullable(this.environmentSettings);
}
/**
* 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. Default is 0.
*
*/
@Import(name="maxTaskRetryCount")
private @Nullable Output maxTaskRetryCount;
/**
* @return 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. Default is 0.
*
*/
public Optional> maxTaskRetryCount() {
return Optional.ofNullable(this.maxTaskRetryCount);
}
@Import(name="resourceFiles")
private @Nullable Output> resourceFiles;
public Optional>> resourceFiles() {
return Optional.ofNullable(this.resourceFiles);
}
/**
* If omitted, the task runs as a non-administrative user unique to the task.
*
*/
@Import(name="userIdentity")
private @Nullable Output userIdentity;
/**
* @return If omitted, the task runs as a non-administrative user unique to the task.
*
*/
public Optional> userIdentity() {
return Optional.ofNullable(this.userIdentity);
}
/**
* 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 true.
*
*/
@Import(name="waitForSuccess")
private @Nullable Output waitForSuccess;
/**
* @return 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 true.
*
*/
public Optional> waitForSuccess() {
return Optional.ofNullable(this.waitForSuccess);
}
private StartTaskArgs() {}
private StartTaskArgs(StartTaskArgs $) {
this.commandLine = $.commandLine;
this.containerSettings = $.containerSettings;
this.environmentSettings = $.environmentSettings;
this.maxTaskRetryCount = $.maxTaskRetryCount;
this.resourceFiles = $.resourceFiles;
this.userIdentity = $.userIdentity;
this.waitForSuccess = $.waitForSuccess;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(StartTaskArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private StartTaskArgs $;
public Builder() {
$ = new StartTaskArgs();
}
public Builder(StartTaskArgs defaults) {
$ = new StartTaskArgs(Objects.requireNonNull(defaults));
}
/**
* @param commandLine The command line 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.
*
* @return builder
*
*/
public Builder commandLine(@Nullable Output commandLine) {
$.commandLine = commandLine;
return this;
}
/**
* @param commandLine The command line 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.
*
* @return builder
*
*/
public Builder commandLine(String commandLine) {
return commandLine(Output.of(commandLine));
}
/**
* @param containerSettings 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.
*
* @return builder
*
*/
public Builder containerSettings(@Nullable Output containerSettings) {
$.containerSettings = containerSettings;
return this;
}
/**
* @param containerSettings 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.
*
* @return builder
*
*/
public Builder containerSettings(TaskContainerSettingsArgs containerSettings) {
return containerSettings(Output.of(containerSettings));
}
public Builder environmentSettings(@Nullable Output> environmentSettings) {
$.environmentSettings = environmentSettings;
return this;
}
public Builder environmentSettings(List environmentSettings) {
return environmentSettings(Output.of(environmentSettings));
}
public Builder environmentSettings(EnvironmentSettingArgs... environmentSettings) {
return environmentSettings(List.of(environmentSettings));
}
/**
* @param maxTaskRetryCount 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. Default is 0.
*
* @return builder
*
*/
public Builder maxTaskRetryCount(@Nullable Output maxTaskRetryCount) {
$.maxTaskRetryCount = maxTaskRetryCount;
return this;
}
/**
* @param maxTaskRetryCount 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. Default is 0.
*
* @return builder
*
*/
public Builder maxTaskRetryCount(Integer maxTaskRetryCount) {
return maxTaskRetryCount(Output.of(maxTaskRetryCount));
}
public Builder resourceFiles(@Nullable Output> resourceFiles) {
$.resourceFiles = resourceFiles;
return this;
}
public Builder resourceFiles(List resourceFiles) {
return resourceFiles(Output.of(resourceFiles));
}
public Builder resourceFiles(ResourceFileArgs... resourceFiles) {
return resourceFiles(List.of(resourceFiles));
}
/**
* @param userIdentity If omitted, the task runs as a non-administrative user unique to the task.
*
* @return builder
*
*/
public Builder userIdentity(@Nullable Output userIdentity) {
$.userIdentity = userIdentity;
return this;
}
/**
* @param userIdentity If omitted, the task runs as a non-administrative user unique to the task.
*
* @return builder
*
*/
public Builder userIdentity(UserIdentityArgs userIdentity) {
return userIdentity(Output.of(userIdentity));
}
/**
* @param waitForSuccess 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 true.
*
* @return builder
*
*/
public Builder waitForSuccess(@Nullable Output waitForSuccess) {
$.waitForSuccess = waitForSuccess;
return this;
}
/**
* @param waitForSuccess 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 true.
*
* @return builder
*
*/
public Builder waitForSuccess(Boolean waitForSuccess) {
return waitForSuccess(Output.of(waitForSuccess));
}
public StartTaskArgs build() {
$.maxTaskRetryCount = Codegen.integerProp("maxTaskRetryCount").output().arg($.maxTaskRetryCount).def(0).getNullable();
return $;
}
}
}