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

com.pulumi.awsnative.greengrassv2.kotlin.DeploymentArgs.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.greengrassv2.kotlin

import com.pulumi.awsnative.greengrassv2.DeploymentArgs.builder
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.DeploymentComponentDeploymentSpecificationArgs
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.DeploymentComponentDeploymentSpecificationArgsBuilder
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.DeploymentIoTJobConfigurationArgs
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.DeploymentIoTJobConfigurationArgsBuilder
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.DeploymentPoliciesArgs
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.DeploymentPoliciesArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource for Greengrass V2 deployment.
 * @property components The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
 * @property deploymentName The name of the deployment.
 * @property deploymentPolicies The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
 * @property iotJobConfiguration The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
 * @property parentTargetArn The parent deployment's [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for a subdeployment.
 * @property tags Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
 * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
 * ```json
 * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
 * }
 * ```
 * @property targetArn The ARN of the target AWS IoT thing or thing group.
 */
public data class DeploymentArgs(
    public val components: Output>? =
        null,
    public val deploymentName: Output? = null,
    public val deploymentPolicies: Output? = null,
    public val iotJobConfiguration: Output? = null,
    public val parentTargetArn: Output? = null,
    public val tags: Output>? = null,
    public val targetArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.greengrassv2.DeploymentArgs =
        com.pulumi.awsnative.greengrassv2.DeploymentArgs.builder()
            .components(
                components?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .deploymentName(deploymentName?.applyValue({ args0 -> args0 }))
            .deploymentPolicies(
                deploymentPolicies?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .iotJobConfiguration(
                iotJobConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .parentTargetArn(parentTargetArn?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .targetArn(targetArn?.applyValue({ args0 -> args0 })).build()
}

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

    private var deploymentName: Output? = null

    private var deploymentPolicies: Output? = null

    private var iotJobConfiguration: Output? = null

    private var parentTargetArn: Output? = null

    private var tags: Output>? = null

    private var targetArn: Output? = null

    /**
     * @param value The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
     */
    @JvmName("bdwexijafjwvptdk")
    public suspend fun components(`value`: Output>) {
        this.components = value
    }

    /**
     * @param value The name of the deployment.
     */
    @JvmName("mvwfhatkejvhmymg")
    public suspend fun deploymentName(`value`: Output) {
        this.deploymentName = value
    }

    /**
     * @param value The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
     */
    @JvmName("hyotbirjhmlbdrnr")
    public suspend fun deploymentPolicies(`value`: Output) {
        this.deploymentPolicies = value
    }

    /**
     * @param value The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
     */
    @JvmName("hrqlwlhodeybyhfb")
    public suspend fun iotJobConfiguration(`value`: Output) {
        this.iotJobConfiguration = value
    }

    /**
     * @param value The parent deployment's [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for a subdeployment.
     */
    @JvmName("pcyagobmscuniybw")
    public suspend fun parentTargetArn(`value`: Output) {
        this.parentTargetArn = value
    }

    /**
     * @param value Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
     * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
     * ```json
     * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
     * }
     * ```
     */
    @JvmName("pmkclodkuxuhfjfe")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ARN of the target AWS IoT thing or thing group.
     */
    @JvmName("nbqlofvafetvbsal")
    public suspend fun targetArn(`value`: Output) {
        this.targetArn = value
    }

    /**
     * @param value The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
     */
    @JvmName("vmjnncvbdphxymqn")
    public suspend fun components(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.components = mapped
    }

    /**
     * @param argument The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
     */
    @JvmName("oxusogygjbytxslg")
    public suspend fun components(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                DeploymentComponentDeploymentSpecificationArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.components = mapped
    }

    /**
     * @param values The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.
     */
    @JvmName("rxwosdqogtcxpacp")
    public fun components(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.components = mapped
    }

    /**
     * @param value The name of the deployment.
     */
    @JvmName("tknniwdfaayhngmn")
    public suspend fun deploymentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentName = mapped
    }

    /**
     * @param value The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
     */
    @JvmName("ghbmjutxiupipilg")
    public suspend fun deploymentPolicies(`value`: DeploymentPoliciesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deploymentPolicies = mapped
    }

    /**
     * @param argument The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.
     */
    @JvmName("astcgymrplcokhtw")
    public suspend fun deploymentPolicies(argument: suspend DeploymentPoliciesArgsBuilder.() -> Unit) {
        val toBeMapped = DeploymentPoliciesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.deploymentPolicies = mapped
    }

    /**
     * @param value The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
     */
    @JvmName("bvavccpvutwrdnry")
    public suspend fun iotJobConfiguration(`value`: DeploymentIoTJobConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iotJobConfiguration = mapped
    }

    /**
     * @param argument The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.
     */
    @JvmName("lacpmivajenfyerl")
    public suspend fun iotJobConfiguration(argument: suspend DeploymentIoTJobConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = DeploymentIoTJobConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.iotJobConfiguration = mapped
    }

    /**
     * @param value The parent deployment's [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for a subdeployment.
     */
    @JvmName("pogrnevcydyvtkkd")
    public suspend fun parentTargetArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parentTargetArn = mapped
    }

    /**
     * @param value Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
     * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
     * ```json
     * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
     * }
     * ```
     */
    @JvmName("chlqawyjrrfbmbha")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
     * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
     * ```json
     * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
     * }
     * ```
     */
    @JvmName("quemtrqahxvqurhc")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ARN of the target AWS IoT thing or thing group.
     */
    @JvmName("fyghlhvogefosucy")
    public suspend fun targetArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetArn = mapped
    }

    internal fun build(): DeploymentArgs = DeploymentArgs(
        components = components,
        deploymentName = deploymentName,
        deploymentPolicies = deploymentPolicies,
        iotJobConfiguration = iotJobConfiguration,
        parentTargetArn = parentTargetArn,
        tags = tags,
        targetArn = targetArn,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy