import * as pulumi from "@pulumi/pulumi"; /** * 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](https://portal.nutanix.com/page/documents/details?targetId=AHV-Admin-Guide-v11_0:ahv-anti-affinity-policies-c.html). * * ## Example Usage * * * ```typescript * 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], * }); * ``` * * * ## Example Import * * * ```typescript * 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", {}); * ``` * * * See detailed information in [Nutanix VM-VM Anti-Affinity Policies V4](https://developers.nutanix.com/api-reference?namespace=vmm&version=v4.2#tag/VmAntiAffinityPolicies) */ export declare class VmAntiAffinityPolicyV2 extends pulumi.CustomResource { /** * Get an existing VmAntiAffinityPolicyV2 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: VmAntiAffinityPolicyV2State, opts?: pulumi.CustomResourceOptions): VmAntiAffinityPolicyV2; /** * Returns true if the given object is an instance of VmAntiAffinityPolicyV2. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is VmAntiAffinityPolicyV2; /** * 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. */ readonly categories: pulumi.Output; /** * The timestamp when the policy was created. */ readonly createTime: pulumi.Output; /** * Information about the entity that created the policy. */ readonly createdBy: pulumi.Output<{ [key: string]: string; }>; /** * A description of the VM-VM Anti-Affinity policy. */ readonly description: pulumi.Output; /** * The external identifier of the policy. */ readonly extId: pulumi.Output; /** * The name of the VM-VM Anti-Affinity policy. */ readonly name: pulumi.Output; /** * Number of compliant VMs which are part of the VM-VM anti-affinity policy. */ readonly numCompliantVms: pulumi.Output; /** * Number of non-compliant VMs which are part of the VM-VM anti-affinity policy. */ readonly numNonCompliantVms: pulumi.Output; /** * Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy. */ readonly numPendingVms: pulumi.Output; /** * The timestamp when the policy was last updated. */ readonly updateTime: pulumi.Output; /** * Information about the entity that last updated the policy. */ readonly updatedBy: pulumi.Output<{ [key: string]: string; }>; /** * Create a VmAntiAffinityPolicyV2 resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VmAntiAffinityPolicyV2Args, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VmAntiAffinityPolicyV2 resources. */ export interface VmAntiAffinityPolicyV2State { /** * 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. */ categories?: pulumi.Input[] | undefined>; /** * The timestamp when the policy was created. */ createTime?: pulumi.Input; /** * Information about the entity that created the policy. */ createdBy?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * A description of the VM-VM Anti-Affinity policy. */ description?: pulumi.Input; /** * The external identifier of the policy. */ extId?: pulumi.Input; /** * The name of the VM-VM Anti-Affinity policy. */ name?: pulumi.Input; /** * Number of compliant VMs which are part of the VM-VM anti-affinity policy. */ numCompliantVms?: pulumi.Input; /** * Number of non-compliant VMs which are part of the VM-VM anti-affinity policy. */ numNonCompliantVms?: pulumi.Input; /** * Number of VMs with compliance state as pending, which are part of the VM-VM anti-affinity policy. */ numPendingVms?: pulumi.Input; /** * The timestamp when the policy was last updated. */ updateTime?: pulumi.Input; /** * Information about the entity that last updated the policy. */ updatedBy?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; } /** * The set of arguments for constructing a VmAntiAffinityPolicyV2 resource. */ export interface VmAntiAffinityPolicyV2Args { /** * 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. */ categories: pulumi.Input[]>; /** * A description of the VM-VM Anti-Affinity policy. */ description?: pulumi.Input; /** * The name of the VM-VM Anti-Affinity policy. */ name?: pulumi.Input; } //# sourceMappingURL=vmAntiAffinityPolicyV2.d.ts.map