All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.cloudflare.kotlin.WaitingRoomEvent.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 5.40.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit

/**
 * Builder for [WaitingRoomEvent].
 */
@PulumiTagMarker
public class WaitingRoomEventResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: WaitingRoomEventArgs = WaitingRoomEventArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend WaitingRoomEventArgsBuilder.() -> Unit) {
        val builder = WaitingRoomEventArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): WaitingRoomEvent {
        val builtJavaResource = com.pulumi.cloudflare.WaitingRoomEvent(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return WaitingRoomEvent(builtJavaResource)
    }
}

/**
 * Provides a Cloudflare Waiting Room Event resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * // Waiting Room Event
 * const example = new cloudflare.WaitingRoomEvent("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     waitingRoomId: "d41d8cd98f00b204e9800998ecf8427e",
 *     name: "foo",
 *     eventStartTime: "2006-01-02T15:04:05Z",
 *     eventEndTime: "2006-01-02T20:04:05Z",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * # Waiting Room Event
 * example = cloudflare.WaitingRoomEvent("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     waiting_room_id="d41d8cd98f00b204e9800998ecf8427e",
 *     name="foo",
 *     event_start_time="2006-01-02T15:04:05Z",
 *     event_end_time="2006-01-02T20:04:05Z")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     // Waiting Room Event
 *     var example = new Cloudflare.WaitingRoomEvent("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         WaitingRoomId = "d41d8cd98f00b204e9800998ecf8427e",
 *         Name = "foo",
 *         EventStartTime = "2006-01-02T15:04:05Z",
 *         EventEndTime = "2006-01-02T20:04:05Z",
 *     });
 * });
 * ```
 * ```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 Event
 * 		_, err := cloudflare.NewWaitingRoomEvent(ctx, "example", &cloudflare.WaitingRoomEventArgs{
 * 			ZoneId:         pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			WaitingRoomId:  pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
 * 			Name:           pulumi.String("foo"),
 * 			EventStartTime: pulumi.String("2006-01-02T15:04:05Z"),
 * 			EventEndTime:   pulumi.String("2006-01-02T20:04:05Z"),
 * 		})
 * 		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.WaitingRoomEvent;
 * import com.pulumi.cloudflare.WaitingRoomEventArgs;
 * 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 Event
 *         var example = new WaitingRoomEvent("example", WaitingRoomEventArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .waitingRoomId("d41d8cd98f00b204e9800998ecf8427e")
 *             .name("foo")
 *             .eventStartTime("2006-01-02T15:04:05Z")
 *             .eventEndTime("2006-01-02T20:04:05Z")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   # Waiting Room Event
 *   example:
 *     type: cloudflare:WaitingRoomEvent
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       waitingRoomId: d41d8cd98f00b204e9800998ecf8427e
 *       name: foo
 *       eventStartTime: 2006-01-02T15:04:05Z
 *       eventEndTime: 2006-01-02T20:04:05Z
 * ```
 * 
 * ## Import
 * Use the Zone ID, Waiting Room ID, and Event ID to import.
 * ```sh
 * $ pulumi import cloudflare:index/waitingRoomEvent:WaitingRoomEvent default //
 * ```
 */
public class WaitingRoomEvent internal constructor(
    override val javaResource: com.pulumi.cloudflare.WaitingRoomEvent,
) : KotlinCustomResource(javaResource, WaitingRoomEventMapper) {
    /**
     * Creation time.
     */
    public val createdOn: Output
        get() = javaResource.createdOn().applyValue({ args0 -> args0 })

    /**
     * This is a templated html file that will be rendered at the edge.
     */
    public val customPageHtml: Output?
        get() = javaResource.customPageHtml().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A description to let users add more details about the event.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Disables automatic renewal of session cookies.
     */
    public val disableSessionRenewal: Output?
        get() = javaResource.disableSessionRenewal().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * ISO 8601 timestamp that marks the end of the event. **Modifying this attribute will force creation of a new resource.**
     */
    public val eventEndTime: Output
        get() = javaResource.eventEndTime().applyValue({ args0 -> args0 })

    /**
     * ISO 8601 timestamp that marks the start of the event. Must occur at least 1 minute before `event_end_time`. **Modifying this attribute will force creation of a new resource.**
     */
    public val eventStartTime: Output
        get() = javaResource.eventStartTime().applyValue({ args0 -> args0 })

    /**
     * Last modified time.
     */
    public val modifiedOn: Output
        get() = javaResource.modifiedOn().applyValue({ args0 -> args0 })

    /**
     * A unique name to identify the event. Only alphanumeric characters, hyphens, and underscores are allowed. **Modifying this attribute will force creation of a new resource.**
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The number of new users that will be let into the route every minute.
     */
    public val newUsersPerMinute: Output?
        get() = javaResource.newUsersPerMinute().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * ISO 8601 timestamp that marks when to begin queueing all users before the event starts. Must occur at least 5 minutes before `event_start_time`.
     */
    public val prequeueStartTime: Output?
        get() = javaResource.prequeueStartTime().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The queueing method used by the waiting room. Available values: `fifo`, `random`, `passthrough`, `reject`.
     */
    public val queueingMethod: Output?
        get() = javaResource.queueingMethod().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Lifetime of a cookie (in minutes) set by Cloudflare for users who get access to the origin.
     */
    public val sessionDuration: Output?
        get() = javaResource.sessionDuration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Users in the prequeue will be shuffled randomly at the `event_start_time`. Requires that `prequeue_start_time` is not null. Defaults to `false`.
     */
    public val shuffleAtEventStart: Output?
        get() = javaResource.shuffleAtEventStart().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * If suspended, the event is ignored and traffic will be handled based on the waiting room configuration.
     */
    public val suspended: Output?
        get() = javaResource.suspended().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The total number of active user sessions on the route at a point in time.
     */
    public val totalActiveUsers: Output?
        get() = javaResource.totalActiveUsers().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The Waiting Room ID the event should apply to. **Modifying this attribute will force creation of a new resource.**
     */
    public val waitingRoomId: Output
        get() = javaResource.waitingRoomId().applyValue({ args0 -> args0 })

    /**
     * The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    public val zoneId: Output
        get() = javaResource.zoneId().applyValue({ args0 -> args0 })
}

public object WaitingRoomEventMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.cloudflare.WaitingRoomEvent::class == javaResource::class

    override fun map(javaResource: Resource): WaitingRoomEvent = WaitingRoomEvent(
        javaResource as
            com.pulumi.cloudflare.WaitingRoomEvent,
    )
}

/**
 * @see [WaitingRoomEvent].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [WaitingRoomEvent].
 */
public suspend fun waitingRoomEvent(
    name: String,
    block: suspend WaitingRoomEventResourceBuilder.() -> Unit,
): WaitingRoomEvent {
    val builder = WaitingRoomEventResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [WaitingRoomEvent].
 * @param name The _unique_ name of the resulting resource.
 */
public fun waitingRoomEvent(name: String): WaitingRoomEvent {
    val builder = WaitingRoomEventResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy