Vcenter ConsumptionDomains Zones Cluster Associations evacuateAndRemove$Task

Vcenter ConsumptionDomains Zones Cluster Associations evacuateAndRemove$Task

Removes the mapping between the specified consumption-domain zone and vSphere cluster.

  • If specified cluster is not a member of the specified vSphere Zone, then the task result will be marked as success.
  • If the specified vSphere Zone is not associated with any Supervisor, then the the cluster will be immediately removed from the vSphere Zone and the task status will be marked as success.
  • If there are workloads that belong to a Supervisor, running in the specified cluster, the VMs and vSphere Pods of those workloads will be evacuated to other clusters in the same vSphere Zone. The evacuation is done by Namespace basis and Namespace evacuations are serialized. This means that the VMs and vSphere Pods running only in one namespace will be attempted to be moved to a different cluster in the same vSphere Zone and the evacuation of the next namespace will only begin once the evacuation of the first namespace has successfully finished.
  • The VMs running in the Namespace being evacuated will continue to run without disruption during evacuation. However, the vSphere Pods of that Namespace will be disrupted during as they will be restarted in hosts in the destination cluster.
  • The Namespaces that are not yet evacuated or the Namespace being evacuated will allow provisioning of VMs and vSphere Pods.
  • If there are Supervisor management infrastructure VMs running in the specified cluster those will be evacuated to other clusters in the same vSphere Zone. The evacuation and remove task will continue attempting above, until the task is completed or the user cancels the task. If the user cancels the returned task, following will happen :
  • If there are Supervisor workloads being evacuated, the evacuations will stop and the Namespace undergoing evacuation will be rolled back to the source cluster. If the rollback failed, the status will be updated in the Namespace status at which point, the user has to intervene and manually perform the rollback operation by vMotioning VMs.
  • Namespaces which are already evacuated will remain in their current cluster.
  • If the supervisor management infrastructure VMs are being vMotioned, those evacuations will be run to completion.
  • If the workload evacuations are completed and the cluster is about to be removed from the vSphere Zone, the task becomes uncancellable and hence the cancellation of the task will return an error.

This operation was added in vSphere API 9.1.0.0.

Returns an authorization error if you do not have all of the privileges described as follows:

  • The resource com.vmware.vcenter.consumption_domains.Zone referenced by the parameter zone requires Zone.Manage.
Request
URI
POST
https://{host}/api/vcenter/consumption-domains/zones/cluster/{zone}/associations?action=evacuate-and-remove&vmw-task=true
COPY
Path Parameters
string
zone
Required

Identifier of the zone for which the mapping needs to be removed.

The parameter must be an identifier for the resource type: com.vmware.vcenter.consumption_domains.Zone.


Request Body

Identifier of the vSphere cluster which needs to be removed from the vSphere Zone.

The parameter must be an identifier for the resource type: ClusterComputeResource.

string of type(s) application/json
Required
Authentication
This operation uses the following authentication methods.
Responses
202

Success!

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

401

if the user can not be authenticated.

Returns Vapi Std Errors Unauthenticated of type(s) application/json
This response body class contains all of the following: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": {
                        "id": "string",
                        "params": {
                            "params": "Vapi Std LocalizationParam Object"
                        }
                    },
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string",
    "challenge": "string"
}
string
challenge
Optional

Indicates the authentication challenges applicable to the target API provider. It can be used by a client to discover the correct authentication scheme to use. The exact syntax of the value is defined by the specific provider, the protocol and authentication schemes used.

For example, a provider using REST may adhere to the WWW-Authenticate HTTP header specification, RFC7235, section 4.1. In this case an example challenge value may be: SIGN realm="27da1358-2ba4-11e9-b210-d663bd873d93",sts="http://vcenter/sso?vsphere.local", Basic realm="vCenter"

This property was added in vSphere API 7.0.0.0.

This property is optional because it was added in a newer version than its parent node.


404

if the specified vSphere Zone is not known to this vCenter server or the specified vSphere cluster is not known to this vCenter server.

Returns Vapi Std Errors NotFound of type(s) application/json
This response body class contains all of the following: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string"
}

409

if there is another cluster being evacuated and removed concurrently in the same vSphere Zone.

Returns Vapi Std Errors ConcurrentChange of type(s) application/json
This response body class contains all of the following: Vapi Std Errors Error
{
    "messages": [
        {
            "id": "string",
            "default_message": "string",
            "args": [
                "string"
            ],
            "params": {
                "params": {
                    "s": "string",
                    "dt": "string",
                    "i": 0,
                    "d": "number",
                    "l": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string"
}

500

when unexpected error is encountered.

Returns Vapi 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": "Vapi Std NestedLocalizableMessage Object",
                    "format": "string",
                    "precision": 0
                }
            },
            "localized": "string"
        }
    ],
    "data": {},
    "error_type": "string"
}
array of object
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 Vapi Std Errors ArgumentLocations, Vapi Std Errors FileLocations, and Vapi Std Errors TransientIndication schemas are intended as possible values for this property. Vapi Std DynamicID may also be useful as a value for this property (although that is not its primary purpose). Some resources may provide their own specific schemas for use as the value of this property when reporting errors from their operations.

Some operations will not set this property when reporting errors.

string
error_type
Required

Discriminator field to help API consumers identify the structure type.

For more information see: Vapi Std Errors Error Type.

This property was added in vSphere API 6.7.2.

Can be missing or null for compatibility with preceding implementations.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/api/vcenter/consumption-domains/zones/cluster/{zone}/associations?action=evacuate-and-remove&vmw-task=true