• 沒有找到結果。

AWS IoT Events

N/A
N/A
Protected

Academic year: 2022

Share "AWS IoT Events"

Copied!
269
0
0

加載中.... (立即查看全文)

全文

(1)

AWS IoT Events

API Reference

AWS IoT Events: API Reference

Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

(2)

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.

(3)

Table of Contents

Welcome ... 1

AWS IoT Events ... 1

AWS IoT Events Data ... 1

Actions ... 2

AWS IoT Events ... 3

CreateAlarmModel ... 4

CreateDetectorModel ... 11

CreateInput ... 22

DeleteAlarmModel ... 25

DeleteDetectorModel ... 27

DeleteInput ... 29

DescribeAlarmModel ... 31

DescribeDetectorModel ... 37

DescribeDetectorModelAnalysis ... 46

DescribeInput ... 48

DescribeLoggingOptions ... 50

GetDetectorModelAnalysisResults ... 52

ListAlarmModels ... 55

ListAlarmModelVersions ... 57

ListDetectorModels ... 60

ListDetectorModelVersions ... 62

ListInputRoutings ... 65

ListInputs ... 68

ListTagsForResource ... 70

PutLoggingOptions ... 72

StartDetectorModelAnalysis ... 74

TagResource ... 83

UntagResource ... 85

UpdateAlarmModel ... 87

UpdateDetectorModel ... 93

UpdateInput ... 103

AWS IoT Events Data ... 105

BatchAcknowledgeAlarm ... 106

BatchDisableAlarm ... 108

BatchEnableAlarm ... 110

BatchPutMessage ... 112

BatchResetAlarm ... 114

BatchSnoozeAlarm ... 116

BatchUpdateDetector ... 118

DescribeAlarm ... 121

DescribeDetector ... 124

ListAlarms ... 127

ListDetectors ... 130

Data Types ... 133

AWS IoT Events ... 135

AcknowledgeFlow ... 137

Action ... 138

AlarmAction ... 141

AlarmCapabilities ... 145

AlarmEventActions ... 146

AlarmModelSummary ... 147

AlarmModelVersionSummary ... 148

AlarmNotification ... 150

AlarmRule ... 151

(4)

AnalysisResult ... 152

AnalysisResultLocation ... 154

AssetPropertyTimestamp ... 155

AssetPropertyValue ... 156

AssetPropertyVariant ... 157

Attribute ... 159

ClearTimerAction ... 160

DetectorDebugOption ... 161

DetectorModel ... 162

DetectorModelConfiguration ... 163

DetectorModelDefinition ... 165

DetectorModelSummary ... 166

DetectorModelVersionSummary ... 167

DynamoDBAction ... 169

DynamoDBv2Action ... 172

EmailConfiguration ... 174

EmailContent ... 175

EmailRecipients ... 176

Event ... 177

FirehoseAction ... 178

InitializationConfiguration ... 179

Input ... 180

InputConfiguration ... 181

InputDefinition ... 183

InputIdentifier ... 184

InputSummary ... 185

IotEventsAction ... 187

IotEventsInputIdentifier ... 188

IotSiteWiseAction ... 189

IotSiteWiseAssetModelPropertyIdentifier ... 191

IotSiteWiseInputIdentifier ... 192

IotTopicPublishAction ... 193

LambdaAction ... 194

LoggingOptions ... 195

NotificationAction ... 196

NotificationTargetActions ... 197

OnEnterLifecycle ... 198

OnExitLifecycle ... 199

OnInputLifecycle ... 200

Payload ... 201

RecipientDetail ... 202

ResetTimerAction ... 203

RoutedResource ... 204

SetTimerAction ... 205

SetVariableAction ... 206

SimpleRule ... 207

SMSConfiguration ... 208

SNSTopicPublishAction ... 209

SqsAction ... 210

SSOIdentity ... 211

State ... 212

Tag ... 213

TransitionEvent ... 214

(5)

AlarmState ... 221

AlarmSummary ... 223

BatchAlarmActionErrorEntry ... 225

BatchPutMessageErrorEntry ... 226

BatchUpdateDetectorErrorEntry ... 227

CustomerAction ... 228

Detector ... 230

DetectorState ... 232

DetectorStateDefinition ... 233

DetectorStateSummary ... 234

DetectorSummary ... 235

DisableActionConfiguration ... 237

DisableAlarmActionRequest ... 238

EnableActionConfiguration ... 240

EnableAlarmActionRequest ... 241

Message ... 243

ResetActionConfiguration ... 244

ResetAlarmActionRequest ... 245

RuleEvaluation ... 247

SimpleRuleEvaluation ... 248

SnoozeActionConfiguration ... 249

SnoozeAlarmActionRequest ... 250

StateChangeConfiguration ... 252

SystemEvent ... 253

Timer ... 254

TimerDefinition ... 255

TimestampValue ... 256

UpdateDetectorRequest ... 257

Variable ... 259

VariableDefinition ... 260

Common Parameters ... 261

Common Errors ... 263

(6)

AWS IoT Events

Welcome

AWS IoT Events

AWS IoT Events monitors your equipment or device fleets for failures or changes in operation, and triggers actions when such events occur. You can use AWS IoT Events API operations to create, read, update, and delete inputs and detector models, and to list their versions.

AWS IoT Events Data

AWS IoT Events monitors your equipment or device fleets for failures or changes in operation, and triggers actions when such events occur. You can use AWS IoT Events Data API commands to send inputs to detectors, list detectors, and view or update a detector's status.

For more information, see What is AWS IoT Events? in the AWS IoT Events Developer Guide.

(7)

Actions

The following actions are supported by AWS IoT Events:

• CreateAlarmModel (p. 4)

• CreateDetectorModel (p. 11)

• CreateInput (p. 22)

• DeleteAlarmModel (p. 25)

• DeleteDetectorModel (p. 27)

• DeleteInput (p. 29)

• DescribeAlarmModel (p. 31)

• DescribeDetectorModel (p. 37)

• DescribeDetectorModelAnalysis (p. 46)

• DescribeInput (p. 48)

• DescribeLoggingOptions (p. 50)

• GetDetectorModelAnalysisResults (p. 52)

• ListAlarmModels (p. 55)

• ListAlarmModelVersions (p. 57)

• ListDetectorModels (p. 60)

• ListDetectorModelVersions (p. 62)

• ListInputRoutings (p. 65)

• ListInputs (p. 68)

• ListTagsForResource (p. 70)

• PutLoggingOptions (p. 72)

• StartDetectorModelAnalysis (p. 74)

• TagResource (p. 83)

• UntagResource (p. 85)

• UpdateAlarmModel (p. 87)

• UpdateDetectorModel (p. 93)

• UpdateInput (p. 103)

The following actions are supported by AWS IoT Events Data:

• BatchAcknowledgeAlarm (p. 106)

• BatchDisableAlarm (p. 108)

• BatchEnableAlarm (p. 110)

• BatchPutMessage (p. 112)

• BatchResetAlarm (p. 114)

• BatchSnoozeAlarm (p. 116)

• BatchUpdateDetector (p. 118)

• DescribeAlarm (p. 121)

• DescribeDetector (p. 124)

• ListAlarms (p. 127)

• ListDetectors (p. 130)

(8)

AWS IoT Events

AWS IoT Events

The following actions are supported by AWS IoT Events:

• CreateAlarmModel (p. 4)

• CreateDetectorModel (p. 11)

• CreateInput (p. 22)

• DeleteAlarmModel (p. 25)

• DeleteDetectorModel (p. 27)

• DeleteInput (p. 29)

• DescribeAlarmModel (p. 31)

• DescribeDetectorModel (p. 37)

• DescribeDetectorModelAnalysis (p. 46)

• DescribeInput (p. 48)

• DescribeLoggingOptions (p. 50)

• GetDetectorModelAnalysisResults (p. 52)

• ListAlarmModels (p. 55)

• ListAlarmModelVersions (p. 57)

• ListDetectorModels (p. 60)

• ListDetectorModelVersions (p. 62)

• ListInputRoutings (p. 65)

• ListInputs (p. 68)

• ListTagsForResource (p. 70)

• PutLoggingOptions (p. 72)

• StartDetectorModelAnalysis (p. 74)

• TagResource (p. 83)

• UntagResource (p. 85)

• UpdateAlarmModel (p. 87)

• UpdateDetectorModel (p. 93)

• UpdateInput (p. 103)

(9)

CreateAlarmModel

CreateAlarmModel

Service: AWS IoT Events

Creates an alarm model to monitor an AWS IoT Events input attribute. 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.

Request Syntax

POST /alarm-models HTTP/1.1 Content-type: application/json {

"alarmCapabilities": { "acknowledgeFlow": { "enabled": boolean },

"initializationConfiguration": { "disabledOnInitialization": boolean }

},

"alarmEventActions": { "alarmActions": [ {

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string",

(10)

CreateAlarmModel

"entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} }, "sns": { "payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

}, "sqs": { "payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ] },

"alarmModelDescription": "string", "alarmModelName": "string",

"alarmNotification": { "notificationActions": [ {

"action": {

"lambdaAction": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

}

(11)

CreateAlarmModel

"additionalMessage": "string", "subject": "string"

},

"from": "string", "recipients": { "to": [ {

"ssoIdentity": {

"identityStoreId": "string", "userId": "string"

} } ] } } ],

"smsConfigurations": [ {

"additionalMessage": "string", "recipients": [

{

"ssoIdentity": {

"identityStoreId": "string", "userId": "string"

} } ],

"senderId": "string"

} ] } ] },

"alarmRule": { "simpleRule": {

"comparisonOperator": "string", "inputProperty": "string", "threshold": "string"

} },

"key": "string", "roleArn": "string", "severity": number, "tags": [

{

"key": "string", "value": "string"

} ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

alarmCapabilities (p. 4)

Contains the configuration information of alarm state changes.

Type: AlarmCapabilities (p. 145) object

(12)

CreateAlarmModel

Required: No

alarmEventActions (p. 4)

Contains information about one or more alarm actions.

Type: AlarmEventActions (p. 146) object Required: No

alarmModelDescription (p. 4)

A description that tells you what the alarm model detects.

Type: String

Length Constraints: Maximum length of 128.

Required: No alarmModelName (p. 4)

A unique name that helps you identify the alarm model. You can't change this name after you create the alarm model.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes alarmNotification (p. 4)

Contains information about one or more notification actions.

Type: AlarmNotification (p. 150) object Required: No

alarmRule (p. 4)

Defines when your alarm is invoked.

Type: AlarmRule (p. 151) object Required: Yes

key (p. 4)

An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this key to the alarm.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^((`[\w\- ]+`)|([\w\-]+))(\.((`[\w- ]+`)|([\w\-]+)))*$

Required: No

(13)

CreateAlarmModel

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: Yes severity (p. 4)

A non-negative integer that reflects the severity level of the alarm.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 2147483647.

Required: No tags (p. 4)

A list of key-value pairs that contain metadata for the alarm model. The tags help you manage the alarm model. For more information, see Tagging your AWS IoT Events resources in the AWS IoT Events Developer Guide.

You can create up to 50 tags for one alarm model.

Type: Array of Tag (p. 213) objects Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json {

"alarmModelArn": "string", "alarmModelVersion": "string", "creationTime": number, "lastUpdateTime": number, "status": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

alarmModelArn (p. 8)

The ARN of the alarm model. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference.

Type: String

alarmModelVersion (p. 8)

The version of the alarm model.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

(14)

CreateAlarmModel

creationTime (p. 8)

The time the alarm model was created, in the Unix epoch format.

Type: Timestamp lastUpdateTime (p. 8)

The time the alarm model was last updated, in the Unix epoch format.

Type: Timestamp status (p. 8)

The status of the alarm model. The status can be one of the following values:

• ACTIVE - The alarm model is active and it's ready to evaluate data.

• ACTIVATING - AWS IoT Events is activating your alarm model. Activating an alarm model can take up to a few minutes.

• INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. Check your alarm model information and update the alarm model.

• FAILED - You couldn't create or update the alarm model. Check your alarm model information and try again.

Type: String

Valid Values: ACTIVE | ACTIVATING | INACTIVE | FAILED

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

HTTP Status Code: 400 LimitExceededException

A limit was exceeded.

HTTP Status Code: 410 ResourceAlreadyExistsException

The resource already exists.

HTTP Status Code: 409 ResourceInUseException

The resource is in use.

(15)

CreateAlarmModel

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(16)

CreateDetectorModel

CreateDetectorModel

Service: AWS IoT Events Creates a detector model.

Request Syntax

POST /detector-models HTTP/1.1 Content-type: application/json {

"detectorModelDefinition": { "initialStateName": "string", "states": [

{

"onEnter": { "events": [ {

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

(17)

CreateDetectorModel

"propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string", "seconds": number,

"timerName": "string"

},

"setVariable": { "value": "string", "variableName": "string"

},

"sns": { "payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

},

"sqs": { "payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ],

"condition": "string", "eventName": "string"

} ] },

"onExit": { "events": [

(18)

CreateDetectorModel

{

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} }

(19)

CreateDetectorModel

"type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string", "seconds": number,

"timerName": "string"

},

"setVariable": { "value": "string", "variableName": "string"

},

"sns": { "payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

},

"sqs": { "payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ],

"condition": "string", "eventName": "string"

} ] },

"onInput": { "events": [ {

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

(20)

CreateDetectorModel

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string",

(21)

CreateDetectorModel

"variableName": "string"

},

"sns": { "payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

},

"sqs": { "payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ],

"condition": "string", "eventName": "string"

} ],

"transitionEvents": [ {

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

}

(22)

CreateDetectorModel

},

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string", "seconds": number,

"timerName": "string"

},

"setVariable": { "value": "string", "variableName": "string"

},

"sns": { "payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

},

"sqs": { "payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

(23)

CreateDetectorModel

} ] },

"stateName": "string"

} ] },

"detectorModelDescription": "string", "detectorModelName": "string", "evaluationMethod": "string", "key": "string",

"roleArn": "string", "tags": [

{

"key": "string", "value": "string"

} ]}

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

detectorModelDefinition (p. 11)

Information that defines how the detectors operate.

Type: DetectorModelDefinition (p. 165) object Required: Yes

detectorModelDescription (p. 11)

A brief description of the detector model.

Type: String

Length Constraints: Maximum length of 128.

Required: No

detectorModelName (p. 11)

The name of the detector model.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

evaluationMethod (p. 11)

Information about the order in which events are evaluated and how actions are executed.

Default: BATCH

(24)

CreateDetectorModel

Type: String

Valid Values: BATCH | SERIAL Required: No

key (p. 11)

The input attribute key used to identify a device or system to create a detector (an instance of the detector model) and then to route each input received to the appropriate detector (instance).

This parameter uses a JSON-path expression in the message payload of each input to specify the attribute-value pair that is used to identify the device associated with the input.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^((`[\w\- ]+`)|([\w\-]+))(\.((`[\w- ]+`)|([\w\-]+)))*$

Required: No roleArn (p. 11)

The ARN of the role that grants permission to AWS IoT Events to perform its operations.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: Yes tags (p. 11)

Metadata that can be used to manage the detector model.

Type: Array of Tag (p. 213) objects Required: No

Response Syntax

HTTP/1.1 200

Content-type: application/json { "detectorModelConfiguration": { "creationTime": number, "detectorModelArn": "string",

"detectorModelDescription": "string", "detectorModelName": "string", "detectorModelVersion": "string", "evaluationMethod": "string", "key": "string",

"lastUpdateTime": number, "roleArn": "string", "status": "string"

} }

(25)

CreateDetectorModel

The following data is returned in JSON format by the service.

detectorModelConfiguration (p. 19)

Information about how the detector model is configured.

Type: DetectorModelConfiguration (p. 163) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

HTTP Status Code: 400 LimitExceededException

A limit was exceeded.

HTTP Status Code: 410 ResourceAlreadyExistsException

The resource already exists.

HTTP Status Code: 409 ResourceInUseException

The resource is in use.

HTTP Status Code: 409 ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

(26)

CreateDetectorModel

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(27)

CreateInput

CreateInput

Service: AWS IoT Events Creates an input.

Request Syntax

POST /inputs HTTP/1.1

Content-type: application/json { "inputDefinition": { "attributes": [ {

"jsonPath": "string"

} ] },

"inputDescription": "string", "inputName": "string",

"tags": [ {

"key": "string", "value": "string"

} ]}

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

inputDefinition (p. 22)

The definition of the input.

Type: InputDefinition (p. 183) object Required: Yes

inputDescription (p. 22)

A brief description of the input.

Type: String

Length Constraints: Maximum length of 128.

Required: No inputName (p. 22)

The name you want to give to the input.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

(28)

CreateInput

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$

Required: Yes tags (p. 22)

Metadata that can be used to manage the input.

Type: Array of Tag (p. 213) objects Required: No

Response Syntax

HTTP/1.1 201

Content-type: application/json { "inputConfiguration": { "creationTime": number, "inputArn": "string",

"inputDescription": "string", "inputName": "string", "lastUpdateTime": number, "status": "string"

}}

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

inputConfiguration (p. 23)

Information about the configuration of the input.

Type: InputConfiguration (p. 181) object

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

HTTP Status Code: 400

(29)

CreateInput

ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(30)

DeleteAlarmModel

DeleteAlarmModel

Service: AWS IoT Events

Deletes an alarm model. Any alarm instances that were created based on this alarm model are also deleted. This action can't be undone.

Request Syntax

DELETE /alarm-models/alarmModelName HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

alarmModelName (p. 25)

The name of the alarm model.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

(31)

DeleteAlarmModel

HTTP Status Code: 409 ResourceNotFoundException

The resource was not found.

HTTP Status Code: 404 ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(32)

DeleteDetectorModel

DeleteDetectorModel

Service: AWS IoT Events

Deletes a detector model. Any active instances of the detector model are also deleted.

Request Syntax

DELETE /detector-models/detectorModelName HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

detectorModelName (p. 27)

The name of the detector model to be deleted.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 204

Response Elements

If the action is successful, the service sends back an HTTP 204 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

HTTP Status Code: 400

(33)

DeleteDetectorModel

ResourceNotFoundException The resource was not found.

HTTP Status Code: 404 ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(34)

DeleteInput

DeleteInput

Service: AWS IoT Events Deletes an input.

Request Syntax

DELETE /inputs/inputName HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

inputName (p. 29)

The name of the input to delete.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Response Elements

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

HTTP Status Code: 400

(35)

DeleteInput

ResourceNotFoundException The resource was not found.

HTTP Status Code: 404 ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(36)

DescribeAlarmModel

DescribeAlarmModel

Service: AWS IoT Events

Retrieves information about an alarm model. If you don't specify a value for the alarmModelVersion parameter, the latest version is returned.

Request Syntax

GET /alarm-models/alarmModelName?version=alarmModelVersion HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

alarmModelName (p. 31)

The name of the alarm model.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

alarmModelVersion (p. 31)

The version of the alarm model.

Length Constraints: Minimum length of 1. Maximum length of 128.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "alarmCapabilities": { "acknowledgeFlow": { "enabled": boolean },

"initializationConfiguration": { "disabledOnInitialization": boolean }

},

"alarmEventActions": { "alarmActions": [ {

"dynamoDB": {

"hashKeyField": "string",

(37)

DescribeAlarmModel

"type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} }, "sns": { "payload": {

"contentExpression": "string",

(38)

DescribeAlarmModel

"type": "string"

},

"targetArn": "string"

}, "sqs": { "payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ] },

"alarmModelArn": "string",

"alarmModelDescription": "string", "alarmModelName": "string",

"alarmModelVersion": "string", "alarmNotification": { "notificationActions": [ {

"action": {

"lambdaAction": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} } },

"emailConfigurations": [ {

"content": {

"additionalMessage": "string", "subject": "string"

},

"from": "string", "recipients": { "to": [ {

"ssoIdentity": {

"identityStoreId": "string", "userId": "string"

} } ] } } ],

"smsConfigurations": [ {

"additionalMessage": "string", "recipients": [

{

"ssoIdentity": {

"identityStoreId": "string", "userId": "string"

} } ],

(39)

DescribeAlarmModel

},

"alarmRule": { "simpleRule": {

"comparisonOperator": "string", "inputProperty": "string", "threshold": "string"

} },

"creationTime": number, "key": "string",

"lastUpdateTime": number, "roleArn": "string", "severity": number, "status": "string", "statusMessage": "string"

}

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

alarmCapabilities (p. 31)

Contains the configuration information of alarm state changes.

Type: AlarmCapabilities (p. 145) object alarmEventActions (p. 31)

Contains information about one or more alarm actions.

Type: AlarmEventActions (p. 146) object alarmModelArn (p. 31)

The ARN of the alarm model. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference.

Type: String

alarmModelDescription (p. 31)

The description of the alarm model.

Type: String

Length Constraints: Maximum length of 128.

alarmModelName (p. 31)

The name of the alarm model.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

alarmModelVersion (p. 31)

The version of the alarm model.

Type: String

(40)

DescribeAlarmModel

Length Constraints: Minimum length of 1. Maximum length of 128.

alarmNotification (p. 31)

Contains information about one or more notification actions.

Type: AlarmNotification (p. 150) object alarmRule (p. 31)

Defines when your alarm is invoked.

Type: AlarmRule (p. 151) object creationTime (p. 31)

The time the alarm model was created, in the Unix epoch format.

Type: Timestamp key (p. 31)

An input attribute used as a key to create an alarm. AWS IoT Events routes inputs associated with this key to the alarm.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^((`[\w\- ]+`)|([\w\-]+))(\.((`[\w- ]+`)|([\w\-]+)))*$

lastUpdateTime (p. 31)

The time the alarm model was last updated, in the Unix epoch format.

Type: Timestamp roleArn (p. 31)

The ARN of the IAM role that allows the alarm to perform actions and access AWS resources. For more information, see Amazon Resource Names (ARNs) in the AWS General Reference.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

severity (p. 31)

A non-negative integer that reflects the severity level of the alarm.

Type: Integer

Valid Range: Minimum value of 0. Maximum value of 2147483647.

status (p. 31)

The status of the alarm model. The status can be one of the following values:

• ACTIVE - The alarm model is active and it's ready to evaluate data.

• ACTIVATING - AWS IoT Events is activating your alarm model. Activating an alarm model can take up to a few minutes.

• INACTIVE - The alarm model is inactive, so it isn't ready to evaluate data. Check your alarm model information and update the alarm model.

(41)

DescribeAlarmModel

Valid Values: ACTIVE | ACTIVATING | INACTIVE | FAILED statusMessage (p. 31)

Contains information about the status of the alarm model.

Type: String

Errors

For information about the errors that are common to all actions, see Common Errors (p. 263).

InternalFailureException An internal failure occurred.

HTTP Status Code: 500 InvalidRequestException

The request was invalid.

HTTP Status Code: 400 ResourceNotFoundException

The resource was not found.

HTTP Status Code: 404 ServiceUnavailableException

The service is currently unavailable.

HTTP Status Code: 503 ThrottlingException

The request could not be completed due to throttling.

HTTP Status Code: 429

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

(42)

DescribeDetectorModel

DescribeDetectorModel

Service: AWS IoT Events

Describes a detector model. If the version parameter is not specified, information about the latest version is returned.

Request Syntax

GET /detector-models/detectorModelName?version=detectorModelVersion HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

detectorModelName (p. 37)

The name of the detector model.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^[a-zA-Z0-9_-]+$

Required: Yes

detectorModelVersion (p. 37)

The version of the detector model.

Length Constraints: Minimum length of 1. Maximum length of 128.

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "detectorModel": {

"detectorModelConfiguration": { "creationTime": number, "detectorModelArn": "string",

"detectorModelDescription": "string", "detectorModelName": "string", "detectorModelVersion": "string", "evaluationMethod": "string", "key": "string",

"lastUpdateTime": number, "roleArn": "string",

(43)

DescribeDetectorModel

{

"onEnter": { "events": [ {

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": {

(44)

DescribeDetectorModel

"mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string", "seconds": number,

"timerName": "string"

},

"setVariable": { "value": "string", "variableName": "string"

}, "sns": {

"payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

}, "sqs": {

"payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ],

"condition": "string", "eventName": "string"

} ] },

"onExit": { "events": [ {

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

(45)

DescribeDetectorModel

"rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"separator": "string"

},

"iotEvents": {

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string", "seconds": number,

"timerName": "string"

(46)

DescribeDetectorModel

},

"setVariable": { "value": "string", "variableName": "string"

}, "sns": {

"payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

}, "sqs": {

"payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

} ],

"condition": "string", "eventName": "string"

} ] },

"onInput": { "events": [ {

"actions": [ {

"clearTimer": {

"timerName": "string"

},

"dynamoDB": {

"hashKeyField": "string", "hashKeyType": "string", "hashKeyValue": "string", "operation": "string", "payload": {

"contentExpression": "string", "type": "string"

},

"payloadField": "string", "rangeKeyField": "string", "rangeKeyType": "string", "rangeKeyValue": "string", "tableName": "string"

},

"dynamoDBv2": { "payload": {

"contentExpression": "string", "type": "string"

},

"tableName": "string"

},

"firehose": {

"deliveryStreamName": "string", "payload": {

"contentExpression": "string",

(47)

DescribeDetectorModel

"inputName": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"iotSiteWise": { "assetId": "string", "entryId": "string", "propertyAlias": "string", "propertyId": "string", "propertyValue": { "quality": "string", "timestamp": {

"offsetInNanos": "string", "timeInSeconds": "string"

},

"value": {

"booleanValue": "string", "doubleValue": "string", "integerValue": "string", "stringValue": "string"

} } },

"iotTopicPublish": { "mqttTopic": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"lambda": {

"functionArn": "string", "payload": {

"contentExpression": "string", "type": "string"

} },

"resetTimer": {

"timerName": "string"

},

"setTimer": {

"durationExpression": "string", "seconds": number,

"timerName": "string"

},

"setVariable": { "value": "string", "variableName": "string"

}, "sns": {

"payload": {

"contentExpression": "string", "type": "string"

},

"targetArn": "string"

}, "sqs": {

"payload": {

"contentExpression": "string", "type": "string"

},

"queueUrl": "string", "useBase64": boolean }

參考文獻

相關文件

• Extension risk is due to the slowdown of prepayments when interest rates climb, making the investor earn the security’s lower coupon rate rather than the market’s higher rate.

• A delta-gamma hedge is a delta hedge that maintains zero portfolio gamma; it is gamma neutral.. • To meet this extra condition, one more security needs to be

了⼀一個方案,用以尋找滿足 Calabi 方程的空 間,這些空間現在通稱為 Calabi-Yau 空間。.

• ‘ content teachers need to support support the learning of those parts of language knowledge that students are missing and that may be preventing them mastering the

volume suppressed mass: (TeV) 2 /M P ∼ 10 −4 eV → mm range can be experimentally tested for any number of extra dimensions - Light U(1) gauge bosons: no derivative couplings. =>

• Formation of massive primordial stars as origin of objects in the early universe. • Supernova explosions might be visible to the most

• P u is the price of the i-period zero-coupon bond one period from now if the short rate makes an up move. • P d is the price of the i-period zero-coupon bond one period from now

(Another example of close harmony is the four-bar unaccompanied vocal introduction to “Paperback Writer”, a somewhat later Beatles song.) Overall, Lennon’s and McCartney’s