Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the CloudTask class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Task within
 /// the Job.</param>
 /// <param name="displayName">A display name for the Task.</param>
 /// <param name="url">The URL of the Task.</param>
 /// <param name="eTag">The ETag of the Task.</param>
 /// <param name="lastModified">The last modified time of the
 /// Task.</param>
 /// <param name="creationTime">The creation time of the Task.</param>
 /// <param name="exitConditions">How the Batch service should respond
 /// when the Task completes.</param>
 /// <param name="state">The current state of the Task.</param>
 /// <param name="stateTransitionTime">The time at which the Task
 /// entered its current state.</param>
 /// <param name="previousState">The previous state of the Task.</param>
 /// <param name="previousStateTransitionTime">The time at which the
 /// Task entered its previous state.</param>
 /// <param name="commandLine">The command line of the Task.</param>
 /// <param name="containerSettings">The settings for the container
 /// under which the Task runs.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the Compute Node before running the command
 /// line.</param>
 /// <param name="outputFiles">A list of files that the Batch service
 /// will upload from the Compute Node after running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Task.</param>
 /// <param name="affinityInfo">A locality hint that can be used by the
 /// Batch service to select a Compute Node on which to start the new
 /// Task.</param>
 /// <param name="constraints">The execution constraints that apply to
 /// this Task.</param>
 /// <param name="requiredSlots">The number of scheduling slots that the
 /// Task required to run.</param>
 /// <param name="userIdentity">The user identity under which the Task
 /// runs.</param>
 /// <param name="executionInfo">Information about the execution of the
 /// Task.</param>
 /// <param name="nodeInfo">Information about the Compute Node on which
 /// the Task ran.</param>
 /// <param name="multiInstanceSettings">An object that indicates that
 /// the Task is a multi-instance Task, and contains information about
 /// how to run the multi-instance Task.</param>
 /// <param name="stats">Resource usage statistics for the Task.</param>
 /// <param name="dependsOn">The Tasks that this Task depends
 /// on.</param>
 /// <param name="applicationPackageReferences">A list of Packages that
 /// the Batch service will deploy to the Compute Node before running
 /// the command line.</param>
 /// <param name="authenticationTokenSettings">The settings for an
 /// authentication token that the Task can use to perform Batch service
 /// operations.</param>
 public CloudTask(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), ExitConditions exitConditions = default(ExitConditions), TaskState?state = default(TaskState?), System.DateTime?stateTransitionTime = default(System.DateTime?), TaskState?previousState = default(TaskState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), string commandLine = default(string), TaskContainerSettings containerSettings = default(TaskContainerSettings), IList <ResourceFile> resourceFiles = default(IList <ResourceFile>), IList <OutputFile> outputFiles = default(IList <OutputFile>), IList <EnvironmentSetting> environmentSettings = default(IList <EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), int?requiredSlots = default(int?), UserIdentity userIdentity = default(UserIdentity), TaskExecutionInformation executionInfo = default(TaskExecutionInformation), ComputeNodeInformation nodeInfo = default(ComputeNodeInformation), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskStatistics stats = default(TaskStatistics), TaskDependencies dependsOn = default(TaskDependencies), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), AuthenticationTokenSettings authenticationTokenSettings = default(AuthenticationTokenSettings))
 {
     Id                           = id;
     DisplayName                  = displayName;
     Url                          = url;
     ETag                         = eTag;
     LastModified                 = lastModified;
     CreationTime                 = creationTime;
     ExitConditions               = exitConditions;
     State                        = state;
     StateTransitionTime          = stateTransitionTime;
     PreviousState                = previousState;
     PreviousStateTransitionTime  = previousStateTransitionTime;
     CommandLine                  = commandLine;
     ContainerSettings            = containerSettings;
     ResourceFiles                = resourceFiles;
     OutputFiles                  = outputFiles;
     EnvironmentSettings          = environmentSettings;
     AffinityInfo                 = affinityInfo;
     Constraints                  = constraints;
     RequiredSlots                = requiredSlots;
     UserIdentity                 = userIdentity;
     ExecutionInfo                = executionInfo;
     NodeInfo                     = nodeInfo;
     MultiInstanceSettings        = multiInstanceSettings;
     Stats                        = stats;
     DependsOn                    = dependsOn;
     ApplicationPackageReferences = applicationPackageReferences;
     AuthenticationTokenSettings  = authenticationTokenSettings;
     CustomInit();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Commits all pending changes to this <see cref="CloudTask" /> to the Azure Batch service.
        /// </summary>
        /// <param name="additionalBehaviors">A collection of <see cref="BatchClientBehavior"/> instances that are applied to the Batch service request after the <see cref="CustomBehaviors"/>.</param>
        /// <param name="cancellationToken">A <see cref="CancellationToken"/> for controlling the lifetime of the asynchronous operation.</param>
        /// <returns>A <see cref="System.Threading.Tasks.Task"/> object that represents the asynchronous operation.</returns>
        /// <remarks>The commit operation runs asynchronously.</remarks>
        public async System.Threading.Tasks.Task CommitAsync(IEnumerable <BatchClientBehavior> additionalBehaviors = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            this.propertyContainer.IsReadOnly = true;

            // craft the behavior manager for this call
            BehaviorManager bhMgr = new BehaviorManager(this.CustomBehaviors, additionalBehaviors);

            if (BindingState.Unbound == this.propertyContainer.BindingState)
            {
                //TODO: Implement task submission via .Commit here
                UtilitiesInternal.ThrowOnUnbound(this.propertyContainer.BindingState);
            }
            else
            {
                Models.TaskConstraints protoTaskConstraints = UtilitiesInternal.CreateObjectWithNullCheck(this.Constraints, o => o.GetTransportObject());

                System.Threading.Tasks.Task <AzureOperationHeaderResponse <Models.TaskUpdateHeaders> > asyncTaskUpdate =
                    this.parentBatchClient.ProtocolLayer.UpdateTask(
                        this.parentJobId,
                        this.Id,
                        protoTaskConstraints,
                        bhMgr,
                        cancellationToken);

                await asyncTaskUpdate.ConfigureAwait(continueOnCapturedContext : false);
            }
        }
Ejemplo n.º 3
0
        public void SetBatchTaskParametersGetPassedToRequestTest()
        {
            BatchAccountContext context = BatchTestHelpers.CreateBatchContextWithKeys();

            cmdlet.BatchContext = context;

            cmdlet.Task = new PSCloudTask(BatchTestHelpers.CreateFakeBoundTask(context));

            // Update task
            cmdlet.Task.Constraints = new PSTaskConstraints(TimeSpan.FromHours(1), TimeSpan.FromDays(2), 5);

            ProxyModels.TaskConstraints requestParameters = null;

            // Store the request parameters
            RequestInterceptor interceptor = BatchTestHelpers.CreateFakeServiceResponseInterceptor <
                ProxyModels.TaskConstraints,
                ProxyModels.TaskUpdateOptions,
                AzureOperationHeaderResponse <ProxyModels.TaskUpdateHeaders> >(requestAction: (r) =>
            {
                requestParameters = r.Parameters;
            });

            cmdlet.AdditionalBehaviors = new List <BatchClientBehavior>()
            {
                interceptor
            };
            cmdlet.ExecuteCmdlet();

            // Verify the request parameters match the cmdlet parameters
            Assert.Equal(cmdlet.Task.Constraints.MaxTaskRetryCount, requestParameters.MaxTaskRetryCount);
            Assert.Equal(cmdlet.Task.Constraints.MaxWallClockTime, requestParameters.MaxWallClockTime);
            Assert.Equal(cmdlet.Task.Constraints.RetentionTime, requestParameters.RetentionTime);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the CloudTask class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the task within
 /// the job.</param>
 /// <param name="displayName">A display name for the task.</param>
 /// <param name="url">The URL of the task.</param>
 /// <param name="eTag">The ETag of the task.</param>
 /// <param name="lastModified">The last modified time of the
 /// task.</param>
 /// <param name="creationTime">The creation time of the task.</param>
 /// <param name="exitConditions">How the Batch service should respond
 /// when the task completes.</param>
 /// <param name="state">The current state of the task.</param>
 /// <param name="stateTransitionTime">The time at which the task
 /// entered its current state.</param>
 /// <param name="previousState">The previous state of the task.</param>
 /// <param name="previousStateTransitionTime">The time at which the
 /// task entered its previous state.</param>
 /// <param name="commandLine">The command line of the task.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the task.</param>
 /// <param name="affinityInfo">A locality hint that can be used by the
 /// Batch service to select a compute node on which to start the new
 /// task.</param>
 /// <param name="constraints">The execution constraints that apply to
 /// this task.</param>
 /// <param name="runElevated">Whether to run the task in elevated
 /// mode.</param>
 /// <param name="executionInfo">Information about the execution of the
 /// task.</param>
 /// <param name="nodeInfo">Information about the compute node on which
 /// the task ran.</param>
 /// <param name="multiInstanceSettings">Information about how to run
 /// the multi-instance task.</param>
 /// <param name="stats">Resource usage statistics for the task.</param>
 /// <param name="dependsOn">Any dependencies this task has.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages that the Batch service will deploy to the compute node
 /// before running the command line.</param>
 public CloudTask(string id = default(string), string displayName = default(string), string url = default(string), string eTag = default(string), System.DateTime?lastModified = default(System.DateTime?), System.DateTime?creationTime = default(System.DateTime?), ExitConditions exitConditions = default(ExitConditions), TaskState?state = default(TaskState?), System.DateTime?stateTransitionTime = default(System.DateTime?), TaskState?previousState = default(TaskState?), System.DateTime?previousStateTransitionTime = default(System.DateTime?), string commandLine = default(string), System.Collections.Generic.IList <ResourceFile> resourceFiles = default(System.Collections.Generic.IList <ResourceFile>), System.Collections.Generic.IList <EnvironmentSetting> environmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), bool?runElevated = default(bool?), TaskExecutionInformation executionInfo = default(TaskExecutionInformation), ComputeNodeInformation nodeInfo = default(ComputeNodeInformation), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskStatistics stats = default(TaskStatistics), TaskDependencies dependsOn = default(TaskDependencies), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>))
 {
     Id                           = id;
     DisplayName                  = displayName;
     Url                          = url;
     ETag                         = eTag;
     LastModified                 = lastModified;
     CreationTime                 = creationTime;
     ExitConditions               = exitConditions;
     State                        = state;
     StateTransitionTime          = stateTransitionTime;
     PreviousState                = previousState;
     PreviousStateTransitionTime  = previousStateTransitionTime;
     CommandLine                  = commandLine;
     ResourceFiles                = resourceFiles;
     EnvironmentSettings          = environmentSettings;
     AffinityInfo                 = affinityInfo;
     Constraints                  = constraints;
     RunElevated                  = runElevated;
     ExecutionInfo                = executionInfo;
     NodeInfo                     = nodeInfo;
     MultiInstanceSettings        = multiInstanceSettings;
     Stats                        = stats;
     DependsOn                    = dependsOn;
     ApplicationPackageReferences = applicationPackageReferences;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the JobPreparationTask class.
 /// </summary>
 /// <param name="commandLine">The command line of the Job Preparation
 /// task.</param>
 /// <param name="id">A string that uniquely identifies the job
 /// preparation task within the job.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Job Preparation task.</param>
 /// <param name="constraints">Constraints that apply to the Job
 /// Preparation task.</param>
 /// <param name="waitForSuccess">Whether the Batch service should wait
 /// for the Job Preparation task to complete successfully before
 /// scheduling any other tasks of the job on the compute node.</param>
 /// <param name="runElevated">Whether to run the Job Preparation task
 /// in elevated mode. The default value is false.</param>
 /// <param name="rerunOnNodeRebootAfterSuccess">Whether the Batch
 /// service should rerun the Job Preparation task after a compute
 /// node reboots.</param>
 public JobPreparationTask(string commandLine, string id = default(string), System.Collections.Generic.IList <ResourceFile> resourceFiles = default(System.Collections.Generic.IList <ResourceFile>), System.Collections.Generic.IList <EnvironmentSetting> environmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), TaskConstraints constraints = default(TaskConstraints), bool?waitForSuccess = default(bool?), bool?runElevated = default(bool?), bool?rerunOnNodeRebootAfterSuccess = default(bool?))
 {
     Id                            = id;
     CommandLine                   = commandLine;
     ResourceFiles                 = resourceFiles;
     EnvironmentSettings           = environmentSettings;
     Constraints                   = constraints;
     WaitForSuccess                = waitForSuccess;
     RunElevated                   = runElevated;
     RerunOnNodeRebootAfterSuccess = rerunOnNodeRebootAfterSuccess;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the JobPreparationTask class.
 /// </summary>
 /// <param name="commandLine">The command line of the Job Preparation
 /// task.</param>
 /// <param name="id">A string that uniquely identifies the Job
 /// Preparation task within the job.</param>
 /// <param name="containerSettings">The settings for the container
 /// under which the Job Preparation task runs.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Job Preparation task.</param>
 /// <param name="constraints">Constraints that apply to the Job
 /// Preparation task.</param>
 /// <param name="waitForSuccess">Whether the Batch service should wait
 /// for the Job Preparation task to complete successfully before
 /// scheduling any other tasks of the job on the compute node. A Job
 /// Preparation task has completed successfully if it exits with exit
 /// code 0.</param>
 /// <param name="userIdentity">The user identity under which the Job
 /// Preparation task runs.</param>
 /// <param name="rerunOnNodeRebootAfterSuccess">Whether the Batch
 /// service should rerun the Job Preparation task after a compute node
 /// reboots.</param>
 public JobPreparationTask(string commandLine, string id = default(string), TaskContainerSettings containerSettings = default(TaskContainerSettings), IList <ResourceFile> resourceFiles = default(IList <ResourceFile>), IList <EnvironmentSetting> environmentSettings = default(IList <EnvironmentSetting>), TaskConstraints constraints = default(TaskConstraints), bool?waitForSuccess = default(bool?), UserIdentity userIdentity = default(UserIdentity), bool?rerunOnNodeRebootAfterSuccess = default(bool?))
 {
     Id                            = id;
     CommandLine                   = commandLine;
     ContainerSettings             = containerSettings;
     ResourceFiles                 = resourceFiles;
     EnvironmentSettings           = environmentSettings;
     Constraints                   = constraints;
     WaitForSuccess                = waitForSuccess;
     UserIdentity                  = userIdentity;
     RerunOnNodeRebootAfterSuccess = rerunOnNodeRebootAfterSuccess;
     CustomInit();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the JobManagerTask class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Job Manager
 /// task.</param>
 /// <param name="commandLine">The command line of the Job Manager
 /// task.</param>
 /// <param name="displayName">The display name of the Job Manager
 /// task.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Job Manager task.</param>
 /// <param name="constraints">Constraints that apply to the Job
 /// Manager task.</param>
 /// <param name="killJobOnCompletion">Whether completion of the Job
 /// Manager task signifies completion of the entire job.</param>
 /// <param name="runElevated">Whether to run the Job Manager task in
 /// elevated mode. The default value is false.</param>
 /// <param name="runExclusive">Whether the Job Manager task requires
 /// exclusive use of the compute node where it runs.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages that the Batch service will deploy to the compute node
 /// before running the command line.</param>
 public JobManagerTask(string id, string commandLine, string displayName = default(string), System.Collections.Generic.IList <ResourceFile> resourceFiles = default(System.Collections.Generic.IList <ResourceFile>), System.Collections.Generic.IList <EnvironmentSetting> environmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), TaskConstraints constraints = default(TaskConstraints), bool?killJobOnCompletion = default(bool?), bool?runElevated = default(bool?), bool?runExclusive = default(bool?), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>))
 {
     Id                           = id;
     DisplayName                  = displayName;
     CommandLine                  = commandLine;
     ResourceFiles                = resourceFiles;
     EnvironmentSettings          = environmentSettings;
     Constraints                  = constraints;
     KillJobOnCompletion          = killJobOnCompletion;
     RunElevated                  = runElevated;
     RunExclusive                 = runExclusive;
     ApplicationPackageReferences = applicationPackageReferences;
 }
 public PropertyContainer(Models.TaskConstraints protocolObject) : base(BindingState.Bound)
 {
     this.MaxTaskRetryCountProperty = this.CreatePropertyAccessor(
         protocolObject.MaxTaskRetryCount,
         nameof(MaxTaskRetryCount),
         BindingAccess.Read | BindingAccess.Write);
     this.MaxWallClockTimeProperty = this.CreatePropertyAccessor(
         protocolObject.MaxWallClockTime,
         nameof(MaxWallClockTime),
         BindingAccess.Read | BindingAccess.Write);
     this.RetentionTimeProperty = this.CreatePropertyAccessor(
         protocolObject.RetentionTime,
         nameof(RetentionTime),
         BindingAccess.Read | BindingAccess.Write);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the TaskAddParameter class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the task within
 /// the job.</param>
 /// <param name="commandLine">The command line of the task. For
 /// multi-instance tasks, the command line is executed on the primary
 /// subtask after all the subtasks have finished executing the
 /// coordianation command line.</param>
 /// <param name="displayName">A display name for the task.</param>
 /// <param name="exitConditions">How the Batch service should respond
 /// when the task completes.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the task.</param>
 /// <param name="affinityInfo">A locality hint that can be used by the
 /// Batch service to select a compute node on which to start the new
 /// task.</param>
 /// <param name="constraints">The execution constraints that apply to
 /// this task.</param>
 /// <param name="runElevated">Whether to run the task in elevated
 /// mode.</param>
 /// <param name="multiInstanceSettings">Information about how to run
 /// the multi-instance task.</param>
 /// <param name="dependsOn">Any other tasks that this task depends
 /// on.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages that the Batch service will deploy to the compute node
 /// before running the command line.</param>
 public TaskAddParameter(string id, string commandLine, string displayName = default(string), ExitConditions exitConditions = default(ExitConditions), System.Collections.Generic.IList <ResourceFile> resourceFiles = default(System.Collections.Generic.IList <ResourceFile>), System.Collections.Generic.IList <EnvironmentSetting> environmentSettings = default(System.Collections.Generic.IList <EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), bool?runElevated = default(bool?), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskDependencies dependsOn = default(TaskDependencies), System.Collections.Generic.IList <ApplicationPackageReference> applicationPackageReferences = default(System.Collections.Generic.IList <ApplicationPackageReference>))
 {
     Id                           = id;
     DisplayName                  = displayName;
     CommandLine                  = commandLine;
     ExitConditions               = exitConditions;
     ResourceFiles                = resourceFiles;
     EnvironmentSettings          = environmentSettings;
     AffinityInfo                 = affinityInfo;
     Constraints                  = constraints;
     RunElevated                  = runElevated;
     MultiInstanceSettings        = multiInstanceSettings;
     DependsOn                    = dependsOn;
     ApplicationPackageReferences = applicationPackageReferences;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the JobManagerTask class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Job Manager
 /// task within the job.</param>
 /// <param name="commandLine">The command line of the Job Manager
 /// task.</param>
 /// <param name="displayName">The display name of the Job Manager
 /// task.</param>
 /// <param name="containerSettings">The settings for the container
 /// under which the Job Manager task runs.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the compute node before running the command
 /// line.</param>
 /// <param name="outputFiles">A list of files that the Batch service
 /// will upload from the compute node after running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Job Manager task.</param>
 /// <param name="constraints">Constraints that apply to the Job Manager
 /// task.</param>
 /// <param name="killJobOnCompletion">Whether completion of the Job
 /// Manager task signifies completion of the entire job.</param>
 /// <param name="userIdentity">The user identity under which the Job
 /// Manager task runs.</param>
 /// <param name="runExclusive">Whether the Job Manager task requires
 /// exclusive use of the compute node where it runs.</param>
 /// <param name="applicationPackageReferences">A list of application
 /// packages that the Batch service will deploy to the compute node
 /// before running the command line.</param>
 /// <param name="authenticationTokenSettings">The settings for an
 /// authentication token that the task can use to perform Batch service
 /// operations.</param>
 /// <param name="allowLowPriorityNode">Whether the Job Manager task may
 /// run on a low-priority compute node.</param>
 public JobManagerTask(string id, string commandLine, string displayName = default(string), TaskContainerSettings containerSettings = default(TaskContainerSettings), IList <ResourceFile> resourceFiles = default(IList <ResourceFile>), IList <OutputFile> outputFiles = default(IList <OutputFile>), IList <EnvironmentSetting> environmentSettings = default(IList <EnvironmentSetting>), TaskConstraints constraints = default(TaskConstraints), bool?killJobOnCompletion = default(bool?), UserIdentity userIdentity = default(UserIdentity), bool?runExclusive = default(bool?), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), AuthenticationTokenSettings authenticationTokenSettings = default(AuthenticationTokenSettings), bool?allowLowPriorityNode = default(bool?))
 {
     Id                           = id;
     DisplayName                  = displayName;
     CommandLine                  = commandLine;
     ContainerSettings            = containerSettings;
     ResourceFiles                = resourceFiles;
     OutputFiles                  = outputFiles;
     EnvironmentSettings          = environmentSettings;
     Constraints                  = constraints;
     KillJobOnCompletion          = killJobOnCompletion;
     UserIdentity                 = userIdentity;
     RunExclusive                 = runExclusive;
     ApplicationPackageReferences = applicationPackageReferences;
     AuthenticationTokenSettings  = authenticationTokenSettings;
     AllowLowPriorityNode         = allowLowPriorityNode;
     CustomInit();
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the TaskAddParameter class.
 /// </summary>
 /// <param name="id">A string that uniquely identifies the Task within
 /// the Job.</param>
 /// <param name="commandLine">The command line of the Task.</param>
 /// <param name="displayName">A display name for the Task.</param>
 /// <param name="containerSettings">The settings for the container
 /// under which the Task runs.</param>
 /// <param name="exitConditions">How the Batch service should respond
 /// when the Task completes.</param>
 /// <param name="resourceFiles">A list of files that the Batch service
 /// will download to the Compute Node before running the command
 /// line.</param>
 /// <param name="outputFiles">A list of files that the Batch service
 /// will upload from the Compute Node after running the command
 /// line.</param>
 /// <param name="environmentSettings">A list of environment variable
 /// settings for the Task.</param>
 /// <param name="affinityInfo">A locality hint that can be used by the
 /// Batch service to select a Compute Node on which to start the new
 /// Task.</param>
 /// <param name="constraints">The execution constraints that apply to
 /// this Task.</param>
 /// <param name="userIdentity">The user identity under which the Task
 /// runs.</param>
 /// <param name="multiInstanceSettings">An object that indicates that
 /// the Task is a multi-instance Task, and contains information about
 /// how to run the multi-instance Task.</param>
 /// <param name="dependsOn">The Tasks that this Task depends
 /// on.</param>
 /// <param name="applicationPackageReferences">A list of Packages that
 /// the Batch service will deploy to the Compute Node before running
 /// the command line.</param>
 /// <param name="authenticationTokenSettings">The settings for an
 /// authentication token that the Task can use to perform Batch service
 /// operations.</param>
 public TaskAddParameter(string id, string commandLine, string displayName = default(string), TaskContainerSettings containerSettings = default(TaskContainerSettings), ExitConditions exitConditions = default(ExitConditions), IList <ResourceFile> resourceFiles = default(IList <ResourceFile>), IList <OutputFile> outputFiles = default(IList <OutputFile>), IList <EnvironmentSetting> environmentSettings = default(IList <EnvironmentSetting>), AffinityInformation affinityInfo = default(AffinityInformation), TaskConstraints constraints = default(TaskConstraints), UserIdentity userIdentity = default(UserIdentity), MultiInstanceSettings multiInstanceSettings = default(MultiInstanceSettings), TaskDependencies dependsOn = default(TaskDependencies), IList <ApplicationPackageReference> applicationPackageReferences = default(IList <ApplicationPackageReference>), AuthenticationTokenSettings authenticationTokenSettings = default(AuthenticationTokenSettings))
 {
     Id                           = id;
     DisplayName                  = displayName;
     CommandLine                  = commandLine;
     ContainerSettings            = containerSettings;
     ExitConditions               = exitConditions;
     ResourceFiles                = resourceFiles;
     OutputFiles                  = outputFiles;
     EnvironmentSettings          = environmentSettings;
     AffinityInfo                 = affinityInfo;
     Constraints                  = constraints;
     UserIdentity                 = userIdentity;
     MultiInstanceSettings        = multiInstanceSettings;
     DependsOn                    = dependsOn;
     ApplicationPackageReferences = applicationPackageReferences;
     AuthenticationTokenSettings  = authenticationTokenSettings;
     CustomInit();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the TaskUpdateParameter class.
 /// </summary>
 /// <param name="constraints">Constraints that apply to this
 /// task.</param>
 public TaskUpdateParameter(TaskConstraints constraints = default(TaskConstraints))
 {
     Constraints = constraints;
     CustomInit();
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the TaskUpdateParameter class.
 /// </summary>
 /// <param name="constraints">Constraints that apply to this
 /// task.</param>
 public TaskUpdateParameter(TaskConstraints constraints = default(TaskConstraints))
 {
     Constraints = constraints;
 }