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

com.pulumi.awsnative.apigateway.kotlin.ClientCertificate.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.apigateway.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.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 [ClientCertificate].
 */
@PulumiTagMarker
public class ClientCertificateResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ClientCertificateArgs = ClientCertificateArgs()

    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 ClientCertificateArgsBuilder.() -> Unit) {
        val builder = ClientCertificateArgsBuilder()
        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(): ClientCertificate {
        val builtJavaResource =
            com.pulumi.awsnative.apigateway.ClientCertificate(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return ClientCertificate(builtJavaResource)
    }
}

/**
 * The ``AWS::ApiGateway::ClientCertificate`` resource creates a client certificate that API Gateway uses to configure client-side SSL authentication for sending requests to the integration endpoint.
 */
public class ClientCertificate internal constructor(
    override val javaResource: com.pulumi.awsnative.apigateway.ClientCertificate,
) : KotlinCustomResource(javaResource, ClientCertificateMapper) {
    /**
     * The ID for the client certificate. For example: `abc123` .
     */
    public val clientCertificateId: Output
        get() = javaResource.clientCertificateId().applyValue({ args0 -> args0 })

    /**
     * The description of the client certificate.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The collection of tags. Each tag element is associated with a given resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })
}

public object ClientCertificateMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.apigateway.ClientCertificate::class == javaResource::class

    override fun map(javaResource: Resource): ClientCertificate = ClientCertificate(
        javaResource as
            com.pulumi.awsnative.apigateway.ClientCertificate,
    )
}

/**
 * @see [ClientCertificate].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ClientCertificate].
 */
public suspend fun clientCertificate(
    name: String,
    block: suspend ClientCertificateResourceBuilder.() -> Unit,
): ClientCertificate {
    val builder = ClientCertificateResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ClientCertificate].
 * @param name The _unique_ name of the resulting resource.
 */
public fun clientCertificate(name: String): ClientCertificate {
    val builder = ClientCertificateResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy