DscConfiguration

class DscConfiguration : KotlinCustomResource

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""
}
}
}",
},
});
});
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
})
}
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.

$ pulumi import azure-native:automation:DscConfiguration SetupServer /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/configurations/{configurationName}

Properties

Link copied to clipboard
val creationTime: Output<String>?

Gets or sets the creation time.

Link copied to clipboard
val description: Output<String>?

Gets or sets the description.

Link copied to clipboard
val etag: Output<String>?

Gets or sets the etag of the resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val jobCount: Output<Int>?

Gets or sets the job count of the configuration.

Link copied to clipboard
val lastModifiedTime: Output<String>?

Gets or sets the last modified time.

Link copied to clipboard
val location: Output<String>?

The Azure Region where the resource lives

Link copied to clipboard
val logVerbose: Output<Boolean>?

Gets or sets verbose log option.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

Gets the number of compiled node configurations.

Link copied to clipboard

Gets or sets the configuration parameters.

Link copied to clipboard

Gets or sets the provisioning state of the configuration.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Gets or sets the source.

Link copied to clipboard
val state: Output<String>?

Gets or sets the state of the configuration.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard
val type: Output<String>

The type of the resource.

Link copied to clipboard
val urn: Output<String>