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

com.pulumi.alicloud.apigateway.kotlin.AppArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.apigateway.kotlin

import com.pulumi.alicloud.apigateway.AppArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ## Example Usage
 * Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as alicloud from "@pulumi/alicloud";
 * const example = new alicloud.apigateway.App("example", {
 *     name: "tf_example",
 *     description: "tf_example",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_alicloud as alicloud
 * example = alicloud.apigateway.App("example",
 *     name="tf_example",
 *     description="tf_example")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AliCloud = Pulumi.AliCloud;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new AliCloud.ApiGateway.App("example", new()
 *     {
 *         Name = "tf_example",
 *         Description = "tf_example",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apigateway"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apigateway.NewApp(ctx, "example", &apigateway.AppArgs{
 * 			Name:        pulumi.String("tf_example"),
 * 			Description: pulumi.String("tf_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.alicloud.apigateway.App;
 * import com.pulumi.alicloud.apigateway.AppArgs;
 * 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 App("example", AppArgs.builder()
 *             .name("tf_example")
 *             .description("tf_example")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: alicloud:apigateway:App
 *     properties:
 *       name: tf_example
 *       description: tf_example
 * ```
 * 
 * ## Import
 * Api gateway app can be imported using the id, e.g.
 * ```sh
 * $ pulumi import alicloud:apigateway/app:App example "7379660"
 * ```
 * @property description The description of the app. Defaults to null.
 * @property name The name of the app.
 * @property tags A mapping of tags to assign to the resource.
 */
public data class AppArgs(
    public val description: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.apigateway.AppArgs =
        com.pulumi.alicloud.apigateway.AppArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [AppArgs].
 */
@PulumiTagMarker
public class AppArgsBuilder internal constructor() {
    private var description: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The description of the app. Defaults to null.
     */
    @JvmName("ukcmiayvteelahtb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

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

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("tvjymtkktkionleo")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The description of the app. Defaults to null.
     */
    @JvmName("ybfkveclqjsqgsws")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

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

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("bygvsjqhuaiofyrs")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags to assign to the resource.
     */
    @JvmName("wkfyaxwxyymjliwo")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AppArgs = AppArgs(
        description = description,
        name = name,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy