
com.pulumi.vsphere.DatastoreClusterVmAntiAffinityRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vsphere Show documentation
Show all versions of vsphere Show documentation
A Pulumi package for creating vsphere 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.vsphere;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import com.pulumi.vsphere.DatastoreClusterVmAntiAffinityRuleArgs;
import com.pulumi.vsphere.Utilities;
import com.pulumi.vsphere.inputs.DatastoreClusterVmAntiAffinityRuleState;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
@ResourceType(type="vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule")
public class DatastoreClusterVmAntiAffinityRule extends com.pulumi.resources.CustomResource {
/**
* The managed object reference
* ID of the datastore cluster to put the group in. Forces
* a new resource if changed.
*
*/
@Export(name="datastoreClusterId", refs={String.class}, tree="[0]")
private Output datastoreClusterId;
/**
* @return The managed object reference
* ID of the datastore cluster to put the group in. Forces
* a new resource if changed.
*
*/
public Output datastoreClusterId() {
return this.datastoreClusterId;
}
/**
* Enable this rule in the cluster. Default: `true`.
*
*/
@Export(name="enabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enabled;
/**
* @return Enable this rule in the cluster. Default: `true`.
*
*/
public Output> enabled() {
return Codegen.optional(this.enabled);
}
/**
* When this value is `true`, prevents any virtual
* machine operations that may violate this rule. Default: `false`.
*
*/
@Export(name="mandatory", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> mandatory;
/**
* @return When this value is `true`, prevents any virtual
* machine operations that may violate this rule. Default: `false`.
*
*/
public Output> mandatory() {
return Codegen.optional(this.mandatory);
}
/**
* The name of the rule. This must be unique in the cluster.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name of the rule. This must be unique in the cluster.
*
*/
public Output name() {
return this.name;
}
/**
* The UUIDs of the virtual machines to run
* on different datastores from each other.
*
* > **NOTE:** The minimum length of `virtual_machine_ids` is 2.
*
*/
@Export(name="virtualMachineIds", refs={List.class,String.class}, tree="[0,1]")
private Output> virtualMachineIds;
/**
* @return The UUIDs of the virtual machines to run
* on different datastores from each other.
*
* > **NOTE:** The minimum length of `virtual_machine_ids` is 2.
*
*/
public Output> virtualMachineIds() {
return this.virtualMachineIds;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public DatastoreClusterVmAntiAffinityRule(java.lang.String name) {
this(name, DatastoreClusterVmAntiAffinityRuleArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public DatastoreClusterVmAntiAffinityRule(java.lang.String name, DatastoreClusterVmAntiAffinityRuleArgs 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 DatastoreClusterVmAntiAffinityRule(java.lang.String name, DatastoreClusterVmAntiAffinityRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private DatastoreClusterVmAntiAffinityRule(java.lang.String name, Output id, @Nullable DatastoreClusterVmAntiAffinityRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("vsphere:index/datastoreClusterVmAntiAffinityRule:DatastoreClusterVmAntiAffinityRule", name, state, makeResourceOptions(options, id), false);
}
private static DatastoreClusterVmAntiAffinityRuleArgs makeArgs(DatastoreClusterVmAntiAffinityRuleArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? DatastoreClusterVmAntiAffinityRuleArgs.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 DatastoreClusterVmAntiAffinityRule get(java.lang.String name, Output id, @Nullable DatastoreClusterVmAntiAffinityRuleState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new DatastoreClusterVmAntiAffinityRule(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy