Notifier
Provides a Rancher v2 Notifier resource. This can be used to create notifiers for Rancher v2 environments and retrieve their information.
Example Usage
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
class MyStack : Stack
{
public MyStack()
{
// Create a new rancher2 Notifier
var foo = new Rancher2.Notifier("foo", new Rancher2.NotifierArgs
{
ClusterId = "<cluster_id>",
Description = "Terraform notifier acceptance test",
PagerdutyConfig = new Rancher2.Inputs.NotifierPagerdutyConfigArgs
{
ProxyUrl = "http://proxy.test.io",
ServiceKey = "XXXXXXXX",
},
SendResolved = true,
});
}
}
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v2/go/rancher2"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rancher2.NewNotifier(ctx, "foo", &rancher2.NotifierArgs{
ClusterId: pulumi.String("<cluster_id>"),
Description: pulumi.String("Terraform notifier acceptance test"),
PagerdutyConfig: &rancher2.NotifierPagerdutyConfigArgs{
ProxyUrl: pulumi.String("http://proxy.test.io"),
ServiceKey: pulumi.String("XXXXXXXX"),
},
SendResolved: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_rancher2 as rancher2
# Create a new rancher2 Notifier
foo = rancher2.Notifier("foo",
cluster_id="<cluster_id>",
description="Terraform notifier acceptance test",
pagerduty_config=rancher2.NotifierPagerdutyConfigArgs(
proxy_url="http://proxy.test.io",
service_key="XXXXXXXX",
),
send_resolved=True)
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new rancher2 Notifier
const foo = new rancher2.Notifier("foo", {
clusterId: "<cluster_id>",
description: "Terraform notifier acceptance test",
pagerdutyConfig: {
proxyUrl: "http://proxy.test.io",
serviceKey: "XXXXXXXX",
},
sendResolved: true,
});
Create a Notifier Resource
new Notifier(name: string, args: NotifierArgs, opts?: CustomResourceOptions);
def Notifier(resource_name: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, cluster_id: Optional[str] = None, description: Optional[str] = None, dingtalk_config: Optional[NotifierDingtalkConfigArgs] = None, labels: Optional[Mapping[str, Any]] = None, msteams_config: Optional[NotifierMsteamsConfigArgs] = None, name: Optional[str] = None, pagerduty_config: Optional[NotifierPagerdutyConfigArgs] = None, send_resolved: Optional[bool] = None, slack_config: Optional[NotifierSlackConfigArgs] = None, smtp_config: Optional[NotifierSmtpConfigArgs] = None, webhook_config: Optional[NotifierWebhookConfigArgs] = None, wechat_config: Optional[NotifierWechatConfigArgs] = None)
func NewNotifier(ctx *Context, name string, args NotifierArgs, opts ...ResourceOption) (*Notifier, error)
public Notifier(string name, NotifierArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args NotifierArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args NotifierArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NotifierArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Notifier Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Notifier resource accepts the following input properties:
- Cluster
Id string The cluster id where create notifier (string)
- Annotations Dictionary<string, object>
Annotations for notifier object (map)
- Description string
The notifier description (string)
- Dingtalk
Config NotifierDingtalk Config Args Dingtalk config for notifier (list maxitems:1)
- Labels Dictionary<string, object>
Labels for notifier object (map)
- Msteams
Config NotifierMsteams Config Args MSTeams config for notifier (list maxitems:1)
- Name string
The name of the notifier (string)
- Pagerduty
Config NotifierPagerduty Config Args Pagerduty config for notifier (list maxitems:1)
- Send
Resolved bool = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- Slack
Config NotifierSlack Config Args Slack config for notifier (list maxitems:1)
- Smtp
Config NotifierSmtp Config Args SMTP config for notifier (list maxitems:1)
- Webhook
Config NotifierWebhook Config Args Webhook config for notifier (list maxitems:1)
- Wechat
Config NotifierWechat Config Args Wechat config for notifier (list maxitems:1)
- Cluster
Id string The cluster id where create notifier (string)
- Annotations map[string]interface{}
Annotations for notifier object (map)
- Description string
The notifier description (string)
- Dingtalk
Config NotifierDingtalk Config Dingtalk config for notifier (list maxitems:1)
- Labels map[string]interface{}
Labels for notifier object (map)
- Msteams
Config NotifierMsteams Config MSTeams config for notifier (list maxitems:1)
- Name string
The name of the notifier (string)
- Pagerduty
Config NotifierPagerduty Config Pagerduty config for notifier (list maxitems:1)
- Send
Resolved bool = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- Slack
Config NotifierSlack Config Slack config for notifier (list maxitems:1)
- Smtp
Config NotifierSmtp Config SMTP config for notifier (list maxitems:1)
- Webhook
Config NotifierWebhook Config Webhook config for notifier (list maxitems:1)
- Wechat
Config NotifierWechat Config Wechat config for notifier (list maxitems:1)
- cluster
Id string The cluster id where create notifier (string)
- annotations {[key: string]: any}
Annotations for notifier object (map)
- description string
The notifier description (string)
- dingtalk
Config NotifierDingtalk Config Dingtalk config for notifier (list maxitems:1)
- labels {[key: string]: any}
Labels for notifier object (map)
- msteams
Config NotifierMsteams Config MSTeams config for notifier (list maxitems:1)
- name string
The name of the notifier (string)
- pagerduty
Config NotifierPagerduty Config Pagerduty config for notifier (list maxitems:1)
- send
Resolved boolean = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- slack
Config NotifierSlack Config Slack config for notifier (list maxitems:1)
- smtp
Config NotifierSmtp Config SMTP config for notifier (list maxitems:1)
- webhook
Config NotifierWebhook Config Webhook config for notifier (list maxitems:1)
- wechat
Config NotifierWechat Config Wechat config for notifier (list maxitems:1)
- cluster_
id str The cluster id where create notifier (string)
- annotations Mapping[str, Any]
Annotations for notifier object (map)
- description str
The notifier description (string)
- dingtalk_
config NotifierDingtalk Config Args Dingtalk config for notifier (list maxitems:1)
- labels Mapping[str, Any]
Labels for notifier object (map)
- msteams_
config NotifierMsteams Config Args MSTeams config for notifier (list maxitems:1)
- name str
The name of the notifier (string)
- pagerduty_
config NotifierPagerduty Config Args Pagerduty config for notifier (list maxitems:1)
- send_
resolved bool = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- slack_
config NotifierSlack Config Args Slack config for notifier (list maxitems:1)
- smtp_
config NotifierSmtp Config Args SMTP config for notifier (list maxitems:1)
- webhook_
config NotifierWebhook Config Args Webhook config for notifier (list maxitems:1)
- wechat_
config NotifierWechat Config Args Wechat config for notifier (list maxitems:1)
Outputs
All input properties are implicitly available as output properties. Additionally, the Notifier 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 str
- The provider-assigned unique ID for this managed resource.
Look up an Existing Notifier Resource
Get an existing Notifier 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?: NotifierState, opts?: CustomResourceOptions): Notifier
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, cluster_id: Optional[str] = None, description: Optional[str] = None, dingtalk_config: Optional[NotifierDingtalkConfigArgs] = None, labels: Optional[Mapping[str, Any]] = None, msteams_config: Optional[NotifierMsteamsConfigArgs] = None, name: Optional[str] = None, pagerduty_config: Optional[NotifierPagerdutyConfigArgs] = None, send_resolved: Optional[bool] = None, slack_config: Optional[NotifierSlackConfigArgs] = None, smtp_config: Optional[NotifierSmtpConfigArgs] = None, webhook_config: Optional[NotifierWebhookConfigArgs] = None, wechat_config: Optional[NotifierWechatConfigArgs] = None) -> Notifier
func GetNotifier(ctx *Context, name string, id IDInput, state *NotifierState, opts ...ResourceOption) (*Notifier, error)
public static Notifier Get(string name, Input<string> id, NotifierState? state, CustomResourceOptions? opts = null)
- 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.
The following state arguments are supported:
- Annotations Dictionary<string, object>
Annotations for notifier object (map)
- Cluster
Id string The cluster id where create notifier (string)
- Description string
The notifier description (string)
- Dingtalk
Config NotifierDingtalk Config Args Dingtalk config for notifier (list maxitems:1)
- Labels Dictionary<string, object>
Labels for notifier object (map)
- Msteams
Config NotifierMsteams Config Args MSTeams config for notifier (list maxitems:1)
- Name string
The name of the notifier (string)
- Pagerduty
Config NotifierPagerduty Config Args Pagerduty config for notifier (list maxitems:1)
- Send
Resolved bool = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- Slack
Config NotifierSlack Config Args Slack config for notifier (list maxitems:1)
- Smtp
Config NotifierSmtp Config Args SMTP config for notifier (list maxitems:1)
- Webhook
Config NotifierWebhook Config Args Webhook config for notifier (list maxitems:1)
- Wechat
Config NotifierWechat Config Args Wechat config for notifier (list maxitems:1)
- Annotations map[string]interface{}
Annotations for notifier object (map)
- Cluster
Id string The cluster id where create notifier (string)
- Description string
The notifier description (string)
- Dingtalk
Config NotifierDingtalk Config Dingtalk config for notifier (list maxitems:1)
- Labels map[string]interface{}
Labels for notifier object (map)
- Msteams
Config NotifierMsteams Config MSTeams config for notifier (list maxitems:1)
- Name string
The name of the notifier (string)
- Pagerduty
Config NotifierPagerduty Config Pagerduty config for notifier (list maxitems:1)
- Send
Resolved bool = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- Slack
Config NotifierSlack Config Slack config for notifier (list maxitems:1)
- Smtp
Config NotifierSmtp Config SMTP config for notifier (list maxitems:1)
- Webhook
Config NotifierWebhook Config Webhook config for notifier (list maxitems:1)
- Wechat
Config NotifierWechat Config Wechat config for notifier (list maxitems:1)
- annotations {[key: string]: any}
Annotations for notifier object (map)
- cluster
Id string The cluster id where create notifier (string)
- description string
The notifier description (string)
- dingtalk
Config NotifierDingtalk Config Dingtalk config for notifier (list maxitems:1)
- labels {[key: string]: any}
Labels for notifier object (map)
- msteams
Config NotifierMsteams Config MSTeams config for notifier (list maxitems:1)
- name string
The name of the notifier (string)
- pagerduty
Config NotifierPagerduty Config Pagerduty config for notifier (list maxitems:1)
- send
Resolved boolean = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- slack
Config NotifierSlack Config Slack config for notifier (list maxitems:1)
- smtp
Config NotifierSmtp Config SMTP config for notifier (list maxitems:1)
- webhook
Config NotifierWebhook Config Webhook config for notifier (list maxitems:1)
- wechat
Config NotifierWechat Config Wechat config for notifier (list maxitems:1)
- annotations Mapping[str, Any]
Annotations for notifier object (map)
- cluster_
id str The cluster id where create notifier (string)
- description str
The notifier description (string)
- dingtalk_
config NotifierDingtalk Config Args Dingtalk config for notifier (list maxitems:1)
- labels Mapping[str, Any]
Labels for notifier object (map)
- msteams_
config NotifierMsteams Config Args MSTeams config for notifier (list maxitems:1)
- name str
The name of the notifier (string)
- pagerduty_
config NotifierPagerduty Config Args Pagerduty config for notifier (list maxitems:1)
- send_
resolved bool = (Optional) Enable the notifier to send resolved notifications. Default
false
(bool)- slack_
config NotifierSlack Config Args Slack config for notifier (list maxitems:1)
- smtp_
config NotifierSmtp Config Args SMTP config for notifier (list maxitems:1)
- webhook_
config NotifierWebhook Config Args Webhook config for notifier (list maxitems:1)
- wechat_
config NotifierWechat Config Args Wechat config for notifier (list maxitems:1)
Supporting Types
NotifierDingtalkConfig
NotifierMsteamsConfig
NotifierPagerdutyConfig
- Service
Key string Pagerduty service key (string)
- Proxy
Url string Wechat proxy url (string)
- Service
Key string Pagerduty service key (string)
- Proxy
Url string Wechat proxy url (string)
- service
Key string Pagerduty service key (string)
- proxy
Url string Wechat proxy url (string)
- service_
key str Pagerduty service key (string)
- proxy_
url str Wechat proxy url (string)
NotifierSlackConfig
- Default
Recipient string Wechat default recipient (string)
- Url string
Webhook url (string)
- Proxy
Url string Wechat proxy url (string)
- Default
Recipient string Wechat default recipient (string)
- Url string
Webhook url (string)
- Proxy
Url string Wechat proxy url (string)
- default
Recipient string Wechat default recipient (string)
- url string
Webhook url (string)
- proxy
Url string Wechat proxy url (string)
- default_
recipient str Wechat default recipient (string)
- url str
Webhook url (string)
- proxy_
url str Wechat proxy url (string)
NotifierSmtpConfig
NotifierWebhookConfig
NotifierWechatConfig
- Agent string
Wechat agent ID (string)
- Corp string
Wechat corporation ID (string)
- Default
Recipient string Wechat default recipient (string)
- Secret string
Wechat agent ID (string)
- Proxy
Url string Wechat proxy url (string)
- Recipient
Type string Wechat recipient type. Allowed values:
party
|tag
|user
(string)
- Agent string
Wechat agent ID (string)
- Corp string
Wechat corporation ID (string)
- Default
Recipient string Wechat default recipient (string)
- Secret string
Wechat agent ID (string)
- Proxy
Url string Wechat proxy url (string)
- Recipient
Type string Wechat recipient type. Allowed values:
party
|tag
|user
(string)
- agent string
Wechat agent ID (string)
- corp string
Wechat corporation ID (string)
- default
Recipient string Wechat default recipient (string)
- secret string
Wechat agent ID (string)
- proxy
Url string Wechat proxy url (string)
- recipient
Type string Wechat recipient type. Allowed values:
party
|tag
|user
(string)
- agent str
Wechat agent ID (string)
- corp str
Wechat corporation ID (string)
- default_
recipient str Wechat default recipient (string)
- secret str
Wechat agent ID (string)
- proxy_
url str Wechat proxy url (string)
- recipient_
type str Wechat recipient type. Allowed values:
party
|tag
|user
(string)
Import
Notifiers can be imported using the Rancher nNtifier ID
$ pulumi import rancher2:index/notifier:Notifier foo <notifier_id>
Package Details
- Repository
- https://github.com/pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.