class DynamoDBSource
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Pipes.Sources.Alpha.DynamoDBSource |
![]() | github.com/aws/aws-cdk-go/awscdkpipessourcesalpha/v2#DynamoDBSource |
![]() | software.amazon.awscdk.services.pipes.sources.alpha.DynamoDBSource |
![]() | aws_cdk.aws_pipes_sources_alpha.DynamoDBSource |
![]() | @aws-cdk/aws-pipes-sources-alpha ยป DynamoDBSource |
Implements
ISource
Extends
Stream
A source that reads from an DynamoDB stream.
Example
const table = new ddb.TableV2(this, 'MyTable', {
partitionKey: {
name: 'id',
type: ddb.AttributeType.STRING,
},
dynamoStream: ddb.StreamViewType.NEW_IMAGE,
});
declare const targetQueue: sqs.Queue;
const pipeSource = new sources.DynamoDBSource(table, {
startingPosition: sources.DynamoDBStartingPosition.LATEST,
});
const pipe = new pipes.Pipe(this, 'Pipe', {
source: pipeSource,
target: new SqsTarget(targetQueue)
});
Initializer
new DynamoDBSource(table: ITableV2, parameters: DynamoDBSourceParameters)
Parameters
- table
ITable
V2 - parameters
Dynamo
DBSource Parameters
Properties
Name | Type | Description |
---|---|---|
source | string | The ARN of the source resource. |
source | Stream | Base parameters for streaming sources. |
dead | IQueue | ITopic | The dead-letter SQS queue or SNS topic. |
sourceArn
Type:
string
The ARN of the source resource.
sourceParameters
Type:
Stream
Base parameters for streaming sources.
deadLetterTarget?
Type:
IQueue
|
ITopic
(optional)
The dead-letter SQS queue or SNS topic.
Methods
Name | Description |
---|---|
bind(_pipe) | Bind the source to a pipe. |
grant | Grants the pipe role permission to publish to the dead-letter target. |
grant | Grant the pipe role read access to the source. |
bind(_pipe)
public bind(_pipe: IPipe): SourceConfig
Parameters
- _pipe
IPipe
Returns
Bind the source to a pipe.
grantPush(grantee, deadLetterTarget?)
public grantPush(grantee: IRole, deadLetterTarget?: IQueue | ITopic): void
Parameters
Grants the pipe role permission to publish to the dead-letter target.
grantRead(grantee)
public grantRead(grantee: IRole): void
Parameters
- grantee
IRole
Grant the pipe role read access to the source.