Class CfnAlarmModel
Represents an alarm model to monitor an AWS IoT Events input attribute.
Inherited Members
Namespace: Amazon.CDK.AWS.IoTEvents
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAlarmModel : CfnResource, IInspectable, ITaggable
Syntax (vb)
Public Class CfnAlarmModel
Inherits CfnResource
Implements IInspectable, ITaggable
Remarks
You can use the alarm to get notified when the value is outside a specified range. For more information, see Create an alarm model in the AWS IoT Events Developer Guide .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iotevents-alarmmodel.html
CloudformationResource: AWS::IoTEvents::AlarmModel
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IoTEvents;
var cfnAlarmModel = new CfnAlarmModel(this, "MyCfnAlarmModel", new CfnAlarmModelProps {
AlarmRule = new AlarmRuleProperty {
SimpleRule = new SimpleRuleProperty {
ComparisonOperator = "comparisonOperator",
InputProperty = "inputProperty",
Threshold = "threshold"
}
},
RoleArn = "roleArn",
// the properties below are optional
AlarmCapabilities = new AlarmCapabilitiesProperty {
AcknowledgeFlow = new AcknowledgeFlowProperty {
Enabled = false
},
InitializationConfiguration = new InitializationConfigurationProperty {
DisabledOnInitialization = false
}
},
AlarmEventActions = new AlarmEventActionsProperty {
AlarmActions = new [] { new AlarmActionProperty {
DynamoDb = new DynamoDBProperty {
HashKeyField = "hashKeyField",
HashKeyValue = "hashKeyValue",
TableName = "tableName",
// the properties below are optional
HashKeyType = "hashKeyType",
Operation = "operation",
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
},
PayloadField = "payloadField",
RangeKeyField = "rangeKeyField",
RangeKeyType = "rangeKeyType",
RangeKeyValue = "rangeKeyValue"
},
DynamoDBv2 = new DynamoDBv2Property {
TableName = "tableName",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
}
},
Firehose = new FirehoseProperty {
DeliveryStreamName = "deliveryStreamName",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
},
Separator = "separator"
},
IotEvents = new IotEventsProperty {
InputName = "inputName",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
}
},
IotSiteWise = new IotSiteWiseProperty {
AssetId = "assetId",
EntryId = "entryId",
PropertyAlias = "propertyAlias",
PropertyId = "propertyId",
PropertyValue = new AssetPropertyValueProperty {
Value = new AssetPropertyVariantProperty {
BooleanValue = "booleanValue",
DoubleValue = "doubleValue",
IntegerValue = "integerValue",
StringValue = "stringValue"
},
// the properties below are optional
Quality = "quality",
Timestamp = new AssetPropertyTimestampProperty {
TimeInSeconds = "timeInSeconds",
// the properties below are optional
OffsetInNanos = "offsetInNanos"
}
}
},
IotTopicPublish = new IotTopicPublishProperty {
MqttTopic = "mqttTopic",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
}
},
Lambda = new LambdaProperty {
FunctionArn = "functionArn",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
}
},
Sns = new SnsProperty {
TargetArn = "targetArn",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
}
},
Sqs = new SqsProperty {
QueueUrl = "queueUrl",
// the properties below are optional
Payload = new PayloadProperty {
ContentExpression = "contentExpression",
Type = "type"
},
UseBase64 = false
}
} }
},
AlarmModelDescription = "alarmModelDescription",
AlarmModelName = "alarmModelName",
Key = "key",
Severity = 123,
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnAlarmModel(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAlarmModel(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAlarmModel(Construct, String, ICfnAlarmModelProps) |
Properties
AlarmCapabilities | Contains the configuration information of alarm state changes. |
AlarmEventActions | Contains information about one or more alarm actions. |
AlarmModelDescription | The description of the alarm model. |
AlarmModelName | The name of the alarm model. |
AlarmRule | Defines when your alarm is invoked. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Key | An input attribute used as a key to create an alarm. |
RoleArn | The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. |
Severity | A non-negative integer that reflects the severity level of the alarm. |
Tags | Tag Manager which manages the tags for this resource. |
TagsRaw | A list of key-value pairs that contain metadata for the alarm model. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAlarmModel(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAlarmModel(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAlarmModel(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAlarmModel(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAlarmModel(Construct, String, ICfnAlarmModelProps)
public CfnAlarmModel(Construct scope, string id, ICfnAlarmModelProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAlarmModelProps
Resource properties.
Properties
AlarmCapabilities
Contains the configuration information of alarm state changes.
public virtual object AlarmCapabilities { get; set; }
Property Value
System.Object
AlarmEventActions
Contains information about one or more alarm actions.
public virtual object AlarmEventActions { get; set; }
Property Value
System.Object
AlarmModelDescription
The description of the alarm model.
public virtual string AlarmModelDescription { get; set; }
Property Value
System.String
AlarmModelName
The name of the alarm model.
public virtual string AlarmModelName { get; set; }
Property Value
System.String
AlarmRule
Defines when your alarm is invoked.
public virtual object AlarmRule { get; set; }
Property Value
System.Object
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Key
An input attribute used as a key to create an alarm.
public virtual string Key { get; set; }
Property Value
System.String
RoleArn
The ARN of the IAM role that allows the alarm to perform actions and access AWS resources.
public virtual string RoleArn { get; set; }
Property Value
System.String
Severity
A non-negative integer that reflects the severity level of the alarm.
public virtual Nullable<double> Severity { get; set; }
Property Value
System.Nullable<System.Double>
Tags
Tag Manager which manages the tags for this resource.
public virtual TagManager Tags { get; }
Property Value
TagsRaw
A list of key-value pairs that contain metadata for the alarm model.
public virtual ICfnTag[] TagsRaw { get; set; }
Property Value
ICfnTag[]
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>