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

com.pulumi.cloudflare.kotlin.RegionalHostnameArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.cloudflare.kotlin

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

/**
 * Provides a Data Localization Suite Regional Hostname.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * // Regionalized hostname record resources are managed independently from the
 * // Regionalized Hostname resources.
 * const example = new cloudflare.Record("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     name: "example.com",
 *     content: "192.0.2.1",
 *     type: "A",
 *     ttl: 3600,
 * });
 * // The cloudflare_regional_hostname resource may exist with or without its
 * // corresponding record resource.
 * const exampleRegionalHostname = new cloudflare.RegionalHostname("example", {
 *     zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
 *     hostname: "example.com",
 *     regionKey: "eu",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * # Regionalized hostname record resources are managed independently from the
 * # Regionalized Hostname resources.
 * example = cloudflare.Record("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     name="example.com",
 *     content="192.0.2.1",
 *     type="A",
 *     ttl=3600)
 * # The cloudflare_regional_hostname resource may exist with or without its
 * # corresponding record resource.
 * example_regional_hostname = cloudflare.RegionalHostname("example",
 *     zone_id="0da42c8d2132a9ddaf714f9e7c920711",
 *     hostname="example.com",
 *     region_key="eu")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     // Regionalized hostname record resources are managed independently from the
 *     // Regionalized Hostname resources.
 *     var example = new Cloudflare.Record("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Name = "example.com",
 *         Content = "192.0.2.1",
 *         Type = "A",
 *         Ttl = 3600,
 *     });
 *     // The cloudflare_regional_hostname resource may exist with or without its
 *     // corresponding record resource.
 *     var exampleRegionalHostname = new Cloudflare.RegionalHostname("example", new()
 *     {
 *         ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
 *         Hostname = "example.com",
 *         RegionKey = "eu",
 *     });
 * });
 * ```
 * ```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 {
 * 		// Regionalized hostname record resources are managed independently from the
 * 		// Regionalized Hostname resources.
 * 		_, err := cloudflare.NewRecord(ctx, "example", &cloudflare.RecordArgs{
 * 			ZoneId:  pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Name:    pulumi.String("example.com"),
 * 			Content: pulumi.String("192.0.2.1"),
 * 			Type:    pulumi.String("A"),
 * 			Ttl:     pulumi.Int(3600),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		// The cloudflare_regional_hostname resource may exist with or without its
 * 		// corresponding record resource.
 * 		_, err = cloudflare.NewRegionalHostname(ctx, "example", &cloudflare.RegionalHostnameArgs{
 * 			ZoneId:    pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
 * 			Hostname:  pulumi.String("example.com"),
 * 			RegionKey: pulumi.String("eu"),
 * 		})
 * 		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.Record;
 * import com.pulumi.cloudflare.RecordArgs;
 * import com.pulumi.cloudflare.RegionalHostname;
 * import com.pulumi.cloudflare.RegionalHostnameArgs;
 * 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) {
 *         // Regionalized hostname record resources are managed independently from the
 *         // Regionalized Hostname resources.
 *         var example = new Record("example", RecordArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .name("example.com")
 *             .content("192.0.2.1")
 *             .type("A")
 *             .ttl(3600)
 *             .build());
 *         // The cloudflare_regional_hostname resource may exist with or without its
 *         // corresponding record resource.
 *         var exampleRegionalHostname = new RegionalHostname("exampleRegionalHostname", RegionalHostnameArgs.builder()
 *             .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
 *             .hostname("example.com")
 *             .regionKey("eu")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   # Regionalized hostname record resources are managed independently from the
 *   # Regionalized Hostname resources.
 *   example:
 *     type: cloudflare:Record
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       name: example.com
 *       content: 192.0.2.1
 *       type: A
 *       ttl: 3600
 *   # The cloudflare_regional_hostname resource may exist with or without its
 *   # corresponding record resource.
 *   exampleRegionalHostname:
 *     type: cloudflare:RegionalHostname
 *     name: example
 *     properties:
 *       zoneId: 0da42c8d2132a9ddaf714f9e7c920711
 *       hostname: example.com
 *       regionKey: eu
 * ```
 * 
 * @property hostname The hostname to regionalize.
 * @property regionKey The region key. See [the full region list](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
 * @property zoneId The zone identifier to target for the resource.
 */
public data class RegionalHostnameArgs(
    public val hostname: Output? = null,
    public val regionKey: Output? = null,
    public val zoneId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.RegionalHostnameArgs =
        com.pulumi.cloudflare.RegionalHostnameArgs.builder()
            .hostname(hostname?.applyValue({ args0 -> args0 }))
            .regionKey(regionKey?.applyValue({ args0 -> args0 }))
            .zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [RegionalHostnameArgs].
 */
@PulumiTagMarker
public class RegionalHostnameArgsBuilder internal constructor() {
    private var hostname: Output? = null

    private var regionKey: Output? = null

    private var zoneId: Output? = null

    /**
     * @param value The hostname to regionalize.
     */
    @JvmName("gbhynjjxfbgjmiff")
    public suspend fun hostname(`value`: Output) {
        this.hostname = value
    }

    /**
     * @param value The region key. See [the full region list](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
     */
    @JvmName("nigqjdjwxiyfmwcm")
    public suspend fun regionKey(`value`: Output) {
        this.regionKey = value
    }

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

    /**
     * @param value The hostname to regionalize.
     */
    @JvmName("ctcrwtqqcworjwsy")
    public suspend fun hostname(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostname = mapped
    }

    /**
     * @param value The region key. See [the full region list](https://developers.cloudflare.com/data-localization/regional-services/get-started/).
     */
    @JvmName("rbuojksirhpepjtv")
    public suspend fun regionKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regionKey = mapped
    }

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

    internal fun build(): RegionalHostnameArgs = RegionalHostnameArgs(
        hostname = hostname,
        regionKey = regionKey,
        zoneId = zoneId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy