1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. message
  5. getServiceQueues
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.message.getServiceQueues

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides the Message Notification Service Queues of the current Alibaba Cloud user.

    NOTE: Available in v1.188.0+.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.message.getServiceQueues({
        ids: ["example_id"],
    });
    export const queueId1 = ids.then(ids => ids.queues?.[0]?.id);
    const name = alicloud.message.getServiceQueues({
        queueName: "tf-example",
    });
    export const queueId2 = name.then(name => name.queues?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.message.get_service_queues(ids=["example_id"])
    pulumi.export("queueId1", ids.queues[0].id)
    name = alicloud.message.get_service_queues(queue_name="tf-example")
    pulumi.export("queueId2", name.queues[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/message"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := message.GetServiceQueues(ctx, &message.GetServiceQueuesArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("queueId1", ids.Queues[0].Id)
    		name, err := message.GetServiceQueues(ctx, &message.GetServiceQueuesArgs{
    			QueueName: pulumi.StringRef("tf-example"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("queueId2", name.Queues[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Message.GetServiceQueues.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var name = AliCloud.Message.GetServiceQueues.Invoke(new()
        {
            QueueName = "tf-example",
        });
    
        return new Dictionary<string, object?>
        {
            ["queueId1"] = ids.Apply(getServiceQueuesResult => getServiceQueuesResult.Queues[0]?.Id),
            ["queueId2"] = name.Apply(getServiceQueuesResult => getServiceQueuesResult.Queues[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.message.MessageFunctions;
    import com.pulumi.alicloud.message.inputs.GetServiceQueuesArgs;
    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 ids = MessageFunctions.getServiceQueues(GetServiceQueuesArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("queueId1", ids.applyValue(getServiceQueuesResult -> getServiceQueuesResult.queues()[0].id()));
            final var name = MessageFunctions.getServiceQueues(GetServiceQueuesArgs.builder()
                .queueName("tf-example")
                .build());
    
            ctx.export("queueId2", name.applyValue(getServiceQueuesResult -> getServiceQueuesResult.queues()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:message:getServiceQueues
          Arguments:
            ids:
              - example_id
      name:
        fn::invoke:
          Function: alicloud:message:getServiceQueues
          Arguments:
            queueName: tf-example
    outputs:
      queueId1: ${ids.queues[0].id}
      queueId2: ${name.queues[0].id}
    

    Using getServiceQueues

    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 getServiceQueues(args: GetServiceQueuesArgs, opts?: InvokeOptions): Promise<GetServiceQueuesResult>
    function getServiceQueuesOutput(args: GetServiceQueuesOutputArgs, opts?: InvokeOptions): Output<GetServiceQueuesResult>
    def get_service_queues(ids: Optional[Sequence[str]] = None,
                           name_regex: Optional[str] = None,
                           output_file: Optional[str] = None,
                           page_number: Optional[int] = None,
                           page_size: Optional[int] = None,
                           queue_name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetServiceQueuesResult
    def get_service_queues_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                           name_regex: Optional[pulumi.Input[str]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           page_number: Optional[pulumi.Input[int]] = None,
                           page_size: Optional[pulumi.Input[int]] = None,
                           queue_name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetServiceQueuesResult]
    func GetServiceQueues(ctx *Context, args *GetServiceQueuesArgs, opts ...InvokeOption) (*GetServiceQueuesResult, error)
    func GetServiceQueuesOutput(ctx *Context, args *GetServiceQueuesOutputArgs, opts ...InvokeOption) GetServiceQueuesResultOutput

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

    public static class GetServiceQueues 
    {
        public static Task<GetServiceQueuesResult> InvokeAsync(GetServiceQueuesArgs args, InvokeOptions? opts = null)
        public static Output<GetServiceQueuesResult> Invoke(GetServiceQueuesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetServiceQueuesResult> getServiceQueues(GetServiceQueuesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:message/getServiceQueues:getServiceQueues
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Queue IDs. Its element value is same as Queue Name.
    NameRegex string
    A regex string to filter results by Queue name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    QueueName string
    The name of the queue.
    Ids []string
    A list of Queue IDs. Its element value is same as Queue Name.
    NameRegex string
    A regex string to filter results by Queue name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    QueueName string
    The name of the queue.
    ids List<String>
    A list of Queue IDs. Its element value is same as Queue Name.
    nameRegex String
    A regex string to filter results by Queue name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    queueName String
    The name of the queue.
    ids string[]
    A list of Queue IDs. Its element value is same as Queue Name.
    nameRegex string
    A regex string to filter results by Queue name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    queueName string
    The name of the queue.
    ids Sequence[str]
    A list of Queue IDs. Its element value is same as Queue Name.
    name_regex str
    A regex string to filter results by Queue name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    queue_name str
    The name of the queue.
    ids List<String>
    A list of Queue IDs. Its element value is same as Queue Name.
    nameRegex String
    A regex string to filter results by Queue name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number
    queueName String
    The name of the queue.

    getServiceQueues Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    A list of Queue names.
    Queues List<Pulumi.AliCloud.Message.Outputs.GetServiceQueuesQueue>
    A list of Queues. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    QueueName string
    The name of the queue.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    A list of Queue names.
    Queues []GetServiceQueuesQueue
    A list of Queues. Each element contains the following attributes:
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    QueueName string
    The name of the queue.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Queue names.
    queues List<GetServiceQueuesQueue>
    A list of Queues. Each element contains the following attributes:
    nameRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    queueName String
    The name of the queue.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    A list of Queue names.
    queues GetServiceQueuesQueue[]
    A list of Queues. Each element contains the following attributes:
    nameRegex string
    outputFile string
    pageNumber number
    pageSize number
    queueName string
    The name of the queue.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    A list of Queue names.
    queues Sequence[GetServiceQueuesQueue]
    A list of Queues. Each element contains the following attributes:
    name_regex str
    output_file str
    page_number int
    page_size int
    queue_name str
    The name of the queue.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    A list of Queue names.
    queues List<Property Map>
    A list of Queues. Each element contains the following attributes:
    nameRegex String
    outputFile String
    pageNumber Number
    pageSize Number
    queueName String
    The name of the queue.

    Supporting Types

    GetServiceQueuesQueue

    ActiveMessages int
    The total number of messages that are in the Active state in the queue. The value is an approximate number.
    CreateTime int
    The time when the queue was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    DelayMessages int
    The total number of the messages that are in the Delayed state in the queue. The value is an approximate number.
    DelaySeconds int
    The delay period after which all messages that are sent to the queue can be consumed. Unit: seconds.
    Id string
    The ID of the Queue. Its value is same as Queue Name.
    InactiveMessages int
    The total number of the messages that are in the Inactive state in the queue. The value is an approximate number.
    LastModifyTime int
    The time when the queue was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    LoggingEnabled bool
    Indicates whether the log management feature is enabled for the queue.
    MaximumMessageSize int
    The maximum size of a message body that can be sent to the queue. Unit: bytes.
    MessageRetentionPeriod int
    The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds.
    PollingWaitSeconds int
    The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds.
    QueueInternalUrl string
    The internal url of the queue.
    QueueName string
    The name of the queue.
    QueueUrl string
    The url of the queue.
    VisibilityTimeout int
    The invisibility period for which the received message remains the Inactive state. Unit: seconds.
    ActiveMessages int
    The total number of messages that are in the Active state in the queue. The value is an approximate number.
    CreateTime int
    The time when the queue was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    DelayMessages int
    The total number of the messages that are in the Delayed state in the queue. The value is an approximate number.
    DelaySeconds int
    The delay period after which all messages that are sent to the queue can be consumed. Unit: seconds.
    Id string
    The ID of the Queue. Its value is same as Queue Name.
    InactiveMessages int
    The total number of the messages that are in the Inactive state in the queue. The value is an approximate number.
    LastModifyTime int
    The time when the queue was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    LoggingEnabled bool
    Indicates whether the log management feature is enabled for the queue.
    MaximumMessageSize int
    The maximum size of a message body that can be sent to the queue. Unit: bytes.
    MessageRetentionPeriod int
    The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds.
    PollingWaitSeconds int
    The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds.
    QueueInternalUrl string
    The internal url of the queue.
    QueueName string
    The name of the queue.
    QueueUrl string
    The url of the queue.
    VisibilityTimeout int
    The invisibility period for which the received message remains the Inactive state. Unit: seconds.
    activeMessages Integer
    The total number of messages that are in the Active state in the queue. The value is an approximate number.
    createTime Integer
    The time when the queue was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    delayMessages Integer
    The total number of the messages that are in the Delayed state in the queue. The value is an approximate number.
    delaySeconds Integer
    The delay period after which all messages that are sent to the queue can be consumed. Unit: seconds.
    id String
    The ID of the Queue. Its value is same as Queue Name.
    inactiveMessages Integer
    The total number of the messages that are in the Inactive state in the queue. The value is an approximate number.
    lastModifyTime Integer
    The time when the queue was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    loggingEnabled Boolean
    Indicates whether the log management feature is enabled for the queue.
    maximumMessageSize Integer
    The maximum size of a message body that can be sent to the queue. Unit: bytes.
    messageRetentionPeriod Integer
    The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds.
    pollingWaitSeconds Integer
    The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds.
    queueInternalUrl String
    The internal url of the queue.
    queueName String
    The name of the queue.
    queueUrl String
    The url of the queue.
    visibilityTimeout Integer
    The invisibility period for which the received message remains the Inactive state. Unit: seconds.
    activeMessages number
    The total number of messages that are in the Active state in the queue. The value is an approximate number.
    createTime number
    The time when the queue was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    delayMessages number
    The total number of the messages that are in the Delayed state in the queue. The value is an approximate number.
    delaySeconds number
    The delay period after which all messages that are sent to the queue can be consumed. Unit: seconds.
    id string
    The ID of the Queue. Its value is same as Queue Name.
    inactiveMessages number
    The total number of the messages that are in the Inactive state in the queue. The value is an approximate number.
    lastModifyTime number
    The time when the queue was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    loggingEnabled boolean
    Indicates whether the log management feature is enabled for the queue.
    maximumMessageSize number
    The maximum size of a message body that can be sent to the queue. Unit: bytes.
    messageRetentionPeriod number
    The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds.
    pollingWaitSeconds number
    The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds.
    queueInternalUrl string
    The internal url of the queue.
    queueName string
    The name of the queue.
    queueUrl string
    The url of the queue.
    visibilityTimeout number
    The invisibility period for which the received message remains the Inactive state. Unit: seconds.
    active_messages int
    The total number of messages that are in the Active state in the queue. The value is an approximate number.
    create_time int
    The time when the queue was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    delay_messages int
    The total number of the messages that are in the Delayed state in the queue. The value is an approximate number.
    delay_seconds int
    The delay period after which all messages that are sent to the queue can be consumed. Unit: seconds.
    id str
    The ID of the Queue. Its value is same as Queue Name.
    inactive_messages int
    The total number of the messages that are in the Inactive state in the queue. The value is an approximate number.
    last_modify_time int
    The time when the queue was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    logging_enabled bool
    Indicates whether the log management feature is enabled for the queue.
    maximum_message_size int
    The maximum size of a message body that can be sent to the queue. Unit: bytes.
    message_retention_period int
    The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds.
    polling_wait_seconds int
    The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds.
    queue_internal_url str
    The internal url of the queue.
    queue_name str
    The name of the queue.
    queue_url str
    The url of the queue.
    visibility_timeout int
    The invisibility period for which the received message remains the Inactive state. Unit: seconds.
    activeMessages Number
    The total number of messages that are in the Active state in the queue. The value is an approximate number.
    createTime Number
    The time when the queue was created. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    delayMessages Number
    The total number of the messages that are in the Delayed state in the queue. The value is an approximate number.
    delaySeconds Number
    The delay period after which all messages that are sent to the queue can be consumed. Unit: seconds.
    id String
    The ID of the Queue. Its value is same as Queue Name.
    inactiveMessages Number
    The total number of the messages that are in the Inactive state in the queue. The value is an approximate number.
    lastModifyTime Number
    The time when the queue was last modified. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since the epoch time January 1, 1970, 00:00:00 UTC.
    loggingEnabled Boolean
    Indicates whether the log management feature is enabled for the queue.
    maximumMessageSize Number
    The maximum size of a message body that can be sent to the queue. Unit: bytes.
    messageRetentionPeriod Number
    The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds.
    pollingWaitSeconds Number
    The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds.
    queueInternalUrl String
    The internal url of the queue.
    queueName String
    The name of the queue.
    queueUrl String
    The url of the queue.
    visibilityTimeout Number
    The invisibility period for which the received message remains the Inactive state. Unit: seconds.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi