1. Packages
  2. Rancher2
  3. API Docs
  4. ClusterAlertGroup
Rancher 2 v6.1.1 published on Friday, May 10, 2024 by Pulumi

rancher2.ClusterAlertGroup

Explore with Pulumi AI

rancher2 logo
Rancher 2 v6.1.1 published on Friday, May 10, 2024 by Pulumi

    Provides a Rancher v2 Cluster Alert Group resource. This can be used to create Cluster 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 Cluster Alert Group
    const foo = new rancher2.ClusterAlertGroup("foo", {
        clusterId: "<cluster_id>",
        name: "foo",
        description: "Terraform cluster alert group",
        groupIntervalSeconds: 300,
        repeatIntervalSeconds: 3600,
    });
    
    import pulumi
    import pulumi_rancher2 as rancher2
    
    # Create a new Rancher2 Cluster Alert Group
    foo = rancher2.ClusterAlertGroup("foo",
        cluster_id="<cluster_id>",
        name="foo",
        description="Terraform cluster alert group",
        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 Cluster Alert Group
    		_, err := rancher2.NewClusterAlertGroup(ctx, "foo", &rancher2.ClusterAlertGroupArgs{
    			ClusterId:             pulumi.String("<cluster_id>"),
    			Name:                  pulumi.String("foo"),
    			Description:           pulumi.String("Terraform cluster alert group"),
    			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 Cluster Alert Group
        var foo = new Rancher2.ClusterAlertGroup("foo", new()
        {
            ClusterId = "<cluster_id>",
            Name = "foo",
            Description = "Terraform cluster alert group",
            GroupIntervalSeconds = 300,
            RepeatIntervalSeconds = 3600,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.rancher2.ClusterAlertGroup;
    import com.pulumi.rancher2.ClusterAlertGroupArgs;
    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 Cluster Alert Group
            var foo = new ClusterAlertGroup("foo", ClusterAlertGroupArgs.builder()        
                .clusterId("<cluster_id>")
                .name("foo")
                .description("Terraform cluster alert group")
                .groupIntervalSeconds(300)
                .repeatIntervalSeconds(3600)
                .build());
    
        }
    }
    
    resources:
      # Create a new Rancher2 Cluster Alert Group
      foo:
        type: rancher2:ClusterAlertGroup
        properties:
          clusterId: <cluster_id>
          name: foo
          description: Terraform cluster alert group
          groupIntervalSeconds: 300
          repeatIntervalSeconds: 3600
    

    Create ClusterAlertGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ClusterAlertGroup(name: string, args: ClusterAlertGroupArgs, opts?: CustomResourceOptions);
    @overload
    def ClusterAlertGroup(resource_name: str,
                          args: ClusterAlertGroupArgs,
                          opts: Optional[ResourceOptions] = None)
    
    @overload
    def ClusterAlertGroup(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          cluster_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[ClusterAlertGroupRecipientArgs]] = None,
                          repeat_interval_seconds: Optional[int] = None)
    func NewClusterAlertGroup(ctx *Context, name string, args ClusterAlertGroupArgs, opts ...ResourceOption) (*ClusterAlertGroup, error)
    public ClusterAlertGroup(string name, ClusterAlertGroupArgs args, CustomResourceOptions? opts = null)
    public ClusterAlertGroup(String name, ClusterAlertGroupArgs args)
    public ClusterAlertGroup(String name, ClusterAlertGroupArgs args, CustomResourceOptions options)
    
    type: rancher2:ClusterAlertGroup
    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 ClusterAlertGroupArgs
    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 ClusterAlertGroupArgs
    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 ClusterAlertGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ClusterAlertGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ClusterAlertGroupArgs
    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 clusterAlertGroupResource = new Rancher2.ClusterAlertGroup("clusterAlertGroupResource", new()
    {
        ClusterId = "string",
        Annotations = 
        {
            { "string", "any" },
        },
        Description = "string",
        GroupIntervalSeconds = 0,
        GroupWaitSeconds = 0,
        Labels = 
        {
            { "string", "any" },
        },
        Name = "string",
        Recipients = new[]
        {
            new Rancher2.Inputs.ClusterAlertGroupRecipientArgs
            {
                NotifierId = "string",
                DefaultRecipient = false,
                NotifierType = "string",
                Recipient = "string",
            },
        },
        RepeatIntervalSeconds = 0,
    });
    
    example, err := rancher2.NewClusterAlertGroup(ctx, "clusterAlertGroupResource", &rancher2.ClusterAlertGroupArgs{
    	ClusterId: 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.ClusterAlertGroupRecipientArray{
    		&rancher2.ClusterAlertGroupRecipientArgs{
    			NotifierId:       pulumi.String("string"),
    			DefaultRecipient: pulumi.Bool(false),
    			NotifierType:     pulumi.String("string"),
    			Recipient:        pulumi.String("string"),
    		},
    	},
    	RepeatIntervalSeconds: pulumi.Int(0),
    })
    
    var clusterAlertGroupResource = new ClusterAlertGroup("clusterAlertGroupResource", ClusterAlertGroupArgs.builder()
        .clusterId("string")
        .annotations(Map.of("string", "any"))
        .description("string")
        .groupIntervalSeconds(0)
        .groupWaitSeconds(0)
        .labels(Map.of("string", "any"))
        .name("string")
        .recipients(ClusterAlertGroupRecipientArgs.builder()
            .notifierId("string")
            .defaultRecipient(false)
            .notifierType("string")
            .recipient("string")
            .build())
        .repeatIntervalSeconds(0)
        .build());
    
    cluster_alert_group_resource = rancher2.ClusterAlertGroup("clusterAlertGroupResource",
        cluster_id="string",
        annotations={
            "string": "any",
        },
        description="string",
        group_interval_seconds=0,
        group_wait_seconds=0,
        labels={
            "string": "any",
        },
        name="string",
        recipients=[rancher2.ClusterAlertGroupRecipientArgs(
            notifier_id="string",
            default_recipient=False,
            notifier_type="string",
            recipient="string",
        )],
        repeat_interval_seconds=0)
    
    const clusterAlertGroupResource = new rancher2.ClusterAlertGroup("clusterAlertGroupResource", {
        clusterId: "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:ClusterAlertGroup
    properties:
        annotations:
            string: any
        clusterId: string
        description: string
        groupIntervalSeconds: 0
        groupWaitSeconds: 0
        labels:
            string: any
        name: string
        recipients:
            - defaultRecipient: false
              notifierId: string
              notifierType: string
              recipient: string
        repeatIntervalSeconds: 0
    

    ClusterAlertGroup 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 ClusterAlertGroup resource accepts the following input properties:

    ClusterId string
    The cluster id where create cluster alert group (string)
    Annotations Dictionary<string, object>
    The cluster alert group annotations (map)
    Description string
    The cluster alert group description (string)
    GroupIntervalSeconds int
    The cluster alert group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert group wait seconds. Default: 180 (int)
    Labels Dictionary<string, object>
    The cluster alert group labels (map)
    Name string
    The cluster alert group name (string)
    Recipients List<ClusterAlertGroupRecipient>
    The cluster alert group recipients (list)
    RepeatIntervalSeconds int
    The cluster alert group wait seconds. Default: 3600 (int)
    ClusterId string
    The cluster id where create cluster alert group (string)
    Annotations map[string]interface{}
    The cluster alert group annotations (map)
    Description string
    The cluster alert group description (string)
    GroupIntervalSeconds int
    The cluster alert group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert group wait seconds. Default: 180 (int)
    Labels map[string]interface{}
    The cluster alert group labels (map)
    Name string
    The cluster alert group name (string)
    Recipients []ClusterAlertGroupRecipientArgs
    The cluster alert group recipients (list)
    RepeatIntervalSeconds int
    The cluster alert group wait seconds. Default: 3600 (int)
    clusterId String
    The cluster id where create cluster alert group (string)
    annotations Map<String,Object>
    The cluster alert group annotations (map)
    description String
    The cluster alert group description (string)
    groupIntervalSeconds Integer
    The cluster alert group interval seconds. Default: 180 (int)
    groupWaitSeconds Integer
    The cluster alert group wait seconds. Default: 180 (int)
    labels Map<String,Object>
    The cluster alert group labels (map)
    name String
    The cluster alert group name (string)
    recipients List<ClusterAlertGroupRecipient>
    The cluster alert group recipients (list)
    repeatIntervalSeconds Integer
    The cluster alert group wait seconds. Default: 3600 (int)
    clusterId string
    The cluster id where create cluster alert group (string)
    annotations {[key: string]: any}
    The cluster alert group annotations (map)
    description string
    The cluster alert group description (string)
    groupIntervalSeconds number
    The cluster alert group interval seconds. Default: 180 (int)
    groupWaitSeconds number
    The cluster alert group wait seconds. Default: 180 (int)
    labels {[key: string]: any}
    The cluster alert group labels (map)
    name string
    The cluster alert group name (string)
    recipients ClusterAlertGroupRecipient[]
    The cluster alert group recipients (list)
    repeatIntervalSeconds number
    The cluster alert group wait seconds. Default: 3600 (int)
    cluster_id str
    The cluster id where create cluster alert group (string)
    annotations Mapping[str, Any]
    The cluster alert group annotations (map)
    description str
    The cluster alert group description (string)
    group_interval_seconds int
    The cluster alert group interval seconds. Default: 180 (int)
    group_wait_seconds int
    The cluster alert group wait seconds. Default: 180 (int)
    labels Mapping[str, Any]
    The cluster alert group labels (map)
    name str
    The cluster alert group name (string)
    recipients Sequence[ClusterAlertGroupRecipientArgs]
    The cluster alert group recipients (list)
    repeat_interval_seconds int
    The cluster alert group wait seconds. Default: 3600 (int)
    clusterId String
    The cluster id where create cluster alert group (string)
    annotations Map<Any>
    The cluster alert group annotations (map)
    description String
    The cluster alert group description (string)
    groupIntervalSeconds Number
    The cluster alert group interval seconds. Default: 180 (int)
    groupWaitSeconds Number
    The cluster alert group wait seconds. Default: 180 (int)
    labels Map<Any>
    The cluster alert group labels (map)
    name String
    The cluster alert group name (string)
    recipients List<Property Map>
    The cluster alert group recipients (list)
    repeatIntervalSeconds Number
    The cluster alert group wait seconds. Default: 3600 (int)

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ClusterAlertGroup 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 ClusterAlertGroup Resource

    Get an existing ClusterAlertGroup 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?: ClusterAlertGroupState, opts?: CustomResourceOptions): ClusterAlertGroup
    @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,
            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[ClusterAlertGroupRecipientArgs]] = None,
            repeat_interval_seconds: Optional[int] = None) -> ClusterAlertGroup
    func GetClusterAlertGroup(ctx *Context, name string, id IDInput, state *ClusterAlertGroupState, opts ...ResourceOption) (*ClusterAlertGroup, error)
    public static ClusterAlertGroup Get(string name, Input<string> id, ClusterAlertGroupState? state, CustomResourceOptions? opts = null)
    public static ClusterAlertGroup get(String name, Output<String> id, ClusterAlertGroupState 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.
    The following state arguments are supported:
    Annotations Dictionary<string, object>
    The cluster alert group annotations (map)
    ClusterId string
    The cluster id where create cluster alert group (string)
    Description string
    The cluster alert group description (string)
    GroupIntervalSeconds int
    The cluster alert group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert group wait seconds. Default: 180 (int)
    Labels Dictionary<string, object>
    The cluster alert group labels (map)
    Name string
    The cluster alert group name (string)
    Recipients List<ClusterAlertGroupRecipient>
    The cluster alert group recipients (list)
    RepeatIntervalSeconds int
    The cluster alert group wait seconds. Default: 3600 (int)
    Annotations map[string]interface{}
    The cluster alert group annotations (map)
    ClusterId string
    The cluster id where create cluster alert group (string)
    Description string
    The cluster alert group description (string)
    GroupIntervalSeconds int
    The cluster alert group interval seconds. Default: 180 (int)
    GroupWaitSeconds int
    The cluster alert group wait seconds. Default: 180 (int)
    Labels map[string]interface{}
    The cluster alert group labels (map)
    Name string
    The cluster alert group name (string)
    Recipients []ClusterAlertGroupRecipientArgs
    The cluster alert group recipients (list)
    RepeatIntervalSeconds int
    The cluster alert group wait seconds. Default: 3600 (int)
    annotations Map<String,Object>
    The cluster alert group annotations (map)
    clusterId String
    The cluster id where create cluster alert group (string)
    description String
    The cluster alert group description (string)
    groupIntervalSeconds Integer
    The cluster alert group interval seconds. Default: 180 (int)
    groupWaitSeconds Integer
    The cluster alert group wait seconds. Default: 180 (int)
    labels Map<String,Object>
    The cluster alert group labels (map)
    name String
    The cluster alert group name (string)
    recipients List<ClusterAlertGroupRecipient>
    The cluster alert group recipients (list)
    repeatIntervalSeconds Integer
    The cluster alert group wait seconds. Default: 3600 (int)
    annotations {[key: string]: any}
    The cluster alert group annotations (map)
    clusterId string
    The cluster id where create cluster alert group (string)
    description string
    The cluster alert group description (string)
    groupIntervalSeconds number
    The cluster alert group interval seconds. Default: 180 (int)
    groupWaitSeconds number
    The cluster alert group wait seconds. Default: 180 (int)
    labels {[key: string]: any}
    The cluster alert group labels (map)
    name string
    The cluster alert group name (string)
    recipients ClusterAlertGroupRecipient[]
    The cluster alert group recipients (list)
    repeatIntervalSeconds number
    The cluster alert group wait seconds. Default: 3600 (int)
    annotations Mapping[str, Any]
    The cluster alert group annotations (map)
    cluster_id str
    The cluster id where create cluster alert group (string)
    description str
    The cluster alert group description (string)
    group_interval_seconds int
    The cluster alert group interval seconds. Default: 180 (int)
    group_wait_seconds int
    The cluster alert group wait seconds. Default: 180 (int)
    labels Mapping[str, Any]
    The cluster alert group labels (map)
    name str
    The cluster alert group name (string)
    recipients Sequence[ClusterAlertGroupRecipientArgs]
    The cluster alert group recipients (list)
    repeat_interval_seconds int
    The cluster alert group wait seconds. Default: 3600 (int)
    annotations Map<Any>
    The cluster alert group annotations (map)
    clusterId String
    The cluster id where create cluster alert group (string)
    description String
    The cluster alert group description (string)
    groupIntervalSeconds Number
    The cluster alert group interval seconds. Default: 180 (int)
    groupWaitSeconds Number
    The cluster alert group wait seconds. Default: 180 (int)
    labels Map<Any>
    The cluster alert group labels (map)
    name String
    The cluster alert group name (string)
    recipients List<Property Map>
    The cluster alert group recipients (list)
    repeatIntervalSeconds Number
    The cluster alert group wait seconds. Default: 3600 (int)

    Supporting Types

    ClusterAlertGroupRecipient, ClusterAlertGroupRecipientArgs

    NotifierId string
    Recipient notifier ID
    DefaultRecipient bool
    Use notifier default recipient
    NotifierType string
    Recipient notifier type
    Recipient string
    Recipient
    NotifierId string
    Recipient notifier ID
    DefaultRecipient bool
    Use notifier default recipient
    NotifierType string
    Recipient notifier type
    Recipient string
    Recipient
    notifierId String
    Recipient notifier ID
    defaultRecipient Boolean
    Use notifier default recipient
    notifierType String
    Recipient notifier type
    recipient String
    Recipient
    notifierId string
    Recipient notifier ID
    defaultRecipient boolean
    Use notifier default recipient
    notifierType 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
    notifierId String
    Recipient notifier ID
    defaultRecipient Boolean
    Use notifier default recipient
    notifierType String
    Recipient notifier type
    recipient String
    Recipient

    Import

    Cluster Alert Group can be imported using the Rancher cluster alert group ID

    $ pulumi import rancher2:index/clusterAlertGroup:ClusterAlertGroup foo &lt;CLUSTER_ALERT_GROUP_ID&gt;
    

    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.
    rancher2 logo
    Rancher 2 v6.1.1 published on Friday, May 10, 2024 by Pulumi