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

com.pulumi.cloudflare.kotlin.DevicePostureIntegration.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.kotlin.outputs.DevicePostureIntegrationConfig
import com.pulumi.cloudflare.kotlin.outputs.DevicePostureIntegrationConfig.Companion.toKotlin
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

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

    public var args: DevicePostureIntegrationArgs = DevicePostureIntegrationArgs()

    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 DevicePostureIntegrationArgsBuilder.() -> Unit) {
        val builder = DevicePostureIntegrationArgsBuilder()
        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(): DevicePostureIntegration {
        val builtJavaResource = com.pulumi.cloudflare.DevicePostureIntegration(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return DevicePostureIntegration(builtJavaResource)
    }
}

/**
 * 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 /
 * ```
 */
public class DevicePostureIntegration internal constructor(
    override val javaResource: com.pulumi.cloudflare.DevicePostureIntegration,
) : KotlinCustomResource(javaResource, DevicePostureIntegrationMapper) {
    /**
     * The account identifier to target for the resource.
     */
    public val accountId: Output
        get() = javaResource.accountId().applyValue({ args0 -> args0 })

    /**
     * The device posture integration's connection authorization parameters.
     */
    public val configs: Output>?
        get() = javaResource.configs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    public val identifier: Output?
        get() = javaResource.identifier().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Indicates the frequency with which to poll the third-party API. Must be in the format `1h` or `30m`.
     */
    public val interval: Output?
        get() = javaResource.interval().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Name of the device posture integration.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The device posture integration type. Available values: `workspace_one`, `uptycs`, `crowdstrike_s2s`, `intune`, `kolide`, `sentinelone_s2s`, `tanium_s2s`.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy