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

com.pulumi.azure.automation.kotlin.SoftwareUpdateConfigurationArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.automation.kotlin

import com.pulumi.azure.automation.SoftwareUpdateConfigurationArgs.builder
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationLinuxArgs
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationLinuxArgsBuilder
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationPostTaskArgs
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationPostTaskArgsBuilder
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationPreTaskArgs
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationPreTaskArgsBuilder
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationScheduleArgs
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationScheduleArgsBuilder
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationTargetArgs
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationTargetArgsBuilder
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationWindowsArgs
import com.pulumi.azure.automation.kotlin.inputs.SoftwareUpdateConfigurationWindowsArgsBuilder
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Manages an Automation Software Update Configuraion.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-rg",
 *     location: "East US",
 * });
 * const exampleAccount = new azure.automation.Account("example", {
 *     name: "example",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     skuName: "Basic",
 * });
 * const exampleRunBook = new azure.automation.RunBook("example", {
 *     name: "Get-AzureVMTutorial",
 *     location: example.location,
 *     resourceGroupName: example.name,
 *     automationAccountName: exampleAccount.name,
 *     logVerbose: true,
 *     logProgress: true,
 *     description: "This is a example runbook for terraform acceptance example",
 *     runbookType: "Python3",
 *     content: `# Some example content
 * # for Terraform acceptance example
 * `,
 *     tags: {
 *         ENV: "runbook_test",
 *     },
 * });
 * const exampleSoftwareUpdateConfiguration = new azure.automation.SoftwareUpdateConfiguration("example", {
 *     name: "example",
 *     automationAccountId: exampleAccount.id,
 *     operatingSystem: "Linux",
 *     linuxes: [{
 *         classificationIncluded: "Security",
 *         excludedPackages: ["apt"],
 *         includedPackages: ["vim"],
 *         reboot: "IfRequired",
 *     }],
 *     preTasks: [{
 *         source: exampleRunBook.name,
 *         parameters: {
 *             COMPUTER_NAME: "Foo",
 *         },
 *     }],
 *     duration: "PT2H2M2S",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-rg",
 *     location="East US")
 * example_account = azure.automation.Account("example",
 *     name="example",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     sku_name="Basic")
 * example_run_book = azure.automation.RunBook("example",
 *     name="Get-AzureVMTutorial",
 *     location=example.location,
 *     resource_group_name=example.name,
 *     automation_account_name=example_account.name,
 *     log_verbose=True,
 *     log_progress=True,
 *     description="This is a example runbook for terraform acceptance example",
 *     runbook_type="Python3",
 *     content="""# Some example content
 * # for Terraform acceptance example
 * """,
 *     tags={
 *         "ENV": "runbook_test",
 *     })
 * example_software_update_configuration = azure.automation.SoftwareUpdateConfiguration("example",
 *     name="example",
 *     automation_account_id=example_account.id,
 *     operating_system="Linux",
 *     linuxes=[azure.automation.SoftwareUpdateConfigurationLinuxArgs(
 *         classification_included="Security",
 *         excluded_packages=["apt"],
 *         included_packages=["vim"],
 *         reboot="IfRequired",
 *     )],
 *     pre_tasks=[azure.automation.SoftwareUpdateConfigurationPreTaskArgs(
 *         source=example_run_book.name,
 *         parameters={
 *             "COMPUTER_NAME": "Foo",
 *         },
 *     )],
 *     duration="PT2H2M2S")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-rg",
 *         Location = "East US",
 *     });
 *     var exampleAccount = new Azure.Automation.Account("example", new()
 *     {
 *         Name = "example",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         SkuName = "Basic",
 *     });
 *     var exampleRunBook = new Azure.Automation.RunBook("example", new()
 *     {
 *         Name = "Get-AzureVMTutorial",
 *         Location = example.Location,
 *         ResourceGroupName = example.Name,
 *         AutomationAccountName = exampleAccount.Name,
 *         LogVerbose = true,
 *         LogProgress = true,
 *         Description = "This is a example runbook for terraform acceptance example",
 *         RunbookType = "Python3",
 *         Content = @"# Some example content
 * # for Terraform acceptance example
 * ",
 *         Tags =
 *         {
 *             { "ENV", "runbook_test" },
 *         },
 *     });
 *     var exampleSoftwareUpdateConfiguration = new Azure.Automation.SoftwareUpdateConfiguration("example", new()
 *     {
 *         Name = "example",
 *         AutomationAccountId = exampleAccount.Id,
 *         OperatingSystem = "Linux",
 *         Linuxes = new[]
 *         {
 *             new Azure.Automation.Inputs.SoftwareUpdateConfigurationLinuxArgs
 *             {
 *                 ClassificationIncluded = "Security",
 *                 ExcludedPackages = new[]
 *                 {
 *                     "apt",
 *                 },
 *                 IncludedPackages = new[]
 *                 {
 *                     "vim",
 *                 },
 *                 Reboot = "IfRequired",
 *             },
 *         },
 *         PreTasks = new[]
 *         {
 *             new Azure.Automation.Inputs.SoftwareUpdateConfigurationPreTaskArgs
 *             {
 *                 Source = exampleRunBook.Name,
 *                 Parameters =
 *                 {
 *                     { "COMPUTER_NAME", "Foo" },
 *                 },
 *             },
 *         },
 *         Duration = "PT2H2M2S",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-rg"),
 * 			Location: pulumi.String("East US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
 * 			Name:              pulumi.String("example"),
 * 			Location:          example.Location,
 * 			ResourceGroupName: example.Name,
 * 			SkuName:           pulumi.String("Basic"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleRunBook, err := automation.NewRunBook(ctx, "example", &automation.RunBookArgs{
 * 			Name:                  pulumi.String("Get-AzureVMTutorial"),
 * 			Location:              example.Location,
 * 			ResourceGroupName:     example.Name,
 * 			AutomationAccountName: exampleAccount.Name,
 * 			LogVerbose:            pulumi.Bool(true),
 * 			LogProgress:           pulumi.Bool(true),
 * 			Description:           pulumi.String("This is a example runbook for terraform acceptance example"),
 * 			RunbookType:           pulumi.String("Python3"),
 * 			Content:               pulumi.String("# Some example content\n# for Terraform acceptance example\n"),
 * 			Tags: pulumi.StringMap{
 * 				"ENV": pulumi.String("runbook_test"),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = automation.NewSoftwareUpdateConfiguration(ctx, "example", &automation.SoftwareUpdateConfigurationArgs{
 * 			Name:                pulumi.String("example"),
 * 			AutomationAccountId: exampleAccount.ID(),
 * 			OperatingSystem:     pulumi.String("Linux"),
 * 			Linuxes: automation.SoftwareUpdateConfigurationLinuxArray{
 * 				&automation.SoftwareUpdateConfigurationLinuxArgs{
 * 					ClassificationIncluded: pulumi.String("Security"),
 * 					ExcludedPackages: pulumi.StringArray{
 * 						pulumi.String("apt"),
 * 					},
 * 					IncludedPackages: pulumi.StringArray{
 * 						pulumi.String("vim"),
 * 					},
 * 					Reboot: pulumi.String("IfRequired"),
 * 				},
 * 			},
 * 			PreTasks: automation.SoftwareUpdateConfigurationPreTaskArray{
 * 				&automation.SoftwareUpdateConfigurationPreTaskArgs{
 * 					Source: exampleRunBook.Name,
 * 					Parameters: pulumi.StringMap{
 * 						"COMPUTER_NAME": pulumi.String("Foo"),
 * 					},
 * 				},
 * 			},
 * 			Duration: pulumi.String("PT2H2M2S"),
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.automation.Account;
 * import com.pulumi.azure.automation.AccountArgs;
 * import com.pulumi.azure.automation.RunBook;
 * import com.pulumi.azure.automation.RunBookArgs;
 * import com.pulumi.azure.automation.SoftwareUpdateConfiguration;
 * import com.pulumi.azure.automation.SoftwareUpdateConfigurationArgs;
 * import com.pulumi.azure.automation.inputs.SoftwareUpdateConfigurationLinuxArgs;
 * import com.pulumi.azure.automation.inputs.SoftwareUpdateConfigurationPreTaskArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-rg")
 *             .location("East US")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("example")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .skuName("Basic")
 *             .build());
 *         var exampleRunBook = new RunBook("exampleRunBook", RunBookArgs.builder()
 *             .name("Get-AzureVMTutorial")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .automationAccountName(exampleAccount.name())
 *             .logVerbose("true")
 *             .logProgress("true")
 *             .description("This is a example runbook for terraform acceptance example")
 *             .runbookType("Python3")
 *             .content("""
 * # Some example content
 * # for Terraform acceptance example
 *             """)
 *             .tags(Map.of("ENV", "runbook_test"))
 *             .build());
 *         var exampleSoftwareUpdateConfiguration = new SoftwareUpdateConfiguration("exampleSoftwareUpdateConfiguration", SoftwareUpdateConfigurationArgs.builder()
 *             .name("example")
 *             .automationAccountId(exampleAccount.id())
 *             .operatingSystem("Linux")
 *             .linuxes(SoftwareUpdateConfigurationLinuxArgs.builder()
 *                 .classificationIncluded("Security")
 *                 .excludedPackages("apt")
 *                 .includedPackages("vim")
 *                 .reboot("IfRequired")
 *                 .build())
 *             .preTasks(SoftwareUpdateConfigurationPreTaskArgs.builder()
 *                 .source(exampleRunBook.name())
 *                 .parameters(Map.of("COMPUTER_NAME", "Foo"))
 *                 .build())
 *             .duration("PT2H2M2S")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-rg
 *       location: East US
 *   exampleAccount:
 *     type: azure:automation:Account
 *     name: example
 *     properties:
 *       name: example
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       skuName: Basic
 *   exampleRunBook:
 *     type: azure:automation:RunBook
 *     name: example
 *     properties:
 *       name: Get-AzureVMTutorial
 *       location: ${example.location}
 *       resourceGroupName: ${example.name}
 *       automationAccountName: ${exampleAccount.name}
 *       logVerbose: 'true'
 *       logProgress: 'true'
 *       description: This is a example runbook for terraform acceptance example
 *       runbookType: Python3
 *       content: |
 *         # Some example content
 *         # for Terraform acceptance example
 *       tags:
 *         ENV: runbook_test
 *   exampleSoftwareUpdateConfiguration:
 *     type: azure:automation:SoftwareUpdateConfiguration
 *     name: example
 *     properties:
 *       name: example
 *       automationAccountId: ${exampleAccount.id}
 *       operatingSystem: Linux
 *       linuxes:
 *         - classificationIncluded: Security
 *           excludedPackages:
 *             - apt
 *           includedPackages:
 *             - vim
 *           reboot: IfRequired
 *       preTasks:
 *         - source: ${exampleRunBook.name}
 *           parameters:
 *             COMPUTER_NAME: Foo
 *       duration: PT2H2M2S
 * ```
 * 
 * ## Import
 * Automations Software Update Configuration can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:automation/softwareUpdateConfiguration:SoftwareUpdateConfiguration example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/softwareUpdateConfigurations/suc1
 * ```
 * @property automationAccountId The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
 * @property duration Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
 * @property linuxes A `linux` block as defined below.
 * @property name The name which should be used for this Automation. Changing this forces a new Automation to be created.
 * @property nonAzureComputerNames Specifies a list of names of non-Azure machines for the software update configuration.
 * @property operatingSystem
 * @property postTasks A `post_task` blocks as defined below.
 * @property preTasks A `pre_task` blocks as defined below.
 * @property schedules A `schedule` blocks as defined below.
 * @property target A `target` blocks as defined below.
 * @property virtualMachineIds Specifies a list of Azure Resource IDs of azure virtual machines.
 * @property windows A `windows` block as defined below.
 * > **NOTE:** One of `linux` or `windows` must be specified.
 */
public data class SoftwareUpdateConfigurationArgs(
    public val automationAccountId: Output? = null,
    public val duration: Output? = null,
    public val linuxes: Output>? = null,
    public val name: Output? = null,
    public val nonAzureComputerNames: Output>? = null,
    @Deprecated(
        message = """
  This property has been deprecated and will be removed in a future release. The use of either the
      `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the
      provider.
  """,
    )
    public val operatingSystem: Output? = null,
    public val postTasks: Output>? = null,
    public val preTasks: Output>? = null,
    public val schedules: Output>? = null,
    public val target: Output? = null,
    public val virtualMachineIds: Output>? = null,
    public val windows: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.automation.SoftwareUpdateConfigurationArgs =
        com.pulumi.azure.automation.SoftwareUpdateConfigurationArgs.builder()
            .automationAccountId(automationAccountId?.applyValue({ args0 -> args0 }))
            .duration(duration?.applyValue({ args0 -> args0 }))
            .linuxes(
                linuxes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .nonAzureComputerNames(nonAzureComputerNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .operatingSystem(operatingSystem?.applyValue({ args0 -> args0 }))
            .postTasks(
                postTasks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .preTasks(
                preTasks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .schedules(
                schedules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .virtualMachineIds(virtualMachineIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .windows(windows?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [SoftwareUpdateConfigurationArgs].
 */
@PulumiTagMarker
public class SoftwareUpdateConfigurationArgsBuilder internal constructor() {
    private var automationAccountId: Output? = null

    private var duration: Output? = null

    private var linuxes: Output>? = null

    private var name: Output? = null

    private var nonAzureComputerNames: Output>? = null

    private var operatingSystem: Output? = null

    private var postTasks: Output>? = null

    private var preTasks: Output>? = null

    private var schedules: Output>? = null

    private var target: Output? = null

    private var virtualMachineIds: Output>? = null

    private var windows: Output? = null

    /**
     * @param value The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
     */
    @JvmName("ouiqdondimlyvuxm")
    public suspend fun automationAccountId(`value`: Output) {
        this.automationAccountId = value
    }

    /**
     * @param value Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
     */
    @JvmName("wpnalfyljpgledob")
    public suspend fun duration(`value`: Output) {
        this.duration = value
    }

    /**
     * @param value A `linux` block as defined below.
     */
    @JvmName("ygjkrfhnghmgjmrw")
    public suspend fun linuxes(`value`: Output>) {
        this.linuxes = value
    }

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

    /**
     * @param values A `linux` block as defined below.
     */
    @JvmName("cuoswvvhmvqoqslo")
    public suspend fun linuxes(values: List>) {
        this.linuxes = Output.all(values)
    }

    /**
     * @param value The name which should be used for this Automation. Changing this forces a new Automation to be created.
     */
    @JvmName("nnrqkbnsvuboveyl")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Specifies a list of names of non-Azure machines for the software update configuration.
     */
    @JvmName("pskpsuowcbwispmi")
    public suspend fun nonAzureComputerNames(`value`: Output>) {
        this.nonAzureComputerNames = value
    }

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

    /**
     * @param values Specifies a list of names of non-Azure machines for the software update configuration.
     */
    @JvmName("padjmrlmjeewlqdl")
    public suspend fun nonAzureComputerNames(values: List>) {
        this.nonAzureComputerNames = Output.all(values)
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been deprecated and will be removed in a future release. The use of either the
      `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the
      provider.
  """,
    )
    @JvmName("qfnubytaxqwktswb")
    public suspend fun operatingSystem(`value`: Output) {
        this.operatingSystem = value
    }

    /**
     * @param value A `post_task` blocks as defined below.
     */
    @JvmName("gmswhfnhwldwdchu")
    public suspend fun postTasks(`value`: Output>) {
        this.postTasks = value
    }

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

    /**
     * @param values A `post_task` blocks as defined below.
     */
    @JvmName("lvjvywahiaigqgku")
    public suspend fun postTasks(values: List>) {
        this.postTasks = Output.all(values)
    }

    /**
     * @param value A `pre_task` blocks as defined below.
     */
    @JvmName("tqmrmeohgufeukhf")
    public suspend fun preTasks(`value`: Output>) {
        this.preTasks = value
    }

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

    /**
     * @param values A `pre_task` blocks as defined below.
     */
    @JvmName("dxcxwhoqvodysldo")
    public suspend fun preTasks(values: List>) {
        this.preTasks = Output.all(values)
    }

    /**
     * @param value A `schedule` blocks as defined below.
     */
    @JvmName("sevtkflxpdkdmyhb")
    public suspend fun schedules(`value`: Output>) {
        this.schedules = value
    }

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

    /**
     * @param values A `schedule` blocks as defined below.
     */
    @JvmName("qaigjgvhyjscifue")
    public suspend fun schedules(values: List>) {
        this.schedules = Output.all(values)
    }

    /**
     * @param value A `target` blocks as defined below.
     */
    @JvmName("ygbbjqvvssrvofds")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value Specifies a list of Azure Resource IDs of azure virtual machines.
     */
    @JvmName("xwpsmvlqqxiexllu")
    public suspend fun virtualMachineIds(`value`: Output>) {
        this.virtualMachineIds = value
    }

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

    /**
     * @param values Specifies a list of Azure Resource IDs of azure virtual machines.
     */
    @JvmName("vfyhaetsknruclpe")
    public suspend fun virtualMachineIds(values: List>) {
        this.virtualMachineIds = Output.all(values)
    }

    /**
     * @param value A `windows` block as defined below.
     * > **NOTE:** One of `linux` or `windows` must be specified.
     */
    @JvmName("tmkukgqhxhwmkgge")
    public suspend fun windows(`value`: Output) {
        this.windows = value
    }

    /**
     * @param value The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.
     */
    @JvmName("qqngsottrmctopgd")
    public suspend fun automationAccountId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.automationAccountId = mapped
    }

    /**
     * @param value Maximum time allowed for the software update configuration run. using format `PT[n]H[n]M[n]S` as per ISO8601. Defaults to `PT2H`.
     */
    @JvmName("nfpiadsbjievawkd")
    public suspend fun duration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.duration = mapped
    }

    /**
     * @param value A `linux` block as defined below.
     */
    @JvmName("cvlhgwewwcwfjfxy")
    public suspend fun linuxes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.linuxes = mapped
    }

    /**
     * @param argument A `linux` block as defined below.
     */
    @JvmName("cwddykfmmaccujpp")
    public suspend
    fun linuxes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationLinuxArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.linuxes = mapped
    }

    /**
     * @param argument A `linux` block as defined below.
     */
    @JvmName("etpcppbhnnhdlpjp")
    public suspend fun linuxes(
        vararg
        argument: suspend SoftwareUpdateConfigurationLinuxArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationLinuxArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.linuxes = mapped
    }

    /**
     * @param argument A `linux` block as defined below.
     */
    @JvmName("ifiyvebfwniafqmq")
    public suspend
    fun linuxes(argument: suspend SoftwareUpdateConfigurationLinuxArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SoftwareUpdateConfigurationLinuxArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.linuxes = mapped
    }

    /**
     * @param values A `linux` block as defined below.
     */
    @JvmName("oblsyusuaxthrqen")
    public suspend fun linuxes(vararg values: SoftwareUpdateConfigurationLinuxArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.linuxes = mapped
    }

    /**
     * @param value The name which should be used for this Automation. Changing this forces a new Automation to be created.
     */
    @JvmName("arxalwamkksocdql")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Specifies a list of names of non-Azure machines for the software update configuration.
     */
    @JvmName("fjjpaalrfmppkfyh")
    public suspend fun nonAzureComputerNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nonAzureComputerNames = mapped
    }

    /**
     * @param values Specifies a list of names of non-Azure machines for the software update configuration.
     */
    @JvmName("roetiuniiocmtkcu")
    public suspend fun nonAzureComputerNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.nonAzureComputerNames = mapped
    }

    /**
     * @param value
     */
    @Deprecated(
        message = """
  This property has been deprecated and will be removed in a future release. The use of either the
      `linux` or `windows` blocks replaces setting this value directly. This value is ignored by the
      provider.
  """,
    )
    @JvmName("koxcyaqescyuenaw")
    public suspend fun operatingSystem(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.operatingSystem = mapped
    }

    /**
     * @param value A `post_task` blocks as defined below.
     */
    @JvmName("mjfpbmdbopfsccmc")
    public suspend fun postTasks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.postTasks = mapped
    }

    /**
     * @param argument A `post_task` blocks as defined below.
     */
    @JvmName("eodifyrigkmchbxu")
    public suspend
    fun postTasks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationPostTaskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.postTasks = mapped
    }

    /**
     * @param argument A `post_task` blocks as defined below.
     */
    @JvmName("lmmjyjqldsdwgdyq")
    public suspend fun postTasks(
        vararg
        argument: suspend SoftwareUpdateConfigurationPostTaskArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationPostTaskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.postTasks = mapped
    }

    /**
     * @param argument A `post_task` blocks as defined below.
     */
    @JvmName("bvumusanmarkhhos")
    public suspend
    fun postTasks(argument: suspend SoftwareUpdateConfigurationPostTaskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SoftwareUpdateConfigurationPostTaskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.postTasks = mapped
    }

    /**
     * @param values A `post_task` blocks as defined below.
     */
    @JvmName("wdewcvicgxfwtvuh")
    public suspend fun postTasks(vararg values: SoftwareUpdateConfigurationPostTaskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.postTasks = mapped
    }

    /**
     * @param value A `pre_task` blocks as defined below.
     */
    @JvmName("edqihfhmfogebxfh")
    public suspend fun preTasks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preTasks = mapped
    }

    /**
     * @param argument A `pre_task` blocks as defined below.
     */
    @JvmName("eaxrdyiyegcmgrti")
    public suspend
    fun preTasks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationPreTaskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.preTasks = mapped
    }

    /**
     * @param argument A `pre_task` blocks as defined below.
     */
    @JvmName("xmgmnvvpgxrwnjpj")
    public suspend fun preTasks(
        vararg
        argument: suspend SoftwareUpdateConfigurationPreTaskArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationPreTaskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.preTasks = mapped
    }

    /**
     * @param argument A `pre_task` blocks as defined below.
     */
    @JvmName("cljqnfewjhdlohsy")
    public suspend
    fun preTasks(argument: suspend SoftwareUpdateConfigurationPreTaskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SoftwareUpdateConfigurationPreTaskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.preTasks = mapped
    }

    /**
     * @param values A `pre_task` blocks as defined below.
     */
    @JvmName("xacbflliwtbvlwuq")
    public suspend fun preTasks(vararg values: SoftwareUpdateConfigurationPreTaskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.preTasks = mapped
    }

    /**
     * @param value A `schedule` blocks as defined below.
     */
    @JvmName("yetleabffejomqvy")
    public suspend fun schedules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schedules = mapped
    }

    /**
     * @param argument A `schedule` blocks as defined below.
     */
    @JvmName("afvcoogaxwqbrjdm")
    public suspend
    fun schedules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationScheduleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.schedules = mapped
    }

    /**
     * @param argument A `schedule` blocks as defined below.
     */
    @JvmName("qpikckqtrnkwkggb")
    public suspend fun schedules(
        vararg
        argument: suspend SoftwareUpdateConfigurationScheduleArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            SoftwareUpdateConfigurationScheduleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.schedules = mapped
    }

    /**
     * @param argument A `schedule` blocks as defined below.
     */
    @JvmName("vmikwleklwsrcxwf")
    public suspend
    fun schedules(argument: suspend SoftwareUpdateConfigurationScheduleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SoftwareUpdateConfigurationScheduleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.schedules = mapped
    }

    /**
     * @param values A `schedule` blocks as defined below.
     */
    @JvmName("ahrjxrqbqtwhphvw")
    public suspend fun schedules(vararg values: SoftwareUpdateConfigurationScheduleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.schedules = mapped
    }

    /**
     * @param value A `target` blocks as defined below.
     */
    @JvmName("qojojkbwkhoeujgk")
    public suspend fun target(`value`: SoftwareUpdateConfigurationTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param argument A `target` blocks as defined below.
     */
    @JvmName("riwckjbidwxhhjva")
    public suspend
    fun target(argument: suspend SoftwareUpdateConfigurationTargetArgsBuilder.() -> Unit) {
        val toBeMapped = SoftwareUpdateConfigurationTargetArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.target = mapped
    }

    /**
     * @param value Specifies a list of Azure Resource IDs of azure virtual machines.
     */
    @JvmName("ctqfdmwvdkumqwja")
    public suspend fun virtualMachineIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualMachineIds = mapped
    }

    /**
     * @param values Specifies a list of Azure Resource IDs of azure virtual machines.
     */
    @JvmName("rmojcmputxwwckpf")
    public suspend fun virtualMachineIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.virtualMachineIds = mapped
    }

    /**
     * @param value A `windows` block as defined below.
     * > **NOTE:** One of `linux` or `windows` must be specified.
     */
    @JvmName("fgiilelcfobnxuea")
    public suspend fun windows(`value`: SoftwareUpdateConfigurationWindowsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.windows = mapped
    }

    /**
     * @param argument A `windows` block as defined below.
     * > **NOTE:** One of `linux` or `windows` must be specified.
     */
    @JvmName("axdfvrihtyxdibls")
    public suspend
    fun windows(argument: suspend SoftwareUpdateConfigurationWindowsArgsBuilder.() -> Unit) {
        val toBeMapped = SoftwareUpdateConfigurationWindowsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.windows = mapped
    }

    internal fun build(): SoftwareUpdateConfigurationArgs = SoftwareUpdateConfigurationArgs(
        automationAccountId = automationAccountId,
        duration = duration,
        linuxes = linuxes,
        name = name,
        nonAzureComputerNames = nonAzureComputerNames,
        operatingSystem = operatingSystem,
        postTasks = postTasks,
        preTasks = preTasks,
        schedules = schedules,
        target = target,
        virtualMachineIds = virtualMachineIds,
        windows = windows,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy