com.ovhcloud.pulumi.ovh.Me.InstallationTemplatePartitionSchemeHardwareRaid Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-ovh Show documentation
Show all versions of pulumi-ovh Show documentation
A Pulumi package for creating and managing OVH 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.ovhcloud.pulumi.ovh.Me;
import com.ovhcloud.pulumi.ovh.Me.InstallationTemplatePartitionSchemeHardwareRaidArgs;
import com.ovhcloud.pulumi.ovh.Me.inputs.InstallationTemplatePartitionSchemeHardwareRaidState;
import com.ovhcloud.pulumi.ovh.Utilities;
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.Integer;
import java.lang.String;
import java.util.List;
import javax.annotation.Nullable;
/**
* Use this resource to create a hardware raid group in the partition scheme of a custom installation template available for dedicated servers.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.ovh.Me.InstallationTemplate;
* import com.pulumi.ovh.Me.InstallationTemplateArgs;
* import com.pulumi.ovh.Me.InstallationTemplatePartitionScheme;
* import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemeArgs;
* import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemeHardwareRaid;
* import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemeHardwareRaidArgs;
* 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 mytemplate = new InstallationTemplate("mytemplate", InstallationTemplateArgs.builder()
* .baseTemplateName("debian12_64")
* .templateName("mytemplate")
* .build());
*
* var scheme = new InstallationTemplatePartitionScheme("scheme", InstallationTemplatePartitionSchemeArgs.builder()
* .templateName(mytemplate.templateName())
* .priority(1)
* .build());
*
* var group1 = new InstallationTemplatePartitionSchemeHardwareRaid("group1", InstallationTemplatePartitionSchemeHardwareRaidArgs.builder()
* .templateName(scheme.templateName())
* .schemeName(scheme.name())
* .disks(
* "[c1:d1,c1:d2,c1:d3]",
* "[c1:d10,c1:d20,c1:d30]")
* .mode("raid50")
* .step(1)
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* The resource can be imported using the `template_name`, `scheme_name`, `name` of the cluster, separated by "/" E.g.,
*
* bash
*
* ```sh
* $ pulumi import ovh:Me/installationTemplatePartitionSchemeHardwareRaid:InstallationTemplatePartitionSchemeHardwareRaid group1 template_name/scheme_name/name
* ```
*
*/
@ResourceType(type="ovh:Me/installationTemplatePartitionSchemeHardwareRaid:InstallationTemplatePartitionSchemeHardwareRaid")
public class InstallationTemplatePartitionSchemeHardwareRaid extends com.pulumi.resources.CustomResource {
/**
* Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
*
*/
@Export(name="disks", refs={List.class,String.class}, tree="[0,1]")
private Output> disks;
/**
* @return Disk List. Syntax is cX:dY for disks and [cX:dY,cX:dY] for groups. With X and Y resp. the controller id and the disk id.
*
*/
public Output> disks() {
return this.disks;
}
/**
* RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
*
*/
@Export(name="mode", refs={String.class}, tree="[0]")
private Output mode;
/**
* @return RAID mode (raid0, raid1, raid10, raid5, raid50, raid6, raid60).
*
*/
public Output mode() {
return this.mode;
}
/**
* Hardware RAID name.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Hardware RAID name.
*
*/
public Output name() {
return this.name;
}
/**
* The partition scheme name.
*
*/
@Export(name="schemeName", refs={String.class}, tree="[0]")
private Output schemeName;
/**
* @return The partition scheme name.
*
*/
public Output schemeName() {
return this.schemeName;
}
/**
* Specifies the creation order of the hardware RAID.
*
*/
@Export(name="step", refs={Integer.class}, tree="[0]")
private Output step;
/**
* @return Specifies the creation order of the hardware RAID.
*
*/
public Output step() {
return this.step;
}
/**
* The template name of the partition scheme.
*
*/
@Export(name="templateName", refs={String.class}, tree="[0]")
private Output templateName;
/**
* @return The template name of the partition scheme.
*
*/
public Output templateName() {
return this.templateName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public InstallationTemplatePartitionSchemeHardwareRaid(java.lang.String name) {
this(name, InstallationTemplatePartitionSchemeHardwareRaidArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public InstallationTemplatePartitionSchemeHardwareRaid(java.lang.String name, InstallationTemplatePartitionSchemeHardwareRaidArgs 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 InstallationTemplatePartitionSchemeHardwareRaid(java.lang.String name, InstallationTemplatePartitionSchemeHardwareRaidArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("ovh:Me/installationTemplatePartitionSchemeHardwareRaid:InstallationTemplatePartitionSchemeHardwareRaid", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private InstallationTemplatePartitionSchemeHardwareRaid(java.lang.String name, Output id, @Nullable InstallationTemplatePartitionSchemeHardwareRaidState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("ovh:Me/installationTemplatePartitionSchemeHardwareRaid:InstallationTemplatePartitionSchemeHardwareRaid", name, state, makeResourceOptions(options, id), false);
}
private static InstallationTemplatePartitionSchemeHardwareRaidArgs makeArgs(InstallationTemplatePartitionSchemeHardwareRaidArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? InstallationTemplatePartitionSchemeHardwareRaidArgs.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 InstallationTemplatePartitionSchemeHardwareRaid get(java.lang.String name, Output id, @Nullable InstallationTemplatePartitionSchemeHardwareRaidState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new InstallationTemplatePartitionSchemeHardwareRaid(name, id, state, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy