alicloud.dataworks.DiAlarmRule
Explore with Pulumi AI
Provides a Data Works Di Alarm Rule resource.
Data Integration alarm rules.
For information about Data Works Di Alarm Rule and how to use it, see What is Di Alarm Rule.
NOTE: Available since v1.241.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaulteNv8bu = new alicloud.dataworks.Project("defaulteNv8bu", {
projectName: name,
displayName: name,
description: name,
});
const defaultUW8inp = new alicloud.dataworks.DiJob("defaultUW8inp", {
description: "xxxx",
projectId: defaulteNv8bu.id,
jobName: "xxx",
migrationType: "api_xxx",
sourceDataSourceType: "xxx",
resourceSettings: {
offlineResourceSettings: {
requestedCu: 2,
resourceGroupIdentifier: "xx",
},
realtimeResourceSettings: {
requestedCu: 2,
resourceGroupIdentifier: "xx",
},
scheduleResourceSettings: {
requestedCu: 2,
resourceGroupIdentifier: "xx",
},
},
jobSettings: {
channelSettings: "xxxx",
columnDataTypeSettings: [{
destinationDataType: "xxxx",
sourceDataType: "xxxx",
}],
cycleScheduleSettings: {
cycleMigrationType: "xxxx",
scheduleParameters: "xxxx",
},
},
sourceDataSourceSettings: [{
dataSourceName: "xxxx",
dataSourceProperties: {
encoding: "xxxx",
timezone: "xxxx",
},
}],
destinationDataSourceType: "xxxx",
tableMappings: [{
sourceObjectSelectionRules: [
{
action: "Include",
expression: "xxxx",
expressionType: "Exact",
objectType: "xxxx",
},
{
action: "Include",
expression: "xxxx",
expressionType: "Exact",
objectType: "xxxx",
},
],
transformationRules: [{
ruleName: "xxxx",
ruleActionType: "xxxx",
ruleTargetType: "xxxx",
}],
}],
transformationRules: [{
ruleActionType: "xxxx",
ruleExpression: "xxxx",
ruleName: "xxxx",
ruleTargetType: "xxxx",
}],
destinationDataSourceSettings: [{
dataSourceName: "xxx",
}],
});
const _default = new alicloud.dataworks.DiAlarmRule("default", {
description: "Description",
triggerConditions: [{
ddlReportTags: ["ALTERADDCOLUMN"],
threshold: 20,
duration: 10,
severity: "Warning",
}],
metricType: "DdlReport",
notificationSettings: {
notificationChannels: [{
severity: "Warning",
channels: ["Ding"],
}],
notificationReceivers: [{
receiverType: "DingToken",
receiverValues: ["1107550004253538"],
}],
inhibitionInterval: 10,
},
diJobId: defaultUW8inp.diJobId,
diAlarmRuleName: name,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
defaulte_nv8bu = alicloud.dataworks.Project("defaulteNv8bu",
project_name=name,
display_name=name,
description=name)
default_uw8inp = alicloud.dataworks.DiJob("defaultUW8inp",
description="xxxx",
project_id=defaulte_nv8bu.id,
job_name="xxx",
migration_type="api_xxx",
source_data_source_type="xxx",
resource_settings={
"offline_resource_settings": {
"requested_cu": 2,
"resource_group_identifier": "xx",
},
"realtime_resource_settings": {
"requested_cu": 2,
"resource_group_identifier": "xx",
},
"schedule_resource_settings": {
"requested_cu": 2,
"resource_group_identifier": "xx",
},
},
job_settings={
"channel_settings": "xxxx",
"column_data_type_settings": [{
"destination_data_type": "xxxx",
"source_data_type": "xxxx",
}],
"cycle_schedule_settings": {
"cycle_migration_type": "xxxx",
"schedule_parameters": "xxxx",
},
},
source_data_source_settings=[{
"data_source_name": "xxxx",
"data_source_properties": {
"encoding": "xxxx",
"timezone": "xxxx",
},
}],
destination_data_source_type="xxxx",
table_mappings=[{
"source_object_selection_rules": [
{
"action": "Include",
"expression": "xxxx",
"expression_type": "Exact",
"object_type": "xxxx",
},
{
"action": "Include",
"expression": "xxxx",
"expression_type": "Exact",
"object_type": "xxxx",
},
],
"transformation_rules": [{
"rule_name": "xxxx",
"rule_action_type": "xxxx",
"rule_target_type": "xxxx",
}],
}],
transformation_rules=[{
"rule_action_type": "xxxx",
"rule_expression": "xxxx",
"rule_name": "xxxx",
"rule_target_type": "xxxx",
}],
destination_data_source_settings=[{
"data_source_name": "xxx",
}])
default = alicloud.dataworks.DiAlarmRule("default",
description="Description",
trigger_conditions=[{
"ddl_report_tags": ["ALTERADDCOLUMN"],
"threshold": 20,
"duration": 10,
"severity": "Warning",
}],
metric_type="DdlReport",
notification_settings={
"notification_channels": [{
"severity": "Warning",
"channels": ["Ding"],
}],
"notification_receivers": [{
"receiver_type": "DingToken",
"receiver_values": ["1107550004253538"],
}],
"inhibition_interval": 10,
},
di_job_id=default_uw8inp.di_job_id,
di_alarm_rule_name=name)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dataworks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaulteNv8bu, err := dataworks.NewProject(ctx, "defaulteNv8bu", &dataworks.ProjectArgs{
ProjectName: pulumi.String(name),
DisplayName: pulumi.String(name),
Description: pulumi.String(name),
})
if err != nil {
return err
}
defaultUW8inp, err := dataworks.NewDiJob(ctx, "defaultUW8inp", &dataworks.DiJobArgs{
Description: pulumi.String("xxxx"),
ProjectId: defaulteNv8bu.ID(),
JobName: pulumi.String("xxx"),
MigrationType: pulumi.String("api_xxx"),
SourceDataSourceType: pulumi.String("xxx"),
ResourceSettings: &dataworks.DiJobResourceSettingsArgs{
OfflineResourceSettings: &dataworks.DiJobResourceSettingsOfflineResourceSettingsArgs{
RequestedCu: pulumi.Float64(2),
ResourceGroupIdentifier: pulumi.String("xx"),
},
RealtimeResourceSettings: &dataworks.DiJobResourceSettingsRealtimeResourceSettingsArgs{
RequestedCu: pulumi.Float64(2),
ResourceGroupIdentifier: pulumi.String("xx"),
},
ScheduleResourceSettings: &dataworks.DiJobResourceSettingsScheduleResourceSettingsArgs{
RequestedCu: pulumi.Float64(2),
ResourceGroupIdentifier: pulumi.String("xx"),
},
},
JobSettings: &dataworks.DiJobJobSettingsArgs{
ChannelSettings: pulumi.String("xxxx"),
ColumnDataTypeSettings: dataworks.DiJobJobSettingsColumnDataTypeSettingArray{
&dataworks.DiJobJobSettingsColumnDataTypeSettingArgs{
DestinationDataType: pulumi.String("xxxx"),
SourceDataType: pulumi.String("xxxx"),
},
},
CycleScheduleSettings: &dataworks.DiJobJobSettingsCycleScheduleSettingsArgs{
CycleMigrationType: pulumi.String("xxxx"),
ScheduleParameters: pulumi.String("xxxx"),
},
},
SourceDataSourceSettings: dataworks.DiJobSourceDataSourceSettingArray{
&dataworks.DiJobSourceDataSourceSettingArgs{
DataSourceName: pulumi.String("xxxx"),
DataSourceProperties: &dataworks.DiJobSourceDataSourceSettingDataSourcePropertiesArgs{
Encoding: pulumi.String("xxxx"),
Timezone: pulumi.String("xxxx"),
},
},
},
DestinationDataSourceType: pulumi.String("xxxx"),
TableMappings: dataworks.DiJobTableMappingArray{
&dataworks.DiJobTableMappingArgs{
SourceObjectSelectionRules: dataworks.DiJobTableMappingSourceObjectSelectionRuleArray{
&dataworks.DiJobTableMappingSourceObjectSelectionRuleArgs{
Action: pulumi.String("Include"),
Expression: pulumi.String("xxxx"),
ExpressionType: pulumi.String("Exact"),
ObjectType: pulumi.String("xxxx"),
},
&dataworks.DiJobTableMappingSourceObjectSelectionRuleArgs{
Action: pulumi.String("Include"),
Expression: pulumi.String("xxxx"),
ExpressionType: pulumi.String("Exact"),
ObjectType: pulumi.String("xxxx"),
},
},
TransformationRules: dataworks.DiJobTableMappingTransformationRuleArray{
&dataworks.DiJobTableMappingTransformationRuleArgs{
RuleName: pulumi.String("xxxx"),
RuleActionType: pulumi.String("xxxx"),
RuleTargetType: pulumi.String("xxxx"),
},
},
},
},
TransformationRules: dataworks.DiJobTransformationRuleArray{
&dataworks.DiJobTransformationRuleArgs{
RuleActionType: pulumi.String("xxxx"),
RuleExpression: pulumi.String("xxxx"),
RuleName: pulumi.String("xxxx"),
RuleTargetType: pulumi.String("xxxx"),
},
},
DestinationDataSourceSettings: dataworks.DiJobDestinationDataSourceSettingArray{
&dataworks.DiJobDestinationDataSourceSettingArgs{
DataSourceName: pulumi.String("xxx"),
},
},
})
if err != nil {
return err
}
_, err = dataworks.NewDiAlarmRule(ctx, "default", &dataworks.DiAlarmRuleArgs{
Description: pulumi.String("Description"),
TriggerConditions: dataworks.DiAlarmRuleTriggerConditionArray{
&dataworks.DiAlarmRuleTriggerConditionArgs{
DdlReportTags: pulumi.StringArray{
pulumi.String("ALTERADDCOLUMN"),
},
Threshold: pulumi.Int(20),
Duration: pulumi.Int(10),
Severity: pulumi.String("Warning"),
},
},
MetricType: pulumi.String("DdlReport"),
NotificationSettings: &dataworks.DiAlarmRuleNotificationSettingsArgs{
NotificationChannels: dataworks.DiAlarmRuleNotificationSettingsNotificationChannelArray{
&dataworks.DiAlarmRuleNotificationSettingsNotificationChannelArgs{
Severity: pulumi.String("Warning"),
Channels: pulumi.StringArray{
pulumi.String("Ding"),
},
},
},
NotificationReceivers: dataworks.DiAlarmRuleNotificationSettingsNotificationReceiverArray{
&dataworks.DiAlarmRuleNotificationSettingsNotificationReceiverArgs{
ReceiverType: pulumi.String("DingToken"),
ReceiverValues: pulumi.StringArray{
pulumi.String("1107550004253538"),
},
},
},
InhibitionInterval: pulumi.Int(10),
},
DiJobId: defaultUW8inp.DiJobId,
DiAlarmRuleName: pulumi.String(name),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaulteNv8bu = new AliCloud.DataWorks.Project("defaulteNv8bu", new()
{
ProjectName = name,
DisplayName = name,
Description = name,
});
var defaultUW8inp = new AliCloud.DataWorks.DiJob("defaultUW8inp", new()
{
Description = "xxxx",
ProjectId = defaulteNv8bu.Id,
JobName = "xxx",
MigrationType = "api_xxx",
SourceDataSourceType = "xxx",
ResourceSettings = new AliCloud.DataWorks.Inputs.DiJobResourceSettingsArgs
{
OfflineResourceSettings = new AliCloud.DataWorks.Inputs.DiJobResourceSettingsOfflineResourceSettingsArgs
{
RequestedCu = 2,
ResourceGroupIdentifier = "xx",
},
RealtimeResourceSettings = new AliCloud.DataWorks.Inputs.DiJobResourceSettingsRealtimeResourceSettingsArgs
{
RequestedCu = 2,
ResourceGroupIdentifier = "xx",
},
ScheduleResourceSettings = new AliCloud.DataWorks.Inputs.DiJobResourceSettingsScheduleResourceSettingsArgs
{
RequestedCu = 2,
ResourceGroupIdentifier = "xx",
},
},
JobSettings = new AliCloud.DataWorks.Inputs.DiJobJobSettingsArgs
{
ChannelSettings = "xxxx",
ColumnDataTypeSettings = new[]
{
new AliCloud.DataWorks.Inputs.DiJobJobSettingsColumnDataTypeSettingArgs
{
DestinationDataType = "xxxx",
SourceDataType = "xxxx",
},
},
CycleScheduleSettings = new AliCloud.DataWorks.Inputs.DiJobJobSettingsCycleScheduleSettingsArgs
{
CycleMigrationType = "xxxx",
ScheduleParameters = "xxxx",
},
},
SourceDataSourceSettings = new[]
{
new AliCloud.DataWorks.Inputs.DiJobSourceDataSourceSettingArgs
{
DataSourceName = "xxxx",
DataSourceProperties = new AliCloud.DataWorks.Inputs.DiJobSourceDataSourceSettingDataSourcePropertiesArgs
{
Encoding = "xxxx",
Timezone = "xxxx",
},
},
},
DestinationDataSourceType = "xxxx",
TableMappings = new[]
{
new AliCloud.DataWorks.Inputs.DiJobTableMappingArgs
{
SourceObjectSelectionRules = new[]
{
new AliCloud.DataWorks.Inputs.DiJobTableMappingSourceObjectSelectionRuleArgs
{
Action = "Include",
Expression = "xxxx",
ExpressionType = "Exact",
ObjectType = "xxxx",
},
new AliCloud.DataWorks.Inputs.DiJobTableMappingSourceObjectSelectionRuleArgs
{
Action = "Include",
Expression = "xxxx",
ExpressionType = "Exact",
ObjectType = "xxxx",
},
},
TransformationRules = new[]
{
new AliCloud.DataWorks.Inputs.DiJobTableMappingTransformationRuleArgs
{
RuleName = "xxxx",
RuleActionType = "xxxx",
RuleTargetType = "xxxx",
},
},
},
},
TransformationRules = new[]
{
new AliCloud.DataWorks.Inputs.DiJobTransformationRuleArgs
{
RuleActionType = "xxxx",
RuleExpression = "xxxx",
RuleName = "xxxx",
RuleTargetType = "xxxx",
},
},
DestinationDataSourceSettings = new[]
{
new AliCloud.DataWorks.Inputs.DiJobDestinationDataSourceSettingArgs
{
DataSourceName = "xxx",
},
},
});
var @default = new AliCloud.DataWorks.DiAlarmRule("default", new()
{
Description = "Description",
TriggerConditions = new[]
{
new AliCloud.DataWorks.Inputs.DiAlarmRuleTriggerConditionArgs
{
DdlReportTags = new[]
{
"ALTERADDCOLUMN",
},
Threshold = 20,
Duration = 10,
Severity = "Warning",
},
},
MetricType = "DdlReport",
NotificationSettings = new AliCloud.DataWorks.Inputs.DiAlarmRuleNotificationSettingsArgs
{
NotificationChannels = new[]
{
new AliCloud.DataWorks.Inputs.DiAlarmRuleNotificationSettingsNotificationChannelArgs
{
Severity = "Warning",
Channels = new[]
{
"Ding",
},
},
},
NotificationReceivers = new[]
{
new AliCloud.DataWorks.Inputs.DiAlarmRuleNotificationSettingsNotificationReceiverArgs
{
ReceiverType = "DingToken",
ReceiverValues = new[]
{
"1107550004253538",
},
},
},
InhibitionInterval = 10,
},
DiJobId = defaultUW8inp.DiJobId,
DiAlarmRuleName = name,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dataworks.Project;
import com.pulumi.alicloud.dataworks.ProjectArgs;
import com.pulumi.alicloud.dataworks.DiJob;
import com.pulumi.alicloud.dataworks.DiJobArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobResourceSettingsArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobResourceSettingsOfflineResourceSettingsArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobResourceSettingsRealtimeResourceSettingsArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobResourceSettingsScheduleResourceSettingsArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobJobSettingsArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobJobSettingsCycleScheduleSettingsArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobSourceDataSourceSettingArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobSourceDataSourceSettingDataSourcePropertiesArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobTableMappingArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobTransformationRuleArgs;
import com.pulumi.alicloud.dataworks.inputs.DiJobDestinationDataSourceSettingArgs;
import com.pulumi.alicloud.dataworks.DiAlarmRule;
import com.pulumi.alicloud.dataworks.DiAlarmRuleArgs;
import com.pulumi.alicloud.dataworks.inputs.DiAlarmRuleTriggerConditionArgs;
import com.pulumi.alicloud.dataworks.inputs.DiAlarmRuleNotificationSettingsArgs;
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) {
final var config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var defaulteNv8bu = new Project("defaulteNv8bu", ProjectArgs.builder()
.projectName(name)
.displayName(name)
.description(name)
.build());
var defaultUW8inp = new DiJob("defaultUW8inp", DiJobArgs.builder()
.description("xxxx")
.projectId(defaulteNv8bu.id())
.jobName("xxx")
.migrationType("api_xxx")
.sourceDataSourceType("xxx")
.resourceSettings(DiJobResourceSettingsArgs.builder()
.offlineResourceSettings(DiJobResourceSettingsOfflineResourceSettingsArgs.builder()
.requestedCu(2)
.resourceGroupIdentifier("xx")
.build())
.realtimeResourceSettings(DiJobResourceSettingsRealtimeResourceSettingsArgs.builder()
.requestedCu(2)
.resourceGroupIdentifier("xx")
.build())
.scheduleResourceSettings(DiJobResourceSettingsScheduleResourceSettingsArgs.builder()
.requestedCu(2)
.resourceGroupIdentifier("xx")
.build())
.build())
.jobSettings(DiJobJobSettingsArgs.builder()
.channelSettings("xxxx")
.columnDataTypeSettings(DiJobJobSettingsColumnDataTypeSettingArgs.builder()
.destinationDataType("xxxx")
.sourceDataType("xxxx")
.build())
.cycleScheduleSettings(DiJobJobSettingsCycleScheduleSettingsArgs.builder()
.cycleMigrationType("xxxx")
.scheduleParameters("xxxx")
.build())
.build())
.sourceDataSourceSettings(DiJobSourceDataSourceSettingArgs.builder()
.dataSourceName("xxxx")
.dataSourceProperties(DiJobSourceDataSourceSettingDataSourcePropertiesArgs.builder()
.encoding("xxxx")
.timezone("xxxx")
.build())
.build())
.destinationDataSourceType("xxxx")
.tableMappings(DiJobTableMappingArgs.builder()
.sourceObjectSelectionRules(
DiJobTableMappingSourceObjectSelectionRuleArgs.builder()
.action("Include")
.expression("xxxx")
.expressionType("Exact")
.objectType("xxxx")
.build(),
DiJobTableMappingSourceObjectSelectionRuleArgs.builder()
.action("Include")
.expression("xxxx")
.expressionType("Exact")
.objectType("xxxx")
.build())
.transformationRules(DiJobTableMappingTransformationRuleArgs.builder()
.ruleName("xxxx")
.ruleActionType("xxxx")
.ruleTargetType("xxxx")
.build())
.build())
.transformationRules(DiJobTransformationRuleArgs.builder()
.ruleActionType("xxxx")
.ruleExpression("xxxx")
.ruleName("xxxx")
.ruleTargetType("xxxx")
.build())
.destinationDataSourceSettings(DiJobDestinationDataSourceSettingArgs.builder()
.dataSourceName("xxx")
.build())
.build());
var default_ = new DiAlarmRule("default", DiAlarmRuleArgs.builder()
.description("Description")
.triggerConditions(DiAlarmRuleTriggerConditionArgs.builder()
.ddlReportTags("ALTERADDCOLUMN")
.threshold("20")
.duration("10")
.severity("Warning")
.build())
.metricType("DdlReport")
.notificationSettings(DiAlarmRuleNotificationSettingsArgs.builder()
.notificationChannels(DiAlarmRuleNotificationSettingsNotificationChannelArgs.builder()
.severity("Warning")
.channels("Ding")
.build())
.notificationReceivers(DiAlarmRuleNotificationSettingsNotificationReceiverArgs.builder()
.receiverType("DingToken")
.receiverValues("1107550004253538")
.build())
.inhibitionInterval("10")
.build())
.diJobId(defaultUW8inp.diJobId())
.diAlarmRuleName(name)
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaulteNv8bu:
type: alicloud:dataworks:Project
properties:
projectName: ${name}
displayName: ${name}
description: ${name}
defaultUW8inp:
type: alicloud:dataworks:DiJob
properties:
description: xxxx
projectId: ${defaulteNv8bu.id}
jobName: xxx
migrationType: api_xxx
sourceDataSourceType: xxx
resourceSettings:
offlineResourceSettings:
requestedCu: 2
resourceGroupIdentifier: xx
realtimeResourceSettings:
requestedCu: 2
resourceGroupIdentifier: xx
scheduleResourceSettings:
requestedCu: 2
resourceGroupIdentifier: xx
jobSettings:
channelSettings: xxxx
columnDataTypeSettings:
- destinationDataType: xxxx
sourceDataType: xxxx
cycleScheduleSettings:
cycleMigrationType: xxxx
scheduleParameters: xxxx
sourceDataSourceSettings:
- dataSourceName: xxxx
dataSourceProperties:
encoding: xxxx
timezone: xxxx
destinationDataSourceType: xxxx
tableMappings:
- sourceObjectSelectionRules:
- action: Include
expression: xxxx
expressionType: Exact
objectType: xxxx
- action: Include
expression: xxxx
expressionType: Exact
objectType: xxxx
transformationRules:
- ruleName: xxxx
ruleActionType: xxxx
ruleTargetType: xxxx
transformationRules:
- ruleActionType: xxxx
ruleExpression: xxxx
ruleName: xxxx
ruleTargetType: xxxx
destinationDataSourceSettings:
- dataSourceName: xxx
default:
type: alicloud:dataworks:DiAlarmRule
properties:
description: Description
triggerConditions:
- ddlReportTags:
- ALTERADDCOLUMN
threshold: '20'
duration: '10'
severity: Warning
metricType: DdlReport
notificationSettings:
notificationChannels:
- severity: Warning
channels:
- Ding
notificationReceivers:
- receiverType: DingToken
receiverValues:
- '1107550004253538'
inhibitionInterval: '10'
diJobId: ${defaultUW8inp.diJobId}
diAlarmRuleName: ${name}
Create DiAlarmRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DiAlarmRule(name: string, args: DiAlarmRuleArgs, opts?: CustomResourceOptions);
@overload
def DiAlarmRule(resource_name: str,
args: DiAlarmRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DiAlarmRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
di_alarm_rule_name: Optional[str] = None,
di_job_id: Optional[int] = None,
metric_type: Optional[str] = None,
notification_settings: Optional[DiAlarmRuleNotificationSettingsArgs] = None,
trigger_conditions: Optional[Sequence[DiAlarmRuleTriggerConditionArgs]] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None)
func NewDiAlarmRule(ctx *Context, name string, args DiAlarmRuleArgs, opts ...ResourceOption) (*DiAlarmRule, error)
public DiAlarmRule(string name, DiAlarmRuleArgs args, CustomResourceOptions? opts = null)
public DiAlarmRule(String name, DiAlarmRuleArgs args)
public DiAlarmRule(String name, DiAlarmRuleArgs args, CustomResourceOptions options)
type: alicloud:dataworks:DiAlarmRule
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 DiAlarmRuleArgs
- 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 DiAlarmRuleArgs
- 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 DiAlarmRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DiAlarmRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DiAlarmRuleArgs
- 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 diAlarmRuleResource = new AliCloud.DataWorks.DiAlarmRule("diAlarmRuleResource", new()
{
DiAlarmRuleName = "string",
DiJobId = 0,
MetricType = "string",
NotificationSettings = new AliCloud.DataWorks.Inputs.DiAlarmRuleNotificationSettingsArgs
{
InhibitionInterval = 0,
NotificationChannels = new[]
{
new AliCloud.DataWorks.Inputs.DiAlarmRuleNotificationSettingsNotificationChannelArgs
{
Channels = new[]
{
"string",
},
Severity = "string",
},
},
NotificationReceivers = new[]
{
new AliCloud.DataWorks.Inputs.DiAlarmRuleNotificationSettingsNotificationReceiverArgs
{
ReceiverType = "string",
ReceiverValues = new[]
{
"string",
},
},
},
},
TriggerConditions = new[]
{
new AliCloud.DataWorks.Inputs.DiAlarmRuleTriggerConditionArgs
{
DdlReportTags = new[]
{
"string",
},
Duration = 0,
Severity = "string",
Threshold = 0,
},
},
Description = "string",
Enabled = false,
});
example, err := dataworks.NewDiAlarmRule(ctx, "diAlarmRuleResource", &dataworks.DiAlarmRuleArgs{
DiAlarmRuleName: pulumi.String("string"),
DiJobId: pulumi.Int(0),
MetricType: pulumi.String("string"),
NotificationSettings: &dataworks.DiAlarmRuleNotificationSettingsArgs{
InhibitionInterval: pulumi.Int(0),
NotificationChannels: dataworks.DiAlarmRuleNotificationSettingsNotificationChannelArray{
&dataworks.DiAlarmRuleNotificationSettingsNotificationChannelArgs{
Channels: pulumi.StringArray{
pulumi.String("string"),
},
Severity: pulumi.String("string"),
},
},
NotificationReceivers: dataworks.DiAlarmRuleNotificationSettingsNotificationReceiverArray{
&dataworks.DiAlarmRuleNotificationSettingsNotificationReceiverArgs{
ReceiverType: pulumi.String("string"),
ReceiverValues: pulumi.StringArray{
pulumi.String("string"),
},
},
},
},
TriggerConditions: dataworks.DiAlarmRuleTriggerConditionArray{
&dataworks.DiAlarmRuleTriggerConditionArgs{
DdlReportTags: pulumi.StringArray{
pulumi.String("string"),
},
Duration: pulumi.Int(0),
Severity: pulumi.String("string"),
Threshold: pulumi.Int(0),
},
},
Description: pulumi.String("string"),
Enabled: pulumi.Bool(false),
})
var diAlarmRuleResource = new DiAlarmRule("diAlarmRuleResource", DiAlarmRuleArgs.builder()
.diAlarmRuleName("string")
.diJobId(0)
.metricType("string")
.notificationSettings(DiAlarmRuleNotificationSettingsArgs.builder()
.inhibitionInterval(0)
.notificationChannels(DiAlarmRuleNotificationSettingsNotificationChannelArgs.builder()
.channels("string")
.severity("string")
.build())
.notificationReceivers(DiAlarmRuleNotificationSettingsNotificationReceiverArgs.builder()
.receiverType("string")
.receiverValues("string")
.build())
.build())
.triggerConditions(DiAlarmRuleTriggerConditionArgs.builder()
.ddlReportTags("string")
.duration(0)
.severity("string")
.threshold(0)
.build())
.description("string")
.enabled(false)
.build());
di_alarm_rule_resource = alicloud.dataworks.DiAlarmRule("diAlarmRuleResource",
di_alarm_rule_name="string",
di_job_id=0,
metric_type="string",
notification_settings={
"inhibition_interval": 0,
"notification_channels": [{
"channels": ["string"],
"severity": "string",
}],
"notification_receivers": [{
"receiver_type": "string",
"receiver_values": ["string"],
}],
},
trigger_conditions=[{
"ddl_report_tags": ["string"],
"duration": 0,
"severity": "string",
"threshold": 0,
}],
description="string",
enabled=False)
const diAlarmRuleResource = new alicloud.dataworks.DiAlarmRule("diAlarmRuleResource", {
diAlarmRuleName: "string",
diJobId: 0,
metricType: "string",
notificationSettings: {
inhibitionInterval: 0,
notificationChannels: [{
channels: ["string"],
severity: "string",
}],
notificationReceivers: [{
receiverType: "string",
receiverValues: ["string"],
}],
},
triggerConditions: [{
ddlReportTags: ["string"],
duration: 0,
severity: "string",
threshold: 0,
}],
description: "string",
enabled: false,
});
type: alicloud:dataworks:DiAlarmRule
properties:
description: string
diAlarmRuleName: string
diJobId: 0
enabled: false
metricType: string
notificationSettings:
inhibitionInterval: 0
notificationChannels:
- channels:
- string
severity: string
notificationReceivers:
- receiverType: string
receiverValues:
- string
triggerConditions:
- ddlReportTags:
- string
duration: 0
severity: string
threshold: 0
DiAlarmRule 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 DiAlarmRule resource accepts the following input properties:
- Di
Alarm stringRule Name - Data Integration alarm rule name
- Di
Job intId - Task ID: the ID of the task associated with the alert rule.
- Metric
Type string - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- Notification
Settings Pulumi.Ali Cloud. Data Works. Inputs. Di Alarm Rule Notification Settings - Alarm notification settings See
notification_settings
below. - Trigger
Conditions List<Pulumi.Ali Cloud. Data Works. Inputs. Di Alarm Rule Trigger Condition> - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below. - Description string
- Enabled bool
- Di
Alarm stringRule Name - Data Integration alarm rule name
- Di
Job intId - Task ID: the ID of the task associated with the alert rule.
- Metric
Type string - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- Notification
Settings DiAlarm Rule Notification Settings Args - Alarm notification settings See
notification_settings
below. - Trigger
Conditions []DiAlarm Rule Trigger Condition Args - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below. - Description string
- Enabled bool
- di
Alarm StringRule Name - Data Integration alarm rule name
- di
Job IntegerId - Task ID: the ID of the task associated with the alert rule.
- metric
Type String - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification
Settings DiAlarm Rule Notification Settings - Alarm notification settings See
notification_settings
below. - trigger
Conditions List<DiAlarm Rule Trigger Condition> - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below. - description String
- enabled Boolean
- di
Alarm stringRule Name - Data Integration alarm rule name
- di
Job numberId - Task ID: the ID of the task associated with the alert rule.
- metric
Type string - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification
Settings DiAlarm Rule Notification Settings - Alarm notification settings See
notification_settings
below. - trigger
Conditions DiAlarm Rule Trigger Condition[] - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below. - description string
- enabled boolean
- di_
alarm_ strrule_ name - Data Integration alarm rule name
- di_
job_ intid - Task ID: the ID of the task associated with the alert rule.
- metric_
type str - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification_
settings DiAlarm Rule Notification Settings Args - Alarm notification settings See
notification_settings
below. - trigger_
conditions Sequence[DiAlarm Rule Trigger Condition Args] - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below. - description str
- enabled bool
- di
Alarm StringRule Name - Data Integration alarm rule name
- di
Job NumberId - Task ID: the ID of the task associated with the alert rule.
- metric
Type String - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification
Settings Property Map - Alarm notification settings See
notification_settings
below. - trigger
Conditions List<Property Map> - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below. - description String
- enabled Boolean
Outputs
All input properties are implicitly available as output properties. Additionally, the DiAlarmRule resource produces the following output properties:
- Di
Alarm intRule Id - Resource attribute field representing resource level ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Di
Alarm intRule Id - Resource attribute field representing resource level ID
- Id string
- The provider-assigned unique ID for this managed resource.
- di
Alarm IntegerRule Id - Resource attribute field representing resource level ID
- id String
- The provider-assigned unique ID for this managed resource.
- di
Alarm numberRule Id - Resource attribute field representing resource level ID
- id string
- The provider-assigned unique ID for this managed resource.
- di_
alarm_ intrule_ id - Resource attribute field representing resource level ID
- id str
- The provider-assigned unique ID for this managed resource.
- di
Alarm NumberRule Id - Resource attribute field representing resource level ID
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing DiAlarmRule Resource
Get an existing DiAlarmRule 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?: DiAlarmRuleState, opts?: CustomResourceOptions): DiAlarmRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
di_alarm_rule_id: Optional[int] = None,
di_alarm_rule_name: Optional[str] = None,
di_job_id: Optional[int] = None,
enabled: Optional[bool] = None,
metric_type: Optional[str] = None,
notification_settings: Optional[DiAlarmRuleNotificationSettingsArgs] = None,
trigger_conditions: Optional[Sequence[DiAlarmRuleTriggerConditionArgs]] = None) -> DiAlarmRule
func GetDiAlarmRule(ctx *Context, name string, id IDInput, state *DiAlarmRuleState, opts ...ResourceOption) (*DiAlarmRule, error)
public static DiAlarmRule Get(string name, Input<string> id, DiAlarmRuleState? state, CustomResourceOptions? opts = null)
public static DiAlarmRule get(String name, Output<String> id, DiAlarmRuleState state, CustomResourceOptions options)
resources: _: type: alicloud:dataworks:DiAlarmRule 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
- Di
Alarm intRule Id - Resource attribute field representing resource level ID
- Di
Alarm stringRule Name - Data Integration alarm rule name
- Di
Job intId - Task ID: the ID of the task associated with the alert rule.
- Enabled bool
- Metric
Type string - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- Notification
Settings Pulumi.Ali Cloud. Data Works. Inputs. Di Alarm Rule Notification Settings - Alarm notification settings See
notification_settings
below. - Trigger
Conditions List<Pulumi.Ali Cloud. Data Works. Inputs. Di Alarm Rule Trigger Condition> - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below.
- Description string
- Di
Alarm intRule Id - Resource attribute field representing resource level ID
- Di
Alarm stringRule Name - Data Integration alarm rule name
- Di
Job intId - Task ID: the ID of the task associated with the alert rule.
- Enabled bool
- Metric
Type string - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- Notification
Settings DiAlarm Rule Notification Settings Args - Alarm notification settings See
notification_settings
below. - Trigger
Conditions []DiAlarm Rule Trigger Condition Args - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below.
- description String
- di
Alarm IntegerRule Id - Resource attribute field representing resource level ID
- di
Alarm StringRule Name - Data Integration alarm rule name
- di
Job IntegerId - Task ID: the ID of the task associated with the alert rule.
- enabled Boolean
- metric
Type String - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification
Settings DiAlarm Rule Notification Settings - Alarm notification settings See
notification_settings
below. - trigger
Conditions List<DiAlarm Rule Trigger Condition> - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below.
- description string
- di
Alarm numberRule Id - Resource attribute field representing resource level ID
- di
Alarm stringRule Name - Data Integration alarm rule name
- di
Job numberId - Task ID: the ID of the task associated with the alert rule.
- enabled boolean
- metric
Type string - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification
Settings DiAlarm Rule Notification Settings - Alarm notification settings See
notification_settings
below. - trigger
Conditions DiAlarm Rule Trigger Condition[] - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below.
- description str
- di_
alarm_ intrule_ id - Resource attribute field representing resource level ID
- di_
alarm_ strrule_ name - Data Integration alarm rule name
- di_
job_ intid - Task ID: the ID of the task associated with the alert rule.
- enabled bool
- metric_
type str - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification_
settings DiAlarm Rule Notification Settings Args - Alarm notification settings See
notification_settings
below. - trigger_
conditions Sequence[DiAlarm Rule Trigger Condition Args] - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below.
- description String
- di
Alarm NumberRule Id - Resource attribute field representing resource level ID
- di
Alarm StringRule Name - Data Integration alarm rule name
- di
Job NumberId - Task ID: the ID of the task associated with the alert rule.
- enabled Boolean
- metric
Type String - Alarm indicator type. Optional enumerated values:
- Heartbeat (task status alarm)
- FailoverCount(failover times alarm)
- Delay (task Delay alarm)
- notification
Settings Property Map - Alarm notification settings See
notification_settings
below. - trigger
Conditions List<Property Map> - Alarm trigger condition list, supporting multiple conditions See
trigger_conditions
below.
Supporting Types
DiAlarmRuleNotificationSettings, DiAlarmRuleNotificationSettingsArgs
- Inhibition
Interval int - Alarm suppression interval, in minutes
- Notification
Channels List<Pulumi.Ali Cloud. Data Works. Inputs. Di Alarm Rule Notification Settings Notification Channel> - Alarm notification Channel See
notification_channels
below. - Notification
Receivers List<Pulumi.Ali Cloud. Data Works. Inputs. Di Alarm Rule Notification Settings Notification Receiver> - List of alert notification recipients See
notification_receivers
below.
- Inhibition
Interval int - Alarm suppression interval, in minutes
- Notification
Channels []DiAlarm Rule Notification Settings Notification Channel - Alarm notification Channel See
notification_channels
below. - Notification
Receivers []DiAlarm Rule Notification Settings Notification Receiver - List of alert notification recipients See
notification_receivers
below.
- inhibition
Interval Integer - Alarm suppression interval, in minutes
- notification
Channels List<DiAlarm Rule Notification Settings Notification Channel> - Alarm notification Channel See
notification_channels
below. - notification
Receivers List<DiAlarm Rule Notification Settings Notification Receiver> - List of alert notification recipients See
notification_receivers
below.
- inhibition
Interval number - Alarm suppression interval, in minutes
- notification
Channels DiAlarm Rule Notification Settings Notification Channel[] - Alarm notification Channel See
notification_channels
below. - notification
Receivers DiAlarm Rule Notification Settings Notification Receiver[] - List of alert notification recipients See
notification_receivers
below.
- inhibition_
interval int - Alarm suppression interval, in minutes
- notification_
channels Sequence[DiAlarm Rule Notification Settings Notification Channel] - Alarm notification Channel See
notification_channels
below. - notification_
receivers Sequence[DiAlarm Rule Notification Settings Notification Receiver] - List of alert notification recipients See
notification_receivers
below.
- inhibition
Interval Number - Alarm suppression interval, in minutes
- notification
Channels List<Property Map> - Alarm notification Channel See
notification_channels
below. - notification
Receivers List<Property Map> - List of alert notification recipients See
notification_receivers
below.
DiAlarmRuleNotificationSettingsNotificationChannel, DiAlarmRuleNotificationSettingsNotificationChannelArgs
DiAlarmRuleNotificationSettingsNotificationReceiver, DiAlarmRuleNotificationSettingsNotificationReceiverArgs
- Receiver
Type string - The type of the receiver. Valid values: AliyunUid/DingToken/FeishuToken/WebHookUrl.
- Receiver
Values List<string> - Receiver Value List
- Receiver
Type string - The type of the receiver. Valid values: AliyunUid/DingToken/FeishuToken/WebHookUrl.
- Receiver
Values []string - Receiver Value List
- receiver
Type String - The type of the receiver. Valid values: AliyunUid/DingToken/FeishuToken/WebHookUrl.
- receiver
Values List<String> - Receiver Value List
- receiver
Type string - The type of the receiver. Valid values: AliyunUid/DingToken/FeishuToken/WebHookUrl.
- receiver
Values string[] - Receiver Value List
- receiver_
type str - The type of the receiver. Valid values: AliyunUid/DingToken/FeishuToken/WebHookUrl.
- receiver_
values Sequence[str] - Receiver Value List
- receiver
Type String - The type of the receiver. Valid values: AliyunUid/DingToken/FeishuToken/WebHookUrl.
- receiver
Values List<String> - Receiver Value List
DiAlarmRuleTriggerCondition, DiAlarmRuleTriggerConditionArgs
- List<string>
- It takes effect only when the DDL notification is issued. The list of effective DDLs is required.
- Duration int
- Alarm calculation time interval, unit minute
- Severity string
Severity, optional enumeration value:
Warning
Critical
- Threshold int
Alarm threshold.
Task status alarm: no need to fill in the threshold.
failover alarm: The threshold is the number of failover alarms.
Task Delay Alarm: The threshold is the delay duration, in seconds.
- []string
- It takes effect only when the DDL notification is issued. The list of effective DDLs is required.
- Duration int
- Alarm calculation time interval, unit minute
- Severity string
Severity, optional enumeration value:
Warning
Critical
- Threshold int
Alarm threshold.
Task status alarm: no need to fill in the threshold.
failover alarm: The threshold is the number of failover alarms.
Task Delay Alarm: The threshold is the delay duration, in seconds.
- List<String>
- It takes effect only when the DDL notification is issued. The list of effective DDLs is required.
- duration Integer
- Alarm calculation time interval, unit minute
- severity String
Severity, optional enumeration value:
Warning
Critical
- threshold Integer
Alarm threshold.
Task status alarm: no need to fill in the threshold.
failover alarm: The threshold is the number of failover alarms.
Task Delay Alarm: The threshold is the delay duration, in seconds.
- string[]
- It takes effect only when the DDL notification is issued. The list of effective DDLs is required.
- duration number
- Alarm calculation time interval, unit minute
- severity string
Severity, optional enumeration value:
Warning
Critical
- threshold number
Alarm threshold.
Task status alarm: no need to fill in the threshold.
failover alarm: The threshold is the number of failover alarms.
Task Delay Alarm: The threshold is the delay duration, in seconds.
- Sequence[str]
- It takes effect only when the DDL notification is issued. The list of effective DDLs is required.
- duration int
- Alarm calculation time interval, unit minute
- severity str
Severity, optional enumeration value:
Warning
Critical
- threshold int
Alarm threshold.
Task status alarm: no need to fill in the threshold.
failover alarm: The threshold is the number of failover alarms.
Task Delay Alarm: The threshold is the delay duration, in seconds.
- List<String>
- It takes effect only when the DDL notification is issued. The list of effective DDLs is required.
- duration Number
- Alarm calculation time interval, unit minute
- severity String
Severity, optional enumeration value:
Warning
Critical
- threshold Number
Alarm threshold.
Task status alarm: no need to fill in the threshold.
failover alarm: The threshold is the number of failover alarms.
Task Delay Alarm: The threshold is the delay duration, in seconds.
Import
Data Works Di Alarm Rule can be imported using the id, e.g.
$ pulumi import alicloud:dataworks/diAlarmRule:DiAlarmRule example <di_job_id>:<di_alarm_rule_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.