ProjectAlertGroup
Provides a Rancher v2 Project Alert Group resource. This can be used to create Project Alert Group 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 Project Alert Group
var foo = new Rancher2.ProjectAlertGroup("foo", new Rancher2.ProjectAlertGroupArgs
{
Description = "Terraform project alert group",
GroupIntervalSeconds = 300,
ProjectId = "<project_id>",
RepeatIntervalSeconds = 3600,
});
}
}
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.NewProjectAlertGroup(ctx, "foo", &rancher2.ProjectAlertGroupArgs{
Description: pulumi.String("Terraform project alert group"),
GroupIntervalSeconds: pulumi.Int(300),
ProjectId: pulumi.String("<project_id>"),
RepeatIntervalSeconds: pulumi.Int(3600),
})
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_rancher2 as rancher2
# Create a new Rancher2 Project Alert Group
foo = rancher2.ProjectAlertGroup("foo",
description="Terraform project alert group",
group_interval_seconds=300,
project_id="<project_id>",
repeat_interval_seconds=3600)
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";
// Create a new Rancher2 Project Alert Group
const foo = new rancher2.ProjectAlertGroup("foo", {
description: "Terraform project alert group",
groupIntervalSeconds: 300,
projectId: "<project_id>",
repeatIntervalSeconds: 3600,
});
Create a ProjectAlertGroup Resource
new ProjectAlertGroup(name: string, args: ProjectAlertGroupArgs, opts?: CustomResourceOptions);
def ProjectAlertGroup(resource_name: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, description: Optional[str] = None, group_interval_seconds: Optional[int] = None, group_wait_seconds: Optional[int] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, project_id: Optional[str] = None, recipients: Optional[Sequence[ProjectAlertGroupRecipientArgs]] = None, repeat_interval_seconds: Optional[int] = None)
func NewProjectAlertGroup(ctx *Context, name string, args ProjectAlertGroupArgs, opts ...ResourceOption) (*ProjectAlertGroup, error)
public ProjectAlertGroup(string name, ProjectAlertGroupArgs args, CustomResourceOptions? opts = null)
- name string
- The unique name of the resource.
- args ProjectAlertGroupArgs
- 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 ProjectAlertGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectAlertGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ProjectAlertGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ProjectAlertGroup resource accepts the following input properties:
- Project
Id string The project id where create project alert group (string)
- Annotations Dictionary<string, object>
The project alert group annotations (map)
- Description string
The project alert group description (string)
- Group
Interval intSeconds The project alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The project alert group wait seconds. Default:
180
(int)- Labels Dictionary<string, object>
The project alert group labels (map)
- Name string
The project alert group name (string)
- Recipients
List<Project
Alert Group Recipient Args> The project alert group recipients (list)
- Repeat
Interval intSeconds The project alert group wait seconds. Default:
3600
(int)
- Project
Id string The project id where create project alert group (string)
- Annotations map[string]interface{}
The project alert group annotations (map)
- Description string
The project alert group description (string)
- Group
Interval intSeconds The project alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The project alert group wait seconds. Default:
180
(int)- Labels map[string]interface{}
The project alert group labels (map)
- Name string
The project alert group name (string)
- Recipients
[]Project
Alert Group Recipient The project alert group recipients (list)
- Repeat
Interval intSeconds The project alert group wait seconds. Default:
3600
(int)
- project
Id string The project id where create project alert group (string)
- annotations {[key: string]: any}
The project alert group annotations (map)
- description string
The project alert group description (string)
- group
Interval numberSeconds The project alert group interval seconds. Default:
180
(int)- group
Wait numberSeconds The project alert group wait seconds. Default:
180
(int)- labels {[key: string]: any}
The project alert group labels (map)
- name string
The project alert group name (string)
- recipients
Project
Alert Group Recipient[] The project alert group recipients (list)
- repeat
Interval numberSeconds The project alert group wait seconds. Default:
3600
(int)
- project_
id str The project id where create project alert group (string)
- annotations Mapping[str, Any]
The project alert group annotations (map)
- description str
The project alert group description (string)
- group_
interval_ intseconds The project alert group interval seconds. Default:
180
(int)- group_
wait_ intseconds The project alert group wait seconds. Default:
180
(int)- labels Mapping[str, Any]
The project alert group labels (map)
- name str
The project alert group name (string)
- recipients
Sequence[Project
Alert Group Recipient Args] The project alert group recipients (list)
- repeat_
interval_ intseconds The project alert group wait seconds. Default:
3600
(int)
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectAlertGroup 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 ProjectAlertGroup Resource
Get an existing ProjectAlertGroup 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?: ProjectAlertGroupState, opts?: CustomResourceOptions): ProjectAlertGroup
@staticmethod
def get(resource_name: str, id: str, opts: Optional[ResourceOptions] = None, annotations: Optional[Mapping[str, Any]] = None, description: Optional[str] = None, group_interval_seconds: Optional[int] = None, group_wait_seconds: Optional[int] = None, labels: Optional[Mapping[str, Any]] = None, name: Optional[str] = None, project_id: Optional[str] = None, recipients: Optional[Sequence[ProjectAlertGroupRecipientArgs]] = None, repeat_interval_seconds: Optional[int] = None) -> ProjectAlertGroup
func GetProjectAlertGroup(ctx *Context, name string, id IDInput, state *ProjectAlertGroupState, opts ...ResourceOption) (*ProjectAlertGroup, error)
public static ProjectAlertGroup Get(string name, Input<string> id, ProjectAlertGroupState? 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>
The project alert group annotations (map)
- Description string
The project alert group description (string)
- Group
Interval intSeconds The project alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The project alert group wait seconds. Default:
180
(int)- Labels Dictionary<string, object>
The project alert group labels (map)
- Name string
The project alert group name (string)
- Project
Id string The project id where create project alert group (string)
- Recipients
List<Project
Alert Group Recipient Args> The project alert group recipients (list)
- Repeat
Interval intSeconds The project alert group wait seconds. Default:
3600
(int)
- Annotations map[string]interface{}
The project alert group annotations (map)
- Description string
The project alert group description (string)
- Group
Interval intSeconds The project alert group interval seconds. Default:
180
(int)- Group
Wait intSeconds The project alert group wait seconds. Default:
180
(int)- Labels map[string]interface{}
The project alert group labels (map)
- Name string
The project alert group name (string)
- Project
Id string The project id where create project alert group (string)
- Recipients
[]Project
Alert Group Recipient The project alert group recipients (list)
- Repeat
Interval intSeconds The project alert group wait seconds. Default:
3600
(int)
- annotations {[key: string]: any}
The project alert group annotations (map)
- description string
The project alert group description (string)
- group
Interval numberSeconds The project alert group interval seconds. Default:
180
(int)- group
Wait numberSeconds The project alert group wait seconds. Default:
180
(int)- labels {[key: string]: any}
The project alert group labels (map)
- name string
The project alert group name (string)
- project
Id string The project id where create project alert group (string)
- recipients
Project
Alert Group Recipient[] The project alert group recipients (list)
- repeat
Interval numberSeconds The project alert group wait seconds. Default:
3600
(int)
- annotations Mapping[str, Any]
The project alert group annotations (map)
- description str
The project alert group description (string)
- group_
interval_ intseconds The project alert group interval seconds. Default:
180
(int)- group_
wait_ intseconds The project alert group wait seconds. Default:
180
(int)- labels Mapping[str, Any]
The project alert group labels (map)
- name str
The project alert group name (string)
- project_
id str The project id where create project alert group (string)
- recipients
Sequence[Project
Alert Group Recipient Args] The project alert group recipients (list)
- repeat_
interval_ intseconds The project alert group wait seconds. Default:
3600
(int)
Supporting Types
ProjectAlertGroupRecipient
- Notifier
Id string Recipient notifier ID (string)
- Default
Recipient bool - Notifier
Type string Recipient notifier ID. Supported values :
"pagerduty" | "slack" | "email" | "webhook" | "wechat"
(string)- Recipient string
Recipient (string)
- Notifier
Id string Recipient notifier ID (string)
- Default
Recipient bool - Notifier
Type string Recipient notifier ID. Supported values :
"pagerduty" | "slack" | "email" | "webhook" | "wechat"
(string)- Recipient string
Recipient (string)
- notifier
Id string Recipient notifier ID (string)
- default
Recipient boolean - notifier
Type string Recipient notifier ID. Supported values :
"pagerduty" | "slack" | "email" | "webhook" | "wechat"
(string)- recipient string
Recipient (string)
- notifier_
id str Recipient notifier ID (string)
- default_
recipient bool - notifier_
type str Recipient notifier ID. Supported values :
"pagerduty" | "slack" | "email" | "webhook" | "wechat"
(string)- recipient str
Recipient (string)
Import
Project Alert Group can be imported using the Rancher project alert group ID
$ pulumi import rancher2:index/projectAlertGroup:ProjectAlertGroup foo <project_alert_group_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.