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>
-Firehose_DeliveryStreamName <String>
-TopicRulePayload_Description <String>
-Elasticsearch_Endpoint <String>
-Lambda_FunctionArn <String>
-DynamoDB_HashKeyField <String>
-DynamoDB_HashKeyType <DynamoKeyType>
-DynamoDB_HashKeyValue <String>
-Elasticsearch_Id <String>
-Elasticsearch_Index <String>
-S3_Key <String>
-Sns_MessageFormat <MessageFormat>
-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>
-Kinesis_RoleArn <String>
-Republish_RoleArn <String>
-S3_RoleArn <String>
-Sns_RoleArn <String>
-Sqs_RoleArn <String>
-TopicRulePayload_RuleDisabled <Boolean>
-RuleName <String>
-Firehose_Separator <String>
-TopicRulePayload_Sql <String>
-CloudwatchAlarm_StateReason <String>
-CloudwatchAlarm_StateValue <String>
-Kinesis_StreamName <String>
-DynamoDB_TableName <String>
-PutItem_TableName <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
-CloudwatchAlarm_RoleArn <String>
The IAM role that allows access to the CloudWatch alarm.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchAlarm_StateReason <String>
The reason for the alarm change.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchAlarm_StateValue <String>
The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchMetric_MetricName <String>
The CloudWatch metric name.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchMetric_MetricNamespace <String>
The CloudWatch metric namespace name.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchMetric_MetricTimestamp <String>
An optional Unix timestamp.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchMetric_MetricUnit <String>
The metric unit supported by CloudWatch.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchMetric_MetricValue <String>
The CloudWatch metric value.
Required?False
Position?Named
Accept pipeline input?False
-CloudwatchMetric_RoleArn <String>
The IAM role that allows access to the CloudWatch metric.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_HashKeyField <String>
The hash key name.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_HashKeyType <DynamoKeyType>
The hash key type. Valid values are "STRING" or "NUMBER"
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_HashKeyValue <String>
The hash key value.
Required?False
Position?Named
Accept pipeline input?False
-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
-DynamoDB_PayloadField <String>
The action payload. This name can be customized.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_RangeKeyField <String>
The range key name.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_RangeKeyType <DynamoKeyType>
The range key type. Valid values are "STRING" or "NUMBER"
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_RangeKeyValue <String>
The range key value.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_RoleArn <String>
The ARN of the IAM role that grants access to the DynamoDB table.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDB_TableName <String>
The name of the DynamoDB table.
Required?False
Position?Named
Accept pipeline input?False
-DynamoDBv2_RoleArn <String>
The ARN of the IAM role that grants access to the DynamoDB table.
Required?False
Position?Named
Accept pipeline input?False
-Elasticsearch_Endpoint <String>
The endpoint of your Elasticsearch domain.
Required?False
Position?Named
Accept pipeline input?False
-Elasticsearch_Id <String>
The unique identifier for the document you are storing.
Required?False
Position?Named
Accept pipeline input?False
-Elasticsearch_Index <String>
The Elasticsearch index where you want to store your data.
Required?False
Position?Named
Accept pipeline input?False
-Elasticsearch_RoleArn <String>
The IAM role ARN that has access to Elasticsearch.
Required?False
Position?Named
Accept pipeline input?False
-Elasticsearch_Type <String>
The type of document you are storing.
Required?False
Position?Named
Accept pipeline input?False
-Firehose_DeliveryStreamName <String>
The delivery stream name.
Required?False
Position?Named
Accept pipeline input?False
-Firehose_RoleArn <String>
The IAM role that grants access to the Amazon Kinesis Firehose stream.
Required?False
Position?Named
Accept pipeline input?False
-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
-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
-Kinesis_PartitionKey <String>
The partition key.
Required?False
Position?Named
Accept pipeline input?False
-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
-Kinesis_StreamName <String>
The name of the Amazon Kinesis stream.
Required?False
Position?Named
Accept pipeline input?False
-Lambda_FunctionArn <String>
The ARN of the Lambda function.
Required?False
Position?Named
Accept pipeline input?False
-PutItem_TableName <String>
The table where the message data will be written
Required?False
Position?Named
Accept pipeline input?False
-Republish_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
-Republish_Topic <String>
The name of the MQTT topic.
Required?False
Position?Named
Accept pipeline input?False
-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
-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
-S3_Key <String>
The object key.
Required?False
Position?Named
Accept pipeline input?False
-S3_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
-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
-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
-Sns_MessageFormat <MessageFormat>
The message format of the message to publish. Optional. 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 http://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.
Required?False
Position?Named
Accept pipeline input?False
-Sns_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
-Sns_TargetArn <String>
The ARN of the SNS topic.
Required?False
Position?Named
Accept pipeline input?False
-Sqs_QueueUrl <String>
The URL of the Amazon SQS queue.
Required?False
Position?Named
Accept pipeline input?False
-Sqs_RoleArn <String>
The ARN of the IAM role that grants access.
Required?False
Position?Named
Accept pipeline input?False
-Sqs_UseBase64 <Boolean>
Specifies whether to use Base64 encoding.
Required?False
Position?Named
Accept pipeline input?False
-TopicRulePayload_Action <Action[]>
The actions associated with the rule.
Required?False
Position?Named
Accept pipeline input?False
-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