1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. QueueConsumer
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.QueueConsumer

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      exampleQueueConsumer:
        type: cloudflare:QueueConsumer
        name: example_queue_consumer
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          queueId: 023e105f4ecef8ad9ca31a8372d0c353
          deadLetterQueue: example-queue
          scriptName: my-consumer-worker
          settings:
            batch_size: 50
            max_concurrency: 10
            max_retries: 3
            max_wait_time_ms: 5000
            retry_delay: 10
          type: worker
    

    Create QueueConsumer Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new QueueConsumer(name: string, args: QueueConsumerArgs, opts?: CustomResourceOptions);
    @overload
    def QueueConsumer(resource_name: str,
                      args: QueueConsumerInitArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def QueueConsumer(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      account_id: Optional[str] = None,
                      queue_id: Optional[str] = None,
                      consumer_id: Optional[str] = None,
                      dead_letter_queue: Optional[str] = None,
                      script_name: Optional[str] = None,
                      settings: Optional[QueueConsumerSettingsArgs] = None,
                      type: Optional[str] = None)
    func NewQueueConsumer(ctx *Context, name string, args QueueConsumerArgs, opts ...ResourceOption) (*QueueConsumer, error)
    public QueueConsumer(string name, QueueConsumerArgs args, CustomResourceOptions? opts = null)
    public QueueConsumer(String name, QueueConsumerArgs args)
    public QueueConsumer(String name, QueueConsumerArgs args, CustomResourceOptions options)
    
    type: cloudflare:QueueConsumer
    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 QueueConsumerArgs
    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 QueueConsumerInitArgs
    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 QueueConsumerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args QueueConsumerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args QueueConsumerArgs
    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 queueConsumerResource = new Cloudflare.QueueConsumer("queueConsumerResource", new()
    {
        AccountId = "string",
        QueueId = "string",
        ConsumerId = "string",
        DeadLetterQueue = "string",
        ScriptName = "string",
        Settings = new Cloudflare.Inputs.QueueConsumerSettingsArgs
        {
            BatchSize = 0,
            MaxConcurrency = 0,
            MaxRetries = 0,
            MaxWaitTimeMs = 0,
            RetryDelay = 0,
            VisibilityTimeoutMs = 0,
        },
        Type = "string",
    });
    
    example, err := cloudflare.NewQueueConsumer(ctx, "queueConsumerResource", &cloudflare.QueueConsumerArgs{
    	AccountId:       pulumi.String("string"),
    	QueueId:         pulumi.String("string"),
    	ConsumerId:      pulumi.String("string"),
    	DeadLetterQueue: pulumi.String("string"),
    	ScriptName:      pulumi.String("string"),
    	Settings: &cloudflare.QueueConsumerSettingsArgs{
    		BatchSize:           pulumi.Float64(0),
    		MaxConcurrency:      pulumi.Float64(0),
    		MaxRetries:          pulumi.Float64(0),
    		MaxWaitTimeMs:       pulumi.Float64(0),
    		RetryDelay:          pulumi.Float64(0),
    		VisibilityTimeoutMs: pulumi.Float64(0),
    	},
    	Type: pulumi.String("string"),
    })
    
    var queueConsumerResource = new QueueConsumer("queueConsumerResource", QueueConsumerArgs.builder()
        .accountId("string")
        .queueId("string")
        .consumerId("string")
        .deadLetterQueue("string")
        .scriptName("string")
        .settings(QueueConsumerSettingsArgs.builder()
            .batchSize(0)
            .maxConcurrency(0)
            .maxRetries(0)
            .maxWaitTimeMs(0)
            .retryDelay(0)
            .visibilityTimeoutMs(0)
            .build())
        .type("string")
        .build());
    
    queue_consumer_resource = cloudflare.QueueConsumer("queueConsumerResource",
        account_id="string",
        queue_id="string",
        consumer_id="string",
        dead_letter_queue="string",
        script_name="string",
        settings={
            "batch_size": 0,
            "max_concurrency": 0,
            "max_retries": 0,
            "max_wait_time_ms": 0,
            "retry_delay": 0,
            "visibility_timeout_ms": 0,
        },
        type="string")
    
    const queueConsumerResource = new cloudflare.QueueConsumer("queueConsumerResource", {
        accountId: "string",
        queueId: "string",
        consumerId: "string",
        deadLetterQueue: "string",
        scriptName: "string",
        settings: {
            batchSize: 0,
            maxConcurrency: 0,
            maxRetries: 0,
            maxWaitTimeMs: 0,
            retryDelay: 0,
            visibilityTimeoutMs: 0,
        },
        type: "string",
    });
    
    type: cloudflare:QueueConsumer
    properties:
        accountId: string
        consumerId: string
        deadLetterQueue: string
        queueId: string
        scriptName: string
        settings:
            batchSize: 0
            maxConcurrency: 0
            maxRetries: 0
            maxWaitTimeMs: 0
            retryDelay: 0
            visibilityTimeoutMs: 0
        type: string
    

    QueueConsumer 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 QueueConsumer resource accepts the following input properties:

    AccountId string
    A Resource identifier.
    QueueId string
    A Resource identifier.
    ConsumerId string
    A Resource identifier.
    DeadLetterQueue string
    ScriptName string
    Name of a Worker
    Settings QueueConsumerSettings
    Type string
    Available values: "worker".
    AccountId string
    A Resource identifier.
    QueueId string
    A Resource identifier.
    ConsumerId string
    A Resource identifier.
    DeadLetterQueue string
    ScriptName string
    Name of a Worker
    Settings QueueConsumerSettingsArgs
    Type string
    Available values: "worker".
    accountId String
    A Resource identifier.
    queueId String
    A Resource identifier.
    consumerId String
    A Resource identifier.
    deadLetterQueue String
    scriptName String
    Name of a Worker
    settings QueueConsumerSettings
    type String
    Available values: "worker".
    accountId string
    A Resource identifier.
    queueId string
    A Resource identifier.
    consumerId string
    A Resource identifier.
    deadLetterQueue string
    scriptName string
    Name of a Worker
    settings QueueConsumerSettings
    type string
    Available values: "worker".
    account_id str
    A Resource identifier.
    queue_id str
    A Resource identifier.
    consumer_id str
    A Resource identifier.
    dead_letter_queue str
    script_name str
    Name of a Worker
    settings QueueConsumerSettingsArgs
    type str
    Available values: "worker".
    accountId String
    A Resource identifier.
    queueId String
    A Resource identifier.
    consumerId String
    A Resource identifier.
    deadLetterQueue String
    scriptName String
    Name of a Worker
    settings Property Map
    type String
    Available values: "worker".

    Outputs

    All input properties are implicitly available as output properties. Additionally, the QueueConsumer resource produces the following output properties:

    CreatedOn string
    Id string
    The provider-assigned unique ID for this managed resource.
    Script string
    Name of a Worker
    CreatedOn string
    Id string
    The provider-assigned unique ID for this managed resource.
    Script string
    Name of a Worker
    createdOn String
    id String
    The provider-assigned unique ID for this managed resource.
    script String
    Name of a Worker
    createdOn string
    id string
    The provider-assigned unique ID for this managed resource.
    script string
    Name of a Worker
    created_on str
    id str
    The provider-assigned unique ID for this managed resource.
    script str
    Name of a Worker
    createdOn String
    id String
    The provider-assigned unique ID for this managed resource.
    script String
    Name of a Worker

    Look up Existing QueueConsumer Resource

    Get an existing QueueConsumer 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?: QueueConsumerState, opts?: CustomResourceOptions): QueueConsumer
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            consumer_id: Optional[str] = None,
            created_on: Optional[str] = None,
            dead_letter_queue: Optional[str] = None,
            queue_id: Optional[str] = None,
            script: Optional[str] = None,
            script_name: Optional[str] = None,
            settings: Optional[QueueConsumerSettingsArgs] = None,
            type: Optional[str] = None) -> QueueConsumer
    func GetQueueConsumer(ctx *Context, name string, id IDInput, state *QueueConsumerState, opts ...ResourceOption) (*QueueConsumer, error)
    public static QueueConsumer Get(string name, Input<string> id, QueueConsumerState? state, CustomResourceOptions? opts = null)
    public static QueueConsumer get(String name, Output<String> id, QueueConsumerState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:QueueConsumer    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:
    AccountId string
    A Resource identifier.
    ConsumerId string
    A Resource identifier.
    CreatedOn string
    DeadLetterQueue 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".
    AccountId string
    A Resource identifier.
    ConsumerId string
    A Resource identifier.
    CreatedOn string
    DeadLetterQueue string
    QueueId string
    A Resource identifier.
    Script string
    Name of a Worker
    ScriptName string
    Name of a Worker
    Settings QueueConsumerSettingsArgs
    Type string
    Available values: "worker".
    accountId String
    A Resource identifier.
    consumerId String
    A Resource identifier.
    createdOn String
    deadLetterQueue 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".
    accountId string
    A Resource identifier.
    consumerId string
    A Resource identifier.
    createdOn string
    deadLetterQueue 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".
    account_id str
    A Resource identifier.
    consumer_id str
    A Resource identifier.
    created_on str
    dead_letter_queue str
    queue_id str
    A Resource identifier.
    script str
    Name of a Worker
    script_name str
    Name of a Worker
    settings QueueConsumerSettingsArgs
    type str
    Available values: "worker".
    accountId String
    A Resource identifier.
    consumerId String
    A Resource identifier.
    createdOn String
    deadLetterQueue 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".

    Supporting Types

    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.

    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.2 published on Monday, Apr 28, 2025 by Pulumi