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

com.pulumi.cloudflare.kotlin.ZoneHoldArgs.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.ZoneHoldArgs.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 Zone Hold resource that prevents adding
 * the hostname to another account for use.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.ZoneHold("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     hold: true,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.ZoneHold("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     hold=True)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.ZoneHold("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Hold = 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.NewZoneHold(ctx, "example", &cloudflare.ZoneHoldArgs{
 * 			ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Hold:   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.ZoneHold;
 * import com.pulumi.cloudflare.ZoneHoldArgs;
 * 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 ZoneHold("example", ZoneHoldArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .hold(true)
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:ZoneHold
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       hold: true
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/zoneHold:ZoneHold example 
 * ```
 * @property hold Enablement status of the zone hold.
 * @property holdAfter The RFC3339 compatible timestamp when to automatically re-enable the zone hold.
 * @property includeSubdomains Whether to extend to block any subdomain of the given zone.
 * @property zoneId The zone identifier to target for the resource.
 */
public data class ZoneHoldArgs(
    public val hold: Output? = null,
    public val holdAfter: Output? = null,
    public val includeSubdomains: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.ZoneHoldArgs =
        com.pulumi.cloudflare.ZoneHoldArgs.builder()
            .hold(hold?.applyValue({ args0 -> args0 }))
            .holdAfter(holdAfter?.applyValue({ args0 -> args0 }))
            .includeSubdomains(includeSubdomains?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ZoneHoldArgs].
 */
@PulumiTagMarker
public class ZoneHoldArgsBuilder internal constructor() {
    private var hold: Output? = null

    private var holdAfter: Output? = null

    private var includeSubdomains: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value Enablement status of the zone hold.
     */
    @JvmName("pyjpexayyehvbayo")
    public suspend fun hold(`value`: Output) {
        this.hold = value
    }

    /**
     * @param value The RFC3339 compatible timestamp when to automatically re-enable the zone hold.
     */
    @JvmName("vaadpwxypxnyamop")
    public suspend fun holdAfter(`value`: Output) {
        this.holdAfter = value
    }

    /**
     * @param value Whether to extend to block any subdomain of the given zone.
     */
    @JvmName("brekveiwmadvrdhd")
    public suspend fun includeSubdomains(`value`: Output) {
        this.includeSubdomains = value
    }

    /**
     * @param value The zone identifier to target for the resource.
     */
    @JvmName("frnrhikxnmouiknn")
    public suspend fun zoneId(`value`: Output) {
        this.zoneId = value
    }

    /**
     * @param value Enablement status of the zone hold.
     */
    @JvmName("feeqcneythefojgw")
    public suspend fun hold(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hold = mapped
    }

    /**
     * @param value The RFC3339 compatible timestamp when to automatically re-enable the zone hold.
     */
    @JvmName("jvhxuifreibbydhk")
    public suspend fun holdAfter(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.holdAfter = mapped
    }

    /**
     * @param value Whether to extend to block any subdomain of the given zone.
     */
    @JvmName("oyahaxvmfbnveymc")
    public suspend fun includeSubdomains(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.includeSubdomains = mapped
    }

    /**
     * @param value The zone identifier to target for the resource.
     */
    @JvmName("adhhvjovsjpholnf")
    public suspend fun zoneId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zoneId = mapped
    }

    internal fun build(): ZoneHoldArgs = ZoneHoldArgs(
        hold = hold,
        holdAfter = holdAfter,
        includeSubdomains = includeSubdomains,
        zoneId = zoneId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy