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

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

package com.pulumi.awsnative.ssm.kotlin

import com.pulumi.awsnative.ssm.ParameterArgs.builder
import com.pulumi.awsnative.ssm.kotlin.enums.ParameterDataType
import com.pulumi.awsnative.ssm.kotlin.enums.ParameterTier
import com.pulumi.awsnative.ssm.kotlin.enums.ParameterType
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The ``AWS::SSM::Parameter`` resource creates an SSM parameter in SYSlong Parameter Store.
 *   To create an SSM parameter, you must have the IAMlong (IAM) permissions ``ssm:PutParameter`` and ``ssm:AddTagsToResource``. On stack creation, CFNlong adds the following three tags to the parameter: ``aws:cloudformation:stack-name``, ``aws:cloudformation:logical-id``, and ``aws:cloudformation:stack-id``, in addition to any custom tags you specify.
 *  To add, update, or remove tags during stack update, you must have IAM permissions for both ``ssm:AddTagsToResource`` and ``ssm:RemoveTagsFromResource``. For more information, see [Managing Access Using Policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/security-iam.html#security_iam_access-manage) in the *User Guide*.
 *   For information about valid values for parameters, see [About requirements and constraints for parameter names](https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html#sysman-parameter-name-constraints) in the *User Guide* and [PutParameter](https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_PutParameter.html) in the *API Reference*.
 * ## 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 allowedPattern A regular expression used to validate the parameter value. For example, for ``String`` types with values restricted to numbers, you can specify the following: ``AllowedPattern=^\d+$``
 * @property dataType The data type of the parameter, such as ``text`` or ``aws:ec2:image``. The default is ``text``.
 * @property description Information about the parameter.
 * @property name The name of the parameter.
 *   The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter Amazon Resource Name (ARN), is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: ``arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName``
 * @property policies Information about the policies assigned to a parameter.
 *   [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) in the *User Guide*.
 * @property tags Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a SYS parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
 * @property tier The parameter tier.
 * @property type The type of parameter.
 * @property value The parameter value.
 *   If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.
 */
public data class ParameterArgs(
    public val allowedPattern: Output? = null,
    public val dataType: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val policies: Output? = null,
    public val tags: Output>? = null,
    public val tier: Output? = null,
    public val type: Output? = null,
    public val `value`: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ssm.ParameterArgs =
        com.pulumi.awsnative.ssm.ParameterArgs.builder()
            .allowedPattern(allowedPattern?.applyValue({ args0 -> args0 }))
            .dataType(dataType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .policies(policies?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .tier(tier?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .`value`(`value`?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ParameterArgs].
 */
@PulumiTagMarker
public class ParameterArgsBuilder internal constructor() {
    private var allowedPattern: Output? = null

    private var dataType: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var policies: Output? = null

    private var tags: Output>? = null

    private var tier: Output? = null

    private var type: Output? = null

    private var `value`: Output? = null

    /**
     * @param value A regular expression used to validate the parameter value. For example, for ``String`` types with values restricted to numbers, you can specify the following: ``AllowedPattern=^\d+$``
     */
    @JvmName("ukugfbgjkifjhanb")
    public suspend fun allowedPattern(`value`: Output) {
        this.allowedPattern = value
    }

    /**
     * @param value The data type of the parameter, such as ``text`` or ``aws:ec2:image``. The default is ``text``.
     */
    @JvmName("fuyvsdmdxebwacio")
    public suspend fun dataType(`value`: Output) {
        this.dataType = value
    }

    /**
     * @param value Information about the parameter.
     */
    @JvmName("dlanjwsevsrvmkbu")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the parameter.
     *   The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter Amazon Resource Name (ARN), is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: ``arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName``
     */
    @JvmName("fbfagnwwwjgscuhm")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Information about the policies assigned to a parameter.
     *   [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) in the *User Guide*.
     */
    @JvmName("mwcyxlirsfjlxbgm")
    public suspend fun policies(`value`: Output) {
        this.policies = value
    }

    /**
     * @param value Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a SYS parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
     */
    @JvmName("pspvsdnkvvpeajkl")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The parameter tier.
     */
    @JvmName("rsliccixibeikkuo")
    public suspend fun tier(`value`: Output) {
        this.tier = value
    }

    /**
     * @param value The type of parameter.
     */
    @JvmName("ixrnbhckallnjmib")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The parameter value.
     *   If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.
     */
    @JvmName("olcuukyyqdhxriju")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value A regular expression used to validate the parameter value. For example, for ``String`` types with values restricted to numbers, you can specify the following: ``AllowedPattern=^\d+$``
     */
    @JvmName("sooejjancviwqdtr")
    public suspend fun allowedPattern(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedPattern = mapped
    }

    /**
     * @param value The data type of the parameter, such as ``text`` or ``aws:ec2:image``. The default is ``text``.
     */
    @JvmName("jaearoewyhjcajdw")
    public suspend fun dataType(`value`: ParameterDataType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataType = mapped
    }

    /**
     * @param value Information about the parameter.
     */
    @JvmName("qplcfixcebfqdciq")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name of the parameter.
     *   The maximum length constraint listed below includes capacity for additional system attributes that aren't part of the name. The maximum length for a parameter name, including the full length of the parameter Amazon Resource Name (ARN), is 1011 characters. For example, the length of the following parameter name is 65 characters, not 20 characters: ``arn:aws:ssm:us-east-2:111222333444:parameter/ExampleParameterName``
     */
    @JvmName("hdcdmwrrqvegymxw")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Information about the policies assigned to a parameter.
     *   [Assigning parameter policies](https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html) in the *User Guide*.
     */
    @JvmName("rdhwpfeutdtvodpt")
    public suspend fun policies(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    /**
     * @param value Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a SYS parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
     */
    @JvmName("jrlxehdpirymagei")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Optional metadata that you assign to a resource in the form of an arbitrary set of tags (key-value pairs). Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a SYS parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter.
     */
    @JvmName("tekvhbwbbgyltkgn")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The parameter tier.
     */
    @JvmName("yvdeytdglnvywqgu")
    public suspend fun tier(`value`: ParameterTier?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tier = mapped
    }

    /**
     * @param value The type of parameter.
     */
    @JvmName("vdedtrnrwgyreuff")
    public suspend fun type(`value`: ParameterType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The parameter value.
     *   If type is ``StringList``, the system returns a comma-separated string with no spaces between commas in the ``Value`` field.
     */
    @JvmName("ykybcwhxksnyeapo")
    public suspend fun `value`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    internal fun build(): ParameterArgs = ParameterArgs(
        allowedPattern = allowedPattern,
        dataType = dataType,
        description = description,
        name = name,
        policies = policies,
        tags = tags,
        tier = tier,
        type = type,
        `value` = `value`,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy