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

com.pulumi.cloudflare.kotlin.MagicWanStaticRouteArgs.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.MagicWanStaticRouteArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Provides a resource, that manages Cloudflare static routes for Magic
 * Transit or Magic WAN. Static routes are used to route traffic
 * through GRE tunnels.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as cloudflare from "@pulumi/cloudflare";
 * const example = new cloudflare.MagicWanStaticRoute("example", {
 *     accountId: "f037e56e89293a057740de681ac9abbe",
 *     description: "New route for new prefix 192.0.2.0/24",
 *     prefix: "192.0.2.0/24",
 *     nexthop: "10.0.0.0",
 *     priority: 100,
 *     weight: 10,
 *     coloNames: ["den01"],
 *     coloRegions: ["APAC"],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_cloudflare as cloudflare
 * example = cloudflare.MagicWanStaticRoute("example",
 *     account_id="f037e56e89293a057740de681ac9abbe",
 *     description="New route for new prefix 192.0.2.0/24",
 *     prefix="192.0.2.0/24",
 *     nexthop="10.0.0.0",
 *     priority=100,
 *     weight=10,
 *     colo_names=["den01"],
 *     colo_regions=["APAC"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Cloudflare = Pulumi.Cloudflare;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Cloudflare.MagicWanStaticRoute("example", new()
 *     {
 *         AccountId = "f037e56e89293a057740de681ac9abbe",
 *         Description = "New route for new prefix 192.0.2.0/24",
 *         Prefix = "192.0.2.0/24",
 *         Nexthop = "10.0.0.0",
 *         Priority = 100,
 *         Weight = 10,
 *         ColoNames = new[]
 *         {
 *             "den01",
 *         },
 *         ColoRegions = new[]
 *         {
 *             "APAC",
 *         },
 *     });
 * });
 * ```
 * ```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.NewMagicWanStaticRoute(ctx, "example", &cloudflare.MagicWanStaticRouteArgs{
 * 			AccountId:   pulumi.String("f037e56e89293a057740de681ac9abbe"),
 * 			Description: pulumi.String("New route for new prefix 192.0.2.0/24"),
 * 			Prefix:      pulumi.String("192.0.2.0/24"),
 * 			Nexthop:     pulumi.String("10.0.0.0"),
 * 			Priority:    pulumi.Int(100),
 * 			Weight:      pulumi.Int(10),
 * 			ColoNames: pulumi.StringArray{
 * 				pulumi.String("den01"),
 * 			},
 * 			ColoRegions: pulumi.StringArray{
 * 				pulumi.String("APAC"),
 * 			},
 * 		})
 * 		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.MagicWanStaticRoute;
 * import com.pulumi.cloudflare.MagicWanStaticRouteArgs;
 * 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 MagicWanStaticRoute("example", MagicWanStaticRouteArgs.builder()
 *             .accountId("f037e56e89293a057740de681ac9abbe")
 *             .description("New route for new prefix 192.0.2.0/24")
 *             .prefix("192.0.2.0/24")
 *             .nexthop("10.0.0.0")
 *             .priority(100)
 *             .weight(10)
 *             .coloNames("den01")
 *             .coloRegions("APAC")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: cloudflare:MagicWanStaticRoute
 *     properties:
 *       accountId: f037e56e89293a057740de681ac9abbe
 *       description: New route for new prefix 192.0.2.0/24
 *       prefix: 192.0.2.0/24
 *       nexthop: 10.0.0.0
 *       priority: 100
 *       weight: 10
 *       coloNames:
 *         - den01
 *       coloRegions:
 *         - APAC
 * ```
 * 
 * ## Import
 * ```sh
 * $ pulumi import cloudflare:index/magicWanStaticRoute:MagicWanStaticRoute example /
 * ```
 * @property accountId The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
 * @property coloNames List of Cloudflare colocation regions for this static route.
 * @property coloRegions List of Cloudflare colocation names for this static route.
 * @property description Description of the static route.
 * @property nexthop The nexthop IP address where traffic will be routed to.
 * @property prefix Your network prefix using CIDR notation.
 * @property priority The priority for the static route.
 * @property weight The optional weight for ECMP routes. **Modifying this attribute will force creation of a new resource.**
 */
public data class MagicWanStaticRouteArgs(
    public val accountId: Output? = null,
    public val coloNames: Output>? = null,
    public val coloRegions: Output>? = null,
    public val description: Output? = null,
    public val nexthop: Output? = null,
    public val prefix: Output? = null,
    public val priority: Output? = null,
    public val weight: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.cloudflare.MagicWanStaticRouteArgs =
        com.pulumi.cloudflare.MagicWanStaticRouteArgs.builder()
            .accountId(accountId?.applyValue({ args0 -> args0 }))
            .coloNames(coloNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .coloRegions(coloRegions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .nexthop(nexthop?.applyValue({ args0 -> args0 }))
            .prefix(prefix?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .weight(weight?.applyValue({ args0 -> args0 })).build()
}

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

    private var coloNames: Output>? = null

    private var coloRegions: Output>? = null

    private var description: Output? = null

    private var nexthop: Output? = null

    private var prefix: Output? = null

    private var priority: Output? = null

    private var weight: Output? = null

    /**
     * @param value The account identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("rtsoqkirnotyfxlv")
    public suspend fun accountId(`value`: Output) {
        this.accountId = value
    }

    /**
     * @param value List of Cloudflare colocation regions for this static route.
     */
    @JvmName("qwukqjyoqeuuiyrj")
    public suspend fun coloNames(`value`: Output>) {
        this.coloNames = value
    }

    @JvmName("gqheohejdenkkihs")
    public suspend fun coloNames(vararg values: Output) {
        this.coloNames = Output.all(values.asList())
    }

    /**
     * @param values List of Cloudflare colocation regions for this static route.
     */
    @JvmName("gbprmbijxnmpelri")
    public suspend fun coloNames(values: List>) {
        this.coloNames = Output.all(values)
    }

    /**
     * @param value List of Cloudflare colocation names for this static route.
     */
    @JvmName("gpjqpstaqtkoslsx")
    public suspend fun coloRegions(`value`: Output>) {
        this.coloRegions = value
    }

    @JvmName("mipedjhpbvurvtle")
    public suspend fun coloRegions(vararg values: Output) {
        this.coloRegions = Output.all(values.asList())
    }

    /**
     * @param values List of Cloudflare colocation names for this static route.
     */
    @JvmName("dshmtbhnykmdbydc")
    public suspend fun coloRegions(values: List>) {
        this.coloRegions = Output.all(values)
    }

    /**
     * @param value Description of the static route.
     */
    @JvmName("ihegddqamequmpda")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The nexthop IP address where traffic will be routed to.
     */
    @JvmName("lfsyvlonvoqtuqlj")
    public suspend fun nexthop(`value`: Output) {
        this.nexthop = value
    }

    /**
     * @param value Your network prefix using CIDR notation.
     */
    @JvmName("hkehsgbmnudoopiy")
    public suspend fun prefix(`value`: Output) {
        this.prefix = value
    }

    /**
     * @param value The priority for the static route.
     */
    @JvmName("qqwjyhjqexhpqfgk")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value The optional weight for ECMP routes. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("lcmoovinvowykqmx")
    public suspend fun weight(`value`: Output) {
        this.weight = value
    }

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

    /**
     * @param value List of Cloudflare colocation regions for this static route.
     */
    @JvmName("xwhjatgqktcplmdy")
    public suspend fun coloNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coloNames = mapped
    }

    /**
     * @param values List of Cloudflare colocation regions for this static route.
     */
    @JvmName("eiwjwtqcnaeomcon")
    public suspend fun coloNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.coloNames = mapped
    }

    /**
     * @param value List of Cloudflare colocation names for this static route.
     */
    @JvmName("vmabvprqdumhggfc")
    public suspend fun coloRegions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coloRegions = mapped
    }

    /**
     * @param values List of Cloudflare colocation names for this static route.
     */
    @JvmName("rmykcmydxsowrhcd")
    public suspend fun coloRegions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.coloRegions = mapped
    }

    /**
     * @param value Description of the static route.
     */
    @JvmName("mhrkngddieybfoyi")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The nexthop IP address where traffic will be routed to.
     */
    @JvmName("mjcnvpnuambxexyt")
    public suspend fun nexthop(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nexthop = mapped
    }

    /**
     * @param value Your network prefix using CIDR notation.
     */
    @JvmName("ebksolnobwtuswul")
    public suspend fun prefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefix = mapped
    }

    /**
     * @param value The priority for the static route.
     */
    @JvmName("lqwbxhjlfwfvocrd")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value The optional weight for ECMP routes. **Modifying this attribute will force creation of a new resource.**
     */
    @JvmName("wwnimxlkiyxhjqmh")
    public suspend fun weight(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weight = mapped
    }

    internal fun build(): MagicWanStaticRouteArgs = MagicWanStaticRouteArgs(
        accountId = accountId,
        coloNames = coloNames,
        coloRegions = coloRegions,
        description = description,
        nexthop = nexthop,
        prefix = prefix,
        priority = priority,
        weight = weight,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy