1. Packages
  2. Packages
  3. Nutanix
  4. API Docs
  5. VmAntiAffinityPolicyV2
Viewing docs for Nutanix v0.16.0
published on Tuesday, May 26, 2026 by Piers Karsenbarg
nutanix logo
Viewing docs for Nutanix v0.16.0
published on Tuesday, May 26, 2026 by Piers Karsenbarg

    Provides a resource to create, read, update, and delete VM-VM Anti-Affinity policies. VM-VM Anti-Affinity policies ensure that VMs in specified categories are spread across different hosts for high availability and fault tolerance. This helps prevent single points of failure by distributing VMs across the cluster. For more information on VM-VM Anti-Affinity policies, see the AHV Administration Guide.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    // Create VM category
    const antiAffinityCategory = new nutanix.CategoryV2("anti_affinity_category", {
        key: "vm-anti-affinity",
        value: "anti-affinity-group-1",
    });
    // Create VM-VM Anti-Affinity policy
    const example = new nutanix.VmAntiAffinityPolicyV2("example", {
        name: "vm-anti-affinity-policy",
        description: "Policy to spread VMs across different hosts for high availability",
        categories: [antiAffinityCategory.id],
    });
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    # Create VM category
    anti_affinity_category = nutanix.CategoryV2("anti_affinity_category",
        key="vm-anti-affinity",
        value="anti-affinity-group-1")
    # Create VM-VM Anti-Affinity policy
    example = nutanix.VmAntiAffinityPolicyV2("example",
        name="vm-anti-affinity-policy",
        description="Policy to spread VMs across different hosts for high availability",
        categories=[anti_affinity_category.id])
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create VM category
    		antiAffinityCategory, err := nutanix.NewCategoryV2(ctx, "anti_affinity_category", &nutanix.CategoryV2Args{
    			Key:   pulumi.String("vm-anti-affinity"),
    			Value: pulumi.String("anti-affinity-group-1"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create VM-VM Anti-Affinity policy
    		_, err = nutanix.NewVmAntiAffinityPolicyV2(ctx, "example", &nutanix.VmAntiAffinityPolicyV2Args{
    			Name:        pulumi.String("vm-anti-affinity-policy"),
    			Description: pulumi.String("Policy to spread VMs across different hosts for high availability"),
    			Categories: pulumi.StringArray{
    				antiAffinityCategory.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        // Create VM category
        var antiAffinityCategory = new Nutanix.CategoryV2("anti_affinity_category", new()
        {
            Key = "vm-anti-affinity",
            Value = "anti-affinity-group-1",
        });
    
        // Create VM-VM Anti-Affinity policy
        var example = new Nutanix.VmAntiAffinityPolicyV2("example", new()
        {
            Name = "vm-anti-affinity-policy",
            Description = "Policy to spread VMs across different hosts for high availability",
            Categories = new[]
            {
                antiAffinityCategory.Id,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.CategoryV2;
    import com.pulumi.nutanix.CategoryV2Args;
    import com.pulumi.nutanix.VmAntiAffinityPolicyV2;
    import com.pulumi.nutanix.VmAntiAffinityPolicyV2Args;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // Create VM category
            var antiAffinityCategory = new CategoryV2("antiAffinityCategory", CategoryV2Args.builder()
                .key("vm-anti-affinity")
                .value("anti-affinity-group-1")
                .build());
    
            // Create VM-VM Anti-Affinity policy
            var example = new VmAntiAffinityPolicyV2("example", VmAntiAffinityPolicyV2Args.builder()
                .name("vm-anti-affinity-policy")
                .description("Policy to spread VMs across different hosts for high availability")
                .categories(antiAffinityCategory.id())
                .build());
    
        }
    }
    
    resources:
      # Create VM category
      antiAffinityCategory:
        type: nutanix:CategoryV2
        name: anti_affinity_category
        properties:
          key: vm-anti-affinity
          value: anti-affinity-group-1
      # Create VM-VM Anti-Affinity policy
      example:
        type: nutanix:VmAntiAffinityPolicyV2
        properties:
          name: vm-anti-affinity-policy
          description: Policy to spread VMs across different hosts for high availability
          categories:
            - ${antiAffinityCategory.id}
    
    pulumi {
      required_providers {
        nutanix = {
          source = "pulumi/nutanix"
        }
      }
    }
    
    # Create VM category
    resource "nutanix_categoryv2" "anti_affinity_category" {
      key   = "vm-anti-affinity"
      value = "anti-affinity-group-1"
    }
    # Create VM-VM Anti-Affinity policy
    resource "nutanix_vmantiaffinitypolicyv2" "example" {
      name        = "vm-anti-affinity-policy"
      description = "Policy to spread VMs across different hosts for high availability"
      categories  = [nutanix_categoryv2.anti_affinity_category.id]
    }
    

    Example Import

    import * as pulumi from "@pulumi/pulumi";
    import * as nutanix from "@pierskarsenbarg/nutanix";
    
    // First, get the ext_id of the policy
    const policies = nutanix.getVmAntiAffinityPoliciesV2({});
    // Create the configuration
    const imported = new nutanix.VmAntiAffinityPolicyV2("imported", {});
    
    import pulumi
    import pulumi_nutanix as nutanix
    
    # First, get the ext_id of the policy
    policies = nutanix.get_vm_anti_affinity_policies_v2()
    # Create the configuration
    imported = nutanix.VmAntiAffinityPolicyV2("imported")
    
    package main
    
    import (
    	"github.com/pierskarsenbarg/pulumi-nutanix/sdk/go/nutanix"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// First, get the ext_id of the policy
    		_, err := nutanix.GetVmAntiAffinityPoliciesV2(ctx, &nutanix.GetVmAntiAffinityPoliciesV2Args{}, nil)
    		if err != nil {
    			return err
    		}
    		// Create the configuration
    		_, err = nutanix.NewVmAntiAffinityPolicyV2(ctx, "imported", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Nutanix = PiersKarsenbarg.Nutanix;
    
    return await Deployment.RunAsync(() => 
    {
        // First, get the ext_id of the policy
        var policies = Nutanix.GetVmAntiAffinityPoliciesV2.Invoke();
    
        // Create the configuration
        var imported = new Nutanix.VmAntiAffinityPolicyV2("imported");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.nutanix.NutanixFunctions;
    import com.pulumi.nutanix.inputs.GetVmAntiAffinityPoliciesV2Args;
    import com.pulumi.nutanix.VmAntiAffinityPolicyV2;
    import java.util.ArrayList;
    import java.util.Arrays;
    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) {
            // First, get the ext_id of the policy
            final var policies = NutanixFunctions.getVmAntiAffinityPoliciesV2(GetVmAntiAffinityPoliciesV2Args.builder()
                .build());
    
            // Create the configuration
            var imported = new VmAntiAffinityPolicyV2("imported");
    
        }
    }
    
    resources:
      # Create the configuration
      imported:
        type: nutanix:VmAntiAffinityPolicyV2
    variables:
      # First, get the ext_id of the policy
      policies:
        fn::invoke:
          function: nutanix:getVmAntiAffinityPoliciesV2
          arguments: {}
    
    pulumi {
      required_providers {
        nutanix = {
          source = "pulumi/nutanix"
        }
      }
    }
    
    data "nutanix_getvmantiaffinitypoliciesv2" "policies" {
    }
    
    # Create the configuration
    resource "nutanix_vmantiaffinitypolicyv2" "imported" {
    }
    # First, get the ext_id of the policy
    

    See detailed information in Nutanix VM-VM Anti-Affinity Policies V4

    Create VmAntiAffinityPolicyV2 Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VmAntiAffinityPolicyV2(name: string, args: VmAntiAffinityPolicyV2Args, opts?: CustomResourceOptions);
    @overload
    def VmAntiAffinityPolicyV2(resource_name: str,
                               args: VmAntiAffinityPolicyV2Args,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def VmAntiAffinityPolicyV2(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               categories: Optional[Sequence[str]] = None,
                               description: Optional[str] = None,
                               name: Optional[str] = None)
    func NewVmAntiAffinityPolicyV2(ctx *Context, name string, args VmAntiAffinityPolicyV2Args, opts ...ResourceOption) (*VmAntiAffinityPolicyV2, error)
    public VmAntiAffinityPolicyV2(string name, VmAntiAffinityPolicyV2Args args, CustomResourceOptions? opts = null)
    public VmAntiAffinityPolicyV2(String name, VmAntiAffinityPolicyV2Args args)
    public VmAntiAffinityPolicyV2(String name, VmAntiAffinityPolicyV2Args args, CustomResourceOptions options)
    
    type: nutanix:VmAntiAffinityPolicyV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "nutanix_vmantiaffinitypolicyv2" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VmAntiAffinityPolicyV2Args
    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 VmAntiAffinityPolicyV2Args
    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 VmAntiAffinityPolicyV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VmAntiAffinityPolicyV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VmAntiAffinityPolicyV2Args
    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 vmAntiAffinityPolicyV2Resource = new Nutanix.VmAntiAffinityPolicyV2("vmAntiAffinityPolicyV2Resource", new()
    {
        Categories = new[]
        {
            "string",
        },
        Description = "string",
        Name = "string",
    });
    
    example, err := nutanix.NewVmAntiAffinityPolicyV2(ctx, "vmAntiAffinityPolicyV2Resource", &nutanix.VmAntiAffinityPolicyV2Args{
    	Categories: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    resource "nutanix_vmantiaffinitypolicyv2" "vmAntiAffinityPolicyV2Resource" {
      categories  = ["string"]
      description = "string"
      name        = "string"
    }
    
    var vmAntiAffinityPolicyV2Resource = new VmAntiAffinityPolicyV2("vmAntiAffinityPolicyV2Resource", VmAntiAffinityPolicyV2Args.builder()
        .categories("string")
        .description("string")
        .name("string")
        .build());
    
    vm_anti_affinity_policy_v2_resource = nutanix.VmAntiAffinityPolicyV2("vmAntiAffinityPolicyV2Resource",
        categories=["string"],
        description="string",
        name="string")
    
    const vmAntiAffinityPolicyV2Resource = new nutanix.VmAntiAffinityPolicyV2("vmAntiAffinityPolicyV2Resource", {
        categories: ["string"],
        description: "string",
        name: "string",
    });
    
    type: nutanix:VmAntiAffinityPolicyV2
    properties:
        categories:
            - string
        description: string
        name: string
    

    VmAntiAffinityPolicyV2 Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VmAntiAffinityPolicyV2 resource accepts the following input properties:

    Categories List<string>
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    Description string
    A description of the VM-VM Anti-Affinity policy.
    Name string
    The name of the VM-VM Anti-Affinity policy.
    Categories []string
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    Description string
    A description of the VM-VM Anti-Affinity policy.
    Name string
    The name of the VM-VM Anti-Affinity policy.
    categories list(string)
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    description string
    A description of the VM-VM Anti-Affinity policy.
    name string
    The name of the VM-VM Anti-Affinity policy.
    categories List<String>
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    description String
    A description of the VM-VM Anti-Affinity policy.
    name String
    The name of the VM-VM Anti-Affinity policy.
    categories string[]
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    description string
    A description of the VM-VM Anti-Affinity policy.
    name string
    The name of the VM-VM Anti-Affinity policy.
    categories Sequence[str]
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    description str
    A description of the VM-VM Anti-Affinity policy.
    name str
    The name of the VM-VM Anti-Affinity policy.
    categories List<String>
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    description String
    A description of the VM-VM Anti-Affinity policy.
    name String
    The name of the VM-VM Anti-Affinity policy.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VmAntiAffinityPolicyV2 resource produces the following output properties:

    CreateTime string
    The timestamp when the policy was created.
    CreatedBy Dictionary<string, string>
    Information about the entity that created the policy.
    ExtId string
    The external identifier of the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    NumCompliantVms int
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    NumNonCompliantVms int
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    NumPendingVms int
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    UpdateTime string
    The timestamp when the policy was last updated.
    UpdatedBy Dictionary<string, string>
    Information about the entity that last updated the policy.
    CreateTime string
    The timestamp when the policy was created.
    CreatedBy map[string]string
    Information about the entity that created the policy.
    ExtId string
    The external identifier of the policy.
    Id string
    The provider-assigned unique ID for this managed resource.
    NumCompliantVms int
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    NumNonCompliantVms int
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    NumPendingVms int
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    UpdateTime string
    The timestamp when the policy was last updated.
    UpdatedBy map[string]string
    Information about the entity that last updated the policy.
    create_time string
    The timestamp when the policy was created.
    created_by map(string)
    Information about the entity that created the policy.
    ext_id string
    The external identifier of the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    num_compliant_vms number
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    num_non_compliant_vms number
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    num_pending_vms number
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    update_time string
    The timestamp when the policy was last updated.
    updated_by map(string)
    Information about the entity that last updated the policy.
    createTime String
    The timestamp when the policy was created.
    createdBy Map<String,String>
    Information about the entity that created the policy.
    extId String
    The external identifier of the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    numCompliantVms Integer
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    numNonCompliantVms Integer
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    numPendingVms Integer
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    updateTime String
    The timestamp when the policy was last updated.
    updatedBy Map<String,String>
    Information about the entity that last updated the policy.
    createTime string
    The timestamp when the policy was created.
    createdBy {[key: string]: string}
    Information about the entity that created the policy.
    extId string
    The external identifier of the policy.
    id string
    The provider-assigned unique ID for this managed resource.
    numCompliantVms number
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    numNonCompliantVms number
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    numPendingVms number
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    updateTime string
    The timestamp when the policy was last updated.
    updatedBy {[key: string]: string}
    Information about the entity that last updated the policy.
    create_time str
    The timestamp when the policy was created.
    created_by Mapping[str, str]
    Information about the entity that created the policy.
    ext_id str
    The external identifier of the policy.
    id str
    The provider-assigned unique ID for this managed resource.
    num_compliant_vms int
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    num_non_compliant_vms int
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    num_pending_vms int
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    update_time str
    The timestamp when the policy was last updated.
    updated_by Mapping[str, str]
    Information about the entity that last updated the policy.
    createTime String
    The timestamp when the policy was created.
    createdBy Map<String>
    Information about the entity that created the policy.
    extId String
    The external identifier of the policy.
    id String
    The provider-assigned unique ID for this managed resource.
    numCompliantVms Number
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    numNonCompliantVms Number
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    numPendingVms Number
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    updateTime String
    The timestamp when the policy was last updated.
    updatedBy Map<String>
    Information about the entity that last updated the policy.

    Look up Existing VmAntiAffinityPolicyV2 Resource

    Get an existing VmAntiAffinityPolicyV2 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?: VmAntiAffinityPolicyV2State, opts?: CustomResourceOptions): VmAntiAffinityPolicyV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            categories: Optional[Sequence[str]] = None,
            create_time: Optional[str] = None,
            created_by: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            ext_id: Optional[str] = None,
            name: Optional[str] = None,
            num_compliant_vms: Optional[int] = None,
            num_non_compliant_vms: Optional[int] = None,
            num_pending_vms: Optional[int] = None,
            update_time: Optional[str] = None,
            updated_by: Optional[Mapping[str, str]] = None) -> VmAntiAffinityPolicyV2
    func GetVmAntiAffinityPolicyV2(ctx *Context, name string, id IDInput, state *VmAntiAffinityPolicyV2State, opts ...ResourceOption) (*VmAntiAffinityPolicyV2, error)
    public static VmAntiAffinityPolicyV2 Get(string name, Input<string> id, VmAntiAffinityPolicyV2State? state, CustomResourceOptions? opts = null)
    public static VmAntiAffinityPolicyV2 get(String name, Output<String> id, VmAntiAffinityPolicyV2State state, CustomResourceOptions options)
    resources:  _:    type: nutanix:VmAntiAffinityPolicyV2    get:      id: ${id}
    import {
      to = nutanix_vmantiaffinitypolicyv2.example
      id = "${id}"
    }
    
    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.
    The following state arguments are supported:
    Categories List<string>
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    CreateTime string
    The timestamp when the policy was created.
    CreatedBy Dictionary<string, string>
    Information about the entity that created the policy.
    Description string
    A description of the VM-VM Anti-Affinity policy.
    ExtId string
    The external identifier of the policy.
    Name string
    The name of the VM-VM Anti-Affinity policy.
    NumCompliantVms int
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    NumNonCompliantVms int
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    NumPendingVms int
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    UpdateTime string
    The timestamp when the policy was last updated.
    UpdatedBy Dictionary<string, string>
    Information about the entity that last updated the policy.
    Categories []string
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    CreateTime string
    The timestamp when the policy was created.
    CreatedBy map[string]string
    Information about the entity that created the policy.
    Description string
    A description of the VM-VM Anti-Affinity policy.
    ExtId string
    The external identifier of the policy.
    Name string
    The name of the VM-VM Anti-Affinity policy.
    NumCompliantVms int
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    NumNonCompliantVms int
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    NumPendingVms int
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    UpdateTime string
    The timestamp when the policy was last updated.
    UpdatedBy map[string]string
    Information about the entity that last updated the policy.
    categories list(string)
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    create_time string
    The timestamp when the policy was created.
    created_by map(string)
    Information about the entity that created the policy.
    description string
    A description of the VM-VM Anti-Affinity policy.
    ext_id string
    The external identifier of the policy.
    name string
    The name of the VM-VM Anti-Affinity policy.
    num_compliant_vms number
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    num_non_compliant_vms number
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    num_pending_vms number
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    update_time string
    The timestamp when the policy was last updated.
    updated_by map(string)
    Information about the entity that last updated the policy.
    categories List<String>
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    createTime String
    The timestamp when the policy was created.
    createdBy Map<String,String>
    Information about the entity that created the policy.
    description String
    A description of the VM-VM Anti-Affinity policy.
    extId String
    The external identifier of the policy.
    name String
    The name of the VM-VM Anti-Affinity policy.
    numCompliantVms Integer
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    numNonCompliantVms Integer
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    numPendingVms Integer
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    updateTime String
    The timestamp when the policy was last updated.
    updatedBy Map<String,String>
    Information about the entity that last updated the policy.
    categories string[]
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    createTime string
    The timestamp when the policy was created.
    createdBy {[key: string]: string}
    Information about the entity that created the policy.
    description string
    A description of the VM-VM Anti-Affinity policy.
    extId string
    The external identifier of the policy.
    name string
    The name of the VM-VM Anti-Affinity policy.
    numCompliantVms number
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    numNonCompliantVms number
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    numPendingVms number
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    updateTime string
    The timestamp when the policy was last updated.
    updatedBy {[key: string]: string}
    Information about the entity that last updated the policy.
    categories Sequence[str]
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    create_time str
    The timestamp when the policy was created.
    created_by Mapping[str, str]
    Information about the entity that created the policy.
    description str
    A description of the VM-VM Anti-Affinity policy.
    ext_id str
    The external identifier of the policy.
    name str
    The name of the VM-VM Anti-Affinity policy.
    num_compliant_vms int
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    num_non_compliant_vms int
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    num_pending_vms int
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    update_time str
    The timestamp when the policy was last updated.
    updated_by Mapping[str, str]
    Information about the entity that last updated the policy.
    categories List<String>
    List of VM category external IDs (extId) that this policy applies to. VMs with these categories will be spread across different hosts according to the anti-affinity rules.
    createTime String
    The timestamp when the policy was created.
    createdBy Map<String>
    Information about the entity that created the policy.
    description String
    A description of the VM-VM Anti-Affinity policy.
    extId String
    The external identifier of the policy.
    name String
    The name of the VM-VM Anti-Affinity policy.
    numCompliantVms Number
    Number of compliant VMs which are part of the VM-VM anti-affinity policy.
    numNonCompliantVms Number
    Number of non-compliant VMs which are part of the VM-VM anti-affinity policy.
    numPendingVms Number
    Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy.
    updateTime String
    The timestamp when the policy was last updated.
    updatedBy Map<String>
    Information about the entity that last updated the policy.

    Package Details

    Repository
    nutanix pierskarsenbarg/pulumi-nutanix
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the nutanix Terraform Provider.
    nutanix logo
    Viewing docs for Nutanix v0.16.0
    published on Tuesday, May 26, 2026 by Piers Karsenbarg

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial