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

com.pulumi.azurenative.databoxedge.kotlin.FileEventTriggerArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.databoxedge.kotlin

import com.pulumi.azurenative.databoxedge.FileEventTriggerArgs.builder
import com.pulumi.azurenative.databoxedge.kotlin.inputs.FileSourceInfoArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.FileSourceInfoArgsBuilder
import com.pulumi.azurenative.databoxedge.kotlin.inputs.RoleSinkInfoArgs
import com.pulumi.azurenative.databoxedge.kotlin.inputs.RoleSinkInfoArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Trigger details.
 * Azure REST API version: 2022-03-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * ## Example Usage
 * ### TriggerPut
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var fileEventTrigger = new AzureNative.DataBoxEdge.FileEventTrigger("fileEventTrigger", new()
 *     {
 *         CustomContextTag = "CustomContextTags-1235346475",
 *         DeviceName = "testedgedevice",
 *         Kind = "FileEvent",
 *         Name = "trigger1",
 *         ResourceGroupName = "GroupForEdgeAutomation",
 *         SinkInfo = new AzureNative.DataBoxEdge.Inputs.RoleSinkInfoArgs
 *         {
 *             RoleId = "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/roles/role1",
 *         },
 *         SourceInfo = new AzureNative.DataBoxEdge.Inputs.FileSourceInfoArgs
 *         {
 *             ShareId = "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/shares/share1",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	databoxedge "github.com/pulumi/pulumi-azure-native-sdk/databoxedge/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := databoxedge.NewFileEventTrigger(ctx, "fileEventTrigger", &databoxedge.FileEventTriggerArgs{
 * 			CustomContextTag:  pulumi.String("CustomContextTags-1235346475"),
 * 			DeviceName:        pulumi.String("testedgedevice"),
 * 			Kind:              pulumi.String("FileEvent"),
 * 			Name:              pulumi.String("trigger1"),
 * 			ResourceGroupName: pulumi.String("GroupForEdgeAutomation"),
 * 			SinkInfo: &databoxedge.RoleSinkInfoArgs{
 * 				RoleId: pulumi.String("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/roles/role1"),
 * 			},
 * 			SourceInfo: &databoxedge.FileSourceInfoArgs{
 * 				ShareId: pulumi.String("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/shares/share1"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.databoxedge.FileEventTrigger;
 * import com.pulumi.azurenative.databoxedge.FileEventTriggerArgs;
 * import com.pulumi.azurenative.databoxedge.inputs.RoleSinkInfoArgs;
 * import com.pulumi.azurenative.databoxedge.inputs.FileSourceInfoArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var fileEventTrigger = new FileEventTrigger("fileEventTrigger", FileEventTriggerArgs.builder()
 *             .customContextTag("CustomContextTags-1235346475")
 *             .deviceName("testedgedevice")
 *             .kind("FileEvent")
 *             .name("trigger1")
 *             .resourceGroupName("GroupForEdgeAutomation")
 *             .sinkInfo(RoleSinkInfoArgs.builder()
 *                 .roleId("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/roles/role1")
 *                 .build())
 *             .sourceInfo(FileSourceInfoArgs.builder()
 *                 .shareId("/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/GroupForEdgeAutomation/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testedgedevice/shares/share1")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:databoxedge:FileEventTrigger trigger1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/{deviceName}/triggers/{name}
 * ```
 * @property customContextTag A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of the module.
 * @property deviceName Creates or updates a trigger
 * @property kind Trigger Kind.
 * Expected value is 'FileEvent'.
 * @property name The trigger name.
 * @property resourceGroupName The resource group name.
 * @property sinkInfo Role sink info.
 * @property sourceInfo File event source details.
 */
public data class FileEventTriggerArgs(
    public val customContextTag: Output? = null,
    public val deviceName: Output? = null,
    public val kind: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sinkInfo: Output? = null,
    public val sourceInfo: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.databoxedge.FileEventTriggerArgs =
        com.pulumi.azurenative.databoxedge.FileEventTriggerArgs.builder()
            .customContextTag(customContextTag?.applyValue({ args0 -> args0 }))
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sinkInfo(sinkInfo?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sourceInfo(sourceInfo?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [FileEventTriggerArgs].
 */
@PulumiTagMarker
public class FileEventTriggerArgsBuilder internal constructor() {
    private var customContextTag: Output? = null

    private var deviceName: Output? = null

    private var kind: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var sinkInfo: Output? = null

    private var sourceInfo: Output? = null

    /**
     * @param value A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of the module.
     */
    @JvmName("nkmuvagbfgkxeryp")
    public suspend fun customContextTag(`value`: Output) {
        this.customContextTag = value
    }

    /**
     * @param value Creates or updates a trigger
     */
    @JvmName("ykgwhbrmoheodpcr")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value Trigger Kind.
     * Expected value is 'FileEvent'.
     */
    @JvmName("sdrmfxpanfxwiwkq")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

    /**
     * @param value The trigger name.
     */
    @JvmName("lhbbejhgowojpkyc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The resource group name.
     */
    @JvmName("kschxmfqrvxdxtoy")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Role sink info.
     */
    @JvmName("sidlevvsuyxfnrdh")
    public suspend fun sinkInfo(`value`: Output) {
        this.sinkInfo = value
    }

    /**
     * @param value File event source details.
     */
    @JvmName("epulgjhhsyndwfnp")
    public suspend fun sourceInfo(`value`: Output) {
        this.sourceInfo = value
    }

    /**
     * @param value A custom context tag typically used to correlate the trigger against its usage. For example, if a periodic timer trigger is intended for certain specific IoT modules in the device, the tag can be the name or the image URL of the module.
     */
    @JvmName("evebjjhejtgtmkhj")
    public suspend fun customContextTag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customContextTag = mapped
    }

    /**
     * @param value Creates or updates a trigger
     */
    @JvmName("ttsnfjlxirdrnnfx")
    public suspend fun deviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value Trigger Kind.
     * Expected value is 'FileEvent'.
     */
    @JvmName("mnuwfpqgiyisqhwf")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

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

    /**
     * @param value The resource group name.
     */
    @JvmName("aktwwomnqbyupakc")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Role sink info.
     */
    @JvmName("dhshvuxsdqycmqoo")
    public suspend fun sinkInfo(`value`: RoleSinkInfoArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sinkInfo = mapped
    }

    /**
     * @param argument Role sink info.
     */
    @JvmName("vexrmltxeyjfgkcy")
    public suspend fun sinkInfo(argument: suspend RoleSinkInfoArgsBuilder.() -> Unit) {
        val toBeMapped = RoleSinkInfoArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sinkInfo = mapped
    }

    /**
     * @param value File event source details.
     */
    @JvmName("yrkgqwjorfvfoexv")
    public suspend fun sourceInfo(`value`: FileSourceInfoArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceInfo = mapped
    }

    /**
     * @param argument File event source details.
     */
    @JvmName("thjxtehlxsuajvus")
    public suspend fun sourceInfo(argument: suspend FileSourceInfoArgsBuilder.() -> Unit) {
        val toBeMapped = FileSourceInfoArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceInfo = mapped
    }

    internal fun build(): FileEventTriggerArgs = FileEventTriggerArgs(
        customContextTag = customContextTag,
        deviceName = deviceName,
        kind = kind,
        name = name,
        resourceGroupName = resourceGroupName,
        sinkInfo = sinkInfo,
        sourceInfo = sourceInfo,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy