Host Datastore System Update Local Swap Datastore

Host Datastore System Update Local Swap Datastore
Choose the *localSwapDatastore* for this host.

Choose the localSwapDatastore for this host.

Any change to this setting will affect virtual machines that subsequently power on or resume from a suspended state at this host, or that migrate to this host while powered on; virtual machines that are currently powered on at this host will not yet be affected.

Required privileges: Host.Config.Storage

Request
URI
POST
https://{vcenter-host}/sdk/vim25/{release}/HostDatastoreSystem/{moId}/UpdateLocalSwapDatastore
COPY
Path Parameters
string
moId
Required

The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId, in this case HostDatastoreSystem/{moId}.

string
release
Required

The vSphere release schema. The current specification covers vSphere 9.1.0.0 APIs.


Request Body
UpdateLocalSwapDatastoreRequestType of type(s) application/json
Optional
{
    "datastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    }
}
datastore
Optional

The selected datastore. If this argument is unset, then the localSwapDatastore property becomes unset. Otherwise, the host must have read/write access to the indicated datastore.

Authentication
This operation uses the following authentication methods.
Responses
204

No Content

Operation doesn't return any data structure

500

NotSupported: if the datastore argument is set and the localSwapDatastoreSupported capability is not true for the host.

InaccessibleDatastore: if the datastore argument is set and the host cannot access the indicated datastore.

DatastoreNotWritableOnHost: if the datastore argument is set and the host cannot write to the indicated datastore.

Returns InvalidDatastore of type(s) application/json
This response body class contains all of the following: VimFault
{
    "_typeName": "string",
    "faultCause": {
        "_typeName": "string",
        "faultCause": "MethodFault Object",
        "faultMessage": [
            {
                "_typeName": "string",
                "key": "string",
                "arg": [
                    {
                        "_typeName": "string",
                        "key": "string",
                        "value": {
                            "_typeName": "string"
                        }
                    }
                ],
                "message": "string"
            }
        ]
    },
    "faultMessage": [
        {
            "_typeName": "string",
            "key": "string",
            "arg": [
                {
                    "_typeName": "string",
                    "key": "string",
                    "value": {
                        "_typeName": "string"
                    }
                }
            ],
            "message": "string"
        }
    ],
    "datastore": {
        "_typeName": "string",
        "type": "string",
        "value": "string"
    },
    "name": "string"
}
datastore
Optional

The datastore that is invalid.

string
name
Optional

The name of the datastore that is invalid.


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}' https://{api_host}/sdk/vim25/{release}/HostDatastoreSystem/{moId}/UpdateLocalSwapDatastore