com.pulumi.cloudflare.kotlin.DeviceSettingsPolicyArgs.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.DeviceSettingsPolicyArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare Device Settings Policy resource. Device policies configure settings applied to WARP devices.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const developerWarpPolicy = new cloudflare.DeviceSettingsPolicy("developer_warp_policy", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "Developers WARP settings policy",
* description: "Developers WARP settings policy description",
* precedence: 10,
* match: "any(identity.groups.name[*] in {\"Developers\"})",
* "default": false,
* enabled: true,
* allowModeSwitch: true,
* allowUpdates: true,
* allowedToLeave: true,
* autoConnect: 0,
* captivePortal: 5,
* disableAutoFallback: true,
* supportUrl: "https://cloudflare.com",
* switchLocked: true,
* serviceModeV2Mode: "warp",
* serviceModeV2Port: 3000,
* excludeOfficeIps: false,
* tunnelProtocol: "wireguard",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* developer_warp_policy = cloudflare.DeviceSettingsPolicy("developer_warp_policy",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="Developers WARP settings policy",
* description="Developers WARP settings policy description",
* precedence=10,
* match="any(identity.groups.name[*] in {\"Developers\"})",
* default=False,
* enabled=True,
* allow_mode_switch=True,
* allow_updates=True,
* allowed_to_leave=True,
* auto_connect=0,
* captive_portal=5,
* disable_auto_fallback=True,
* support_url="https://cloudflare.com",
* switch_locked=True,
* service_mode_v2_mode="warp",
* service_mode_v2_port=3000,
* exclude_office_ips=False,
* tunnel_protocol="wireguard")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var developerWarpPolicy = new Cloudflare.DeviceSettingsPolicy("developer_warp_policy", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "Developers WARP settings policy",
* Description = "Developers WARP settings policy description",
* Precedence = 10,
* Match = "any(identity.groups.name[*] in {\"Developers\"})",
* Default = false,
* Enabled = true,
* AllowModeSwitch = true,
* AllowUpdates = true,
* AllowedToLeave = true,
* AutoConnect = 0,
* CaptivePortal = 5,
* DisableAutoFallback = true,
* SupportUrl = "https://cloudflare.com",
* SwitchLocked = true,
* ServiceModeV2Mode = "warp",
* ServiceModeV2Port = 3000,
* ExcludeOfficeIps = false,
* TunnelProtocol = "wireguard",
* });
* });
* ```
* ```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.NewDeviceSettingsPolicy(ctx, "developer_warp_policy", &cloudflare.DeviceSettingsPolicyArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("Developers WARP settings policy"),
* Description: pulumi.String("Developers WARP settings policy description"),
* Precedence: pulumi.Int(10),
* Match: pulumi.String("any(identity.groups.name[*] in {\"Developers\"})"),
* Default: pulumi.Bool(false),
* Enabled: pulumi.Bool(true),
* AllowModeSwitch: pulumi.Bool(true),
* AllowUpdates: pulumi.Bool(true),
* AllowedToLeave: pulumi.Bool(true),
* AutoConnect: pulumi.Int(0),
* CaptivePortal: pulumi.Int(5),
* DisableAutoFallback: pulumi.Bool(true),
* SupportUrl: pulumi.String("https://cloudflare.com"),
* SwitchLocked: pulumi.Bool(true),
* ServiceModeV2Mode: pulumi.String("warp"),
* ServiceModeV2Port: pulumi.Int(3000),
* ExcludeOfficeIps: pulumi.Bool(false),
* TunnelProtocol: pulumi.String("wireguard"),
* })
* 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.DeviceSettingsPolicy;
* import com.pulumi.cloudflare.DeviceSettingsPolicyArgs;
* 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 developerWarpPolicy = new DeviceSettingsPolicy("developerWarpPolicy", DeviceSettingsPolicyArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("Developers WARP settings policy")
* .description("Developers WARP settings policy description")
* .precedence(10)
* .match("any(identity.groups.name[*] in {\"Developers\"})")
* .default_(false)
* .enabled(true)
* .allowModeSwitch(true)
* .allowUpdates(true)
* .allowedToLeave(true)
* .autoConnect(0)
* .captivePortal(5)
* .disableAutoFallback(true)
* .supportUrl("https://cloudflare.com")
* .switchLocked(true)
* .serviceModeV2Mode("warp")
* .serviceModeV2Port(3000)
* .excludeOfficeIps(false)
* .tunnelProtocol("wireguard")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* developerWarpPolicy:
* type: cloudflare:DeviceSettingsPolicy
* name: developer_warp_policy
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: Developers WARP settings policy
* description: Developers WARP settings policy description
* precedence: 10
* match: any(identity.groups.name[*] in {"Developers"})
* default: false
* enabled: true
* allowModeSwitch: true
* allowUpdates: true
* allowedToLeave: true
* autoConnect: 0
* captivePortal: 5
* disableAutoFallback: true
* supportUrl: https://cloudflare.com
* switchLocked: true
* serviceModeV2Mode: warp
* serviceModeV2Port: 3000
* excludeOfficeIps: false
* tunnelProtocol: wireguard
* ```
*
* ## Import
* For default device settings policies you must use "default" as the policy ID.
* ```sh
* $ pulumi import cloudflare:index/deviceSettingsPolicy:DeviceSettingsPolicy example /
* ```
* @property accountId The account identifier to target for the resource.
* @property allowModeSwitch Whether to allow mode switch for this policy.
* @property allowUpdates Whether to allow updates under this policy.
* @property allowedToLeave Whether to allow devices to leave the organization. Defaults to `true`.
* @property autoConnect The amount of time in seconds to reconnect after having been disabled.
* @property captivePortal The captive portal value for this policy. Defaults to `180`.
* @property default Whether the policy refers to the default account policy.
* @property description Description of Policy.
* @property disableAutoFallback Whether to disable auto fallback for this policy.
* @property enabled Whether the policy is enabled (cannot be set for default policies). Defaults to `true`.
* @property excludeOfficeIps Whether to add Microsoft IPs to split tunnel exclusions.
* @property match Wirefilter expression to match a device against when evaluating whether this policy should take effect for that device.
* @property name Name of the policy.
* @property precedence The precedence of the policy. Lower values indicate higher precedence.
* @property serviceModeV2Mode The service mode. Available values: `1dot1`, `warp`, `proxy`, `posture_only`, `warp_tunnel_only`. Defaults to `warp`.
* @property serviceModeV2Port The port to use for the proxy service mode. Required when using `service_mode_v2_mode`.
* @property supportUrl The support URL that will be opened when sending feedback.
* @property switchLocked Enablement of the ZT client switch lock.
* @property tunnelProtocol Determines which tunnel protocol to use. Available values: `""`, `wireguard`, `masque`. Defaults to `wireguard`.
*/
public data class DeviceSettingsPolicyArgs(
public val accountId: Output? = null,
public val allowModeSwitch: Output? = null,
public val allowUpdates: Output? = null,
public val allowedToLeave: Output? = null,
public val autoConnect: Output? = null,
public val captivePortal: Output? = null,
public val default: Output? = null,
public val description: Output? = null,
public val disableAutoFallback: Output? = null,
public val enabled: Output? = null,
public val excludeOfficeIps: Output? = null,
public val match: Output? = null,
public val name: Output? = null,
public val precedence: Output? = null,
public val serviceModeV2Mode: Output? = null,
public val serviceModeV2Port: Output? = null,
public val supportUrl: Output? = null,
public val switchLocked: Output? = null,
public val tunnelProtocol: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.DeviceSettingsPolicyArgs =
com.pulumi.cloudflare.DeviceSettingsPolicyArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.allowModeSwitch(allowModeSwitch?.applyValue({ args0 -> args0 }))
.allowUpdates(allowUpdates?.applyValue({ args0 -> args0 }))
.allowedToLeave(allowedToLeave?.applyValue({ args0 -> args0 }))
.autoConnect(autoConnect?.applyValue({ args0 -> args0 }))
.captivePortal(captivePortal?.applyValue({ args0 -> args0 }))
.default_(default?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.disableAutoFallback(disableAutoFallback?.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.excludeOfficeIps(excludeOfficeIps?.applyValue({ args0 -> args0 }))
.match(match?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.precedence(precedence?.applyValue({ args0 -> args0 }))
.serviceModeV2Mode(serviceModeV2Mode?.applyValue({ args0 -> args0 }))
.serviceModeV2Port(serviceModeV2Port?.applyValue({ args0 -> args0 }))
.supportUrl(supportUrl?.applyValue({ args0 -> args0 }))
.switchLocked(switchLocked?.applyValue({ args0 -> args0 }))
.tunnelProtocol(tunnelProtocol?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DeviceSettingsPolicyArgs].
*/
@PulumiTagMarker
public class DeviceSettingsPolicyArgsBuilder internal constructor() {
private var accountId: Output? = null
private var allowModeSwitch: Output? = null
private var allowUpdates: Output? = null
private var allowedToLeave: Output? = null
private var autoConnect: Output? = null
private var captivePortal: Output? = null
private var default: Output? = null
private var description: Output? = null
private var disableAutoFallback: Output? = null
private var enabled: Output? = null
private var excludeOfficeIps: Output? = null
private var match: Output? = null
private var name: Output? = null
private var precedence: Output? = null
private var serviceModeV2Mode: Output? = null
private var serviceModeV2Port: Output? = null
private var supportUrl: Output? = null
private var switchLocked: Output? = null
private var tunnelProtocol: Output? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("bssumwrsolhebhga")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Whether to allow mode switch for this policy.
*/
@JvmName("vmdonipoxeaonjpt")
public suspend fun allowModeSwitch(`value`: Output) {
this.allowModeSwitch = value
}
/**
* @param value Whether to allow updates under this policy.
*/
@JvmName("nacqlfnfxohorots")
public suspend fun allowUpdates(`value`: Output) {
this.allowUpdates = value
}
/**
* @param value Whether to allow devices to leave the organization. Defaults to `true`.
*/
@JvmName("kwioygrosiqiwsgx")
public suspend fun allowedToLeave(`value`: Output) {
this.allowedToLeave = value
}
/**
* @param value The amount of time in seconds to reconnect after having been disabled.
*/
@JvmName("tjefvtgjctjvbewx")
public suspend fun autoConnect(`value`: Output) {
this.autoConnect = value
}
/**
* @param value The captive portal value for this policy. Defaults to `180`.
*/
@JvmName("ibrjfcgqhhayqyes")
public suspend fun captivePortal(`value`: Output) {
this.captivePortal = value
}
/**
* @param value Whether the policy refers to the default account policy.
*/
@JvmName("pvonsimskdpmgoph")
public suspend fun default(`value`: Output) {
this.default = value
}
/**
* @param value Description of Policy.
*/
@JvmName("tsvwdekxwtsyesdf")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Whether to disable auto fallback for this policy.
*/
@JvmName("mcgptveobowvmjfw")
public suspend fun disableAutoFallback(`value`: Output) {
this.disableAutoFallback = value
}
/**
* @param value Whether the policy is enabled (cannot be set for default policies). Defaults to `true`.
*/
@JvmName("klttbarswgqkbqvd")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value Whether to add Microsoft IPs to split tunnel exclusions.
*/
@JvmName("nklkotkygipwkpdm")
public suspend fun excludeOfficeIps(`value`: Output) {
this.excludeOfficeIps = value
}
/**
* @param value Wirefilter expression to match a device against when evaluating whether this policy should take effect for that device.
*/
@JvmName("vefsmfsjiikhfmgb")
public suspend fun match(`value`: Output) {
this.match = value
}
/**
* @param value Name of the policy.
*/
@JvmName("tjiroteaswcwjnfe")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The precedence of the policy. Lower values indicate higher precedence.
*/
@JvmName("cpufhuybelnnpivm")
public suspend fun precedence(`value`: Output) {
this.precedence = value
}
/**
* @param value The service mode. Available values: `1dot1`, `warp`, `proxy`, `posture_only`, `warp_tunnel_only`. Defaults to `warp`.
*/
@JvmName("niepkpvjolmhhquf")
public suspend fun serviceModeV2Mode(`value`: Output) {
this.serviceModeV2Mode = value
}
/**
* @param value The port to use for the proxy service mode. Required when using `service_mode_v2_mode`.
*/
@JvmName("tmnkrwtraqlqxffw")
public suspend fun serviceModeV2Port(`value`: Output) {
this.serviceModeV2Port = value
}
/**
* @param value The support URL that will be opened when sending feedback.
*/
@JvmName("gqsmmocpacihlodr")
public suspend fun supportUrl(`value`: Output) {
this.supportUrl = value
}
/**
* @param value Enablement of the ZT client switch lock.
*/
@JvmName("terpiiaftejoabjn")
public suspend fun switchLocked(`value`: Output) {
this.switchLocked = value
}
/**
* @param value Determines which tunnel protocol to use. Available values: `""`, `wireguard`, `masque`. Defaults to `wireguard`.
*/
@JvmName("nwrhxusrvxcfykcm")
public suspend fun tunnelProtocol(`value`: Output) {
this.tunnelProtocol = value
}
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("bytypknbpghmmttl")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value Whether to allow mode switch for this policy.
*/
@JvmName("cpnhinweybvonyek")
public suspend fun allowModeSwitch(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowModeSwitch = mapped
}
/**
* @param value Whether to allow updates under this policy.
*/
@JvmName("eopbbiphhyjiyasd")
public suspend fun allowUpdates(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowUpdates = mapped
}
/**
* @param value Whether to allow devices to leave the organization. Defaults to `true`.
*/
@JvmName("drbvomnlhjtomsgl")
public suspend fun allowedToLeave(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowedToLeave = mapped
}
/**
* @param value The amount of time in seconds to reconnect after having been disabled.
*/
@JvmName("icufmoxvyixqtflm")
public suspend fun autoConnect(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.autoConnect = mapped
}
/**
* @param value The captive portal value for this policy. Defaults to `180`.
*/
@JvmName("vojlsvunuessxdbv")
public suspend fun captivePortal(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.captivePortal = mapped
}
/**
* @param value Whether the policy refers to the default account policy.
*/
@JvmName("xshghmgmyqfqugqj")
public suspend fun default(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.default = mapped
}
/**
* @param value Description of Policy.
*/
@JvmName("oipetnsgwvnfonen")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Whether to disable auto fallback for this policy.
*/
@JvmName("baqvtdfixtnyhdjs")
public suspend fun disableAutoFallback(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.disableAutoFallback = mapped
}
/**
* @param value Whether the policy is enabled (cannot be set for default policies). Defaults to `true`.
*/
@JvmName("saknyfgrjxsynjcy")
public suspend fun enabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value Whether to add Microsoft IPs to split tunnel exclusions.
*/
@JvmName("eidhggpmrymjfbxm")
public suspend fun excludeOfficeIps(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.excludeOfficeIps = mapped
}
/**
* @param value Wirefilter expression to match a device against when evaluating whether this policy should take effect for that device.
*/
@JvmName("ttgdbiqhfikgptoy")
public suspend fun match(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.match = mapped
}
/**
* @param value Name of the policy.
*/
@JvmName("wtvfiulkjfwodtjb")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The precedence of the policy. Lower values indicate higher precedence.
*/
@JvmName("vmfhywpksdydshgx")
public suspend fun precedence(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.precedence = mapped
}
/**
* @param value The service mode. Available values: `1dot1`, `warp`, `proxy`, `posture_only`, `warp_tunnel_only`. Defaults to `warp`.
*/
@JvmName("uxtcbuglbrbxucnl")
public suspend fun serviceModeV2Mode(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceModeV2Mode = mapped
}
/**
* @param value The port to use for the proxy service mode. Required when using `service_mode_v2_mode`.
*/
@JvmName("mwlckigsevccorjt")
public suspend fun serviceModeV2Port(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceModeV2Port = mapped
}
/**
* @param value The support URL that will be opened when sending feedback.
*/
@JvmName("rdashdjbjydtmsmy")
public suspend fun supportUrl(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.supportUrl = mapped
}
/**
* @param value Enablement of the ZT client switch lock.
*/
@JvmName("avloeinakfceeltk")
public suspend fun switchLocked(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.switchLocked = mapped
}
/**
* @param value Determines which tunnel protocol to use. Available values: `""`, `wireguard`, `masque`. Defaults to `wireguard`.
*/
@JvmName("cahmcdxplcdlnshi")
public suspend fun tunnelProtocol(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tunnelProtocol = mapped
}
internal fun build(): DeviceSettingsPolicyArgs = DeviceSettingsPolicyArgs(
accountId = accountId,
allowModeSwitch = allowModeSwitch,
allowUpdates = allowUpdates,
allowedToLeave = allowedToLeave,
autoConnect = autoConnect,
captivePortal = captivePortal,
default = default,
description = description,
disableAutoFallback = disableAutoFallback,
enabled = enabled,
excludeOfficeIps = excludeOfficeIps,
match = match,
name = name,
precedence = precedence,
serviceModeV2Mode = serviceModeV2Mode,
serviceModeV2Port = serviceModeV2Port,
supportUrl = supportUrl,
switchLocked = switchLocked,
tunnelProtocol = tunnelProtocol,
)
}