> **Experimental**
>
> `@aws-cdk/aws-iot-actions-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# SqsQueueActionProps

Configuration properties of an action for SQS.

Extends: [CommonActionProps](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-iot-actions-alpha.CommonActionProps.html)
Used as props by: [SqsQueueAction](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-iot-actions-alpha.SqsQueueAction.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/sqs-queue-action.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-iot-actions-alpha/lib/sqs-queue-action.ts#L10)

## Example

TypeScript:

```ts
import * as sqs from 'aws-cdk-lib/aws-sqs';

const queue = new sqs.Queue(this, 'MyQueue');

const topicRule = new iot.TopicRule(this, 'TopicRule', {
  sql: iot.IotSql.fromStringAsVer20160323(
    "SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'",
  ),
  actions: [
    new actions.SqsQueueAction(queue, {
      useBase64: true, // optional property, default is 'false'
    }),
  ],
});
```

Python:

```python
import aws_cdk.aws_sqs as sqs

queue = sqs.Queue(self, "MyQueue")

topic_rule = iot.TopicRule(self, "TopicRule",
    sql=iot.IotSql.from_string_as_ver20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"),
    actions=[
        actions.SqsQueueAction(queue,
            use_base64=True
        )
    ]
)
```

Java:

```java
import software.amazon.awscdk.services.sqs.*;

Queue queue = new Queue(this, "MyQueue");

TopicRule topicRule = TopicRule.Builder.create(this, "TopicRule")
        .sql(IotSql.fromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"))
        .actions(List.of(
            SqsQueueAction.Builder.create(queue)
                    .useBase64(true)
                    .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AWS.IoT.Actions.Alpha
using Amazon.CDK.AWS.SQS;

var queue = new Queue(this, "MyQueue");

var topicRule = new TopicRule(this, "TopicRule", new TopicRuleProps {
    Sql = IotSql.FromStringAsVer20160323("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'"),
    Actions = new [] {
        new SqsQueueAction(queue, new SqsQueueActionProps {
            UseBase64 = true
        }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdkiotactionsalpha/v2
import sqs "github.com/aws/aws-cdk-go/awscdk"

queue := sqs.NewQueue(this, jsii.String("MyQueue"))

topicRule := iot.NewTopicRule(this, jsii.String("TopicRule"), &TopicRuleProps{
	Sql: iot.IotSql_FromStringAsVer20160323(jsii.String("SELECT topic(2) as device_id, year, month, day FROM 'device/+/data'")),
	Actions: []IAction{
		actions.NewSqsQueueAction(queue, &SqsQueueActionProps{
			UseBase64: jsii.Boolean(true),
		}),
	},
})
```

## Properties

- `role`: [IRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.IRole.html) — The IAM role that allows access to AWS service.

  **Default:** a new role will be created

- `useBase64`: boolean = false — Specifies whether to use Base64 encoding.
