Configuration of a bootstrap action.

Exemple #1
0
        /// <summary>
        /// Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.
        /// </summary>
        /// <param name="condition">The condition to evaluate, if true the bootstrap action executes.</param>
        /// <param name="config">The bootstrap action to execute in case of successful evaluation.</param>
        /// <returns>A BootstrapActionConfig to be provided when running a job flow.</returns>
        public BootstrapActionConfig NewRunIf(string condition, BootstrapActionConfig config)
        {
            List <string> args = config.ScriptBootstrapAction.Args;

            args.Add(condition);
            args.Add(config.ScriptBootstrapAction.Path);

            return(new BootstrapActionConfig()
                   .WithName("Run If, " + config.Name)
                   .WithScriptBootstrapAction(new ScriptBootstrapActionConfig()
                                              .WithPath("s3://" + bucket + "/bootstrap-actions/run-if")
                                              .WithArgs(args.ToArray())));
        }
        /// <summary>
        /// Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.
        /// </summary>
        /// <param name="condition">The condition to evaluate, if true the bootstrap action executes.</param>
        /// <param name="config">The bootstrap action to execute in case of successful evaluation.</param>
        /// <returns>A BootstrapActionConfig to be provided when running a job flow.</returns>
        public BootstrapActionConfig NewRunIf(string condition, BootstrapActionConfig config) 
        {
            List<string> args = config.ScriptBootstrapAction.Args;
            args.Add(condition);
            args.Add(config.ScriptBootstrapAction.Path);

            return new BootstrapActionConfig
            {
                Name = "Run If, " + config.Name,
                ScriptBootstrapAction = new ScriptBootstrapActionConfig
                {
                    Path = "s3://" + bucket + "/bootstrap-actions/run-if",
                    Args = args
                }
            };

        }
        /// <summary>
        /// Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.
        /// </summary>
        /// <param name="condition">The condition to evaluate, if true the bootstrap action executes.</param>
        /// <param name="config">The bootstrap action to execute in case of successful evaluation.</param>
        /// <returns>A BootstrapActionConfig to be provided when running a job flow.</returns>
        public BootstrapActionConfig NewRunIf(string condition, BootstrapActionConfig config)
        {
            List <string> args = config.ScriptBootstrapAction.Args;

            args.Add(condition);
            args.Add(config.ScriptBootstrapAction.Path);

            return(new BootstrapActionConfig
            {
                Name = "Run If, " + config.Name,
                ScriptBootstrapAction = new ScriptBootstrapActionConfig
                {
                    Path = "s3://" + bucket + "/bootstrap-actions/run-if",
                    Args = args
                }
            });
        }
        /// <summary>
        /// Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.
        /// </summary>
        /// <param name="condition">The condition to evaluate, if true the bootstrap action executes.</param>
        /// <param name="config">The bootstrap action to execute in case of successful evaluation.</param>
        /// <returns>A BootstrapActionConfig to be provided when running a job flow.</returns>
        public BootstrapActionConfig NewRunIf(string condition, BootstrapActionConfig config)
        {
            List<string> args = config.ScriptBootstrapAction.Args;
            args.Add(condition);
            args.Add(config.ScriptBootstrapAction.Path);

            return new BootstrapActionConfig()
              .WithName("Run If, " + config.Name)
              .WithScriptBootstrapAction(new ScriptBootstrapActionConfig()
                .WithPath("s3://" + bucket + "/bootstrap-actions/run-if")
                .WithArgs(args.ToArray()));
        }
Exemple #5
0
 /// <summary>
 /// Instantiates BootstrapActionDetail with the parameterized properties
 /// </summary>
 /// <param name="bootstrapActionConfig">A description of the bootstrap action.</param>
 public BootstrapActionDetail(BootstrapActionConfig bootstrapActionConfig)
 {
     _bootstrapActionConfig = bootstrapActionConfig;
 }
 /// <summary>
 /// Sets the BootstrapActionConfig property
 /// </summary>
 /// <param name="bootstrapActionConfig">The value to set for the BootstrapActionConfig property </param>
 /// <returns>this instance</returns>
 public BootstrapActionDetail WithBootstrapActionConfig(BootstrapActionConfig bootstrapActionConfig)
 {
     this.bootstrapActionConfig = bootstrapActionConfig;
     return(this);
 }
 /// <summary>
 /// Sets the BootstrapActionConfig property
 /// </summary>
 /// <param name="bootstrapActionConfig">The value to set for the BootstrapActionConfig property </param>
 /// <returns>this instance</returns>
 public BootstrapActionDetail WithBootstrapActionConfig(BootstrapActionConfig bootstrapActionConfig)
 {
     this.bootstrapActionConfig = bootstrapActionConfig;
     return this;
 }
 /// <summary>
 /// Instantiates BootstrapActionDetail with the parameterized properties
 /// </summary>
 /// <param name="bootstrapActionConfig">A description of the bootstrap action.</param>
 public BootstrapActionDetail(BootstrapActionConfig bootstrapActionConfig)
 {
     _bootstrapActionConfig = bootstrapActionConfig;
 }