1. Packages
  2. CloudAMQP Provider
  3. API Docs
  4. NodeActions
CloudAMQP v3.25.0 published on Monday, Dec 29, 2025 by Pulumi
cloudamqp logo
CloudAMQP v3.25.0 published on Monday, Dec 29, 2025 by Pulumi

    This resource allows you to invoke actions on specific nodes or the entire cluster. Actions can target individual nodes, multiple nodes, or all nodes in the cluster at once.

    Only available for dedicated subscription plans.

    Note: From version 1.41.0, this resource supports cluster-level actions (cluster.start, cluster.stop, cluster.restart) and the node_names list attribute for targeting multiple nodes. The node_name attribute is deprecated in favor of node_names.

    Example Usage

    Cluster-wide broker restart (recommended for v1.41.0+)

    Restart the broker on all nodes of the cluster at once. Making sure the broker is stopped and started in correct order. This is the simplest approach for cluster-wide operations.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const clusterRestart = new cloudamqp.NodeActions("cluster_restart", {
        instanceId: instance.id,
        action: "cluster.restart",
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    cluster_restart = cloudamqp.NodeActions("cluster_restart",
        instance_id=instance["id"],
        action="cluster.restart")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.NewNodeActions(ctx, "cluster_restart", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("cluster.restart"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var clusterRestart = new CloudAmqp.NodeActions("cluster_restart", new()
        {
            InstanceId = instance.Id,
            Action = "cluster.restart",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var clusterRestart = new NodeActions("clusterRestart", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("cluster.restart")
                .build());
    
        }
    }
    
    resources:
      clusterRestart:
        type: cloudamqp:NodeActions
        name: cluster_restart
        properties:
          instanceId: ${instance.id}
          action: cluster.restart
    
    Restart broker on specific nodes using node_names

    Target specific nodes using the node_names list attribute.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const nodes = cloudamqp.getNodes({
        instanceId: instance.id,
    });
    const restartSubset = new cloudamqp.NodeActions("restart_subset", {
        instanceId: instance.id,
        action: "restart",
        nodeNames: [
            nodes.then(nodes => nodes.nodes?.[0]?.name),
            nodes.then(nodes => nodes.nodes?.[1]?.name),
        ],
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    nodes = cloudamqp.get_nodes(instance_id=instance["id"])
    restart_subset = cloudamqp.NodeActions("restart_subset",
        instance_id=instance["id"],
        action="restart",
        node_names=[
            nodes.nodes[0].name,
            nodes.nodes[1].name,
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		nodes, err := cloudamqp.GetNodes(ctx, &cloudamqp.GetNodesArgs{
    			InstanceId: instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = cloudamqp.NewNodeActions(ctx, "restart_subset", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("restart"),
    			NodeNames: pulumi.StringArray{
    				pulumi.String(nodes.Nodes[0].Name),
    				pulumi.String(nodes.Nodes[1].Name),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var nodes = CloudAmqp.GetNodes.Invoke(new()
        {
            InstanceId = instance.Id,
        });
    
        var restartSubset = new CloudAmqp.NodeActions("restart_subset", new()
        {
            InstanceId = instance.Id,
            Action = "restart",
            NodeNames = new[]
            {
                nodes.Apply(getNodesResult => getNodesResult.Nodes[0]?.Name),
                nodes.Apply(getNodesResult => getNodesResult.Nodes[1]?.Name),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetNodesArgs;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var nodes = CloudamqpFunctions.getNodes(GetNodesArgs.builder()
                .instanceId(instance.id())
                .build());
    
            var restartSubset = new NodeActions("restartSubset", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("restart")
                .nodeNames(            
                    nodes.nodes()[0].name(),
                    nodes.nodes()[1].name())
                .build());
    
        }
    }
    
    resources:
      restartSubset:
        type: cloudamqp:NodeActions
        name: restart_subset
        properties:
          instanceId: ${instance.id}
          action: restart
          nodeNames:
            - ${nodes.nodes[0].name}
            - ${nodes.nodes[1].name}
    variables:
      nodes:
        fn::invoke:
          function: cloudamqp:getNodes
          arguments:
            instanceId: ${instance.id}
    
    Reboot a single node

    Reboot the entire node (VM) rather than just the broker.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const nodes = cloudamqp.getNodes({
        instanceId: instance.id,
    });
    const rebootNode = new cloudamqp.NodeActions("reboot_node", {
        instanceId: instance.id,
        action: "reboot",
        nodeNames: [nodes.then(nodes => nodes.nodes?.[0]?.name)],
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    nodes = cloudamqp.get_nodes(instance_id=instance["id"])
    reboot_node = cloudamqp.NodeActions("reboot_node",
        instance_id=instance["id"],
        action="reboot",
        node_names=[nodes.nodes[0].name])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		nodes, err := cloudamqp.GetNodes(ctx, &cloudamqp.GetNodesArgs{
    			InstanceId: instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = cloudamqp.NewNodeActions(ctx, "reboot_node", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("reboot"),
    			NodeNames: pulumi.StringArray{
    				pulumi.String(nodes.Nodes[0].Name),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var nodes = CloudAmqp.GetNodes.Invoke(new()
        {
            InstanceId = instance.Id,
        });
    
        var rebootNode = new CloudAmqp.NodeActions("reboot_node", new()
        {
            InstanceId = instance.Id,
            Action = "reboot",
            NodeNames = new[]
            {
                nodes.Apply(getNodesResult => getNodesResult.Nodes[0]?.Name),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetNodesArgs;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var nodes = CloudamqpFunctions.getNodes(GetNodesArgs.builder()
                .instanceId(instance.id())
                .build());
    
            var rebootNode = new NodeActions("rebootNode", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("reboot")
                .nodeNames(nodes.nodes()[0].name())
                .build());
    
        }
    }
    
    resources:
      rebootNode:
        type: cloudamqp:NodeActions
        name: reboot_node
        properties:
          instanceId: ${instance.id}
          action: reboot
          nodeNames:
            - ${nodes.nodes[0].name}
    variables:
      nodes:
        fn::invoke:
          function: cloudamqp:getNodes
          arguments:
            instanceId: ${instance.id}
    
    Restart RabbitMQ management interface

    Only restart the management interface without affecting the broker.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const nodes = cloudamqp.getNodes({
        instanceId: instance.id,
    });
    const mgmtRestart = new cloudamqp.NodeActions("mgmt_restart", {
        instanceId: instance.id,
        action: "mgmt.restart",
        nodeNames: [nodes.then(nodes => nodes.nodes?.[0]?.name)],
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    nodes = cloudamqp.get_nodes(instance_id=instance["id"])
    mgmt_restart = cloudamqp.NodeActions("mgmt_restart",
        instance_id=instance["id"],
        action="mgmt.restart",
        node_names=[nodes.nodes[0].name])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		nodes, err := cloudamqp.GetNodes(ctx, &cloudamqp.GetNodesArgs{
    			InstanceId: instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = cloudamqp.NewNodeActions(ctx, "mgmt_restart", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("mgmt.restart"),
    			NodeNames: pulumi.StringArray{
    				pulumi.String(nodes.Nodes[0].Name),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var nodes = CloudAmqp.GetNodes.Invoke(new()
        {
            InstanceId = instance.Id,
        });
    
        var mgmtRestart = new CloudAmqp.NodeActions("mgmt_restart", new()
        {
            InstanceId = instance.Id,
            Action = "mgmt.restart",
            NodeNames = new[]
            {
                nodes.Apply(getNodesResult => getNodesResult.Nodes[0]?.Name),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetNodesArgs;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var nodes = CloudamqpFunctions.getNodes(GetNodesArgs.builder()
                .instanceId(instance.id())
                .build());
    
            var mgmtRestart = new NodeActions("mgmtRestart", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("mgmt.restart")
                .nodeNames(nodes.nodes()[0].name())
                .build());
    
        }
    }
    
    resources:
      mgmtRestart:
        type: cloudamqp:NodeActions
        name: mgmt_restart
        properties:
          instanceId: ${instance.id}
          action: mgmt.restart
          nodeNames:
            - ${nodes.nodes[0].name}
    variables:
      nodes:
        fn::invoke:
          function: cloudamqp:getNodes
          arguments:
            instanceId: ${instance.id}
    
    Combine with configuration changes

    Apply configuration changes and restart the cluster.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const rabbitmqConfig = new cloudamqp.RabbitConfiguration("rabbitmq_config", {
        instanceId: instance.id,
        logExchangeLevel: "info",
    });
    const clusterRestart = new cloudamqp.NodeActions("cluster_restart", {
        instanceId: instance.id,
        action: "cluster.restart",
    }, {
        dependsOn: [rabbitmqConfig],
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    rabbitmq_config = cloudamqp.RabbitConfiguration("rabbitmq_config",
        instance_id=instance["id"],
        log_exchange_level="info")
    cluster_restart = cloudamqp.NodeActions("cluster_restart",
        instance_id=instance["id"],
        action="cluster.restart",
        opts = pulumi.ResourceOptions(depends_on=[rabbitmq_config]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		rabbitmqConfig, err := cloudamqp.NewRabbitConfiguration(ctx, "rabbitmq_config", &cloudamqp.RabbitConfigurationArgs{
    			InstanceId:       pulumi.Any(instance.Id),
    			LogExchangeLevel: pulumi.String("info"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudamqp.NewNodeActions(ctx, "cluster_restart", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("cluster.restart"),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			rabbitmqConfig,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var rabbitmqConfig = new CloudAmqp.RabbitConfiguration("rabbitmq_config", new()
        {
            InstanceId = instance.Id,
            LogExchangeLevel = "info",
        });
    
        var clusterRestart = new CloudAmqp.NodeActions("cluster_restart", new()
        {
            InstanceId = instance.Id,
            Action = "cluster.restart",
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                rabbitmqConfig,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.RabbitConfiguration;
    import com.pulumi.cloudamqp.RabbitConfigurationArgs;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var rabbitmqConfig = new RabbitConfiguration("rabbitmqConfig", RabbitConfigurationArgs.builder()
                .instanceId(instance.id())
                .logExchangeLevel("info")
                .build());
    
            var clusterRestart = new NodeActions("clusterRestart", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("cluster.restart")
                .build(), CustomResourceOptions.builder()
                    .dependsOn(rabbitmqConfig)
                    .build());
    
        }
    }
    
    resources:
      rabbitmqConfig:
        type: cloudamqp:RabbitConfiguration
        name: rabbitmq_config
        properties:
          instanceId: ${instance.id}
          logExchangeLevel: info
      clusterRestart:
        type: cloudamqp:NodeActions
        name: cluster_restart
        properties:
          instanceId: ${instance.id}
          action: cluster.restart
        options:
          dependsOn:
            - ${rabbitmqConfig}
    
    Legacy Usage (pre-1.41.0)

    These examples show the older approach using node_name (singular) and chained restarts. While still supported, the cluster-level actions above are recommended for new configurations.

    Single node restart:

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const nodeAction = new cloudamqp.NodeActions("node_action", {
        instanceId: instance.id,
        nodeName: "<node name>",
        action: "restart",
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    node_action = cloudamqp.NodeActions("node_action",
        instance_id=instance["id"],
        node_name="<node name>",
        action="restart")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudamqp.NewNodeActions(ctx, "node_action", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			NodeName:   pulumi.String("<node name>"),
    			Action:     pulumi.String("restart"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var nodeAction = new CloudAmqp.NodeActions("node_action", new()
        {
            InstanceId = instance.Id,
            NodeName = "<node name>",
            Action = "restart",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var nodeAction = new NodeActions("nodeAction", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .nodeName("<node name>")
                .action("restart")
                .build());
    
        }
    }
    
    resources:
      nodeAction:
        type: cloudamqp:NodeActions
        name: node_action
        properties:
          instanceId: ${instance.id}
          nodeName: <node name>
          action: restart
    

    Chained multi-node restart:

    Note: This approach restarts nodes sequentially to minimize cluster disruption. Consider using cluster.restart for simpler configuration.

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudamqp from "@pulumi/cloudamqp";
    
    const listNodes = cloudamqp.getNodes({
        instanceId: instance.id,
    });
    const restart01 = new cloudamqp.NodeActions("restart_01", {
        instanceId: instance.id,
        action: "restart",
        nodeName: listNodes.then(listNodes => listNodes.nodes?.[0]?.name),
    });
    const restart02 = new cloudamqp.NodeActions("restart_02", {
        instanceId: instance.id,
        action: "restart",
        nodeName: listNodes.then(listNodes => listNodes.nodes?.[1]?.name),
    }, {
        dependsOn: [restart01],
    });
    const restart03 = new cloudamqp.NodeActions("restart_03", {
        instanceId: instance.id,
        action: "restart",
        nodeName: listNodes.then(listNodes => listNodes.nodes?.[2]?.name),
    }, {
        dependsOn: [
            restart01,
            restart02,
        ],
    });
    
    import pulumi
    import pulumi_cloudamqp as cloudamqp
    
    list_nodes = cloudamqp.get_nodes(instance_id=instance["id"])
    restart01 = cloudamqp.NodeActions("restart_01",
        instance_id=instance["id"],
        action="restart",
        node_name=list_nodes.nodes[0].name)
    restart02 = cloudamqp.NodeActions("restart_02",
        instance_id=instance["id"],
        action="restart",
        node_name=list_nodes.nodes[1].name,
        opts = pulumi.ResourceOptions(depends_on=[restart01]))
    restart03 = cloudamqp.NodeActions("restart_03",
        instance_id=instance["id"],
        action="restart",
        node_name=list_nodes.nodes[2].name,
        opts = pulumi.ResourceOptions(depends_on=[
                restart01,
                restart02,
            ]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudamqp/sdk/v3/go/cloudamqp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		listNodes, err := cloudamqp.GetNodes(ctx, &cloudamqp.GetNodesArgs{
    			InstanceId: instance.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		restart01, err := cloudamqp.NewNodeActions(ctx, "restart_01", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("restart"),
    			NodeName:   pulumi.String(listNodes.Nodes[0].Name),
    		})
    		if err != nil {
    			return err
    		}
    		restart02, err := cloudamqp.NewNodeActions(ctx, "restart_02", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("restart"),
    			NodeName:   pulumi.String(listNodes.Nodes[1].Name),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			restart01,
    		}))
    		if err != nil {
    			return err
    		}
    		_, err = cloudamqp.NewNodeActions(ctx, "restart_03", &cloudamqp.NodeActionsArgs{
    			InstanceId: pulumi.Any(instance.Id),
    			Action:     pulumi.String("restart"),
    			NodeName:   pulumi.String(listNodes.Nodes[2].Name),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			restart01,
    			restart02,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using CloudAmqp = Pulumi.CloudAmqp;
    
    return await Deployment.RunAsync(() => 
    {
        var listNodes = CloudAmqp.GetNodes.Invoke(new()
        {
            InstanceId = instance.Id,
        });
    
        var restart01 = new CloudAmqp.NodeActions("restart_01", new()
        {
            InstanceId = instance.Id,
            Action = "restart",
            NodeName = listNodes.Apply(getNodesResult => getNodesResult.Nodes[0]?.Name),
        });
    
        var restart02 = new CloudAmqp.NodeActions("restart_02", new()
        {
            InstanceId = instance.Id,
            Action = "restart",
            NodeName = listNodes.Apply(getNodesResult => getNodesResult.Nodes[1]?.Name),
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                restart01,
            },
        });
    
        var restart03 = new CloudAmqp.NodeActions("restart_03", new()
        {
            InstanceId = instance.Id,
            Action = "restart",
            NodeName = listNodes.Apply(getNodesResult => getNodesResult.Nodes[2]?.Name),
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                restart01,
                restart02,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudamqp.CloudamqpFunctions;
    import com.pulumi.cloudamqp.inputs.GetNodesArgs;
    import com.pulumi.cloudamqp.NodeActions;
    import com.pulumi.cloudamqp.NodeActionsArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var listNodes = CloudamqpFunctions.getNodes(GetNodesArgs.builder()
                .instanceId(instance.id())
                .build());
    
            var restart01 = new NodeActions("restart01", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("restart")
                .nodeName(listNodes.nodes()[0].name())
                .build());
    
            var restart02 = new NodeActions("restart02", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("restart")
                .nodeName(listNodes.nodes()[1].name())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(restart01)
                    .build());
    
            var restart03 = new NodeActions("restart03", NodeActionsArgs.builder()
                .instanceId(instance.id())
                .action("restart")
                .nodeName(listNodes.nodes()[2].name())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(                
                        restart01,
                        restart02)
                    .build());
    
        }
    }
    
    resources:
      restart01:
        type: cloudamqp:NodeActions
        name: restart_01
        properties:
          instanceId: ${instance.id}
          action: restart
          nodeName: ${listNodes.nodes[0].name}
      restart02:
        type: cloudamqp:NodeActions
        name: restart_02
        properties:
          instanceId: ${instance.id}
          action: restart
          nodeName: ${listNodes.nodes[1].name}
        options:
          dependsOn:
            - ${restart01}
      restart03:
        type: cloudamqp:NodeActions
        name: restart_03
        properties:
          instanceId: ${instance.id}
          action: restart
          nodeName: ${listNodes.nodes[2].name}
        options:
          dependsOn:
            - ${restart01}
            - ${restart02}
    variables:
      listNodes:
        fn::invoke:
          function: cloudamqp:getNodes
          arguments:
            instanceId: ${instance.id}
    

    Action reference

    Actions are categorized by what they affect:

    Broker Actions

    These actions control the message broker software (RabbitMQ or LavinMQ) on the specified nodes.

    ActionInfoApplies to
    startStart the message brokerRabbitMQ, LavinMQ
    stopStop the message brokerRabbitMQ, LavinMQ
    restartRestart the message brokerRabbitMQ, LavinMQ

    Management Interface Actions

    These actions control the management interface without affecting the broker itself.

    ActionInfoApplies to
    mgmt.restartRestart the RabbitMQ management interfaceRabbitMQ

    Node Actions

    These actions affect the entire node (VM), not just the broker software.

    ActionInfoApplies to
    rebootReboot the entire node (VM)RabbitMQ, LavinMQ

    Cluster Actions

    Available from version 1.41.0

    These actions operate on all nodes in the cluster simultaneously. The node_names attribute can be omitted for these actions.

    ActionInfoApplies to
    cluster.startStart the message broker on all cluster nodesRabbitMQ, LavinMQ
    cluster.stopStop the message broker on all cluster nodesRabbitMQ, LavinMQ
    cluster.restartRestart the message broker on all cluster nodesRabbitMQ, LavinMQ

    Dependency

    This resource depends on CloudAMQP instance identifier, cloudamqp_instance.instance.id. For non-cluster actions, it also requires either node_name or node_names to specify which nodes to act upon. Cluster-level actions automatically apply to all nodes in the cluster.

    Create NodeActions Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new NodeActions(name: string, args: NodeActionsArgs, opts?: CustomResourceOptions);
    @overload
    def NodeActions(resource_name: str,
                    args: NodeActionsArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def NodeActions(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    action: Optional[str] = None,
                    instance_id: Optional[int] = None,
                    node_name: Optional[str] = None,
                    node_names: Optional[Sequence[str]] = None,
                    sleep: Optional[int] = None,
                    timeout: Optional[int] = None)
    func NewNodeActions(ctx *Context, name string, args NodeActionsArgs, opts ...ResourceOption) (*NodeActions, error)
    public NodeActions(string name, NodeActionsArgs args, CustomResourceOptions? opts = null)
    public NodeActions(String name, NodeActionsArgs args)
    public NodeActions(String name, NodeActionsArgs args, CustomResourceOptions options)
    
    type: cloudamqp:NodeActions
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NodeActionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NodeActionsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NodeActionsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NodeActionsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NodeActionsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var nodeActionsResource = new CloudAmqp.NodeActions("nodeActionsResource", new()
    {
        Action = "string",
        InstanceId = 0,
        NodeNames = new[]
        {
            "string",
        },
        Sleep = 0,
        Timeout = 0,
    });
    
    example, err := cloudamqp.NewNodeActions(ctx, "nodeActionsResource", &cloudamqp.NodeActionsArgs{
    	Action:     pulumi.String("string"),
    	InstanceId: pulumi.Int(0),
    	NodeNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Sleep:   pulumi.Int(0),
    	Timeout: pulumi.Int(0),
    })
    
    var nodeActionsResource = new NodeActions("nodeActionsResource", NodeActionsArgs.builder()
        .action("string")
        .instanceId(0)
        .nodeNames("string")
        .sleep(0)
        .timeout(0)
        .build());
    
    node_actions_resource = cloudamqp.NodeActions("nodeActionsResource",
        action="string",
        instance_id=0,
        node_names=["string"],
        sleep=0,
        timeout=0)
    
    const nodeActionsResource = new cloudamqp.NodeActions("nodeActionsResource", {
        action: "string",
        instanceId: 0,
        nodeNames: ["string"],
        sleep: 0,
        timeout: 0,
    });
    
    type: cloudamqp:NodeActions
    properties:
        action: string
        instanceId: 0
        nodeNames:
            - string
        sleep: 0
        timeout: 0
    

    NodeActions Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The NodeActions resource accepts the following input properties:

    Action string
    The action to invoke. See Action reference below for valid values.
    InstanceId int
    The CloudAMQP instance ID.
    NodeName string
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    NodeNames List<string>
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    Sleep int
    Sleep interval in seconds between polling for node status. Default: 10.
    Timeout int

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    Action string
    The action to invoke. See Action reference below for valid values.
    InstanceId int
    The CloudAMQP instance ID.
    NodeName string
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    NodeNames []string
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    Sleep int
    Sleep interval in seconds between polling for node status. Default: 10.
    Timeout int

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action String
    The action to invoke. See Action reference below for valid values.
    instanceId Integer
    The CloudAMQP instance ID.
    nodeName String
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    nodeNames List<String>
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep Integer
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout Integer

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action string
    The action to invoke. See Action reference below for valid values.
    instanceId number
    The CloudAMQP instance ID.
    nodeName string
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    nodeNames string[]
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep number
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout number

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action str
    The action to invoke. See Action reference below for valid values.
    instance_id int
    The CloudAMQP instance ID.
    node_name str
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    node_names Sequence[str]
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep int
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout int

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action String
    The action to invoke. See Action reference below for valid values.
    instanceId Number
    The CloudAMQP instance ID.
    nodeName String
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    nodeNames List<String>
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep Number
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout Number

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NodeActions resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NodeActions Resource

    Get an existing NodeActions resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: NodeActionsState, opts?: CustomResourceOptions): NodeActions
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[str] = None,
            instance_id: Optional[int] = None,
            node_name: Optional[str] = None,
            node_names: Optional[Sequence[str]] = None,
            sleep: Optional[int] = None,
            timeout: Optional[int] = None) -> NodeActions
    func GetNodeActions(ctx *Context, name string, id IDInput, state *NodeActionsState, opts ...ResourceOption) (*NodeActions, error)
    public static NodeActions Get(string name, Input<string> id, NodeActionsState? state, CustomResourceOptions? opts = null)
    public static NodeActions get(String name, Output<String> id, NodeActionsState state, CustomResourceOptions options)
    resources:  _:    type: cloudamqp:NodeActions    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Action string
    The action to invoke. See Action reference below for valid values.
    InstanceId int
    The CloudAMQP instance ID.
    NodeName string
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    NodeNames List<string>
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    Sleep int
    Sleep interval in seconds between polling for node status. Default: 10.
    Timeout int

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    Action string
    The action to invoke. See Action reference below for valid values.
    InstanceId int
    The CloudAMQP instance ID.
    NodeName string
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    NodeNames []string
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    Sleep int
    Sleep interval in seconds between polling for node status. Default: 10.
    Timeout int

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action String
    The action to invoke. See Action reference below for valid values.
    instanceId Integer
    The CloudAMQP instance ID.
    nodeName String
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    nodeNames List<String>
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep Integer
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout Integer

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action string
    The action to invoke. See Action reference below for valid values.
    instanceId number
    The CloudAMQP instance ID.
    nodeName string
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    nodeNames string[]
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep number
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout number

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action str
    The action to invoke. See Action reference below for valid values.
    instance_id int
    The CloudAMQP instance ID.
    node_name str
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    node_names Sequence[str]
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep int
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout int

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    action String
    The action to invoke. See Action reference below for valid values.
    instanceId Number
    The CloudAMQP instance ID.
    nodeName String
    The node name, e.g. green-guinea-pig-01. Use node_names instead. This attribute will be removed in a future version.

    Deprecated: Use node_names instead. This attribute will be removed in a future version.

    nodeNames List<String>
    List of node names to perform the action on, e.g. ["green-guinea-pig-01", "green-guinea-pig-02"]. For cluster-level actions (cluster.start, cluster.stop, cluster.restart), this can be omitted and the action will automatically apply to all nodes.
    sleep Number
    Sleep interval in seconds between polling for node status. Default: 10.
    timeout Number

    Timeout in seconds for the action to complete. Default: 1800 (30 minutes).

    Note: Either node_name or node_names must be specified for non-cluster actions. Cluster actions (cluster.start, cluster.stop, cluster.restart) can omit both and will automatically target all nodes.

    Import

    This resource cannot be imported.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    CloudAMQP pulumi/pulumi-cloudamqp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudamqp Terraform Provider.
    cloudamqp logo
    CloudAMQP v3.25.0 published on Monday, Dec 29, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate