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

com.pulumi.cloudflare.kotlin.DevicePostureIntegrationArgs.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.cloudflare.DevicePostureIntegrationArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.DevicePostureIntegrationConfigArgs
import com.pulumi.cloudflare.kotlin.inputs.DevicePostureIntegrationConfigArgsBuilder
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.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Device Posture Integration resource. Device
 * posture integrations configure third-party data providers for device
 * posture rules.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.DevicePostureIntegration("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "Device posture integration",
 *     type: "workspace_one",
 *     interval: "24h",
 *     configs: [{
 *         apiUrl: "https://example.com/api",
 *         authUrl: "https://example.com/connect/token",
 *         clientId: "client-id",
 *         clientSecret: "client-secret",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.DevicePostureIntegration("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="Device posture integration",
 *     type="workspace_one",
 *     interval="24h",
 *     configs=[{
 *         "api_url": "https://example.com/api",
 *         "auth_url": "https://example.com/connect/token",
 *         "client_id": "client-id",
 *         "client_secret": "client-secret",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.DevicePostureIntegration("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "Device posture integration",
 *         Type = "workspace_one",
 *         Interval = "24h",
 *         Configs = new[]
 *         {
 *             new Cloudflare.Inputs.DevicePostureIntegrationConfigArgs
 *             {
 *                 ApiUrl = "https://example.com/api",
 *                 AuthUrl = "https://example.com/connect/token",
 *                 ClientId = "client-id",
 *                 ClientSecret = "client-secret",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```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.NewDevicePostureIntegration(ctx, "example", &cloudflare.DevicePostureIntegrationArgs{
 * 			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:      pulumi.String("Device posture integration"),
 * 			Type:      pulumi.String("workspace_one"),
 * 			Interval:  pulumi.String("24h"),
 * 			Configs: cloudflare.DevicePostureIntegrationConfigArray{
 * 				&cloudflare.DevicePostureIntegrationConfigArgs{
 * 					ApiUrl:       pulumi.String("https://example.com/api"),
 * 					AuthUrl:      pulumi.String("https://example.com/connect/token"),
 * 					ClientId:     pulumi.String("client-id"),
 * 					ClientSecret: pulumi.String("client-secret"),
 * 				},
 * 			},
 * 		})
 * 		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.DevicePostureIntegration;
 * import com.pulumi.cloudflare.DevicePostureIntegrationArgs;
 * import com.pulumi.cloudflare.inputs.DevicePostureIntegrationConfigArgs;
 * 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 DevicePostureIntegration("example", DevicePostureIntegrationArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("Device posture integration")
 *             .type("workspace_one")
 *             .interval("24h")
 *             .configs(DevicePostureIntegrationConfigArgs.builder()
 *                 .apiUrl("https://example.com/api")
 *                 .authUrl("https://example.com/connect/token")
 *                 .clientId("client-id")
 *                 .clientSecret("client-secret")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:DevicePostureIntegration
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: Device posture integration
 *       type: workspace_one
 *       interval: 24h
 *       configs:
 *         - apiUrl: https://example.com/api
 *           authUrl: https://example.com/connect/token
 *           clientId: client-id
 *           clientSecret: client-secret
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/devicePostureIntegration:DevicePostureIntegration example /
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property configs The device posture integration's connection authorization parameters.
 * @property identifier
 * @property interval Indicates the frequency with which to poll the third-party API. Must be in the format `1h` or `30m`.
 * @property name Name of the device posture integration.
 * @property type The device posture integration type. Available values: `workspace_one`, `uptycs`, `crowdstrike_s2s`, `intune`, `kolide`, `sentinelone_s2s`, `tanium_s2s`.
 */
public data class DevicePostureIntegrationArgs(
    public val accountId: Output? = null,
    public val configs: Output>? = null,
    public val identifier: Output? = null,
    public val interval: Output? = null,
    public val name: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.DevicePostureIntegrationArgs =
        com.pulumi.cloudflare.DevicePostureIntegrationArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .configs(
                configs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .identifier(identifier?.applyValue({ args0 -> args0 }))
            .interval(interval?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DevicePostureIntegrationArgs].
 */
@PulumiTagMarker
public class DevicePostureIntegrationArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var configs: Output>? = null

    private var identifier: Output? = null

    private var interval: Output? = null

    private var name: Output? = null

    private var type: Output? = null

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("pbckltuwyndfferv")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value The device posture integration's connection authorization parameters.
     */
    @JvmName("rvnknjeyoanvuvdu")
    public suspend fun configs(`value`: Output>) {
        this.configs = value
    }

    @JvmName("avncvwtgnjylosus")
    public suspend fun configs(vararg values: Output) {
        this.configs = Output.all(values.asList())
    }

    /**
     * @param values The device posture integration's connection authorization parameters.
     */
    @JvmName("idwtyamnhswnrpue")
    public suspend fun configs(values: List>) {
        this.configs = Output.all(values)
    }

    /**
     * @param value
     */
    @JvmName("ahmdhrrrpioymyai")
    public suspend fun identifier(`value`: Output) {
        this.identifier = value
    }

    /**
     * @param value Indicates the frequency with which to poll the third-party API. Must be in the format `1h` or `30m`.
     */
    @JvmName("yomiitahdmkgiygx")
    public suspend fun interval(`value`: Output) {
        this.interval = value
    }

    /**
     * @param value Name of the device posture integration.
     */
    @JvmName("twmcpkujgtdgjyrc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The device posture integration type. Available values: `workspace_one`, `uptycs`, `crowdstrike_s2s`, `intune`, `kolide`, `sentinelone_s2s`, `tanium_s2s`.
     */
    @JvmName("ovwaxkapdiwwmouv")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The account identifier to target for the resource.
     */
    @JvmName("ufhnwratcxiqwvhf")
    public suspend fun accountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accountId = mapped
    }

    /**
     * @param value The device posture integration's connection authorization parameters.
     */
    @JvmName("jnxdcemttbukgkoh")
    public suspend fun configs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.configs = mapped
    }

    /**
     * @param argument The device posture integration's connection authorization parameters.
     */
    @JvmName("hkstayqliggxutiq")
    public suspend fun configs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DevicePostureIntegrationConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.configs = mapped
    }

    /**
     * @param argument The device posture integration's connection authorization parameters.
     */
    @JvmName("fbxhkbacylkpapap")
    public suspend fun configs(vararg argument: suspend DevicePostureIntegrationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DevicePostureIntegrationConfigArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.configs = mapped
    }

    /**
     * @param argument The device posture integration's connection authorization parameters.
     */
    @JvmName("msurcnprtmvdofii")
    public suspend fun configs(argument: suspend DevicePostureIntegrationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DevicePostureIntegrationConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.configs = mapped
    }

    /**
     * @param values The device posture integration's connection authorization parameters.
     */
    @JvmName("bfftrmsgymjtitjf")
    public suspend fun configs(vararg values: DevicePostureIntegrationConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.configs = mapped
    }

    /**
     * @param value
     */
    @JvmName("jxkyakkbergnhonx")
    public suspend fun identifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identifier = mapped
    }

    /**
     * @param value Indicates the frequency with which to poll the third-party API. Must be in the format `1h` or `30m`.
     */
    @JvmName("rbsthiftrpkntyqc")
    public suspend fun interval(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.interval = mapped
    }

    /**
     * @param value Name of the device posture integration.
     */
    @JvmName("iwfbcwffixmwvtbg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The device posture integration type. Available values: `workspace_one`, `uptycs`, `crowdstrike_s2s`, `intune`, `kolide`, `sentinelone_s2s`, `tanium_s2s`.
     */
    @JvmName("eeshiltbyctgmevk")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): DevicePostureIntegrationArgs = DevicePostureIntegrationArgs(
        accountId = accountId,
        configs = configs,
        identifier = identifier,
        interval = interval,
        name = name,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy