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

com.pulumi.cloudflare.kotlin.AccountArgs.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.47.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.AccountArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Provides a Cloudflare Account resource. Account is the basic resource for
 * working with Cloudflare zones, teams and users.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.Account("example", {
 *     name: "some-enterprise-account",
 *     type: "enterprise",
 *     enforceTwofactor: true,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.Account("example",
 *     name="some-enterprise-account",
 *     type="enterprise",
 *     enforce_twofactor=True)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.Account("example", new()
 *     {
 *         Name = "some-enterprise-account",
 *         Type = "enterprise",
 *         EnforceTwofactor = 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.NewAccount(ctx, "example", &cloudflare.AccountArgs{
 * 			Name:             pulumi.String("some-enterprise-account"),
 * 			Type:             pulumi.String("enterprise"),
 * 			EnforceTwofactor: 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.Account;
 * import com.pulumi.cloudflare.AccountArgs;
 * 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 Account("example", AccountArgs.builder()
 *             .name("some-enterprise-account")
 *             .type("enterprise")
 *             .enforceTwofactor(true)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:Account
 *     properties:
 *       name: some-enterprise-account
 *       type: enterprise
 *       enforceTwofactor: true
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/account:Account example 
 * ```
 * @property enforceTwofactor Whether 2FA is enforced on the account. Defaults to `false`.
 * @property name The name of the account that is displayed in the Cloudflare dashboard.
 * @property type Account type. Available values: `enterprise`, `standard`. Defaults to `standard`. **Modifying this attribute will force creation of a new resource.**
 */
public data class AccountArgs(
    public val enforceTwofactor: Output? = null,
    public val name: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.AccountArgs =
        com.pulumi.cloudflare.AccountArgs.builder()
            .enforceTwofactor(enforceTwofactor?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AccountArgs].
 */
@PulumiTagMarker
public class AccountArgsBuilder internal constructor() {
    private var enforceTwofactor: Output? = null

    private var name: Output? = null

    private var type: Output? = null

    /**
     * @param value Whether 2FA is enforced on the account. Defaults to `false`.
     */
    @JvmName("swebxxepmcltbnoe")
    public suspend fun enforceTwofactor(`value`: Output) {
        this.enforceTwofactor = value
    }

    /**
     * @param value The name of the account that is displayed in the Cloudflare dashboard.
     */
    @JvmName("dmjeamvwdsrlcbua")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Account type. Available values: `enterprise`, `standard`. Defaults to `standard`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("kdrtaadmhqloucwp")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Whether 2FA is enforced on the account. Defaults to `false`.
     */
    @JvmName("dehlusfyiyocpwbm")
    public suspend fun enforceTwofactor(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enforceTwofactor = mapped
    }

    /**
     * @param value The name of the account that is displayed in the Cloudflare dashboard.
     */
    @JvmName("hsonaxgygwpkvbqg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Account type. Available values: `enterprise`, `standard`. Defaults to `standard`. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("tytmbqpaheayuqkg")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): AccountArgs = AccountArgs(
        enforceTwofactor = enforceTwofactor,
        name = name,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy