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

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

package com.pulumi.cloudflare.kotlin

import com.pulumi.cloudflare.HyperdriveConfigArgs.builder
import com.pulumi.cloudflare.kotlin.inputs.HyperdriveConfigCachingArgs
import com.pulumi.cloudflare.kotlin.inputs.HyperdriveConfigCachingArgsBuilder
import com.pulumi.cloudflare.kotlin.inputs.HyperdriveConfigOriginArgs
import com.pulumi.cloudflare.kotlin.inputs.HyperdriveConfigOriginArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * The [Hyperdrive Config](https://developers.cloudflare.com/hyperdrive/) resource allows you to manage Cloudflare Hyperdrive Configs.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const noDefaults = new cloudflare.HyperdriveConfig("no_defaults", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     name: "my-hyperdrive-config",
 *     origin: {
 *         database: "postgres",
 *         password: "my-password",
 *         host: "my-database.example.com",
 *         port: 5432,
 *         scheme: "postgres",
 *         user: "my-user",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * no_defaults = cloudflare.HyperdriveConfig("no_defaults",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     name="my-hyperdrive-config",
 *     origin={
 *         "database": "postgres",
 *         "password": "my-password",
 *         "host": "my-database.example.com",
 *         "port": 5432,
 *         "scheme": "postgres",
 *         "user": "my-user",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var noDefaults = new Cloudflare.HyperdriveConfig("no_defaults", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Name = "my-hyperdrive-config",
 *         Origin = new Cloudflare.Inputs.HyperdriveConfigOriginArgs
 *         {
 *             Database = "postgres",
 *             Password = "my-password",
 *             Host = "my-database.example.com",
 *             Port = 5432,
 *             Scheme = "postgres",
 *             User = "my-user",
 *         },
 *     });
 * });
 * ```
 * ```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.NewHyperdriveConfig(ctx, "no_defaults", &cloudflare.HyperdriveConfigArgs{
 * 			AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Name:      pulumi.String("my-hyperdrive-config"),
 * 			Origin: &cloudflare.HyperdriveConfigOriginArgs{
 * 				Database: pulumi.String("postgres"),
 * 				Password: pulumi.String("my-password"),
 * 				Host:     pulumi.String("my-database.example.com"),
 * 				Port:     pulumi.Int(5432),
 * 				Scheme:   pulumi.String("postgres"),
 * 				User:     pulumi.String("my-user"),
 * 			},
 * 		})
 * 		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.HyperdriveConfig;
 * import com.pulumi.cloudflare.HyperdriveConfigArgs;
 * import com.pulumi.cloudflare.inputs.HyperdriveConfigOriginArgs;
 * 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 noDefaults = new HyperdriveConfig("noDefaults", HyperdriveConfigArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .name("my-hyperdrive-config")
 *             .origin(HyperdriveConfigOriginArgs.builder()
 *                 .database("postgres")
 *                 .password("my-password")
 *                 .host("my-database.example.com")
 *                 .port(5432)
 *                 .scheme("postgres")
 *                 .user("my-user")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   noDefaults:
 *     type: cloudflare:HyperdriveConfig
 *     name: no_defaults
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       name: my-hyperdrive-config
 *       origin:
 *         database: postgres
 *         password: my-password
 *         host: my-database.example.com
 *         port: 5432
 *         scheme: postgres
 *         user: my-user
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/hyperdriveConfig:HyperdriveConfig example /
 * ```
 * @property accountId The account identifier to target for the resource.
 * @property caching The caching details for the Hyperdrive configuration.
 * @property name The name of the Hyperdrive configuration.
 * @property origin The origin details for the Hyperdrive configuration.
 */
public data class HyperdriveConfigArgs(
    public val accountId: Output? = null,
    public val caching: Output? = null,
    public val name: Output? = null,
    public val origin: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.HyperdriveConfigArgs =
        com.pulumi.cloudflare.HyperdriveConfigArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .caching(caching?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .origin(origin?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [HyperdriveConfigArgs].
 */
@PulumiTagMarker
public class HyperdriveConfigArgsBuilder internal constructor() {
    private var accountId: Output? = null

    private var caching: Output? = null

    private var name: Output? = null

    private var origin: Output? = null

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

    /**
     * @param value The caching details for the Hyperdrive configuration.
     */
    @JvmName("tgrsqlbqvxymyluu")
    public suspend fun caching(`value`: Output) {
        this.caching = value
    }

    /**
     * @param value The name of the Hyperdrive configuration.
     */
    @JvmName("kwlpuxvenwumxrnl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The origin details for the Hyperdrive configuration.
     */
    @JvmName("ksmgbmxticpaogry")
    public suspend fun origin(`value`: Output) {
        this.origin = value
    }

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

    /**
     * @param value The caching details for the Hyperdrive configuration.
     */
    @JvmName("skjxtnjnkyhymabv")
    public suspend fun caching(`value`: HyperdriveConfigCachingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.caching = mapped
    }

    /**
     * @param argument The caching details for the Hyperdrive configuration.
     */
    @JvmName("tgjgvqjtsrbpyxla")
    public suspend fun caching(argument: suspend HyperdriveConfigCachingArgsBuilder.() -> Unit) {
        val toBeMapped = HyperdriveConfigCachingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.caching = mapped
    }

    /**
     * @param value The name of the Hyperdrive configuration.
     */
    @JvmName("vgxlyelbdalvqjia")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The origin details for the Hyperdrive configuration.
     */
    @JvmName("ncgqbfapscinjgjx")
    public suspend fun origin(`value`: HyperdriveConfigOriginArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.origin = mapped
    }

    /**
     * @param argument The origin details for the Hyperdrive configuration.
     */
    @JvmName("wmtaolqdderxhdnh")
    public suspend fun origin(argument: suspend HyperdriveConfigOriginArgsBuilder.() -> Unit) {
        val toBeMapped = HyperdriveConfigOriginArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.origin = mapped
    }

    internal fun build(): HyperdriveConfigArgs = HyperdriveConfigArgs(
        accountId = accountId,
        caching = caching,
        name = name,
        origin = origin,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy