1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. message
  5. ServiceQueue
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.message.ServiceQueue

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Provides a Message Service Queue resource.

    For information about Message Service Queue and how to use it, see What is Queue.

    NOTE: Available since v1.188.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "terraform-example";
    const _default = new alicloud.message.ServiceQueue("default", {
        delaySeconds: 2,
        pollingWaitSeconds: 2,
        messageRetentionPeriod: 566,
        maximumMessageSize: 1123,
        visibilityTimeout: 30,
        queueName: name,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "terraform-example"
    default = alicloud.message.ServiceQueue("default",
        delay_seconds=2,
        polling_wait_seconds=2,
        message_retention_period=566,
        maximum_message_size=1123,
        visibility_timeout=30,
        queue_name=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/message"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "terraform-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := message.NewServiceQueue(ctx, "default", &message.ServiceQueueArgs{
    			DelaySeconds:           pulumi.Int(2),
    			PollingWaitSeconds:     pulumi.Int(2),
    			MessageRetentionPeriod: pulumi.Int(566),
    			MaximumMessageSize:     pulumi.Int(1123),
    			VisibilityTimeout:      pulumi.Int(30),
    			QueueName:              pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "terraform-example";
        var @default = new AliCloud.Message.ServiceQueue("default", new()
        {
            DelaySeconds = 2,
            PollingWaitSeconds = 2,
            MessageRetentionPeriod = 566,
            MaximumMessageSize = 1123,
            VisibilityTimeout = 30,
            QueueName = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.message.ServiceQueue;
    import com.pulumi.alicloud.message.ServiceQueueArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("terraform-example");
            var default_ = new ServiceQueue("default", ServiceQueueArgs.builder()
                .delaySeconds("2")
                .pollingWaitSeconds("2")
                .messageRetentionPeriod("566")
                .maximumMessageSize("1123")
                .visibilityTimeout("30")
                .queueName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: terraform-example
    resources:
      default:
        type: alicloud:message:ServiceQueue
        properties:
          delaySeconds: '2'
          pollingWaitSeconds: '2'
          messageRetentionPeriod: '566'
          maximumMessageSize: '1123'
          visibilityTimeout: '30'
          queueName: ${name}
    

    Create ServiceQueue Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceQueue(name: string, args: ServiceQueueArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceQueue(resource_name: str,
                     args: ServiceQueueArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceQueue(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     queue_name: Optional[str] = None,
                     delay_seconds: Optional[int] = None,
                     logging_enabled: Optional[bool] = None,
                     maximum_message_size: Optional[int] = None,
                     message_retention_period: Optional[int] = None,
                     polling_wait_seconds: Optional[int] = None,
                     visibility_timeout: Optional[int] = None)
    func NewServiceQueue(ctx *Context, name string, args ServiceQueueArgs, opts ...ResourceOption) (*ServiceQueue, error)
    public ServiceQueue(string name, ServiceQueueArgs args, CustomResourceOptions? opts = null)
    public ServiceQueue(String name, ServiceQueueArgs args)
    public ServiceQueue(String name, ServiceQueueArgs args, CustomResourceOptions options)
    
    type: alicloud:message:ServiceQueue
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ServiceQueueArgs
    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 ServiceQueueArgs
    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 ServiceQueueArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceQueueArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceQueueArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var serviceQueueResource = new AliCloud.Message.ServiceQueue("serviceQueueResource", new()
    {
        QueueName = "string",
        DelaySeconds = 0,
        LoggingEnabled = false,
        MaximumMessageSize = 0,
        MessageRetentionPeriod = 0,
        PollingWaitSeconds = 0,
        VisibilityTimeout = 0,
    });
    
    example, err := message.NewServiceQueue(ctx, "serviceQueueResource", &message.ServiceQueueArgs{
    	QueueName:              pulumi.String("string"),
    	DelaySeconds:           pulumi.Int(0),
    	LoggingEnabled:         pulumi.Bool(false),
    	MaximumMessageSize:     pulumi.Int(0),
    	MessageRetentionPeriod: pulumi.Int(0),
    	PollingWaitSeconds:     pulumi.Int(0),
    	VisibilityTimeout:      pulumi.Int(0),
    })
    
    var serviceQueueResource = new ServiceQueue("serviceQueueResource", ServiceQueueArgs.builder()
        .queueName("string")
        .delaySeconds(0)
        .loggingEnabled(false)
        .maximumMessageSize(0)
        .messageRetentionPeriod(0)
        .pollingWaitSeconds(0)
        .visibilityTimeout(0)
        .build());
    
    service_queue_resource = alicloud.message.ServiceQueue("serviceQueueResource",
        queue_name="string",
        delay_seconds=0,
        logging_enabled=False,
        maximum_message_size=0,
        message_retention_period=0,
        polling_wait_seconds=0,
        visibility_timeout=0)
    
    const serviceQueueResource = new alicloud.message.ServiceQueue("serviceQueueResource", {
        queueName: "string",
        delaySeconds: 0,
        loggingEnabled: false,
        maximumMessageSize: 0,
        messageRetentionPeriod: 0,
        pollingWaitSeconds: 0,
        visibilityTimeout: 0,
    });
    
    type: alicloud:message:ServiceQueue
    properties:
        delaySeconds: 0
        loggingEnabled: false
        maximumMessageSize: 0
        messageRetentionPeriod: 0
        pollingWaitSeconds: 0
        queueName: string
        visibilityTimeout: 0
    

    ServiceQueue 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 ServiceQueue resource accepts the following input properties:

    QueueName string
    Representative resources.
    DelaySeconds int
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    LoggingEnabled bool
    Represents whether the log management function is enabled.
    MaximumMessageSize int
    Represents the maximum length of the message body sent to the Queue, in Byte.
    MessageRetentionPeriod int
    Represents the longest life time of the message in the Queue.
    PollingWaitSeconds int
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    VisibilityTimeout int
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    QueueName string
    Representative resources.
    DelaySeconds int
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    LoggingEnabled bool
    Represents whether the log management function is enabled.
    MaximumMessageSize int
    Represents the maximum length of the message body sent to the Queue, in Byte.
    MessageRetentionPeriod int
    Represents the longest life time of the message in the Queue.
    PollingWaitSeconds int
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    VisibilityTimeout int
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    queueName String
    Representative resources.
    delaySeconds Integer
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    loggingEnabled Boolean
    Represents whether the log management function is enabled.
    maximumMessageSize Integer
    Represents the maximum length of the message body sent to the Queue, in Byte.
    messageRetentionPeriod Integer
    Represents the longest life time of the message in the Queue.
    pollingWaitSeconds Integer
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    visibilityTimeout Integer
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    queueName string
    Representative resources.
    delaySeconds number
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    loggingEnabled boolean
    Represents whether the log management function is enabled.
    maximumMessageSize number
    Represents the maximum length of the message body sent to the Queue, in Byte.
    messageRetentionPeriod number
    Represents the longest life time of the message in the Queue.
    pollingWaitSeconds number
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    visibilityTimeout number
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    queue_name str
    Representative resources.
    delay_seconds int
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    logging_enabled bool
    Represents whether the log management function is enabled.
    maximum_message_size int
    Represents the maximum length of the message body sent to the Queue, in Byte.
    message_retention_period int
    Represents the longest life time of the message in the Queue.
    polling_wait_seconds int
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    visibility_timeout int
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    queueName String
    Representative resources.
    delaySeconds Number
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    loggingEnabled Boolean
    Represents whether the log management function is enabled.
    maximumMessageSize Number
    Represents the maximum length of the message body sent to the Queue, in Byte.
    messageRetentionPeriod Number
    Represents the longest life time of the message in the Queue.
    pollingWaitSeconds Number
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    visibilityTimeout Number
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.

    Outputs

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

    CreateTime int
    Represents the time when the Queue was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime int
    Represents the time when the Queue was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime Integer
    Represents the time when the Queue was created.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime number
    Represents the time when the Queue was created.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time int
    Represents the time when the Queue was created.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime Number
    Represents the time when the Queue was created.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ServiceQueue Resource

    Get an existing ServiceQueue 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?: ServiceQueueState, opts?: CustomResourceOptions): ServiceQueue
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[int] = None,
            delay_seconds: Optional[int] = None,
            logging_enabled: Optional[bool] = None,
            maximum_message_size: Optional[int] = None,
            message_retention_period: Optional[int] = None,
            polling_wait_seconds: Optional[int] = None,
            queue_name: Optional[str] = None,
            visibility_timeout: Optional[int] = None) -> ServiceQueue
    func GetServiceQueue(ctx *Context, name string, id IDInput, state *ServiceQueueState, opts ...ResourceOption) (*ServiceQueue, error)
    public static ServiceQueue Get(string name, Input<string> id, ServiceQueueState? state, CustomResourceOptions? opts = null)
    public static ServiceQueue get(String name, Output<String> id, ServiceQueueState 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:
    CreateTime int
    Represents the time when the Queue was created.
    DelaySeconds int
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    LoggingEnabled bool
    Represents whether the log management function is enabled.
    MaximumMessageSize int
    Represents the maximum length of the message body sent to the Queue, in Byte.
    MessageRetentionPeriod int
    Represents the longest life time of the message in the Queue.
    PollingWaitSeconds int
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    QueueName string
    Representative resources.
    VisibilityTimeout int
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    CreateTime int
    Represents the time when the Queue was created.
    DelaySeconds int
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    LoggingEnabled bool
    Represents whether the log management function is enabled.
    MaximumMessageSize int
    Represents the maximum length of the message body sent to the Queue, in Byte.
    MessageRetentionPeriod int
    Represents the longest life time of the message in the Queue.
    PollingWaitSeconds int
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    QueueName string
    Representative resources.
    VisibilityTimeout int
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    createTime Integer
    Represents the time when the Queue was created.
    delaySeconds Integer
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    loggingEnabled Boolean
    Represents whether the log management function is enabled.
    maximumMessageSize Integer
    Represents the maximum length of the message body sent to the Queue, in Byte.
    messageRetentionPeriod Integer
    Represents the longest life time of the message in the Queue.
    pollingWaitSeconds Integer
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    queueName String
    Representative resources.
    visibilityTimeout Integer
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    createTime number
    Represents the time when the Queue was created.
    delaySeconds number
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    loggingEnabled boolean
    Represents whether the log management function is enabled.
    maximumMessageSize number
    Represents the maximum length of the message body sent to the Queue, in Byte.
    messageRetentionPeriod number
    Represents the longest life time of the message in the Queue.
    pollingWaitSeconds number
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    queueName string
    Representative resources.
    visibilityTimeout number
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    create_time int
    Represents the time when the Queue was created.
    delay_seconds int
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    logging_enabled bool
    Represents whether the log management function is enabled.
    maximum_message_size int
    Represents the maximum length of the message body sent to the Queue, in Byte.
    message_retention_period int
    Represents the longest life time of the message in the Queue.
    polling_wait_seconds int
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    queue_name str
    Representative resources.
    visibility_timeout int
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
    createTime Number
    Represents the time when the Queue was created.
    delaySeconds Number
    This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
    loggingEnabled Boolean
    Represents whether the log management function is enabled.
    maximumMessageSize Number
    Represents the maximum length of the message body sent to the Queue, in Byte.
    messageRetentionPeriod Number
    Represents the longest life time of the message in the Queue.
    pollingWaitSeconds Number
    The longest waiting time for a Queue request when the number of messages is empty, in seconds.
    queueName String
    Representative resources.
    visibilityTimeout Number
    Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.

    Import

    Message Service Queue can be imported using the id, e.g.

    $ pulumi import alicloud:message/serviceQueue:ServiceQueue example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    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.57.1 published on Wednesday, Jun 26, 2024 by Pulumi