published on Friday, Aug 14, 2026 by zenduty
published on Friday, Aug 14, 2026 by zenduty
Provides a Notification Rules Resource. This allows Notification Rules to be created, updated, and deleted.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as zenduty from "@pulumi/zenduty";
const user1 = zenduty.getUser({
email: "demouser@gmail.com",
});
const exampleusercontact = user1.then(user1 => zenduty.getUsercontact({
userId: user1.users?.[0]?.username,
contactType: 1,
}));
import pulumi
import pulumi_zenduty as zenduty
user1 = zenduty.get_user(email="demouser@gmail.com")
exampleusercontact = zenduty.get_usercontact(user_id=user1.users[0].username,
contact_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 {
user1, err := zenduty.LookupUser(ctx, &zenduty.LookupUserArgs{
Email: "demouser@gmail.com",
}, nil)
if err != nil {
return err
}
_, err = zenduty.GetUsercontact(ctx, &zenduty.GetUsercontactArgs{
UserId: user1.Users[0].Username,
ContactType: 1,
}, nil)
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 user1 = Zenduty.GetUser.Invoke(new()
{
Email = "demouser@gmail.com",
});
var exampleusercontact = Zenduty.GetUsercontact.Invoke(new()
{
UserId = user1.Apply(getUserResult => getUserResult.Users[0]?.Username),
ContactType = 1,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zenduty.ZendutyFunctions;
import com.pulumi.zenduty.inputs.GetUserArgs;
import com.pulumi.zenduty.inputs.GetUsercontactArgs;
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 user1 = ZendutyFunctions.getUser(GetUserArgs.builder()
.email("demouser@gmail.com")
.build());
final var exampleusercontact = ZendutyFunctions.getUsercontact(GetUsercontactArgs.builder()
.userId(user1.users()[0].username())
.contactType(1)
.build());
}
}
variables:
user1:
fn::invoke:
function: zenduty:getUser
arguments:
email: demouser@gmail.com
exampleusercontact:
fn::invoke:
function: zenduty:getUsercontact
arguments:
userId: ${user1.users[0].username}
contactType: 1
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as zenduty from "@pulumi/zenduty";
const notificationRules = new zenduty.NotificationRules("notification_rules", {
username: user1.users[0].username,
contact: exampleusercontact.id,
urgency: 1,
delay: 1,
});
import pulumi
import pulumi_zenduty as zenduty
notification_rules = zenduty.NotificationRules("notification_rules",
username=user1["users"][0]["username"],
contact=exampleusercontact["id"],
urgency=1,
delay=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 {
_, err := zenduty.NewNotificationRules(ctx, "notification_rules", &zenduty.NotificationRulesArgs{
Username: pulumi.Any(user1.Users[0].Username),
Contact: pulumi.Any(exampleusercontact.Id),
Urgency: pulumi.Float64(1),
Delay: 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 notificationRules = new Zenduty.NotificationRules("notification_rules", new()
{
Username = user1.Users[0].Username,
Contact = exampleusercontact.Id,
Urgency = 1,
Delay = 1,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zenduty.NotificationRules;
import com.pulumi.zenduty.NotificationRulesArgs;
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 notificationRules = new NotificationRules("notificationRules", NotificationRulesArgs.builder()
.username(user1.users()[0].username())
.contact(exampleusercontact.id())
.urgency(1.0)
.delay(1.0)
.build());
}
}
resources:
notificationRules:
type: zenduty:NotificationRules
name: notification_rules
properties:
username: ${user1.users[0].username}
contact: ${exampleusercontact.id}
urgency: 1
delay: 1
Example coming soon!
Create NotificationRules Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NotificationRules(name: string, args: NotificationRulesArgs, opts?: CustomResourceOptions);@overload
def NotificationRules(resource_name: str,
args: NotificationRulesArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NotificationRules(resource_name: str,
opts: Optional[ResourceOptions] = None,
contact: Optional[str] = None,
delay: Optional[float] = None,
urgency: Optional[float] = None,
username: Optional[str] = None,
notification_rules_id: Optional[str] = None)func NewNotificationRules(ctx *Context, name string, args NotificationRulesArgs, opts ...ResourceOption) (*NotificationRules, error)public NotificationRules(string name, NotificationRulesArgs args, CustomResourceOptions? opts = null)
public NotificationRules(String name, NotificationRulesArgs args)
public NotificationRules(String name, NotificationRulesArgs args, CustomResourceOptions options)
type: zenduty:NotificationRules
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "zenduty_notification_rules" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args NotificationRulesArgs
- 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 NotificationRulesArgs
- 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 NotificationRulesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotificationRulesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NotificationRulesArgs
- 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 notificationRulesResource = new Zenduty.NotificationRules("notificationRulesResource", new()
{
Contact = "string",
Delay = 0.0,
Urgency = 0.0,
Username = "string",
NotificationRulesId = "string",
});
example, err := zenduty.NewNotificationRules(ctx, "notificationRulesResource", &zenduty.NotificationRulesArgs{
Contact: pulumi.String("string"),
Delay: pulumi.Float64(0),
Urgency: pulumi.Float64(0),
Username: pulumi.String("string"),
NotificationRulesId: pulumi.String("string"),
})
resource "zenduty_notification_rules" "notificationRulesResource" {
lifecycle {
create_before_destroy = true
}
contact = "string"
delay = 0
urgency = 0
username = "string"
notification_rules_id = "string"
}
var notificationRulesResource = new NotificationRules("notificationRulesResource", NotificationRulesArgs.builder()
.contact("string")
.delay(0.0)
.urgency(0.0)
.username("string")
.notificationRulesId("string")
.build());
notification_rules_resource = zenduty.NotificationRules("notificationRulesResource",
contact="string",
delay=float(0),
urgency=float(0),
username="string",
notification_rules_id="string")
const notificationRulesResource = new zenduty.NotificationRules("notificationRulesResource", {
contact: "string",
delay: 0,
urgency: 0,
username: "string",
notificationRulesId: "string",
});
type: zenduty:NotificationRules
properties:
contact: string
delay: 0
notificationRulesId: string
urgency: 0
username: string
NotificationRules 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 NotificationRules resource accepts the following input properties:
- Contact string
- The contact ID of the user.
- Delay double
- The delay of the notification.
- Urgency double
- The urgency of the notification.
values are
1High,0Low - Username string
- The username of the user.
- Notification
Rules stringId - The ID of the Zenduty Notification Rule.
- Contact string
- The contact ID of the user.
- Delay float64
- The delay of the notification.
- Urgency float64
- The urgency of the notification.
values are
1High,0Low - Username string
- The username of the user.
- Notification
Rules stringId - The ID of the Zenduty Notification Rule.
- contact string
- The contact ID of the user.
- delay number
- The delay of the notification.
- urgency number
- The urgency of the notification.
values are
1High,0Low - username string
- The username of the user.
- notification_
rules_ stringid - The ID of the Zenduty Notification Rule.
- contact String
- The contact ID of the user.
- delay Double
- The delay of the notification.
- urgency Double
- The urgency of the notification.
values are
1High,0Low - username String
- The username of the user.
- notification
Rules StringId - The ID of the Zenduty Notification Rule.
- contact string
- The contact ID of the user.
- delay number
- The delay of the notification.
- urgency number
- The urgency of the notification.
values are
1High,0Low - username string
- The username of the user.
- notification
Rules stringId - The ID of the Zenduty Notification Rule.
- contact str
- The contact ID of the user.
- delay float
- The delay of the notification.
- urgency float
- The urgency of the notification.
values are
1High,0Low - username str
- The username of the user.
- notification_
rules_ strid - The ID of the Zenduty Notification Rule.
- contact String
- The contact ID of the user.
- delay Number
- The delay of the notification.
- urgency Number
- The urgency of the notification.
values are
1High,0Low - username String
- The username of the user.
- notification
Rules StringId - The ID of the Zenduty Notification Rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the NotificationRules 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 NotificationRules Resource
Get an existing NotificationRules 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?: NotificationRulesState, opts?: CustomResourceOptions): NotificationRules@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
contact: Optional[str] = None,
delay: Optional[float] = None,
notification_rules_id: Optional[str] = None,
urgency: Optional[float] = None,
username: Optional[str] = None) -> NotificationRulesfunc GetNotificationRules(ctx *Context, name string, id IDInput, state *NotificationRulesState, opts ...ResourceOption) (*NotificationRules, error)public static NotificationRules Get(string name, Input<string> id, NotificationRulesState? state, CustomResourceOptions? opts = null)public static NotificationRules get(String name, Output<String> id, NotificationRulesState state, CustomResourceOptions options)resources: _: type: zenduty:NotificationRules get: id: ${id}import {
to = zenduty_notification_rules.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.
- Contact string
- The contact ID of the user.
- Delay double
- The delay of the notification.
- Notification
Rules stringId - The ID of the Zenduty Notification Rule.
- Urgency double
- The urgency of the notification.
values are
1High,0Low - Username string
- The username of the user.
- Contact string
- The contact ID of the user.
- Delay float64
- The delay of the notification.
- Notification
Rules stringId - The ID of the Zenduty Notification Rule.
- Urgency float64
- The urgency of the notification.
values are
1High,0Low - Username string
- The username of the user.
- contact string
- The contact ID of the user.
- delay number
- The delay of the notification.
- notification_
rules_ stringid - The ID of the Zenduty Notification Rule.
- urgency number
- The urgency of the notification.
values are
1High,0Low - username string
- The username of the user.
- contact String
- The contact ID of the user.
- delay Double
- The delay of the notification.
- notification
Rules StringId - The ID of the Zenduty Notification Rule.
- urgency Double
- The urgency of the notification.
values are
1High,0Low - username String
- The username of the user.
- contact string
- The contact ID of the user.
- delay number
- The delay of the notification.
- notification
Rules stringId - The ID of the Zenduty Notification Rule.
- urgency number
- The urgency of the notification.
values are
1High,0Low - username string
- The username of the user.
- contact str
- The contact ID of the user.
- delay float
- The delay of the notification.
- notification_
rules_ strid - The ID of the Zenduty Notification Rule.
- urgency float
- The urgency of the notification.
values are
1High,0Low - username str
- The username of the user.
- contact String
- The contact ID of the user.
- delay Number
- The delay of the notification.
- notification
Rules StringId - The ID of the Zenduty Notification Rule.
- urgency Number
- The urgency of the notification.
values are
1High,0Low - username String
- The username of the user.
Import
Notification Rules can be imported using the username(username of user) and notification_rule_id(ie. unique_id of the notification rule), e.g.
hcl
resource “zenduty_notification_rules” “rule1” {
}
$ pulumi import zenduty:index/notificationRules:NotificationRules rule1 username/notification_rule_id`
$ terraform state show zenduty_notification_rules.rule1
copy the output data and paste inside zenduty_notification_rules.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
zendutyTerraform Provider.
published on Friday, Aug 14, 2026 by zenduty