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

com.pulumi.awsnative.kotlin.ExtensionResourceArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.kotlin

import com.pulumi.awsnative.ExtensionResourceArgs.builder
import com.pulumi.awsnative.kotlin.inputs.AutoNamingArgs
import com.pulumi.awsnative.kotlin.inputs.AutoNamingArgsBuilder
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.Any
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A special resource that enables deploying CloudFormation Extensions (third-party resources). An extension has to be pre-registered in your AWS account in order to use this resource.
 * @property autoNaming Optional auto-naming specification for the resource.
 * If provided and the name is not specified manually, the provider will automatically generate a name based on the Pulumi resource name and a random suffix.
 * @property createOnly Property names as defined by `createOnlyProperties` in the CloudFormation schema. Create-only properties can't be set during updates, so will not be included in patches even if they are also marked as write-only, and will cause an error if attempted to be updated. Therefore any property here should also be included in the `replaceOnChanges` resource option too.
 * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
 * @property properties Property bag containing the properties for the resource. These should be defined using the casing expected by the CloudControl API as these values are sent exact as provided.
 * @property tagsProperty Optional name of the property containing the tags. Defaults to "Tags" if the `tagsStyle` is set to either "stringMap" or "keyValueArray". This is used to apply default tags to the resource and can be ignored if not using default tags.
 * @property tagsStyle Optional style of tags this resource uses. Valid values are "stringMap", "keyValueArray" or "none". Defaults to `keyValueArray` if `tagsProperty` is set. This is used to apply default tags to the resource and can be ignored if not using default tags.
 * @property type CloudFormation type name. This has three parts, each separated by two colons. For AWS resources this starts with `AWS::` e.g. `AWS::Logs::LogGroup`. Third party resources should use a namespace prefix e.g. `MyCompany::MyService::MyResource`.
 * @property writeOnly Property names as defined by `writeOnlyProperties` in the CloudFormation schema. Write-only properties are not returned during read operations and have to be included in all update operations as CloudControl itself can't read their previous values.
 * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
 */
