Exemple #1
0
    private static void ConfigureRequiredAwsServices()
    {
        var snsTopic = new Pulumi.Aws.Sns.Topic($"{baseName}-sns1");

        var sqsQueue = new Pulumi.Aws.Sqs.Queue($"{baseName}-123-name");

        var secondRequiredQueue = new Pulumi.Aws.Sqs.Queue($"{baseName}-456-name");

        var subscription = new Pulumi.Aws.Sns.TopicSubscription($"{baseName}-sub1", new Pulumi.Aws.Sns.TopicSubscriptionArgs()
        {
            Topic    = snsTopic.Arn,
            Protocol = "sqs",
            Endpoint = sqsQueue.Arn,
        });

        var attrArgs = new TableAttributesArgs()
        {
            Name = "Id",
            Type = "S",
        };

        var table = new Pulumi.Aws.DynamoDB.Table($"{baseName}-mytable", new Pulumi.Aws.DynamoDB.TableArgs()
        {
            Attributes    = attrArgs,
            HashKey       = "Id",
            WriteCapacity = 5,
            ReadCapacity  = 5,
        });
    }
Exemple #2
0
   public MyStack()
   {
       var queue = new Aws.Sqs.Queue("queue", new Aws.Sqs.QueueArgs
       {
       });
       var test = new Aws.Sqs.QueuePolicy("test", new Aws.Sqs.QueuePolicyArgs
       {
           Policy   = queue.Arn.Apply(arn => @$ "{{
 " "Version" ": " "2012-10-17" ",
 " "Id" ": " "sqspolicy" ",
 " "Statement" ": [
Exemple #3
0
 public MyStack()
 {
     var queue = new Aws.Sqs.Queue("queue", new Aws.Sqs.QueueArgs
     {
         DelaySeconds            = 90,
         MaxMessageSize          = 2048,
         MessageRetentionSeconds = 86400,
         ReceiveWaitTimeSeconds  = 10,
         RedrivePolicy           = JsonSerializer.Serialize(new Dictionary <string, object?>
         {
             { "deadLetterTargetArn", aws_sqs_queue.Queue_deadletter.Arn },
             { "maxReceiveCount", 4 },
         }),
         Tags =
         {
             { "Environment", "production" },
         },
     });
 }