Get Vcha Cluster

Get Vcha Cluster

Retrieves the status of a VCHA cluster.

Request
URI
POST
https://{api_host}/api/vcenter/vcha/cluster?action=get
COPY
Request Body
Vcha_Cluster_Get_RequestBody of type(s) application/json
Optional
{
    "vc_spec": {
        "active_location": {
            "hostname": "string",
            "port": 0,
            "ssl_thumbprint": "string",
            "username": "string",
            "password": "string"
        }
    },
    "partial": false
}
vc_spec
Optional

The CredentialsSpec structure contains information to connect to the vCenter server managing the VCHA nodes.

boolean
partial
Optional

If true, then return only the information that does not require connecting to the Active vCenter Server. If false or unset, then return all the information. If unset, then return all the information.

Authentication
This operation uses the following authentication methods.
Responses
200

Info structure containing the VCHA configuration and health information.

Returns Vcha_Cluster_Info of type(s) application/json
{
    "config_state": "string",
    "node1": {
        "failover_ip": {
            "ip_family": "string",
            "ipv4": {
                "address": "string",
                "subnet_mask": "string",
                "prefix": 0
            },
            "ipv6": {
                "address": "string",
                "prefix": 0
            },
            "gateway_ip": "string"
        },
        "ha_ip": {
            "ip_family": "string",
            "ipv4": {
                "address": "string",
                "subnet_mask": "string",
                "prefix": 0
            },
            "ipv6": {
                "address": "string",
                "prefix": 0
            },
            "gateway_ip": "string"
        },
        "runtime": {
            "state": "string",
            "role": "string",
            "placement": {
                "management_vcenter_name": "string",
                "management_vcenter_server_guid": "string",
                "vm_name": "string",
                "datacenter": "string",
                "datacenter_name": "string",
                "host": "string",
                "host_name": "string",
                "cluster": "string",
                "cluster_name": "string",
                "ha_network": "string",
                "ha_network_name": "string",
                "ha_network_type": "string",
                "management_network": "string",
                "management_network_name": "string",
                "management_network_type": "string",
                "storage": {
                    "datastore": "string",
                    "datastore_name": "string"
                },
                "bios_uuid": "string"
            }
        }
    },
    "node2": {
        "failover_ip": {
            "ip_family": "string",
            "ipv4": {
                "address": "string",
                "subnet_mask": "string",
                "prefix": 0
            },
            "ipv6": {
                "address": "string",
                "prefix": 0
            },
            "gateway_ip": "string"
        },
        "ha_ip": {
            "ip_family": "string",
            "ipv4": {
                "address": "string",
                "subnet_mask": "string",
                "prefix": 0
            },
            "ipv6": {
                "address": "string",
                "prefix": 0
            },
            "gateway_ip": "string"
        },
        "runtime": {
            "state": "string",
            "role": "string",
            "placement": {
                "management_vcenter_name": "string",
                "management_vcenter_server_guid": "string",
                "vm_name": "string",
                "datacenter": "string",
                "datacenter_name": "string",
                "host": "string",
                "host_name": "string",
                "cluster": "string",
                "cluster_name": "string",
                "ha_network": "string",
                "ha_network_name": "string",
                "ha_network_type": "string",
                "management_network": "string",
                "management_network_name": "string",
                "management_network_type": "string",
                "storage": {
                    "datastore": "string",
                    "datastore_name": "string"
                },
                "bios_uuid": "string"
            }
        }
    },
    "witness": {
        "ha_ip": "Vcha_Cluster_IpInfo Object",
        "runtime": "Vcha_Cluster_NodeRuntimeInfo Object"
    },
    "mode": "string",
    "health_state": "string",
    "health_exception": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": {
                        "id": "string",
                        "params": {
                            "params": "Std_LocalizationParam Object"
                        }
                    },
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "health_warnings": [
        {
            "error": "Std_LocalizableMessage Object",
            "recommendation": "Std_LocalizableMessage Object"
        }
    ],
    "manual_failover_allowed": false,
    "auto_failover_allowed": false
}
config_state
Optional

The Cluster.ConfigState enumerated type defines the VCHA configuration state.
CONFIGURED : VCHA cluster is configured.
NOTCONFIGURED : VCHA cluster is not configured.
INVALID : VCHA cluster is in an invalid/dirty state.
PREPARED : vCenter server appliance has been prepared for VCHA cluster configuration.

node1
Optional

The Cluster.NodeInfo structure defines the configuration information for the active and passive nodes in the cluster.

node2
Optional

The Cluster.NodeInfo structure defines the configuration information for the active and passive nodes in the cluster.

witness
Optional

The Cluster.WitnessInfo structure defines the configuration and runtime information for the witness node in the cluster.

mode
Optional