public data class ExtensionResourceArgs(
    public val autoNaming: Output? = null,
    public val createOnly: Output>? = null,
    public val properties: Output>? = null,
    public val tagsProperty: Output? = null,
    public val tagsStyle: Output? = null,
    public val type: Output? = null,
    public val writeOnly: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ExtensionResourceArgs =
        com.pulumi.awsnative.ExtensionResourceArgs.builder()
            .autoNaming(autoNaming?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .createOnly(createOnly?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .properties(
                properties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .tagsProperty(tagsProperty?.applyValue({ args0 -> args0 }))
            .tagsStyle(tagsStyle?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 }))
            .writeOnly(writeOnly?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ExtensionResourceArgs].
 */
@PulumiTagMarker
public class ExtensionResourceArgsBuilder internal constructor() {
    private var autoNaming: Output? = null

    private var createOnly: Output>? = null

    private var properties: Output>? = null

    private var tagsProperty: Output? = null

    private var tagsStyle: Output? = null

    private var type: Output? = null

    private var writeOnly: Output>? = null

    /**
     * @param value Optional auto-naming specification for the resource.
     * If provided and the name is not specified manually, the provider will automatically generate a name based on the Pulumi resource name and a random suffix.
     */
    @JvmName("fpbwmwnvvrtceimp")
    public suspend fun autoNaming(`value`: Output) {
        this.autoNaming = value
    }

    /**
     * @param value Property names as defined by `createOnlyProperties` in the CloudFormation schema. Create-only properties can't be set during updates, so will not be included in patches even if they are also marked as write-only, and will cause an error if attempted to be updated. Therefore any property here should also be included in the `replaceOnChanges` resource option too.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("hijejsstfuttxtck")
    public suspend fun createOnly(`value`: Output>) {
        this.createOnly = value
    }

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

    /**
     * @param values Property names as defined by `createOnlyProperties` in the CloudFormation schema. Create-only properties can't be set during updates, so will not be included in patches even if they are also marked as write-only, and will cause an error if attempted to be updated. Therefore any property here should also be included in the `replaceOnChanges` resource option too.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("twahcuwngfbbpklr")
    public suspend fun createOnly(values: List>) {
        this.createOnly = Output.all(values)
    }

    /**
     * @param value Property bag containing the properties for the resource. These should be defined using the casing expected by the CloudControl API as these values are sent exact as provided.
     */
    @JvmName("bfbiswexbledrabs")
    public suspend fun properties(`value`: Output>) {
        this.properties = value
    }

    /**
     * @param value Optional name of the property containing the tags. Defaults to "Tags" if the `tagsStyle` is set to either "stringMap" or "keyValueArray". This is used to apply default tags to the resource and can be ignored if not using default tags.
     */
    @JvmName("gqdpibpmoofpvixp")
    public suspend fun tagsProperty(`value`: Output) {
        this.tagsProperty = value
    }

    /**
     * @param value Optional style of tags this resource uses. Valid values are "stringMap", "keyValueArray" or "none". Defaults to `keyValueArray` if `tagsProperty` is set. This is used to apply default tags to the resource and can be ignored if not using default tags.
     */
    @JvmName("uftftsbgxfglellk")
    public suspend fun tagsStyle(`value`: Output) {
        this.tagsStyle = value
    }

    /**
     * @param value CloudFormation type name. This has three parts, each separated by two colons. For AWS resources this starts with `AWS::` e.g. `AWS::Logs::LogGroup`. Third party resources should use a namespace prefix e.g. `MyCompany::MyService::MyResource`.
     */
    @JvmName("xvnvwnnoimpvposm")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Property names as defined by `writeOnlyProperties` in the CloudFormation schema. Write-only properties are not returned during read operations and have to be included in all update operations as CloudControl itself can't read their previous values.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("uyrnbftdwrqqwwlb")
    public suspend fun writeOnly(`value`: Output>) {
        this.writeOnly = value
    }

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

    /**
     * @param values Property names as defined by `writeOnlyProperties` in the CloudFormation schema. Write-only properties are not returned during read operations and have to be included in all update operations as CloudControl itself can't read their previous values.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("scxwvoijhadlcpjw")
    public suspend fun writeOnly(values: List>) {
        this.writeOnly = Output.all(values)
    }

    /**
     * @param value Optional auto-naming specification for the resource.
     * If provided and the name is not specified manually, the provider will automatically generate a name based on the Pulumi resource name and a random suffix.
     */
    @JvmName("dogkfilseocsrwne")
    public suspend fun autoNaming(`value`: AutoNamingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoNaming = mapped
    }

    /**
     * @param argument Optional auto-naming specification for the resource.
     * If provided and the name is not specified manually, the provider will automatically generate a name based on the Pulumi resource name and a random suffix.
     */
    @JvmName("cblolempcdkdgmwd")
    public suspend fun autoNaming(argument: suspend AutoNamingArgsBuilder.() -> Unit) {
        val toBeMapped = AutoNamingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoNaming = mapped
    }

    /**
     * @param value Property names as defined by `createOnlyProperties` in the CloudFormation schema. Create-only properties can't be set during updates, so will not be included in patches even if they are also marked as write-only, and will cause an error if attempted to be updated. Therefore any property here should also be included in the `replaceOnChanges` resource option too.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("kspvsibjwaivnlrg")
    public suspend fun createOnly(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createOnly = mapped
    }

    /**
     * @param values Property names as defined by `createOnlyProperties` in the CloudFormation schema. Create-only properties can't be set during updates, so will not be included in patches even if they are also marked as write-only, and will cause an error if attempted to be updated. Therefore any property here should also be included in the `replaceOnChanges` resource option too.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("ktodfbssxfvaootm")
    public suspend fun createOnly(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.createOnly = mapped
    }

    /**
     * @param value Property bag containing the properties for the resource. These should be defined using the casing expected by the CloudControl API as these values are sent exact as provided.
     */
    @JvmName("japyjownpdjodltl")
    public suspend fun properties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param values Property bag containing the properties for the resource. These should be defined using the casing expected by the CloudControl API as these values are sent exact as provided.
     */
    @JvmName("yxwgnmopqgquqogm")
    public fun properties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param value Optional name of the property containing the tags. Defaults to "Tags" if the `tagsStyle` is set to either "stringMap" or "keyValueArray". This is used to apply default tags to the resource and can be ignored if not using default tags.
     */
    @JvmName("jwrjucqrjtiiiaeb")
    public suspend fun tagsProperty(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagsProperty = mapped
    }

    /**
     * @param value Optional style of tags this resource uses. Valid values are "stringMap", "keyValueArray" or "none". Defaults to `keyValueArray` if `tagsProperty` is set. This is used to apply default tags to the resource and can be ignored if not using default tags.
     */
    @JvmName("ecnhbyxthbogubql")
    public suspend fun tagsStyle(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagsStyle = mapped
    }

    /**
     * @param value CloudFormation type name. This has three parts, each separated by two colons. For AWS resources this starts with `AWS::` e.g. `AWS::Logs::LogGroup`. Third party resources should use a namespace prefix e.g. `MyCompany::MyService::MyResource`.
     */
    @JvmName("evwtrvhwxhuwksvu")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Property names as defined by `writeOnlyProperties` in the CloudFormation schema. Write-only properties are not returned during read operations and have to be included in all update operations as CloudControl itself can't read their previous values.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("jkcawfcmqkfglaym")
    public suspend fun writeOnly(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.writeOnly = mapped
    }

    /**
     * @param values Property names as defined by `writeOnlyProperties` in the CloudFormation schema. Write-only properties are not returned during read operations and have to be included in all update operations as CloudControl itself can't read their previous values.
     * In the CloudFormation schema these are fully qualified property paths (e.g. `/properties/AccessToken`) whereas here we only include the top-level property name (e.g. `AccessToken`).
     */
    @JvmName("mhcmniqciblxurfs")
    public suspend fun writeOnly(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.writeOnly = mapped
    }

    internal fun build(): ExtensionResourceArgs = ExtensionResourceArgs(
        autoNaming = autoNaming,
        createOnly = createOnly,
        properties = properties,
        tagsProperty = tagsProperty,
        tagsStyle = tagsStyle,
        type = type,
        writeOnly = writeOnly,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy