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

com.pulumi.vsphere.ComputeClusterVmAntiAffinityRuleArgs Maven / Gradle / Ivy

There is a newer version: 4.13.0-alpha.1731738919
Show newest version
// *** 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.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class ComputeClusterVmAntiAffinityRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final ComputeClusterVmAntiAffinityRuleArgs Empty = new ComputeClusterVmAntiAffinityRuleArgs();

    /**
     * The managed object reference
     * ID of the cluster to put the group in.  Forces a new
     * resource if changed.
     * 
     */
    @Import(name="computeClusterId", required=true)
    private Output computeClusterId;

    /**
     * @return The managed object reference
     * ID of the cluster to put the group in.  Forces a new
     * resource if changed.
     * 
     */
    public Output computeClusterId() {
        return this.computeClusterId;
    }

    /**
     * Enable this rule in the cluster. Default: `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output enabled;

    /**
     * @return Enable this rule in the cluster. Default: `true`.
     * 
     */
    public Optional> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * When this value is `true`, prevents any virtual
     * machine operations that may violate this rule. Default: `false`.
     * 
     * > **NOTE:** The namespace for rule names on this resource (defined by the
     * `name` argument) is shared with all rules in the cluster - consider
     * this when naming your rules.
     * 
     */
    @Import(name="mandatory")
    private @Nullable Output mandatory;

    /**
     * @return When this value is `true`, prevents any virtual
     * machine operations that may violate this rule. Default: `false`.
     * 
     * > **NOTE:** The namespace for rule names on this resource (defined by the
     * `name` argument) is shared with all rules in the cluster - consider
     * this when naming your rules.
     * 
     */
    public Optional> mandatory() {
        return Optional.ofNullable(this.mandatory);
    }

    /**
     * The name of the rule. This must be unique in the cluster.
     * 
     */
    @Import(name="name")
    private @Nullable Output name;

    /**
     * @return The name of the rule. This must be unique in the cluster.
     * 
     */
    public Optional> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * The UUIDs of the virtual machines to run
     * on hosts different from each other.
     * 
     */
    @Import(name="virtualMachineIds", required=true)
    private Output> virtualMachineIds;

    /**
     * @return The UUIDs of the virtual machines to run
     * on hosts different from each other.
     * 
     */
    public Output> virtualMachineIds() {
        return this.virtualMachineIds;
    }

    private ComputeClusterVmAntiAffinityRuleArgs() {}

    private ComputeClusterVmAntiAffinityRuleArgs(ComputeClusterVmAntiAffinityRuleArgs $) {
        this.computeClusterId = $.computeClusterId;
        this.enabled = $.enabled;
        this.mandatory = $.mandatory;
        this.name = $.name;
        this.virtualMachineIds = $.virtualMachineIds;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(ComputeClusterVmAntiAffinityRuleArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private ComputeClusterVmAntiAffinityRuleArgs $;

        public Builder() {
            $ = new ComputeClusterVmAntiAffinityRuleArgs();
        }

        public Builder(ComputeClusterVmAntiAffinityRuleArgs defaults) {
            $ = new ComputeClusterVmAntiAffinityRuleArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param computeClusterId The managed object reference
         * ID of the cluster to put the group in.  Forces a new
         * resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder computeClusterId(Output computeClusterId) {
            $.computeClusterId = computeClusterId;
            return this;
        }

        /**
         * @param computeClusterId The managed object reference
         * ID of the cluster to put the group in.  Forces a new
         * resource if changed.
         * 
         * @return builder
         * 
         */
        public Builder computeClusterId(String computeClusterId) {
            return computeClusterId(Output.of(computeClusterId));
        }

        /**
         * @param enabled Enable this rule in the cluster. Default: `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Enable this rule in the cluster. Default: `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param mandatory When this value is `true`, prevents any virtual
         * machine operations that may violate this rule. Default: `false`.
         * 
         * > **NOTE:** The namespace for rule names on this resource (defined by the
         * `name` argument) is shared with all rules in the cluster - consider
         * this when naming your rules.
         * 
         * @return builder
         * 
         */
        public Builder mandatory(@Nullable Output mandatory) {
            $.mandatory = mandatory;
            return this;
        }

        /**
         * @param mandatory When this value is `true`, prevents any virtual
         * machine operations that may violate this rule. Default: `false`.
         * 
         * > **NOTE:** The namespace for rule names on this resource (defined by the
         * `name` argument) is shared with all rules in the cluster - consider
         * this when naming your rules.
         * 
         * @return builder
         * 
         */
        public Builder mandatory(Boolean mandatory) {
            return mandatory(Output.of(mandatory));
        }

        /**
         * @param name The name of the rule. This must be unique in the cluster.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The name of the rule. This must be unique in the cluster.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param virtualMachineIds The UUIDs of the virtual machines to run
         * on hosts different from each other.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineIds(Output> virtualMachineIds) {
            $.virtualMachineIds = virtualMachineIds;
            return this;
        }

        /**
         * @param virtualMachineIds The UUIDs of the virtual machines to run
         * on hosts different from each other.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineIds(List virtualMachineIds) {
            return virtualMachineIds(Output.of(virtualMachineIds));
        }

        /**
         * @param virtualMachineIds The UUIDs of the virtual machines to run
         * on hosts different from each other.
         * 
         * @return builder
         * 
         */
        public Builder virtualMachineIds(String... virtualMachineIds) {
            return virtualMachineIds(List.of(virtualMachineIds));
        }

        public ComputeClusterVmAntiAffinityRuleArgs build() {
            $.computeClusterId = Objects.requireNonNull($.computeClusterId, "expected parameter 'computeClusterId' to be non-null");
            $.virtualMachineIds = Objects.requireNonNull($.virtualMachineIds, "expected parameter 'virtualMachineIds' to be non-null");
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy