ServiceQueue

class ServiceQueue : KotlinCustomResource

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>

Properties

Link copied to clipboard
val createTime: Output<Int>

Represents the time when the Queue was created.

Link copied to clipboard
val delaySeconds: Output<Int>

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 id: Output<String>
Link copied to clipboard
val loggingEnabled: Output<Boolean>?

Represents whether the log management function is enabled.

Link copied to clipboard
val maximumMessageSize: Output<Int>

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

Link copied to clipboard

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

Link copied to clipboard
val pollingWaitSeconds: Output<Int>

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

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val queueName: Output<String>

Representative resources.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val visibilityTimeout: Output<Int>

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