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

com.pulumi.azurenative.hybriddata.kotlin.JobDefinitionArgs.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.hybriddata.kotlin

import com.pulumi.azurenative.hybriddata.JobDefinitionArgs.builder
import com.pulumi.azurenative.hybriddata.kotlin.enums.RunLocation
import com.pulumi.azurenative.hybriddata.kotlin.enums.State
import com.pulumi.azurenative.hybriddata.kotlin.enums.UserConfirmation
import com.pulumi.azurenative.hybriddata.kotlin.inputs.CustomerSecretArgs
import com.pulumi.azurenative.hybriddata.kotlin.inputs.CustomerSecretArgsBuilder
import com.pulumi.azurenative.hybriddata.kotlin.inputs.ScheduleArgs
import com.pulumi.azurenative.hybriddata.kotlin.inputs.ScheduleArgsBuilder
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

/**
 * Job Definition.
 * Azure REST API version: 2019-06-01. Prior API version in Azure Native 1.x: 2019-06-01.
 * ## Example Usage
 * ### JobDefinitions_CreateOrUpdatePUT83
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var jobDefinition = new AzureNative.HybridData.JobDefinition("jobDefinition", new()
 *     {
 *         DataManagerName = "TestAzureSDKOperations",
 *         DataServiceInput = new Dictionary
 *         {
 *             ["AzureStorageType"] = "Blob",
 *             ["BackupChoice"] = "UseExistingLatest",
 *             ["ContainerName"] = "containerfromtest",
 *             ["DeviceName"] = "8600-SHG0997877L71FC",
 *             ["FileNameFilter"] = "*",
 *             ["IsDirectoryMode"] = false,
 *             ["RootDirectories"] = new[]
 *             {
 *                 "\\",
 *             },
 *             ["VolumeNames"] = new[]
 *             {
 *                 "TestAutomation",
 *             },
 *         },
 *         DataServiceName = "DataTransformation",
 *         DataSinkId = "/subscriptions/6e0219f5-327a-4365-904f-05eed4227ad7/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.HybridData/dataManagers/TestAzureSDKOperations/dataStores/TestAzureStorage1",
 *         DataSourceId = "/subscriptions/6e0219f5-327a-4365-904f-05eed4227ad7/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.HybridData/dataManagers/TestAzureSDKOperations/dataStores/TestStorSimpleSource1",
 *         JobDefinitionName = "jobdeffromtestcode1",
 *         ResourceGroupName = "ResourceGroupForSDKTest",
 *         RunLocation = AzureNative.HybridData.RunLocation.Westus,
 *         State = AzureNative.HybridData.State.Enabled,
 *         UserConfirmation = AzureNative.HybridData.UserConfirmation.Required,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	hybriddata "github.com/pulumi/pulumi-azure-native-sdk/hybriddata/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := hybriddata.NewJobDefinition(ctx, "jobDefinition", &hybriddata.JobDefinitionArgs{
 * 			DataManagerName: pulumi.String("TestAzureSDKOperations"),
 * 			DataServiceInput: pulumi.Any(map[string]interface{}{
 * 				"AzureStorageType": "Blob",
 * 				"BackupChoice":     "UseExistingLatest",
 * 				"ContainerName":    "containerfromtest",
 * 				"DeviceName":       "8600-SHG0997877L71FC",
 * 				"FileNameFilter":   "*",
 * 				"IsDirectoryMode":  false,
 * 				"RootDirectories": []string{
 * 					"\\",
 * 				},
 * 				"VolumeNames": []string{
 * 					"TestAutomation",
 * 				},
 * 			}),
 * 			DataServiceName:   pulumi.String("DataTransformation"),
 * 			DataSinkId:        pulumi.String("/subscriptions/6e0219f5-327a-4365-904f-05eed4227ad7/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.HybridData/dataManagers/TestAzureSDKOperations/dataStores/TestAzureStorage1"),
 * 			DataSourceId:      pulumi.String("/subscriptions/6e0219f5-327a-4365-904f-05eed4227ad7/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.HybridData/dataManagers/TestAzureSDKOperations/dataStores/TestStorSimpleSource1"),
 * 			JobDefinitionName: pulumi.String("jobdeffromtestcode1"),
 * 			ResourceGroupName: pulumi.String("ResourceGroupForSDKTest"),
 * 			RunLocation:       hybriddata.RunLocationWestus,
 * 			State:             hybriddata.StateEnabled,
 * 			UserConfirmation:  hybriddata.UserConfirmationRequired,
 * 		})
 * 		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.hybriddata.JobDefinition;
 * import com.pulumi.azurenative.hybriddata.JobDefinitionArgs;
 * 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 jobDefinition = new JobDefinition("jobDefinition", JobDefinitionArgs.builder()
 *             .dataManagerName("TestAzureSDKOperations")
 *             .dataServiceInput(Map.ofEntries(
 *                 Map.entry("AzureStorageType", "Blob"),
 *                 Map.entry("BackupChoice", "UseExistingLatest"),
 *                 Map.entry("ContainerName", "containerfromtest"),
 *                 Map.entry("DeviceName", "8600-SHG0997877L71FC"),
 *                 Map.entry("FileNameFilter", "*"),
 *                 Map.entry("IsDirectoryMode", false),
 *                 Map.entry("RootDirectories", "\\"),
 *                 Map.entry("VolumeNames", "TestAutomation")
 *             ))
 *             .dataServiceName("DataTransformation")
 *             .dataSinkId("/subscriptions/6e0219f5-327a-4365-904f-05eed4227ad7/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.HybridData/dataManagers/TestAzureSDKOperations/dataStores/TestAzureStorage1")
 *             .dataSourceId("/subscriptions/6e0219f5-327a-4365-904f-05eed4227ad7/resourceGroups/ResourceGroupForSDKTest/providers/Microsoft.HybridData/dataManagers/TestAzureSDKOperations/dataStores/TestStorSimpleSource1")
 *             .jobDefinitionName("jobdeffromtestcode1")
 *             .resourceGroupName("ResourceGroupForSDKTest")
 *             .runLocation("westus")
 *             .state("Enabled")
 *             .userConfirmation("Required")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:hybriddata:JobDefinition jobdeffromtestcode1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HybridData/dataManagers/{dataManagerName}/dataServices/{dataServiceName}/jobDefinitions/{jobDefinitionName}
 * ```
 * @property customerSecrets List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
 * @property dataManagerName The name of the DataManager Resource within the specified resource group. DataManager names must be between 3 and 24 characters in length and use any alphanumeric and underscore only
 * @property dataServiceInput A generic json used differently by each data service type.
 * @property dataServiceName The data service type of the job definition.
 * @property dataSinkId Data Sink Id associated to the job definition.
 * @property dataSourceId Data Source Id associated to the job definition.
 * @property jobDefinitionName The job definition name to be created or updated.
 * @property lastModifiedTime Last modified time of the job definition.
 * @property resourceGroupName The Resource Group Name
 * @property runLocation This is the preferred geo location for the job to run.
 * @property schedules Schedule for running the job definition
 * @property state State of the job definition.
 * @property userConfirmation Enum to detect if user confirmation is required. If not passed will default to NotRequired.
 */
public data class JobDefinitionArgs(
    public val customerSecrets: Output>? = null,
    public val dataManagerName: Output? = null,
    public val dataServiceInput: Output? = null,
    public val dataServiceName: Output? = null,
    public val dataSinkId: Output? = null,
    public val dataSourceId: Output? = null,
    public val jobDefinitionName: Output? = null,
    public val lastModifiedTime: Output? = null,
    public val resourceGroupName: Output? = null,
    public val runLocation: Output? = null,
    public val schedules: Output>? = null,
    public val state: Output? = null,
    public val userConfirmation: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.hybriddata.JobDefinitionArgs =
        com.pulumi.azurenative.hybriddata.JobDefinitionArgs.builder()
            .customerSecrets(
                customerSecrets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .dataManagerName(dataManagerName?.applyValue({ args0 -> args0 }))
            .dataServiceInput(dataServiceInput?.applyValue({ args0 -> args0 }))
            .dataServiceName(dataServiceName?.applyValue({ args0 -> args0 }))
            .dataSinkId(dataSinkId?.applyValue({ args0 -> args0 }))
            .dataSourceId(dataSourceId?.applyValue({ args0 -> args0 }))
            .jobDefinitionName(jobDefinitionName?.applyValue({ args0 -> args0 }))
            .lastModifiedTime(lastModifiedTime?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .runLocation(runLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .schedules(
                schedules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .state(state?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .userConfirmation(
                userConfirmation?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

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

    private var dataManagerName: Output? = null

    private var dataServiceInput: Output? = null

    private var dataServiceName: Output? = null

    private var dataSinkId: Output? = null

    private var dataSourceId: Output? = null

    private var jobDefinitionName: Output? = null

    private var lastModifiedTime: Output? = null

    private var resourceGroupName: Output? = null

    private var runLocation: Output? = null

    private var schedules: Output>? = null

    private var state: Output? = null

    private var userConfirmation: Output? = null

    /**
     * @param value List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("ncklatkgxbewitbf")
    public suspend fun customerSecrets(`value`: Output>) {
        this.customerSecrets = value
    }

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

    /**
     * @param values List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("fafjjsyafwhkqvoy")
    public suspend fun customerSecrets(values: List>) {
        this.customerSecrets = Output.all(values)
    }

    /**
     * @param value The name of the DataManager Resource within the specified resource group. DataManager names must be between 3 and 24 characters in length and use any alphanumeric and underscore only
     */
    @JvmName("gewgjuybcjmewglt")
    public suspend fun dataManagerName(`value`: Output) {
        this.dataManagerName = value
    }

    /**
     * @param value A generic json used differently by each data service type.
     */
    @JvmName("ogceshncioqddfhr")
    public suspend fun dataServiceInput(`value`: Output) {
        this.dataServiceInput = value
    }

    /**
     * @param value The data service type of the job definition.
     */
    @JvmName("kvqelmyjrasktgue")
    public suspend fun dataServiceName(`value`: Output) {
        this.dataServiceName = value
    }

    /**
     * @param value Data Sink Id associated to the job definition.
     */
    @JvmName("qucyffubvdfdkddv")
    public suspend fun dataSinkId(`value`: Output) {
        this.dataSinkId = value
    }

    /**
     * @param value Data Source Id associated to the job definition.
     */
    @JvmName("utvsoxspmeauonhh")
    public suspend fun dataSourceId(`value`: Output) {
        this.dataSourceId = value
    }

    /**
     * @param value The job definition name to be created or updated.
     */
    @JvmName("cxhcvxrosucamiyn")
    public suspend fun jobDefinitionName(`value`: Output) {
        this.jobDefinitionName = value
    }

    /**
     * @param value Last modified time of the job definition.
     */
    @JvmName("wnjulhtnsqbkcilb")
    public suspend fun lastModifiedTime(`value`: Output) {
        this.lastModifiedTime = value
    }

    /**
     * @param value The Resource Group Name
     */
    @JvmName("dwvppcltbfyqntcf")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value This is the preferred geo location for the job to run.
     */
    @JvmName("jlvhpskyyrrfcren")
    public suspend fun runLocation(`value`: Output) {
        this.runLocation = value
    }

    /**
     * @param value Schedule for running the job definition
     */
    @JvmName("mdngemmvdynlxdvd")
    public suspend fun schedules(`value`: Output>) {
        this.schedules = value
    }

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

    /**
     * @param values Schedule for running the job definition
     */
    @JvmName("baxrkbldjyjjtikm")
    public suspend fun schedules(values: List>) {
        this.schedules = Output.all(values)
    }

    /**
     * @param value State of the job definition.
     */
    @JvmName("yunjwdtxibkgvdwq")
    public suspend fun state(`value`: Output) {
        this.state = value
    }

    /**
     * @param value Enum to detect if user confirmation is required. If not passed will default to NotRequired.
     */
    @JvmName("ddccrtdljnfwpodb")
    public suspend fun userConfirmation(`value`: Output) {
        this.userConfirmation = value
    }

    /**
     * @param value List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("vlaqvkjhiolhxiks")
    public suspend fun customerSecrets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerSecrets = mapped
    }

    /**
     * @param argument List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("etyeamofvjhwrrue")
    public suspend fun customerSecrets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CustomerSecretArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.customerSecrets = mapped
    }

    /**
     * @param argument List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("fsjsyuegxllvfwpq")
    public suspend fun customerSecrets(vararg argument: suspend CustomerSecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CustomerSecretArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.customerSecrets = mapped
    }

    /**
     * @param argument List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("chcuplmaebslkoii")
    public suspend fun customerSecrets(argument: suspend CustomerSecretArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CustomerSecretArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.customerSecrets = mapped
    }

    /**
     * @param values List of customer secrets containing a key identifier and key value. The key identifier is a way for the specific data source to understand the key. Value contains customer secret encrypted by the encryptionKeys.
     */
    @JvmName("ohmiwnbgiwjjpeyc")
    public suspend fun customerSecrets(vararg values: CustomerSecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.customerSecrets = mapped
    }

    /**
     * @param value The name of the DataManager Resource within the specified resource group. DataManager names must be between 3 and 24 characters in length and use any alphanumeric and underscore only
     */
    @JvmName("hnfxynflcmsxnuad")
    public suspend fun dataManagerName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataManagerName = mapped
    }

    /**
     * @param value A generic json used differently by each data service type.
     */
    @JvmName("wqyjfdoiqddtjlav")
    public suspend fun dataServiceInput(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataServiceInput = mapped
    }

    /**
     * @param value The data service type of the job definition.
     */
    @JvmName("rhukgrfrxsttgmwg")
    public suspend fun dataServiceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataServiceName = mapped
    }

    /**
     * @param value Data Sink Id associated to the job definition.
     */
    @JvmName("laafrhdntwvqfuot")
    public suspend fun dataSinkId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSinkId = mapped
    }

    /**
     * @param value Data Source Id associated to the job definition.
     */
    @JvmName("irkaqtquoihagfrk")
    public suspend fun dataSourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataSourceId = mapped
    }

    /**
     * @param value The job definition name to be created or updated.
     */
    @JvmName("hnciltwlsiphqhvl")
    public suspend fun jobDefinitionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.jobDefinitionName = mapped
    }

    /**
     * @param value Last modified time of the job definition.
     */
    @JvmName("affakcqqjvxiwdhx")
    public suspend fun lastModifiedTime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lastModifiedTime = mapped
    }

    /**
     * @param value The Resource Group Name
     */
    @JvmName("uesiatwcmcugqnpf")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value This is the preferred geo location for the job to run.
     */
    @JvmName("biybhqffjxtovabh")
    public suspend fun runLocation(`value`: RunLocation?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runLocation = mapped
    }

    /**
     * @param value Schedule for running the job definition
     */
    @JvmName("frwusaawkyfalltv")
    public suspend fun schedules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedules = mapped
    }

    /**
     * @param argument Schedule for running the job definition
     */
    @JvmName("mdxambuihrfhhmsf")
    public suspend fun schedules(argument: List Unit>) {
        val toBeMapped = argument.toList().map { ScheduleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.schedules = mapped
    }

    /**
     * @param argument Schedule for running the job definition
     */
    @JvmName("itvkpdjrpaemrlpd")
    public suspend fun schedules(vararg argument: suspend ScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { ScheduleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.schedules = mapped
    }

    /**
     * @param argument Schedule for running the job definition
     */
    @JvmName("uvbbmffdqqqwygdk")
    public suspend fun schedules(argument: suspend ScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ScheduleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.schedules = mapped
    }

    /**
     * @param values Schedule for running the job definition
     */
    @JvmName("anonpnfwfvfqdqge")
    public suspend fun schedules(vararg values: ScheduleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.schedules = mapped
    }

    /**
     * @param value State of the job definition.
     */
    @JvmName("sbaykbyuidqyiett")
    public suspend fun state(`value`: State?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.state = mapped
    }

    /**
     * @param value Enum to detect if user confirmation is required. If not passed will default to NotRequired.
     */
    @JvmName("dhnoexqyjbtisurk")
    public suspend fun userConfirmation(`value`: UserConfirmation?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userConfirmation = mapped
    }

    internal fun build(): JobDefinitionArgs = JobDefinitionArgs(
        customerSecrets = customerSecrets,
        dataManagerName = dataManagerName,
        dataServiceInput = dataServiceInput,
        dataServiceName = dataServiceName,
        dataSinkId = dataSinkId,
        dataSourceId = dataSourceId,
        jobDefinitionName = jobDefinitionName,
        lastModifiedTime = lastModifiedTime,
        resourceGroupName = resourceGroupName,
        runLocation = runLocation,
        schedules = schedules,
        state = state,
        userConfirmation = userConfirmation,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy