Compartilhar via


MSCluster_Resource class

A dynamic WMI class that represents a cluster resource.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties.

Syntax

[Dynamic, Provider("MS_CLUSTER_PROVIDER"), UUID("{C2862F9C-34DE-4b16-9EE3-099D078E9F59}"), AMENDMENT]
class MSCluster_Resource : MSCluster_LogicalElement
{
  string             Caption;
  datetime           InstallDate;
  string             Status;
  uint32             Flags;
  uint32             Characteristics;
  string             Name;
  string             Id;
  string             Description;
  uint32             IsAlivePollInterval;
  uint32             LooksAlivePollInterval;
  uint32             PendingTimeout;
  uint32             MonitorProcessId;
  boolean            PersistentState;
  uint32             RestartAction;
  uint32             RestartPeriod;
  uint32             RestartThreshold;
  uint32             EmbeddedFailureAction;
  uint32             RetryPeriodOnFailure;
  boolean            SeparateMonitor;
  string             Type;
  uint32             State;
  string             InternalState;
  uint32             ResourceClass;
  uint32             Subclass;
  MSCluster_Property PrivateProperties;
  string             CryptoCheckpoints[];
  string             RegistryCheckpoints[];
  boolean            QuorumCapable;
  boolean            LocalQuorumCapable;
  boolean            DeleteRequiresAllNodes;
  boolean            CoreResource;
  uint32             DeadlockTimeout;
  uint64             StatusInformation;
  uint64             LastOperationStatusCode;
  uint64             ResourceSpecificData1;
  uint64             ResourceSpecificData2;
  string             ResourceSpecificStatus;
  uint32             RestartDelay;
  boolean            IsClusterSharedVolume;
  string             RequiredDependencyTypes[];
  uint32             RequiredDependencyClasses[];
  string             OwnerGroup;
  string             OwnerNode;
};

Members

The MSCluster_Resource class has these types of members:

Methods

The MSCluster_Resource class has these methods.

Method Description
AddCryptoCheckpoint Adds an encrypted crypto checkpoint to the resource.
AddDependency Creates a dependency relationship between two resources.
AddPossibleOwner Adds a possible owner (host) node to the list of possible owners for this resource.
AddRegistryCheckpoint Adds a registry checkpoint to the resource.
AttachStorageDevice Attaches the underlying storage of a resource to another device.
Windows Server 2008 R2 and Windows Server 2008: This method is not supported before Windows Server 2012.

BringOnline Brings a resource online.
CreateResource Creates a resource.
DeleteResource Deletes a resource.
ExecuteResourceControl Executes a control code on the resource.
FailResource Forces this resource to become unavailable to simulate failure. This method is used by applications to test their failover configurations.
GetDependencies Gets the resource dependency expression.
GetPossibleOwners Gets the list of nodes which can be an owner, host, of this resource.
Windows Server 2008 R2 and Windows Server 2008: This method is not supported before Windows Server 2012.

MigrateVirtualMachine Migrates the virtual machine settings.
Windows Server 2008 R2 and Windows Server 2008: This method is not supported before Windows Server 2012.

MoveToNewGroup Moves the resource to a different group.
ReleaseAddress Releases the IPv4 address DHCP lease. Valid only for IP address resources.
RemoveCryptoCheckpoint Removes a crypto key from the list of keys being checkpointed for the resource.
RemoveDependency Removes a dependency relationship between two resources.
RemovePossibleOwner Removes a possible owner node (host) from the list of possible owners for this resource.
RemoveRegistryCheckpoint Removes a registry key from the list of keys being checkpointed for the resource.
Rename Renames the resource.
RenewAddress Renews the IPv4 address DHCP lease. Valid only for IP address resources.
SetDependencies Sets the resource dependency expression.
TakeOffline Takes the resource offline.
TakeOfflineParams Take the resource offline with the parameters specified as a raw buffer.
Windows Server 2008 R2 and Windows Server 2008: This method is not supported before Windows Server 2012.

UpdateVirtualMachine Updates the configuration of a clustered virtual machine.
Windows Server 2008 R2 and Windows Server 2008: This method is not supported before Windows Server 2012.

Properties

The MSCluster_Resource class has these properties.

Caption

Data type: string

Access type: Read-only

Qualifiers: MaxLen (64)

The Caption property is a short textual description (one-line string) of the object.

This property is inherited from CIM_ManagedSystemElement.

Characteristics

Data type: uint32

Access type: Read-only

Provides the characteristics of the object. The cluster defines characteristics only for resources. For a description of these characteristics, see CLUSCTL_RESOURCE_GET_CHARACTERISTICS.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is read/write before Windows Server 2012.

This property is inherited from MSCluster_LogicalElement.

CoreResource

Data type: boolean

Access type: Read-only

If True, indicates that the resource is essential to the cluster and cannot be deleted.

CryptoCheckpoints

Data type: string array

Access type: Read-only

Provides a list of crypto checkpoints for the resource.

DeadlockTimeout

Data type: uint32

Access type: Read/write

Indicates the length of time to wait, in milliseconds, before declaring a deadlock in any call into a resource.

DeleteRequiresAllNodes

Data type: boolean

Access type: Read-only

If True, the resource cannot be deleted unless all nodes are active. Setting this property to True adds the CLUS_CHAR_DELETE_REQUIRES_ALL_NODES characteristic to the resource.

Description

Data type: string

Access type: Read/write

Qualifiers: Override (Description)

Provides access to the resource's Description property.

EmbeddedFailureAction

Data type: uint32

Access type: Read/write

The time, in milliseconds, that a resource should remain in a failed state before the Cluster service attempts to restart it.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

Flags

Data type: uint32

Access type: Read-only

Provides access to the flags set for the object. The cluster defines flags only for resources. For a description of these flags, see CLUSCTL_RESOURCE_GET_FLAGS.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is read/write before Windows Server 2012.

This property is inherited from MSCluster_LogicalElement.

Id

Data type: string

Access type: Read-only

The Id of the resource.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

InstallDate

Data type: datetime

Access type: Read-only

Qualifiers: MappingStrings ("MIF.DMTF|ComponentID|001.5")

A datetime value indicating when the object was installed. A lack of a value does not indicate that the object is not installed.

This property is inherited from CIM_ManagedSystemElement.

InternalState

Data type: string

Access type: Read-only

This property is not supported.

**Windows Server 2008: **

The current internal state of the resource.

IsAlivePollInterval

Data type: uint32

Access type: Read/write

Qualifiers: Units ("Milliseconds")

Provides access to the resource's IsAlivePollInterval property, which is the recommended interval in milliseconds at which the Cluster Service should poll the resource to determine whether it is operational. If the property is set to 0xFFFFFFFF, the Cluster Service uses the IsAlivePollInterval property for the resource type associated with the resource.

IsClusterSharedVolume

Data type: boolean

Access type: Read-only

Specifies if the resource is a cluster shared volume resource.

**Windows Server 2008: **

This property is not supported before Windows Server 2008 R2.

LastOperationStatusCode

Data type: uint64

Access type: Read-only

The last application-specific error code returned by the Resource DLL during a cluster operation.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

LocalQuorumCapable

Data type: boolean

Access type: Read-only

The resource can be selected as the quorum resource in clusters configured using the -localquorum switch.

LooksAlivePollInterval

Data type: uint32

Access type: Read/write

Qualifiers: Units ("Milliseconds")

Provides access to the resource's LooksAlivePollInterval property, which is the recommended interval in milliseconds at which the Cluster Service should poll the resource to determine whether it appears operational. If the property is set to 0xFFFFFFFF, the Cluster Service uses the LooksAlivePollInterval property for the resource type associated with the resource.

MonitorProcessId

Data type: uint32

Access type: Read-only

Provides the process ID of the resource host service that is currently hosting the resource.

**Windows Server 2012 R2, Windows Server 2012, Windows Server 2008 R2 and Windows Server 2008: **

This property was read-write prior to Windows Server 2016.

Name

Data type: string

Access type: Read-only

Qualifiers: Override (Name), Key

Provides the name of the resource.

OwnerGroup

Data type: string

Access type: Read-only

The resource group which the resource belongs to.

**Windows Server 2008 R2 and Windows Server 2008: **

This method is not supported before Windows Server 2012.

OwnerNode

Data type: string

Access type: Read-only

The node hosting the resource.

**Windows Server 2008 R2 and Windows Server 2008: **

This method is not supported before Windows Server 2012.

PendingTimeout

Data type: uint32

Access type: Read/write

Provides access to the resource's PendingTimeout property. If a resource cannot be brought online or taken offline in the number of milliseconds specified by the PendingTimeout property, the resource is forcibly terminated.

PersistentState

Data type: boolean

Access type: Read/write

Provides access to the resource's PersistentState property, which specifies whether the resource should be brought online or left offline when the Cluster Service is started.

PrivateProperties

Data type: MSCluster_Property

Access type: Read/write

Provides access to the private properties of the resource.

QuorumCapable

Data type: boolean

Access type: Read-only

The resource can be selected as the quorum resource for the cluster.

RegistryCheckpoints

Data type: string array

Access type: Read-only

Provides a list of registry checkpoints for the resource.

RequiredDependencyClasses

Data type: uint32 array

Access type: Read-only

The resource classes which the resource must depend on.

The possible values are.

Unknown (0)

Storage (1)

Network (2)

User (32768)

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

RequiredDependencyTypes

Data type: string array

Access type: Read-only

The resource types which the resource must depend on.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

ResourceClass

Data type: uint32

Access type: Read-only

Gets or sets the resource class of a resource.

Unknown (0)

Storage (1)

Network (2)

User (32768)

ResourceSpecificData1

Data type: uint64

Access type: Read-only

Resource-specific information.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

ResourceSpecificData2

Data type: uint64

Access type: Read-only

Resource-specific information.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

ResourceSpecificStatus

Data type: string

Access type: Read-only

Provides a resource-specific status message that complements the current resource state.

RestartAction

Data type: uint32

Access type: Read/write

Provides access to the resource's RestartAction property, which is the action to be taken by the Cluster Service if the resource fails. The following are the possible values.

0

Do not restart the resource after a failure.

1

Restart the resource after a failure. If the resource exceeds its restart threshold within its restart period, do not attempt to failover the group to another node in the cluster.

2

Restart the resource after a failure. If the resource exceeds its restart threshold within its restart period, attempt to fail over the group to another node in the cluster. This is the default setting.

RestartDelay

Data type: uint32

Access type: Read-only

Indicates the time delay before a failed resource is restarted.

RestartPeriod

Data type: uint32

Access type: Read/write

Provides access to the resource's RestartPeriod property, which is interval of time, in milliseconds, during which a specified number of restart attempts can be made on a nonresponsive resource.

RestartThreshold

Data type: uint32

Access type: Read/write

Provides access to the resource's RestartThreshold property which is the maximum number of restart attempts that can be made on a resource within an interval defined by the RestartPeriod property before the Cluster Service initiates the action specified by the RestartAction property.

RetryPeriodOnFailure

Data type: uint32

Access type: Read/write

Provides access to the resource's RetryPeriodOnFailure property, which is the interval of time (in milliseconds) that a resource should remain in a failed state before the Cluster service attempts to restart it.

SeparateMonitor

Data type: boolean

Access type: Read/write

Provides access to the resource's SeparateMonitor property, which indicates whether the resource requires its own Resource Monitor.

State

Data type: uint32

Access type: Read-only

The current state of the resource. The following are the possible values. For a list of possible state values, see GetClusterResourceState.

Unknown (-1)

The operation was not successful.

**Windows Server 2012, Windows Server 2008 R2 and Windows Server 2008: **

This value is StateUnknown before Windows Server 2012 R2 .

Inherited (0)

Initializing (1)

The resource is performing initialization.

Online (2)

The resource is operational and functioning normally.

Offline (3)

The resource is not operational. This value will be returned if the resource reported a state of ClusterResourceOffline (3) or ClusterResourceCannotComeOnlineOnThisNode (127).

Failed (4)

The resource has failed. This value will be returned if the resource reported a state of ClusterResourceFailed (4) or ClusterResourceCannotComeOnlineOnAnyNode (126).

Pending (128)

The resource is coming online or going offline.

Online Pending (129)

The resource is coming online.

Offline Pending (130)

The resource is going offline.

Status

Data type: string

Access type: Read-only

Qualifiers: MaxLen (10)

A string indicating the current status of the object. Various operational and non-operational statuses are defined. Operational statuses are "OK", "Degraded", "Stressed" and "Pred Fail". "Stressed" indicates that the Element is functioning, but needs attention. Examples of "Stressed" states are overload, overheated, etc. The condition "Pred Fail" (failure predicted) indicates that an Element is functioning properly but predicting a failure in the near future. An example is a SMART-enabled hard drive. Non-operational statuses can also be specified. These are "Error", "NonRecover", "Starting", "Stopping" and "Service". "NonRecover" indicates that a non-recoverable error has occurred. "Service" describes an Element being configured, maintained or cleaned, or otherwise administered. This status could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative task. Not all such work is on-line, yet the Element is neither "OK" nor in one of the other states.

This property is inherited from CIM_ManagedSystemElement.

("OK")

("Error")

("Degraded")

("Unknown")

("Pred Fail")

("Starting")

("Stopping")

("Service")

("Stressed")

("NonRecover")

StatusInformation

Data type: uint64

Access type: Read-only

Status flags for the resource that are set by cluster service.

**Windows Server 2008 R2 and Windows Server 2008: **

This property is not supported before Windows Server 2012.

Subclass

Data type: uint32

Access type: Read/write

Provides the list of references to nodes that can be the owner of this resource.

Type

Data type: string

Access type: Read/write

Provides access to the resource's Type property, which is the name for the resource's type.

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2008
Namespace
Root\MSCluster
MOF
ClusWmi.mof
DLL
ClusWMI.dll