ServiceQueueArgs

data class ServiceQueueArgs(val delaySeconds: Output<Int>? = null, val loggingEnabled: Output<Boolean>? = null, val maximumMessageSize: Output<Int>? = null, val messageRetentionPeriod: Output<Int>? = null, val pollingWaitSeconds: Output<Int>? = null, val queueName: Output<String>? = null, val visibilityTimeout: Output<Int>? = null) : ConvertibleToJava<ServiceQueueArgs>

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)
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 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
})
}
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}

Import

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

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

Constructors

Link copied to clipboard
constructor(delaySeconds: Output<Int>? = null, loggingEnabled: Output<Boolean>? = null, maximumMessageSize: Output<Int>? = null, messageRetentionPeriod: Output<Int>? = null, pollingWaitSeconds: Output<Int>? = null, queueName: Output<String>? = null, visibilityTimeout: Output<Int>? = null)

Properties

Link copied to clipboard
val delaySeconds: Output<Int>? = null

This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.

Link copied to clipboard
val loggingEnabled: Output<Boolean>? = null

Represents whether the log management function is enabled.

Link copied to clipboard
val maximumMessageSize: Output<Int>? = null

Represents the maximum length of the message body sent to the Queue, in Byte.

Link copied to clipboard
val messageRetentionPeriod: Output<Int>? = null

Represents the longest life time of the message in the Queue.

Link copied to clipboard
val pollingWaitSeconds: Output<Int>? = null

The longest waiting time for a Queue request when the number of messages is empty, in seconds.

Link copied to clipboard
val queueName: Output<String>? = null

Representative resources.

Link copied to clipboard
val visibilityTimeout: Output<Int>? = null

Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.

Functions

Link copied to clipboard
open override fun toJava(): ServiceQueueArgs