# SqsDestination

Use an Amazon SQS queue as an event destination.

Implements: [IEventDestination](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.IEventDestination.html)

- Source: [`aws-appconfig/lib/extension.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-appconfig/lib/extension.ts#L97)
- Type last changed: v2.130.0 · 23 Feb 2024

## Example

TypeScript:

```ts
declare const queue: sqs.Queue;

new appconfig.Extension(this, 'MyExtension', {
  actions: [
    new appconfig.Action({
      actionPoints: [appconfig.ActionPoint.ON_DEPLOYMENT_START],
      eventDestination: new appconfig.SqsDestination(queue),
    }),
  ],
});
```

Python:

```python
# queue: sqs.Queue

appconfig.Extension(self, "MyExtension",
    actions=[
        appconfig.Action(
            action_points=[appconfig.ActionPoint.ON_DEPLOYMENT_START],
            event_destination=appconfig.SqsDestination(queue)
        )
    ]
)
```

Java:

```java
Queue queue;

Extension.Builder.create(this, "MyExtension")
        .actions(List.of(
            Action.Builder.create()
                    .actionPoints(List.of(ActionPoint.ON_DEPLOYMENT_START))
                    .eventDestination(new SqsDestination(queue))
                    .build()))
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
Queue queue;

new Extension(this, "MyExtension", new ExtensionProps {
    Actions = new [] {
        new Action(new ActionProps {
            ActionPoints = new [] { ActionPoint.ON_DEPLOYMENT_START },
            EventDestination = new SqsDestination(queue)
        }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var queue Queue

appconfig.NewExtension(this, jsii.String("MyExtension"), &ExtensionProps{
	Actions: []Action{
		appconfig.NewAction(&ActionProps{
			ActionPoints: []ActionPoint{
				appconfig.ActionPoint_ON_DEPLOYMENT_START,
			},
			EventDestination: appconfig.NewSqsDestination(queue),
		}),
	},
})
```

## Initializer

TypeScript:

```ts
new SqsDestination(queue: IQueue)
```

Python:

```python
SqsDestination(queue: IQueue)
```

Java:

```java
new SqsDestination(IQueue queue)
```

C# / .NET:

```csharp
new SqsDestination(IQueue queue)
```

Golang:

```go
NewSqsDestination(Queue IQueue)
```

## Properties

- `extensionUri`: string — The URI of the extension event destination.

- `policyDocument`: [PolicyDocument](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_iam.PolicyDocument.html) — The IAM policy document to invoke the event destination.

- `type`: [SourceType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appconfig.SourceType.html) — The type of the extension event destination.
