com.pulumi.cloudflare.kotlin.WaitingRoomArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.WaitingRoomArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.WaitingRoomAdditionalRouteArgs
import com.pulumi.cloudflare.kotlin.inputs.WaitingRoomAdditionalRouteArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare Waiting Room resource.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* // Waiting Room
* const example = new cloudflare.WaitingRoom("example", {
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* name: "foo",
* host: "foo.example.com",
* path: "/",
* newUsersPerMinute: 200,
* totalActiveUsers: 200,
* cookieSuffix: "queue1",
* additionalRoutes: [
* {
* host: "shop1.example.com",
* path: "/example-path",
* },
* {
* host: "shop2.example.com",
* },
* ],
* queueingStatusCode: 200,
* enabledOriginCommands: ["revoke"],
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* # Waiting Room
* example = cloudflare.WaitingRoom("example",
* zone_id="0da42c8d2132a9ddaf714f9e7c920711",
* name="foo",
* host="foo.example.com",
* path="/",
* new_users_per_minute=200,
* total_active_users=200,
* cookie_suffix="queue1",
* additional_routes=[
* {
* "host": "shop1.example.com",
* "path": "/example-path",
* },
* {
* "host": "shop2.example.com",
* },
* ],
* queueing_status_code=200,
* enabled_origin_commands=["revoke"])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* // Waiting Room
* var example = new Cloudflare.WaitingRoom("example", new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* Name = "foo",
* Host = "foo.example.com",
* Path = "/",
* NewUsersPerMinute = 200,
* TotalActiveUsers = 200,
* CookieSuffix = "queue1",
* AdditionalRoutes = new[]
* {
* new Cloudflare.Inputs.WaitingRoomAdditionalRouteArgs
* {
* Host = "shop1.example.com",
* Path = "/example-path",
* },
* new Cloudflare.Inputs.WaitingRoomAdditionalRouteArgs
* {
* Host = "shop2.example.com",
* },
* },
* QueueingStatusCode = 200,
* EnabledOriginCommands = new[]
* {
* "revoke",
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* // Waiting Room
* _, err := cloudflare.NewWaitingRoom(ctx, "example", &cloudflare.WaitingRoomArgs{
* ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
* Name: pulumi.String("foo"),
* Host: pulumi.String("foo.example.com"),
* Path: pulumi.String("/"),
* NewUsersPerMinute: pulumi.Int(200),
* TotalActiveUsers: pulumi.Int(200),
* CookieSuffix: pulumi.String("queue1"),
* AdditionalRoutes: cloudflare.WaitingRoomAdditionalRouteArray{
* &cloudflare.WaitingRoomAdditionalRouteArgs{
* Host: pulumi.String("shop1.example.com"),
* Path: pulumi.String("/example-path"),
* },
* &cloudflare.WaitingRoomAdditionalRouteArgs{
* Host: pulumi.String("shop2.example.com"),
* },
* },
* QueueingStatusCode: pulumi.Int(200),
* EnabledOriginCommands: pulumi.StringArray{
* pulumi.String("revoke"),
* },
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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) {
* // Waiting Room
* var example = new WaitingRoom("example", WaitingRoomArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .name("foo")
* .host("foo.example.com")
* .path("/")
* .newUsersPerMinute(200)
* .totalActiveUsers(200)
* .cookieSuffix("queue1")
* .additionalRoutes(
* WaitingRoomAdditionalRouteArgs.builder()
* .host("shop1.example.com")
* .path("/example-path")
* .build(),
* WaitingRoomAdditionalRouteArgs.builder()
* .host("shop2.example.com")
* .build())
* .queueingStatusCode(200)
* .enabledOriginCommands("revoke")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* # Waiting Room
* example:
* type: cloudflare:WaitingRoom
* properties:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* name: foo
* host: foo.example.com
* path: /
* newUsersPerMinute: 200
* totalActiveUsers: 200
* cookieSuffix: queue1
* additionalRoutes:
* - host: shop1.example.com
* path: /example-path
* - host: shop2.example.com
* queueingStatusCode: 200
* enabledOriginCommands:
* - revoke
* ```
*
* ## Import
* Use the Zone ID and Waiting Room ID to import.
* ```sh
* $ pulumi import cloudflare:index/waitingRoom:WaitingRoom default /
* ```
* @property additionalRoutes A list of additional hostname and paths combination to be applied on the waiting room.
* @property cookieSuffix A cookie suffix to be appended to the Cloudflare waiting room cookie name.
* @property customPageHtml This is a templated html file that will be rendered at the edge.
* @property defaultTemplateLanguage The language to use for the default waiting room page. Available values: `de-DE`, `es-ES`, `en-US`, `fr-FR`, `id-ID`, `it-IT`, `ja-JP`, `ko-KR`, `nl-NL`, `pl-PL`, `pt-BR`, `tr-TR`, `zh-CN`, `zh-TW`, `ru-RU`, `fa-IR`. Defaults to `en-US`.
* @property description A description to add more details about the waiting room.
* @property disableSessionRenewal Disables automatic renewal of session cookies.
* @property enabledOriginCommands The list of enabled origin commands for the waiting room. Available values: `revoke`.
* @property host Host name for which the waiting room will be applied (no wildcards).
* @property jsonResponseEnabled If true, requests to the waiting room with the header `Accept: application/json` will receive a JSON response object.
* @property name A unique name to identify the waiting room. **Modifying this attribute will force creation of a new resource.**
* @property newUsersPerMinute The number of new users that will be let into the route every minute.
* @property path The path within the host to enable the waiting room on. Defaults to `/`.
* @property queueAll If queue_all is true, then all traffic will be sent to the waiting room.
* @property queueingMethod The queueing method used by the waiting room. Available values: `fifo`, `random`, `passthrough`, `reject`. Defaults to `fifo`.
* @property queueingStatusCode HTTP status code returned to a user while in the queue. Defaults to `200`.
* @property sessionDuration Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the origin. Defaults to `5`.
* @property suspended Suspends the waiting room.
* @property totalActiveUsers The total number of active user sessions on the route at a point in time.
* @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public data class WaitingRoomArgs(
public val additionalRoutes: Output>? = null,
public val cookieSuffix: Output? = null,
public val customPageHtml: Output? = null,
public val defaultTemplateLanguage: Output? = null,
public val description: Output? = null,
public val disableSessionRenewal: Output? = null,
public val enabledOriginCommands: Output>? = null,
public val host: Output? = null,
public val jsonResponseEnabled: Output? = null,
public val name: Output? = null,
public val newUsersPerMinute: Output? = null,
public val path: Output? = null,
public val queueAll: Output? = null,
public val queueingMethod: Output? = null,
public val queueingStatusCode: Output? = null,
public val sessionDuration: Output? = null,
public val suspended: Output? = null,
public val totalActiveUsers: Output? = null,
public val zoneId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.WaitingRoomArgs =
com.pulumi.cloudflare.WaitingRoomArgs.builder()
.additionalRoutes(
additionalRoutes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.cookieSuffix(cookieSuffix?.applyValue({ args0 -> args0 }))
.customPageHtml(customPageHtml?.applyValue({ args0 -> args0 }))
.defaultTemplateLanguage(defaultTemplateLanguage?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.disableSessionRenewal(disableSessionRenewal?.applyValue({ args0 -> args0 }))
.enabledOriginCommands(enabledOriginCommands?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.host(host?.applyValue({ args0 -> args0 }))
.jsonResponseEnabled(jsonResponseEnabled?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.newUsersPerMinute(newUsersPerMinute?.applyValue({ args0 -> args0 }))
.path(path?.applyValue({ args0 -> args0 }))
.queueAll(queueAll?.applyValue({ args0 -> args0 }))
.queueingMethod(queueingMethod?.applyValue({ args0 -> args0 }))
.queueingStatusCode(queueingStatusCode?.applyValue({ args0 -> args0 }))
.sessionDuration(sessionDuration?.applyValue({ args0 -> args0 }))
.suspended(suspended?.applyValue({ args0 -> args0 }))
.totalActiveUsers(totalActiveUsers?.applyValue({ args0 -> args0 }))
.zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [WaitingRoomArgs].
*/
@PulumiTagMarker
public class WaitingRoomArgsBuilder internal constructor() {
private var additionalRoutes: Output>? = null
private var cookieSuffix: Output? = null
private var customPageHtml: Output? = null
private var defaultTemplateLanguage: Output? = null
private var description: Output? = null
private var disableSessionRenewal: Output? = null
private var enabledOriginCommands: Output>? = null
private var host: Output? = null
private var jsonResponseEnabled: Output? = null
private var name: Output? = null
private var newUsersPerMinute: Output? = null
private var path: Output? = null
private var queueAll: Output? = null
private var queueingMethod: Output? = null
private var queueingStatusCode: Output? = null
private var sessionDuration: Output? = null
private var suspended: Output? = null
private var totalActiveUsers: Output? = null
private var zoneId: Output? = null
/**
* @param value A list of additional hostname and paths combination to be applied on the waiting room.
*/
@JvmName("mhvgaenxkwwtkhwg")
public suspend fun additionalRoutes(`value`: Output>) {
this.additionalRoutes = value
}
@JvmName("yaamtnegasjwtjix")
public suspend fun additionalRoutes(vararg values: Output) {
this.additionalRoutes = Output.all(values.asList())
}
/**
* @param values A list of additional hostname and paths combination to be applied on the waiting room.
*/
@JvmName("ieeqamopvndpwjyn")
public suspend fun additionalRoutes(values: List