com.pulumi.gcp.runtimeconfig.kotlin.ConfigArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-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.gcp.runtimeconfig.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.runtimeconfig.ConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* ## Example Usage
* Example creating a RuntimeConfig resource.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* const my_runtime_config = new gcp.runtimeconfig.Config("my-runtime-config", {
* name: "my-service-runtime-config",
* description: "Runtime configuration values for my service",
* });
* ```
* ```python
* import pulumi
* import pulumi_gcp as gcp
* my_runtime_config = gcp.runtimeconfig.Config("my-runtime-config",
* name="my-service-runtime-config",
* description="Runtime configuration values for my service")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Gcp = Pulumi.Gcp;
* return await Deployment.RunAsync(() =>
* {
* var my_runtime_config = new Gcp.RuntimeConfig.Config("my-runtime-config", new()
* {
* Name = "my-service-runtime-config",
* Description = "Runtime configuration values for my service",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/runtimeconfig"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := runtimeconfig.NewConfig(ctx, "my-runtime-config", &runtimeconfig.ConfigArgs{
* Name: pulumi.String("my-service-runtime-config"),
* Description: pulumi.String("Runtime configuration values for my service"),
* })
* 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.gcp.runtimeconfig.Config;
* import com.pulumi.gcp.runtimeconfig.ConfigArgs;
* 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 my_runtime_config = new Config("my-runtime-config", ConfigArgs.builder()
* .name("my-service-runtime-config")
* .description("Runtime configuration values for my service")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* my-runtime-config:
* type: gcp:runtimeconfig:Config
* properties:
* name: my-service-runtime-config
* description: Runtime configuration values for my service
* ```
*
* ## Import
* Runtime Configs can be imported using the `name` or full config name, e.g.
* * `projects/{{project_id}}/configs/{{name}}`
* * `{{name}}`
* When using the `pulumi import` command, Runtime Configs can be imported using one of the formats above. For example:
* ```sh
* $ pulumi import gcp:runtimeconfig/config:Config default projects/{{project_id}}/configs/{{name}}
* ```
* ```sh
* $ pulumi import gcp:runtimeconfig/config:Config default {{name}}
* ```
* When importing using only the name, the provider project must be set.
* @property description The description to associate with the runtime
* config.
* @property name The name of the runtime config.
* - - -
* @property project The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
public data class ConfigArgs(
public val description: Output? = null,
public val name: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.runtimeconfig.ConfigArgs =
com.pulumi.gcp.runtimeconfig.ConfigArgs.builder()
.description(description?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ConfigArgs].
*/
@PulumiTagMarker
public class ConfigArgsBuilder internal constructor() {
private var description: Output? = null
private var name: Output? = null
private var project: Output? = null
/**
* @param value The description to associate with the runtime
* config.
*/
@JvmName("mudtslvturqiliby")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value The name of the runtime config.
* - - -
*/
@JvmName("rejxistdflpcttix")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
@JvmName("chybgvpwvdrrypof")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value The description to associate with the runtime
* config.
*/
@JvmName("klwrgpclthsmrdad")
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 runtime config.
* - - -
*/
@JvmName("ttdlkunjwuqtkqck")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The ID of the project in which the resource belongs. If it
* is not provided, the provider project is used.
*/
@JvmName("qqswglrdrlvodulr")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): ConfigArgs = ConfigArgs(
description = description,
name = name,
project = project,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy