Interface NodeLifecycleScript.Builder

  • Method Details

    • name

      A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores (_), and hyphens (-). The first character must be a letter or a number.

      Parameters:
      name - A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores (_), and hyphens (-). The first character must be a letter or a number.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scriptSource

      NodeLifecycleScript.Builder scriptSource(ScriptSource scriptSource)

      The source location and integrity information for the script.

      Parameters:
      scriptSource - The source location and integrity information for the script.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • scriptSource

      default NodeLifecycleScript.Builder scriptSource(Consumer<ScriptSource.Builder> scriptSource)

      The source location and integrity information for the script.

      This is a convenience method that creates an instance of the ScriptSource.Builder avoiding the need to create one manually via ScriptSource.builder().

      When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to scriptSource(ScriptSource).

      Parameters:
      scriptSource - a consumer that will call methods on ScriptSource.Builder
      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • arguments

      The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.

      Parameters:
      arguments - The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • arguments

      NodeLifecycleScript.Builder arguments(String... arguments)

      The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.

      Parameters:
      arguments - The command-line arguments to pass to the script. You can specify up to 20 arguments, and each argument can be up to 256 characters long.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • onError

      The behavior when the script fails. The default value is TERMINATE. Valid values:

      • TERMINATE – Terminates the compute node.

      • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn't terminate the compute node.

      • CONTINUE – Ignores the error and continues running the next script.

      Parameters:
      onError - The behavior when the script fails. The default value is TERMINATE. Valid values:

      • TERMINATE – Terminates the compute node.

      • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn't terminate the compute node.

      • CONTINUE – Ignores the error and continues running the next script.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • onError

      The behavior when the script fails. The default value is TERMINATE. Valid values:

      • TERMINATE – Terminates the compute node.

      • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn't terminate the compute node.

      • CONTINUE – Ignores the error and continues running the next script.

      Parameters:
      onError - The behavior when the script fails. The default value is TERMINATE. Valid values:

      • TERMINATE – Terminates the compute node.

      • STOP_SEQUENCE – Stops running subsequent scripts in the sequence but doesn't terminate the compute node.

      • CONTINUE – Ignores the error and continues running the next script.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • executionPolicy

      NodeLifecycleScript.Builder executionPolicy(String executionPolicy)

      The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

      • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

      • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

      Parameters:
      executionPolicy - The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

      • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

      • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • executionPolicy

      NodeLifecycleScript.Builder executionPolicy(ExecutionPolicy executionPolicy)

      The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

      • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

      • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

      Parameters:
      executionPolicy - The policy that determines when the script runs. The default value is FIRST_BOOT_ONLY. Valid values:

      • FIRST_BOOT_ONLY – Runs the script only the first time the compute node boots.

      • EVERY_BOOT – Runs the script every time the compute node boots, including reboots.

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also: