1. Packages
  2. Chronosphere
  3. API Docs
  4. NotificationPolicy
Chronosphere v0.9.2 published on Monday, Sep 9, 2024 by Chronosphere

chronosphere.NotificationPolicy

Explore with Pulumi AI

chronosphere logo
Chronosphere v0.9.2 published on Monday, Sep 9, 2024 by Chronosphere

    Create NotificationPolicy Resource

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

    Constructor syntax

    new NotificationPolicy(name: string, args?: NotificationPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def NotificationPolicy(resource_name: str,
                           args: Optional[NotificationPolicyArgs] = None,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def NotificationPolicy(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           name: Optional[str] = None,
                           notification_policy_data: Optional[str] = None,
                           overrides: Optional[Sequence[NotificationPolicyOverrideArgs]] = None,
                           routes: Optional[Sequence[NotificationPolicyRouteArgs]] = None,
                           slug: Optional[str] = None,
                           team_id: Optional[str] = None)
    func NewNotificationPolicy(ctx *Context, name string, args *NotificationPolicyArgs, opts ...ResourceOption) (*NotificationPolicy, error)
    public NotificationPolicy(string name, NotificationPolicyArgs? args = null, CustomResourceOptions? opts = null)
    public NotificationPolicy(String name, NotificationPolicyArgs args)
    public NotificationPolicy(String name, NotificationPolicyArgs args, CustomResourceOptions options)
    
    type: chronosphere:NotificationPolicy
    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 NotificationPolicyArgs
    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 NotificationPolicyArgs
    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 NotificationPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NotificationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NotificationPolicyArgs
    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 notificationPolicyResource = new Pulumi.NotificationPolicy("notificationPolicyResource", new()
    {
        Name = "string",
        NotificationPolicyData = "string",
        Overrides = new[]
        {
            new Pulumi.Inputs.NotificationPolicyOverrideArgs
            {
                AlertLabelMatchers = new[]
                {
                    new Pulumi.Inputs.NotificationPolicyOverrideAlertLabelMatcherArgs
                    {
                        Name = "string",
                        Type = "string",
                        Value = "string",
                    },
                },
                Routes = new[]
                {
                    new Pulumi.Inputs.NotificationPolicyOverrideRouteArgs
                    {
                        Severity = "string",
                        GroupBy = new Pulumi.Inputs.NotificationPolicyOverrideRouteGroupByArgs
                        {
                            LabelNames = new[]
                            {
                                "string",
                            },
                        },
                        Notifiers = new[]
                        {
                            "string",
                        },
                        RepeatInterval = "string",
                    },
                },
            },
        },
        Routes = new[]
        {
            new Pulumi.Inputs.NotificationPolicyRouteArgs
            {
                Severity = "string",
                GroupBy = new Pulumi.Inputs.NotificationPolicyRouteGroupByArgs
                {
                    LabelNames = new[]
                    {
                        "string",
                    },
                },
                Notifiers = new[]
                {
                    "string",
                },
                RepeatInterval = "string",
            },
        },
        Slug = "string",
        TeamId = "string",
    });
    
    example, err := chronosphere.NewNotificationPolicy(ctx, "notificationPolicyResource", &chronosphere.NotificationPolicyArgs{
    	Name:                   pulumi.String("string"),
    	NotificationPolicyData: pulumi.String("string"),
    	Overrides: chronosphere.NotificationPolicyOverrideArray{
    		&chronosphere.NotificationPolicyOverrideArgs{
    			AlertLabelMatchers: chronosphere.NotificationPolicyOverrideAlertLabelMatcherArray{
    				&chronosphere.NotificationPolicyOverrideAlertLabelMatcherArgs{
    					Name:  pulumi.String("string"),
    					Type:  pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			Routes: chronosphere.NotificationPolicyOverrideRouteArray{
    				&chronosphere.NotificationPolicyOverrideRouteArgs{
    					Severity: pulumi.String("string"),
    					GroupBy: &chronosphere.NotificationPolicyOverrideRouteGroupByArgs{
    						LabelNames: pulumi.StringArray{
    							pulumi.String("string"),
    						},
    					},
    					Notifiers: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					RepeatInterval: pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Routes: chronosphere.NotificationPolicyRouteArray{
    		&chronosphere.NotificationPolicyRouteArgs{
    			Severity: pulumi.String("string"),
    			GroupBy: &chronosphere.NotificationPolicyRouteGroupByArgs{
    				LabelNames: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    			Notifiers: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			RepeatInterval: pulumi.String("string"),
    		},
    	},
    	Slug:   pulumi.String("string"),
    	TeamId: pulumi.String("string"),
    })
    
    var notificationPolicyResource = new NotificationPolicy("notificationPolicyResource", NotificationPolicyArgs.builder()
        .name("string")
        .notificationPolicyData("string")
        .overrides(NotificationPolicyOverrideArgs.builder()
            .alertLabelMatchers(NotificationPolicyOverrideAlertLabelMatcherArgs.builder()
                .name("string")
                .type("string")
                .value("string")
                .build())
            .routes(NotificationPolicyOverrideRouteArgs.builder()
                .severity("string")
                .groupBy(NotificationPolicyOverrideRouteGroupByArgs.builder()
                    .labelNames("string")
                    .build())
                .notifiers("string")
                .repeatInterval("string")
                .build())
            .build())
        .routes(NotificationPolicyRouteArgs.builder()
            .severity("string")
            .groupBy(NotificationPolicyRouteGroupByArgs.builder()
                .labelNames("string")
                .build())
            .notifiers("string")
            .repeatInterval("string")
            .build())
        .slug("string")
        .teamId("string")
        .build());
    
    notification_policy_resource = chronosphere.NotificationPolicy("notificationPolicyResource",
        name="string",
        notification_policy_data="string",
        overrides=[chronosphere.NotificationPolicyOverrideArgs(
            alert_label_matchers=[chronosphere.NotificationPolicyOverrideAlertLabelMatcherArgs(
                name="string",
                type="string",
                value="string",
            )],
            routes=[chronosphere.NotificationPolicyOverrideRouteArgs(
                severity="string",
                group_by=chronosphere.NotificationPolicyOverrideRouteGroupByArgs(
                    label_names=["string"],
                ),
                notifiers=["string"],
                repeat_interval="string",
            )],
        )],
        routes=[chronosphere.NotificationPolicyRouteArgs(
            severity="string",
            group_by=chronosphere.NotificationPolicyRouteGroupByArgs(
                label_names=["string"],
            ),
            notifiers=["string"],
            repeat_interval="string",
        )],
        slug="string",
        team_id="string")
    
    const notificationPolicyResource = new chronosphere.NotificationPolicy("notificationPolicyResource", {
        name: "string",
        notificationPolicyData: "string",
        overrides: [{
            alertLabelMatchers: [{
                name: "string",
                type: "string",
                value: "string",
            }],
            routes: [{
                severity: "string",
                groupBy: {
                    labelNames: ["string"],
                },
                notifiers: ["string"],
                repeatInterval: "string",
            }],
        }],
        routes: [{
            severity: "string",
            groupBy: {
                labelNames: ["string"],
            },
            notifiers: ["string"],
            repeatInterval: "string",
        }],
        slug: "string",
        teamId: "string",
    });
    
    type: chronosphere:NotificationPolicy
    properties:
        name: string
        notificationPolicyData: string
        overrides:
            - alertLabelMatchers:
                - name: string
                  type: string
                  value: string
              routes:
                - groupBy:
                    labelNames:
                        - string
                  notifiers:
                    - string
                  repeatInterval: string
                  severity: string
        routes:
            - groupBy:
                labelNames:
                    - string
              notifiers:
                - string
              repeatInterval: string
              severity: string
        slug: string
        teamId: string
    

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

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NotificationPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    IsIndependent bool
    Id string
    The provider-assigned unique ID for this managed resource.
    IsIndependent bool
    id String
    The provider-assigned unique ID for this managed resource.
    isIndependent Boolean
    id string
    The provider-assigned unique ID for this managed resource.
    isIndependent boolean
    id str
    The provider-assigned unique ID for this managed resource.
    is_independent bool
    id String
    The provider-assigned unique ID for this managed resource.
    isIndependent Boolean

    Look up Existing NotificationPolicy Resource

    Get an existing NotificationPolicy 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?: NotificationPolicyState, opts?: CustomResourceOptions): NotificationPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            is_independent: Optional[bool] = None,
            name: Optional[str] = None,
            notification_policy_data: Optional[str] = None,
            overrides: Optional[Sequence[NotificationPolicyOverrideArgs]] = None,
            routes: Optional[Sequence[NotificationPolicyRouteArgs]] = None,
            slug: Optional[str] = None,
            team_id: Optional[str] = None) -> NotificationPolicy
    func GetNotificationPolicy(ctx *Context, name string, id IDInput, state *NotificationPolicyState, opts ...ResourceOption) (*NotificationPolicy, error)
    public static NotificationPolicy Get(string name, Input<string> id, NotificationPolicyState? state, CustomResourceOptions? opts = null)
    public static NotificationPolicy get(String name, Output<String> id, NotificationPolicyState 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:

    Supporting Types

    NotificationPolicyOverride, NotificationPolicyOverrideArgs

    NotificationPolicyOverrideAlertLabelMatcher, NotificationPolicyOverrideAlertLabelMatcherArgs

    Name string
    Type string
    Value string
    Name string
    Type string
    Value string
    name String
    type String
    value String
    name string
    type string
    value string
    name str
    type str
    value str
    name String
    type String
    value String

    NotificationPolicyOverrideRoute, NotificationPolicyOverrideRouteArgs

    NotificationPolicyOverrideRouteGroupBy, NotificationPolicyOverrideRouteGroupByArgs

    LabelNames List<string>
    LabelNames []string
    labelNames List<String>
    labelNames string[]
    label_names Sequence[str]
    labelNames List<String>

    NotificationPolicyRoute, NotificationPolicyRouteArgs

    NotificationPolicyRouteGroupBy, NotificationPolicyRouteGroupByArgs

    LabelNames List<string>
    LabelNames []string
    labelNames List<String>
    labelNames string[]
    label_names Sequence[str]
    labelNames List<String>

    Package Details

    Repository
    chronosphere chronosphereio/pulumi-chronosphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the chronosphere Terraform Provider.
    chronosphere logo
    Chronosphere v0.9.2 published on Monday, Sep 9, 2024 by Chronosphere