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

com.pulumi.aws.iot.kotlin.DomainConfigurationArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.iot.kotlin

import com.pulumi.aws.iot.DomainConfigurationArgs.builder
import com.pulumi.aws.iot.kotlin.inputs.DomainConfigurationAuthorizerConfigArgs
import com.pulumi.aws.iot.kotlin.inputs.DomainConfigurationAuthorizerConfigArgsBuilder
import com.pulumi.aws.iot.kotlin.inputs.DomainConfigurationTlsConfigArgs
import com.pulumi.aws.iot.kotlin.inputs.DomainConfigurationTlsConfigArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates and manages an AWS IoT domain configuration.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const iot = new aws.iot.DomainConfiguration("iot", {
 *     name: "iot-",
 *     domainName: "iot.example.com",
 *     serviceType: "DATA",
 *     serverCertificateArns: [cert.arn],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * iot = aws.iot.DomainConfiguration("iot",
 *     name="iot-",
 *     domain_name="iot.example.com",
 *     service_type="DATA",
 *     server_certificate_arns=[cert["arn"]])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var iot = new Aws.Iot.DomainConfiguration("iot", new()
 *     {
 *         Name = "iot-",
 *         DomainName = "iot.example.com",
 *         ServiceType = "DATA",
 *         ServerCertificateArns = new[]
 *         {
 *             cert.Arn,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := iot.NewDomainConfiguration(ctx, "iot", &iot.DomainConfigurationArgs{
 * 			Name:        pulumi.String("iot-"),
 * 			DomainName:  pulumi.String("iot.example.com"),
 * 			ServiceType: pulumi.String("DATA"),
 * 			ServerCertificateArns: pulumi.StringArray{
 * 				cert.Arn,
 * 			},
 * 		})
 * 		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.iot.DomainConfiguration;
 * import com.pulumi.aws.iot.DomainConfigurationArgs;
 * 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 iot = new DomainConfiguration("iot", DomainConfigurationArgs.builder()
 *             .name("iot-")
 *             .domainName("iot.example.com")
 *             .serviceType("DATA")
 *             .serverCertificateArns(cert.arn())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   iot:
 *     type: aws:iot:DomainConfiguration
 *     properties:
 *       name: iot-
 *       domainName: iot.example.com
 *       serviceType: DATA
 *       serverCertificateArns:
 *         - ${cert.arn}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import domain configurations using the name. For example:
 * ```sh
 * $ pulumi import aws:iot/domainConfiguration:DomainConfiguration example example
 * ```
 * @property authorizerConfig An object that specifies the authorization service for a domain. See the `authorizer_config` Block below for details.
 * @property domainName Fully-qualified domain name.
 * @property name The name of the domain configuration. This value must be unique to a region.
 * @property serverCertificateArns The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domain_name`, the cert must include it.
 * @property serviceType The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type.
 * @property status The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`.
 * @property tags Map of tags to assign to this resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property tlsConfig An object that specifies the TLS configuration for a domain. See the `tls_config` Block below for details.
 * @property validationCertificateArn The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.
 */
public data class DomainConfigurationArgs(
    public val authorizerConfig: Output? = null,
    public val domainName: Output? = null,
    public val name: Output? = null,
    public val serverCertificateArns: Output>? = null,
    public val serviceType: Output? = null,
    public val status: Output? = null,
    public val tags: Output>? = null,
    public val tlsConfig: Output? = null,
    public val validationCertificateArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.iot.DomainConfigurationArgs =
        com.pulumi.aws.iot.DomainConfigurationArgs.builder()
            .authorizerConfig(authorizerConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .domainName(domainName?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .serverCertificateArns(serverCertificateArns?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .serviceType(serviceType?.applyValue({ args0 -> args0 }))
            .status(status?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .tlsConfig(tlsConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .validationCertificateArn(validationCertificateArn?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DomainConfigurationArgs].
 */
@PulumiTagMarker
public class DomainConfigurationArgsBuilder internal constructor() {
    private var authorizerConfig: Output? = null

    private var domainName: Output? = null

    private var name: Output? = null

    private var serverCertificateArns: Output>? = null

    private var serviceType: Output? = null

    private var status: Output? = null

    private var tags: Output>? = null

    private var tlsConfig: Output? = null

    private var validationCertificateArn: Output? = null

    /**
     * @param value An object that specifies the authorization service for a domain. See the `authorizer_config` Block below for details.
     */
    @JvmName("wcorrweefnfeiyye")
    public suspend fun authorizerConfig(`value`: Output) {
        this.authorizerConfig = value
    }

    /**
     * @param value Fully-qualified domain name.
     */
    @JvmName("abkigwoboofkjodp")
    public suspend fun domainName(`value`: Output) {
        this.domainName = value
    }

    /**
     * @param value The name of the domain configuration. This value must be unique to a region.
     */
    @JvmName("xpqnxibcghtspgcu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domain_name`, the cert must include it.
     */
    @JvmName("jikdxhoqphaqoujo")
    public suspend fun serverCertificateArns(`value`: Output>) {
        this.serverCertificateArns = value
    }

    @JvmName("jisgylvkauehrodq")
    public suspend fun serverCertificateArns(vararg values: Output) {
        this.serverCertificateArns = Output.all(values.asList())
    }

    /**
     * @param values The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domain_name`, the cert must include it.
     */
    @JvmName("gsvbhdjleuthfggo")
    public suspend fun serverCertificateArns(values: List>) {
        this.serverCertificateArns = Output.all(values)
    }

    /**
     * @param value The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type.
     */
    @JvmName("wfjmwmlnmtynvdaq")
    public suspend fun serviceType(`value`: Output) {
        this.serviceType = value
    }

    /**
     * @param value The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`.
     */
    @JvmName("lkqgvemhivwllnrd")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value Map of tags to assign to this resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("kmmvnpjychdfueli")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value An object that specifies the TLS configuration for a domain. See the `tls_config` Block below for details.
     */
    @JvmName("qyytlkekdwcsuifs")
    public suspend fun tlsConfig(`value`: Output) {
        this.tlsConfig = value
    }

    /**
     * @param value The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.
     */
    @JvmName("bpcmesdoyciolevc")
    public suspend fun validationCertificateArn(`value`: Output) {
        this.validationCertificateArn = value
    }

    /**
     * @param value An object that specifies the authorization service for a domain. See the `authorizer_config` Block below for details.
     */
    @JvmName("khkqkpbdlokwikwx")
    public suspend fun authorizerConfig(`value`: DomainConfigurationAuthorizerConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizerConfig = mapped
    }

    /**
     * @param argument An object that specifies the authorization service for a domain. See the `authorizer_config` Block below for details.
     */
    @JvmName("abellpmrnoechlcc")
    public suspend fun authorizerConfig(argument: suspend DomainConfigurationAuthorizerConfigArgsBuilder.() -> Unit) {
        val toBeMapped = DomainConfigurationAuthorizerConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.authorizerConfig = mapped
    }

    /**
     * @param value Fully-qualified domain name.
     */
    @JvmName("kybjmgtxtcoiuutr")
    public suspend fun domainName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.domainName = mapped
    }

    /**
     * @param value The name of the domain configuration. This value must be unique to a region.
     */
    @JvmName("tursoiwgavmqqsnx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domain_name`, the cert must include it.
     */
    @JvmName("nkllumqadjweoeow")
    public suspend fun serverCertificateArns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serverCertificateArns = mapped
    }

    /**
     * @param values The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domain_name`, the cert must include it.
     */
    @JvmName("hnawqekdotbhdlpc")
    public suspend fun serverCertificateArns(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serverCertificateArns = mapped
    }

    /**
     * @param value The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type.
     */
    @JvmName("indvycmjbbkpldjo")
    public suspend fun serviceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceType = mapped
    }

    /**
     * @param value The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`.
     */
    @JvmName("vetngickbeffyiwa")
    public suspend fun status(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Map of tags to assign to this resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("bemphadhcewkskso")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of tags to assign to this resource. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("dkxufetvwojiopgi")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value An object that specifies the TLS configuration for a domain. See the `tls_config` Block below for details.
     */
    @JvmName("eievwliqkjpurgwp")
    public suspend fun tlsConfig(`value`: DomainConfigurationTlsConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tlsConfig = mapped
    }

    /**
     * @param argument An object that specifies the TLS configuration for a domain. See the `tls_config` Block below for details.
     */
    @JvmName("fpsaiukayxhbgtkn")
    public suspend fun tlsConfig(argument: suspend DomainConfigurationTlsConfigArgsBuilder.() -> Unit) {
        val toBeMapped = DomainConfigurationTlsConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.tlsConfig = mapped
    }

    /**
     * @param value The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains.
     */
    @JvmName("bbcjvsbkuqmykjlk")
    public suspend fun validationCertificateArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validationCertificateArn = mapped
    }

    internal fun build(): DomainConfigurationArgs = DomainConfigurationArgs(
        authorizerConfig = authorizerConfig,
        domainName = domainName,
        name = name,
        serverCertificateArns = serverCertificateArns,
        serviceType = serviceType,
        status = status,
        tags = tags,
        tlsConfig = tlsConfig,
        validationCertificateArn = validationCertificateArn,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy