Package com.pulumi.aws.sqs
Class RedriveAllowPolicy
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.sqs.RedriveAllowPolicy
-
public class RedriveAllowPolicy extends com.pulumi.resources.CustomResourceProvides a SQS Queue Redrive Allow Policy resource. ## Example Usage
## Import ### Identity Schema #### Required * `queueUrl` (String) URL of the SQS Queue. Using `pulumi import`, import SQS Queue Redrive Allow Policies using the queue URL. For example: ```sh $ pulumi import aws:sqs/redriveAllowPolicy:RedriveAllowPolicy test https://queue.amazonaws.com/123456789012/myqueue ```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.ArrayList; import java.util.Arrays; 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 example = new Queue("example", QueueArgs.builder() .name("examplequeue") .build()); var src = new Queue("src", QueueArgs.builder() .name("srcqueue") .redrivePolicy(example.arn().applyValue(_arn -> serializeJson( jsonObject( jsonProperty("deadLetterTargetArn", _arn), jsonProperty("maxReceiveCount", 4) )))) .build()); var exampleRedriveAllowPolicy = new RedriveAllowPolicy("exampleRedriveAllowPolicy", RedriveAllowPolicyArgs.builder() .queueUrl(example.id()) .redriveAllowPolicy(src.arn().applyValue(_arn -> serializeJson( jsonObject( jsonProperty("redrivePermission", "byQueue"), jsonProperty("sourceQueueArns", jsonArray(_arn)) )))) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description RedriveAllowPolicy(java.lang.String name)RedriveAllowPolicy(java.lang.String name, RedriveAllowPolicyArgs args)RedriveAllowPolicy(java.lang.String name, RedriveAllowPolicyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RedriveAllowPolicyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RedriveAllowPolicyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>queueUrl()com.pulumi.core.Output<java.lang.String>redriveAllowPolicy()com.pulumi.core.Output<java.lang.String>region()
-
-
-
Constructor Detail
-
RedriveAllowPolicy
public RedriveAllowPolicy(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
RedriveAllowPolicy
public RedriveAllowPolicy(java.lang.String name, RedriveAllowPolicyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
RedriveAllowPolicy
public RedriveAllowPolicy(java.lang.String name, RedriveAllowPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
queueUrl
public com.pulumi.core.Output<java.lang.String> queueUrl()
- Returns:
- The URL of the SQS Queue to which to attach the policy
-
redriveAllowPolicy
public com.pulumi.core.Output<java.lang.String> redriveAllowPolicy()
- Returns:
- The JSON redrive allow policy for the SQS queue. Learn more in the [Amazon SQS dead-letter queues documentation](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
get
public static RedriveAllowPolicy get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable RedriveAllowPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-