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

com.pulumi.gcp.apigee.kotlin.KeystoresAliasesKeyCertFile.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.apigee.kotlin

import com.pulumi.core.Output
import com.pulumi.gcp.apigee.kotlin.outputs.KeystoresAliasesKeyCertFileCertsInfo
import com.pulumi.gcp.apigee.kotlin.outputs.KeystoresAliasesKeyCertFileCertsInfo.Companion.toKotlin
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 [KeystoresAliasesKeyCertFile].
 */
@PulumiTagMarker
public class KeystoresAliasesKeyCertFileResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: KeystoresAliasesKeyCertFileArgs = KeystoresAliasesKeyCertFileArgs()

    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 KeystoresAliasesKeyCertFileArgsBuilder.() -> Unit) {
        val builder = KeystoresAliasesKeyCertFileArgsBuilder()
        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(): KeystoresAliasesKeyCertFile {
        val builtJavaResource =
            com.pulumi.gcp.apigee.KeystoresAliasesKeyCertFile(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return KeystoresAliasesKeyCertFile(builtJavaResource)
    }
}

/**
 * An alias from a key/certificate pair.
 * To get more information about KeystoresAliasesKeyCertFile, see:
 * * [API documentation](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases)
 * * How-to Guides
 *     * [Keystores Aliases](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations.environments.keystores.aliases)
 * ## Import
 * KeystoresAliasesKeyCertFile can be imported using any of these accepted formats:
 * * `organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}`
 * * `{{org_id}}/{{environment}}/{{keystore}}/{{alias}}`
 * When using the `pulumi import` command, KeystoresAliasesKeyCertFile can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile default organizations/{{org_id}}/environments/{{environment}}/keystores/{{keystore}}/aliases/{{alias}}
 * ```
 * ```sh
 * $ pulumi import gcp:apigee/keystoresAliasesKeyCertFile:KeystoresAliasesKeyCertFile default {{org_id}}/{{environment}}/{{keystore}}/{{alias}}
 * ```
 */
public class KeystoresAliasesKeyCertFile internal constructor(
    override val javaResource: com.pulumi.gcp.apigee.KeystoresAliasesKeyCertFile,
) : KotlinCustomResource(javaResource, KeystoresAliasesKeyCertFileMapper) {
    /**
     * Alias Name
     */
    public val alias: Output
        get() = javaResource.alias().applyValue({ args0 -> args0 })

    /**
     * Cert content
     * - - -
     */
    public val cert: Output
        get() = javaResource.cert().applyValue({ args0 -> args0 })

    /**
     * Chain of certificates under this alias.
     * Structure is documented below.
     */
    public val certsInfo: Output
        get() = javaResource.certsInfo().applyValue({ args0 -> args0.let({ args0 -> toKotlin(args0) }) })

    /**
     * Environment associated with the alias
     */
    public val environment: Output
        get() = javaResource.environment().applyValue({ args0 -> args0 })

    /**
     * Private Key content, omit if uploading to truststore
     */
    public val key: Output?
        get() = javaResource.key().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Keystore Name
     */
    public val keystore: Output
        get() = javaResource.keystore().applyValue({ args0 -> args0 })

    /**
     * Organization ID associated with the alias, without organization/ prefix
     */
    public val orgId: Output
        get() = javaResource.orgId().applyValue({ args0 -> args0 })

    /**
     * Password for the Private Key if it's encrypted
     */
    public val password: Output?
        get() = javaResource.password().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Optional.Type of Alias
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 -> args0 })
}

public object KeystoresAliasesKeyCertFileMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.gcp.apigee.KeystoresAliasesKeyCertFile::class == javaResource::class

    override fun map(javaResource: Resource): KeystoresAliasesKeyCertFile =
        KeystoresAliasesKeyCertFile(javaResource as com.pulumi.gcp.apigee.KeystoresAliasesKeyCertFile)
}

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy