Dsc Configuration Args
data class DscConfigurationArgs(val automationAccountName: Output<String>? = null, val configurationName: Output<String>? = null, val description: Output<String>? = null, val location: Output<String>? = null, val logProgress: Output<Boolean>? = null, val logVerbose: Output<Boolean>? = null, val name: Output<String>? = null, val parameters: Output<Map<String, DscConfigurationParameterArgs>>? = null, val resourceGroupName: Output<String>? = null, val source: Output<ContentSourceArgs>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<DscConfigurationArgs>
Definition of the configuration type. Uses Azure REST API version 2022-08-08. In version 1.x of the Azure Native provider, it used API version 2019-06-01. Other available API versions: 2023-05-15-preview, 2023-11-01, 2024-10-23.
Example Usage
Create or Update Configuration
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""
}
}
}",
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:automation:DscConfiguration SetupServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(automationAccountName: Output<String>? = null, configurationName: Output<String>? = null, description: Output<String>? = null, location: Output<String>? = null, logProgress: Output<Boolean>? = null, logVerbose: Output<Boolean>? = null, name: Output<String>? = null, parameters: Output<Map<String, DscConfigurationParameterArgs>>? = null, resourceGroupName: Output<String>? = null, source: Output<ContentSourceArgs>? = null, tags: Output<Map<String, String>>? = null)
Properties
Link copied to clipboard
The name of the automation account.
Link copied to clipboard
The create or update parameters for configuration.
Link copied to clipboard
Gets or sets the description of the configuration.
Link copied to clipboard
Gets or sets progress log option.
Link copied to clipboard
Gets or sets verbose log option.
Link copied to clipboard
Gets or sets the configuration parameters.
Link copied to clipboard
Name of an Azure Resource group.
Link copied to clipboard
Gets or sets the source.