rancher2.ProjectAlertGroup
Explore with Pulumi AI
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
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", {
name: "foo",
description: "Terraform project alert group",
projectId: "<project_id>",
groupIntervalSeconds: 300,
repeatIntervalSeconds: 3600,
});
import pulumi
import pulumi_rancher2 as rancher2
# Create a new Rancher2 Project Alert Group
foo = rancher2.ProjectAlertGroup("foo",
name="foo",
description="Terraform project alert group",
project_id="<project_id>",
group_interval_seconds=300,
repeat_interval_seconds=3600)
package main
import (
"github.com/pulumi/pulumi-rancher2/sdk/v6/go/rancher2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new Rancher2 Project Alert Group
_, err := rancher2.NewProjectAlertGroup(ctx, "foo", &rancher2.ProjectAlertGroupArgs{
Name: pulumi.String("foo"),
Description: pulumi.String("Terraform project alert group"),
ProjectId: pulumi.String("<project_id>"),
GroupIntervalSeconds: pulumi.Int(300),
RepeatIntervalSeconds: pulumi.Int(3600),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;
return await Deployment.RunAsync(() =>
{
// Create a new Rancher2 Project Alert Group
var foo = new Rancher2.ProjectAlertGroup("foo", new()
{
Name = "foo",
Description = "Terraform project alert group",
ProjectId = "<project_id>",
GroupIntervalSeconds = 300,
RepeatIntervalSeconds = 3600,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.ProjectAlertGroup;
import com.pulumi.rancher2.ProjectAlertGroupArgs;
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) {
// Create a new Rancher2 Project Alert Group
var foo = new ProjectAlertGroup("foo", ProjectAlertGroupArgs.builder()
.name("foo")
.description("Terraform project alert group")
.projectId("<project_id>")
.groupIntervalSeconds(300)
.repeatIntervalSeconds(3600)
.build());
}
}
resources:
# Create a new Rancher2 Project Alert Group
foo:
type: rancher2:ProjectAlertGroup
properties:
name: foo
description: Terraform project alert group
projectId: <project_id>
groupIntervalSeconds: 300
repeatIntervalSeconds: 3600
Create ProjectAlertGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectAlertGroup(name: string, args: ProjectAlertGroupArgs, opts?: CustomResourceOptions);
@overload
def ProjectAlertGroup(resource_name: str,
args: ProjectAlertGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectAlertGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = 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,
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)
public ProjectAlertGroup(String name, ProjectAlertGroupArgs args)
public ProjectAlertGroup(String name, ProjectAlertGroupArgs args, CustomResourceOptions options)
type: rancher2:ProjectAlertGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args ProjectAlertGroupArgs
- 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 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.
- name String
- The unique name of the resource.
- args ProjectAlertGroupArgs
- 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 projectAlertGroupResource = new Rancher2.ProjectAlertGroup("projectAlertGroupResource", new()
{
ProjectId = "string",
Annotations =
{
{ "string", "any" },
},
Description = "string",
GroupIntervalSeconds = 0,
GroupWaitSeconds = 0,
Labels =
{
{ "string", "any" },
},
Name = "string",
Recipients = new[]
{
new Rancher2.Inputs.ProjectAlertGroupRecipientArgs
{
NotifierId = "string",
DefaultRecipient = false,
NotifierType = "string",
Recipient = "string",
},
},
RepeatIntervalSeconds = 0,
});
example, err := rancher2.NewProjectAlertGroup(ctx, "projectAlertGroupResource", &rancher2.ProjectAlertGroupArgs{
ProjectId: pulumi.String("string"),
Annotations: pulumi.Map{
"string": pulumi.Any("any"),
},
Description: pulumi.String("string"),
GroupIntervalSeconds: pulumi.Int(0),
GroupWaitSeconds: pulumi.Int(0),
Labels: pulumi.Map{
"string": pulumi.Any("any"),
},
Name: pulumi.String("string"),
Recipients: rancher2.ProjectAlertGroupRecipientArray{
&rancher2.ProjectAlertGroupRecipientArgs{
NotifierId: pulumi.String("string"),
DefaultRecipient: pulumi.Bool(false),
NotifierType: pulumi.String("string"),
Recipient: pulumi.String("string"),
},
},
RepeatIntervalSeconds: pulumi.Int(0),
})
var projectAlertGroupResource = new ProjectAlertGroup("projectAlertGroupResource", ProjectAlertGroupArgs.builder()
.projectId("string")
.annotations(Map.of("string", "any"))
.description("string")
.groupIntervalSeconds(0)
.groupWaitSeconds(0)
.labels(Map.of("string", "any"))
.name("string")
.recipients(ProjectAlertGroupRecipientArgs.builder()
.notifierId("string")
.defaultRecipient(false)
.notifierType("string")
.recipient("string")
.build())
.repeatIntervalSeconds(0)
.build());
project_alert_group_resource = rancher2.ProjectAlertGroup("projectAlertGroupResource",
project_id="string",
annotations={
"string": "any",
},
description="string",
group_interval_seconds=0,
group_wait_seconds=0,
labels={
"string": "any",
},
name="string",
recipients=[rancher2.ProjectAlertGroupRecipientArgs(
notifier_id="string",
default_recipient=False,
notifier_type="string",
recipient="string",
)],
repeat_interval_seconds=0)
const projectAlertGroupResource = new rancher2.ProjectAlertGroup("projectAlertGroupResource", {
projectId: "string",
annotations: {
string: "any",
},
description: "string",
groupIntervalSeconds: 0,
groupWaitSeconds: 0,
labels: {
string: "any",
},
name: "string",
recipients: [{
notifierId: "string",
defaultRecipient: false,
notifierType: "string",
recipient: "string",
}],
repeatIntervalSeconds: 0,
});
type: rancher2:ProjectAlertGroup
properties:
annotations:
string: any
description: string
groupIntervalSeconds: 0
groupWaitSeconds: 0
labels:
string: any
name: string
projectId: string
recipients:
- defaultRecipient: false
notifierId: string
notifierType: string
recipient: string
repeatIntervalSeconds: 0
ProjectAlertGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts 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> - 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 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,Object>
- The project alert group annotations (map)
- description String
- The project alert group description (string)
- group
Interval IntegerSeconds - The project alert group interval seconds. Default:
180
(int) - group
Wait IntegerSeconds - The project alert group wait seconds. Default:
180
(int) - labels Map<String,Object>
- The project alert group labels (map)
- name String
- The project alert group name (string)
- recipients
List<Project
Alert Group Recipient> - The project alert group recipients (list)
- repeat
Interval IntegerSeconds - 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)
- project
Id String - The project id where create project alert group (string)
- annotations Map<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 Map<Any>
- The project alert group labels (map)
- name String
- The project alert group name (string)
- recipients List<Property Map>
- The project alert group recipients (list)
- repeat
Interval NumberSeconds - 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 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 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)
public static ProjectAlertGroup get(String name, Output<String> id, ProjectAlertGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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> - 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 Args - The project alert group recipients (list)
- Repeat
Interval intSeconds - The project alert group wait seconds. Default:
3600
(int)
- annotations Map<String,Object>
- The project alert group annotations (map)
- description String
- The project alert group description (string)
- group
Interval IntegerSeconds - The project alert group interval seconds. Default:
180
(int) - group
Wait IntegerSeconds - The project alert group wait seconds. Default:
180
(int) - labels Map<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> - The project alert group recipients (list)
- repeat
Interval IntegerSeconds - 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)
- annotations Map<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 Map<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 List<Property Map>
- The project alert group recipients (list)
- repeat
Interval NumberSeconds - The project alert group wait seconds. Default:
3600
(int)
Supporting Types
ProjectAlertGroupRecipient, ProjectAlertGroupRecipientArgs
- Notifier
Id string - Recipient notifier ID
- Default
Recipient bool - Use notifier default recipient
- Notifier
Type string - Recipient notifier type
- Recipient string
- Recipient
- Notifier
Id string - Recipient notifier ID
- Default
Recipient bool - Use notifier default recipient
- Notifier
Type string - Recipient notifier type
- Recipient string
- Recipient
- notifier
Id String - Recipient notifier ID
- default
Recipient Boolean - Use notifier default recipient
- notifier
Type String - Recipient notifier type
- recipient String
- Recipient
- notifier
Id string - Recipient notifier ID
- default
Recipient boolean - Use notifier default recipient
- notifier
Type string - Recipient notifier type
- recipient string
- Recipient
- notifier_
id str - Recipient notifier ID
- default_
recipient bool - Use notifier default recipient
- notifier_
type str - Recipient notifier type
- recipient str
- Recipient
- notifier
Id String - Recipient notifier ID
- default
Recipient Boolean - Use notifier default recipient
- notifier
Type String - Recipient notifier type
- recipient String
- Recipient
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>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Rancher2 pulumi/pulumi-rancher2
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
rancher2
Terraform Provider.