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

com.pulumi.azure.maintenance.Configuration Maven / Gradle / Ivy

// *** 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.azure.maintenance;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.maintenance.ConfigurationArgs;
import com.pulumi.azure.maintenance.inputs.ConfigurationState;
import com.pulumi.azure.maintenance.outputs.ConfigurationInstallPatches;
import com.pulumi.azure.maintenance.outputs.ConfigurationWindow;
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.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a maintenance configuration.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * 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.maintenance.Configuration;
 * import com.pulumi.azure.maintenance.ConfigurationArgs;
 * 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-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleConfiguration = new Configuration("exampleConfiguration", ConfigurationArgs.builder()
 *             .name("example-mc")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .scope("SQLDB")
 *             .tags(Map.of("Env", "prod"))
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Maintenance Configuration can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:maintenance/configuration:Configuration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Maintenance/maintenanceConfigurations/example-mc * ``` * */ @ResourceType(type="azure:maintenance/configuration:Configuration") public class Configuration extends com.pulumi.resources.CustomResource { /** * The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`. * */ @Export(name="inGuestUserPatchMode", refs={String.class}, tree="[0]") private Output inGuestUserPatchMode; /** * @return The in guest user patch mode. Possible values are `Platform` or `User`. Must be specified when `scope` is `InGuestPatch`. * */ public Output> inGuestUserPatchMode() { return Codegen.optional(this.inGuestUserPatchMode); } /** * An `install_patches` block as defined below. * * > **NOTE:** `install_patches` must be specified when `scope` is `InGuestPatch`. * */ @Export(name="installPatches", refs={ConfigurationInstallPatches.class}, tree="[0]") private Output installPatches; /** * @return An `install_patches` block as defined below. * * > **NOTE:** `install_patches` must be specified when `scope` is `InGuestPatch`. * */ public Output> installPatches() { return Codegen.optional(this.installPatches); } /** * Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Specified the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the Maintenance Configuration. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A mapping of properties to assign to the resource. * */ @Export(name="properties", refs={Map.class,String.class}, tree="[0,1,1]") private Output> properties; /** * @return A mapping of properties to assign to the resource. * */ public Output>> properties() { return Codegen.optional(this.properties); } /** * The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the Resource Group where the Maintenance Configuration should exist. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`. * */ @Export(name="scope", refs={String.class}, tree="[0]") private Output scope; /** * @return The scope of the Maintenance Configuration. Possible values are `Extension`, `Host`, `InGuestPatch`, `OSImage`, `SQLDB` or `SQLManagedInstance`. * */ public Output scope() { return this.scope; } /** * A mapping of tags to assign to the resource. The key could not contain upper case letter. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. The key could not contain upper case letter. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`. * */ @Export(name="visibility", refs={String.class}, tree="[0]") private Output visibility; /** * @return The visibility of the Maintenance Configuration. The only allowable value is `Custom`. Defaults to `Custom`. * */ public Output> visibility() { return Codegen.optional(this.visibility); } /** * A `window` block as defined below. * */ @Export(name="window", refs={ConfigurationWindow.class}, tree="[0]") private Output window; /** * @return A `window` block as defined below. * */ public Output> window() { return Codegen.optional(this.window); } /** * * @param name The _unique_ name of the resulting resource. */ public Configuration(java.lang.String name) { this(name, ConfigurationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public Configuration(java.lang.String name, ConfigurationArgs 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 Configuration(java.lang.String name, ConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:maintenance/configuration:Configuration", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private Configuration(java.lang.String name, Output id, @Nullable ConfigurationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:maintenance/configuration:Configuration", name, state, makeResourceOptions(options, id), false); } private static ConfigurationArgs makeArgs(ConfigurationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ConfigurationArgs.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()) .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 state * @param options Optional settings to control the behavior of the CustomResource. */ public static Configuration get(java.lang.String name, Output id, @Nullable ConfigurationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new Configuration(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy