com.pulumi.aws.rds.kotlin.InstanceDesiredStateArgs.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.rds.kotlin
import com.pulumi.aws.rds.InstanceDesiredStateArgs.builder
import com.pulumi.aws.rds.kotlin.inputs.InstanceDesiredStateTimeoutsArgs
import com.pulumi.aws.rds.kotlin.inputs.InstanceDesiredStateTimeoutsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Resource for managing an AWS RDS (Relational Database) RDS Instance State.
* > Destruction of this resource is a no-op and **will not** modify the instance state
* ## Example Usage
* ### Basic Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const test = new aws.rds.InstanceDesiredState("test", {
* identifier: testAwsDbInstance.identifier,
* state: "available",
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* test = aws.rds.InstanceDesiredState("test",
* identifier=test_aws_db_instance["identifier"],
* state="available")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var test = new Aws.Rds.InstanceDesiredState("test", new()
* {
* Identifier = testAwsDbInstance.Identifier,
* State = "available",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := rds.NewInstanceDesiredState(ctx, "test", &rds.InstanceDesiredStateArgs{
* Identifier: pulumi.Any(testAwsDbInstance.Identifier),
* State: pulumi.String("available"),
* })
* 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.rds.InstanceDesiredState;
* import com.pulumi.aws.rds.InstanceDesiredStateArgs;
* 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 InstanceDesiredState("test", InstanceDesiredStateArgs.builder()
* .identifier(testAwsDbInstance.identifier())
* .state("available")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* test:
* type: aws:rds:InstanceDesiredState
* properties:
* identifier: ${testAwsDbInstance.identifier}
* state: available
* ```
*
* ## Import
* Using `pulumi import`, import RDS (Relational Database) RDS Instance State using the `example_id_arg`. For example:
* ```sh
* $ pulumi import aws:rds/instanceDesiredState:InstanceDesiredState example rds_instance_state-id-12345678
* ```
* @property identifier DB Instance Identifier
* @property state Configured state of the DB Instance. Valid values are `available` and `stopped`.
* @property timeouts
*/
public data class InstanceDesiredStateArgs(
public val identifier: Output? = null,
public val state: Output? = null,
public val timeouts: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.rds.InstanceDesiredStateArgs =
com.pulumi.aws.rds.InstanceDesiredStateArgs.builder()
.identifier(identifier?.applyValue({ args0 -> args0 }))
.state(state?.applyValue({ args0 -> args0 }))
.timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [InstanceDesiredStateArgs].
*/
@PulumiTagMarker
public class InstanceDesiredStateArgsBuilder internal constructor() {
private var identifier: Output? = null
private var state: Output? = null
private var timeouts: Output? = null
/**
* @param value DB Instance Identifier
*/
@JvmName("oqovlfwnxfylbrow")
public suspend fun identifier(`value`: Output) {
this.identifier = value
}
/**
* @param value Configured state of the DB Instance. Valid values are `available` and `stopped`.
*/
@JvmName("mnlwgeyjlwvbjwig")
public suspend fun state(`value`: Output) {
this.state = value
}
/**
* @param value
*/
@JvmName("pautfintmbjfthip")
public suspend fun timeouts(`value`: Output) {
this.timeouts = value
}
/**
* @param value DB Instance Identifier
*/
@JvmName("mgcibunlcvsoojtv")
public suspend fun identifier(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identifier = mapped
}
/**
* @param value Configured state of the DB Instance. Valid values are `available` and `stopped`.
*/
@JvmName("rqcasudwkstooxlu")
public suspend fun state(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value
*/
@JvmName("byohpftcyuhlvcoe")
public suspend fun timeouts(`value`: InstanceDesiredStateTimeoutsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeouts = mapped
}
/**
* @param argument
*/
@JvmName("ryldcilqcjnjilpf")
public suspend fun timeouts(argument: suspend InstanceDesiredStateTimeoutsArgsBuilder.() -> Unit) {
val toBeMapped = InstanceDesiredStateTimeoutsArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.timeouts = mapped
}
internal fun build(): InstanceDesiredStateArgs = InstanceDesiredStateArgs(
identifier = identifier,
state = state,
timeouts = timeouts,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy