com.pulumi.aws.lightsail.kotlin.StaticIpArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.lightsail.kotlin
import com.pulumi.aws.lightsail.StaticIpArgs.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
/**
* Allocates a static IP address.
* > **Note:** Lightsail is currently only supported in a limited number of AWS Regions, please see ["Regions and Availability Zones in Amazon Lightsail"](https://lightsail.aws.amazon.com/ls/docs/overview/article/understanding-regions-and-availability-zones-in-amazon-lightsail) for more details
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.lightsail.StaticIp("test", {name: "example"});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.lightsail.StaticIp("test", name="example")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.LightSail.StaticIp("test", new()
* {
* Name = "example",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lightsail"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := lightsail.NewStaticIp(ctx, "test", &lightsail.StaticIpArgs{
* Name: pulumi.String("example"),
* })
* 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.aws.lightsail.StaticIp;
* import com.pulumi.aws.lightsail.StaticIpArgs;
* 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 test = new StaticIp("test", StaticIpArgs.builder()
* .name("example")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:lightsail:StaticIp
* properties:
* name: example
* ```
*
* @property name The name for the allocated static IP
*/
public data class StaticIpArgs(
public val name: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.lightsail.StaticIpArgs =
com.pulumi.aws.lightsail.StaticIpArgs.builder()
.name(name?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [StaticIpArgs].
*/
@PulumiTagMarker
public class StaticIpArgsBuilder internal constructor() {
private var name: Output? = null
/**
* @param value The name for the allocated static IP
*/
@JvmName("inlitnjvxrisotdy")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The name for the allocated static IP
*/
@JvmName("riuebhclhsqjmueb")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
internal fun build(): StaticIpArgs = StaticIpArgs(
name = name,
)
}