aws logo
AWS Classic v5.33.0, Mar 24 23

aws.sqs.Queue

FIFO queue

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    contentBasedDeduplication: true,
    fifoQueue: true,
});
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    content_based_deduplication=True,
    fifo_queue=True)
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        ContentBasedDeduplication = true,
        FifoQueue = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			ContentBasedDeduplication: pulumi.Bool(true),
			FifoQueue:                 pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .contentBasedDeduplication(true)
            .fifoQueue(true)
            .build());

    }
}
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      contentBasedDeduplication: true
      fifoQueue: true

High-throughput FIFO queue

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    deduplicationScope: "messageGroup",
    fifoQueue: true,
    fifoThroughputLimit: "perMessageGroupId",
});
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    deduplication_scope="messageGroup",
    fifo_queue=True,
    fifo_throughput_limit="perMessageGroupId")
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        DeduplicationScope = "messageGroup",
        FifoQueue = true,
        FifoThroughputLimit = "perMessageGroupId",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			DeduplicationScope:  pulumi.String("messageGroup"),
			FifoQueue:           pulumi.Bool(true),
			FifoThroughputLimit: pulumi.String("perMessageGroupId"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .deduplicationScope("messageGroup")
            .fifoQueue(true)
            .fifoThroughputLimit("perMessageGroupId")
            .build());

    }
}
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      deduplicationScope: messageGroup
      fifoQueue: true
      fifoThroughputLimit: perMessageGroupId

Dead-letter queue

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleQueueDeadletter = new aws.sqs.Queue("exampleQueueDeadletter", {redriveAllowPolicy: JSON.stringify({
    redrivePermission: "byQueue",
    sourceQueueArns: [aws_sqs_queue.example_queue.arn],
})});
import pulumi
import json
import pulumi_aws as aws

example_queue_deadletter = aws.sqs.Queue("exampleQueueDeadletter", redrive_allow_policy=json.dumps({
    "redrivePermission": "byQueue",
    "sourceQueueArns": [aws_sqs_queue["example_queue"]["arn"]],
}))
using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var exampleQueueDeadletter = new Aws.Sqs.Queue("exampleQueueDeadletter", new()
    {
        RedriveAllowPolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["redrivePermission"] = "byQueue",
            ["sourceQueueArns"] = new[]
            {
                aws_sqs_queue.Example_queue.Arn,
            },
        }),
    });

});
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"redrivePermission": "byQueue",
			"sourceQueueArns": []interface{}{
				aws_sqs_queue.Example_queue.Arn,
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = sqs.NewQueue(ctx, "exampleQueueDeadletter", &sqs.QueueArgs{
			RedriveAllowPolicy: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 exampleQueueDeadletter = new Queue("exampleQueueDeadletter", QueueArgs.builder()        
            .redriveAllowPolicy(serializeJson(
                jsonObject(
                    jsonProperty("redrivePermission", "byQueue"),
                    jsonProperty("sourceQueueArns", jsonArray(aws_sqs_queue.example_queue().arn()))
                )))
            .build());

    }
}
resources:
  exampleQueueDeadletter:
    type: aws:sqs:Queue
    properties:
      redriveAllowPolicy:
        fn::toJSON:
          redrivePermission: byQueue
          sourceQueueArns:
            - ${aws_sqs_queue.example_queue.arn}

Server-side encryption (SSE)

Using SSE-SQS:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {sqsManagedSseEnabled: true});
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue", sqs_managed_sse_enabled=True)
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        SqsManagedSseEnabled = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			SqsManagedSseEnabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .sqsManagedSseEnabled(true)
            .build());

    }
}
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      sqsManagedSseEnabled: true

Using SSE-KMS:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    kmsDataKeyReusePeriodSeconds: 300,
    kmsMasterKeyId: "alias/aws/sqs",
});
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    kms_data_key_reuse_period_seconds=300,
    kms_master_key_id="alias/aws/sqs")
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        KmsDataKeyReusePeriodSeconds = 300,
        KmsMasterKeyId = "alias/aws/sqs",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			KmsDataKeyReusePeriodSeconds: pulumi.Int(300),
			KmsMasterKeyId:               pulumi.String("alias/aws/sqs"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .kmsDataKeyReusePeriodSeconds(300)
            .kmsMasterKeyId("alias/aws/sqs")
            .build());

    }
}
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      kmsDataKeyReusePeriodSeconds: 300
      kmsMasterKeyId: alias/aws/sqs

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        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" },
        },
    });

});
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"deadLetterTargetArn": aws_sqs_queue.Queue_deadletter.Arn,
			"maxReceiveCount":     4,
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			DelaySeconds:            pulumi.Int(90),
			MaxMessageSize:          pulumi.Int(2048),
			MessageRetentionSeconds: pulumi.Int(86400),
			ReceiveWaitTimeSeconds:  pulumi.Int(10),
			RedrivePolicy:           pulumi.String(json0),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("production"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .delaySeconds(90)
            .maxMessageSize(2048)
            .messageRetentionSeconds(86400)
            .receiveWaitTimeSeconds(10)
            .redrivePolicy(serializeJson(
                jsonObject(
                    jsonProperty("deadLetterTargetArn", aws_sqs_queue.queue_deadletter().arn()),
                    jsonProperty("maxReceiveCount", 4)
                )))
            .tags(Map.of("Environment", "production"))
            .build());

    }
}
import pulumi
import json
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    delay_seconds=90,
    max_message_size=2048,
    message_retention_seconds=86400,
    receive_wait_time_seconds=10,
    redrive_policy=json.dumps({
        "deadLetterTargetArn": aws_sqs_queue["queue_deadletter"]["arn"],
        "maxReceiveCount": 4,
    }),
    tags={
        "Environment": "production",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    delaySeconds: 90,
    maxMessageSize: 2048,
    messageRetentionSeconds: 86400,
    receiveWaitTimeSeconds: 10,
    redrivePolicy: JSON.stringify({
        deadLetterTargetArn: aws_sqs_queue.queue_deadletter.arn,
        maxReceiveCount: 4,
    }),
    tags: {
        Environment: "production",
    },
});
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      delaySeconds: 90
      maxMessageSize: 2048
      messageRetentionSeconds: 86400
      receiveWaitTimeSeconds: 10
      redrivePolicy:
        fn::toJSON:
          deadLetterTargetArn: ${aws_sqs_queue.queue_deadletter.arn}
          maxReceiveCount: 4
      tags:
        Environment: production
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        ContentBasedDeduplication = true,
        FifoQueue = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			ContentBasedDeduplication: pulumi.Bool(true),
			FifoQueue:                 pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .contentBasedDeduplication(true)
            .fifoQueue(true)
            .build());

    }
}
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    content_based_deduplication=True,
    fifo_queue=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    contentBasedDeduplication: true,
    fifoQueue: true,
});
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      contentBasedDeduplication: true
      fifoQueue: true
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        DeduplicationScope = "messageGroup",
        FifoQueue = true,
        FifoThroughputLimit = "perMessageGroupId",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			DeduplicationScope:  pulumi.String("messageGroup"),
			FifoQueue:           pulumi.Bool(true),
			FifoThroughputLimit: pulumi.String("perMessageGroupId"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .deduplicationScope("messageGroup")
            .fifoQueue(true)
            .fifoThroughputLimit("perMessageGroupId")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    deduplication_scope="messageGroup",
    fifo_queue=True,
    fifo_throughput_limit="perMessageGroupId")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    deduplicationScope: "messageGroup",
    fifoQueue: true,
    fifoThroughputLimit: "perMessageGroupId",
});
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      deduplicationScope: messageGroup
      fifoQueue: true
      fifoThroughputLimit: perMessageGroupId
using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var exampleQueueDeadletter = new Aws.Sqs.Queue("exampleQueueDeadletter", new()
    {
        RedriveAllowPolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["redrivePermission"] = "byQueue",
            ["sourceQueueArns"] = new[]
            {
                aws_sqs_queue.Example_queue.Arn,
            },
        }),
    });

});
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"redrivePermission": "byQueue",
			"sourceQueueArns": []interface{}{
				aws_sqs_queue.Example_queue.Arn,
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = sqs.NewQueue(ctx, "exampleQueueDeadletter", &sqs.QueueArgs{
			RedriveAllowPolicy: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 exampleQueueDeadletter = new Queue("exampleQueueDeadletter", QueueArgs.builder()        
            .redriveAllowPolicy(serializeJson(
                jsonObject(
                    jsonProperty("redrivePermission", "byQueue"),
                    jsonProperty("sourceQueueArns", jsonArray(aws_sqs_queue.example_queue().arn()))
                )))
            .build());

    }
}
import pulumi
import json
import pulumi_aws as aws

example_queue_deadletter = aws.sqs.Queue("exampleQueueDeadletter", redrive_allow_policy=json.dumps({
    "redrivePermission": "byQueue",
    "sourceQueueArns": [aws_sqs_queue["example_queue"]["arn"]],
}))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleQueueDeadletter = new aws.sqs.Queue("exampleQueueDeadletter", {redriveAllowPolicy: JSON.stringify({
    redrivePermission: "byQueue",
    sourceQueueArns: [aws_sqs_queue.example_queue.arn],
})});
resources:
  exampleQueueDeadletter:
    type: aws:sqs:Queue
    properties:
      redriveAllowPolicy:
        fn::toJSON:
          redrivePermission: byQueue
          sourceQueueArns:
            - ${aws_sqs_queue.example_queue.arn}
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        SqsManagedSseEnabled = true,
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			SqsManagedSseEnabled: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .sqsManagedSseEnabled(true)
            .build());

    }
}
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue", sqs_managed_sse_enabled=True)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {sqsManagedSseEnabled: true});
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      sqsManagedSseEnabled: true
using System.Collections.Generic;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var queue = new Aws.Sqs.Queue("queue", new()
    {
        KmsDataKeyReusePeriodSeconds = 300,
        KmsMasterKeyId = "alias/aws/sqs",
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/sqs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := sqs.NewQueue(ctx, "queue", &sqs.QueueArgs{
			KmsDataKeyReusePeriodSeconds: pulumi.Int(300),
			KmsMasterKeyId:               pulumi.String("alias/aws/sqs"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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 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 queue = new Queue("queue", QueueArgs.builder()        
            .kmsDataKeyReusePeriodSeconds(300)
            .kmsMasterKeyId("alias/aws/sqs")
            .build());

    }
}
import pulumi
import pulumi_aws as aws

queue = aws.sqs.Queue("queue",
    kms_data_key_reuse_period_seconds=300,
    kms_master_key_id="alias/aws/sqs")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const queue = new aws.sqs.Queue("queue", {
    kmsDataKeyReusePeriodSeconds: 300,
    kmsMasterKeyId: "alias/aws/sqs",
});
resources:
  queue:
    type: aws:sqs:Queue
    properties:
      kmsDataKeyReusePeriodSeconds: 300
      kmsMasterKeyId: alias/aws/sqs

Create Queue Resource

new Queue(name: string, args?: QueueArgs, opts?: CustomResourceOptions);
@overload
def Queue(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          content_based_deduplication: Optional[bool] = None,
          deduplication_scope: Optional[str] = None,
          delay_seconds: Optional[int] = None,
          fifo_queue: Optional[bool] = None,
          fifo_throughput_limit: Optional[str] = None,
          kms_data_key_reuse_period_seconds: Optional[int] = None,
          kms_master_key_id: Optional[str] = None,
          max_message_size: Optional[int] = None,
          message_retention_seconds: Optional[int] = None,
          name: Optional[str] = None,
          name_prefix: Optional[str] = None,
          policy: Optional[str] = None,
          receive_wait_time_seconds: Optional[int] = None,
          redrive_allow_policy: Optional[str] = None,
          redrive_policy: Optional[str] = None,
          sqs_managed_sse_enabled: Optional[bool] = None,
          tags: Optional[Mapping[str, str]] = None,
          visibility_timeout_seconds: Optional[int] = None)
@overload
def Queue(resource_name: str,
          args: Optional[QueueArgs] = None,
          opts: Optional[ResourceOptions] = None)
func NewQueue(ctx *Context, name string, args *QueueArgs, opts ...ResourceOption) (*Queue, error)
public Queue(string name, QueueArgs? args = null, CustomResourceOptions? opts = null)
public Queue(String name, QueueArgs args)
public Queue(String name, QueueArgs args, CustomResourceOptions options)
type: aws:sqs:Queue
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args QueueArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Queue Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Queue resource accepts the following input properties:

ContentBasedDeduplication bool

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

DeduplicationScope string

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

DelaySeconds int

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

FifoQueue bool

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

FifoThroughputLimit string

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

KmsDataKeyReusePeriodSeconds int

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

KmsMasterKeyId string

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

MaxMessageSize int

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

MessageRetentionSeconds int

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

Name string

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name

Policy string

The JSON policy for the SQS queue.

ReceiveWaitTimeSeconds int

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

RedriveAllowPolicy string

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

RedrivePolicy string

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

SqsManagedSseEnabled bool

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

Tags Dictionary<string, string>

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

VisibilityTimeoutSeconds int

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

ContentBasedDeduplication bool

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

DeduplicationScope string

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

DelaySeconds int

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

FifoQueue bool

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

FifoThroughputLimit string

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

KmsDataKeyReusePeriodSeconds int

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

KmsMasterKeyId string

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

MaxMessageSize int

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

MessageRetentionSeconds int

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

Name string

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name

Policy string

The JSON policy for the SQS queue.

ReceiveWaitTimeSeconds int

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

RedriveAllowPolicy string

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

RedrivePolicy string

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

SqsManagedSseEnabled bool

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

Tags map[string]string

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

VisibilityTimeoutSeconds int

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

contentBasedDeduplication Boolean

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplicationScope String

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delaySeconds Integer

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifoQueue Boolean

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifoThroughputLimit String

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kmsDataKeyReusePeriodSeconds Integer

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kmsMasterKeyId String

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

maxMessageSize Integer

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

messageRetentionSeconds Integer

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name String

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

namePrefix String

Creates a unique name beginning with the specified prefix. Conflicts with name

policy String

The JSON policy for the SQS queue.

receiveWaitTimeSeconds Integer

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redriveAllowPolicy String

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrivePolicy String

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqsManagedSseEnabled Boolean

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags Map<String,String>

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

visibilityTimeoutSeconds Integer

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

contentBasedDeduplication boolean

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplicationScope string

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delaySeconds number

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifoQueue boolean

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifoThroughputLimit string

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kmsDataKeyReusePeriodSeconds number

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kmsMasterKeyId string

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

maxMessageSize number

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

messageRetentionSeconds number

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name string

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name

policy string

The JSON policy for the SQS queue.

receiveWaitTimeSeconds number

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redriveAllowPolicy string

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrivePolicy string

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqsManagedSseEnabled boolean

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags {[key: string]: string}

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

visibilityTimeoutSeconds number

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

content_based_deduplication bool

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplication_scope str

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delay_seconds int

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifo_queue bool

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifo_throughput_limit str

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kms_data_key_reuse_period_seconds int

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kms_master_key_id str

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

max_message_size int

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

message_retention_seconds int

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name str

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name

policy str

The JSON policy for the SQS queue.

receive_wait_time_seconds int

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redrive_allow_policy str

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrive_policy str

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqs_managed_sse_enabled bool

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags Mapping[str, str]

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

visibility_timeout_seconds int

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

contentBasedDeduplication Boolean

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplicationScope String

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delaySeconds Number

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifoQueue Boolean

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifoThroughputLimit String

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kmsDataKeyReusePeriodSeconds Number

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kmsMasterKeyId String

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

maxMessageSize Number

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

messageRetentionSeconds Number

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name String

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

namePrefix String

Creates a unique name beginning with the specified prefix. Conflicts with name

policy String

The JSON policy for the SQS queue.

receiveWaitTimeSeconds Number

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redriveAllowPolicy String

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrivePolicy String

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqsManagedSseEnabled Boolean

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags Map<String>

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

visibilityTimeoutSeconds Number

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

Outputs

All input properties are implicitly available as output properties. Additionally, the Queue resource produces the following output properties:

Arn string

The ARN of the SQS queue

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Url string

Same as id: The URL for the created Amazon SQS queue.

Arn string

The ARN of the SQS queue

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Url string

Same as id: The URL for the created Amazon SQS queue.

arn String

The ARN of the SQS queue

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url String

Same as id: The URL for the created Amazon SQS queue.

arn string

The ARN of the SQS queue

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url string

Same as id: The URL for the created Amazon SQS queue.

arn str

The ARN of the SQS queue

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url str

Same as id: The URL for the created Amazon SQS queue.

arn String

The ARN of the SQS queue

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url String

Same as id: The URL for the created Amazon SQS queue.

Look up Existing Queue Resource

Get an existing Queue resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: QueueState, opts?: CustomResourceOptions): Queue
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        arn: Optional[str] = None,
        content_based_deduplication: Optional[bool] = None,
        deduplication_scope: Optional[str] = None,
        delay_seconds: Optional[int] = None,
        fifo_queue: Optional[bool] = None,
        fifo_throughput_limit: Optional[str] = None,
        kms_data_key_reuse_period_seconds: Optional[int] = None,
        kms_master_key_id: Optional[str] = None,
        max_message_size: Optional[int] = None,
        message_retention_seconds: Optional[int] = None,
        name: Optional[str] = None,
        name_prefix: Optional[str] = None,
        policy: Optional[str] = None,
        receive_wait_time_seconds: Optional[int] = None,
        redrive_allow_policy: Optional[str] = None,
        redrive_policy: Optional[str] = None,
        sqs_managed_sse_enabled: Optional[bool] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        url: Optional[str] = None,
        visibility_timeout_seconds: Optional[int] = None) -> Queue
func GetQueue(ctx *Context, name string, id IDInput, state *QueueState, opts ...ResourceOption) (*Queue, error)
public static Queue Get(string name, Input<string> id, QueueState? state, CustomResourceOptions? opts = null)
public static Queue get(String name, Output<String> id, QueueState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string

The ARN of the SQS queue

ContentBasedDeduplication bool

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

DeduplicationScope string

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

DelaySeconds int

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

FifoQueue bool

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

FifoThroughputLimit string

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

KmsDataKeyReusePeriodSeconds int

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

KmsMasterKeyId string

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

MaxMessageSize int

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

MessageRetentionSeconds int

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

Name string

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name

Policy string

The JSON policy for the SQS queue.

ReceiveWaitTimeSeconds int

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

RedriveAllowPolicy string

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

RedrivePolicy string

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

SqsManagedSseEnabled bool

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

Tags Dictionary<string, string>

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Url string

Same as id: The URL for the created Amazon SQS queue.

VisibilityTimeoutSeconds int

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

Arn string

The ARN of the SQS queue

ContentBasedDeduplication bool

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

DeduplicationScope string

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

DelaySeconds int

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

FifoQueue bool

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

FifoThroughputLimit string

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

KmsDataKeyReusePeriodSeconds int

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

KmsMasterKeyId string

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

MaxMessageSize int

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

MessageRetentionSeconds int

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

Name string

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

NamePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name

Policy string

The JSON policy for the SQS queue.

ReceiveWaitTimeSeconds int

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

RedriveAllowPolicy string

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

RedrivePolicy string

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

SqsManagedSseEnabled bool

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

Tags map[string]string

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Url string

Same as id: The URL for the created Amazon SQS queue.

VisibilityTimeoutSeconds int

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

arn String

The ARN of the SQS queue

contentBasedDeduplication Boolean

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplicationScope String

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delaySeconds Integer

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifoQueue Boolean

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifoThroughputLimit String

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kmsDataKeyReusePeriodSeconds Integer

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kmsMasterKeyId String

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

maxMessageSize Integer

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

messageRetentionSeconds Integer

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name String

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

namePrefix String

Creates a unique name beginning with the specified prefix. Conflicts with name

policy String

The JSON policy for the SQS queue.

receiveWaitTimeSeconds Integer

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redriveAllowPolicy String

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrivePolicy String

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqsManagedSseEnabled Boolean

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags Map<String,String>

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url String

Same as id: The URL for the created Amazon SQS queue.

visibilityTimeoutSeconds Integer

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

arn string

The ARN of the SQS queue

contentBasedDeduplication boolean

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplicationScope string

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delaySeconds number

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifoQueue boolean

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifoThroughputLimit string

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kmsDataKeyReusePeriodSeconds number

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kmsMasterKeyId string

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

maxMessageSize number

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

messageRetentionSeconds number

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name string

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

namePrefix string

Creates a unique name beginning with the specified prefix. Conflicts with name

policy string

The JSON policy for the SQS queue.

receiveWaitTimeSeconds number

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redriveAllowPolicy string

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrivePolicy string

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqsManagedSseEnabled boolean

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags {[key: string]: string}

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url string

Same as id: The URL for the created Amazon SQS queue.

visibilityTimeoutSeconds number

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

arn str

The ARN of the SQS queue

content_based_deduplication bool

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplication_scope str

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delay_seconds int

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifo_queue bool

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifo_throughput_limit str

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kms_data_key_reuse_period_seconds int

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kms_master_key_id str

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

max_message_size int

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

message_retention_seconds int

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name str

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

name_prefix str

Creates a unique name beginning with the specified prefix. Conflicts with name

policy str

The JSON policy for the SQS queue.

receive_wait_time_seconds int

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redrive_allow_policy str

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrive_policy str

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqs_managed_sse_enabled bool

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags Mapping[str, str]

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url str

Same as id: The URL for the created Amazon SQS queue.

visibility_timeout_seconds int

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

arn String

The ARN of the SQS queue

contentBasedDeduplication Boolean

Enables content-based deduplication for FIFO queues. For more information, see the related documentation

deduplicationScope String

Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).

delaySeconds Number

The time in seconds that the delivery of all messages in the queue will be delayed. An integer from 0 to 900 (15 minutes). The default for this attribute is 0 seconds.

fifoQueue Boolean

Boolean designating a FIFO queue. If not set, it defaults to false making it standard.

fifoThroughputLimit String

Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.

kmsDataKeyReusePeriodSeconds Number

The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 minute) and 86,400 seconds (24 hours). The default is 300 (5 minutes).

kmsMasterKeyId String

The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. For more information, see Key Terms.

maxMessageSize Number

The limit of how many bytes a message can contain before Amazon SQS rejects it. An integer from 1024 bytes (1 KiB) up to 262144 bytes (256 KiB). The default for this attribute is 262144 (256 KiB).

messageRetentionSeconds Number

The number of seconds Amazon SQS retains a message. Integer representing seconds, from 60 (1 minute) to 1209600 (14 days). The default for this attribute is 345600 (4 days).

name String

The name of the queue. Queue names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 80 characters long. For a FIFO (first-in-first-out) queue, the name must end with the .fifo suffix. If omitted, this provider will assign a random, unique name. Conflicts with name_prefix

namePrefix String

Creates a unique name beginning with the specified prefix. Conflicts with name

policy String

The JSON policy for the SQS queue.

receiveWaitTimeSeconds Number

The time for which a ReceiveMessage call will wait for a message to arrive (long polling) before returning. An integer from 0 to 20 (seconds). The default for this attribute is 0, meaning that the call will return immediately.

redriveAllowPolicy String

The JSON policy to set up the Dead Letter Queue redrive permission, see AWS docs.

redrivePolicy String

The JSON policy to set up the Dead Letter Queue, see AWS docs. Note: when specifying maxReceiveCount, you must specify it as an integer (5), and not a string ("5").

sqsManagedSseEnabled Boolean

Boolean to enable server-side encryption (SSE) of message content with SQS-owned encryption keys. See Encryption at rest. The provider will only perform drift detection of its value when present in a configuration.

tags Map<String>

A map of tags to assign to the queue. If configured with a provider default_tags configuration block) present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

url String

Same as id: The URL for the created Amazon SQS queue.

visibilityTimeoutSeconds Number

The visibility timeout for the queue. An integer from 0 to 43200 (12 hours). The default for this attribute is 30. For more information about visibility timeout, see AWS docs.

Import

SQS Queues can be imported using the queue url, e.g.,

 $ pulumi import aws:sqs/queue:Queue public_queue https://queue.amazonaws.com/80398EXAMPLE/MyQueue

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.