1. Registry
  2. Packages
  3. Zenduty Provider
  4. API Docs
  5. getUserForwardingRules
Viewing docs for zenduty 2.2.0
published on Friday, Oct 30, 2026 by zenduty
zenduty
Viewing docs for zenduty 2.2.0
published on Friday, Oct 30, 2026 by zenduty

    zenduty.getUserForwardingRules lists the forwarding rules involving a user: the rules forwarding their notifications and the rules forwarding other users’ notifications to them. Compare username with the queried user to tell them apart.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as zenduty from "@pulumi/zenduty";
    
    const alice = zenduty.getUserForwardingRules({
        username: aliceZendutyUser.users[0].username,
    });
    export const aliceForwardsTo = alice.then(alice => .filter(r => r.username == aliceZendutyUser.users[0].username).map(r => (r.toUser)));
    
    import pulumi
    import pulumi_zenduty as zenduty
    
    alice = zenduty.get_user_forwarding_rules(username=alice_zenduty_user["users"][0]["username"])
    pulumi.export("aliceForwardsTo", [r.to_user for r in alice.forwarding_rules if r.username == alice_zenduty_user["users"][0]["username"]])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zenduty = Pulumi.Zenduty;
    
    return await Deployment.RunAsync(() => 
    {
        var alice = Zenduty.GetUserForwardingRules.Invoke(new()
        {
            Username = aliceZendutyUser.Users[0].Username,
        });
    
        return new Dictionary<string, object?>
        {
            ["aliceForwardsTo"] = .Where(r => r.Username == aliceZendutyUser.Users[0].Username).Select(r => 
            {
                return r.ToUser;
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    
    Example coming soon!
    

    Using getUserForwardingRules

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getUserForwardingRules(args: GetUserForwardingRulesArgs, opts?: InvokeOptions): Promise<GetUserForwardingRulesResult>
    function getUserForwardingRulesOutput(args: GetUserForwardingRulesOutputArgs, opts?: InvokeOutputOptions): Output<GetUserForwardingRulesResult>
    def get_user_forwarding_rules(id: Optional[str] = None,
                                  username: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetUserForwardingRulesResult
    def get_user_forwarding_rules_output(id: pulumi.Input[Optional[str]] = None,
                                  username: pulumi.Input[Optional[str]] = None,
                                  opts: Optional[InvokeOutputOptions] = None) -> Output[GetUserForwardingRulesResult]
    func GetUserForwardingRules(ctx *Context, args *GetUserForwardingRulesArgs, opts ...InvokeOption) (*GetUserForwardingRulesResult, error)
    func GetUserForwardingRulesOutput(ctx *Context, args *GetUserForwardingRulesOutputArgs, opts ...InvokeOption) GetUserForwardingRulesResultOutput

    > Note: This function is named GetUserForwardingRules in the Go SDK.

    public static class GetUserForwardingRules 
    {
        public static Task<GetUserForwardingRulesResult> InvokeAsync(GetUserForwardingRulesArgs args, InvokeOptions? opts = null)
        public static Output<GetUserForwardingRulesResult> Invoke(GetUserForwardingRulesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetUserForwardingRulesResult> Invoke(GetUserForwardingRulesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetUserForwardingRulesResult> getUserForwardingRules(GetUserForwardingRulesArgs args, InvokeOptions options)
    public static Output<GetUserForwardingRulesResult> getUserForwardingRules(GetUserForwardingRulesArgs args, InvokeOptions options)
    public static Output<GetUserForwardingRulesResult> getUserForwardingRules(GetUserForwardingRulesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: zenduty:index/getUserForwardingRules:getUserForwardingRules
      arguments:
        # arguments dictionary
    data "zenduty_get_user_forwarding_rules" "name" {
        # arguments
    }

    The following arguments are supported:

    Username string
    Username of the user.
    Id string
    Username string
    Username of the user.
    Id string
    username string
    Username of the user.
    id string
    username String
    Username of the user.
    id String
    username string
    Username of the user.
    id string
    username str
    Username of the user.
    id str
    username String
    Username of the user.
    id String

    getUserForwardingRules Result

    The following output properties are available:

    ForwardingRules List<GetUserForwardingRulesForwardingRule>
    The list of rules, each with:
    Id string
    Username string
    Username of the user whose notifications are forwarded.
    ForwardingRules []GetUserForwardingRulesForwardingRule
    The list of rules, each with:
    Id string
    Username string
    Username of the user whose notifications are forwarded.
    forwarding_rules list(object)
    The list of rules, each with:
    id string
    username string
    Username of the user whose notifications are forwarded.
    forwardingRules List<GetUserForwardingRulesForwardingRule>
    The list of rules, each with:
    id String
    username String
    Username of the user whose notifications are forwarded.
    forwardingRules GetUserForwardingRulesForwardingRule[]
    The list of rules, each with:
    id string
    username string
    Username of the user whose notifications are forwarded.
    forwarding_rules Sequence[GetUserForwardingRulesForwardingRule]
    The list of rules, each with:
    id str
    username str
    Username of the user whose notifications are forwarded.
    forwardingRules List<Property Map>
    The list of rules, each with:
    id String
    username String
    Username of the user whose notifications are forwarded.

    Supporting Types

    GetUserForwardingRulesForwardingRule

    FromDate string
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    TimeZone string
    The IANA time zone of the rule.
    ToDate string
    ToUser string
    Username of the receiving user.
    UniqueId string
    The unique_id of the rule.
    Username string
    Username of the user.
    FromDate string
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    TimeZone string
    The IANA time zone of the rule.
    ToDate string
    ToUser string
    Username of the receiving user.
    UniqueId string
    The unique_id of the rule.
    Username string
    Username of the user.
    from_date string
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    time_zone string
    The IANA time zone of the rule.
    to_date string
    to_user string
    Username of the receiving user.
    unique_id string
    The unique_id of the rule.
    username string
    Username of the user.
    fromDate String
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    timeZone String
    The IANA time zone of the rule.
    toDate String
    toUser String
    Username of the receiving user.
    uniqueId String
    The unique_id of the rule.
    username String
    Username of the user.
    fromDate string
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    timeZone string
    The IANA time zone of the rule.
    toDate string
    toUser string
    Username of the receiving user.
    uniqueId string
    The unique_id of the rule.
    username string
    Username of the user.
    from_date str
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    time_zone str
    The IANA time zone of the rule.
    to_date str
    to_user str
    Username of the receiving user.
    unique_id str
    The unique_id of the rule.
    username str
    Username of the user.
    fromDate String
    , to_date - As YYYY-MM-DD HH:MM in time_zone.
    timeZone String
    The IANA time zone of the rule.
    toDate String
    toUser String
    Username of the receiving user.
    uniqueId String
    The unique_id of the rule.
    username String
    Username of the user.

    Package Details

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

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial