1. Packages
  2. Chronosphere
  3. API Docs
  4. NotificationPolicy
Chronosphere v0.9.8 published on Thursday, Apr 3, 2025 by Chronosphere

chronosphere.NotificationPolicy

Explore with Pulumi AI

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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
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());
Copy
notification_policy_resource = chronosphere.NotificationPolicy("notificationPolicyResource",
    name="string",
    notification_policy_data="string",
    overrides=[{
        "alert_label_matchers": [{
            "name": "string",
            "type": "string",
            "value": "string",
        }],
        "routes": [{
            "severity": "string",
            "group_by": {
                "label_names": ["string"],
            },
            "notifiers": ["string"],
            "repeat_interval": "string",
        }],
    }],
    routes=[{
        "severity": "string",
        "group_by": {
            "label_names": ["string"],
        },
        "notifiers": ["string"],
        "repeat_interval": "string",
    }],
    slug="string",
    team_id="string")
Copy
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",
});
Copy
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
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The NotificationPolicy resource accepts the following input properties:

Name string
NotificationPolicyData string
Overrides []NotificationPolicyOverrideArgs
Routes []NotificationPolicyRouteArgs
Slug Changes to this property will trigger replacement. string
TeamId string
name String
notificationPolicyData String
overrides List<NotificationPolicyOverride>
routes List<NotificationPolicyRoute>
slug Changes to this property will trigger replacement. String
teamId String
name string
notificationPolicyData string
overrides NotificationPolicyOverride[]
routes NotificationPolicyRoute[]
slug Changes to this property will trigger replacement. string
teamId string
name String
notificationPolicyData String
overrides List<Property Map>
routes List<Property Map>
slug Changes to this property will trigger replacement. String
teamId String

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)
resources:  _:    type: chronosphere:NotificationPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
IsIndependent Changes to this property will trigger replacement. bool
Name string
NotificationPolicyData string
Overrides List<Chronosphere.Pulumi.Inputs.NotificationPolicyOverride>
Routes List<Chronosphere.Pulumi.Inputs.NotificationPolicyRoute>
Slug Changes to this property will trigger replacement. string
TeamId string
IsIndependent Changes to this property will trigger replacement. bool
Name string
NotificationPolicyData string
Overrides []NotificationPolicyOverrideArgs
Routes []NotificationPolicyRouteArgs
Slug Changes to this property will trigger replacement. string
TeamId string
isIndependent Changes to this property will trigger replacement. Boolean
name String
notificationPolicyData String
overrides List<NotificationPolicyOverride>
routes List<NotificationPolicyRoute>
slug Changes to this property will trigger replacement. String
teamId String
isIndependent Changes to this property will trigger replacement. boolean
name string
notificationPolicyData string
overrides NotificationPolicyOverride[]
routes NotificationPolicyRoute[]
slug Changes to this property will trigger replacement. string
teamId string
is_independent Changes to this property will trigger replacement. bool
name str
notification_policy_data str
overrides Sequence[NotificationPolicyOverrideArgs]
routes Sequence[NotificationPolicyRouteArgs]
slug Changes to this property will trigger replacement. str
team_id str
isIndependent Changes to this property will trigger replacement. Boolean
name String
notificationPolicyData String
overrides List<Property Map>
routes List<Property Map>
slug Changes to this property will trigger replacement. String
teamId String

Supporting Types

NotificationPolicyOverride
, NotificationPolicyOverrideArgs

NotificationPolicyOverrideAlertLabelMatcher
, NotificationPolicyOverrideAlertLabelMatcherArgs

Name This property is required. string
Type This property is required. string
Value This property is required. string
Name This property is required. string
Type This property is required. string
Value This property is required. string
name This property is required. String
type This property is required. String
value This property is required. String
name This property is required. string
type This property is required. string
value This property is required. string
name This property is required. str
type This property is required. str
value This property is required. str
name This property is required. String
type This property is required. String
value This property is required. String

NotificationPolicyOverrideRoute
, NotificationPolicyOverrideRouteArgs

Severity This property is required. string
GroupBy NotificationPolicyOverrideRouteGroupBy
Notifiers []string
RepeatInterval string
severity This property is required. String
groupBy NotificationPolicyOverrideRouteGroupBy
notifiers List<String>
repeatInterval String
severity This property is required. string
groupBy NotificationPolicyOverrideRouteGroupBy
notifiers string[]
repeatInterval string
severity This property is required. String
groupBy Property Map
notifiers List<String>
repeatInterval String

NotificationPolicyOverrideRouteGroupBy
, NotificationPolicyOverrideRouteGroupByArgs

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

NotificationPolicyRoute
, NotificationPolicyRouteArgs

Severity This property is required. string
GroupBy NotificationPolicyRouteGroupBy
Notifiers []string
RepeatInterval string
severity This property is required. String
groupBy NotificationPolicyRouteGroupBy
notifiers List<String>
repeatInterval String
severity This property is required. string
groupBy NotificationPolicyRouteGroupBy
notifiers string[]
repeatInterval string
severity This property is required. str
group_by NotificationPolicyRouteGroupBy
notifiers Sequence[str]
repeat_interval str
severity This property is required. String
groupBy Property Map
notifiers List<String>
repeatInterval String

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.