> **Experimental**
>
> `@aws-cdk/aws-pipes-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.
# SourceWithDeadLetterTarget

Sources that support a dead-letter target.

Implements: [ISource](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-alpha.ISource.html)
Superclass of: [DynamoDBSource](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-sources-alpha.DynamoDBSource.html), [KinesisSource](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-sources-alpha.KinesisSource.html), [StreamSource](https://docs.aws.amazon.com/cdk/api/v2/docs/@aws-cdk_aws-pipes-sources-alpha.StreamSource.html)

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/source.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/aws-pipes-alpha/lib/source.ts#L112)

## Initializer

TypeScript:

```ts
new SourceWithDeadLetterTarget(sourceArn: string, deadLetterTarget?: IQueue | ITopic)
```

Python:

```python
SourceWithDeadLetterTarget(source_arn: str, dead_letter_target: typing.Optional[typing.Union[IQueue, ITopic]] = None)
```

Java:

```java
new SourceWithDeadLetterTarget(String sourceArn, IQueue deadLetterTarget)
```

C# / .NET:

```csharp
new SourceWithDeadLetterTarget(string sourceArn, IQueue? deadLetterTarget = null)
```

Golang:

```go
NewSourceWithDeadLetterTarget(SourceArn *string, DeadLetterTarget interface{})
```

## Properties

- `deadLetterTarget`: [IQueue](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.IQueue.html) | [ITopic](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sns.ITopic.html) — The dead-letter SQS queue or SNS topic.

- `sourceArn`: string — The ARN of the source resource.

## Methods

- `bind(pipe: IPipe): SourceConfig` — Bind the source to a pipe.

- `grantPush(grantee: IRole, deadLetterTarget?: IQueue | ITopic): void` — Grants the pipe role permission to publish to the dead-letter target.

  [disable-awslint:no-grants]

- `grantRead(grantee: IRole): void` — Grant the pipe role read access to the source.

- `isSourceWithDeadLetterTarget(source: ISource): boolean` (static) — Determines if the source is an instance of SourceWithDeadLetterTarget.
