com.pulumi.cloudflare.kotlin.ByoIpPrefixArgs.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.ByoIpPrefixArgs.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 the ability to manage Bring-Your-Own-IP prefixes (BYOIP)
* which are used with or without Magic Transit.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.ByoIpPrefix("example", {
* accountId: "f037e56e89293a057740de681ac9abbe",
* prefixId: "d41d8cd98f00b204e9800998ecf8427e",
* description: "Example IP Prefix",
* advertisement: "on",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.ByoIpPrefix("example",
* account_id="f037e56e89293a057740de681ac9abbe",
* prefix_id="d41d8cd98f00b204e9800998ecf8427e",
* description="Example IP Prefix",
* advertisement="on")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.ByoIpPrefix("example", new()
* {
* AccountId = "f037e56e89293a057740de681ac9abbe",
* PrefixId = "d41d8cd98f00b204e9800998ecf8427e",
* Description = "Example IP Prefix",
* Advertisement = "on",
* });
* });
* ```
* ```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.NewByoIpPrefix(ctx, "example", &cloudflare.ByoIpPrefixArgs{
* AccountId: pulumi.String("f037e56e89293a057740de681ac9abbe"),
* PrefixId: pulumi.String("d41d8cd98f00b204e9800998ecf8427e"),
* Description: pulumi.String("Example IP Prefix"),
* Advertisement: pulumi.String("on"),
* })
* 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.ByoIpPrefix;
* import com.pulumi.cloudflare.ByoIpPrefixArgs;
* 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 ByoIpPrefix("example", ByoIpPrefixArgs.builder()
* .accountId("f037e56e89293a057740de681ac9abbe")
* .prefixId("d41d8cd98f00b204e9800998ecf8427e")
* .description("Example IP Prefix")
* .advertisement("on")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:ByoIpPrefix
* properties:
* accountId: f037e56e89293a057740de681ac9abbe
* prefixId: d41d8cd98f00b204e9800998ecf8427e
* description: Example IP Prefix
* advertisement: on
* ```
*
* ## Import
* ```sh
* $ pulumi import cloudflare:index/byoIpPrefix:ByoIpPrefix example /
* ```
* @property accountId The account identifier to target for the resource.
* @property advertisement Whether or not the prefix shall be announced. A prefix can be activated or deactivated once every 15 minutes (attempting more regular updates will trigger rate limiting). Available values: `on`, `off`.
* @property description Description of the BYO IP prefix.
* @property prefixId The assigned Bring-Your-Own-IP prefix ID. **Modifying this attribute will force creation of a new resource.**
*/
public data class ByoIpPrefixArgs(
public val accountId: Output? = null,
public val advertisement: Output? = null,
public val description: Output? = null,
public val prefixId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.ByoIpPrefixArgs =
com.pulumi.cloudflare.ByoIpPrefixArgs.builder()
.accountId(accountId?.applyValue({ args0 -> args0 }))
.advertisement(advertisement?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.prefixId(prefixId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ByoIpPrefixArgs].
*/
@PulumiTagMarker
public class ByoIpPrefixArgsBuilder internal constructor() {
private var accountId: Output? = null
private var advertisement: Output? = null
private var description: Output? = null
private var prefixId: Output? = null
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("jkirubloeecyqiek")
public suspend fun accountId(`value`: Output) {
this.accountId = value
}
/**
* @param value Whether or not the prefix shall be announced. A prefix can be activated or deactivated once every 15 minutes (attempting more regular updates will trigger rate limiting). Available values: `on`, `off`.
*/
@JvmName("ancixoguvsgemavr")
public suspend fun advertisement(`value`: Output) {
this.advertisement = value
}
/**
* @param value Description of the BYO IP prefix.
*/
@JvmName("ktsayqnoucooxsmq")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The assigned Bring-Your-Own-IP prefix ID. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("npwjykljiscgjeqc")
public suspend fun prefixId(`value`: Output) {
this.prefixId = value
}
/**
* @param value The account identifier to target for the resource.
*/
@JvmName("urgbwgqutejwpwyp")
public suspend fun accountId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.accountId = mapped
}
/**
* @param value Whether or not the prefix shall be announced. A prefix can be activated or deactivated once every 15 minutes (attempting more regular updates will trigger rate limiting). Available values: `on`, `off`.
*/
@JvmName("vjbnnidhvvskbbyd")
public suspend fun advertisement(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.advertisement = mapped
}
/**
* @param value Description of the BYO IP prefix.
*/
@JvmName("lgahpbbvtoscngsd")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value The assigned Bring-Your-Own-IP prefix ID. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("tiwthykaqpogmtfy")
public suspend fun prefixId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.prefixId = mapped
}
internal fun build(): ByoIpPrefixArgs = ByoIpPrefixArgs(
accountId = accountId,
advertisement = advertisement,
description = description,
prefixId = prefixId,
)
}