alicloud.message.ServiceQueue
Explore with Pulumi AI
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:
- Queue
Name string - 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 intSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- Message
Retention intPeriod - Represents the longest life time of the message in the Queue.
- Polling
Wait intSeconds - 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.
- Queue
Name string - 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 intSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- Message
Retention intPeriod - Represents the longest life time of the message in the Queue.
- Polling
Wait intSeconds - 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.
- queue
Name String - Representative resources.
- delay
Seconds Integer - This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
- logging
Enabled Boolean - Represents whether the log management function is enabled.
- maximum
Message IntegerSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message
Retention IntegerPeriod - Represents the longest life time of the message in the Queue.
- polling
Wait IntegerSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- visibility
Timeout Integer - Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
- queue
Name string - Representative resources.
- delay
Seconds number - This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
- logging
Enabled boolean - Represents whether the log management function is enabled.
- maximum
Message numberSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message
Retention numberPeriod - Represents the longest life time of the message in the Queue.
- polling
Wait numberSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- visibility
Timeout 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_ intsize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message_
retention_ intperiod - Represents the longest life time of the message in the Queue.
- polling_
wait_ intseconds - 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.
- queue
Name String - Representative resources.
- delay
Seconds Number - This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
- logging
Enabled Boolean - Represents whether the log management function is enabled.
- maximum
Message NumberSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message
Retention NumberPeriod - Represents the longest life time of the message in the Queue.
- polling
Wait NumberSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- visibility
Timeout 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:
- Create
Time int - 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 string
- The provider-assigned unique ID for this managed resource.
- create
Time Integer - Represents the time when the Queue was created.
- id String
- The provider-assigned unique ID for this managed resource.
- create
Time 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.
- create
Time 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.
- 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 intSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- Message
Retention intPeriod - Represents the longest life time of the message in the Queue.
- Polling
Wait intSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- Queue
Name string - 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.
- 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 intSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- Message
Retention intPeriod - Represents the longest life time of the message in the Queue.
- Polling
Wait intSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- Queue
Name string - 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.
- create
Time Integer - Represents the time when the Queue was created.
- delay
Seconds Integer - This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
- logging
Enabled Boolean - Represents whether the log management function is enabled.
- maximum
Message IntegerSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message
Retention IntegerPeriod - Represents the longest life time of the message in the Queue.
- polling
Wait IntegerSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- queue
Name String - Representative resources.
- visibility
Timeout Integer - Represents the duration after the message is removed from the Queue and changed from the Active state to the Inactive state.
- create
Time number - Represents the time when the Queue was created.
- delay
Seconds number - This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
- logging
Enabled boolean - Represents whether the log management function is enabled.
- maximum
Message numberSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message
Retention numberPeriod - Represents the longest life time of the message in the Queue.
- polling
Wait numberSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- queue
Name string - Representative resources.
- visibility
Timeout 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_ intsize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message_
retention_ intperiod - Represents the longest life time of the message in the Queue.
- polling_
wait_ intseconds - 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.
- create
Time Number - Represents the time when the Queue was created.
- delay
Seconds Number - This means that messages sent to the queue can only be consumed after the delay time set by this parameter, in seconds.
- logging
Enabled Boolean - Represents whether the log management function is enabled.
- maximum
Message NumberSize - Represents the maximum length of the message body sent to the Queue, in Byte.
- message
Retention NumberPeriod - Represents the longest life time of the message in the Queue.
- polling
Wait NumberSeconds - The longest waiting time for a Queue request when the number of messages is empty, in seconds.
- queue
Name String - Representative resources.
- visibility
Timeout 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.