com.pulumi.cloudflare.kotlin.DeviceManagedNetworksArgs.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.DeviceManagedNetworksArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.DeviceManagedNetworksConfigArgs
import com.pulumi.cloudflare.kotlin.inputs.DeviceManagedNetworksConfigArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare Device Managed Network resource. Device managed networks allow for building location-aware device settings policies.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const managedNetworks = new cloudflare.DeviceManagedNetworks("managed_networks", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* name: "managed-network-1",
* type: "tls",
* config: {
* tlsSockaddr: "foobar:1234",
* sha256: "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* managed_networks = cloudflare.DeviceManagedNetworks("managed_networks",
* account_id="f037e56e89293a057740de681ac9abbe",
* name="managed-network-1",
* type="tls",
* config={
* "tls_sockaddr": "foobar:1234",
* "sha256": "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var managedNetworks = new Cloudflare.DeviceManagedNetworks("managed_networks", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "managed-network-1",
* Type = "tls",
* Config = new Cloudflare.Inputs.DeviceManagedNetworksConfigArgs
* {
* TlsSockaddr = "foobar:1234",
* Sha256 = "b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c",
* },
* });
* });
* ```
* ```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.NewDeviceManagedNetworks(ctx, "managed_networks", &cloudflare.DeviceManagedNetworksArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("managed-network-1"),
* Type: pulumi.String("tls"),
* Config: &cloudflare.DeviceManagedNetworksConfigArgs{
* TlsSockaddr: pulumi.String("foobar:1234"),
* Sha256: pulumi.String("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c"),
* },
* })
* 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.DeviceManagedNetworks;
* import com.pulumi.cloudflare.DeviceManagedNetworksArgs;
* import com.pulumi.cloudflare.inputs.DeviceManagedNetworksConfigArgs;
* 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 managedNetworks = new DeviceManagedNetworks("managedNetworks", DeviceManagedNetworksArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("managed-network-1")
* .type("tls")
* .config(DeviceManagedNetworksConfigArgs.builder()
* .tlsSockaddr("foobar:1234")
* .sha256("b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c")
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* managedNetworks:
* type: cloudflare:DeviceManagedNetworks
* name: managed_networks
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* name: managed-network-1
* type: tls
* config:
* tlsSockaddr: foobar:1234
* sha256: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/deviceManagedNetworks:DeviceManagedNetworks example /
* ```
* @property accountId The account identifier to target for the resource.
* @property config The configuration containing information for the WARP client to detect the managed network.
* @property name The name of the Device Managed Network. Must be unique.
* @property type The type of Device Managed Network. Available values: `tls`.
*/
public data class DeviceManagedNetworksArgs(
public val accountId: Output? = null,
public val config: Output? = null,
public val name: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.DeviceManagedNetworksArgs =
com.pulumi.cloudflare.DeviceManagedNetworksArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.config(config?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DeviceManagedNetworksArgs].
*/
@PulumiTagMarker
public class DeviceManagedNetworksArgsBuilder internal constructor() {
private var accountId: Output? = null
private var config: Output? = null
private var name: Output? = null
private var type: Output? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("xtkbncxawcwkgebj")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value The configuration containing information for the WARP client to detect the managed network.
*/
@JvmName("ajuhbkgwcekpnyyj")
public suspend fun config(`value`: Output) {
this.config = value
}
/**
* @param value The name of the Device Managed Network. Must be unique.
*/
@JvmName("wqypbcggeeustwve")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The type of Device Managed Network. Available values: `tls`.
*/
@JvmName("ielffqsqhsreyloh")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("qlutknwpparcfqvv")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value The configuration containing information for the WARP client to detect the managed network.
*/
@JvmName("rmojlutkgyotgxgp")
public suspend fun config(`value`: DeviceManagedNetworksConfigArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.config = mapped
}
/**
* @param argument The configuration containing information for the WARP client to detect the managed network.
*/
@JvmName("lbqqtlxypimnonhy")
public suspend fun config(argument: suspend DeviceManagedNetworksConfigArgsBuilder.() -> Unit) {
val toBeMapped = DeviceManagedNetworksConfigArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.config = mapped
}
/**
* @param value The name of the Device Managed Network. Must be unique.
*/
@JvmName("msnijfomdyiierqg")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The type of Device Managed Network. Available values: `tls`.
*/
@JvmName("iwjbyaoqfwwusipg")
public suspend fun type(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.type = mapped
}
internal fun build(): DeviceManagedNetworksArgs = DeviceManagedNetworksArgs(
accountId = accountId,
config = config,
name = name,
type = type,
)
}