Skip to content

NodeLifecycleScript

Source code in docs_src/capo_pcs/types/node_lifecycle_script.py
class NodeLifecycleScript(TypedDict, closed=True):
    name: "str"
    """<p>A unique name for the script. The name can be up to 64 characters long. Valid characters are letters, numbers, spaces, underscores (<code>_</code>), and hyphens (<code>-</code>). The first character must be a letter or a number.</p>"""
    script_source: "capo_pcs.types.script_source.ScriptSource"
    """<p>The source location and integrity information for the script.</p>"""
    arguments: NotRequired[
        "capo_pcs.types.node_lifecycle_script_arguments.NodeLifecycleScriptArguments"
    ]
    """<p>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.</p>"""
    on_error: "capo_pcs.types.on_error.OnError"
    """<p>The behavior when the script fails. The default value is <code>TERMINATE</code>. Valid values:</p> <ul> <li> <p> <code>TERMINATE</code> – Terminates the compute node.</p> </li> <li> <p> <code>STOP_SEQUENCE</code> – Stops running subsequent scripts in the sequence but doesn't terminate the compute node.</p> </li> <li> <p> <code>CONTINUE</code> – Ignores the error and continues running the next script.</p> </li> </ul>"""
    execution_policy: "capo_pcs.types.execution_policy.ExecutionPolicy"
    """<p>The policy that determines when the script runs. The default value is <code>FIRST_BOOT_ONLY</code>. Valid values:</p> <ul> <li> <p> <code>FIRST_BOOT_ONLY</code> – Runs the script only the first time the compute node boots.</p> </li> <li> <p> <code>EVERY_BOOT</code> – Runs the script every time the compute node boots, including reboots.</p> </li> </ul>"""

arguments instance-attribute

arguments: NotRequired[NodeLifecycleScriptArguments]

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.

execution_policy instance-attribute

execution_policy: 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.

name instance-attribute

name: str

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.

on_error instance-attribute

on_error: 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.

script_source instance-attribute

script_source: ScriptSource

The source location and integrity information for the script.