AWS Tools for Windows PowerShell
Command Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Synopsis

Calls the AWS IoT CreateTopicRule API operation.

Syntax

New-IOTTopicRule
-TopicRulePayload_Action <Action[]>
-CloudwatchAlarm_AlarmName <String>
-TopicRulePayload_AwsIotSqlVersion <String>
-S3_BucketName <String>
-S3_CannedAcl <CannedAccessControlList>
-IotAnalytics_ChannelArn <String>
-IotAnalytics_ChannelName <String>
-Firehose_DeliveryStreamName <String>
-TopicRulePayload_Description <String>
-Elasticsearch_Endpoint <String>
-StepFunctions_ExecutionNamePrefix <String>
-Lambda_FunctionArn <String>
-DynamoDB_HashKeyField <String>
-DynamoDB_HashKeyType <DynamoKeyType>
-DynamoDB_HashKeyValue <String>
-Elasticsearch_Id <String>
-Elasticsearch_Index <String>
-IotEvents_InputName <String>
-S3_Key <String>
-Sns_MessageFormat <MessageFormat>
-IotEvents_MessageId <String>
-CloudwatchMetric_MetricName <String>
-CloudwatchMetric_MetricNamespace <String>
-CloudwatchMetric_MetricTimestamp <String>
-CloudwatchMetric_MetricUnit <String>
-CloudwatchMetric_MetricValue <String>
-DynamoDB_Operation <String>
-Kinesis_PartitionKey <String>
-DynamoDB_PayloadField <String>
-Sqs_QueueUrl <String>
-DynamoDB_RangeKeyField <String>
-DynamoDB_RangeKeyType <DynamoKeyType>
-DynamoDB_RangeKeyValue <String>
-CloudwatchAlarm_RoleArn <String>
-CloudwatchMetric_RoleArn <String>
-DynamoDB_RoleArn <String>
-DynamoDBv2_RoleArn <String>
-Elasticsearch_RoleArn <String>
-Firehose_RoleArn <String>
-IotAnalytics_RoleArn <String>
-IotEvents_RoleArn <String>
-Kinesis_RoleArn <String>
-Republish_RoleArn <String>
-S3_RoleArn <String>
-Sns_RoleArn <String>
-Sqs_RoleArn <String>
-StepFunctions_RoleArn <String>
-TopicRulePayload_RuleDisabled <Boolean>
-RuleName <String>
-Firehose_Separator <String>
-TopicRulePayload_Sql <String>
-StepFunctions_StateMachineName <String>
-CloudwatchAlarm_StateReason <String>
-CloudwatchAlarm_StateValue <String>
-Kinesis_StreamName <String>
-DynamoDB_TableName <String>
-PutItem_TableName <String>
-Tag <String>
-Sns_TargetArn <String>
-Salesforce_Token <String>
-Republish_Topic <String>
-Elasticsearch_Type <String>
-Salesforce_Url <String>
-Sqs_UseBase64 <Boolean>
-Force <SwitchParameter>

Description

Creates a rule. Creating rules is an administrator-level action. Any user who has permission to create rules will be able to access data processed by the rule.

Parameters

-CloudwatchAlarm_AlarmName <String>
The CloudWatch alarm name.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchAlarm_AlarmName
-CloudwatchAlarm_RoleArn <String>
The IAM role that allows access to the CloudWatch alarm.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchAlarm_RoleArn
-CloudwatchAlarm_StateReason <String>
The reason for the alarm change.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchAlarm_StateReason
-CloudwatchAlarm_StateValue <String>
The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchAlarm_StateValue
-CloudwatchMetric_MetricName <String>
The CloudWatch metric name.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchMetric_MetricName
-CloudwatchMetric_MetricNamespace <String>
The CloudWatch metric namespace name.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchMetric_MetricNamespace
-CloudwatchMetric_MetricTimestamp <String>
An optional Unix timestamp.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchMetric_MetricTimestamp
-CloudwatchMetric_MetricUnit <String>
The metric unit supported by CloudWatch.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchMetric_MetricUnit
-CloudwatchMetric_MetricValue <String>
The CloudWatch metric value.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchMetric_MetricValue
-CloudwatchMetric_RoleArn <String>
The IAM role that allows access to the CloudWatch metric.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_CloudwatchMetric_RoleArn
-DynamoDB_HashKeyField <String>
The hash key name.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_HashKeyField
-DynamoDB_HashKeyType <DynamoKeyType>
The hash key type. Valid values are "STRING" or "NUMBER"
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_HashKeyType
-DynamoDB_HashKeyValue <String>
The hash key value.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_HashKeyValue
-DynamoDB_Operation <String>
The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_Operation
-DynamoDB_PayloadField <String>
The action payload. This name can be customized.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_PayloadField
-DynamoDB_RangeKeyField <String>
The range key name.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_RangeKeyField
-DynamoDB_RangeKeyType <DynamoKeyType>
The range key type. Valid values are "STRING" or "NUMBER"
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_RangeKeyType
-DynamoDB_RangeKeyValue <String>
The range key value.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_RangeKeyValue
-DynamoDB_RoleArn <String>
The ARN of the IAM role that grants access to the DynamoDB table.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_RoleArn
-DynamoDB_TableName <String>
The name of the DynamoDB table.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDB_TableName
-DynamoDBv2_RoleArn <String>
The ARN of the IAM role that grants access to the DynamoDB table.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDBv2_RoleArn
-Elasticsearch_Endpoint <String>
The endpoint of your Elasticsearch domain.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Elasticsearch_Endpoint
-Elasticsearch_Id <String>
The unique identifier for the document you are storing.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Elasticsearch_Id
-Elasticsearch_Index <String>
The Elasticsearch index where you want to store your data.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Elasticsearch_Index
-Elasticsearch_RoleArn <String>
The IAM role ARN that has access to Elasticsearch.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Elasticsearch_RoleArn
-Elasticsearch_Type <String>
The type of document you are storing.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Elasticsearch_Type
-Firehose_DeliveryStreamName <String>
The delivery stream name.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Firehose_DeliveryStreamName
-Firehose_RoleArn <String>
The IAM role that grants access to the Amazon Kinesis Firehose stream.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Firehose_RoleArn
-Firehose_Separator <String>
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).
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Firehose_Separator
-Force <SwitchParameter>
This parameter overrides confirmation prompts to force the cmdlet to continue its operation. This parameter should always be used with caution.
Required?False
Position?Named
Accept pipeline input?False
-IotAnalytics_ChannelArn <String>
(deprecated) The ARN of the IoT Analytics channel to which message data will be sent.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_IotAnalytics_ChannelArn
-IotAnalytics_ChannelName <String>
The name of the IoT Analytics channel to which message data will be sent.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_IotAnalytics_ChannelName
-IotAnalytics_RoleArn <String>
The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_IotAnalytics_RoleArn
-IotEvents_InputName <String>
The name of the AWS IoT Events input.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_IotEvents_InputName
-IotEvents_MessageId <String>
[Optional] Use this to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_IotEvents_MessageId
-IotEvents_RoleArn <String>
The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_IotEvents_RoleArn
-Kinesis_PartitionKey <String>
The partition key.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Kinesis_PartitionKey
-Kinesis_RoleArn <String>
The ARN of the IAM role that grants access to the Amazon Kinesis stream.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Kinesis_RoleArn
-Kinesis_StreamName <String>
The name of the Amazon Kinesis stream.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Kinesis_StreamName
-Lambda_FunctionArn <String>
The ARN of the Lambda function.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Lambda_FunctionArn
-PutItem_TableName <String>
The table where the message data will be written
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_DynamoDBv2_PutItem_TableName
-Republish_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Republish_RoleArn
-Republish_Topic <String>
The name of the MQTT topic.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Republish_Topic
-RuleName <String>
The name of the rule.
Required?False
Position?Named
Accept pipeline input?False
-S3_BucketName <String>
The Amazon S3 bucket.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_S3_BucketName
-S3_CannedAcl <CannedAccessControlList>
The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_S3_CannedAcl
-S3_Key <String>
The object key.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_S3_Key
-S3_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_S3_RoleArn
-Salesforce_Token <String>
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.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Salesforce_Token
-Salesforce_Url <String>
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.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Salesforce_Url
-Sns_MessageFormat <MessageFormat>
(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 https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Sns_MessageFormat
-Sns_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Sns_RoleArn
-Sns_TargetArn <String>
The ARN of the SNS topic.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Sns_TargetArn
-Sqs_QueueUrl <String>
The URL of the Amazon SQS queue.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Sqs_QueueUrl
-Sqs_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Sqs_RoleArn
-Sqs_UseBase64 <Boolean>
Specifies whether to use Base64 encoding.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_Sqs_UseBase64
-StepFunctions_ExecutionNamePrefix <String>
(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.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_StepFunctions_ExecutionNamePrefix
-StepFunctions_RoleArn <String>
The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_StepFunctions_RoleArn
-StepFunctions_StateMachineName <String>
The name of the Step Functions state machine whose execution will be started.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_ErrorAction_StepFunctions_StateMachineName
-Tag <String>
Metadata which can be used to manage the topic rule.For URI Request parameters use format: ...key1=value1&key2=value2...For the CLI command-line parameter use format: --tags "key1=value1&key2=value2..."For the cli-input-json file use format: "tags": "key1=value1&key2=value2..."
Required?False
Position?Named
Accept pipeline input?False
AliasesTags
-TopicRulePayload_Action <Action[]>
The actions associated with the rule.
Required?False
Position?Named
Accept pipeline input?False
AliasesTopicRulePayload_Actions
-TopicRulePayload_AwsIotSqlVersion <String>
The version of the SQL rules engine to use when evaluating the rule.
Required?False
Position?Named
Accept pipeline input?False
-TopicRulePayload_Description <String>
The description of the rule.
Required?False
Position?Named
Accept pipeline input?False
-TopicRulePayload_RuleDisabled <Boolean>
Specifies whether the rule is disabled.
Required?False
Position?Named
Accept pipeline input?False
-TopicRulePayload_Sql <String>
The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide.
Required?False
Position?Named
Accept pipeline input?False

Common Credential and Region Parameters

-AccessKey <String>
The AWS access key for the user account. This can be a temporary access key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-Credential <AWSCredentials>
An AWSCredentials object instance containing access and secret key information, and optionally a token for session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-ProfileLocation <String>

Used to specify the name and location of the ini-format credential file (shared with the AWS CLI and other AWS SDKs)

If this optional parameter is omitted this cmdlet will search the encrypted credential file used by the AWS SDK for .NET and AWS Toolkit for Visual Studio first. If the profile is not found then the cmdlet will search in the ini-format credential file at the default location: (user's home directory)\.aws\credentials. Note that the encrypted credential file is not supported on all platforms. It will be skipped when searching for profiles on Windows Nano Server, Mac, and Linux platforms.

If this parameter is specified then this cmdlet will only search the ini-format credential file at the location given.

As the current folder can vary in a shell or during script execution it is advised that you use specify a fully qualified path instead of a relative path.

Required? False
Position? Named
Accept pipeline input? False
-ProfileName <String>
The user-defined name of an AWS credentials or SAML-based role profile containing credential information. The profile is expected to be found in the secure credential file shared with the AWS SDK for .NET and AWS Toolkit for Visual Studio. You can also specify the name of a profile stored in the .ini-format credential file used with the AWS CLI and other AWS SDKs.
Required? False
Position? Named
Accept pipeline input? False
-NetworkCredential <PSCredential>
Used with SAML-based authentication when ProfileName references a SAML role profile. Contains the network credentials to be supplied during authentication with the configured identity provider's endpoint. This parameter is not required if the user's default network identity can or should be used during authentication.
Required? False
Position? Named
Accept pipeline input? False
-SecretKey <String>
The AWS secret key for the user account. This can be a temporary secret key if the corresponding session token is supplied to the -SessionToken parameter.
Required? False
Position? Named
Accept pipeline input? False
-SessionToken <String>
The session token if the access and secret keys are temporary session-based credentials.
Required? False
Position? Named
Accept pipeline input? False
-Region <String>
The system name of the AWS region in which the operation should be invoked. For example, us-east-1, eu-west-1 etc.
Required? False
Position? Named
Accept pipeline input? False
-EndpointUrl <String>

The endpoint to make the call against.

Note: This parameter is primarily for internal AWS use and is not required/should not be specified for normal usage. The cmdlets normally determine which endpoint to call based on the region specified to the -Region parameter or set as default in the shell (via Set-DefaultAWSRegion). Only specify this parameter if you must direct the call to a specific custom endpoint.

Required? False
Position? Named
Accept pipeline input? False

Inputs

This cmdlet does not accept pipeline input.

Outputs

None
This cmdlet does not generate any output. The service response (type Amazon.IoT.Model.CreateTopicRuleResponse) can be referenced from properties attached to the cmdlet entry in the $AWSHistory stack.

Supported Version

AWS Tools for PowerShell: 2.x.y.z