The Cluster.ClusterMode enumerated type defines the possible modes for a VCHA Cluster.
ENABLED : VCHA Cluster is enabled. State replication between the Active and Passive node is enabled and automatic failover is allowed.
DISABLED : VCHA Cluster is disabled. State replication between the Active and Passive node is disabled and automatic failover is not allowed.
MAINTENANCE : VCHA Cluster is in maintenance mode. State replication between the Active and Passive node is enabled but automatic failover is not allowed.

health_state
Optional

The Cluster.ClusterState enumerated type defines the possible for a VCHA Cluster.
HEALTHY : All three nodes in a VCHA Cluster are healthy and connected. State replication between Active and Passive node is working and both nodes are in sync.
DEGRADED : A VCHA Cluster is said to be in a degraded state for either or all of the following reasons:

  • There is a node loss.
  • State replication between the Active and Passive node fails.
    ISOLATED : All three nodes are isolated from each other.
health_exception
Optional

Health warning messages if the health information is unavailable. If unset, then the cluster is in a healthy state.

health_warnings
Optional

A collection of messages describing the reason for a non-healthy Cluster. If unset, then the cluster is in a healthy state.

boolean
manual_failover_allowed
Optional

Specifies if manual failover is allowed. If unset, then the cluster state healthy and manual failover allowance in accordance with the cluster mode.

boolean
auto_failover_allowed
Optional

Specifies if automatic failover is allowed. If unset, then the cluster state healthy and automatic failover allowance in accordance with the cluster mode.


400

com.vmware.vapi.std.errors.invalid_argument : If the credentials provided for authenticating with the active node's management vCenter server are invalid. | com.vmware.vapi.std.errors.unverified_peer : If the SSL certificate of the management vCenter server cannot be validated. The value of the data field of Error will be a structure that contains all the fields defined in CertificateInfo.

Returns Std_Errors_Error of type(s) application/json
{
    "messages": [
        "Std_LocalizableMessage Object"
    ],
    "data": {},
    "error_type": "string"
}
messages
Required

Stack of one or more localizable messages for human error consumers. The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.

Each subsequent message in the stack describes the "cause" of the prior message.

object
data
Optional

Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully. Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.

The ArgumentLocations, FileLocations, and TransientIndication structures are intended as possible values for this field. DynamicID may also be useful as a value for this field (although that is not its primary purpose). Some services may provide their own specific structures for use as the value of this field when reporting errors from their operations.

Some operations will not set this field when reporting errors.

error_type
Optional

Enumeration of all standard errors. Used as discriminator in protocols that have no standard means for transporting the error type, e.g. REST.
ERROR : Discriminator for the Error type.
ALREADY_EXISTS : Discriminator for the AlreadyExists type.
ALREADY_IN_DESIRED_STATE : Discriminator for the AlreadyInDesiredState type.
CANCELED : Discriminator for the Canceled type.
CONCURRENT_CHANGE : Discriminator for the ConcurrentChange type.
FEATURE_IN_USE : Discriminator for the FeatureInUse type.
INTERNAL_SERVER_ERROR : Discriminator for the InternalServerError type.
INVALID_ARGUMENT : Discriminator for the InvalidArgument type.
INVALID_ELEMENT_CONFIGURATION : Discriminator for the InvalidElementConfiguration type.
INVALID_ELEMENT_TYPE : Discriminator for the InvalidElementType type.
INVALID_REQUEST : Discriminator for the InvalidRequest type.
NOT_ALLOWED_IN_CURRENT_STATE : Discriminator for the NotAllowedInCurrentState type.
NOT_FOUND : Discriminator for the NotFound type.
OPERATION_NOT_FOUND : Discriminator for the OperationNotFound type.
RESOURCE_BUSY : Discriminator for the ResourceBusy type.
RESOURCE_IN_USE : Discriminator for the ResourceInUse type.
RESOURCE_INACCESSIBLE : Discriminator for the ResourceInaccessible type.
SERVICE_UNAVAILABLE : Discriminator for the ServiceUnavailable type.
TIMED_OUT : Discriminator for the TimedOut type.
UNABLE_TO_ALLOCATE_RESOURCE : Discriminator for the UnableToAllocateResource type.
UNAUTHENTICATED : Discriminator for the Unauthenticated type.
UNAUTHORIZED : Discriminator for the Unauthorized type.
UNEXPECTED_INPUT : Discriminator for the UnexpectedInput type.
UNSUPPORTED : Discriminator for the Unsupported type.
UNVERIFIED_PEER : Discriminator for the UnverifiedPeer type.


403

com.vmware.vapi.std.errors.unauthorized : If the user has insufficient privilege to perform the operation.

  • If partial is false or unset, then the operation execution requires the Global.VCServer privilege.
  • If partial is true, then the operation execution requires the System.Read privilege.
