RedriveAllowPolicyArgs

data class RedriveAllowPolicyArgs(val queueUrl: Output<String>? = null, val redriveAllowPolicy: Output<String>? = null) : ConvertibleToJava<RedriveAllowPolicyArgs>

Provides a SQS Queue Redrive Allow Policy resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sqs.Queue;
import com.pulumi.aws.sqs.QueueArgs;
import com.pulumi.aws.sqs.RedriveAllowPolicy;
import com.pulumi.aws.sqs.RedriveAllowPolicyArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleQueue = new Queue("exampleQueue");
var src = new Queue("src", QueueArgs.builder()
.redrivePolicy(exampleQueue.arn().applyValue(arn -> serializeJson(
jsonObject(
jsonProperty("deadLetterTargetArn", arn),
jsonProperty("maxReceiveCount", 4)
))))
.build());
var exampleRedriveAllowPolicy = new RedriveAllowPolicy("exampleRedriveAllowPolicy", RedriveAllowPolicyArgs.builder()
.queueUrl(exampleQueue.id())
.redriveAllowPolicy(src.arn().applyValue(arn -> serializeJson(
jsonObject(
jsonProperty("redrivePermission", "byQueue"),
jsonProperty("sourceQueueArns", jsonArray(arn))
))))
.build());
}
}

Import

SQS Queue Redrive Allow Policies can be imported using the queue URL, e.g.,

$ pulumi import aws:sqs/redriveAllowPolicy:RedriveAllowPolicy test https://queue.amazonaws.com/0123456789012/myqueue

Constructors

Link copied to clipboard
constructor(queueUrl: Output<String>? = null, redriveAllowPolicy: Output<String>? = null)

Properties

Link copied to clipboard
val queueUrl: Output<String>? = null

The URL of the SQS Queue to which to attach the policy

Link copied to clipboard
val redriveAllowPolicy: Output<String>? = null

The JSON redrive allow policy for the SQS queue. Learn more in the Amazon SQS dead-letter queues documentation.

Functions

Link copied to clipboard
open override fun toJava(): RedriveAllowPolicyArgs