com.pulumi.azurenative.automation.DscConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-native Show documentation
Show all versions of azure-native Show documentation
A native Pulumi package for creating and managing Azure resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.azurenative.automation;
import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.automation.DscConfigurationArgs;
import com.pulumi.azurenative.automation.outputs.ContentSourceResponse;
import com.pulumi.azurenative.automation.outputs.DscConfigurationParameterResponse;
import com.pulumi.core.Alias;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* 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
*
*
* {@code
* 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}
* ```
*
*/
@ResourceType(type="azure-native:automation:DscConfiguration")
public class DscConfiguration extends com.pulumi.resources.CustomResource {
/**
* Gets or sets the creation time.
*
*/
@Export(name="creationTime", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> creationTime;
/**
* @return Gets or sets the creation time.
*
*/
public Output> creationTime() {
return Codegen.optional(this.creationTime);
}
/**
* Gets or sets the description.
*
*/
@Export(name="description", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> description;
/**
* @return Gets or sets the description.
*
*/
public Output> description() {
return Codegen.optional(this.description);
}
/**
* Gets or sets the etag of the resource.
*
*/
@Export(name="etag", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> etag;
/**
* @return Gets or sets the etag of the resource.
*
*/
public Output> etag() {
return Codegen.optional(this.etag);
}
/**
* Gets or sets the job count of the configuration.
*
*/
@Export(name="jobCount", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> jobCount;
/**
* @return Gets or sets the job count of the configuration.
*
*/
public Output> jobCount() {
return Codegen.optional(this.jobCount);
}
/**
* Gets or sets the last modified time.
*
*/
@Export(name="lastModifiedTime", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> lastModifiedTime;
/**
* @return Gets or sets the last modified time.
*
*/
public Output> lastModifiedTime() {
return Codegen.optional(this.lastModifiedTime);
}
/**
* The Azure Region where the resource lives
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> location;
/**
* @return The Azure Region where the resource lives
*
*/
public Output> location() {
return Codegen.optional(this.location);
}
/**
* Gets or sets verbose log option.
*
*/
@Export(name="logVerbose", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> logVerbose;
/**
* @return Gets or sets verbose log option.
*
*/
public Output> logVerbose() {
return Codegen.optional(this.logVerbose);
}
/**
* The name of the resource
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the resource
*
*/
public Output name() {
return this.name;
}
/**
* Gets the number of compiled node configurations.
*
*/
@Export(name="nodeConfigurationCount", refs={Integer.class}, tree="[0]")
private Output* @Nullable */ Integer> nodeConfigurationCount;
/**
* @return Gets the number of compiled node configurations.
*
*/
public Output> nodeConfigurationCount() {
return Codegen.optional(this.nodeConfigurationCount);
}
/**
* Gets or sets the configuration parameters.
*
*/
@Export(name="parameters", refs={Map.class,String.class,DscConfigurationParameterResponse.class}, tree="[0,1,2]")
private Output* @Nullable */ Map> parameters;
/**
* @return Gets or sets the configuration parameters.
*
*/
public Output>> parameters() {
return Codegen.optional(this.parameters);
}
/**
* Gets or sets the provisioning state of the configuration.
*
*/
@Export(name="provisioningState", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> provisioningState;
/**
* @return Gets or sets the provisioning state of the configuration.
*
*/
public Output> provisioningState() {
return Codegen.optional(this.provisioningState);
}
/**
* Gets or sets the source.
*
*/
@Export(name="source", refs={ContentSourceResponse.class}, tree="[0]")
private Output* @Nullable */ ContentSourceResponse> source;
/**
* @return Gets or sets the source.
*
*/
public Output> source() {
return Codegen.optional(this.source);
}
/**
* Gets or sets the state of the configuration.
*
*/
@Export(name="state", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> state;
/**
* @return Gets or sets the state of the configuration.
*
*/
public Output> state() {
return Codegen.optional(this.state);
}
/**
* Resource tags.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return Resource tags.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* The type of the resource.
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return The type of the resource.
*
*/
public Output type() {
return this.type;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public DscConfiguration(java.lang.String name) {
this(name, DscConfigurationArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public DscConfiguration(java.lang.String name, DscConfigurationArgs args) {
this(name, args, null);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
* @param options A bag of options that control this resource's behavior.
*/
public DscConfiguration(java.lang.String name, DscConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:automation:DscConfiguration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private DscConfiguration(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure-native:automation:DscConfiguration", name, null, makeResourceOptions(options, id), false);
}
private static DscConfigurationArgs makeArgs(DscConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? DscConfigurationArgs.Empty : args;
}
private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) {
var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
.version(Utilities.getVersion())
.aliases(List.of(
Output.of(Alias.builder().type("azure-native:automation/v20151031:DscConfiguration").build()),
Output.of(Alias.builder().type("azure-native:automation/v20190601:DscConfiguration").build()),
Output.of(Alias.builder().type("azure-native:automation/v20220808:DscConfiguration").build()),
Output.of(Alias.builder().type("azure-native:automation/v20230515preview:DscConfiguration").build()),
Output.of(Alias.builder().type("azure-native:automation/v20231101:DscConfiguration").build())
))
.build();
return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
}
/**
* Get an existing Host resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param options Optional settings to control the behavior of the CustomResource.
*/
public static DscConfiguration get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new DscConfiguration(name, id, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy