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 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=[{
"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")
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
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
- Notification
Policy stringData - Overrides
[]Notification
Policy Override Args - Routes
[]Notification
Policy Route Args - Slug string
- Team
Id string
- name String
- notification
Policy StringData - overrides
List<Notification
Policy Override> - routes
List<Notification
Policy Route> - slug String
- team
Id String
- name string
- notification
Policy stringData - overrides
Notification
Policy Override[] - routes
Notification
Policy Route[] - slug string
- team
Id string
- name String
- notification
Policy StringData - overrides List<Property Map>
- routes List<Property Map>
- slug String
- team
Id 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.
- Is
Independent bool
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Independent bool
- id String
- The provider-assigned unique ID for this managed resource.
- is
Independent Boolean
- id string
- The provider-assigned unique ID for this managed resource.
- is
Independent 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.
- is
Independent 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.
- Is
Independent bool - Name string
- Notification
Policy stringData - Overrides
[]Notification
Policy Override Args - Routes
[]Notification
Policy Route Args - Slug string
- Team
Id string
- is
Independent Boolean - name String
- notification
Policy StringData - overrides
List<Notification
Policy Override> - routes
List<Notification
Policy Route> - slug String
- team
Id String
- is
Independent boolean - name string
- notification
Policy stringData - overrides
Notification
Policy Override[] - routes
Notification
Policy Route[] - slug string
- team
Id string
- is
Independent Boolean - name String
- notification
Policy StringData - overrides List<Property Map>
- routes List<Property Map>
- slug String
- team
Id String
Supporting Types
NotificationPolicyOverride, NotificationPolicyOverrideArgs
NotificationPolicyOverrideAlertLabelMatcher, NotificationPolicyOverrideAlertLabelMatcherArgs
NotificationPolicyOverrideRoute, NotificationPolicyOverrideRouteArgs
- Severity string
- Group
By Chronosphere.Pulumi. Inputs. Notification Policy Override Route Group By - Notifiers List<string>
- Repeat
Interval string
- Severity string
- Group
By NotificationPolicy Override Route Group By - Notifiers []string
- Repeat
Interval string
- severity String
- group
By NotificationPolicy Override Route Group By - notifiers List<String>
- repeat
Interval String
- severity string
- group
By NotificationPolicy Override Route Group By - notifiers string[]
- repeat
Interval string
- severity str
- group_
by NotificationPolicy Override Route Group By - notifiers Sequence[str]
- repeat_
interval str
- severity String
- group
By Property Map - notifiers List<String>
- repeat
Interval String
NotificationPolicyOverrideRouteGroupBy, NotificationPolicyOverrideRouteGroupByArgs
- Label
Names List<string>
- Label
Names []string
- label
Names List<String>
- label
Names string[]
- label_
names Sequence[str]
- label
Names List<String>
NotificationPolicyRoute, NotificationPolicyRouteArgs
- Severity string
- Group
By Chronosphere.Pulumi. Inputs. Notification Policy Route Group By - Notifiers List<string>
- Repeat
Interval string
- Severity string
- Group
By NotificationPolicy Route Group By - Notifiers []string
- Repeat
Interval string
- severity String
- group
By NotificationPolicy Route Group By - notifiers List<String>
- repeat
Interval String
- severity string
- group
By NotificationPolicy Route Group By - notifiers string[]
- repeat
Interval string
- severity str
- group_
by NotificationPolicy Route Group By - notifiers Sequence[str]
- repeat_
interval str
- severity String
- group
By Property Map - notifiers List<String>
- repeat
Interval String
NotificationPolicyRouteGroupBy, NotificationPolicyRouteGroupByArgs
- Label
Names List<string>
- Label
Names []string
- label
Names List<String>
- label
Names string[]
- label_
names Sequence[str]
- label
Names List<String>
Package Details
- Repository
- chronosphere chronosphereio/pulumi-chronosphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
chronosphere
Terraform Provider.