@aws-sdk/client-iot
Version:
AWS SDK for JavaScript Iot Client for Node.js, Browser and React Native
1,514 lines • 201 kB
TypeScript
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { IoTServiceException as __BaseException } from "./IoTServiceException";
/**
* @public
* @enum
*/
export declare const AbortAction: {
readonly CANCEL: "CANCEL";
};
/**
* @public
*/
export type AbortAction = (typeof AbortAction)[keyof typeof AbortAction];
/**
* @public
* @enum
*/
export declare const JobExecutionFailureType: {
readonly ALL: "ALL";
readonly FAILED: "FAILED";
readonly REJECTED: "REJECTED";
readonly TIMED_OUT: "TIMED_OUT";
};
/**
* @public
*/
export type JobExecutionFailureType = (typeof JobExecutionFailureType)[keyof typeof JobExecutionFailureType];
/**
* <p>The criteria that determine when and how a job abort takes place.</p>
* @public
*/
export interface AbortCriteria {
/**
* <p>The type of job execution failures that can initiate a job abort.</p>
* @public
*/
failureType: JobExecutionFailureType | undefined;
/**
* <p>The type of job action to take to initiate the job abort.</p>
* @public
*/
action: AbortAction | undefined;
/**
* <p>The minimum percentage of job execution failures that must occur to initiate the job abort.</p>
* <p>Amazon Web Services IoT Core supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).</p>
* @public
*/
thresholdPercentage: number | undefined;
/**
* <p>The minimum number of things which must receive job execution notifications before the job
* can be aborted.</p>
* @public
*/
minNumberOfExecutedThings: number | undefined;
}
/**
* <p>The criteria that determine when and how a job abort takes place.</p>
* @public
*/
export interface AbortConfig {
/**
* <p>The list of criteria that determine when and how to abort the job.</p>
* @public
*/
criteriaList: AbortCriteria[] | undefined;
}
/**
* <p>The input for the AcceptCertificateTransfer operation.</p>
* @public
*/
export interface AcceptCertificateTransferRequest {
/**
* <p>The ID of the certificate. (The last part of the certificate ARN contains the
* certificate ID.)</p>
* @public
*/
certificateId: string | undefined;
/**
* <p>Specifies whether the certificate is active.</p>
* @public
*/
setAsActive?: boolean;
}
/**
* <p>An unexpected error has occurred.</p>
* @public
*/
export declare class InternalFailureException extends __BaseException {
readonly name: "InternalFailureException";
readonly $fault: "server";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InternalFailureException, __BaseException>);
}
/**
* <p>The request is not valid.</p>
* @public
*/
export declare class InvalidRequestException extends __BaseException {
readonly name: "InvalidRequestException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<InvalidRequestException, __BaseException>);
}
/**
* <p>The specified resource does not exist.</p>
* @public
*/
export declare class ResourceNotFoundException extends __BaseException {
readonly name: "ResourceNotFoundException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ResourceNotFoundException, __BaseException>);
}
/**
* <p>The service is temporarily unavailable.</p>
* @public
*/
export declare class ServiceUnavailableException extends __BaseException {
readonly name: "ServiceUnavailableException";
readonly $fault: "server";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ServiceUnavailableException, __BaseException>);
}
/**
* <p>The rate exceeds the limit.</p>
* @public
*/
export declare class ThrottlingException extends __BaseException {
readonly name: "ThrottlingException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>);
}
/**
* <p>You can't revert the certificate transfer because the transfer is already
* complete.</p>
* @public
*/
export declare class TransferAlreadyCompletedException extends __BaseException {
readonly name: "TransferAlreadyCompletedException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<TransferAlreadyCompletedException, __BaseException>);
}
/**
* <p>You are not authorized to perform this operation.</p>
* @public
*/
export declare class UnauthorizedException extends __BaseException {
readonly name: "UnauthorizedException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
}
/**
* <p>Describes an action that updates a CloudWatch alarm.</p>
* @public
*/
export interface CloudwatchAlarmAction {
/**
* <p>The IAM role that allows access to the CloudWatch alarm.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The CloudWatch alarm name.</p>
* @public
*/
alarmName: string | undefined;
/**
* <p>The reason for the alarm change.</p>
* @public
*/
stateReason: string | undefined;
/**
* <p>The value of the alarm state. Acceptable values are: OK, ALARM,
* INSUFFICIENT_DATA.</p>
* @public
*/
stateValue: string | undefined;
}
/**
* <p>Describes an action that sends data to CloudWatch Logs.</p>
* @public
*/
export interface CloudwatchLogsAction {
/**
* <p>The IAM role that allows access to the CloudWatch log.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The CloudWatch log group to which the action sends data.</p>
* @public
*/
logGroupName: string | undefined;
/**
* <p>Indicates whether batches of log records will be extracted and uploaded into CloudWatch. Values include <code>true</code> or <code>false</code>
* <i>(default)</i>.</p>
* @public
*/
batchMode?: boolean;
}
/**
* <p>Describes an action that captures a CloudWatch metric.</p>
* @public
*/
export interface CloudwatchMetricAction {
/**
* <p>The IAM role that allows access to the CloudWatch metric.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The CloudWatch metric namespace name.</p>
* @public
*/
metricNamespace: string | undefined;
/**
* <p>The CloudWatch metric name.</p>
* @public
*/
metricName: string | undefined;
/**
* <p>The CloudWatch metric value.</p>
* @public
*/
metricValue: string | undefined;
/**
* <p>The <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#Unit">metric
* unit</a> supported by CloudWatch.</p>
* @public
*/
metricUnit: string | undefined;
/**
* <p>An optional <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/cloudwatch_concepts.html#about_timestamp">Unix timestamp</a>.</p>
* @public
*/
metricTimestamp?: string;
}
/**
* @public
* @enum
*/
export declare const DynamoKeyType: {
readonly NUMBER: "NUMBER";
readonly STRING: "STRING";
};
/**
* @public
*/
export type DynamoKeyType = (typeof DynamoKeyType)[keyof typeof DynamoKeyType];
/**
* <p>Describes an action to write to a DynamoDB table.</p>
* <p>The <code>tableName</code>, <code>hashKeyField</code>, and <code>rangeKeyField</code>
* values must match the values used when you created the table.</p>
* <p>The <code>hashKeyValue</code> and <code>rangeKeyvalue</code> fields use a
* substitution template syntax. These templates provide data at runtime. The syntax is as
* follows: $\{<i>sql-expression</i>\}.</p>
* <p>You can specify any valid expression in a WHERE or SELECT clause, including JSON
* properties, comparisons, calculations, and functions. For example, the following field uses
* the third level of the topic:</p>
* <p>
* <code>"hashKeyValue": "$\{topic(3)\}"</code>
* </p>
* <p>The following field uses the timestamp:</p>
* <p>
* <code>"rangeKeyValue": "$\{timestamp()\}"</code>
* </p>
* @public
*/
export interface DynamoDBAction {
/**
* <p>The name of the DynamoDB table.</p>
* @public
*/
tableName: string | undefined;
/**
* <p>The ARN of the IAM role that grants access to the DynamoDB table.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The type of operation to be performed. This follows the substitution template, so it
* can be <code>$\{operation\}</code>, but the substitution must result in one of the following:
* <code>INSERT</code>, <code>UPDATE</code>, or <code>DELETE</code>.</p>
* @public
*/
operation?: string;
/**
* <p>The hash key name.</p>
* @public
*/
hashKeyField: string | undefined;
/**
* <p>The hash key value.</p>
* @public
*/
hashKeyValue: string | undefined;
/**
* <p>The hash key type. Valid values are "STRING" or "NUMBER"</p>
* @public
*/
hashKeyType?: DynamoKeyType;
/**
* <p>The range key name.</p>
* @public
*/
rangeKeyField?: string;
/**
* <p>The range key value.</p>
* @public
*/
rangeKeyValue?: string;
/**
* <p>The range key type. Valid values are "STRING" or "NUMBER"</p>
* @public
*/
rangeKeyType?: DynamoKeyType;
/**
* <p>The action payload. This name can be customized.</p>
* @public
*/
payloadField?: string;
}
/**
* <p>The input for the DynamoActionVS action that specifies the DynamoDB table to which
* the message data will be written.</p>
* @public
*/
export interface PutItemInput {
/**
* <p>The table where the message data will be written.</p>
* @public
*/
tableName: string | undefined;
}
/**
* <p>Describes an action to write to a DynamoDB table.</p>
* <p>This DynamoDB action writes each attribute in the message payload into it's own
* column in the DynamoDB table.</p>
* @public
*/
export interface DynamoDBv2Action {
/**
* <p>The ARN of the IAM role that grants access to the DynamoDB table.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>Specifies the DynamoDB table to which the message data will be written. For
* example:</p>
* <p>
* <code>\{ "dynamoDBv2": \{ "roleArn": "aws:iam:12341251:my-role" "putItem": \{ "tableName":
* "my-table" \} \} \}</code>
* </p>
* <p>Each attribute in the message payload will be written to a separate column in the
* DynamoDB database.</p>
* @public
*/
putItem: PutItemInput | undefined;
}
/**
* <p>Describes an action that writes data to an Amazon OpenSearch Service
* domain.</p>
* <note>
* <p>The <code>Elasticsearch</code> action can only be used by existing rule actions. To create a
* new rule action or to update an existing rule action, use the
* <code>OpenSearch</code> rule action instead. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html">OpenSearchAction</a>.</p>
* </note>
* @public
*/
export interface ElasticsearchAction {
/**
* <p>The IAM role ARN that has access to OpenSearch.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The endpoint of your OpenSearch domain.</p>
* @public
*/
endpoint: string | undefined;
/**
* <p>The index where you want to store your data.</p>
* @public
*/
index: string | undefined;
/**
* <p>The type of document you are storing.</p>
* @public
*/
type: string | undefined;
/**
* <p>The unique identifier for the document you are storing.</p>
* @public
*/
id: string | undefined;
}
/**
* <p>Describes an action that writes data to an Amazon Kinesis Firehose stream.</p>
* @public
*/
export interface FirehoseAction {
/**
* <p>The IAM role that grants access to the Amazon Kinesis Firehose stream.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The delivery stream name.</p>
* @public
*/
deliveryStreamName: string | undefined;
/**
* <p>A character separator that will be used to separate records written to the Firehose
* stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ','
* (comma).</p>
* @public
*/
separator?: string;
/**
* <p>Whether to deliver the Kinesis Data Firehose stream as a batch by using <a href="https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html">
* <code>PutRecordBatch</code>
* </a>. The default value is
* <code>false</code>.</p>
* <p>When <code>batchMode</code> is <code>true</code> and the rule's SQL statement
* evaluates to an Array, each Array element forms one record in the <a href="https://docs.aws.amazon.com/firehose/latest/APIReference/API_PutRecordBatch.html">
* <code>PutRecordBatch</code>
* </a> request. The resulting array can't have more
* than 500 records.</p>
* @public
*/
batchMode?: boolean;
}
/**
* <p>For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 signing process</a>.</p>
* @public
*/
export interface SigV4Authorization {
/**
* <p>The signing region.</p>
* @public
*/
signingRegion: string | undefined;
/**
* <p>The service name to use while signing with Sig V4.</p>
* @public
*/
serviceName: string | undefined;
/**
* <p>The ARN of the signing role.</p>
* @public
*/
roleArn: string | undefined;
}
/**
* <p>The authorization method used to send messages.</p>
* @public
*/
export interface HttpAuthorization {
/**
* <p>Use Sig V4 authorization. For more information, see <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature
* Version 4 Signing Process</a>.</p>
* @public
*/
sigv4?: SigV4Authorization;
}
/**
* <p>The HTTP action header.</p>
* @public
*/
export interface HttpActionHeader {
/**
* <p>The HTTP header key.</p>
* @public
*/
key: string | undefined;
/**
* <p>The HTTP header value. Substitution templates are supported.</p>
* @public
*/
value: string | undefined;
}
/**
* <p>Send data to an HTTPS endpoint.</p>
* @public
*/
export interface HttpAction {
/**
* <p>The endpoint URL. If substitution templates are used in the URL, you must also specify a
* <code>confirmationUrl</code>. If this is a new destination, a new
* <code>TopicRuleDestination</code> is created if possible.</p>
* @public
*/
url: string | undefined;
/**
* <p>The URL to which IoT sends a confirmation message. The value of the confirmation URL
* must be a prefix of the endpoint URL. If you do not specify a confirmation URL IoT uses
* the endpoint URL as the confirmation URL. If you use substitution templates in the
* confirmationUrl, you must create and enable topic rule destinations that match each
* possible value of the substitution template before traffic is allowed to your endpoint
* URL.</p>
* @public
*/
confirmationUrl?: string;
/**
* <p>The HTTP headers to send with the message data.</p>
* @public
*/
headers?: HttpActionHeader[];
/**
* <p>The authentication method to use when sending data to an HTTPS endpoint.</p>
* @public
*/
auth?: HttpAuthorization;
}
/**
* <p>Sends message data to an IoT Analytics channel.</p>
* @public
*/
export interface IotAnalyticsAction {
/**
* <p>(deprecated) The ARN of the IoT Analytics channel to which message data will be
* sent.</p>
* @public
*/
channelArn?: string;
/**
* <p>The name of the IoT Analytics channel to which message data will be sent.</p>
* @public
*/
channelName?: string;
/**
* <p>Whether to process the action as a batch. The default value is
* <code>false</code>.</p>
* <p>When <code>batchMode</code> is <code>true</code> and the rule SQL statement evaluates
* to an Array, each Array element is delivered as a separate message when passed by <a href="https://docs.aws.amazon.com/iotanalytics/latest/APIReference/API_BatchPutMessage.html">
* <code>BatchPutMessage</code>
* </a> to the IoT Analytics channel. The resulting array can't have more
* than 100 messages.</p>
* @public
*/
batchMode?: boolean;
/**
* <p>The ARN of the role which has a policy that grants IoT Analytics permission to send
* message data via IoT Analytics (iotanalytics:BatchPutMessage).</p>
* @public
*/
roleArn?: string;
}
/**
* <p>Sends an input to an IoT Events detector.</p>
* @public
*/
export interface IotEventsAction {
/**
* <p>The name of the IoT Events input.</p>
* @public
*/
inputName: string | undefined;
/**
* <p>The ID of the message. The default <code>messageId</code> is a new UUID value.</p>
* <p>When <code>batchMode</code> is <code>true</code>, you can't specify a
* <code>messageId</code>--a new UUID value will be assigned.</p>
* <p>Assign a value to this property to ensure that only one input (message) with a given
* <code>messageId</code> will be processed by an IoT Events detector.</p>
* @public
*/
messageId?: string;
/**
* <p>Whether to process the event actions as a batch. The default value is
* <code>false</code>.</p>
* <p>When <code>batchMode</code> is <code>true</code>, you can't specify a
* <code>messageId</code>. </p>
* <p>When <code>batchMode</code> is <code>true</code> and the rule SQL statement evaluates
* to an Array, each Array element is treated as a separate message when it's sent to IoT
* Events by calling <a href="https://docs.aws.amazon.com/iotevents/latest/apireference/API_iotevents-data_BatchPutMessage.html">
* <code>BatchPutMessage</code>
* </a>. The resulting array can't have more
* than 10 messages.</p>
* @public
*/
batchMode?: boolean;
/**
* <p>The ARN of the role that grants IoT permission to send an input to an IoT
* Events detector. ("Action":"iotevents:BatchPutMessage").</p>
* @public
*/
roleArn: string | undefined;
}
/**
* <p>An asset property timestamp entry containing the following information.</p>
* @public
*/
export interface AssetPropertyTimestamp {
/**
* <p>A string that contains the time in seconds since epoch. Accepts substitution
* templates.</p>
* @public
*/
timeInSeconds: string | undefined;
/**
* <p>Optional. A string that contains the nanosecond time offset. Accepts substitution
* templates.</p>
* @public
*/
offsetInNanos?: string;
}
/**
* <p>Contains an asset property value (of a single type).</p>
* @public
*/
export type AssetPropertyVariant = AssetPropertyVariant.BooleanValueMember | AssetPropertyVariant.DoubleValueMember | AssetPropertyVariant.IntegerValueMember | AssetPropertyVariant.StringValueMember | AssetPropertyVariant.$UnknownMember;
/**
* @public
*/
export declare namespace AssetPropertyVariant {
/**
* <p>Optional. The string value of the value entry. Accepts substitution templates.</p>
* @public
*/
interface StringValueMember {
stringValue: string;
integerValue?: never;
doubleValue?: never;
booleanValue?: never;
$unknown?: never;
}
/**
* <p>Optional. A string that contains the integer value of the value entry. Accepts
* substitution templates.</p>
* @public
*/
interface IntegerValueMember {
stringValue?: never;
integerValue: string;
doubleValue?: never;
booleanValue?: never;
$unknown?: never;
}
/**
* <p>Optional. A string that contains the double value of the value entry. Accepts substitution
* templates.</p>
* @public
*/
interface DoubleValueMember {
stringValue?: never;
integerValue?: never;
doubleValue: string;
booleanValue?: never;
$unknown?: never;
}
/**
* <p>Optional. A string that contains the boolean value (<code>true</code> or
* <code>false</code>) of the value entry. Accepts substitution templates.</p>
* @public
*/
interface BooleanValueMember {
stringValue?: never;
integerValue?: never;
doubleValue?: never;
booleanValue: string;
$unknown?: never;
}
/**
* @public
*/
interface $UnknownMember {
stringValue?: never;
integerValue?: never;
doubleValue?: never;
booleanValue?: never;
$unknown: [string, any];
}
interface Visitor<T> {
stringValue: (value: string) => T;
integerValue: (value: string) => T;
doubleValue: (value: string) => T;
booleanValue: (value: string) => T;
_: (name: string, value: any) => T;
}
const visit: <T>(value: AssetPropertyVariant, visitor: Visitor<T>) => T;
}
/**
* <p>An asset property value entry containing the following information.</p>
* @public
*/
export interface AssetPropertyValue {
/**
* <p>The value of the asset property.</p>
* @public
*/
value: AssetPropertyVariant | undefined;
/**
* <p>The asset property value timestamp.</p>
* @public
*/
timestamp: AssetPropertyTimestamp | undefined;
/**
* <p>Optional. A string that describes the quality of the value. Accepts substitution
* templates. Must be <code>GOOD</code>, <code>BAD</code>, or <code>UNCERTAIN</code>.</p>
* @public
*/
quality?: string;
}
/**
* <p>An asset property value entry containing the following information.</p>
* @public
*/
export interface PutAssetPropertyValueEntry {
/**
* <p>Optional. A unique identifier for this entry that you can define to better track which
* message caused an error in case of failure. Accepts substitution templates. Defaults to a new
* UUID.</p>
* @public
*/
entryId?: string;
/**
* <p>The ID of the IoT SiteWise asset. You must specify either a <code>propertyAlias</code>
* or both an <code>aliasId</code> and a <code>propertyId</code>. Accepts substitution
* templates.</p>
* @public
*/
assetId?: string;
/**
* <p>The ID of the asset's property. You must specify either a <code>propertyAlias</code> or
* both an <code>aliasId</code> and a <code>propertyId</code>. Accepts substitution
* templates.</p>
* @public
*/
propertyId?: string;
/**
* <p>The name of the property alias associated with your asset property. You must specify
* either a <code>propertyAlias</code> or both an <code>aliasId</code> and a
* <code>propertyId</code>. Accepts substitution templates.</p>
* @public
*/
propertyAlias?: string;
/**
* <p>A list of property values to insert that each contain timestamp, quality, and value (TQV)
* information.</p>
* @public
*/
propertyValues: AssetPropertyValue[] | undefined;
}
/**
* <p>Describes an action to send data from an MQTT message that triggered the rule to IoT
* SiteWise asset properties.</p>
* @public
*/
export interface IotSiteWiseAction {
/**
* <p>A list of asset property value entries.</p>
* @public
*/
putAssetPropertyValueEntries: PutAssetPropertyValueEntry[] | undefined;
/**
* <p>The ARN of the role that grants IoT permission to send an asset property value to IoT SiteWise. (<code>"Action": "iotsitewise:BatchPutAssetPropertyValue"</code>). The trust
* policy can restrict access to specific asset hierarchy paths.</p>
* @public
*/
roleArn: string | undefined;
}
/**
* <p>Specifies a Kafka header using key-value pairs when you create a Rule’s Kafka Action.
* You can use these headers to route data from IoT clients to downstream Kafka clusters
* without modifying your message payload.</p>
* <p>For more information about Rule's Kafka action, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html">Apache Kafka</a>.
* </p>
* @public
*/
export interface KafkaActionHeader {
/**
* <p>The key of the Kafka header.</p>
* @public
*/
key: string | undefined;
/**
* <p>The value of the Kafka header.</p>
* @public
*/
value: string | undefined;
}
/**
* <p>Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.</p>
* @public
*/
export interface KafkaAction {
/**
* <p>The ARN of Kafka action's VPC <code>TopicRuleDestination</code>.</p>
* @public
*/
destinationArn: string | undefined;
/**
* <p>The Kafka topic for messages to be sent to the Kafka broker.</p>
* @public
*/
topic: string | undefined;
/**
* <p>The Kafka message key.</p>
* @public
*/
key?: string;
/**
* <p>The Kafka message partition.</p>
* @public
*/
partition?: string;
/**
* <p>Properties of the Apache Kafka producer client.</p>
* @public
*/
clientProperties: Record<string, string> | undefined;
/**
* <p>The list of Kafka headers that you specify.</p>
* @public
*/
headers?: KafkaActionHeader[];
}
/**
* <p>Describes an action to write data to an Amazon Kinesis stream.</p>
* @public
*/
export interface KinesisAction {
/**
* <p>The ARN of the IAM role that grants access to the Amazon Kinesis stream.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The name of the Amazon Kinesis stream.</p>
* @public
*/
streamName: string | undefined;
/**
* <p>The partition key.</p>
* @public
*/
partitionKey?: string;
}
/**
* <p>Describes an action to invoke a Lambda function.</p>
* @public
*/
export interface LambdaAction {
/**
* <p>The ARN of the Lambda function.</p>
* @public
*/
functionArn: string | undefined;
}
/**
* <p>Describes how to interpret an application-defined timestamp value from an MQTT message
* payload and the precision of that value.</p>
* @public
*/
export interface LocationTimestamp {
/**
* <p>An expression that returns a long epoch time value.</p>
* @public
*/
value: string | undefined;
/**
* <p>The precision of the timestamp value that results from the expression
* described in <code>value</code>.</p>
* <p>Valid values: <code>SECONDS</code> | <code>MILLISECONDS</code> |
* <code>MICROSECONDS</code> | <code>NANOSECONDS</code>. The default is
* <code>MILLISECONDS</code>.</p>
* @public
*/
unit?: string;
}
/**
* <p>The Amazon Location rule action sends device location updates from
* an MQTT message to an Amazon Location tracker resource.</p>
* @public
*/
export interface LocationAction {
/**
* <p>The IAM role that grants permission to write to the Amazon Location resource.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The name of the tracker resource in Amazon Location in which the location is updated.</p>
* @public
*/
trackerName: string | undefined;
/**
* <p>The unique ID of the device providing the location data.</p>
* @public
*/
deviceId: string | undefined;
/**
* <p>The time that the location data was sampled. The default value is
* the time the MQTT message was processed.</p>
* @public
*/
timestamp?: LocationTimestamp;
/**
* <p>A string that evaluates to a double value that represents the
* latitude of the device's location.</p>
* @public
*/
latitude: string | undefined;
/**
* <p>A string that evaluates to a double value that represents the
* longitude of the device's location.</p>
* @public
*/
longitude: string | undefined;
}
/**
* <p>Describes an action that writes data to an Amazon OpenSearch Service
* domain.</p>
* @public
*/
export interface OpenSearchAction {
/**
* <p>The IAM role ARN that has access to OpenSearch.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The endpoint of your OpenSearch domain.</p>
* @public
*/
endpoint: string | undefined;
/**
* <p>The OpenSearch index where you want to store your data.</p>
* @public
*/
index: string | undefined;
/**
* <p>The type of document you are storing.</p>
* @public
*/
type: string | undefined;
/**
* <p>The unique identifier for the document you are storing.</p>
* @public
*/
id: string | undefined;
}
/**
* <p>A key-value pair that you define in the header. Both the key and the value are either
* literal strings or valid <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
* templates</a>.</p>
* @public
*/
export interface UserProperty {
/**
* <p>A key to be specified in <code>UserProperty</code>.</p>
* @public
*/
key: string | undefined;
/**
* <p>A value to be specified in <code>UserProperty</code>.</p>
* @public
*/
value: string | undefined;
}
/**
* <p>Specifies MQTT Version 5.0 headers information. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html"> MQTT</a> from
* Amazon Web Services IoT Core Developer Guide.</p>
* @public
*/
export interface MqttHeaders {
/**
* <p>An <code>Enum</code> string value that indicates whether the payload is formatted as
* UTF-8.</p>
* <p>Valid values are <code>UNSPECIFIED_BYTES</code> and <code>UTF8_DATA</code>.</p>
* <p>For more information, see <a href="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901111">
* Payload Format Indicator</a> from the MQTT Version 5.0 specification.</p>
* <p>Supports <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
* templates</a>.</p>
* @public
*/
payloadFormatIndicator?: string;
/**
* <p>A UTF-8 encoded string that describes the content of the publishing message.</p>
* <p>For more information, see <a href="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901118">
* Content Type</a> from the MQTT Version 5.0 specification.</p>
* <p>Supports <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
* templates</a>.</p>
* @public
*/
contentType?: string;
/**
* <p>A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe
* the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard
* characters.</p>
* <p>For more information, see <a href="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901114">
* Response Topic</a> from the MQTT Version 5.0 specification.</p>
* <p>Supports <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
* templates</a>.</p>
* @public
*/
responseTopic?: string;
/**
* <p>The base64-encoded binary data used by the sender of the request message to identify which request the response message is
* for when it's received.</p>
* <p>For more information, see <a href="https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901115">
* Correlation Data</a> from the MQTT Version 5.0 specification.</p>
* <note>
* <p>
* This binary data must be based64-encoded.
* </p>
* </note>
* <p>Supports <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
* templates</a>.</p>
* @public
*/
correlationData?: string;
/**
* <p>A user-defined integer value that will persist a message at the message broker for a
* specified amount of time to ensure that the message will expire if it's no longer relevant to
* the subscriber. The value of <code>messageExpiry</code> represents the number of seconds
* before it expires. For more information about the limits of <code>messageExpiry</code>, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html">Amazon Web Services IoT Core message broker and protocol
* limits and quotas </a> from the Amazon Web Services Reference Guide.</p>
* <p>Supports <a href="https://docs.aws.amazon.com/iot/latest/developerguide/iot-substitution-templates.html">substitution
* templates</a>.</p>
* @public
*/
messageExpiry?: string;
/**
* <p>An array of key-value pairs that you define in the MQTT5 header.</p>
* @public
*/
userProperties?: UserProperty[];
}
/**
* <p>Describes an action to republish to another topic.</p>
* @public
*/
export interface RepublishAction {
/**
* <p>The ARN of the IAM role that grants access.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The name of the MQTT topic.</p>
* @public
*/
topic: string | undefined;
/**
* <p>The Quality of Service (QoS) level to use when republishing messages. The default value
* is 0.</p>
* @public
*/
qos?: number;
/**
* <p>MQTT Version 5.0 headers information. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/mqtt.html">
* MQTT</a> from the Amazon Web Services IoT Core Developer Guide.</p>
* @public
*/
headers?: MqttHeaders;
}
/**
* @public
* @enum
*/
export declare const CannedAccessControlList: {
readonly AuthenticatedRead: "authenticated-read";
readonly AwsExecRead: "aws-exec-read";
readonly BucketOwnerFullControl: "bucket-owner-full-control";
readonly BucketOwnerRead: "bucket-owner-read";
readonly LogDeliveryWrite: "log-delivery-write";
readonly Private: "private";
readonly PublicRead: "public-read";
readonly PublicReadWrite: "public-read-write";
};
/**
* @public
*/
export type CannedAccessControlList = (typeof CannedAccessControlList)[keyof typeof CannedAccessControlList];
/**
* <p>Describes an action to write data to an Amazon S3 bucket.</p>
* @public
*/
export interface S3Action {
/**
* <p>The ARN of the IAM role that grants access.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The Amazon S3 bucket.</p>
* @public
*/
bucketName: string | undefined;
/**
* <p>The object key. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/list_amazons3.html">Actions, resources, and condition keys for Amazon S3</a>.</p>
* @public
*/
key: string | undefined;
/**
* <p>The Amazon S3 canned ACL that controls access to the object identified by the object
* key. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl">S3 canned ACLs</a>.</p>
* @public
*/
cannedAcl?: CannedAccessControlList;
}
/**
* <p>Describes an action to write a message to a Salesforce IoT Cloud Input
* Stream.</p>
* @public
*/
export interface SalesforceAction {
/**
* <p>The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The
* token is available from the Salesforce IoT Cloud platform after creation of the Input
* Stream.</p>
* @public
*/
token: string | undefined;
/**
* <p>The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from
* the Salesforce IoT Cloud platform after creation of the Input Stream.</p>
* @public
*/
url: string | undefined;
}
/**
* @public
* @enum
*/
export declare const MessageFormat: {
readonly JSON: "JSON";
readonly RAW: "RAW";
};
/**
* @public
*/
export type MessageFormat = (typeof MessageFormat)[keyof typeof MessageFormat];
/**
* <p>Describes an action to publish to an Amazon SNS topic.</p>
* @public
*/
export interface SnsAction {
/**
* <p>The ARN of the SNS topic.</p>
* @public
*/
targetArn: string | undefined;
/**
* <p>The ARN of the IAM role that grants access.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>(Optional) The message format of the message to publish. Accepted values are "JSON"
* and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine
* if the payload should be parsed and relevant platform-specific bits of the payload should
* be extracted. To read more about SNS message formats, see <a href="https://docs.aws.amazon.com/sns/latest/dg/json-formats.html">https://docs.aws.amazon.com/sns/latest/dg/json-formats.html</a> refer to their official documentation.</p>
* @public
*/
messageFormat?: MessageFormat;
}
/**
* <p>Describes an action to publish data to an Amazon SQS queue.</p>
* @public
*/
export interface SqsAction {
/**
* <p>The ARN of the IAM role that grants access.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The URL of the Amazon SQS queue.</p>
* @public
*/
queueUrl: string | undefined;
/**
* <p>Specifies whether to use Base64 encoding.</p>
* @public
*/
useBase64?: boolean;
}
/**
* <p>Starts execution of a Step Functions state machine.</p>
* @public
*/
export interface StepFunctionsAction {
/**
* <p>(Optional) A name will be given to the state machine execution consisting of this
* prefix followed by a UUID. Step Functions automatically creates a unique name for each state
* machine execution if one is not provided.</p>
* @public
*/
executionNamePrefix?: string;
/**
* <p>The name of the Step Functions state machine whose execution will be started.</p>
* @public
*/
stateMachineName: string | undefined;
/**
* <p>The ARN of the role that grants IoT permission to start execution of a state machine
* ("Action":"states:StartExecution").</p>
* @public
*/
roleArn: string | undefined;
}
/**
* <p>Metadata attributes of the time series that are written in each measure record.</p>
* @public
*/
export interface TimestreamDimension {
/**
* <p>The metadata dimension name. This is the name of the column in the
* Amazon Timestream database table record.</p>
* <p>Dimensions cannot be named: <code>measure_name</code>,
* <code>measure_value</code>, or <code>time</code>.
* These names are reserved. Dimension names cannot start
* with <code>ts_</code> or <code>measure_value</code> and
* they cannot contain the colon (<code>:</code>)
* character.</p>
* @public
*/
name: string | undefined;
/**
* <p>The value to write in this column of the database record.</p>
* @public
*/
value: string | undefined;
}
/**
* <p>Describes how to interpret an application-defined timestamp value from an MQTT message
* payload and the precision of that value.</p>
* @public
*/
export interface TimestreamTimestamp {
/**
* <p>An expression that returns a long epoch time value.</p>
* @public
*/
value: string | undefined;
/**
* <p>The precision of the timestamp value that results from the expression
* described in <code>value</code>.</p>
* <p>Valid values: <code>SECONDS</code> | <code>MILLISECONDS</code> |
* <code>MICROSECONDS</code> | <code>NANOSECONDS</code>. The default is
* <code>MILLISECONDS</code>.</p>
* @public
*/
unit: string | undefined;
}
/**
* <p>The Timestream rule action writes attributes (measures) from an MQTT message
* into an Amazon Timestream table. For more information, see the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html">Timestream</a>
* topic rule action documentation.</p>
* @public
*/
export interface TimestreamAction {
/**
* <p>The ARN of the role that grants permission to write to the
* Amazon Timestream database table.</p>
* @public
*/
roleArn: string | undefined;
/**
* <p>The name of an Amazon Timestream database.</p>
* @public
*/
databaseName: string | undefined;
/**
* <p>The name of the database table into which to write the measure records.</p>
* @public
*/
tableName: string | undefined;
/**
* <p>Metadata attributes of the time series that are written in each measure record.</p>
* @public
*/
dimensions: TimestreamDimension[] | undefined;
/**
* <p>Specifies an application-defined value to replace the default value assigned to the
* Timestream record's timestamp in the <code>time</code> column.</p>
* <p>You can use this property to specify the value and the precision of the Timestream
* record's timestamp. You can specify a value from the message payload or a value computed by
* a substitution template.</p>
* <p>If omitted, the topic rule action assigns the timestamp, in milliseconds, at the time it
* processed the rule. </p>
* @public
*/
timestamp?: TimestreamTimestamp;
}
/**
* <p>Describes the actions associated with a rule.</p>
* @public
*/
export interface Action {
/**
* <p>Write to a DynamoDB table.</p>
* @public
*/
dynamoDB?: DynamoDBAction;
/**
* <p>Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows
* you to write each attribute in an MQTT message payload into a separate DynamoDB
* column.</p>
* @public
*/
dynamoDBv2?: DynamoDBv2Action;
/**
* <p>Invoke a Lambda function.</p>
* @public
*/
lambda?: LambdaAction;
/**
* <p>Publish to an Amazon SNS topic.</p>
* @public
*/
sns?: SnsAction;
/**
* <p>Publish to an Amazon SQS queue.</p>
* @public
*/
sqs?: SqsAction;
/**
* <p>Write data to an Amazon Kinesis stream.</p>
* @public
*/
kinesis?: KinesisAction;
/**
* <p>Publish to another MQTT topic.</p>
* @public
*/
republish?: RepublishAction;
/**
* <p>Write to an Amazon S3 bucket.</p>
* @public
*/
s3?: S3Action;
/**
* <p>Write to an Amazon Kinesis Firehose stream.</p>
* @public
*/
firehose?: FirehoseAction;
/**
* <p>Capture a CloudWatch metric.</p>
* @public
*/
cloudwatchMetric?: CloudwatchMetricAction;
/**
* <p>Change the state of a CloudWatch alarm.</p>
* @public
*/
cloudwatchAlarm?: CloudwatchAlarmAction;
/**
* <p>Send data to CloudWatch Logs.</p>
* @public
*/
cloudwatchLogs?: CloudwatchLogsAction;
/**
* <p>Write data to an Amazon OpenSearch Service domain.</p>
* <note>
* <p>The <code>Elasticsearch</code> action can only be used by existing rule actions.
* To create a new rule action or to update an existing rule action, use the
* <code>OpenSearch</code> rule action instead. For more information, see
* <a href="https://docs.aws.amazon.com/iot/latest/apireference/API_OpenSearchAction.html">OpenSearchAction</a>.</p>
* </note>
* @public
*/
elasticsearch?: ElasticsearchAction;
/**
* <p>Send a message to a Salesforce IoT Cloud Input Stream.</p>
* @public
*/
salesforce?: SalesforceAction;
/**
* <p>Sends message data to an IoT Analytics channel.</p>
* @public
*/
iotAnalytics?: IotAnalyticsAction;
/**
* <p>Sends an input to an IoT Events detector.</p>
* @public
*/
iotEvents?: IotEventsAction;
/**
* <p>Sends data from the MQTT message that triggered the rule to IoT SiteWise asset
* properties.</p>
* @public
*/
iotSiteWise?: IotSiteWiseAction;
/**
* <p>Starts execution of a Step Functions state machine.</p>
* @public
*/
stepFunctions?: StepFunctionsAction;
/**
* <p>The Timestream rule action writes attributes (measures) from an MQTT message
* into an Amazon Timestream table. For more information, see the <a href="https://docs.aws.amazon.com/iot/latest/developerguide/timestream-rule-action.html">Timestream</a>
* topic rule action documentation.</p>
* @public
*/
timestream?: TimestreamAction;
/**
* <p>Send data to an HTTPS endpoint.</p>
* @public
*/
http?: HttpAction;
/**
* <p>Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.</p>
* @public
*/
kafka?: KafkaAction;
/**
* <p>Write data to an Amazon OpenSearch Service domain.</p>
* @public
*/
openSearch?: OpenSearchAction;
/**
* <p>The Amazon Location Service rule action sends device location updates from
* an MQTT message to an Amazon Location tracker resource.</p>
* @public
*/
location?: LocationAction;
}
/**
* @public
* @enum
*/
export declare const ActionType: {
readonly CONNECT: "CONNECT";
readonly PUBLISH: "PUBLISH";
readonly RECEIVE: "RECEIVE";
readonly SUBSCRIBE: "SUBSCRIBE";
};
/**
* @public
*/
export type ActionType = (typeof ActionType)[keyof typeof ActionType];
/**
* @public
* @enum
*/
export declare const ComparisonOperator: {
readonly GREATER_THAN: "greater-than";
readonly GREATER_THAN_EQUALS: "greater-than-equals";
readonly IN_CIDR_SET: "in-cidr-set";
readonly IN_PORT_SET: "in-port-set";
readonly IN_SET: "in-set";
readonly LESS_THAN: "less-than";
readonly LESS_THAN_EQUALS: "less-than-equals";
readonly NOT_IN_CIDR_SET: "not-in-cidr-set";
readonly NOT_IN_PORT_SET: "not-in-port-set";
readonly NOT_IN_SET: "not-in-set";
};
/**
* @public
*/
export type ComparisonOperator = (typeof ComparisonOperator)[keyof typeof ComparisonOperator];
/**
* @public
* @enum
*/
export declare const ConfidenceLevel: {
readonly HIGH: "HIGH";
readonly LOW: "LOW";
readonly MEDIUM: "MEDIUM";
};
/**
* @public
*/
export type ConfidenceLevel = (typeof ConfidenceLevel)[keyof typeof ConfidenceLevel];
/**
* <p>
* The configuration of an ML Detect Security Profile.
* </p>
* @public
*/
export interface MachineLearningDetectionConfig {
/**
* <p>
* The sensitivity of anomalous behavior evaluation. Can be <code>Low</code>, <code>Medium</code>, or <code>High</code>.
* </p>
* @public
*/
confidenceLevel: ConfidenceLevel | undefined;
}
/**
* <p>A statistical ranking (percentile) that
* indicates a threshold value by which a behavior is determined to be in compliance or in
* violation of the behavior.</p>
* @public
*/
export interface StatisticalThreshold {
/**
* <p>The percentile that
* resolves to a threshold value by which compliance with a behavior is determined. Metrics are
* collected over the specified period (<code>durationSeconds</code>) from all reporting devices
* in your account and statistical ranks are calculated. Then, the measurements from a device are
* collected over the same period. If the accumulated measurements from the device fall above or
* below (<code>comparisonOperator</code>) the value associated with the percentile specified,
* then the device is considered to be in compliance with the behavior, otherwise