Deploy Vcha Cluster Async

Deploy Vcha Cluster Async

Prepares, clones, and configures a VCHA cluster.

Request
URI
POST
https://{api_host}/api/vcenter/vcha/cluster?action=deploy&vmw-task=true
COPY
Request Body
Vcha_Cluster_DeploySpec of type(s) application/json
Required

Show optional properties

{
    "deployment": "string",
    "active": {
        "ha_ip": {
            "ip_family": "string"
        }
    },
    "passive": {
        "ha_ip": "Vcha_IpSpec Object"
    },
    "witness": {
        "ha_ip": "Vcha_IpSpec Object"
    }
}
{
    "vc_spec": {
        "active_location": {
            "hostname": "string",
            "port": 0,
            "ssl_thumbprint": "string",
            "username": "string",
            "password": "string"
        }
    },
    "deployment": "string",
    "active": {
        "ha_network_type": "string",
        "ha_network": "string",
        "ha_ip": {
            "ip_family": "string",
            "ipv4": {
                "address": "string",
                "subnet_mask": "string",
                "prefix": 0
            },
            "ipv6": {
                "address": "string",
                "prefix": 0
            },
            "default_gateway": "string",
            "dns_servers": [
                "string"
            ]
        }
    },
    "passive": {
        "placement": {
            "name": "string",
            "folder": "string",
            "host": "string",
            "resource_pool": "string",
            "ha_network_type": "Vcha_NetworkType Object",
            "ha_network": "string",
            "management_network_type": "Vcha_NetworkType Object",
            "management_network": "string",
            "storage": {
                "datastore": "string"
            }
        },
        "ha_ip": "Vcha_IpSpec Object",
        "failover_ip": "Vcha_IpSpec Object"
    },
    "witness": {
        "placement": "Vcha_PlacementSpec Object",
        "ha_ip": "Vcha_IpSpec Object"
    }
}
vc_spec
Optional

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

deployment
Required

The Cluster.Type enumerated type defines the possible deployment types for a VCHA Cluster.
AUTO : Passive and witness nodes are cloned automatically.
MANUAL : Passive and witness nodes are not cloned automatically. After deployment, the customer should clone the passive and witness virtual machines.

active
Required

The Cluster.ActiveSpec structure contains the deploy specification for the Active Node of the VCHA cluster.

passive
Required

The Cluster.PassiveSpec structure contains the deploy specification for the Passive Node of the VCHA cluster.

witness
Required

The Cluster.WitnessSpec structure contains the deploy specification for the Witness Node of the VCHA cluster.

Authentication
This operation uses the following authentication methods.
Responses
202

An identifier for the task created by this API invocation will be returned. If the non-async version of the operation returns a value, this id can be used with the CIS Get Task operation to fetch that value. The normal description of this operation's return value will follow if one exists.

Returns string of type(s) application/json
Operation doesn't return any data structure

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": [
        {
            "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"
        }
    ],
    "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. Operation execution requires the Global.VCServer privilege.

Returns Std_Errors_Error of type(s) application/json
{
    "messages": [
        {
            "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"
        }
    ],
    "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": [
        {
            "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"
        }
    ],
    "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": [
        {
            "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"
        }
    ],
    "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 '{"deployment:"string","active":"{}","passive":"{}","witness":"{}"}' https://{api_host}/api/vcenter/vcha/cluster?action=deploy&vmw-task=true
                
Power CLI Samples

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

$VchaIpSpec = Initialize-VchaIpSpec -IpFamily "IPV4" $VchaClusterActiveSpec = Initialize-VchaClusterActiveSpec -HaIp $VchaIpSpec $VchaClusterPassiveSpec = Initialize-VchaClusterPassiveSpec -HaIp $VchaIpSpec $VchaClusterWitnessSpec = Initialize-VchaClusterWitnessSpec -HaIp $VchaIpSpec $VchaClusterDeploySpec = Initialize-VchaClusterDeploySpec -Deployment "AUTO" -Active $VchaClusterActiveSpec -Passive $VchaClusterPassiveSpec -Witness $VchaClusterWitnessSpec Invoke-DeployVchaClusterAsync -VchaClusterDeploySpec $VchaClusterDeploySpec

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

$VchaConnectionSpec = Initialize-VchaConnectionSpec -Hostname "MyHostname" -Port 0 -SslThumbprint "MySslThumbprint" -Username "MyUsername" -Password "MyPassword" $VchaCredentialsSpec = Initialize-VchaCredentialsSpec -ActiveLocation $VchaConnectionSpec $VchaIpv4Spec = Initialize-VchaIpv4Spec -Address "MyAddress" -SubnetMask "MySubnetMask" -Prefix 0 $VchaIpv6Spec = Initialize-VchaIpv6Spec -Address "MyAddress" -Prefix 0 $VchaIpSpec = Initialize-VchaIpSpec -IpFamily "IPV4" -Ipv4 $VchaIpv4Spec -Ipv6 $VchaIpv6Spec -DefaultGateway "MyDefaultGateway" -DnsServers "MyDnsServers" $VchaClusterActiveSpec = Initialize-VchaClusterActiveSpec -HaNetworkType "STANDARD_PORTGROUP" -HaNetwork "MyHaNetwork" -HaIp $VchaIpSpec $VchaDiskSpec = Initialize-VchaDiskSpec -Datastore "MyDatastore" $VchaPlacementSpec = Initialize-VchaPlacementSpec -Name "MyName" -Folder "MyFolder" -VarHost "MyVarHost" -ResourcePool "MyResourcePool" -HaNetworkType "STANDARD_PORTGROUP" -HaNetwork "MyHaNetwork" -ManagementNetworkType "STANDARD_PORTGROUP" -ManagementNetwork "MyManagementNetwork" -Storage $VchaDiskSpec $VchaClusterPassiveSpec = Initialize-VchaClusterPassiveSpec -Placement $VchaPlacementSpec -HaIp $VchaIpSpec -FailoverIp $VchaIpSpec $VchaClusterWitnessSpec = Initialize-VchaClusterWitnessSpec -Placement $VchaPlacementSpec -HaIp $VchaIpSpec $VchaClusterDeploySpec = Initialize-VchaClusterDeploySpec -VcSpec $VchaCredentialsSpec -Deployment "AUTO" -Active $VchaClusterActiveSpec -Passive $VchaClusterPassiveSpec -Witness $VchaClusterWitnessSpec Invoke-DeployVchaClusterAsync -VchaClusterDeploySpec $VchaClusterDeploySpec