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

com.pulumi.awsnative.ssm.kotlin.DocumentArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.ssm.kotlin

import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.ssm.DocumentArgs.builder
import com.pulumi.awsnative.ssm.kotlin.enums.DocumentFormat
import com.pulumi.awsnative.ssm.kotlin.enums.DocumentType
import com.pulumi.awsnative.ssm.kotlin.enums.DocumentUpdateMethod
import com.pulumi.awsnative.ssm.kotlin.inputs.DocumentAttachmentsSourceArgs
import com.pulumi.awsnative.ssm.kotlin.inputs.DocumentAttachmentsSourceArgsBuilder
import com.pulumi.awsnative.ssm.kotlin.inputs.DocumentRequiresArgs
import com.pulumi.awsnative.ssm.kotlin.inputs.DocumentRequiresArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The AWS::SSM::Document resource is an SSM document in AWS Systems Manager that defines the actions that Systems Manager performs, which can be used to set up and run commands on your instances.
 * ## Example Usage
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * ### Example
 * No Java example available.
 * @property attachments A list of key and value pairs that describe attachments to a version of a document.
 * @property content The content for the Systems Manager document in JSON, YAML or String format.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SSM::Document` for more information about the expected schema for this property.
 * @property documentFormat Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
 * @property documentType The type of document to create.
 * @property name A name for the Systems Manager document.
 * @property requires A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
 * @property tags Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
 * @property targetType Specify a target type to define the kinds of resources the document can run on.
 * @property updateMethod Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
 * @property versionName An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
 */
public data class DocumentArgs(
    public val attachments: Output>? = null,
    public val content: Output? = null,
    public val documentFormat: Output? = null,
    public val documentType: Output? = null,
    public val name: Output? = null,
    public val requires: Output>? = null,
    public val tags: Output>? = null,
    public val targetType: Output? = null,
    public val updateMethod: Output? = null,
    public val versionName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ssm.DocumentArgs =
        com.pulumi.awsnative.ssm.DocumentArgs.builder()
            .attachments(
                attachments?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .content(content?.applyValue({ args0 -> args0 }))
            .documentFormat(documentFormat?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .documentType(documentType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .requires(
                requires?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .targetType(targetType?.applyValue({ args0 -> args0 }))
            .updateMethod(updateMethod?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .versionName(versionName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DocumentArgs].
 */
@PulumiTagMarker
public class DocumentArgsBuilder internal constructor() {
    private var attachments: Output>? = null

    private var content: Output? = null

    private var documentFormat: Output? = null

    private var documentType: Output? = null

    private var name: Output? = null

    private var requires: Output>? = null

    private var tags: Output>? = null

    private var targetType: Output? = null

    private var updateMethod: Output? = null

    private var versionName: Output? = null

    /**
     * @param value A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("ogrdfoimrwrrckxv")
    public suspend fun attachments(`value`: Output>) {
        this.attachments = value
    }

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

    /**
     * @param values A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("rdoqvsaelincjprv")
    public suspend fun attachments(values: List>) {
        this.attachments = Output.all(values)
    }

    /**
     * @param value The content for the Systems Manager document in JSON, YAML or String format.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SSM::Document` for more information about the expected schema for this property.
     */
    @JvmName("vjpuswjpoxwbvwyi")
    public suspend fun content(`value`: Output) {
        this.content = value
    }

    /**
     * @param value Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
     */
    @JvmName("hrjnwoqjjuqkrrkn")
    public suspend fun documentFormat(`value`: Output) {
        this.documentFormat = value
    }

    /**
     * @param value The type of document to create.
     */
    @JvmName("fmyxpdoilmkmtioy")
    public suspend fun documentType(`value`: Output) {
        this.documentType = value
    }

    /**
     * @param value A name for the Systems Manager document.
     */
    @JvmName("fwaismxhhbkqqrrp")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("uuepdeqclicmmxmm")
    public suspend fun requires(`value`: Output>) {
        this.requires = value
    }

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

    /**
     * @param values A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("sqhmmswnisuknacb")
    public suspend fun requires(values: List>) {
        this.requires = Output.all(values)
    }

    /**
     * @param value Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("awcjoylhthlmdpnv")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("xrkoxmdqajlehpvq")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value Specify a target type to define the kinds of resources the document can run on.
     */
    @JvmName("nbkvwfqlfgcuktdq")
    public suspend fun targetType(`value`: Output) {
        this.targetType = value
    }

    /**
     * @param value Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
     */
    @JvmName("qyeyxxsrjlndrahk")
    public suspend fun updateMethod(`value`: Output) {
        this.updateMethod = value
    }

    /**
     * @param value An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
     */
    @JvmName("ujkraepflburxghs")
    public suspend fun versionName(`value`: Output) {
        this.versionName = value
    }

    /**
     * @param value A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("yoeukhdmltlwrgal")
    public suspend fun attachments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attachments = mapped
    }

    /**
     * @param argument A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("jvprfpsutwfgofjy")
    public suspend fun attachments(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DocumentAttachmentsSourceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.attachments = mapped
    }

    /**
     * @param argument A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("dfvedkxwwpgyqows")
    public suspend fun attachments(vararg argument: suspend DocumentAttachmentsSourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DocumentAttachmentsSourceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.attachments = mapped
    }

    /**
     * @param argument A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("qhngqoeakwtvbrwx")
    public suspend fun attachments(argument: suspend DocumentAttachmentsSourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DocumentAttachmentsSourceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.attachments = mapped
    }

    /**
     * @param values A list of key and value pairs that describe attachments to a version of a document.
     */
    @JvmName("vlexvjbaofgegnwj")
    public suspend fun attachments(vararg values: DocumentAttachmentsSourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attachments = mapped
    }

    /**
     * @param value The content for the Systems Manager document in JSON, YAML or String format.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::SSM::Document` for more information about the expected schema for this property.
     */
    @JvmName("jknprtjwkyqikfsa")
    public suspend fun content(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.content = mapped
    }

    /**
     * @param value Specify the document format for the request. The document format can be either JSON or YAML. JSON is the default format.
     */
    @JvmName("sybvdwwkadeorgyi")
    public suspend fun documentFormat(`value`: DocumentFormat?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.documentFormat = mapped
    }

    /**
     * @param value The type of document to create.
     */
    @JvmName("lioiuyijncnvycff")
    public suspend fun documentType(`value`: DocumentType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.documentType = mapped
    }

    /**
     * @param value A name for the Systems Manager document.
     */
    @JvmName("kfthmcmymkhqttpd")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("aoetdchpitydchcr")
    public suspend fun requires(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requires = mapped
    }

    /**
     * @param argument A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("bclnnhqwakmqfsxf")
    public suspend fun requires(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DocumentRequiresArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requires = mapped
    }

    /**
     * @param argument A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("hjkgmsyqeojshaiy")
    public suspend fun requires(vararg argument: suspend DocumentRequiresArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DocumentRequiresArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.requires = mapped
    }

    /**
     * @param argument A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("ddcnqidqtbqbtnag")
    public suspend fun requires(argument: suspend DocumentRequiresArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DocumentRequiresArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.requires = mapped
    }

    /**
     * @param values A list of SSM documents required by a document. For example, an ApplicationConfiguration document requires an ApplicationConfigurationSchema document.
     */
    @JvmName("lkegdefreesgbacp")
    public suspend fun requires(vararg values: DocumentRequiresArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requires = mapped
    }

    /**
     * @param value Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("jmllemnywhsubfbr")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("arfxwsxtxlqmeyrp")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("wbvtwqusrabgbwtj")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("essdesvgypeschwj")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment.
     */
    @JvmName("ujanxalfxsytsojh")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specify a target type to define the kinds of resources the document can run on.
     */
    @JvmName("vdvlinrpjpnydurh")
    public suspend fun targetType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetType = mapped
    }

    /**
     * @param value Update method - when set to 'Replace', the update will replace the existing document; when set to 'NewVersion', the update will create a new version.
     */
    @JvmName("wuenywxwkyqrhsrb")
    public suspend fun updateMethod(`value`: DocumentUpdateMethod?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.updateMethod = mapped
    }

    /**
     * @param value An optional field specifying the version of the artifact you are creating with the document. This value is unique across all versions of a document, and cannot be changed.
     */
    @JvmName("nmnoefwknivlmmfb")
    public suspend fun versionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versionName = mapped
    }

    internal fun build(): DocumentArgs = DocumentArgs(
        attachments = attachments,
        content = content,
        documentFormat = documentFormat,
        documentType = documentType,
        name = name,
        requires = requires,
        tags = tags,
        targetType = targetType,
        updateMethod = updateMethod,
        versionName = versionName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy