1// Code generated by smithy-go-codegen DO NOT EDIT. 2 3package types 4 5import ( 6 "time" 7) 8 9// An action to be performed when the condition is TRUE. 10type Action struct { 11 12 // Information needed to clear the timer. 13 ClearTimer *ClearTimerAction 14 15 // Writes to the DynamoDB table that you created. The default action payload 16 // contains all attribute-value pairs that have the information about the detector 17 // model instance and the event that triggered the action. You can customize the 18 // payload 19 // (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). 20 // One column of the DynamoDB table receives all attribute-value pairs in the 21 // payload that you specify. For more information, see Actions 22 // (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) 23 // in AWS IoT Events Developer Guide. 24 DynamoDB *DynamoDBAction 25 26 // Writes to the DynamoDB table that you created. The default action payload 27 // contains all attribute-value pairs that have the information about the detector 28 // model instance and the event that triggered the action. You can customize the 29 // payload 30 // (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). A 31 // separate column of the DynamoDB table receives one attribute-value pair in the 32 // payload that you specify. For more information, see Actions 33 // (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-event-actions.html) 34 // in AWS IoT Events Developer Guide. 35 DynamoDBv2 *DynamoDBv2Action 36 37 // Sends information about the detector model instance and the event that triggered 38 // the action to an Amazon Kinesis Data Firehose delivery stream. 39 Firehose *FirehoseAction 40 41 // Sends AWS IoT Events input, which passes information about the detector model 42 // instance and the event that triggered the action. 43 IotEvents *IotEventsAction 44 45 // Sends information about the detector model instance and the event that triggered 46 // the action to an asset property in AWS IoT SiteWise . 47 IotSiteWise *IotSiteWiseAction 48 49 // Publishes an MQTT message with the given topic to the AWS IoT message broker. 50 IotTopicPublish *IotTopicPublishAction 51 52 // Calls a Lambda function, passing in information about the detector model 53 // instance and the event that triggered the action. 54 Lambda *LambdaAction 55 56 // Information needed to reset the timer. 57 ResetTimer *ResetTimerAction 58 59 // Information needed to set the timer. 60 SetTimer *SetTimerAction 61 62 // Sets a variable to a specified value. 63 SetVariable *SetVariableAction 64 65 // Sends an Amazon SNS message. 66 Sns *SNSTopicPublishAction 67 68 // Sends information about the detector model instance and the event that triggered 69 // the action to an Amazon SQS queue. 70 Sqs *SqsAction 71} 72 73// Contains the result of the analysis. 74type AnalysisResult struct { 75 76 // The severity level of the analysis result. Analysis results fall into three 77 // general categories based on the severity level: 78 // 79 // * INFO - An information result 80 // informs you about a significant field in your detector model. This type of 81 // result usually doesn't require immediate action. 82 // 83 // * WARNING - A warning result 84 // draws special attention to fields that are potentially damaging to your detector 85 // model. We recommend that you review warnings and take necessary actions before 86 // you use your detetor model in production environments. Otherwise, the detector 87 // model may not fully function as expected. 88 // 89 // * ERROR - An error result notifies 90 // you about a problem found in your detector model. You must fix all errors before 91 // you can publish your detector model. 92 Level AnalysisResultLevel 93 94 // Contains one or more locations that you can use to locate the fields in your 95 // detector model that the analysis result references. 96 Locations []AnalysisResultLocation 97 98 // Contains additional information about the analysis result. 99 Message *string 100 101 // The type of the analysis result. Analyses fall into the following types based on 102 // the validators used to generate the analysis result: 103 // 104 // * supported-actions - You 105 // must specify AWS IoT Events supported actions that work with other AWS services 106 // in a supported AWS Region. 107 // 108 // * service-limits - Resources or operations can't 109 // exceed service limits. Update your detector model or request a limit adjust. 110 // 111 // * 112 // structure - The detector model must follow a structure that AWS IoT Events 113 // supports. 114 // 115 // * expression-syntax - Your expression must follow the required 116 // syntax. 117 // 118 // * data-type - Data types referenced in the detector model must be 119 // compatible. 120 // 121 // * referenced-data - You must define the data referenced in your 122 // detector model before you can use the data. 123 // 124 // * referenced-resource - Resources 125 // that the detector model uses must be available. 126 // 127 // For more information, see 128 // Running detector model analyses 129 // (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-analyze-api.html) 130 // in the AWS IoT Events Developer Guide. 131 Type *string 132} 133 134// Contains information that you can use to locate the field in your detector model 135// that the analysis result references. 136type AnalysisResultLocation struct { 137 138 // A JsonPath (https://github.com/json-path/JsonPath) expression that identifies 139 // the error field in your detector model. 140 Path *string 141} 142 143// A structure that contains timestamp information. For more information, see 144// TimeInNanos 145// (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_TimeInNanos.html) 146// in the AWS IoT SiteWise API Reference. You must use expressions for all 147// parameters in AssetPropertyTimestamp. The expressions accept literals, 148// operators, functions, references, and substitution templates. Examples 149// 150// * For 151// literal values, the expressions must contain single quotes. For example, the 152// value for the timeInSeconds parameter can be '1586400675'. 153// 154// * For references, 155// you must specify either variables or input values. For example, the value for 156// the offsetInNanos parameter can be $variable.time. 157// 158// * For a substitution 159// template, you must use ${}, and the template must be in single quotes. A 160// substitution template can also contain a combination of literals, operators, 161// functions, references, and substitution templates. In the following example, the 162// value for the timeInSeconds parameter uses a substitution template. 163// '${$input.TemperatureInput.sensorData.timestamp / 1000}' 164// 165// For more information, 166// see Expressions 167// (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 168// in the AWS IoT Events Developer Guide. 169type AssetPropertyTimestamp struct { 170 171 // The timestamp, in seconds, in the Unix epoch format. The valid range is between 172 // 1-31556889864403199. 173 // 174 // This member is required. 175 TimeInSeconds *string 176 177 // The nanosecond offset converted from timeInSeconds. The valid range is between 178 // 0-999999999. 179 OffsetInNanos *string 180} 181 182// A structure that contains value information. For more information, see 183// AssetPropertyValue 184// (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetPropertyValue.html) 185// in the AWS IoT SiteWise API Reference. You must use expressions for all 186// parameters in AssetPropertyValue. The expressions accept literals, operators, 187// functions, references, and substitution templates. Examples 188// 189// * For literal 190// values, the expressions must contain single quotes. For example, the value for 191// the quality parameter can be 'GOOD'. 192// 193// * For references, you must specify either 194// variables or input values. For example, the value for the quality parameter can 195// be $input.TemperatureInput.sensorData.quality. 196// 197// For more information, see 198// Expressions 199// (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 200// in the AWS IoT Events Developer Guide. 201type AssetPropertyValue struct { 202 203 // The value to send to an asset property. 204 // 205 // This member is required. 206 Value *AssetPropertyVariant 207 208 // The quality of the asset property value. The value must be 'GOOD', 'BAD', or 209 // 'UNCERTAIN'. 210 Quality *string 211 212 // The timestamp associated with the asset property value. The default is the 213 // current event time. 214 Timestamp *AssetPropertyTimestamp 215} 216 217// A structure that contains an asset property value. For more information, see 218// Variant 219// (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_Variant.html) 220// in the AWS IoT SiteWise API Reference. You must use expressions for all 221// parameters in AssetPropertyVariant. The expressions accept literals, operators, 222// functions, references, and substitution templates. Examples 223// 224// * For literal 225// values, the expressions must contain single quotes. For example, the value for 226// the integerValue parameter can be '100'. 227// 228// * For references, you must specify 229// either variables or parameters. For example, the value for the booleanValue 230// parameter can be $variable.offline. 231// 232// * For a substitution template, you must use 233// ${}, and the template must be in single quotes. A substitution template can also 234// contain a combination of literals, operators, functions, references, and 235// substitution templates. In the following example, the value for the doubleValue 236// parameter uses a substitution template. 237// '${$input.TemperatureInput.sensorData.temperature * 6 / 5 + 32}' 238// 239// For more 240// information, see Expressions 241// (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 242// in the AWS IoT Events Developer Guide. You must specify one of the following 243// value types, depending on the dataType of the specified asset property. For more 244// information, see AssetProperty 245// (https://docs.aws.amazon.com/iot-sitewise/latest/APIReference/API_AssetProperty.html) 246// in the AWS IoT SiteWise API Reference. 247type AssetPropertyVariant struct { 248 249 // The asset property value is a Boolean value that must be 'TRUE' or 'FALSE'. You 250 // must use an expression, and the evaluated result should be a Boolean value. 251 BooleanValue *string 252 253 // The asset property value is a double. You must use an expression, and the 254 // evaluated result should be a double. 255 DoubleValue *string 256 257 // The asset property value is an integer. You must use an expression, and the 258 // evaluated result should be an integer. 259 IntegerValue *string 260 261 // The asset property value is a string. You must use an expression, and the 262 // evaluated result should be a string. 263 StringValue *string 264} 265 266// The attributes from the JSON payload that are made available by the input. 267// Inputs are derived from messages sent to the AWS IoT Events system using 268// BatchPutMessage. Each such message contains a JSON payload. Those attributes 269// (and their paired values) specified here are available for use in the condition 270// expressions used by detectors. 271type Attribute struct { 272 273 // An expression that specifies an attribute-value pair in a JSON structure. Use 274 // this to specify an attribute from the JSON payload that is made available by the 275 // input. Inputs are derived from messages sent to AWS IoT Events 276 // (BatchPutMessage). Each such message contains a JSON payload. The attribute (and 277 // its paired value) specified here are available for use in the condition 278 // expressions used by detectors. Syntax: .... 279 // 280 // This member is required. 281 JsonPath *string 282} 283 284// Information needed to clear the timer. 285type ClearTimerAction struct { 286 287 // The name of the timer to clear. 288 // 289 // This member is required. 290 TimerName *string 291} 292 293// The detector model and the specific detectors (instances) for which the logging 294// level is given. 295type DetectorDebugOption struct { 296 297 // The name of the detector model. 298 // 299 // This member is required. 300 DetectorModelName *string 301 302 // The value of the input attribute key used to create the detector (the instance 303 // of the detector model). 304 KeyValue *string 305} 306 307// Information about the detector model. 308type DetectorModel struct { 309 310 // Information about how the detector is configured. 311 DetectorModelConfiguration *DetectorModelConfiguration 312 313 // Information that defines how a detector operates. 314 DetectorModelDefinition *DetectorModelDefinition 315} 316 317// Information about how the detector model is configured. 318type DetectorModelConfiguration struct { 319 320 // The time the detector model was created. 321 CreationTime *time.Time 322 323 // The ARN of the detector model. 324 DetectorModelArn *string 325 326 // A brief description of the detector model. 327 DetectorModelDescription *string 328 329 // The name of the detector model. 330 DetectorModelName *string 331 332 // The version of the detector model. 333 DetectorModelVersion *string 334 335 // Information about the order in which events are evaluated and how actions are 336 // executed. 337 EvaluationMethod EvaluationMethod 338 339 // The value used to identify a detector instance. When a device or system sends 340 // input, a new detector instance with a unique key value is created. AWS IoT 341 // Events can continue to route input to its corresponding detector instance based 342 // on this identifying information. This parameter uses a JSON-path expression to 343 // select the attribute-value pair in the message payload that is used for 344 // identification. To route the message to the correct detector instance, the 345 // device must send a message payload that contains the same attribute-value. 346 Key *string 347 348 // The time the detector model was last updated. 349 LastUpdateTime *time.Time 350 351 // The ARN of the role that grants permission to AWS IoT Events to perform its 352 // operations. 353 RoleArn *string 354 355 // The status of the detector model. 356 Status DetectorModelVersionStatus 357} 358 359// Information that defines how a detector operates. 360type DetectorModelDefinition struct { 361 362 // The state that is entered at the creation of each detector (instance). 363 // 364 // This member is required. 365 InitialStateName *string 366 367 // Information about the states of the detector. 368 // 369 // This member is required. 370 States []State 371} 372 373// Information about the detector model. 374type DetectorModelSummary struct { 375 376 // The time the detector model was created. 377 CreationTime *time.Time 378 379 // A brief description of the detector model. 380 DetectorModelDescription *string 381 382 // The name of the detector model. 383 DetectorModelName *string 384} 385 386// Information about the detector model version. 387type DetectorModelVersionSummary struct { 388 389 // The time the detector model version was created. 390 CreationTime *time.Time 391 392 // The ARN of the detector model version. 393 DetectorModelArn *string 394 395 // The name of the detector model. 396 DetectorModelName *string 397 398 // The ID of the detector model version. 399 DetectorModelVersion *string 400 401 // Information about the order in which events are evaluated and how actions are 402 // executed. 403 EvaluationMethod EvaluationMethod 404 405 // The last time the detector model version was updated. 406 LastUpdateTime *time.Time 407 408 // The ARN of the role that grants the detector model permission to perform its 409 // tasks. 410 RoleArn *string 411 412 // The status of the detector model version. 413 Status DetectorModelVersionStatus 414} 415 416// Defines an action to write to the Amazon DynamoDB table that you created. The 417// standard action payload contains all the information about the detector model 418// instance and the event that triggered the action. You can customize the payload 419// (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). 420// One column of the DynamoDB table receives all attribute-value pairs in the 421// payload that you specify. You must use expressions for all parameters in 422// DynamoDBAction. The expressions accept literals, operators, functions, 423// references, and substitution templates. Examples 424// 425// * For literal values, the 426// expressions must contain single quotes. For example, the value for the 427// hashKeyType parameter can be 'STRING'. 428// 429// * For references, you must specify 430// either variables or input values. For example, the value for the hashKeyField 431// parameter can be $input.GreenhouseInput.name. 432// 433// * For a substitution template, 434// you must use ${}, and the template must be in single quotes. A substitution 435// template can also contain a combination of literals, operators, functions, 436// references, and substitution templates. In the following example, the value for 437// the hashKeyValue parameter uses a substitution template. 438// '${$input.GreenhouseInput.temperature * 6 / 5 + 32} in Fahrenheit' 439// 440// * For a 441// string concatenation, you must use +. A string concatenation can also contain a 442// combination of literals, operators, functions, references, and substitution 443// templates. In the following example, the value for the tableName parameter uses 444// a string concatenation. 'GreenhouseTemperatureTable ' + 445// $input.GreenhouseInput.date 446// 447// For more information, see Expressions 448// (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 449// in the AWS IoT Events Developer Guide. If the defined payload type is a string, 450// DynamoDBAction writes non-JSON data to the DynamoDB table as binary data. The 451// DynamoDB console displays the data as Base64-encoded text. The value for the 452// payloadField parameter is _raw. 453type DynamoDBAction struct { 454 455 // The name of the hash key (also called the partition key). The hashKeyField value 456 // must match the partition key of the target DynamoDB table. 457 // 458 // This member is required. 459 HashKeyField *string 460 461 // The value of the hash key (also called the partition key). 462 // 463 // This member is required. 464 HashKeyValue *string 465 466 // The name of the DynamoDB table. The tableName value must match the table name of 467 // the target DynamoDB table. 468 // 469 // This member is required. 470 TableName *string 471 472 // The data type for the hash key (also called the partition key). You can specify 473 // the following values: 474 // 475 // * 'STRING' - The hash key is a string. 476 // 477 // * 'NUMBER' - The 478 // hash key is a number. 479 // 480 // If you don't specify hashKeyType, the default value is 481 // 'STRING'. 482 HashKeyType *string 483 484 // The type of operation to perform. You can specify the following values: 485 // 486 // * 487 // 'INSERT' - Insert data as a new item into the DynamoDB table. This item uses the 488 // specified hash key as a partition key. If you specified a range key, the item 489 // uses the range key as a sort key. 490 // 491 // * 'UPDATE' - Update an existing item of the 492 // DynamoDB table with new data. This item's partition key must match the specified 493 // hash key. If you specified a range key, the range key must match the item's sort 494 // key. 495 // 496 // * 'DELETE' - Delete an existing item of the DynamoDB table. This item's 497 // partition key must match the specified hash key. If you specified a range key, 498 // the range key must match the item's sort key. 499 // 500 // If you don't specify this 501 // parameter, AWS IoT Events triggers the 'INSERT' operation. 502 Operation *string 503 504 // Information needed to configure the payload. By default, AWS IoT Events 505 // generates a standard payload in JSON for any action. This action payload 506 // contains all attribute-value pairs that have the information about the detector 507 // model instance and the event triggered the action. To configure the action 508 // payload, you can use contentExpression. 509 Payload *Payload 510 511 // The name of the DynamoDB column that receives the action payload. If you don't 512 // specify this parameter, the name of the DynamoDB column is payload. 513 PayloadField *string 514 515 // The name of the range key (also called the sort key). The rangeKeyField value 516 // must match the sort key of the target DynamoDB table. 517 RangeKeyField *string 518 519 // The data type for the range key (also called the sort key), You can specify the 520 // following values: 521 // 522 // * 'STRING' - The range key is a string. 523 // 524 // * 'NUMBER' - The 525 // range key is number. 526 // 527 // If you don't specify rangeKeyField, the default value is 528 // 'STRING'. 529 RangeKeyType *string 530 531 // The value of the range key (also called the sort key). 532 RangeKeyValue *string 533} 534 535// Defines an action to write to the Amazon DynamoDB table that you created. The 536// default action payload contains all the information about the detector model 537// instance and the event that triggered the action. You can customize the payload 538// (https://docs.aws.amazon.com/iotevents/latest/apireference/API_Payload.html). A 539// separate column of the DynamoDB table receives one attribute-value pair in the 540// payload that you specify. You must use expressions for all parameters in 541// DynamoDBv2Action. The expressions accept literals, operators, functions, 542// references, and substitution templates. Examples 543// 544// * For literal values, the 545// expressions must contain single quotes. For example, the value for the tableName 546// parameter can be 'GreenhouseTemperatureTable'. 547// 548// * For references, you must 549// specify either variables or input values. For example, the value for the 550// tableName parameter can be $variable.ddbtableName. 551// 552// * For a substitution 553// template, you must use ${}, and the template must be in single quotes. A 554// substitution template can also contain a combination of literals, operators, 555// functions, references, and substitution templates. In the following example, the 556// value for the contentExpression parameter in Payload uses a substitution 557// template. '{\"sensorID\": \"${$input.GreenhouseInput.sensor_id}\", 558// \"temperature\": \"${$input.GreenhouseInput.temperature * 9 / 5 + 32}\"}' 559// 560// * For 561// a string concatenation, you must use +. A string concatenation can also contain 562// a combination of literals, operators, functions, references, and substitution 563// templates. In the following example, the value for the tableName parameter uses 564// a string concatenation. 'GreenhouseTemperatureTable ' + 565// $input.GreenhouseInput.date 566// 567// For more information, see Expressions 568// (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 569// in the AWS IoT Events Developer Guide. The value for the type parameter in 570// Payload must be JSON. 571type DynamoDBv2Action struct { 572 573 // The name of the DynamoDB table. 574 // 575 // This member is required. 576 TableName *string 577 578 // Information needed to configure the payload. By default, AWS IoT Events 579 // generates a standard payload in JSON for any action. This action payload 580 // contains all attribute-value pairs that have the information about the detector 581 // model instance and the event triggered the action. To configure the action 582 // payload, you can use contentExpression. 583 Payload *Payload 584} 585 586// Specifies the actions to be performed when the condition evaluates to TRUE. 587type Event struct { 588 589 // The name of the event. 590 // 591 // This member is required. 592 EventName *string 593 594 // The actions to be performed. 595 Actions []Action 596 597 // Optional. The Boolean expression that, when TRUE, causes the actions to be 598 // performed. If not present, the actions are performed (=TRUE). If the expression 599 // result is not a Boolean value, the actions are not performed (=FALSE). 600 Condition *string 601} 602 603// Sends information about the detector model instance and the event that triggered 604// the action to an Amazon Kinesis Data Firehose delivery stream. 605type FirehoseAction struct { 606 607 // The name of the Kinesis Data Firehose delivery stream where the data is written. 608 // 609 // This member is required. 610 DeliveryStreamName *string 611 612 // You can configure the action payload when you send a message to an Amazon 613 // Kinesis Data Firehose delivery stream. 614 Payload *Payload 615 616 // A character separator that is used to separate records written to the Kinesis 617 // Data Firehose delivery stream. Valid values are: '\n' (newline), '\t' (tab), 618 // '\r\n' (Windows newline), ',' (comma). 619 Separator *string 620} 621 622// Information about the input. 623type Input struct { 624 625 // Information about the configuration of an input. 626 InputConfiguration *InputConfiguration 627 628 // The definition of the input. 629 InputDefinition *InputDefinition 630} 631 632// Information about the configuration of an input. 633type InputConfiguration struct { 634 635 // The time the input was created. 636 // 637 // This member is required. 638 CreationTime *time.Time 639 640 // The ARN of the input. 641 // 642 // This member is required. 643 InputArn *string 644 645 // The name of the input. 646 // 647 // This member is required. 648 InputName *string 649 650 // The last time the input was updated. 651 // 652 // This member is required. 653 LastUpdateTime *time.Time 654 655 // The status of the input. 656 // 657 // This member is required. 658 Status InputStatus 659 660 // A brief description of the input. 661 InputDescription *string 662} 663 664// The definition of the input. 665type InputDefinition struct { 666 667 // The attributes from the JSON payload that are made available by the input. 668 // Inputs are derived from messages sent to the AWS IoT Events system using 669 // BatchPutMessage. Each such message contains a JSON payload, and those attributes 670 // (and their paired values) specified here are available for use in the condition 671 // expressions used by detectors that monitor this input. 672 // 673 // This member is required. 674 Attributes []Attribute 675} 676 677// Information about the input. 678type InputSummary struct { 679 680 // The time the input was created. 681 CreationTime *time.Time 682 683 // The ARN of the input. 684 InputArn *string 685 686 // A brief description of the input. 687 InputDescription *string 688 689 // The name of the input. 690 InputName *string 691 692 // The last time the input was updated. 693 LastUpdateTime *time.Time 694 695 // The status of the input. 696 Status InputStatus 697} 698 699// Sends an AWS IoT Events input, passing in information about the detector model 700// instance and the event that triggered the action. 701type IotEventsAction struct { 702 703 // The name of the AWS IoT Events input where the data is sent. 704 // 705 // This member is required. 706 InputName *string 707 708 // You can configure the action payload when you send a message to an AWS IoT 709 // Events input. 710 Payload *Payload 711} 712 713// Sends information about the detector model instance and the event that triggered 714// the action to a specified asset property in AWS IoT SiteWise. You must use 715// expressions for all parameters in IotSiteWiseAction. The expressions accept 716// literals, operators, functions, references, and substitutions templates. 717// Examples 718// 719// * For literal values, the expressions must contain single quotes. For 720// example, the value for the propertyAlias parameter can be 721// '/company/windfarm/3/turbine/7/temperature'. 722// 723// * For references, you must specify 724// either variables or input values. For example, the value for the assetId 725// parameter can be $input.TurbineInput.assetId1. 726// 727// * For a substitution template, 728// you must use ${}, and the template must be in single quotes. A substitution 729// template can also contain a combination of literals, operators, functions, 730// references, and substitution templates. In the following example, the value for 731// the propertyAlias parameter uses a substitution template. 732// 'company/windfarm/${$input.TemperatureInput.sensorData.windfarmID}/turbine/ 733// ${$input.TemperatureInput.sensorData.turbineID}/temperature' 734// 735// You must specify 736// either propertyAlias or both assetId and propertyId to identify the target asset 737// property in AWS IoT SiteWise. For more information, see Expressions 738// (https://docs.aws.amazon.com/iotevents/latest/developerguide/iotevents-expressions.html) 739// in the AWS IoT Events Developer Guide. 740type IotSiteWiseAction struct { 741 742 // The value to send to the asset property. This value contains timestamp, quality, 743 // and value (TQV) information. 744 // 745 // This member is required. 746 PropertyValue *AssetPropertyValue 747 748 // The ID of the asset that has the specified property. 749 AssetId *string 750 751 // A unique identifier for this entry. You can use the entry ID to track which data 752 // entry causes an error in case of failure. The default is a new unique 753 // identifier. 754 EntryId *string 755 756 // The alias of the asset property. 757 PropertyAlias *string 758 759 // The ID of the asset property. 760 PropertyId *string 761} 762 763// Information required to publish the MQTT message through the AWS IoT message 764// broker. 765type IotTopicPublishAction struct { 766 767 // The MQTT topic of the message. You can use a string expression that includes 768 // variables ($variable.) and input values ($input..) as the topic string. 769 // 770 // This member is required. 771 MqttTopic *string 772 773 // You can configure the action payload when you publish a message to an AWS IoT 774 // Core topic. 775 Payload *Payload 776} 777 778// Calls a Lambda function, passing in information about the detector model 779// instance and the event that triggered the action. 780type LambdaAction struct { 781 782 // The ARN of the Lambda function that is executed. 783 // 784 // This member is required. 785 FunctionArn *string 786 787 // You can configure the action payload when you send a message to a Lambda 788 // function. 789 Payload *Payload 790} 791 792// The values of the AWS IoT Events logging options. 793type LoggingOptions struct { 794 795 // If TRUE, logging is enabled for AWS IoT Events. 796 // 797 // This member is required. 798 Enabled bool 799 800 // The logging level. 801 // 802 // This member is required. 803 Level LoggingLevel 804 805 // The ARN of the role that grants permission to AWS IoT Events to perform logging. 806 // 807 // This member is required. 808 RoleArn *string 809 810 // Information that identifies those detector models and their detectors 811 // (instances) for which the logging level is given. 812 DetectorDebugOptions []DetectorDebugOption 813} 814 815// When entering this state, perform these actions if the condition is TRUE. 816type OnEnterLifecycle struct { 817 818 // Specifies the actions that are performed when the state is entered and the 819 // condition is TRUE. 820 Events []Event 821} 822 823// When exiting this state, perform these actions if the specified condition is 824// TRUE. 825type OnExitLifecycle struct { 826 827 // Specifies the actions that are performed when the state is exited and the 828 // condition is TRUE. 829 Events []Event 830} 831 832// Specifies the actions performed when the condition evaluates to TRUE. 833type OnInputLifecycle struct { 834 835 // Specifies the actions performed when the condition evaluates to TRUE. 836 Events []Event 837 838 // Specifies the actions performed, and the next state entered, when a condition 839 // evaluates to TRUE. 840 TransitionEvents []TransitionEvent 841} 842 843// Information needed to configure the payload. By default, AWS IoT Events 844// generates a standard payload in JSON for any action. This action payload 845// contains all attribute-value pairs that have the information about the detector 846// model instance and the event triggered the action. To configure the action 847// payload, you can use contentExpression. 848type Payload struct { 849 850 // The content of the payload. You can use a string expression that includes quoted 851 // strings (''), variables ($variable.), input values ($input..), string 852 // concatenations, and quoted strings that contain ${} as the content. The 853 // recommended maximum size of a content expression is 1 KB. 854 // 855 // This member is required. 856 ContentExpression *string 857 858 // The value of the payload type can be either STRING or JSON. 859 // 860 // This member is required. 861 Type PayloadType 862} 863 864// Information required to reset the timer. The timer is reset to the previously 865// evaluated result of the duration. The duration expression isn't reevaluated when 866// you reset the timer. 867type ResetTimerAction struct { 868 869 // The name of the timer to reset. 870 // 871 // This member is required. 872 TimerName *string 873} 874 875// Information needed to set the timer. 876type SetTimerAction struct { 877 878 // The name of the timer. 879 // 880 // This member is required. 881 TimerName *string 882 883 // The duration of the timer, in seconds. You can use a string expression that 884 // includes numbers, variables ($variable.), and input values ($input..) as the 885 // duration. The range of the duration is 1-31622400 seconds. To ensure accuracy, 886 // the minimum duration is 60 seconds. The evaluated result of the duration is 887 // rounded down to the nearest whole number. 888 DurationExpression *string 889 890 // The number of seconds until the timer expires. The minimum value is 60 seconds 891 // to ensure accuracy. The maximum value is 31622400 seconds. 892 // 893 // Deprecated: seconds is deprecated. You can use durationExpression for 894 // SetTimerAction. The value of seconds can be used as a string expression for 895 // durationExpression. 896 Seconds *int32 897} 898 899// Information about the variable and its new value. 900type SetVariableAction struct { 901 902 // The new value of the variable. 903 // 904 // This member is required. 905 Value *string 906 907 // The name of the variable. 908 // 909 // This member is required. 910 VariableName *string 911} 912 913// Information required to publish the Amazon SNS message. 914type SNSTopicPublishAction struct { 915 916 // The ARN of the Amazon SNS target where the message is sent. 917 // 918 // This member is required. 919 TargetArn *string 920 921 // You can configure the action payload when you send a message as an Amazon SNS 922 // push notification. 923 Payload *Payload 924} 925 926// Sends information about the detector model instance and the event that triggered 927// the action to an Amazon SQS queue. 928type SqsAction struct { 929 930 // The URL of the SQS queue where the data is written. 931 // 932 // This member is required. 933 QueueUrl *string 934 935 // You can configure the action payload when you send a message to an Amazon SQS 936 // queue. 937 Payload *Payload 938 939 // Set this to TRUE if you want the data to be base-64 encoded before it is written 940 // to the queue. Otherwise, set this to FALSE. 941 UseBase64 *bool 942} 943 944// Information that defines a state of a detector. 945type State struct { 946 947 // The name of the state. 948 // 949 // This member is required. 950 StateName *string 951 952 // When entering this state, perform these actions if the condition is TRUE. 953 OnEnter *OnEnterLifecycle 954 955 // When exiting this state, perform these actions if the specified condition is 956 // TRUE. 957 OnExit *OnExitLifecycle 958 959 // When an input is received and the condition is TRUE, perform the specified 960 // actions. 961 OnInput *OnInputLifecycle 962} 963 964// Metadata that can be used to manage the resource. 965type Tag struct { 966 967 // The tag's key. 968 // 969 // This member is required. 970 Key *string 971 972 // The tag's value. 973 // 974 // This member is required. 975 Value *string 976} 977 978// Specifies the actions performed and the next state entered when a condition 979// evaluates to TRUE. 980type TransitionEvent struct { 981 982 // Required. A Boolean expression that when TRUE causes the actions to be performed 983 // and the nextState to be entered. 984 // 985 // This member is required. 986 Condition *string 987 988 // The name of the transition event. 989 // 990 // This member is required. 991 EventName *string 992 993 // The next state to enter. 994 // 995 // This member is required. 996 NextState *string 997 998 // The actions to be performed. 999 Actions []Action 1000} 1001