Returns Std_Errors_Error of type(s) application/json
{
    "messages": [
        "Std_LocalizableMessage Object"
    ],
    "data": {},
    "error_type": "string"
}
messages
Required

Stack of one or more localizable messages for human error consumers. The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.

Each subsequent message in the stack describes the "cause" of the prior message.

object
data
Optional

Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully. Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.

The ArgumentLocations, FileLocations, and TransientIndication structures are intended as possible values for this field. DynamicID may also be useful as a value for this field (although that is not its primary purpose). Some services may provide their own specific structures for use as the value of this field when reporting errors from their operations.

Some operations will not set this field when reporting errors.

error_type
Optional

Enumeration of all standard errors. Used as discriminator in protocols that have no standard means for transporting the error type, e.g. REST.
ERROR : Discriminator for the Error type.
ALREADY_EXISTS : Discriminator for the AlreadyExists type.
ALREADY_IN_DESIRED_STATE : Discriminator for the AlreadyInDesiredState type.
CANCELED : Discriminator for the Canceled type.
CONCURRENT_CHANGE : Discriminator for the ConcurrentChange type.
FEATURE_IN_USE : Discriminator for the FeatureInUse type.
INTERNAL_SERVER_ERROR : Discriminator for the InternalServerError type.
INVALID_ARGUMENT : Discriminator for the InvalidArgument type.
INVALID_ELEMENT_CONFIGURATION : Discriminator for the InvalidElementConfiguration type.
INVALID_ELEMENT_TYPE : Discriminator for the InvalidElementType type.
INVALID_REQUEST : Discriminator for the InvalidRequest type.
NOT_ALLOWED_IN_CURRENT_STATE : Discriminator for the NotAllowedInCurrentState type.
NOT_FOUND : Discriminator for the NotFound type.
OPERATION_NOT_FOUND : Discriminator for the OperationNotFound type.
RESOURCE_BUSY : Discriminator for the ResourceBusy type.
RESOURCE_IN_USE : Discriminator for the ResourceInUse type.
RESOURCE_INACCESSIBLE : Discriminator for the ResourceInaccessible type.
SERVICE_UNAVAILABLE : Discriminator for the ServiceUnavailable type.
TIMED_OUT : Discriminator for the TimedOut type.
UNABLE_TO_ALLOCATE_RESOURCE : Discriminator for the UnableToAllocateResource type.
UNAUTHENTICATED : Discriminator for the Unauthenticated type.
UNAUTHORIZED : Discriminator for the Unauthorized type.
UNEXPECTED_INPUT : Discriminator for the UnexpectedInput type.
UNSUPPORTED : Discriminator for the Unsupported type.
UNVERIFIED_PEER : Discriminator for the UnverifiedPeer type.


500

com.vmware.vapi.std.errors.error : If any other error occurs.

Returns Std_Errors_Error of type(s) application/json
{
    "messages": [
        "Std_LocalizableMessage Object"
    ],
    "data": {},
    "error_type": "string"
}
messages
Required

Stack of one or more localizable messages for human error consumers. The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.

Each subsequent message in the stack describes the "cause" of the prior message.

object
data
Optional

Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully. Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.

The ArgumentLocations, FileLocations, and TransientIndication structures are intended as possible values for this field. DynamicID may also be useful as a value for this field (although that is not its primary purpose). Some services may provide their own specific structures for use as the value of this field when reporting errors from their operations.

Some operations will not set this field when reporting errors.

error_type
Optional

Enumeration of all standard errors. Used as discriminator in protocols that have no standard means for transporting the error type, e.g. REST.
ERROR : Discriminator for the Error type.
ALREADY_EXISTS : Discriminator for the AlreadyExists type.
ALREADY_IN_DESIRED_STATE : Discriminator for the AlreadyInDesiredState type.
CANCELED : Discriminator for the Canceled type.
CONCURRENT_CHANGE : Discriminator for the ConcurrentChange type.
FEATURE_IN_USE : Discriminator for the FeatureInUse type.
INTERNAL_SERVER_ERROR : Discriminator for the InternalServerError type.
INVALID_ARGUMENT : Discriminator for the InvalidArgument type.
INVALID_ELEMENT_CONFIGURATION : Discriminator for the InvalidElementConfiguration type.
INVALID_ELEMENT_TYPE : Discriminator for the InvalidElementType type.
INVALID_REQUEST : Discriminator for the InvalidRequest type.
NOT_ALLOWED_IN_CURRENT_STATE : Discriminator for the NotAllowedInCurrentState type.
NOT_FOUND : Discriminator for the NotFound type.
OPERATION_NOT_FOUND : Discriminator for the OperationNotFound type.
RESOURCE_BUSY : Discriminator for the ResourceBusy type.
RESOURCE_IN_USE : Discriminator for the ResourceInUse type.
RESOURCE_INACCESSIBLE : Discriminator for the ResourceInaccessible type.
SERVICE_UNAVAILABLE : Discriminator for the ServiceUnavailable type.
TIMED_OUT : Discriminator for the TimedOut type.
UNABLE_TO_ALLOCATE_RESOURCE : Discriminator for the UnableToAllocateResource type.
UNAUTHENTICATED : Discriminator for the Unauthenticated type.
UNAUTHORIZED : Discriminator for the Unauthorized type.
UNEXPECTED_INPUT : Discriminator for the UnexpectedInput type.
UNSUPPORTED : Discriminator for the Unsupported type.
UNVERIFIED_PEER : Discriminator for the UnverifiedPeer type.


