com.pulumi.aws.simpledb.kotlin.Domain.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.simpledb.kotlin
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
/**
* Builder for [Domain].
*/
@PulumiTagMarker
public class DomainResourceBuilder internal constructor() {
public var name: String? = null
public var args: DomainArgs = DomainArgs()
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 DomainArgsBuilder.() -> Unit) {
val builder = DomainArgsBuilder()
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(): Domain {
val builtJavaResource = com.pulumi.aws.simpledb.Domain(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Domain(builtJavaResource)
}
}
/**
* Provides a SimpleDB domain resource.
* !> **WARNING:** The `aws.simpledb.Domain` resource has been deprecated and will be removed in a future version. Use Amazon DynamoDB instead.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const users = new aws.simpledb.Domain("users", {name: "users"});
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* users = aws.simpledb.Domain("users", name="users")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var users = new Aws.SimpleDB.Domain("users", new()
* {
* Name = "users",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/simpledb"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := simpledb.NewDomain(ctx, "users", &simpledb.DomainArgs{
* Name: pulumi.String("users"),
* })
* 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.simpledb.Domain;
* import com.pulumi.aws.simpledb.DomainArgs;
* 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 users = new Domain("users", DomainArgs.builder()
* .name("users")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* users:
* type: aws:simpledb:Domain
* properties:
* name: users
* ```
*
* ## Import
* Using `pulumi import`, import SimpleDB Domains using the `name`. For example:
* ```sh
* $ pulumi import aws:simpledb/domain:Domain users users
* ```
*/
public class Domain internal constructor(
override val javaResource: com.pulumi.aws.simpledb.Domain,
) : KotlinCustomResource(javaResource, DomainMapper) {
/**
* The name of the SimpleDB domain
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
}
public object DomainMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.simpledb.Domain::class == javaResource::class
override fun map(javaResource: Resource): Domain = Domain(
javaResource as
com.pulumi.aws.simpledb.Domain,
)
}
/**
* @see [Domain].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Domain].
*/
public suspend fun domain(name: String, block: suspend DomainResourceBuilder.() -> Unit): Domain {
val builder = DomainResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Domain].
* @param name The _unique_ name of the resulting resource.
*/
public fun domain(name: String): Domain {
val builder = DomainResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy