1. Packages
  2. AWS
  3. API Docs
  4. sqs
  5. getQueues
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.sqs.getQueues

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Data source for managing an AWS SQS (Simple Queue) Queues.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = aws.sqs.getQueues({
        queueNamePrefix: "example",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.sqs.get_queues(queue_name_prefix="example")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sqs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sqs.GetQueues(ctx, &sqs.GetQueuesArgs{
    			QueueNamePrefix: pulumi.StringRef("example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Aws.Sqs.GetQueues.Invoke(new()
        {
            QueueNamePrefix = "example",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.sqs.SqsFunctions;
    import com.pulumi.aws.sqs.inputs.GetQueuesArgs;
    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) {
            final var example = SqsFunctions.getQueues(GetQueuesArgs.builder()
                .queueNamePrefix("example")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: aws:sqs:getQueues
          Arguments:
            queueNamePrefix: example
    

    Using getQueues

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getQueues(args: GetQueuesArgs, opts?: InvokeOptions): Promise<GetQueuesResult>
    function getQueuesOutput(args: GetQueuesOutputArgs, opts?: InvokeOptions): Output<GetQueuesResult>
    def get_queues(queue_name_prefix: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetQueuesResult
    def get_queues_output(queue_name_prefix: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetQueuesResult]
    func GetQueues(ctx *Context, args *GetQueuesArgs, opts ...InvokeOption) (*GetQueuesResult, error)
    func GetQueuesOutput(ctx *Context, args *GetQueuesOutputArgs, opts ...InvokeOption) GetQueuesResultOutput

    > Note: This function is named GetQueues in the Go SDK.

    public static class GetQueues 
    {
        public static Task<GetQueuesResult> InvokeAsync(GetQueuesArgs args, InvokeOptions? opts = null)
        public static Output<GetQueuesResult> Invoke(GetQueuesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetQueuesResult> getQueues(GetQueuesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:sqs/getQueues:getQueues
      arguments:
        # arguments dictionary

    The following arguments are supported:

    QueueNamePrefix string
    A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
    QueueNamePrefix string
    A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
    queueNamePrefix String
    A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
    queueNamePrefix string
    A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
    queue_name_prefix str
    A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.
    queueNamePrefix String
    A string to use for filtering the list results. Only those queues whose name begins with the specified string are returned. Queue URLs and names are case-sensitive.

    getQueues Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    QueueUrls List<string>
    A list of queue URLs.
    QueueNamePrefix string
    Id string
    The provider-assigned unique ID for this managed resource.
    QueueUrls []string
    A list of queue URLs.
    QueueNamePrefix string
    id String
    The provider-assigned unique ID for this managed resource.
    queueUrls List<String>
    A list of queue URLs.
    queueNamePrefix String
    id string
    The provider-assigned unique ID for this managed resource.
    queueUrls string[]
    A list of queue URLs.
    queueNamePrefix string
    id str
    The provider-assigned unique ID for this managed resource.
    queue_urls Sequence[str]
    A list of queue URLs.
    queue_name_prefix str
    id String
    The provider-assigned unique ID for this managed resource.
    queueUrls List<String>
    A list of queue URLs.
    queueNamePrefix String

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi