com.ovhcloud.pulumi.ovh.Me.InstallationTemplatePartitionSchemePartition 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.InstallationTemplatePartitionSchemePartitionArgs;
import com.ovhcloud.pulumi.ovh.Me.inputs.InstallationTemplatePartitionSchemePartitionState;
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 javax.annotation.Nullable;
/**
* Use this resource to create a partition 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.InstallationTemplatePartitionSchemePartition;
* import com.pulumi.ovh.Me.InstallationTemplatePartitionSchemePartitionArgs;
* 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 root = new InstallationTemplatePartitionSchemePartition("root", InstallationTemplatePartitionSchemePartitionArgs.builder()
* .templateName(scheme.templateName())
* .schemeName(scheme.name())
* .mountpoint("/")
* .filesystem("ext4")
* .size("400")
* .order(1)
* .type("primary")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* The resource can be imported using the `template_name`, `scheme_name`, `mountpoint` of the cluster, separated by "/" E.g.,
*
* bash
*
* ```sh
* $ pulumi import ovh:Me/installationTemplatePartitionSchemePartition:InstallationTemplatePartitionSchemePartition root template_name/scheme_name/mountpoint
* ```
*
*/
@ResourceType(type="ovh:Me/installationTemplatePartitionSchemePartition:InstallationTemplatePartitionSchemePartition")
public class InstallationTemplatePartitionSchemePartition extends com.pulumi.resources.CustomResource {
/**
* Partition filesystem. Enum with possibles values:
* - btrfs
* - ext3
* - ext4
* - ntfs
* - reiserfs
* - swap
* - ufs
* - xfs
* - zfs
*
*/
@Export(name="filesystem", refs={String.class}, tree="[0]")
private Output filesystem;
/**
* @return Partition filesystem. Enum with possibles values:
* - btrfs
* - ext3
* - ext4
* - ntfs
* - reiserfs
* - swap
* - ufs
* - xfs
* - zfs
*
*/
public Output filesystem() {
return this.filesystem;
}
/**
* partition mount point.
*
*/
@Export(name="mountpoint", refs={String.class}, tree="[0]")
private Output mountpoint;
/**
* @return partition mount point.
*
*/
public Output mountpoint() {
return this.mountpoint;
}
/**
* step or order. specifies the creation order of the partition on the disk
*
*/
@Export(name="order", refs={Integer.class}, tree="[0]")
private Output order;
/**
* @return step or order. specifies the creation order of the partition on the disk
*
*/
public Output order() {
return this.order;
}
/**
* raid partition type. Enum with possible values:
* - raid0
* - raid1
* - raid10
* - raid5
* - raid6
*
*/
@Export(name="raid", refs={String.class}, tree="[0]")
private Output raid;
/**
* @return raid partition type. Enum with possible values:
* - raid0
* - raid1
* - raid10
* - raid5
* - raid6
*
*/
public Output raid() {
return this.raid;
}
/**
* 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;
}
/**
* size of partition in MB, 0 => rest of the space.
*
*/
@Export(name="size", refs={Integer.class}, tree="[0]")
private Output size;
/**
* @return size of partition in MB, 0 => rest of the space.
*
*/
public Output size() {
return this.size;
}
/**
* 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;
}
/**
* partition type. Enum with possible values:
* - lv
* - primary
* - logical
*
*/
@Export(name="type", refs={String.class}, tree="[0]")
private Output type;
/**
* @return partition type. Enum with possible values:
* - lv
* - primary
* - logical
*
*/
public Output type() {
return this.type;
}
/**
* The volume name needed for proxmox distribution
*
*/
@Export(name="volumeName", refs={String.class}, tree="[0]")
private Output volumeName;
/**
* @return The volume name needed for proxmox distribution
*
*/
public Output volumeName() {
return this.volumeName;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public InstallationTemplatePartitionSchemePartition(java.lang.String name) {
this(name, InstallationTemplatePartitionSchemePartitionArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public InstallationTemplatePartitionSchemePartition(java.lang.String name, InstallationTemplatePartitionSchemePartitionArgs 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 InstallationTemplatePartitionSchemePartition(java.lang.String name, InstallationTemplatePartitionSchemePartitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("ovh:Me/installationTemplatePartitionSchemePartition:InstallationTemplatePartitionSchemePartition", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private InstallationTemplatePartitionSchemePartition(java.lang.String name, Output id, @Nullable InstallationTemplatePartitionSchemePartitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("ovh:Me/installationTemplatePartitionSchemePartition:InstallationTemplatePartitionSchemePartition", name, state, makeResourceOptions(options, id), false);
}
private static InstallationTemplatePartitionSchemePartitionArgs makeArgs(InstallationTemplatePartitionSchemePartitionArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? InstallationTemplatePartitionSchemePartitionArgs.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 InstallationTemplatePartitionSchemePartition get(java.lang.String name, Output id, @Nullable InstallationTemplatePartitionSchemePartitionState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new InstallationTemplatePartitionSchemePartition(name, id, state, options);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy