1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. Queue
Cloudflare v6.1.1 published on Monday, Apr 21, 2025 by Pulumi

cloudflare.Queue

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.1 published on Monday, Apr 21, 2025 by Pulumi

    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)
    public Queue(String name, QueueArgs args)
    public Queue(String name, QueueArgs args, CustomResourceOptions options)
    
    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:

    AccountId string
    A Resource identifier.
    QueueName string
    Settings QueueSettings
    AccountId string
    A Resource identifier.
    QueueName string
    Settings QueueSettingsArgs
    accountId String
    A Resource identifier.
    queueName String
    settings QueueSettings
    accountId string
    A Resource identifier.
    queueName string
    settings QueueSettings
    account_id str
    A Resource identifier.
    queue_name str
    settings QueueSettingsArgs
    accountId String
    A Resource identifier.
    queueName 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<QueueConsumer>
    ConsumersTotalCount double
    CreatedOn string
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    Producers List<QueueProducer>
    ProducersTotalCount double
    QueueId string
    Consumers []QueueConsumerType
    ConsumersTotalCount float64
    CreatedOn string
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    Producers []QueueProducer
    ProducersTotalCount float64
    QueueId string
    consumers List<QueueConsumer>
    consumersTotalCount Double
    createdOn String
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    producers List<QueueProducer>
    producersTotalCount Double
    queueId String
    consumers QueueConsumer[]
    consumersTotalCount number
    createdOn string
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedOn string
    producers QueueProducer[]
    producersTotalCount number
    queueId string
    consumers List<Property Map>
    consumersTotalCount Number
    createdOn String
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    producers List<Property Map>
    producersTotalCount Number
    queueId 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.
    The following state arguments are supported:

    Supporting Types

    QueueConsumer, QueueConsumerArgs

    ConsumerId string
    A Resource identifier.
    CreatedOn string
    QueueId string
    A Resource identifier.
    Script string
    Name of a Worker
    ScriptName string
    Name of a Worker
    Settings QueueConsumerSettings
    Type string
    Available values: "worker".
    ConsumerId string
    A Resource identifier.
    CreatedOn string
    QueueId string
    A Resource identifier.
    Script string
    Name of a Worker
    ScriptName string
    Name of a Worker
    Settings QueueConsumerSettings
    Type string
    Available values: "worker".
    consumerId String
    A Resource identifier.
    createdOn String
    queueId String
    A Resource identifier.
    script String
    Name of a Worker
    scriptName String
    Name of a Worker
    settings QueueConsumerSettings
    type String
    Available values: "worker".
    consumerId string
    A Resource identifier.
    createdOn string
    queueId string
    A Resource identifier.
    script string
    Name of a Worker
    scriptName string
    Name of a Worker
    settings QueueConsumerSettings
    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 QueueConsumerSettings
    type str
    Available values: "worker".
    consumerId String
    A Resource identifier.
    createdOn String
    queueId String
    A Resource identifier.
    script String
    Name of a Worker
    scriptName String
    Name of a Worker
    settings Property Map
    type String
    Available values: "worker".

    QueueConsumerSettings, QueueConsumerSettingsArgs

    BatchSize double
    The maximum number of messages to include in a batch.
    MaxConcurrency 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).
    MaxRetries double
    The maximum number of retries
    MaxWaitTimeMs double
    The number of milliseconds to wait for a batch to fill up before attempting to deliver it
    RetryDelay double
    The number of seconds to delay before making the message available for another attempt.
    VisibilityTimeoutMs double
    The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
    BatchSize float64
    The maximum number of messages to include in a batch.
    MaxConcurrency 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).
    MaxRetries float64
    The maximum number of retries
    MaxWaitTimeMs float64
    The number of milliseconds to wait for a batch to fill up before attempting to deliver it
    RetryDelay float64
    The number of seconds to delay before making the message available for another attempt.
    VisibilityTimeoutMs float64
    The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
    batchSize Double
    The maximum number of messages to include in a batch.
    maxConcurrency 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).
    maxRetries Double
    The maximum number of retries
    maxWaitTimeMs Double
    The number of milliseconds to wait for a batch to fill up before attempting to deliver it
    retryDelay Double
    The number of seconds to delay before making the message available for another attempt.
    visibilityTimeoutMs Double
    The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
    batchSize number
    The maximum number of messages to include in a batch.
    maxConcurrency 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).
    maxRetries number
    The maximum number of retries
    maxWaitTimeMs number
    The number of milliseconds to wait for a batch to fill up before attempting to deliver it
    retryDelay number
    The number of seconds to delay before making the message available for another attempt.
    visibilityTimeoutMs number
    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_time_ms float
    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_ms float
    The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.
    batchSize Number
    The maximum number of messages to include in a batch.
    maxConcurrency 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).
    maxRetries Number
    The maximum number of retries
    maxWaitTimeMs Number
    The number of milliseconds to wait for a batch to fill up before attempting to deliver it
    retryDelay Number
    The number of seconds to delay before making the message available for another attempt.
    visibilityTimeoutMs Number
    The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.

    QueueProducer, QueueProducerArgs

    BucketName string
    Script string
    Type string
    Available values: "worker".
    BucketName string
    Script string
    Type string
    Available values: "worker".
    bucketName String
    script String
    type String
    Available values: "worker".
    bucketName string
    script string
    type string
    Available values: "worker".
    bucket_name str
    script str
    type str
    Available values: "worker".
    bucketName String
    script String
    type String
    Available values: "worker".

    QueueSettings, QueueSettingsArgs

    DeliveryDelay double
    Number of seconds to delay delivery of all messages to consumers.
    DeliveryPaused bool
    Indicates if message delivery to consumers is currently paused.
    MessageRetentionPeriod double
    Number of seconds after which an unconsumed message will be delayed.
    DeliveryDelay float64
    Number of seconds to delay delivery of all messages to consumers.
    DeliveryPaused bool
    Indicates if message delivery to consumers is currently paused.
    MessageRetentionPeriod float64
    Number of seconds after which an unconsumed message will be delayed.
    deliveryDelay Double
    Number of seconds to delay delivery of all messages to consumers.
    deliveryPaused Boolean
    Indicates if message delivery to consumers is currently paused.
    messageRetentionPeriod Double
    Number of seconds after which an unconsumed message will be delayed.
    deliveryDelay number
    Number of seconds to delay delivery of all messages to consumers.
    deliveryPaused boolean
    Indicates if message delivery to consumers is currently paused.
    messageRetentionPeriod number
    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_period float
    Number of seconds after which an unconsumed message will be delayed.
    deliveryDelay Number
    Number of seconds to delay delivery of all messages to consumers.
    deliveryPaused Boolean
    Indicates if message delivery to consumers is currently paused.
    messageRetentionPeriod Number
    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.
    cloudflare logo
    Cloudflare v6.1.1 published on Monday, Apr 21, 2025 by Pulumi