com.pulumi.cloudflare.kotlin.ZeroTrustDevicePostureIntegration.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.kotlin.outputs.ZeroTrustDevicePostureIntegrationConfig
import com.pulumi.cloudflare.kotlin.outputs.ZeroTrustDevicePostureIntegrationConfig.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 [ZeroTrustDevicePostureIntegration].
*/
@PulumiTagMarker
public class ZeroTrustDevicePostureIntegrationResourceBuilder internal constructor() {
public var name: String? = null
public var args: ZeroTrustDevicePostureIntegrationArgs = ZeroTrustDevicePostureIntegrationArgs()
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 ZeroTrustDevicePostureIntegrationArgsBuilder.() -> Unit) {
val builder = ZeroTrustDevicePostureIntegrationArgsBuilder()
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(): ZeroTrustDevicePostureIntegration {
val builtJavaResource =
com.pulumi.cloudflare.ZeroTrustDevicePostureIntegration(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ZeroTrustDevicePostureIntegration(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.ZeroTrustDevicePostureIntegration("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.ZeroTrustDevicePostureIntegration("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.ZeroTrustDevicePostureIntegration("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* Name = "Device posture integration",
* Type = "workspace_one",
* Interval = "24h",
* Configs = new[]
* {
* new Cloudflare.Inputs.ZeroTrustDevicePostureIntegrationConfigArgs
* {
* 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.NewZeroTrustDevicePostureIntegration(ctx, "example", &cloudflare.ZeroTrustDevicePostureIntegrationArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Name: pulumi.String("Device posture integration"),
* Type: pulumi.String("workspace_one"),
* Interval: pulumi.String("24h"),
* Configs: cloudflare.ZeroTrustDevicePostureIntegrationConfigArray{
* &cloudflare.ZeroTrustDevicePostureIntegrationConfigArgs{
* 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.ZeroTrustDevicePostureIntegration;
* import com.pulumi.cloudflare.ZeroTrustDevicePostureIntegrationArgs;
* import com.pulumi.cloudflare.inputs.ZeroTrustDevicePostureIntegrationConfigArgs;
* 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 ZeroTrustDevicePostureIntegration("example", ZeroTrustDevicePostureIntegrationArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .name("Device posture integration")
* .type("workspace_one")
* .interval("24h")
* .configs(ZeroTrustDevicePostureIntegrationConfigArgs.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:ZeroTrustDevicePostureIntegration
* 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/zeroTrustDevicePostureIntegration:ZeroTrustDevicePostureIntegration example /
* ```
*/
public class ZeroTrustDevicePostureIntegration internal constructor(
override val javaResource: com.pulumi.cloudflare.ZeroTrustDevicePostureIntegration,
) : KotlinCustomResource(javaResource, ZeroTrustDevicePostureIntegrationMapper) {
/**
* 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 ZeroTrustDevicePostureIntegrationMapper :
ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.ZeroTrustDevicePostureIntegration::class == javaResource::class
override fun map(javaResource: Resource): ZeroTrustDevicePostureIntegration =
ZeroTrustDevicePostureIntegration(
javaResource as
com.pulumi.cloudflare.ZeroTrustDevicePostureIntegration,
)
}
/**
* @see [ZeroTrustDevicePostureIntegration].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ZeroTrustDevicePostureIntegration].
*/
public suspend fun zeroTrustDevicePostureIntegration(
name: String,
block: suspend ZeroTrustDevicePostureIntegrationResourceBuilder.() -> Unit,
): ZeroTrustDevicePostureIntegration {
val builder = ZeroTrustDevicePostureIntegrationResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ZeroTrustDevicePostureIntegration].
* @param name The _unique_ name of the resulting resource.
*/
public fun zeroTrustDevicePostureIntegration(name: String): ZeroTrustDevicePostureIntegration {
val builder = ZeroTrustDevicePostureIntegrationResourceBuilder()
builder.name(name)
return builder.build()
}