com.pulumi.aws.route53recoverycontrol.kotlin.Cluster.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.route53recoverycontrol.kotlin
import com.pulumi.aws.route53recoverycontrol.kotlin.outputs.ClusterClusterEndpoint
import com.pulumi.aws.route53recoverycontrol.kotlin.outputs.ClusterClusterEndpoint.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [Cluster].
*/
@PulumiTagMarker
public class ClusterResourceBuilder internal constructor() {
public var name: String? = null
public var args: ClusterArgs = ClusterArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend ClusterArgsBuilder.() -> Unit) {
val builder = ClusterArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Cluster {
val builtJavaResource = com.pulumi.aws.route53recoverycontrol.Cluster(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Cluster(builtJavaResource)
}
}
/**
* Provides an AWS Route 53 Recovery Control Config Cluster.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.route53recoverycontrol.Cluster("example", {name: "georgefitzgerald"});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.route53recoverycontrol.Cluster("example", name="georgefitzgerald")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Route53RecoveryControl.Cluster("example", new()
* {
* Name = "georgefitzgerald",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/route53recoverycontrol"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := route53recoverycontrol.NewCluster(ctx, "example", &route53recoverycontrol.ClusterArgs{
* Name: pulumi.String("georgefitzgerald"),
* })
* 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.route53recoverycontrol.Cluster;
* import com.pulumi.aws.route53recoverycontrol.ClusterArgs;
* 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 Cluster("example", ClusterArgs.builder()
* .name("georgefitzgerald")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:route53recoverycontrol:Cluster
* properties:
* name: georgefitzgerald
* ```
*
* ## Import
* Using `pulumi import`, import Route53 Recovery Control Config cluster using the cluster ARN. For example:
* ```sh
* $ pulumi import aws:route53recoverycontrol/cluster:Cluster mycluster arn:aws:route53-recovery-control::313517334327:cluster/f9ae13be-a11e-4ec7-8522-94a70468e6ea
* ```
*/
public class Cluster internal constructor(
override val javaResource: com.pulumi.aws.route53recoverycontrol.Cluster,
) : KotlinCustomResource(javaResource, ClusterMapper) {
/**
* ARN of the cluster
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* List of 5 endpoints in 5 regions that can be used to talk to the cluster. See below.
*/
public val clusterEndpoints: Output>
get() = javaResource.clusterEndpoints().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
})
/**
* Unique name describing the cluster.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Status of cluster. `PENDING` when it is being created, `PENDING_DELETION` when it is being deleted and `DEPLOYED` otherwise.
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 -> args0 })
}
public object ClusterMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.route53recoverycontrol.Cluster::class == javaResource::class
override fun map(javaResource: Resource): Cluster = Cluster(
javaResource as
com.pulumi.aws.route53recoverycontrol.Cluster,
)
}
/**
* @see [Cluster].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Cluster].
*/
public suspend fun cluster(name: String, block: suspend ClusterResourceBuilder.() -> Unit): Cluster {
val builder = ClusterResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Cluster].
* @param name The _unique_ name of the resulting resource.
*/
public fun cluster(name: String): Cluster {
val builder = ClusterResourceBuilder()
builder.name(name)
return builder.build()
}