vsphere.ComputeClusterVmHostRule
Explore with Pulumi AI
Create ComputeClusterVmHostRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ComputeClusterVmHostRule(name: string, args: ComputeClusterVmHostRuleArgs, opts?: CustomResourceOptions);
@overload
def ComputeClusterVmHostRule(resource_name: str,
args: ComputeClusterVmHostRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ComputeClusterVmHostRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
compute_cluster_id: Optional[str] = None,
vm_group_name: Optional[str] = None,
affinity_host_group_name: Optional[str] = None,
anti_affinity_host_group_name: Optional[str] = None,
enabled: Optional[bool] = None,
mandatory: Optional[bool] = None,
name: Optional[str] = None)
func NewComputeClusterVmHostRule(ctx *Context, name string, args ComputeClusterVmHostRuleArgs, opts ...ResourceOption) (*ComputeClusterVmHostRule, error)
public ComputeClusterVmHostRule(string name, ComputeClusterVmHostRuleArgs args, CustomResourceOptions? opts = null)
public ComputeClusterVmHostRule(String name, ComputeClusterVmHostRuleArgs args)
public ComputeClusterVmHostRule(String name, ComputeClusterVmHostRuleArgs args, CustomResourceOptions options)
type: vsphere:ComputeClusterVmHostRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ComputeClusterVmHostRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ComputeClusterVmHostRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ComputeClusterVmHostRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComputeClusterVmHostRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComputeClusterVmHostRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var computeClusterVmHostRuleResource = new VSphere.ComputeClusterVmHostRule("computeClusterVmHostRuleResource", new()
{
ComputeClusterId = "string",
VmGroupName = "string",
AffinityHostGroupName = "string",
AntiAffinityHostGroupName = "string",
Enabled = false,
Mandatory = false,
Name = "string",
});
example, err := vsphere.NewComputeClusterVmHostRule(ctx, "computeClusterVmHostRuleResource", &vsphere.ComputeClusterVmHostRuleArgs{
ComputeClusterId: pulumi.String("string"),
VmGroupName: pulumi.String("string"),
AffinityHostGroupName: pulumi.String("string"),
AntiAffinityHostGroupName: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Mandatory: pulumi.Bool(false),
Name: pulumi.String("string"),
})
var computeClusterVmHostRuleResource = new ComputeClusterVmHostRule("computeClusterVmHostRuleResource", ComputeClusterVmHostRuleArgs.builder()
.computeClusterId("string")
.vmGroupName("string")
.affinityHostGroupName("string")
.antiAffinityHostGroupName("string")
.enabled(false)
.mandatory(false)
.name("string")
.build());
compute_cluster_vm_host_rule_resource = vsphere.ComputeClusterVmHostRule("computeClusterVmHostRuleResource",
compute_cluster_id="string",
vm_group_name="string",
affinity_host_group_name="string",
anti_affinity_host_group_name="string",
enabled=False,
mandatory=False,
name="string")
const computeClusterVmHostRuleResource = new vsphere.ComputeClusterVmHostRule("computeClusterVmHostRuleResource", {
computeClusterId: "string",
vmGroupName: "string",
affinityHostGroupName: "string",
antiAffinityHostGroupName: "string",
enabled: false,
mandatory: false,
name: "string",
});
type: vsphere:ComputeClusterVmHostRule
properties:
affinityHostGroupName: string
antiAffinityHostGroupName: string
computeClusterId: string
enabled: false
mandatory: false
name: string
vmGroupName: string
ComputeClusterVmHostRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ComputeClusterVmHostRule resource accepts the following input properties:
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Vm
Group stringName - The name of the virtual machine group to use with this rule.
- Affinity
Host stringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - Anti
Affinity stringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - Enabled bool
- Enable this rule in the cluster. Default:
true
. - Mandatory bool
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- Name string
- The name of the rule. This must be unique in the cluster.
- Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Vm
Group stringName - The name of the virtual machine group to use with this rule.
- Affinity
Host stringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - Anti
Affinity stringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - Enabled bool
- Enable this rule in the cluster. Default:
true
. - Mandatory bool
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- Name string
- The name of the rule. This must be unique in the cluster.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- vm
Group StringName - The name of the virtual machine group to use with this rule.
- affinity
Host StringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti
Affinity StringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - enabled Boolean
- Enable this rule in the cluster. Default:
true
. - mandatory Boolean
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name String
- The name of the rule. This must be unique in the cluster.
- compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- vm
Group stringName - The name of the virtual machine group to use with this rule.
- affinity
Host stringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti
Affinity stringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - enabled boolean
- Enable this rule in the cluster. Default:
true
. - mandatory boolean
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name string
- The name of the rule. This must be unique in the cluster.
- compute_
cluster_ strid - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- vm_
group_ strname - The name of the virtual machine group to use with this rule.
- affinity_
host_ strgroup_ name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti_
affinity_ strhost_ group_ name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - enabled bool
- Enable this rule in the cluster. Default:
true
. - mandatory bool
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name str
- The name of the rule. This must be unique in the cluster.
- compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- vm
Group StringName - The name of the virtual machine group to use with this rule.
- affinity
Host StringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti
Affinity StringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - enabled Boolean
- Enable this rule in the cluster. Default:
true
. - mandatory Boolean
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name String
- The name of the rule. This must be unique in the cluster.
Outputs
All input properties are implicitly available as output properties. Additionally, the ComputeClusterVmHostRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ComputeClusterVmHostRule Resource
Get an existing ComputeClusterVmHostRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ComputeClusterVmHostRuleState, opts?: CustomResourceOptions): ComputeClusterVmHostRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
affinity_host_group_name: Optional[str] = None,
anti_affinity_host_group_name: Optional[str] = None,
compute_cluster_id: Optional[str] = None,
enabled: Optional[bool] = None,
mandatory: Optional[bool] = None,
name: Optional[str] = None,
vm_group_name: Optional[str] = None) -> ComputeClusterVmHostRule
func GetComputeClusterVmHostRule(ctx *Context, name string, id IDInput, state *ComputeClusterVmHostRuleState, opts ...ResourceOption) (*ComputeClusterVmHostRule, error)
public static ComputeClusterVmHostRule Get(string name, Input<string> id, ComputeClusterVmHostRuleState? state, CustomResourceOptions? opts = null)
public static ComputeClusterVmHostRule get(String name, Output<String> id, ComputeClusterVmHostRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Affinity
Host stringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - Anti
Affinity stringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Enabled bool
- Enable this rule in the cluster. Default:
true
. - Mandatory bool
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- Name string
- The name of the rule. This must be unique in the cluster.
- Vm
Group stringName - The name of the virtual machine group to use with this rule.
- Affinity
Host stringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - Anti
Affinity stringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - Compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- Enabled bool
- Enable this rule in the cluster. Default:
true
. - Mandatory bool
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- Name string
- The name of the rule. This must be unique in the cluster.
- Vm
Group stringName - The name of the virtual machine group to use with this rule.
- affinity
Host StringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti
Affinity StringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- enabled Boolean
- Enable this rule in the cluster. Default:
true
. - mandatory Boolean
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name String
- The name of the rule. This must be unique in the cluster.
- vm
Group StringName - The name of the virtual machine group to use with this rule.
- affinity
Host stringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti
Affinity stringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - compute
Cluster stringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- enabled boolean
- Enable this rule in the cluster. Default:
true
. - mandatory boolean
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name string
- The name of the rule. This must be unique in the cluster.
- vm
Group stringName - The name of the virtual machine group to use with this rule.
- affinity_
host_ strgroup_ name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti_
affinity_ strhost_ group_ name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - compute_
cluster_ strid - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- enabled bool
- Enable this rule in the cluster. Default:
true
. - mandatory bool
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name str
- The name of the rule. This must be unique in the cluster.
- vm_
group_ strname - The name of the virtual machine group to use with this rule.
- affinity
Host StringGroup Name - When this field is used, the virtual
machines defined in
vm_group_name
will be run on the hosts defined in this host group. - anti
Affinity StringHost Group Name - When this field is used, the
virtual machines defined in
vm_group_name
will not be run on the hosts defined in this host group. - compute
Cluster StringId - The managed object reference ID of the cluster to put the group in. Forces a new resource if changed.
- enabled Boolean
- Enable this rule in the cluster. Default:
true
. - mandatory Boolean
When this value is
true
, prevents any virtual machine operations that may violate this rule. Default:false
.NOTE: One of
affinity_host_group_name
oranti_affinity_host_group_name
must be defined, but not both.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.- name String
- The name of the rule. This must be unique in the cluster.
- vm
Group StringName - The name of the virtual machine group to use with this rule.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.