1. Registry
  2. Packages
  3. Zenduty Provider
  4. API Docs
  5. GlobalroutingRule
Viewing docs for zenduty 2.0.0
published on Friday, Aug 14, 2026 by zenduty
Viewing docs for zenduty 2.0.0
published on Friday, Aug 14, 2026 by zenduty

    An Global Router allows users to create routing rules. The Router evaluates events sent to this Router against each of its rules, one at a time, and routes the event to a specific Integration based on the first rule that matches.


    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zenduty from "@pulumi/zenduty";
    
    const router = new zenduty.Globalrouter("router", {
        name: "demorouter",
        description: "This is a demo router",
    });
    const demorules = new zenduty.GlobalroutingRule("demorules", {
        routerId: router.globalrouterId,
        name: "demorule",
        ruleJson: "",
        actions: [{
            actionType: 0,
            integration: "unique_id of integration",
        }],
    });
    const supressrule = new zenduty.GlobalroutingRule("supressrule", {
        routerId: router.globalrouterId,
        name: "supress",
        ruleJson: "",
        actions: [{
            actionType: 1,
        }],
    });
    
    import pulumi
    import pulumi_zenduty as zenduty
    
    router = zenduty.Globalrouter("router",
        name="demorouter",
        description="This is a demo router")
    demorules = zenduty.GlobalroutingRule("demorules",
        router_id=router.globalrouter_id,
        name="demorule",
        rule_json="",
        actions=[{
            "action_type": 0,
            "integration": "unique_id of integration",
        }])
    supressrule = zenduty.GlobalroutingRule("supressrule",
        router_id=router.globalrouter_id,
        name="supress",
        rule_json="",
        actions=[{
            "action_type": 1,
        }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/zenduty/v2/zenduty"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		router, err := zenduty.NewGlobalrouter(ctx, "router", &zenduty.GlobalrouterArgs{
    			Name:        pulumi.String("demorouter"),
    			Description: pulumi.String("This is a demo router"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = zenduty.NewGlobalroutingRule(ctx, "demorules", &zenduty.GlobalroutingRuleArgs{
    			RouterId: router.GlobalrouterId,
    			Name:     pulumi.String("demorule"),
    			RuleJson: pulumi.String(""),
    			Actions: zenduty.GlobalroutingRuleActionArray{
    				&zenduty.GlobalroutingRuleActionArgs{
    					ActionType:  pulumi.Float64(0),
    					Integration: pulumi.String("unique_id of integration"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = zenduty.NewGlobalroutingRule(ctx, "supressrule", &zenduty.GlobalroutingRuleArgs{
    			RouterId: router.GlobalrouterId,
    			Name:     pulumi.String("supress"),
    			RuleJson: pulumi.String(""),
    			Actions: zenduty.GlobalroutingRuleActionArray{
    				&zenduty.GlobalroutingRuleActionArgs{
    					ActionType: pulumi.Float64(1),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zenduty = Pulumi.Zenduty;
    
    return await Deployment.RunAsync(() => 
    {
        var router = new Zenduty.Globalrouter("router", new()
        {
            Name = "demorouter",
            Description = "This is a demo router",
        });
    
        var demorules = new Zenduty.GlobalroutingRule("demorules", new()
        {
            RouterId = router.GlobalrouterId,
            Name = "demorule",
            RuleJson = "",
            Actions = new[]
            {
                new Zenduty.Inputs.GlobalroutingRuleActionArgs
                {
                    ActionType = 0,
                    Integration = "unique_id of integration",
                },
            },
        });
    
        var supressrule = new Zenduty.GlobalroutingRule("supressrule", new()
        {
            RouterId = router.GlobalrouterId,
            Name = "supress",
            RuleJson = "",
            Actions = new[]
            {
                new Zenduty.Inputs.GlobalroutingRuleActionArgs
                {
                    ActionType = 1,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zenduty.Globalrouter;
    import com.pulumi.zenduty.GlobalrouterArgs;
    import com.pulumi.zenduty.GlobalroutingRule;
    import com.pulumi.zenduty.GlobalroutingRuleArgs;
    import com.pulumi.zenduty.inputs.GlobalroutingRuleActionArgs;
    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 router = new Globalrouter("router", GlobalrouterArgs.builder()
                .name("demorouter")
                .description("This is a demo router")
                .build());
    
            var demorules = new GlobalroutingRule("demorules", GlobalroutingRuleArgs.builder()
                .routerId(router.globalrouterId())
                .name("demorule")
                .ruleJson("")
                .actions(GlobalroutingRuleActionArgs.builder()
                    .actionType(0.0)
                    .integration("unique_id of integration")
                    .build())
                .build());
    
            var supressrule = new GlobalroutingRule("supressrule", GlobalroutingRuleArgs.builder()
                .routerId(router.globalrouterId())
                .name("supress")
                .ruleJson("")
                .actions(GlobalroutingRuleActionArgs.builder()
                    .actionType(1.0)
                    .build())
                .build());
    
        }
    }
    
    resources:
      router:
        type: zenduty:Globalrouter
        properties:
          name: demorouter
          description: This is a demo router
      demorules:
        type: zenduty:GlobalroutingRule
        properties:
          routerId: ${router.globalrouterId}
          name: demorule
          ruleJson: ""
          actions:
            - actionType: 0
              integration: unique_id of integration
      supressrule:
        type: zenduty:GlobalroutingRule
        properties:
          routerId: ${router.globalrouterId}
          name: supress
          ruleJson: ""
          actions:
            - actionType: 1
    
    Example coming soon!
    

    Create GlobalroutingRule Resource

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

    Constructor syntax

    new GlobalroutingRule(name: string, args: GlobalroutingRuleArgs, opts?: CustomResourceOptions);
    @overload
    def GlobalroutingRule(resource_name: str,
                          args: GlobalroutingRuleArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def GlobalroutingRule(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          router_id: Optional[str] = None,
                          actions: Optional[Sequence[GlobalroutingRuleActionArgs]] = None,
                          globalrouting_rule_id: Optional[str] = None,
                          name: Optional[str] = None,
                          position: Optional[float] = None,
                          rule_json: Optional[str] = None)
    func NewGlobalroutingRule(ctx *Context, name string, args GlobalroutingRuleArgs, opts ...ResourceOption) (*GlobalroutingRule, error)
    public GlobalroutingRule(string name, GlobalroutingRuleArgs args, CustomResourceOptions? opts = null)
    public GlobalroutingRule(String name, GlobalroutingRuleArgs args)
    public GlobalroutingRule(String name, GlobalroutingRuleArgs args, CustomResourceOptions options)
    
    type: zenduty:GlobalroutingRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "zenduty_globalrouting_rule" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args GlobalroutingRuleArgs
    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 GlobalroutingRuleArgs
    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 GlobalroutingRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GlobalroutingRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GlobalroutingRuleArgs
    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 globalroutingRuleResource = new Zenduty.GlobalroutingRule("globalroutingRuleResource", new()
    {
        RouterId = "string",
        Actions = new[]
        {
            new Zenduty.Inputs.GlobalroutingRuleActionArgs
            {
                ActionType = 0.0,
                Integration = "string",
            },
        },
        GlobalroutingRuleId = "string",
        Name = "string",
        Position = 0.0,
        RuleJson = "string",
    });
    
    example, err := zenduty.NewGlobalroutingRule(ctx, "globalroutingRuleResource", &zenduty.GlobalroutingRuleArgs{
    	RouterId: pulumi.String("string"),
    	Actions: zenduty.GlobalroutingRuleActionArray{
    		&zenduty.GlobalroutingRuleActionArgs{
    			ActionType:  pulumi.Float64(0),
    			Integration: pulumi.String("string"),
    		},
    	},
    	GlobalroutingRuleId: pulumi.String("string"),
    	Name:                pulumi.String("string"),
    	Position:            pulumi.Float64(0),
    	RuleJson:            pulumi.String("string"),
    })
    
    resource "zenduty_globalrouting_rule" "globalroutingRuleResource" {
      lifecycle {
        create_before_destroy = true
      }
      router_id = "string"
      actions {
        action_type = 0
        integration = "string"
      }
      globalrouting_rule_id = "string"
      name                  = "string"
      position              = 0
      rule_json             = "string"
    }
    
    var globalroutingRuleResource = new GlobalroutingRule("globalroutingRuleResource", GlobalroutingRuleArgs.builder()
        .routerId("string")
        .actions(GlobalroutingRuleActionArgs.builder()
            .actionType(0.0)
            .integration("string")
            .build())
        .globalroutingRuleId("string")
        .name("string")
        .position(0.0)
        .ruleJson("string")
        .build());
    
    globalrouting_rule_resource = zenduty.GlobalroutingRule("globalroutingRuleResource",
        router_id="string",
        actions=[{
            "action_type": float(0),
            "integration": "string",
        }],
        globalrouting_rule_id="string",
        name="string",
        position=float(0),
        rule_json="string")
    
    const globalroutingRuleResource = new zenduty.GlobalroutingRule("globalroutingRuleResource", {
        routerId: "string",
        actions: [{
            actionType: 0,
            integration: "string",
        }],
        globalroutingRuleId: "string",
        name: "string",
        position: 0,
        ruleJson: "string",
    });
    
    type: zenduty:GlobalroutingRule
    properties:
        actions:
            - actionType: 0
              integration: string
        globalroutingRuleId: string
        name: string
        position: 0
        routerId: string
        ruleJson: string
    

    GlobalroutingRule 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 GlobalroutingRule resource accepts the following input properties:

    RouterId string
    UniqueID of the GlobalRouter
    Actions List<GlobalroutingRuleAction>
    The actions to be performed when the rule matches.
    GlobalroutingRuleId string
    The ID of the GlobalRouterRule.
    Name string
    Name of the Routing Rule
    Position double
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    RuleJson string
    RouterId string
    UniqueID of the GlobalRouter
    Actions []GlobalroutingRuleActionArgs
    The actions to be performed when the rule matches.
    GlobalroutingRuleId string
    The ID of the GlobalRouterRule.
    Name string
    Name of the Routing Rule
    Position float64
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    RuleJson string
    router_id string
    UniqueID of the GlobalRouter
    actions list(object)
    The actions to be performed when the rule matches.
    globalrouting_rule_id string
    The ID of the GlobalRouterRule.
    name string
    Name of the Routing Rule
    position number
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    rule_json string
    routerId String
    UniqueID of the GlobalRouter
    actions List<GlobalroutingRuleAction>
    The actions to be performed when the rule matches.
    globalroutingRuleId String
    The ID of the GlobalRouterRule.
    name String
    Name of the Routing Rule
    position Double
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    ruleJson String
    routerId string
    UniqueID of the GlobalRouter
    actions GlobalroutingRuleAction[]
    The actions to be performed when the rule matches.
    globalroutingRuleId string
    The ID of the GlobalRouterRule.
    name string
    Name of the Routing Rule
    position number
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    ruleJson string
    router_id str
    UniqueID of the GlobalRouter
    actions Sequence[GlobalroutingRuleActionArgs]
    The actions to be performed when the rule matches.
    globalrouting_rule_id str
    The ID of the GlobalRouterRule.
    name str
    Name of the Routing Rule
    position float
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    rule_json str
    routerId String
    UniqueID of the GlobalRouter
    actions List<Property Map>
    The actions to be performed when the rule matches.
    globalroutingRuleId String
    The ID of the GlobalRouterRule.
    name String
    Name of the Routing Rule
    position Number
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    ruleJson String

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GlobalroutingRule 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 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 GlobalroutingRule Resource

    Get an existing GlobalroutingRule 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?: GlobalroutingRuleState, opts?: CustomResourceOptions): GlobalroutingRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actions: Optional[Sequence[GlobalroutingRuleActionArgs]] = None,
            globalrouting_rule_id: Optional[str] = None,
            name: Optional[str] = None,
            position: Optional[float] = None,
            router_id: Optional[str] = None,
            rule_json: Optional[str] = None) -> GlobalroutingRule
    func GetGlobalroutingRule(ctx *Context, name string, id IDInput, state *GlobalroutingRuleState, opts ...ResourceOption) (*GlobalroutingRule, error)
    public static GlobalroutingRule Get(string name, Input<string> id, GlobalroutingRuleState? state, CustomResourceOptions? opts = null)
    public static GlobalroutingRule get(String name, Output<String> id, GlobalroutingRuleState state, CustomResourceOptions options)
    resources:  _:    type: zenduty:GlobalroutingRule    get:      id: ${id}
    import {
      to = zenduty_globalrouting_rule.example
      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:
    Actions List<GlobalroutingRuleAction>
    The actions to be performed when the rule matches.
    GlobalroutingRuleId string
    The ID of the GlobalRouterRule.
    Name string
    Name of the Routing Rule
    Position double
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    RouterId string
    UniqueID of the GlobalRouter
    RuleJson string
    Actions []GlobalroutingRuleActionArgs
    The actions to be performed when the rule matches.
    GlobalroutingRuleId string
    The ID of the GlobalRouterRule.
    Name string
    Name of the Routing Rule
    Position float64
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    RouterId string
    UniqueID of the GlobalRouter
    RuleJson string
    actions list(object)
    The actions to be performed when the rule matches.
    globalrouting_rule_id string
    The ID of the GlobalRouterRule.
    name string
    Name of the Routing Rule
    position number
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    router_id string
    UniqueID of the GlobalRouter
    rule_json string
    actions List<GlobalroutingRuleAction>
    The actions to be performed when the rule matches.
    globalroutingRuleId String
    The ID of the GlobalRouterRule.
    name String
    Name of the Routing Rule
    position Double
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    routerId String
    UniqueID of the GlobalRouter
    ruleJson String
    actions GlobalroutingRuleAction[]
    The actions to be performed when the rule matches.
    globalroutingRuleId string
    The ID of the GlobalRouterRule.
    name string
    Name of the Routing Rule
    position number
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    routerId string
    UniqueID of the GlobalRouter
    ruleJson string
    actions Sequence[GlobalroutingRuleActionArgs]
    The actions to be performed when the rule matches.
    globalrouting_rule_id str
    The ID of the GlobalRouterRule.
    name str
    Name of the Routing Rule
    position float
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    router_id str
    UniqueID of the GlobalRouter
    rule_json str
    actions List<Property Map>
    The actions to be performed when the rule matches.
    globalroutingRuleId String
    The ID of the GlobalRouterRule.
    name String
    Name of the Routing Rule
    position Number
    Evaluation order of the rule within the router. Assigned by the server when omitted.
    routerId String
    UniqueID of the GlobalRouter
    ruleJson String

    Supporting Types

    GlobalroutingRuleAction, GlobalroutingRuleActionArgs

    ActionType double
    0 route to integration, 1 suppress the alert.
    Integration string
    UniqueID of the integration to route to. Required when action_type is 0.
    ActionType float64
    0 route to integration, 1 suppress the alert.
    Integration string
    UniqueID of the integration to route to. Required when action_type is 0.
    action_type number
    0 route to integration, 1 suppress the alert.
    integration string
    UniqueID of the integration to route to. Required when action_type is 0.
    actionType Double
    0 route to integration, 1 suppress the alert.
    integration String
    UniqueID of the integration to route to. Required when action_type is 0.
    actionType number
    0 route to integration, 1 suppress the alert.
    integration string
    UniqueID of the integration to route to. Required when action_type is 0.
    action_type float
    0 route to integration, 1 suppress the alert.
    integration str
    UniqueID of the integration to route to. Required when action_type is 0.
    actionType Number
    0 route to integration, 1 suppress the alert.
    integration String
    UniqueID of the integration to route to. Required when action_type is 0.

    Import

    GlobalRouterRule can be imported using the router_id/rule_id(ie. UniqueID of the router,rule), e.g.

    hcl

    resource “zenduty_globalrouting_rule” “rule1” {

    }

    $ pulumi import zenduty:index/globalroutingRule:GlobalroutingRule rule1 router_id/rule_id`
    

    $ terraform state show zenduty_globalrouting_rule.rule1

    copy the output data and paste inside zenduty_globalrouting_rule.rule1 resource block and remove the id attribute

    $ pulumi preview to verify the import

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

    Package Details

    Repository
    zenduty zenduty/terraform-provider-zenduty
    License
    Notes
    This Pulumi package is based on the zenduty Terraform Provider.
    Viewing docs for zenduty 2.0.0
    published on Friday, Aug 14, 2026 by zenduty

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial