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