RedrivePermission
Enum Stable
The permission type that defines which source queues can specify the current queue as the dead-letter queue.
| Source | aws-sqs/lib/queue.ts |
|---|---|
| Type last changed |
Example
ts
declare const sourceQueue: sqs.IQueue;
// Only the sourceQueue can specify this queue as the dead-letter queue.
const queue1 = new sqs.Queue(this, 'Queue2', {
redriveAllowPolicy: {
sourceQueues: [sourceQueue],
}
});
// No source queues can specify this queue as the dead-letter queue.
const queue2 = new sqs.Queue(this, 'Queue', {
redriveAllowPolicy: {
redrivePermission: sqs.RedrivePermission.DENY_ALL,
}
});
python
# source_queue: sqs.IQueue
# Only the sourceQueue can specify this queue as the dead-letter queue.
queue1 = sqs.Queue(self, "Queue2",
redrive_allow_policy=sqs.RedriveAllowPolicy(
source_queues=[source_queue]
)
)
# No source queues can specify this queue as the dead-letter queue.
queue2 = sqs.Queue(self, "Queue",
redrive_allow_policy=sqs.RedriveAllowPolicy(
redrive_permission=sqs.RedrivePermission.DENY_ALL
)
)
java
IQueue sourceQueue;
// Only the sourceQueue can specify this queue as the dead-letter queue.
Queue queue1 = Queue.Builder.create(this, "Queue2")
.redriveAllowPolicy(RedriveAllowPolicy.builder()
.sourceQueues(List.of(sourceQueue))
.build())
.build();
// No source queues can specify this queue as the dead-letter queue.
Queue queue2 = Queue.Builder.create(this, "Queue")
.redriveAllowPolicy(RedriveAllowPolicy.builder()
.redrivePermission(RedrivePermission.DENY_ALL)
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
IQueue sourceQueue;
// Only the sourceQueue can specify this queue as the dead-letter queue.
var queue1 = new Queue(this, "Queue2", new QueueProps {
RedriveAllowPolicy = new RedriveAllowPolicy {
SourceQueues = new [] { sourceQueue }
}
});
// No source queues can specify this queue as the dead-letter queue.
var queue2 = new Queue(this, "Queue", new QueueProps {
RedriveAllowPolicy = new RedriveAllowPolicy {
RedrivePermission = RedrivePermission.DENY_ALL
}
});
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var sourceQueue IQueue
// Only the sourceQueue can specify this queue as the dead-letter queue.
queue1 := sqs.NewQueue(this, jsii.String("Queue2"), &QueueProps{
RedriveAllowPolicy: &RedriveAllowPolicy{
SourceQueues: []IQueue{
sourceQueue,
},
},
})
// No source queues can specify this queue as the dead-letter queue.
queue2 := sqs.NewQueue(this, jsii.String("Queue"), &QueueProps{
RedriveAllowPolicy: &RedriveAllowPolicy{
RedrivePermission: sqs.RedrivePermission_DENY_ALL,
},
})
Members
| Member | Description |
|---|---|
ALLOW_ALL | Any source queues in this AWS account in the same Region can specify this queue as the dead-letter queue. |
DENY_ALL | No source queues can specify this queue as the dead-letter queue. |
BY_QUEUE | Only queues specified by the sourceQueueArns parameter can specify this queue as the dead-letter queue. |
Referenced by
RedriveAllowPolicy.redrivePermissionredrive_permissionredrivePermissionRedrivePermissionRedrivePermission