com.pulumi.cloudflare.kotlin.ZoneArgs.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.ZoneArgs.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.collections.List
import kotlin.jvm.JvmName
/**
* Provides a Cloudflare Zone resource. Zone is the basic resource for
* working with Cloudflare and is roughly equivalent to a domain name
* that the user purchases.
* > If you are attempting to sign up a subdomain of a zone you must first have Subdomain Support entitlement for your account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.Zone("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* zone: "example.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.Zone("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* zone="example.com")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.Zone("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* ZoneName = "example.com",
* });
* });
* ```
* ```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.NewZone(ctx, "example", &cloudflare.ZoneArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* Zone: pulumi.String("example.com"),
* })
* 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.Zone;
* import com.pulumi.cloudflare.ZoneArgs;
* 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 Zone("example", ZoneArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .zone("example.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:Zone
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* zone: example.com
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/zone:Zone example
* ```
* @property accountId Account ID to manage the zone resource in.
* @property jumpStart Whether to scan for DNS records on creation. Ignored after zone is created.
* @property paused Whether this zone is paused (traffic bypasses Cloudflare). Defaults to `false`.
* @property plan The name of the commercial plan to apply to the zone. Available values: `free`, `lite`, `pro`, `pro_plus`, `business`, `enterprise`, `partners_free`, `partners_pro`, `partners_business`, `partners_enterprise`.
* @property type A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: `full`, `partial`, `secondary`. Defaults to `full`.
* @property vanityNameServers List of Vanity Nameservers (if set).
* @property zone The DNS zone name which will be added. **Modifying this attribute will force creation of a new resource.**
*/
public data class ZoneArgs(
public val accountId: Output? = null,
public val jumpStart: Output? = null,
public val paused: Output? = null,
public val plan: Output? = null,
public val type: Output? = null,
public val vanityNameServers: Output>? = null,
public val zone: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.ZoneArgs = com.pulumi.cloudflare.ZoneArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.jumpStart(jumpStart?.applyValue({ args0 -> args0 }))
.paused(paused?.applyValue({ args0 -> args0 }))
.plan(plan?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 }))
.vanityNameServers(vanityNameServers?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.zone(zone?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ZoneArgs].
*/
@PulumiTagMarker
public class ZoneArgsBuilder internal constructor() {
private var accountId: Output? = null
private var jumpStart: Output? = null
private var paused: Output? = null
private var plan: Output? = null
private var type: Output? = null
private var vanityNameServers: Output>? = null
private var zone: Output? = null
/**
* @param value Account ID to manage the zone resource in.
*/
@JvmName("ludxotcrqmajblew")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Whether to scan for DNS records on creation. Ignored after zone is created.
*/
@JvmName("rpcsiifldmqyagre")
public suspend fun jumpStart(`value`: Output) {
this.jumpStart = value
}
/**
* @param value Whether this zone is paused (traffic bypasses Cloudflare). Defaults to `false`.
*/
@JvmName("slcjhlxamnyaxbba")
public suspend fun paused(`value`: Output) {
this.paused = value
}
/**
* @param value The name of the commercial plan to apply to the zone. Available values: `free`, `lite`, `pro`, `pro_plus`, `business`, `enterprise`, `partners_free`, `partners_pro`, `partners_business`, `partners_enterprise`.
*/
@JvmName("eqlfcawdevjdgwxu")
public suspend fun plan(`value`: Output) {
this.plan = value
}
/**
* @param value A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. Available values: `full`, `partial`, `secondary`. Defaults to `full`.
*/
@JvmName("qfdkhvuulwqiblyf")
public suspend fun type(`value`: Output) {
this.type = value
}
/**
* @param value List of Vanity Nameservers (if set).
*/
@JvmName("ygfumirkwkkfprdu")
public suspend fun vanityNameServers(`value`: Output>) {
this.vanityNameServers = value
}
@JvmName("rsontqiiwnrnymbl")
public suspend fun vanityNameServers(vararg values: Output) {
this.vanityNameServers = Output.all(values.asList())
}
/**
* @param values List of Vanity Nameservers (if set).
*/
@JvmName("utmtpyhtopniyjkw")
public suspend fun vanityNameServers(values: List