Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.automation.kotlin.DscConfigurationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.automation.kotlin
import com.pulumi.azurenative.automation.DscConfigurationArgs.builder
import com.pulumi.azurenative.automation.kotlin.inputs.ContentSourceArgs
import com.pulumi.azurenative.automation.kotlin.inputs.ContentSourceArgsBuilder
import com.pulumi.azurenative.automation.kotlin.inputs.DscConfigurationParameterArgs
import com.pulumi.azurenative.automation.kotlin.inputs.DscConfigurationParameterArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Definition of the configuration type.
* Azure REST API version: 2022-08-08. Prior API version in Azure Native 1.x: 2019-06-01.
* Other available API versions: 2023-05-15-preview, 2023-11-01.
* ## Example Usage
* ### Create or Update Configuration
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var dscConfiguration = new AzureNative.Automation.DscConfiguration("dscConfiguration", new()
* {
* AutomationAccountName = "myAutomationAccount18",
* ConfigurationName = "SetupServer",
* Description = "sample configuration",
* Location = "East US 2",
* Name = "SetupServer",
* ResourceGroupName = "rg",
* Source = new AzureNative.Automation.Inputs.ContentSourceArgs
* {
* Hash = new AzureNative.Automation.Inputs.ContentHashArgs
* {
* Algorithm = "sha256",
* Value = "A9E5DB56BA21513F61E0B3868816FDC6D4DF5131F5617D7FF0D769674BD5072F",
* },
* Type = AzureNative.Automation.ContentSourceType.EmbeddedContent,
* Value = @"Configuration SetupServer {
* Node localhost {
* WindowsFeature IIS {
* Name = ""Web-Server"";
* Ensure = ""Present""
* }
* }
* }",
* },
* });
* });
* ```
* ```go
* package main
* import (
* automation "github.com/pulumi/pulumi-azure-native-sdk/automation/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := automation.NewDscConfiguration(ctx, "dscConfiguration", &automation.DscConfigurationArgs{
* AutomationAccountName: pulumi.String("myAutomationAccount18"),
* ConfigurationName: pulumi.String("SetupServer"),
* Description: pulumi.String("sample configuration"),
* Location: pulumi.String("East US 2"),
* Name: pulumi.String("SetupServer"),
* ResourceGroupName: pulumi.String("rg"),
* Source: &automation.ContentSourceArgs{
* Hash: &automation.ContentHashArgs{
* Algorithm: pulumi.String("sha256"),
* Value: pulumi.String("A9E5DB56BA21513F61E0B3868816FDC6D4DF5131F5617D7FF0D769674BD5072F"),
* },
* Type: pulumi.String(automation.ContentSourceTypeEmbeddedContent),
* Value: pulumi.String(`Configuration SetupServer {
* Node localhost {
* WindowsFeature IIS {
* Name = "Web-Server";
* Ensure = "Present"
* }
* }
* }`),
* },
* })
* 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.automation.DscConfiguration;
* import com.pulumi.azurenative.automation.DscConfigurationArgs;
* import com.pulumi.azurenative.automation.inputs.ContentSourceArgs;
* import com.pulumi.azurenative.automation.inputs.ContentHashArgs;
* 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 dscConfiguration = new DscConfiguration("dscConfiguration", DscConfigurationArgs.builder()
* .automationAccountName("myAutomationAccount18")
* .configurationName("SetupServer")
* .description("sample configuration")
* .location("East US 2")
* .name("SetupServer")
* .resourceGroupName("rg")
* .source(ContentSourceArgs.builder()
* .hash(ContentHashArgs.builder()
* .algorithm("sha256")
* .value("A9E5DB56BA21513F61E0B3868816FDC6D4DF5131F5617D7FF0D769674BD5072F")
* .build())
* .type("embeddedContent")
* .value("""
* Configuration SetupServer {
* Node localhost {
* WindowsFeature IIS {
* Name = "Web-Server";
* Ensure = "Present"
* }
* }
* } """)
* .build())
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:automation:DscConfiguration SetupServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}
* ```
* @property automationAccountName The name of the automation account.
* @property configurationName The create or update parameters for configuration.
* @property description Gets or sets the description of the configuration.
* @property location Gets or sets the location of the resource.
* @property logProgress Gets or sets progress log option.
* @property logVerbose Gets or sets verbose log option.
* @property name Gets or sets name of the resource.
* @property parameters Gets or sets the configuration parameters.
* @property resourceGroupName Name of an Azure Resource group.
* @property source Gets or sets the source.
* @property tags Gets or sets the tags attached to the resource.
*/
public data class DscConfigurationArgs(
public val automationAccountName: Output? = null,
public val configurationName: Output? = null,
public val description: Output? = null,
public val location: Output? = null,
public val logProgress: Output? = null,
public val logVerbose: Output? = null,
public val name: Output? = null,
public val parameters: Output>? = null,
public val resourceGroupName: Output? = null,
public val source: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.automation.DscConfigurationArgs =
com.pulumi.azurenative.automation.DscConfigurationArgs.builder()
.automationAccountName(automationAccountName?.applyValue({ args0 -> args0 }))
.configurationName(configurationName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.location(location?.applyValue({ args0 -> args0 }))
.logProgress(logProgress?.applyValue({ args0 -> args0 }))
.logVerbose(logVerbose?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.parameters(
parameters?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
}).toMap()
}),
)
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [DscConfigurationArgs].
*/
@PulumiTagMarker
public class DscConfigurationArgsBuilder internal constructor() {
private var automationAccountName: Output? = null
private var configurationName: Output? = null
private var description: Output? = null
private var location: Output? = null
private var logProgress: Output? = null
private var logVerbose: Output? = null
private var name: Output? = null
private var parameters: Output>? = null
private var resourceGroupName: Output? = null
private var source: Output? = null
private var tags: Output>? = null
/**
* @param value The name of the automation account.
*/
@JvmName("mddtijadruxhfflv")
public suspend fun automationAccountName(`value`: Output) {
this.automationAccountName = value
}
/**
* @param value The create or update parameters for configuration.
*/
@JvmName("cvsvejkrxsxhnxow")
public suspend fun configurationName(`value`: Output) {
this.configurationName = value
}
/**
* @param value Gets or sets the description of the configuration.
*/
@JvmName("dduikxtnkmerbbvx")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value Gets or sets the location of the resource.
*/
@JvmName("xjohijocvprhnjpc")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Gets or sets progress log option.
*/
@JvmName("cpcagbaiigfhnuvb")
public suspend fun logProgress(`value`: Output) {
this.logProgress = value
}
/**
* @param value Gets or sets verbose log option.
*/
@JvmName("jxerfctlmnlxtsaw")
public suspend fun logVerbose(`value`: Output) {
this.logVerbose = value
}
/**
* @param value Gets or sets name of the resource.
*/
@JvmName("xvxohqatiesrlxfe")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value Gets or sets the configuration parameters.
*/
@JvmName("qojawwrtidciwclb")
public suspend fun parameters(`value`: Output>) {
this.parameters = value
}
/**
* @param value Name of an Azure Resource group.
*/
@JvmName("xoqejetsgkmqbypc")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value Gets or sets the source.
*/
@JvmName("bsxvwtjxpcpwmqkj")
public suspend fun source(`value`: Output) {
this.source = value
}
/**
* @param value Gets or sets the tags attached to the resource.
*/
@JvmName("ncckxtjtkxyvrexa")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value The name of the automation account.
*/
@JvmName("qsbmxbuijmdwerel")
public suspend fun automationAccountName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.automationAccountName = mapped
}
/**
* @param value The create or update parameters for configuration.
*/
@JvmName("fafqgcbqcdqfuvvn")
public suspend fun configurationName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.configurationName = mapped
}
/**
* @param value Gets or sets the description of the configuration.
*/
@JvmName("ugxoywkxqgxdphep")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value Gets or sets the location of the resource.
*/
@JvmName("yujolwuoqnjnnfov")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Gets or sets progress log option.
*/
@JvmName("jalkpwjkucgqpoif")
public suspend fun logProgress(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logProgress = mapped
}
/**
* @param value Gets or sets verbose log option.
*/
@JvmName("vknhxvblrsqfbvtk")
public suspend fun logVerbose(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.logVerbose = mapped
}
/**
* @param value Gets or sets name of the resource.
*/
@JvmName("bdcmnmaolmdipack")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value Gets or sets the configuration parameters.
*/
@JvmName("wxphawlvlujrdurr")
public suspend fun parameters(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param argument Gets or sets the configuration parameters.
*/
@JvmName("dvbijpysjoqhfxnb")
public suspend fun parameters(vararg argument: Pair Unit>) {
val toBeMapped = argument.toList().map { (left, right) ->
left to
DscConfigurationParameterArgsBuilder().applySuspend { right() }.build()
}.toMap()
val mapped = of(toBeMapped)
this.parameters = mapped
}
/**
* @param values Gets or sets the configuration parameters.
*/
@JvmName("ektpvldsaloaldoy")
public fun parameters(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.parameters = mapped
}
/**
* @param value Name of an Azure Resource group.
*/
@JvmName("dqhexqkxqfoprwvj")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value Gets or sets the source.
*/
@JvmName("aidfnrfcfbamrttj")
public suspend fun source(`value`: ContentSourceArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.source = mapped
}
/**
* @param argument Gets or sets the source.
*/
@JvmName("doiqqavbmajroyjk")
public suspend fun source(argument: suspend ContentSourceArgsBuilder.() -> Unit) {
val toBeMapped = ContentSourceArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.source = mapped
}
/**
* @param value Gets or sets the tags attached to the resource.
*/
@JvmName("hobhvnbcwrvdydlu")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Gets or sets the tags attached to the resource.
*/
@JvmName("aeqsxfxwtaqaqmmy")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): DscConfigurationArgs = DscConfigurationArgs(
automationAccountName = automationAccountName,
configurationName = configurationName,
description = description,
location = location,
logProgress = logProgress,
logVerbose = logVerbose,
name = name,
parameters = parameters,
resourceGroupName = resourceGroupName,
source = source,
tags = tags,
)
}