com.pulumi.cloudflare.kotlin.DeviceDexTestArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.DeviceDexTestArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.DeviceDexTestDataArgs
import com.pulumi.cloudflare.kotlin.inputs.DeviceDexTestDataArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare Device Dex Test resource. Device Dex Tests allow for building location-aware device settings policies.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.DeviceDexTest("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "GET homepage",
* description: "Send a HTTP GET request to the home endpoint every half hour.",
* interval: "0h30m0s",
* enabled: true,
* data: {
* host: "https://example.com/home",
* kind: "http",
* method: "GET",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.DeviceDexTest("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="GET homepage",
* description="Send a HTTP GET request to the home endpoint every half hour.",
* interval="0h30m0s",
* enabled=True,
* data={
* "host": "https://example.com/home",
* "kind": "http",
* "method": "GET",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.DeviceDexTest("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "GET homepage",
* Description = "Send a HTTP GET request to the home endpoint every half hour.",
* Interval = "0h30m0s",
* Enabled = true,
* Data = new Cloudflare.Inputs.DeviceDexTestDataArgs
* {
* Host = "https://example.com/home",
* Kind = "http",
* Method = "GET",
* },
* });
* });
* ```
* ```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 {
* _, err := cloudflare.NewDeviceDexTest(ctx, "example", &cloudflare.DeviceDexTestArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("GET homepage"),
* Description: pulumi.String("Send a HTTP GET request to the home endpoint every half hour."),
* Interval: pulumi.String("0h30m0s"),
* Enabled: pulumi.Bool(true),
* Data: &cloudflare.DeviceDexTestDataArgs{
* Host: pulumi.String("https://example.com/home"),
* Kind: pulumi.String("http"),
* Method: pulumi.String("GET"),
* },
* })
* 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.DeviceDexTest;
* import com.pulumi.cloudflare.DeviceDexTestArgs;
* import com.pulumi.cloudflare.inputs.DeviceDexTestDataArgs;
* 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 example = new DeviceDexTest("example", DeviceDexTestArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("GET homepage")
* .description("Send a HTTP GET request to the home endpoint every half hour.")
* .interval("0h30m0s")
* .enabled(true)
* .data(DeviceDexTestDataArgs.builder()
* .host("https://example.com/home")
* .kind("http")
* .method("GET")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:DeviceDexTest
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: GET homepage
* description: Send a HTTP GET request to the home endpoint every half hour.
* interval: 0h30m0s
* enabled: true
* data:
* host: https://example.com/home
* kind: http
* method: GET
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/deviceDexTest:DeviceDexTest example /
* ```
* @property accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
* @property data The configuration object which contains the details for the WARP client to conduct the test.
* @property description Additional details about the test.
* @property enabled Determines whether or not the test is active.
* @property interval How often the test will run.
* @property name The name of the Device Dex Test. Must be unique.
*/
public data class DeviceDexTestArgs(
public val accountId: Output? = null,
public val `data`: Output? = null,
public val description: Output? = null,
public val enabled: Output? = null,
public val interval: Output? = null,
public val name: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.DeviceDexTestArgs =
com.pulumi.cloudflare.DeviceDexTestArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.`data`(`data`?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.description(description?.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.interval(interval?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DeviceDexTestArgs].
*/
@PulumiTagMarker
public class DeviceDexTestArgsBuilder internal constructor() {
private var accountId: Output? = null
private var `data`: Output? = null
private var description: Output? = null
private var enabled: Output? = null
private var interval: Output? = null
private var name: Output? = null
/**
* @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("nyljjhynvdrmjsld")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The configuration object which contains the details for the WARP client to conduct the test.
*/
@JvmName("qpmpgrhllqsanjfa")
public suspend fun `data`(`value`: Output) {
this.`data` = value
}
/**
* @param value Additional details about the test.
*/
@JvmName("alfjfoxcblcvqsmm")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Determines whether or not the test is active.
*/
@JvmName("scmfansaypadgpkv")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value How often the test will run.
*/
@JvmName("gnjqlfgagmucawfk")
public suspend fun interval(`value`: Output) {
this.interval = value
}
/**
* @param value The name of the Device Dex Test. Must be unique.
*/
@JvmName("pwdsalfjqlbncltk")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("ljqyvurewiychhdq")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The configuration object which contains the details for the WARP client to conduct the test.
*/
@JvmName("lmxrpmqdkxuvwmam")
public suspend fun `data`(`value`: DeviceDexTestDataArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.`data` = mapped
}
/**
* @param argument The configuration object which contains the details for the WARP client to conduct the test.
*/
@JvmName("maarhglslwcyxvmu")
public suspend fun `data`(argument: suspend DeviceDexTestDataArgsBuilder.() -> Unit) {
val toBeMapped = DeviceDexTestDataArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.`data` = mapped
}
/**
* @param value Additional details about the test.
*/
@JvmName("bonhawtwaufkifjo")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Determines whether or not the test is active.
*/
@JvmName("lkcugrbbdlbmgvtx")
public suspend fun enabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value How often the test will run.
*/
@JvmName("tpjfkohylqfgsivo")
public suspend fun interval(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.interval = mapped
}
/**
* @param value The name of the Device Dex Test. Must be unique.
*/
@JvmName("kfycbvlcbykfinrj")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
internal fun build(): DeviceDexTestArgs = DeviceDexTestArgs(
accountId = accountId,
`data` = `data`,
description = description,
enabled = enabled,
interval = interval,
name = name,
)
}