opentelekomcloud.LtsNotificationTemplateV2
Explore with Pulumi AI
Up-to-date reference of API arguments for LTS log group you can get at documentation portal
Manages an LTS notification template resource within OpenTelekomCloud.
Example Usage
Coming soon!
Coming soon!
Coming soon!
Coming soon!
Coming soon!
resources:
test:
type: opentelekomcloud:LtsNotificationTemplateV2
properties:
description: test
locale: en-us
source: LTS
templates:
- content: |+
Account:${domain_name};
Alarm Rules:<a href="$event.annotations.alarm_rule_url">${event_name}</a>;
Alarm Status:$event.annotations.alarm_status;
Severity:<span style="color: red">${event_severity}</span>;
Occurred:${starts_at};
Type:Keywords;
Condition Expression:$event.annotations.condition_expression;
Current Value:$event.annotations.current_value;
Frequency:$event.annotations.frequency;
Log Group/Stream Name:$event.annotations.results[0].resource_id;
Query Time:$event.annotations.results[0].time;
Query URL:<a href="$event.annotations.results[0].url">details</a>;
subType: sms
Create LtsNotificationTemplateV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new LtsNotificationTemplateV2(name: string, args: LtsNotificationTemplateV2Args, opts?: CustomResourceOptions);
@overload
def LtsNotificationTemplateV2(resource_name: str,
args: LtsNotificationTemplateV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def LtsNotificationTemplateV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
language: Optional[str] = None,
source: Optional[str] = None,
templates: Optional[Sequence[LtsNotificationTemplateV2TemplateArgs]] = None,
description: Optional[str] = None,
lts_notification_template_v2_id: Optional[str] = None,
name: Optional[str] = None)
func NewLtsNotificationTemplateV2(ctx *Context, name string, args LtsNotificationTemplateV2Args, opts ...ResourceOption) (*LtsNotificationTemplateV2, error)
public LtsNotificationTemplateV2(string name, LtsNotificationTemplateV2Args args, CustomResourceOptions? opts = null)
public LtsNotificationTemplateV2(String name, LtsNotificationTemplateV2Args args)
public LtsNotificationTemplateV2(String name, LtsNotificationTemplateV2Args args, CustomResourceOptions options)
type: opentelekomcloud:LtsNotificationTemplateV2
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 LtsNotificationTemplateV2Args
- 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 LtsNotificationTemplateV2Args
- 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 LtsNotificationTemplateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LtsNotificationTemplateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LtsNotificationTemplateV2Args
- 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 ltsNotificationTemplateV2Resource = new Opentelekomcloud.LtsNotificationTemplateV2("ltsNotificationTemplateV2Resource", new()
{
Language = "string",
Source = "string",
Templates = new[]
{
new Opentelekomcloud.Inputs.LtsNotificationTemplateV2TemplateArgs
{
Content = "string",
SubType = "string",
},
},
Description = "string",
LtsNotificationTemplateV2Id = "string",
Name = "string",
});
example, err := opentelekomcloud.NewLtsNotificationTemplateV2(ctx, "ltsNotificationTemplateV2Resource", &opentelekomcloud.LtsNotificationTemplateV2Args{
Language: pulumi.String("string"),
Source: pulumi.String("string"),
Templates: opentelekomcloud.LtsNotificationTemplateV2TemplateArray{
&opentelekomcloud.LtsNotificationTemplateV2TemplateArgs{
Content: pulumi.String("string"),
SubType: pulumi.String("string"),
},
},
Description: pulumi.String("string"),
LtsNotificationTemplateV2Id: pulumi.String("string"),
Name: pulumi.String("string"),
})
var ltsNotificationTemplateV2Resource = new LtsNotificationTemplateV2("ltsNotificationTemplateV2Resource", LtsNotificationTemplateV2Args.builder()
.language("string")
.source("string")
.templates(LtsNotificationTemplateV2TemplateArgs.builder()
.content("string")
.subType("string")
.build())
.description("string")
.ltsNotificationTemplateV2Id("string")
.name("string")
.build());
lts_notification_template_v2_resource = opentelekomcloud.LtsNotificationTemplateV2("ltsNotificationTemplateV2Resource",
language="string",
source="string",
templates=[{
"content": "string",
"sub_type": "string",
}],
description="string",
lts_notification_template_v2_id="string",
name="string")
const ltsNotificationTemplateV2Resource = new opentelekomcloud.LtsNotificationTemplateV2("ltsNotificationTemplateV2Resource", {
language: "string",
source: "string",
templates: [{
content: "string",
subType: "string",
}],
description: "string",
ltsNotificationTemplateV2Id: "string",
name: "string",
});
type: opentelekomcloud:LtsNotificationTemplateV2
properties:
description: string
language: string
ltsNotificationTemplateV2Id: string
name: string
source: string
templates:
- content: string
subType: string
LtsNotificationTemplateV2 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 LtsNotificationTemplateV2 resource accepts the following input properties:
- Language string
- Source string
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - Templates
List<Lts
Notification Template V2Template> - The list of notification template body. The templates structure is documented below.
- Description string
The description of the notification template.
The
templates
block supports:- Lts
Notification stringTemplate V2Id - The resource ID which equals
name
. - Name string
- The name of the notification template. Changing this parameter will create a new resource.
- Language string
- Source string
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - Templates
[]Lts
Notification Template V2Template Args - The list of notification template body. The templates structure is documented below.
- Description string
The description of the notification template.
The
templates
block supports:- Lts
Notification stringTemplate V2Id - The resource ID which equals
name
. - Name string
- The name of the notification template. Changing this parameter will create a new resource.
- language String
- source String
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates
List<Lts
Notification Template V2Template> - The list of notification template body. The templates structure is documented below.
- description String
The description of the notification template.
The
templates
block supports:- lts
Notification StringTemplate V2Id - The resource ID which equals
name
. - name String
- The name of the notification template. Changing this parameter will create a new resource.
- language string
- source string
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates
Lts
Notification Template V2Template[] - The list of notification template body. The templates structure is documented below.
- description string
The description of the notification template.
The
templates
block supports:- lts
Notification stringTemplate V2Id - The resource ID which equals
name
. - name string
- The name of the notification template. Changing this parameter will create a new resource.
- language str
- source str
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates
Sequence[Lts
Notification Template V2Template Args] - The list of notification template body. The templates structure is documented below.
- description str
The description of the notification template.
The
templates
block supports:- lts_
notification_ strtemplate_ v2_ id - The resource ID which equals
name
. - name str
- The name of the notification template. Changing this parameter will create a new resource.
- language String
- source String
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates List<Property Map>
- The list of notification template body. The templates structure is documented below.
- description String
The description of the notification template.
The
templates
block supports:- lts
Notification StringTemplate V2Id - The resource ID which equals
name
. - name String
- The name of the notification template. Changing this parameter will create a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the LtsNotificationTemplateV2 resource produces the following output properties:
Look up Existing LtsNotificationTemplateV2 Resource
Get an existing LtsNotificationTemplateV2 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?: LtsNotificationTemplateV2State, opts?: CustomResourceOptions): LtsNotificationTemplateV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
language: Optional[str] = None,
lts_notification_template_v2_id: Optional[str] = None,
name: Optional[str] = None,
region: Optional[str] = None,
source: Optional[str] = None,
templates: Optional[Sequence[LtsNotificationTemplateV2TemplateArgs]] = None) -> LtsNotificationTemplateV2
func GetLtsNotificationTemplateV2(ctx *Context, name string, id IDInput, state *LtsNotificationTemplateV2State, opts ...ResourceOption) (*LtsNotificationTemplateV2, error)
public static LtsNotificationTemplateV2 Get(string name, Input<string> id, LtsNotificationTemplateV2State? state, CustomResourceOptions? opts = null)
public static LtsNotificationTemplateV2 get(String name, Output<String> id, LtsNotificationTemplateV2State state, CustomResourceOptions options)
resources: _: type: opentelekomcloud:LtsNotificationTemplateV2 get: id: ${id}
- 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.
- Description string
The description of the notification template.
The
templates
block supports:- Language string
- Lts
Notification stringTemplate V2Id - The resource ID which equals
name
. - Name string
- The name of the notification template. Changing this parameter will create a new resource.
- Region string
- Shows the region in the template resource created.
- Source string
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - Templates
List<Lts
Notification Template V2Template> - The list of notification template body. The templates structure is documented below.
- Description string
The description of the notification template.
The
templates
block supports:- Language string
- Lts
Notification stringTemplate V2Id - The resource ID which equals
name
. - Name string
- The name of the notification template. Changing this parameter will create a new resource.
- Region string
- Shows the region in the template resource created.
- Source string
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - Templates
[]Lts
Notification Template V2Template Args - The list of notification template body. The templates structure is documented below.
- description String
The description of the notification template.
The
templates
block supports:- language String
- lts
Notification StringTemplate V2Id - The resource ID which equals
name
. - name String
- The name of the notification template. Changing this parameter will create a new resource.
- region String
- Shows the region in the template resource created.
- source String
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates
List<Lts
Notification Template V2Template> - The list of notification template body. The templates structure is documented below.
- description string
The description of the notification template.
The
templates
block supports:- language string
- lts
Notification stringTemplate V2Id - The resource ID which equals
name
. - name string
- The name of the notification template. Changing this parameter will create a new resource.
- region string
- Shows the region in the template resource created.
- source string
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates
Lts
Notification Template V2Template[] - The list of notification template body. The templates structure is documented below.
- description str
The description of the notification template.
The
templates
block supports:- language str
- lts_
notification_ strtemplate_ v2_ id - The resource ID which equals
name
. - name str
- The name of the notification template. Changing this parameter will create a new resource.
- region str
- Shows the region in the template resource created.
- source str
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates
Sequence[Lts
Notification Template V2Template Args] - The list of notification template body. The templates structure is documented below.
- description String
The description of the notification template.
The
templates
block supports:- language String
- lts
Notification StringTemplate V2Id - The resource ID which equals
name
. - name String
- The name of the notification template. Changing this parameter will create a new resource.
- region String
- Shows the region in the template resource created.
- source String
- The source of the notification template.
Currently, this parameter is mandatory to
LTS
. - templates List<Property Map>
- The list of notification template body. The templates structure is documented below.
Supporting Types
LtsNotificationTemplateV2Template, LtsNotificationTemplateV2TemplateArgs
- Content string
The content of the sub-template. In the sub-template body, only the following variables are supported for the variables following the
$
symbol. The supported variables vary according to the alarm type (keyword alarm and SQL alarm).- Common variables:
- Alarm severity: ${event_severity}.
- Occurrence time: ${starts_at}.
- Alarm source: $event.metadata.resource_provider.
- Resource type: $event.metadata.resource_type.
- Resource ID: ${resources}.
- Expression: $event.annotations.condition_expression.
- current value: $event.annotations.current_value.
- Statistical period: $event.annotations.frequency.
- Keywords alarm specific variable:
- query time: $event.annotations.results[0].time.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
- SQL alarm specific variable:
- LTS group/stream name: $event.annotations.results[0].resource_id.
- Query statement: $event.annotations.results[0].sql.
- Query time: $event.annotations.results[0].time.
- Query URL: $event.annotations.results[0].url.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
semicolon(;) after variable must be added. Otherwise, the template will fail to be replaced.
- Sub
Type string - The type of the sub-template.
Only the following five types are supported:
sms
,email
.
- Content string
The content of the sub-template. In the sub-template body, only the following variables are supported for the variables following the
$
symbol. The supported variables vary according to the alarm type (keyword alarm and SQL alarm).- Common variables:
- Alarm severity: ${event_severity}.
- Occurrence time: ${starts_at}.
- Alarm source: $event.metadata.resource_provider.
- Resource type: $event.metadata.resource_type.
- Resource ID: ${resources}.
- Expression: $event.annotations.condition_expression.
- current value: $event.annotations.current_value.
- Statistical period: $event.annotations.frequency.
- Keywords alarm specific variable:
- query time: $event.annotations.results[0].time.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
- SQL alarm specific variable:
- LTS group/stream name: $event.annotations.results[0].resource_id.
- Query statement: $event.annotations.results[0].sql.
- Query time: $event.annotations.results[0].time.
- Query URL: $event.annotations.results[0].url.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
semicolon(;) after variable must be added. Otherwise, the template will fail to be replaced.
- Sub
Type string - The type of the sub-template.
Only the following five types are supported:
sms
,email
.
- content String
The content of the sub-template. In the sub-template body, only the following variables are supported for the variables following the
$
symbol. The supported variables vary according to the alarm type (keyword alarm and SQL alarm).- Common variables:
- Alarm severity: ${event_severity}.
- Occurrence time: ${starts_at}.
- Alarm source: $event.metadata.resource_provider.
- Resource type: $event.metadata.resource_type.
- Resource ID: ${resources}.
- Expression: $event.annotations.condition_expression.
- current value: $event.annotations.current_value.
- Statistical period: $event.annotations.frequency.
- Keywords alarm specific variable:
- query time: $event.annotations.results[0].time.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
- SQL alarm specific variable:
- LTS group/stream name: $event.annotations.results[0].resource_id.
- Query statement: $event.annotations.results[0].sql.
- Query time: $event.annotations.results[0].time.
- Query URL: $event.annotations.results[0].url.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
semicolon(;) after variable must be added. Otherwise, the template will fail to be replaced.
- sub
Type String - The type of the sub-template.
Only the following five types are supported:
sms
,email
.
- content string
The content of the sub-template. In the sub-template body, only the following variables are supported for the variables following the
$
symbol. The supported variables vary according to the alarm type (keyword alarm and SQL alarm).- Common variables:
- Alarm severity: ${event_severity}.
- Occurrence time: ${starts_at}.
- Alarm source: $event.metadata.resource_provider.
- Resource type: $event.metadata.resource_type.
- Resource ID: ${resources}.
- Expression: $event.annotations.condition_expression.
- current value: $event.annotations.current_value.
- Statistical period: $event.annotations.frequency.
- Keywords alarm specific variable:
- query time: $event.annotations.results[0].time.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
- SQL alarm specific variable:
- LTS group/stream name: $event.annotations.results[0].resource_id.
- Query statement: $event.annotations.results[0].sql.
- Query time: $event.annotations.results[0].time.
- Query URL: $event.annotations.results[0].url.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
semicolon(;) after variable must be added. Otherwise, the template will fail to be replaced.
- sub
Type string - The type of the sub-template.
Only the following five types are supported:
sms
,email
.
- content str
The content of the sub-template. In the sub-template body, only the following variables are supported for the variables following the
$
symbol. The supported variables vary according to the alarm type (keyword alarm and SQL alarm).- Common variables:
- Alarm severity: ${event_severity}.
- Occurrence time: ${starts_at}.
- Alarm source: $event.metadata.resource_provider.
- Resource type: $event.metadata.resource_type.
- Resource ID: ${resources}.
- Expression: $event.annotations.condition_expression.
- current value: $event.annotations.current_value.
- Statistical period: $event.annotations.frequency.
- Keywords alarm specific variable:
- query time: $event.annotations.results[0].time.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
- SQL alarm specific variable:
- LTS group/stream name: $event.annotations.results[0].resource_id.
- Query statement: $event.annotations.results[0].sql.
- Query time: $event.annotations.results[0].time.
- Query URL: $event.annotations.results[0].url.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
semicolon(;) after variable must be added. Otherwise, the template will fail to be replaced.
- sub_
type str - The type of the sub-template.
Only the following five types are supported:
sms
,email
.
- content String
The content of the sub-template. In the sub-template body, only the following variables are supported for the variables following the
$
symbol. The supported variables vary according to the alarm type (keyword alarm and SQL alarm).- Common variables:
- Alarm severity: ${event_severity}.
- Occurrence time: ${starts_at}.
- Alarm source: $event.metadata.resource_provider.
- Resource type: $event.metadata.resource_type.
- Resource ID: ${resources}.
- Expression: $event.annotations.condition_expression.
- current value: $event.annotations.current_value.
- Statistical period: $event.annotations.frequency.
- Keywords alarm specific variable:
- query time: $event.annotations.results[0].time.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
- SQL alarm specific variable:
- LTS group/stream name: $event.annotations.results[0].resource_id.
- Query statement: $event.annotations.results[0].sql.
- Query time: $event.annotations.results[0].time.
- Query URL: $event.annotations.results[0].url.
- Run the $event.annotations.results[0].raw_results command to query LTSs.
semicolon(;) after variable must be added. Otherwise, the template will fail to be replaced.
- sub
Type String - The type of the sub-template.
Only the following five types are supported:
sms
,email
.
Import
The LTS notification template can be imported using the id
which equals name
, e.g.
bash
$ pulumi import opentelekomcloud:index/ltsNotificationTemplateV2:LtsNotificationTemplateV2 test <id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
- License
- Notes
- This Pulumi package is based on the
opentelekomcloud
Terraform Provider.