default

'Default' means this response is used for all HTTP codes that are not covered individually for this operation.

Returns Std_Errors_Error of type(s) application/json
{
    "messages": [
        "Std_LocalizableMessage Object"
    ],
    "data": {},
    "error_type": "string"
}
messages
Required

Stack of one or more localizable messages for human error consumers. The message at the top of the stack (first in the list) describes the error from the perspective of the operation the client invoked.

Each subsequent message in the stack describes the "cause" of the prior message.

object
data
Optional

Data to facilitate clients responding to the operation reporting a standard error to indicating that it was unable to complete successfully. Operations may provide data that clients can use when responding to errors. Since the data that clients need may be specific to the context of the operation reporting the error, different operations that report the same error may provide different data in the error. The documentation for each each operation will describe what, if any, data it provides for each error it reports.

The ArgumentLocations, FileLocations, and TransientIndication structures are intended as possible values for this field. DynamicID may also be useful as a value for this field (although that is not its primary purpose). Some services may provide their own specific structures for use as the value of this field when reporting errors from their operations.

Some operations will not set this field when reporting errors.

error_type
Optional

Enumeration of all standard errors. Used as discriminator in protocols that have no standard means for transporting the error type, e.g. REST.
ERROR : Discriminator for the Error type.
ALREADY_EXISTS : Discriminator for the AlreadyExists type.
ALREADY_IN_DESIRED_STATE : Discriminator for the AlreadyInDesiredState type.
CANCELED : Discriminator for the Canceled type.
CONCURRENT_CHANGE : Discriminator for the ConcurrentChange type.
FEATURE_IN_USE : Discriminator for the FeatureInUse type.
INTERNAL_SERVER_ERROR : Discriminator for the InternalServerError type.
INVALID_ARGUMENT : Discriminator for the InvalidArgument type.
INVALID_ELEMENT_CONFIGURATION : Discriminator for the InvalidElementConfiguration type.
INVALID_ELEMENT_TYPE : Discriminator for the InvalidElementType type.
INVALID_REQUEST : Discriminator for the InvalidRequest type.
NOT_ALLOWED_IN_CURRENT_STATE : Discriminator for the NotAllowedInCurrentState type.
NOT_FOUND : Discriminator for the NotFound type.
OPERATION_NOT_FOUND : Discriminator for the OperationNotFound type.
RESOURCE_BUSY : Discriminator for the ResourceBusy type.
RESOURCE_IN_USE : Discriminator for the ResourceInUse type.
RESOURCE_INACCESSIBLE : Discriminator for the ResourceInaccessible type.
SERVICE_UNAVAILABLE : Discriminator for the ServiceUnavailable type.
TIMED_OUT : Discriminator for the TimedOut type.
UNABLE_TO_ALLOCATE_RESOURCE : Discriminator for the UnableToAllocateResource type.
UNAUTHENTICATED : Discriminator for the Unauthenticated type.
UNAUTHORIZED : Discriminator for the Unauthorized type.
UNEXPECTED_INPUT : Discriminator for the UnexpectedInput type.
UNSUPPORTED : Discriminator for the Unsupported type.
UNVERIFIED_PEER : Discriminator for the UnverifiedPeer type.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '}' https://{api_host}/api/vcenter/vcha/cluster?action=get
                
Power CLI Samples

# Module 'VMware.Sdk.vSphere.vCenter.VCHA'

$VchaConnectionSpec = Initialize-VchaConnectionSpec -Hostname "MyHostname" -Port 0 -SslThumbprint "MySslThumbprint" -Username "MyUsername" -Password "MyPassword" $VchaCredentialsSpec = Initialize-VchaCredentialsSpec -ActiveLocation $VchaConnectionSpec $VchaClusterGetRequestBody = Initialize-VchaClusterGetRequestBody -VcSpec $VchaCredentialsSpec -Partial $false Invoke-GetVchaCluster -VchaClusterGetRequestBody $VchaClusterGetRequestBody