com.pulumi.cloudflare.kotlin.TeamsAccount.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.kotlin.outputs.TeamsAccountAntivirus
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountBlockPage
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountBodyScanning
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountCertificate
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountCustomCertificate
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountExtendedEmailMatching
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountFips
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountLogging
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountPayloadLog
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountProxy
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountSshSessionLog
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountAntivirus.Companion.toKotlin as teamsAccountAntivirusToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountBlockPage.Companion.toKotlin as teamsAccountBlockPageToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountBodyScanning.Companion.toKotlin as teamsAccountBodyScanningToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountCertificate.Companion.toKotlin as teamsAccountCertificateToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountCustomCertificate.Companion.toKotlin as teamsAccountCustomCertificateToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountExtendedEmailMatching.Companion.toKotlin as teamsAccountExtendedEmailMatchingToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountFips.Companion.toKotlin as teamsAccountFipsToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountLogging.Companion.toKotlin as teamsAccountLoggingToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountPayloadLog.Companion.toKotlin as teamsAccountPayloadLogToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountProxy.Companion.toKotlin as teamsAccountProxyToKotlin
import com.pulumi.cloudflare.kotlin.outputs.TeamsAccountSshSessionLog.Companion.toKotlin as teamsAccountSshSessionLogToKotlin
/**
* Builder for [TeamsAccount].
*/
@PulumiTagMarker
public class TeamsAccountResourceBuilder internal constructor() {
public var name: String? = null
public var args: TeamsAccountArgs = TeamsAccountArgs()
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 TeamsAccountArgsBuilder.() -> Unit) {
val builder = TeamsAccountArgsBuilder()
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(): TeamsAccount {
val builtJavaResource = com.pulumi.cloudflare.TeamsAccount(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return TeamsAccount(builtJavaResource)
}
}
/**
* Provides a Cloudflare Teams Account resource. The Teams Account
* resource defines configuration for secure web gateway.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.TeamsAccount("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* tlsDecryptEnabled: true,
* protocolDetectionEnabled: true,
* blockPage: {
* footerText: "hello",
* headerText: "hello",
* logoPath: "https://example.com/logo.jpg",
* backgroundColor: "#000000",
* },
* bodyScanning: {
* inspectionMode: "deep",
* },
* antivirus: {
* enabledDownloadPhase: true,
* enabledUploadPhase: false,
* failClosed: true,
* notificationSettings: {
* enabled: true,
* message: "you are blocked",
* supportUrl: "https://example.com/blocked",
* },
* },
* fips: {
* tls: true,
* },
* proxy: {
* tcp: true,
* udp: true,
* rootCa: true,
* virtualIp: false,
* disableForTime: 3600,
* },
* urlBrowserIsolationEnabled: true,
* logging: {
* redactPii: true,
* settingsByRuleType: {
* dns: {
* logAll: false,
* logBlocks: true,
* },
* http: {
* logAll: true,
* logBlocks: true,
* },
* l4: {
* logAll: false,
* logBlocks: true,
* },
* },
* },
* extendedEmailMatching: {
* enabled: true,
* },
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.TeamsAccount("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* tls_decrypt_enabled=True,
* protocol_detection_enabled=True,
* block_page={
* "footer_text": "hello",
* "header_text": "hello",
* "logo_path": "https://example.com/logo.jpg",
* "background_color": "#000000",
* },
* body_scanning={
* "inspection_mode": "deep",
* },
* antivirus={
* "enabled_download_phase": True,
* "enabled_upload_phase": False,
* "fail_closed": True,
* "notification_settings": {
* "enabled": True,
* "message": "you are blocked",
* "support_url": "https://example.com/blocked",
* },
* },
* fips={
* "tls": True,
* },
* proxy={
* "tcp": True,
* "udp": True,
* "root_ca": True,
* "virtual_ip": False,
* "disable_for_time": 3600,
* },
* url_browser_isolation_enabled=True,
* logging={
* "redact_pii": True,
* "settings_by_rule_type": {
* "dns": {
* "log_all": False,
* "log_blocks": True,
* },
* "http": {
* "log_all": True,
* "log_blocks": True,
* },
* "l4": {
* "log_all": False,
* "log_blocks": True,
* },
* },
* },
* extended_email_matching={
* "enabled": True,
* })
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.TeamsAccount("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* TlsDecryptEnabled = true,
* ProtocolDetectionEnabled = true,
* BlockPage = new Cloudflare.Inputs.TeamsAccountBlockPageArgs
* {
* FooterText = "hello",
* HeaderText = "hello",
* LogoPath = "https://example.com/logo.jpg",
* BackgroundColor = "#000000",
* },
* BodyScanning = new Cloudflare.Inputs.TeamsAccountBodyScanningArgs
* {
* InspectionMode = "deep",
* },
* Antivirus = new Cloudflare.Inputs.TeamsAccountAntivirusArgs
* {
* EnabledDownloadPhase = true,
* EnabledUploadPhase = false,
* FailClosed = true,
* NotificationSettings = new Cloudflare.Inputs.TeamsAccountAntivirusNotificationSettingsArgs
* {
* Enabled = true,
* Message = "you are blocked",
* SupportUrl = "https://example.com/blocked",
* },
* },
* Fips = new Cloudflare.Inputs.TeamsAccountFipsArgs
* {
* Tls = true,
* },
* Proxy = new Cloudflare.Inputs.TeamsAccountProxyArgs
* {
* Tcp = true,
* Udp = true,
* RootCa = true,
* VirtualIp = false,
* DisableForTime = 3600,
* },
* UrlBrowserIsolationEnabled = true,
* Logging = new Cloudflare.Inputs.TeamsAccountLoggingArgs
* {
* RedactPii = true,
* SettingsByRuleType = new Cloudflare.Inputs.TeamsAccountLoggingSettingsByRuleTypeArgs
* {
* Dns = new Cloudflare.Inputs.TeamsAccountLoggingSettingsByRuleTypeDnsArgs
* {
* LogAll = false,
* LogBlocks = true,
* },
* Http = new Cloudflare.Inputs.TeamsAccountLoggingSettingsByRuleTypeHttpArgs
* {
* LogAll = true,
* LogBlocks = true,
* },
* L4 = new Cloudflare.Inputs.TeamsAccountLoggingSettingsByRuleTypeL4Args
* {
* LogAll = false,
* LogBlocks = true,
* },
* },
* },
* ExtendedEmailMatching = new Cloudflare.Inputs.TeamsAccountExtendedEmailMatchingArgs
* {
* Enabled = true,
* },
* });
* });
* ```
* ```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.NewTeamsAccount(ctx, "example", &cloudflare.TeamsAccountArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* TlsDecryptEnabled: pulumi.Bool(true),
* ProtocolDetectionEnabled: pulumi.Bool(true),
* BlockPage: &cloudflare.TeamsAccountBlockPageArgs{
* FooterText: pulumi.String("hello"),
* HeaderText: pulumi.String("hello"),
* LogoPath: pulumi.String("https://example.com/logo.jpg"),
* BackgroundColor: pulumi.String("#000000"),
* },
* BodyScanning: &cloudflare.TeamsAccountBodyScanningArgs{
* InspectionMode: pulumi.String("deep"),
* },
* Antivirus: &cloudflare.TeamsAccountAntivirusArgs{
* EnabledDownloadPhase: pulumi.Bool(true),
* EnabledUploadPhase: pulumi.Bool(false),
* FailClosed: pulumi.Bool(true),
* NotificationSettings: &cloudflare.TeamsAccountAntivirusNotificationSettingsArgs{
* Enabled: pulumi.Bool(true),
* Message: pulumi.String("you are blocked"),
* SupportUrl: pulumi.String("https://example.com/blocked"),
* },
* },
* Fips: &cloudflare.TeamsAccountFipsArgs{
* Tls: pulumi.Bool(true),
* },
* Proxy: &cloudflare.TeamsAccountProxyArgs{
* Tcp: pulumi.Bool(true),
* Udp: pulumi.Bool(true),
* RootCa: pulumi.Bool(true),
* VirtualIp: pulumi.Bool(false),
* DisableForTime: pulumi.Int(3600),
* },
* UrlBrowserIsolationEnabled: pulumi.Bool(true),
* Logging: &cloudflare.TeamsAccountLoggingArgs{
* RedactPii: pulumi.Bool(true),
* SettingsByRuleType: &cloudflare.TeamsAccountLoggingSettingsByRuleTypeArgs{
* Dns: &cloudflare.TeamsAccountLoggingSettingsByRuleTypeDnsArgs{
* LogAll: pulumi.Bool(false),
* LogBlocks: pulumi.Bool(true),
* },
* Http: &cloudflare.TeamsAccountLoggingSettingsByRuleTypeHttpArgs{
* LogAll: pulumi.Bool(true),
* LogBlocks: pulumi.Bool(true),
* },
* L4: &cloudflare.TeamsAccountLoggingSettingsByRuleTypeL4Args{
* LogAll: pulumi.Bool(false),
* LogBlocks: pulumi.Bool(true),
* },
* },
* },
* ExtendedEmailMatching: &cloudflare.TeamsAccountExtendedEmailMatchingArgs{
* Enabled: pulumi.Bool(true),
* },
* })
* 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.TeamsAccount;
* import com.pulumi.cloudflare.TeamsAccountArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountBlockPageArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountBodyScanningArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountAntivirusArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountAntivirusNotificationSettingsArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountFipsArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountProxyArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountLoggingArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountLoggingSettingsByRuleTypeArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountLoggingSettingsByRuleTypeDnsArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountLoggingSettingsByRuleTypeHttpArgs;
* import com.pulumi.cloudflare.inputs.TeamsAccountLoggingSettingsByRuleTypeL4Args;
* import com.pulumi.cloudflare.inputs.TeamsAccountExtendedEmailMatchingArgs;
* 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 TeamsAccount("example", TeamsAccountArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .tlsDecryptEnabled(true)
* .protocolDetectionEnabled(true)
* .blockPage(TeamsAccountBlockPageArgs.builder()
* .footerText("hello")
* .headerText("hello")
* .logoPath("https://example.com/logo.jpg")
* .backgroundColor("#000000")
* .build())
* .bodyScanning(TeamsAccountBodyScanningArgs.builder()
* .inspectionMode("deep")
* .build())
* .antivirus(TeamsAccountAntivirusArgs.builder()
* .enabledDownloadPhase(true)
* .enabledUploadPhase(false)
* .failClosed(true)
* .notificationSettings(TeamsAccountAntivirusNotificationSettingsArgs.builder()
* .enabled(true)
* .message("you are blocked")
* .supportUrl("https://example.com/blocked")
* .build())
* .build())
* .fips(TeamsAccountFipsArgs.builder()
* .tls(true)
* .build())
* .proxy(TeamsAccountProxyArgs.builder()
* .tcp(true)
* .udp(true)
* .rootCa(true)
* .virtualIp(false)
* .disableForTime(3600)
* .build())
* .urlBrowserIsolationEnabled(true)
* .logging(TeamsAccountLoggingArgs.builder()
* .redactPii(true)
* .settingsByRuleType(TeamsAccountLoggingSettingsByRuleTypeArgs.builder()
* .dns(TeamsAccountLoggingSettingsByRuleTypeDnsArgs.builder()
* .logAll(false)
* .logBlocks(true)
* .build())
* .http(TeamsAccountLoggingSettingsByRuleTypeHttpArgs.builder()
* .logAll(true)
* .logBlocks(true)
* .build())
* .l4(TeamsAccountLoggingSettingsByRuleTypeL4Args.builder()
* .logAll(false)
* .logBlocks(true)
* .build())
* .build())
* .build())
* .extendedEmailMatching(TeamsAccountExtendedEmailMatchingArgs.builder()
* .enabled(true)
* .build())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:TeamsAccount
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* tlsDecryptEnabled: true
* protocolDetectionEnabled: true
* blockPage:
* footerText: hello
* headerText: hello
* logoPath: https://example.com/logo.jpg
* backgroundColor: '#000000'
* bodyScanning:
* inspectionMode: deep
* antivirus:
* enabledDownloadPhase: true
* enabledUploadPhase: false
* failClosed: true
* notificationSettings:
* enabled: true
* message: you are blocked
* supportUrl: https://example.com/blocked
* fips:
* tls: true
* proxy:
* tcp: true
* udp: true
* rootCa: true
* virtualIp: false
* disableForTime: 3600
* urlBrowserIsolationEnabled: true
* logging:
* redactPii: true
* settingsByRuleType:
* dns:
* logAll: false
* logBlocks: true
* http:
* logAll: true
* logBlocks: true
* l4:
* logAll: false
* logBlocks: true
* extendedEmailMatching:
* enabled: true
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/teamsAccount:TeamsAccount example
* ```
*/
public class TeamsAccount internal constructor(
override val javaResource: com.pulumi.cloudflare.TeamsAccount,
) : KotlinCustomResource(javaResource, TeamsAccountMapper) {
/**
* The account identifier to target for the resource.
*/
public val accountId: Output
get() = javaResource.accountId().applyValue({ args0 -> args0 })
/**
* Whether to enable the activity log.
*/
public val activityLogEnabled: Output?
get() = javaResource.activityLogEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration block for antivirus traffic scanning.
*/
public val antivirus: Output?
get() = javaResource.antivirus().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountAntivirusToKotlin(args0)
})
}).orElse(null)
})
/**
* Configuration for a custom block page.
*/
public val blockPage: Output?
get() = javaResource.blockPage().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountBlockPageToKotlin(args0)
})
}).orElse(null)
})
/**
* Configuration for body scanning.
*/
public val bodyScanning: Output?
get() = javaResource.bodyScanning().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountBodyScanningToKotlin(args0)
})
}).orElse(null)
})
/**
* Configuration for TLS interception certificate. This will be required starting Feb 2025.
*/
public val certificate: Output?
get() = javaResource.certificate().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountCertificateToKotlin(args0)
})
}).orElse(null)
})
/**
* Configuration for custom certificates / BYO-PKI. Conflicts with `certificate`.
*/
@Deprecated(
message = """
Use `certificate` instead. Continuing to use custom_certificate may result in inconsistent
configuration.
""",
)
public val customCertificate: Output?
get() = javaResource.customCertificate().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> teamsAccountCustomCertificateToKotlin(args0) })
}).orElse(null)
})
/**
* Configuration for extended e-mail matching.
*/
public val extendedEmailMatching: Output
get() = javaResource.extendedEmailMatching().applyValue({ args0 ->
args0.let({ args0 ->
teamsAccountExtendedEmailMatchingToKotlin(args0)
})
})
/**
* Configure compliance with Federal Information Processing Standards.
*/
public val fips: Output?
get() = javaResource.fips().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountFipsToKotlin(args0)
})
}).orElse(null)
})
public val logging: Output?
get() = javaResource.logging().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountLoggingToKotlin(args0)
})
}).orElse(null)
})
/**
* Enable non-identity onramp for Browser Isolation. Defaults to `false`.
*/
public val nonIdentityBrowserIsolationEnabled: Output?
get() = javaResource.nonIdentityBrowserIsolationEnabled().applyValue({ args0 ->
args0.map({ args0 -> args0 }).orElse(null)
})
/**
* Configuration for DLP Payload Logging.
*/
public val payloadLog: Output?
get() = javaResource.payloadLog().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountPayloadLogToKotlin(args0)
})
}).orElse(null)
})
/**
* Indicator that protocol detection is enabled.
*/
public val protocolDetectionEnabled: Output?
get() = javaResource.protocolDetectionEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Configuration block for specifying which protocols are proxied.
*/
public val proxy: Output?
get() = javaResource.proxy().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
teamsAccountProxyToKotlin(args0)
})
}).orElse(null)
})
/**
* Configuration for SSH Session Logging.
*/
public val sshSessionLog: Output?
get() = javaResource.sshSessionLog().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> teamsAccountSshSessionLogToKotlin(args0) })
}).orElse(null)
})
/**
* Indicator that decryption of TLS traffic is enabled.
*/
public val tlsDecryptEnabled: Output?
get() = javaResource.tlsDecryptEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Safely browse websites in Browser Isolation through a URL. Defaults to `false`.
*/
public val urlBrowserIsolationEnabled: Output?
get() = javaResource.urlBrowserIsolationEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object TeamsAccountMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.cloudflare.TeamsAccount::class == javaResource::class
override fun map(javaResource: Resource): TeamsAccount = TeamsAccount(
javaResource as
com.pulumi.cloudflare.TeamsAccount,
)
}
/**
* @see [TeamsAccount].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [TeamsAccount].
*/
public suspend fun teamsAccount(
name: String,
block: suspend TeamsAccountResourceBuilder.() -> Unit,
): TeamsAccount {
val builder = TeamsAccountResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [TeamsAccount].
* @param name The _unique_ name of the resulting resource.
*/
public fun teamsAccount(name: String): TeamsAccount {
val builder = TeamsAccountResourceBuilder()
builder.name(name)
return builder.build()
}