Canonical PowerControlMachine

Canonical PowerControlMachine

Certified
Enterprise Edition

Change MAAS machine power state

Invoke MAAS power operations (on, off, cycle, query) for a machine. Cycle issues an off then on with a brief BMC settle delay. Optionally poll until the expected state (default 5m timeout).

yaml
type: io.kestra.plugin.ee.canonical.maas.PowerControlMachine

Power cycle a machine

yaml
id: power_cycle_server
namespace: company.team
tasks:
  - id: power_cycle_server
    type: io.kestra.plugin.ee.canonical.maas.PowerControlMachine
    url: "{{ secret('MAAS_URL') }}"
    apiKey: "{{ secret('MAAS_API_KEY') }}"
    systemId: "{{ outputs.deploy_ubuntu_server.systemId }}"
    action: "cycle"
    waitForPowerState: true
    expectedState: "on"
    timeout: PT5M
    stopMode: "hard"
Properties
Possible Values
ONOFFCYCLEQUERY

Action

Power action to execute: on, off, cycle, or query.

MAAS API key

MAAS API key in the consumer: token: secret format.

System ID

MAAS system identifier of the machine to control; machine must already exist.

MAAS URL

Base URL of the MAAS server, including the MAAS context path. Example: https://maas.example.com/MAAS

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Expected power state

Power state to wait for (on or off); defaults to the action-derived target and ignored for query.

Stop mode

Stop mode to use for power off operations (for example soft or hard); ignored for on or query.

DefaultPT5M

Timeout

Maximum time to wait for the machine to reach the expected power state when waiting; defaults to 5 minutes.

Defaultfalse

Wait for power state

Whether to poll MAAS until the machine reaches the expected power state; defaults to false and is not used for query.

Power state

Power state reported by MAAS after the action or query.

System ID

MAAS system identifier for the machine.