cloudflare.WaitingRoom
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWaitingRoom = new cloudflare.WaitingRoom("example_waiting_room", {
zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
host: "shop.example.com",
name: "production_webinar",
newUsersPerMinute: 200,
totalActiveUsers: 200,
additionalRoutes: [{
host: "shop2.example.com",
path: "/shop2/checkout",
}],
cookieAttributes: {
samesite: "auto",
secure: "auto",
},
cookieSuffix: "abcd",
customPageHtml: "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}",
defaultTemplateLanguage: "es-ES",
description: "Production - DO NOT MODIFY",
disableSessionRenewal: false,
enabledOriginCommands: ["revoke"],
jsonResponseEnabled: false,
path: "/shop/checkout",
queueAll: true,
queueingMethod: "fifo",
queueingStatusCode: 202,
sessionDuration: 1,
suspended: true,
turnstileAction: "log",
turnstileMode: "off",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_waiting_room = cloudflare.WaitingRoom("example_waiting_room",
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
host="shop.example.com",
name="production_webinar",
new_users_per_minute=200,
total_active_users=200,
additional_routes=[{
"host": "shop2.example.com",
"path": "/shop2/checkout",
}],
cookie_attributes={
"samesite": "auto",
"secure": "auto",
},
cookie_suffix="abcd",
custom_page_html="{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}",
default_template_language="es-ES",
description="Production - DO NOT MODIFY",
disable_session_renewal=False,
enabled_origin_commands=["revoke"],
json_response_enabled=False,
path="/shop/checkout",
queue_all=True,
queueing_method="fifo",
queueing_status_code=202,
session_duration=1,
suspended=True,
turnstile_action="log",
turnstile_mode="off")
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.NewWaitingRoom(ctx, "example_waiting_room", &cloudflare.WaitingRoomArgs{
ZoneId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Host: pulumi.String("shop.example.com"),
Name: pulumi.String("production_webinar"),
NewUsersPerMinute: pulumi.Int(200),
TotalActiveUsers: pulumi.Int(200),
AdditionalRoutes: cloudflare.WaitingRoomAdditionalRouteArray{
&cloudflare.WaitingRoomAdditionalRouteArgs{
Host: pulumi.String("shop2.example.com"),
Path: pulumi.String("/shop2/checkout"),
},
},
CookieAttributes: &cloudflare.WaitingRoomCookieAttributesArgs{
Samesite: pulumi.String("auto"),
Secure: pulumi.String("auto"),
},
CookieSuffix: pulumi.String("abcd"),
CustomPageHtml: pulumi.String("{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}"),
DefaultTemplateLanguage: pulumi.String("es-ES"),
Description: pulumi.String("Production - DO NOT MODIFY"),
DisableSessionRenewal: pulumi.Bool(false),
EnabledOriginCommands: pulumi.StringArray{
pulumi.String("revoke"),
},
JsonResponseEnabled: pulumi.Bool(false),
Path: pulumi.String("/shop/checkout"),
QueueAll: pulumi.Bool(true),
QueueingMethod: pulumi.String("fifo"),
QueueingStatusCode: pulumi.Int(202),
SessionDuration: pulumi.Int(1),
Suspended: pulumi.Bool(true),
TurnstileAction: pulumi.String("log"),
TurnstileMode: pulumi.String("off"),
})
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 exampleWaitingRoom = new Cloudflare.WaitingRoom("example_waiting_room", new()
{
ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
Host = "shop.example.com",
Name = "production_webinar",
NewUsersPerMinute = 200,
TotalActiveUsers = 200,
AdditionalRoutes = new[]
{
new Cloudflare.Inputs.WaitingRoomAdditionalRouteArgs
{
Host = "shop2.example.com",
Path = "/shop2/checkout",
},
},
CookieAttributes = new Cloudflare.Inputs.WaitingRoomCookieAttributesArgs
{
Samesite = "auto",
Secure = "auto",
},
CookieSuffix = "abcd",
CustomPageHtml = "{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}",
DefaultTemplateLanguage = "es-ES",
Description = "Production - DO NOT MODIFY",
DisableSessionRenewal = false,
EnabledOriginCommands = new[]
{
"revoke",
},
JsonResponseEnabled = false,
Path = "/shop/checkout",
QueueAll = true,
QueueingMethod = "fifo",
QueueingStatusCode = 202,
SessionDuration = 1,
Suspended = true,
TurnstileAction = "log",
TurnstileMode = "off",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WaitingRoom;
import com.pulumi.cloudflare.WaitingRoomArgs;
import com.pulumi.cloudflare.inputs.WaitingRoomAdditionalRouteArgs;
import com.pulumi.cloudflare.inputs.WaitingRoomCookieAttributesArgs;
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 exampleWaitingRoom = new WaitingRoom("exampleWaitingRoom", WaitingRoomArgs.builder()
.zoneId("023e105f4ecef8ad9ca31a8372d0c353")
.host("shop.example.com")
.name("production_webinar")
.newUsersPerMinute(200)
.totalActiveUsers(200)
.additionalRoutes(WaitingRoomAdditionalRouteArgs.builder()
.host("shop2.example.com")
.path("/shop2/checkout")
.build())
.cookieAttributes(WaitingRoomCookieAttributesArgs.builder()
.samesite("auto")
.secure("auto")
.build())
.cookieSuffix("abcd")
.customPageHtml("{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}")
.defaultTemplateLanguage("es-ES")
.description("Production - DO NOT MODIFY")
.disableSessionRenewal(false)
.enabledOriginCommands("revoke")
.jsonResponseEnabled(false)
.path("/shop/checkout")
.queueAll(true)
.queueingMethod("fifo")
.queueingStatusCode(202)
.sessionDuration(1)
.suspended(true)
.turnstileAction("log")
.turnstileMode("off")
.build());
}
}
resources:
exampleWaitingRoom:
type: cloudflare:WaitingRoom
name: example_waiting_room
properties:
zoneId: 023e105f4ecef8ad9ca31a8372d0c353
host: shop.example.com
name: production_webinar
newUsersPerMinute: 200
totalActiveUsers: 200
additionalRoutes:
- host: shop2.example.com
path: /shop2/checkout
cookieAttributes:
samesite: auto
secure: auto
cookieSuffix: abcd
customPageHtml: '{{#waitTimeKnown}} {{waitTime}} mins {{/waitTimeKnown}} {{^waitTimeKnown}} Queue all enabled {{/waitTimeKnown}}'
defaultTemplateLanguage: es-ES
description: Production - DO NOT MODIFY
disableSessionRenewal: false
enabledOriginCommands:
- revoke
jsonResponseEnabled: false
path: /shop/checkout
queueAll: true
queueingMethod: fifo
queueingStatusCode: 202
sessionDuration: 1
suspended: true
turnstileAction: log
turnstileMode: off
Create WaitingRoom Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WaitingRoom(name: string, args: WaitingRoomArgs, opts?: CustomResourceOptions);
@overload
def WaitingRoom(resource_name: str,
args: WaitingRoomArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WaitingRoom(resource_name: str,
opts: Optional[ResourceOptions] = None,
host: Optional[str] = None,
zone_id: Optional[str] = None,
total_active_users: Optional[int] = None,
new_users_per_minute: Optional[int] = None,
name: Optional[str] = None,
description: Optional[str] = None,
queueing_method: Optional[str] = None,
enabled_origin_commands: Optional[Sequence[str]] = None,
additional_routes: Optional[Sequence[WaitingRoomAdditionalRouteArgs]] = None,
json_response_enabled: Optional[bool] = None,
default_template_language: Optional[str] = None,
custom_page_html: Optional[str] = None,
path: Optional[str] = None,
queue_all: Optional[bool] = None,
disable_session_renewal: Optional[bool] = None,
queueing_status_code: Optional[int] = None,
session_duration: Optional[int] = None,
suspended: Optional[bool] = None,
cookie_suffix: Optional[str] = None,
turnstile_action: Optional[str] = None,
turnstile_mode: Optional[str] = None,
cookie_attributes: Optional[WaitingRoomCookieAttributesArgs] = None)
func NewWaitingRoom(ctx *Context, name string, args WaitingRoomArgs, opts ...ResourceOption) (*WaitingRoom, error)
public WaitingRoom(string name, WaitingRoomArgs args, CustomResourceOptions? opts = null)
public WaitingRoom(String name, WaitingRoomArgs args)
public WaitingRoom(String name, WaitingRoomArgs args, CustomResourceOptions options)
type: cloudflare:WaitingRoom
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 WaitingRoomArgs
- 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 WaitingRoomArgs
- 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 WaitingRoomArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WaitingRoomArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WaitingRoomArgs
- 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 waitingRoomResource = new Cloudflare.WaitingRoom("waitingRoomResource", new()
{
Host = "string",
ZoneId = "string",
TotalActiveUsers = 0,
NewUsersPerMinute = 0,
Name = "string",
Description = "string",
QueueingMethod = "string",
EnabledOriginCommands = new[]
{
"string",
},
AdditionalRoutes = new[]
{
new Cloudflare.Inputs.WaitingRoomAdditionalRouteArgs
{
Host = "string",
Path = "string",
},
},
JsonResponseEnabled = false,
DefaultTemplateLanguage = "string",
CustomPageHtml = "string",
Path = "string",
QueueAll = false,
DisableSessionRenewal = false,
QueueingStatusCode = 0,
SessionDuration = 0,
Suspended = false,
CookieSuffix = "string",
TurnstileAction = "string",
TurnstileMode = "string",
CookieAttributes = new Cloudflare.Inputs.WaitingRoomCookieAttributesArgs
{
Samesite = "string",
Secure = "string",
},
});
example, err := cloudflare.NewWaitingRoom(ctx, "waitingRoomResource", &cloudflare.WaitingRoomArgs{
Host: pulumi.String("string"),
ZoneId: pulumi.String("string"),
TotalActiveUsers: pulumi.Int(0),
NewUsersPerMinute: pulumi.Int(0),
Name: pulumi.String("string"),
Description: pulumi.String("string"),
QueueingMethod: pulumi.String("string"),
EnabledOriginCommands: pulumi.StringArray{
pulumi.String("string"),
},
AdditionalRoutes: cloudflare.WaitingRoomAdditionalRouteArray{
&cloudflare.WaitingRoomAdditionalRouteArgs{
Host: pulumi.String("string"),
Path: pulumi.String("string"),
},
},
JsonResponseEnabled: pulumi.Bool(false),
DefaultTemplateLanguage: pulumi.String("string"),
CustomPageHtml: pulumi.String("string"),
Path: pulumi.String("string"),
QueueAll: pulumi.Bool(false),
DisableSessionRenewal: pulumi.Bool(false),
QueueingStatusCode: pulumi.Int(0),
SessionDuration: pulumi.Int(0),
Suspended: pulumi.Bool(false),
CookieSuffix: pulumi.String("string"),
TurnstileAction: pulumi.String("string"),
TurnstileMode: pulumi.String("string"),
CookieAttributes: &cloudflare.WaitingRoomCookieAttributesArgs{
Samesite: pulumi.String("string"),
Secure: pulumi.String("string"),
},
})
var waitingRoomResource = new WaitingRoom("waitingRoomResource", WaitingRoomArgs.builder()
.host("string")
.zoneId("string")
.totalActiveUsers(0)
.newUsersPerMinute(0)
.name("string")
.description("string")
.queueingMethod("string")
.enabledOriginCommands("string")
.additionalRoutes(WaitingRoomAdditionalRouteArgs.builder()
.host("string")
.path("string")
.build())
.jsonResponseEnabled(false)
.defaultTemplateLanguage("string")
.customPageHtml("string")
.path("string")
.queueAll(false)
.disableSessionRenewal(false)
.queueingStatusCode(0)
.sessionDuration(0)
.suspended(false)
.cookieSuffix("string")
.turnstileAction("string")
.turnstileMode("string")
.cookieAttributes(WaitingRoomCookieAttributesArgs.builder()
.samesite("string")
.secure("string")
.build())
.build());
waiting_room_resource = cloudflare.WaitingRoom("waitingRoomResource",
host="string",
zone_id="string",
total_active_users=0,
new_users_per_minute=0,
name="string",
description="string",
queueing_method="string",
enabled_origin_commands=["string"],
additional_routes=[{
"host": "string",
"path": "string",
}],
json_response_enabled=False,
default_template_language="string",
custom_page_html="string",
path="string",
queue_all=False,
disable_session_renewal=False,
queueing_status_code=0,
session_duration=0,
suspended=False,
cookie_suffix="string",
turnstile_action="string",
turnstile_mode="string",
cookie_attributes={
"samesite": "string",
"secure": "string",
})
const waitingRoomResource = new cloudflare.WaitingRoom("waitingRoomResource", {
host: "string",
zoneId: "string",
totalActiveUsers: 0,
newUsersPerMinute: 0,
name: "string",
description: "string",
queueingMethod: "string",
enabledOriginCommands: ["string"],
additionalRoutes: [{
host: "string",
path: "string",
}],
jsonResponseEnabled: false,
defaultTemplateLanguage: "string",
customPageHtml: "string",
path: "string",
queueAll: false,
disableSessionRenewal: false,
queueingStatusCode: 0,
sessionDuration: 0,
suspended: false,
cookieSuffix: "string",
turnstileAction: "string",
turnstileMode: "string",
cookieAttributes: {
samesite: "string",
secure: "string",
},
});
type: cloudflare:WaitingRoom
properties:
additionalRoutes:
- host: string
path: string
cookieAttributes:
samesite: string
secure: string
cookieSuffix: string
customPageHtml: string
defaultTemplateLanguage: string
description: string
disableSessionRenewal: false
enabledOriginCommands:
- string
host: string
jsonResponseEnabled: false
name: string
newUsersPerMinute: 0
path: string
queueAll: false
queueingMethod: string
queueingStatusCode: 0
sessionDuration: 0
suspended: false
totalActiveUsers: 0
turnstileAction: string
turnstileMode: string
zoneId: string
WaitingRoom 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 WaitingRoom resource accepts the following input properties:
- Host string
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- Name string
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- New
Users intPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- Total
Active intUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- Zone
Id string - Identifier
- Additional
Routes List<WaitingRoom Additional Route> - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- string
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - Custom
Page stringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- Default
Template stringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - Description string
- A note that you can use to add more details about the waiting room.
- Disable
Session boolRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - Enabled
Origin List<string>Commands - A list of enabled origin commands.
- Json
Response boolEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - Path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- Queue
All bool - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - Queueing
Method string - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - Queueing
Status intCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- Session
Duration int - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- Suspended bool
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - Turnstile
Action string - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - Turnstile
Mode string - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed".
- Host string
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- Name string
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- New
Users intPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- Total
Active intUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- Zone
Id string - Identifier
- Additional
Routes []WaitingRoom Additional Route Args - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes Args - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- string
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - Custom
Page stringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- Default
Template stringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - Description string
- A note that you can use to add more details about the waiting room.
- Disable
Session boolRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - Enabled
Origin []stringCommands - A list of enabled origin commands.
- Json
Response boolEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - Path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- Queue
All bool - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - Queueing
Method string - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - Queueing
Status intCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- Session
Duration int - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- Suspended bool
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - Turnstile
Action string - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - Turnstile
Mode string - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed".
- host String
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- name String
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new
Users IntegerPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- total
Active IntegerUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- zone
Id String - Identifier
- additional
Routes List<WaitingRoom Additional Route> - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- String
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - custom
Page StringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default
Template StringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description String
- A note that you can use to add more details about the waiting room.
- disable
Session BooleanRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled
Origin List<String>Commands - A list of enabled origin commands.
- json
Response BooleanEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - path String
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue
All Boolean - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing
Method String - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing
Status IntegerCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session
Duration Integer - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended Boolean
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - turnstile
Action String - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile
Mode String - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed".
- host string
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- name string
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new
Users numberPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- total
Active numberUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- zone
Id string - Identifier
- additional
Routes WaitingRoom Additional Route[] - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- string
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - custom
Page stringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default
Template stringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description string
- A note that you can use to add more details about the waiting room.
- disable
Session booleanRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled
Origin string[]Commands - A list of enabled origin commands.
- json
Response booleanEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue
All boolean - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing
Method string - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing
Status numberCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session
Duration number - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended boolean
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - turnstile
Action string - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile
Mode string - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed".
- host str
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- name str
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new_
users_ intper_ minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- total_
active_ intusers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- zone_
id str - Identifier
- additional_
routes Sequence[WaitingRoom Additional Route Args] - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes Args - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- str
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - custom_
page_ strhtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default_
template_ strlanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description str
- A note that you can use to add more details about the waiting room.
- disable_
session_ boolrenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled_
origin_ Sequence[str]commands - A list of enabled origin commands.
- json_
response_ boolenabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - path str
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue_
all bool - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing_
method str - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing_
status_ intcode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session_
duration int - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended bool
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - turnstile_
action str - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile_
mode str - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed".
- host String
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- name String
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new
Users NumberPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- total
Active NumberUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- zone
Id String - Identifier
- additional
Routes List<Property Map> - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Property Map
- Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- String
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - custom
Page StringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default
Template StringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description String
- A note that you can use to add more details about the waiting room.
- disable
Session BooleanRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled
Origin List<String>Commands - A list of enabled origin commands.
- json
Response BooleanEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - path String
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue
All Boolean - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing
Method String - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing
Status NumberCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session
Duration Number - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended Boolean
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - turnstile
Action String - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile
Mode String - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed".
Outputs
All input properties are implicitly available as output properties. Additionally, the WaitingRoom resource produces the following output properties:
- Created
On string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Next
Event stringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- Next
Event stringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- Created
On string - Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - Next
Event stringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- Next
Event stringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- created
On String - id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - next
Event StringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next
Event StringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- created
On string - id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - next
Event stringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next
Event stringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- created_
on str - id str
- The provider-assigned unique ID for this managed resource.
- modified_
on str - next_
event_ strprequeue_ start_ time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next_
event_ strstart_ time - An ISO 8601 timestamp that marks when the next event will start.
- created
On String - id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - next
Event StringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next
Event StringStart Time - An ISO 8601 timestamp that marks when the next event will start.
Look up Existing WaitingRoom Resource
Get an existing WaitingRoom 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?: WaitingRoomState, opts?: CustomResourceOptions): WaitingRoom
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
additional_routes: Optional[Sequence[WaitingRoomAdditionalRouteArgs]] = None,
cookie_attributes: Optional[WaitingRoomCookieAttributesArgs] = None,
cookie_suffix: Optional[str] = None,
created_on: Optional[str] = None,
custom_page_html: Optional[str] = None,
default_template_language: Optional[str] = None,
description: Optional[str] = None,
disable_session_renewal: Optional[bool] = None,
enabled_origin_commands: Optional[Sequence[str]] = None,
host: Optional[str] = None,
json_response_enabled: Optional[bool] = None,
modified_on: Optional[str] = None,
name: Optional[str] = None,
new_users_per_minute: Optional[int] = None,
next_event_prequeue_start_time: Optional[str] = None,
next_event_start_time: Optional[str] = None,
path: Optional[str] = None,
queue_all: Optional[bool] = None,
queueing_method: Optional[str] = None,
queueing_status_code: Optional[int] = None,
session_duration: Optional[int] = None,
suspended: Optional[bool] = None,
total_active_users: Optional[int] = None,
turnstile_action: Optional[str] = None,
turnstile_mode: Optional[str] = None,
zone_id: Optional[str] = None) -> WaitingRoom
func GetWaitingRoom(ctx *Context, name string, id IDInput, state *WaitingRoomState, opts ...ResourceOption) (*WaitingRoom, error)
public static WaitingRoom Get(string name, Input<string> id, WaitingRoomState? state, CustomResourceOptions? opts = null)
public static WaitingRoom get(String name, Output<String> id, WaitingRoomState state, CustomResourceOptions options)
resources: _: type: cloudflare:WaitingRoom 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.
- Additional
Routes List<WaitingRoom Additional Route> - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- string
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - Created
On string - Custom
Page stringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- Default
Template stringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - Description string
- A note that you can use to add more details about the waiting room.
- Disable
Session boolRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - Enabled
Origin List<string>Commands - A list of enabled origin commands.
- Host string
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- Json
Response boolEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - Modified
On string - Name string
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- New
Users intPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- Next
Event stringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- Next
Event stringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- Path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- Queue
All bool - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - Queueing
Method string - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - Queueing
Status intCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- Session
Duration int - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- Suspended bool
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - Total
Active intUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- Turnstile
Action string - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - Turnstile
Mode string - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed". - Zone
Id string - Identifier
- Additional
Routes []WaitingRoom Additional Route Args - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes Args - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- string
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - Created
On string - Custom
Page stringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- Default
Template stringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - Description string
- A note that you can use to add more details about the waiting room.
- Disable
Session boolRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - Enabled
Origin []stringCommands - A list of enabled origin commands.
- Host string
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- Json
Response boolEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - Modified
On string - Name string
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- New
Users intPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- Next
Event stringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- Next
Event stringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- Path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- Queue
All bool - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - Queueing
Method string - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - Queueing
Status intCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- Session
Duration int - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- Suspended bool
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - Total
Active intUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- Turnstile
Action string - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - Turnstile
Mode string - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed". - Zone
Id string - Identifier
- additional
Routes List<WaitingRoom Additional Route> - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- String
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - created
On String - custom
Page StringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default
Template StringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description String
- A note that you can use to add more details about the waiting room.
- disable
Session BooleanRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled
Origin List<String>Commands - A list of enabled origin commands.
- host String
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- json
Response BooleanEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - modified
On String - name String
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new
Users IntegerPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- next
Event StringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next
Event StringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- path String
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue
All Boolean - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing
Method String - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing
Status IntegerCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session
Duration Integer - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended Boolean
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - total
Active IntegerUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- turnstile
Action String - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile
Mode String - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed". - zone
Id String - Identifier
- additional
Routes WaitingRoom Additional Route[] - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- string
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - created
On string - custom
Page stringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default
Template stringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description string
- A note that you can use to add more details about the waiting room.
- disable
Session booleanRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled
Origin string[]Commands - A list of enabled origin commands.
- host string
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- json
Response booleanEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - modified
On string - name string
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new
Users numberPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- next
Event stringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next
Event stringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue
All boolean - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing
Method string - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing
Status numberCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session
Duration number - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended boolean
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - total
Active numberUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- turnstile
Action string - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile
Mode string - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed". - zone
Id string - Identifier
- additional_
routes Sequence[WaitingRoom Additional Route Args] - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Waiting
Room Cookie Attributes Args - Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- str
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - created_
on str - custom_
page_ strhtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default_
template_ strlanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description str
- A note that you can use to add more details about the waiting room.
- disable_
session_ boolrenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled_
origin_ Sequence[str]commands - A list of enabled origin commands.
- host str
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- json_
response_ boolenabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - modified_
on str - name str
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new_
users_ intper_ minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- next_
event_ strprequeue_ start_ time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next_
event_ strstart_ time - An ISO 8601 timestamp that marks when the next event will start.
- path str
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue_
all bool - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing_
method str - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing_
status_ intcode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session_
duration int - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended bool
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - total_
active_ intusers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- turnstile_
action str - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile_
mode str - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed". - zone_
id str - Identifier
- additional
Routes List<Property Map> - Only available for the Waiting Room Advanced subscription. Additional hostname and path combinations to which this waiting room will be applied. There is an implied wildcard at the end of the path. The hostname and path combination must be unique to this and all other waiting rooms.
- Property Map
- Configures cookie attributes for the waiting room cookie. This encrypted cookie stores a user's status in the waiting room, such as queue position.
- String
- Appends a '' + a custom suffix to the end of Cloudflare Waiting Room's cookie name(cfwaitingroom). If
cookie_suffix
is "abcd", the cookie name will be__cf_waitingroom_abcd
. This field is required if usingadditional_routes
. - created
On String - custom
Page StringHtml - Only available for the Waiting Room Advanced subscription. This is a template html file that will be rendered at the edge. If no custompagehtml is provided, the default waiting room will be used. The template is based on mustache ( https://mustache.github.io/ ). There are several variables that are evaluated by the Cloudflare edge:
- default
Template StringLanguage - The language of the default page template. If no default_template_language is provided, then
en-US
(English) will be used. Available values: "en-US", "es-ES", "de-DE", "fr-FR", "it-IT", "ja-JP", "ko-KR", "pt-BR", "zh-CN", "zh-TW", "nl-NL", "pl-PL", "id-ID", "tr-TR", "ar-EG", "ru-RU", "fa-IR", "bg-BG", "hr-HR", "cs-CZ", "da-DK", "fi-FI", "lt-LT", "ms-MY", "nb-NO", "ro-RO", "el-GR", "he-IL", "hi-IN", "hu-HU", "sr-BA", "sk-SK", "sl-SI", "sv-SE", "tl-PH", "th-TH", "uk-UA", "vi-VN". - description String
- A note that you can use to add more details about the waiting room.
- disable
Session BooleanRenewal - Only available for the Waiting Room Advanced subscription. Disables automatic renewal of session cookies. If
true
, an accepted user will have session_duration minutes to browse the site. After that, they will have to go through the waiting room again. Iffalse
, a user's session cookie will be automatically renewed on every request. - enabled
Origin List<String>Commands - A list of enabled origin commands.
- host String
- The host name to which the waiting room will be applied (no wildcards). Please do not include the scheme (http:// or https://). The host and path combination must be unique.
- json
Response BooleanEnabled - Only available for the Waiting Room Advanced subscription. If
true
, requests to the waiting room with the headerAccept: application/json
will receive a JSON response object with information on the user's status in the waiting room as opposed to the configured static HTML page. This JSON response object has one propertycfWaitingRoom
which is an object containing the following fields: 1.inWaitingRoom
: Boolean indicating if the user is in the waiting room (always true). 2.waitTimeKnown
: Boolean indicating if the current estimated wait times are accurate. If false, they are not available. 3.waitTime
: Valid only whenwaitTimeKnown
is true. Integer indicating the current estimated time in minutes the user will wait in the waiting room. WhenqueueingMethod
is random, this is set towaitTime50Percentile
. 4.waitTime25Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 25% of users that gain entry the fastest (25th percentile). 5.waitTime50Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 50% of users that gain entry the fastest (50th percentile). In other words, half of the queued users are expected to let into the origin website beforewaitTime50Percentile
and half are expected to be let in after it. 6.waitTime75Percentile
: Valid only whenqueueingMethod
is random andwaitTimeKnown
is true. Integer indicating the current estimated maximum wait time for the 75% of users that gain entry the fastest (75th percentile). 7.waitTimeFormatted
: String displaying thewaitTime
formatted in English for users. IfwaitTimeKnown
is false,waitTimeFormatted
will display unavailable. 8.queueIsFull
: Boolean indicating if the waiting room's queue is currently full and not accepting new users at the moment. 9.queueAll
: Boolean indicating if all users will be queued in the waiting room and no one will be let into the origin website. 10.lastUpdated
: String displaying the timestamp as an ISO 8601 string of the user's last attempt to leave the waiting room and be let into the origin website. The user is able to make another attempt afterrefreshIntervalSeconds
past this time. If the user makes a request too soon, it will be ignored andlastUpdated
will not change. 11.refreshIntervalSeconds
: Integer indicating the number of seconds afterlastUpdated
until the user is able to make another attempt to leave the waiting room and be let into the origin website. When thequeueingMethod
isreject
, there is no specified refresh time — it will always be zero. 12.queueingMethod
: The queueing method currently used by the waiting room. It is either fifo, random, passthrough, or reject. 13.isFIFOQueue
: Boolean indicating if the waiting room uses a FIFO (First-In-First-Out) queue. 14.isRandomQueue
: Boolean indicating if the waiting room uses a Random queue where users gain access randomly. 15.isPassthroughQueue
: Boolean indicating if the waiting room uses a passthrough queue. Keep in mind that when passthrough is enabled, this JSON response will only exist whenqueueAll
is true orisEventPrequeueing
is true because in all other cases requests will go directly to the origin. 16.isRejectQueue
: Boolean indicating if the waiting room uses a reject queue. 17.isEventActive
: Boolean indicating if an event is currently occurring. Events are able to change a waiting room's behavior during a specified period of time. For additional information, look at the event propertiesprequeue_start_time
,event_start_time
, andevent_end_time
in the documentation for creating waiting room events. Events are considered active between these start and end times, as well as during the prequeueing period if it exists. 18.isEventPrequeueing
: Valid only whenisEventActive
is true. Boolean indicating if an event is currently prequeueing users before it starts. 19.timeUntilEventStart
: Valid only whenisEventPrequeueing
is true. Integer indicating the number of minutes until the event starts. 20.timeUntilEventStartFormatted
: String displaying thetimeUntilEventStart
formatted in English for users. IfisEventPrequeueing
is false,timeUntilEventStartFormatted
will display unavailable. 21.timeUntilEventEnd
: Valid only whenisEventActive
is true. Integer indicating the number of minutes until the event ends. 22.timeUntilEventEndFormatted
: String displaying thetimeUntilEventEnd
formatted in English for users. IfisEventActive
is false,timeUntilEventEndFormatted
will display unavailable. 23.shuffleAtEventStart
: Valid only whenisEventActive
is true. Boolean indicating if the users in the prequeue are shuffled randomly when the event starts. An example cURL to a waiting room could be: curl -X GET "https://example.com/waitingroom" \ -H "Accept: application/json" Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is fifo and no event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 0, "waitTime50Percentile": 0, "waitTime75Percentile": 0, "waitTimeFormatted": "10 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "fifo", "isFIFOQueue": true, "isRandomQueue": false, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": false, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 0, "timeUntilEventEndFormatted": "unavailable", "shuffleAtEventStart": false } } Ifjson_response_enabled
is true and the request hits the waiting room, an example JSON response whenqueueingMethod
is random and an event is active could be: { "cfWaitingRoom": { "inWaitingRoom": true, "waitTimeKnown": true, "waitTime": 10, "waitTime25Percentile": 5, "waitTime50Percentile": 10, "waitTime75Percentile": 15, "waitTimeFormatted": "5 minutes to 15 minutes", "queueIsFull": false, "queueAll": false, "lastUpdated": "2020-08-03T23:46:00.000Z", "refreshIntervalSeconds": 20, "queueingMethod": "random", "isFIFOQueue": false, "isRandomQueue": true, "isPassthroughQueue": false, "isRejectQueue": false, "isEventActive": true, "isEventPrequeueing": false, "timeUntilEventStart": 0, "timeUntilEventStartFormatted": "unavailable", "timeUntilEventEnd": 15, "timeUntilEventEndFormatted": "15 minutes", "shuffleAtEventStart": true } }. - modified
On String - name String
- A unique name to identify the waiting room. Only alphanumeric characters, hyphens and underscores are allowed.
- new
Users NumberPer Minute - Sets the number of new users that will be let into the route every minute. This value is used as baseline for the number of users that are let in per minute. So it is possible that there is a little more or little less traffic coming to the route based on the traffic patterns at that time around the world.
- next
Event StringPrequeue Start Time - An ISO 8601 timestamp that marks when the next event will begin queueing.
- next
Event StringStart Time - An ISO 8601 timestamp that marks when the next event will start.
- path String
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- queue
All Boolean - If queue_all is
true
, all the traffic that is coming to a route will be sent to the waiting room. No new traffic can get to the route once this field is set and estimated time will become unavailable. - queueing
Method String - Sets the queueing method used by the waiting room. Changing this parameter from the default queueing method is only
available for the Waiting Room Advanced subscription. Regardless of the queueing method, if
queue_all
is enabled or an event is prequeueing, users in the waiting room will not be accepted to the origin. These users will always see a waiting room page that refreshes automatically. The valid queueing methods are: 1.fifo
(default): First-In-First-Out queue where customers gain access in the order they arrived. 2.random
: Random queue where customers gain access randomly, regardless of arrival time. 3.passthrough
: Users will pass directly through the waiting room and into the origin website. As a result, any configured limits will not be respected while this is enabled. This method can be used as an alternative to disabling a waiting room (withsuspended
) so that analytics are still reported. This can be used if you wish to allow all traffic normally, but want to restrict traffic during a waiting room event, or vice versa. 4.reject
: Users will be immediately rejected from the waiting room. As a result, no users will reach the origin website while this is enabled. This can be used if you wish to reject all traffic while performing maintenance, block traffic during a specified period of time (an event), or block traffic while events are not occurring. Consider a waiting room used for vaccine distribution that only allows traffic during sign-up events, and otherwise blocks all traffic. For this case, the waiting room usesreject
, and its events override this withfifo
,random
, orpassthrough
. When this queueing method is enabled and neitherqueueAll
is enabled nor an event is prequeueing, the waiting room page will not refresh automatically. Available values: "fifo", "random", "passthrough", "reject". - queueing
Status NumberCode - HTTP status code returned to a user while in the queue. Available values: 200, 202, 429.
- session
Duration Number - Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the route. If a user is not seen by Cloudflare again in that time period, they will be treated as a new user that visits the route.
- suspended Boolean
- Suspends or allows traffic going to the waiting room. If set to
true
, the traffic will not go to the waiting room. - total
Active NumberUsers - Sets the total number of active user sessions on the route at a point in time. A route is a combination of host and path on which a waiting room is available. This value is used as a baseline for the total number of active user sessions on the route. It is possible to have a situation where there are more or less active users sessions on the route based on the traffic patterns at that time around the world.
- turnstile
Action String - Which action to take when a bot is detected using Turnstile.
log
will have no impact on queueing behavior, simply keeping track of how many bots are detected in Waiting Room Analytics.infinite_queue
will send bots to a false queueing state, where they will never reach your origin.infinite_queue
requires Advanced Waiting Room. Available values: "log", "infinite_queue". - turnstile
Mode String - Which Turnstile widget type to use for detecting bot traffic. See the Turnstile
documentation for the definitions of these
widget types. Set to
off
to disable the Turnstile integration entirely. Setting this to anything other thanoff
orinvisible
requires Advanced Waiting Room. Available values: "off", "invisible", "visible_non_interactive", "visible_managed". - zone
Id String - Identifier
Supporting Types
WaitingRoomAdditionalRoute, WaitingRoomAdditionalRouteArgs
- Host string
- The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- Path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- Host string
- The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- Path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- host String
- The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- path String
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- host string
- The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- path string
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- host str
- The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- path str
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
- host String
- The hostname to which this waiting room will be applied (no wildcards). The hostname must be the primary domain, subdomain, or custom hostname (if using SSL for SaaS) of this zone. Please do not include the scheme (http:// or https://).
- path String
- Sets the path within the host to enable the waiting room on. The waiting room will be enabled for all subpaths as well. If there are two waiting rooms on the same subpath, the waiting room for the most specific path will be chosen. Wildcards and query parameters are not supported.
WaitingRoomCookieAttributes, WaitingRoomCookieAttributesArgs
- Samesite string
- Configures the SameSite attribute on the waiting room cookie. Value
auto
will be translated tolax
ornone
depending if Always Use HTTPS is enabled. Note that when using valuenone
, the secure attribute cannot be set tonever
. Available values: "auto", "lax", "none", "strict". - Secure string
- Configures the Secure attribute on the waiting room cookie. Value
always
indicates that the Secure attribute will be set in the Set-Cookie header,never
indicates that the Secure attribute will not be set, andauto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "auto", "always", "never".
- Samesite string
- Configures the SameSite attribute on the waiting room cookie. Value
auto
will be translated tolax
ornone
depending if Always Use HTTPS is enabled. Note that when using valuenone
, the secure attribute cannot be set tonever
. Available values: "auto", "lax", "none", "strict". - Secure string
- Configures the Secure attribute on the waiting room cookie. Value
always
indicates that the Secure attribute will be set in the Set-Cookie header,never
indicates that the Secure attribute will not be set, andauto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "auto", "always", "never".
- samesite String
- Configures the SameSite attribute on the waiting room cookie. Value
auto
will be translated tolax
ornone
depending if Always Use HTTPS is enabled. Note that when using valuenone
, the secure attribute cannot be set tonever
. Available values: "auto", "lax", "none", "strict". - secure String
- Configures the Secure attribute on the waiting room cookie. Value
always
indicates that the Secure attribute will be set in the Set-Cookie header,never
indicates that the Secure attribute will not be set, andauto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "auto", "always", "never".
- samesite string
- Configures the SameSite attribute on the waiting room cookie. Value
auto
will be translated tolax
ornone
depending if Always Use HTTPS is enabled. Note that when using valuenone
, the secure attribute cannot be set tonever
. Available values: "auto", "lax", "none", "strict". - secure string
- Configures the Secure attribute on the waiting room cookie. Value
always
indicates that the Secure attribute will be set in the Set-Cookie header,never
indicates that the Secure attribute will not be set, andauto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "auto", "always", "never".
- samesite str
- Configures the SameSite attribute on the waiting room cookie. Value
auto
will be translated tolax
ornone
depending if Always Use HTTPS is enabled. Note that when using valuenone
, the secure attribute cannot be set tonever
. Available values: "auto", "lax", "none", "strict". - secure str
- Configures the Secure attribute on the waiting room cookie. Value
always
indicates that the Secure attribute will be set in the Set-Cookie header,never
indicates that the Secure attribute will not be set, andauto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "auto", "always", "never".
- samesite String
- Configures the SameSite attribute on the waiting room cookie. Value
auto
will be translated tolax
ornone
depending if Always Use HTTPS is enabled. Note that when using valuenone
, the secure attribute cannot be set tonever
. Available values: "auto", "lax", "none", "strict". - secure String
- Configures the Secure attribute on the waiting room cookie. Value
always
indicates that the Secure attribute will be set in the Set-Cookie header,never
indicates that the Secure attribute will not be set, andauto
will set the Secure attribute depending if Always Use HTTPS is enabled. Available values: "auto", "always", "never".
Import
$ pulumi import cloudflare:index/waitingRoom:WaitingRoom example '<zone_id>/<waiting_room_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.