cloudflare.Queue
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleQueue = new cloudflare.Queue("example_queue", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
queueName: "example-queue",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_queue = cloudflare.Queue("example_queue",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
queue_name="example-queue")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewQueue(ctx, "example_queue", &cloudflare.QueueArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
QueueName: pulumi.String("example-queue"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleQueue = new Cloudflare.Queue("example_queue", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
QueueName = "example-queue",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.Queue;
import com.pulumi.cloudflare.QueueArgs;
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) {
var exampleQueue = new Queue("exampleQueue", QueueArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.queueName("example-queue")
.build());
}
}
resources:
exampleQueue:
type: cloudflare:Queue
name: example_queue
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
queueName: example-queue
Create Queue Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Queue(name: string, args: QueueArgs, opts?: CustomResourceOptions);
@overload
def Queue(resource_name: str,
args: QueueArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Queue(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
queue_name: Optional[str] = None,
settings: Optional[QueueSettingsArgs] = None)
func NewQueue(ctx *Context, name string, args QueueArgs, opts ...ResourceOption) (*Queue, error)
public Queue(string name, QueueArgs args, CustomResourceOptions? opts = null)
type: cloudflare:Queue
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 QueueArgs
- 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 QueueArgs
- 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 QueueArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args QueueArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args QueueArgs
- 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 queueResource = new Cloudflare.Queue("queueResource", new()
{
AccountId = "string",
QueueName = "string",
Settings = new Cloudflare.Inputs.QueueSettingsArgs
{
DeliveryDelay = 0,
DeliveryPaused = false,
MessageRetentionPeriod = 0,
},
});
example, err := cloudflare.NewQueue(ctx, "queueResource", &cloudflare.QueueArgs{
AccountId: pulumi.String("string"),
QueueName: pulumi.String("string"),
Settings: &cloudflare.QueueSettingsArgs{
DeliveryDelay: pulumi.Float64(0),
DeliveryPaused: pulumi.Bool(false),
MessageRetentionPeriod: pulumi.Float64(0),
},
})
var queueResource = new Queue("queueResource", QueueArgs.builder()
.accountId("string")
.queueName("string")
.settings(QueueSettingsArgs.builder()
.deliveryDelay(0)
.deliveryPaused(false)
.messageRetentionPeriod(0)
.build())
.build());
queue_resource = cloudflare.Queue("queueResource",
account_id="string",
queue_name="string",
settings={
"delivery_delay": 0,
"delivery_paused": False,
"message_retention_period": 0,
})
const queueResource = new cloudflare.Queue("queueResource", {
accountId: "string",
queueName: "string",
settings: {
deliveryDelay: 0,
deliveryPaused: false,
messageRetentionPeriod: 0,
},
});
type: cloudflare:Queue
properties:
accountId: string
queueName: string
settings:
deliveryDelay: 0
deliveryPaused: false
messageRetentionPeriod: 0
Queue Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Queue resource accepts the following input properties:
- Account
Id string - A Resource identifier.
- Queue
Name string - Settings
Queue
Settings
- Account
Id string - A Resource identifier.
- Queue
Name string - Settings
Queue
Settings Args
- account
Id String - A Resource identifier.
- queue
Name String - settings
Queue
Settings
- account
Id string - A Resource identifier.
- queue
Name string - settings
Queue
Settings
- account_
id str - A Resource identifier.
- queue_
name str - settings
Queue
Settings Args
- account
Id String - A Resource identifier.
- queue
Name String - settings Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Queue resource produces the following output properties:
- Consumers
List<Queue
Consumer> - Consumers
Total doubleCount - Created
On string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Producers
List<Queue
Producer> - Producers
Total doubleCount - Queue
Id string
- Consumers
[]Queue
Consumer Type - Consumers
Total float64Count - Created
On string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Producers
[]Queue
Producer - Producers
Total float64Count - Queue
Id string
- consumers
List<Queue
Consumer> - consumers
Total DoubleCount - created
On String - id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - producers
List<Queue
Producer> - producers
Total DoubleCount - queue
Id String
- consumers
Queue
Consumer[] - consumers
Total numberCount - created
On string - id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - producers
Queue
Producer[] - producers
Total numberCount - queue
Id string
- consumers
Sequence[Queue
Consumer] - consumers_
total_ floatcount - created_
on str - id str
- The provider-assigned unique ID for this managed resource.
- modified_
on str - producers
Sequence[Queue
Producer] - producers_
total_ floatcount - queue_
id str
- consumers List<Property Map>
- consumers
Total NumberCount - created
On String - id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - producers List<Property Map>
- producers
Total NumberCount - queue
Id String
Look up Existing Queue Resource
Get an existing Queue 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?: QueueState, opts?: CustomResourceOptions): Queue
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
consumers: Optional[Sequence[QueueConsumerArgs]] = None,
consumers_total_count: Optional[float] = None,
created_on: Optional[str] = None,
modified_on: Optional[str] = None,
producers: Optional[Sequence[QueueProducerArgs]] = None,
producers_total_count: Optional[float] = None,
queue_id: Optional[str] = None,
queue_name: Optional[str] = None,
settings: Optional[QueueSettingsArgs] = None) -> Queue
func GetQueue(ctx *Context, name string, id IDInput, state *QueueState, opts ...ResourceOption) (*Queue, error)
public static Queue Get(string name, Input<string> id, QueueState? state, CustomResourceOptions? opts = null)
public static Queue get(String name, Output<String> id, QueueState state, CustomResourceOptions options)
resources: _: type: cloudflare:Queue get: id: ${id}
- 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.
- Account
Id string - A Resource identifier.
- Consumers
List<Queue
Consumer> - Consumers
Total doubleCount - Created
On string - Modified
On string - Producers
List<Queue
Producer> - Producers
Total doubleCount - Queue
Id string - Queue
Name string - Settings
Queue
Settings
- Account
Id string - A Resource identifier.
- Consumers
[]Queue
Consumer Type Args - Consumers
Total float64Count - Created
On string - Modified
On string - Producers
[]Queue
Producer Args - Producers
Total float64Count - Queue
Id string - Queue
Name string - Settings
Queue
Settings Args
- account
Id String - A Resource identifier.
- consumers
List<Queue
Consumer> - consumers
Total DoubleCount - created
On String - modified
On String - producers
List<Queue
Producer> - producers
Total DoubleCount - queue
Id String - queue
Name String - settings
Queue
Settings
- account
Id string - A Resource identifier.
- consumers
Queue
Consumer[] - consumers
Total numberCount - created
On string - modified
On string - producers
Queue
Producer[] - producers
Total numberCount - queue
Id string - queue
Name string - settings
Queue
Settings
- account_
id str - A Resource identifier.
- consumers
Sequence[Queue
Consumer Args] - consumers_
total_ floatcount - created_
on str - modified_
on str - producers
Sequence[Queue
Producer Args] - producers_
total_ floatcount - queue_
id str - queue_
name str - settings
Queue
Settings Args
- account
Id String - A Resource identifier.
- consumers List<Property Map>
- consumers
Total NumberCount - created
On String - modified
On String - producers List<Property Map>
- producers
Total NumberCount - queue
Id String - queue
Name String - settings Property Map
Supporting Types
QueueConsumer, QueueConsumerArgs
- Consumer
Id string - A Resource identifier.
- Created
On string - Queue
Id string - A Resource identifier.
- Script string
- Name of a Worker
- Script
Name string - Name of a Worker
- Settings
Queue
Consumer Settings - Type string
- Available values: "worker".
- Consumer
Id string - A Resource identifier.
- Created
On string - Queue
Id string - A Resource identifier.
- Script string
- Name of a Worker
- Script
Name string - Name of a Worker
- Settings
Queue
Consumer Settings - Type string
- Available values: "worker".
- consumer
Id String - A Resource identifier.
- created
On String - queue
Id String - A Resource identifier.
- script String
- Name of a Worker
- script
Name String - Name of a Worker
- settings
Queue
Consumer Settings - type String
- Available values: "worker".
- consumer
Id string - A Resource identifier.
- created
On string - queue
Id string - A Resource identifier.
- script string
- Name of a Worker
- script
Name string - Name of a Worker
- settings
Queue
Consumer Settings - type string
- Available values: "worker".
- consumer_
id str - A Resource identifier.
- created_
on str - queue_
id str - A Resource identifier.
- script str
- Name of a Worker
- script_
name str - Name of a Worker
- settings
Queue
Consumer Settings - type str
- Available values: "worker".
- consumer
Id String - A Resource identifier.
- created
On String - queue
Id String - A Resource identifier.
- script String
- Name of a Worker
- script
Name String - Name of a Worker
- settings Property Map
- type String
- Available values: "worker".
QueueConsumerSettings, QueueConsumerSettingsArgs
- Batch
Size double - The maximum number of messages to include in a batch.
- Max
Concurrency double - Maximum number of concurrent consumers that may consume from this Queue. Set to
null
to automatically opt in to the platform's maximum (recommended). - Max
Retries double - The maximum number of retries
- Max
Wait doubleTime Ms - The number of milliseconds to wait for a batch to fill up before attempting to deliver it
- Retry
Delay double - The number of seconds to delay before making the message available for another attempt.
- Visibility
Timeout doubleMs - The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
- Batch
Size float64 - The maximum number of messages to include in a batch.
- Max
Concurrency float64 - Maximum number of concurrent consumers that may consume from this Queue. Set to
null
to automatically opt in to the platform's maximum (recommended). - Max
Retries float64 - The maximum number of retries
- Max
Wait float64Time Ms - The number of milliseconds to wait for a batch to fill up before attempting to deliver it
- Retry
Delay float64 - The number of seconds to delay before making the message available for another attempt.
- Visibility
Timeout float64Ms - The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
- batch
Size Double - The maximum number of messages to include in a batch.
- max
Concurrency Double - Maximum number of concurrent consumers that may consume from this Queue. Set to
null
to automatically opt in to the platform's maximum (recommended). - max
Retries Double - The maximum number of retries
- max
Wait DoubleTime Ms - The number of milliseconds to wait for a batch to fill up before attempting to deliver it
- retry
Delay Double - The number of seconds to delay before making the message available for another attempt.
- visibility
Timeout DoubleMs - The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
- batch
Size number - The maximum number of messages to include in a batch.
- max
Concurrency number - Maximum number of concurrent consumers that may consume from this Queue. Set to
null
to automatically opt in to the platform's maximum (recommended). - max
Retries number - The maximum number of retries
- max
Wait numberTime Ms - The number of milliseconds to wait for a batch to fill up before attempting to deliver it
- retry
Delay number - The number of seconds to delay before making the message available for another attempt.
- visibility
Timeout numberMs - The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
- batch_
size float - The maximum number of messages to include in a batch.
- max_
concurrency float - Maximum number of concurrent consumers that may consume from this Queue. Set to
null
to automatically opt in to the platform's maximum (recommended). - max_
retries float - The maximum number of retries
- max_
wait_ floattime_ ms - The number of milliseconds to wait for a batch to fill up before attempting to deliver it
- retry_
delay float - The number of seconds to delay before making the message available for another attempt.
- visibility_
timeout_ floatms - The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
- batch
Size Number - The maximum number of messages to include in a batch.
- max
Concurrency Number - Maximum number of concurrent consumers that may consume from this Queue. Set to
null
to automatically opt in to the platform's maximum (recommended). - max
Retries Number - The maximum number of retries
- max
Wait NumberTime Ms - The number of milliseconds to wait for a batch to fill up before attempting to deliver it
- retry
Delay Number - The number of seconds to delay before making the message available for another attempt.
- visibility
Timeout NumberMs - The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
QueueProducer, QueueProducerArgs
- Bucket
Name string - Script string
- Type string
- Available values: "worker".
- Bucket
Name string - Script string
- Type string
- Available values: "worker".
- bucket
Name String - script String
- type String
- Available values: "worker".
- bucket
Name string - script string
- type string
- Available values: "worker".
- bucket_
name str - script str
- type str
- Available values: "worker".
- bucket
Name String - script String
- type String
- Available values: "worker".
QueueSettings, QueueSettingsArgs
- Delivery
Delay double - Number of seconds to delay delivery of all messages to consumers.
- Delivery
Paused bool - Indicates if message delivery to consumers is currently paused.
- Message
Retention doublePeriod - Number of seconds after which an unconsumed message will be delayed.
- Delivery
Delay float64 - Number of seconds to delay delivery of all messages to consumers.
- Delivery
Paused bool - Indicates if message delivery to consumers is currently paused.
- Message
Retention float64Period - Number of seconds after which an unconsumed message will be delayed.
- delivery
Delay Double - Number of seconds to delay delivery of all messages to consumers.
- delivery
Paused Boolean - Indicates if message delivery to consumers is currently paused.
- message
Retention DoublePeriod - Number of seconds after which an unconsumed message will be delayed.
- delivery
Delay number - Number of seconds to delay delivery of all messages to consumers.
- delivery
Paused boolean - Indicates if message delivery to consumers is currently paused.
- message
Retention numberPeriod - Number of seconds after which an unconsumed message will be delayed.
- delivery_
delay float - Number of seconds to delay delivery of all messages to consumers.
- delivery_
paused bool - Indicates if message delivery to consumers is currently paused.
- message_
retention_ floatperiod - Number of seconds after which an unconsumed message will be delayed.
- delivery
Delay Number - Number of seconds to delay delivery of all messages to consumers.
- delivery
Paused Boolean - Indicates if message delivery to consumers is currently paused.
- message
Retention NumberPeriod - Number of seconds after which an unconsumed message will be delayed.
Import
$ pulumi import cloudflare:index/queue:Queue example '<account_id>/<queue_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.