Create Temporary Guest Filesystem Directories
Creates a temporary directory. Creates a new unique temporary directory for the user to use as needed. The guest operating system may clean up the directory after a guest specific amount of time if parentPath is not set, or the user can remove the directory when no longer needed.
The new directory name will be created in a guest-specific format using prefix, a guest generated string and suffix in parentPath.
if you do not have all of the privileges described as follows: - The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.GuestOperations.Modify.
Request
URLURL
Path Parameters
Path Parameters
Virtual Machine to perform the operation on. The parameter must be an identifier for the resource type: VirtualMachine.
Header Parameters
Header Parameters
Required session ID, acquired from Create Session API under CIS product
vmware-api-session-id example
"b00db39f948d13ea1e59b4d6fce56389"
Request Body
This is a request body class for an operation.
{
"credentials": {
"interactive_session": false,
"type": "USERNAME_PASSWORD"
},
"prefix": "string",
"suffix": "string"
}
The prefix to be given to the new temporary directory.
The suffix to be given to the new temporary directory.
The complete path to the directory in which to create the new directory. Directory If unset a guest-specific default will be used.
Authentication
Response
Response BodyResponse Body
The absolute path of the temporary directory that is created.
Errors
com.vmware.vapi.std.errors.invalid_argument : if parentPath is not a directory. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure. if parentPath is too long. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure. | com.vmware.vapi.std.errors.not_allowed_in_current_state : if the virtual machine is not running. | com.vmware.vapi.std.errors.unsupported : if the operation is not supported by the VMware Tools in the guest operating system. if the operation is disabled by the VMware Tools in the guest operating system.
com.vmware.vapi.std.errors.unauthorized : if parentPath cannot be accessed. if a file cannot be created because the guest authentication will not allow the operation.
com.vmware.vapi.std.errors.not_found : if the virtual machine is not found. if parentPath is set and does not exist. The value of com.vmware.vapi.std.errors.Error#data will contain all the fields defined in the FileErrorDetails providing additional information about the failure.
‘Default’ means this response is used for all HTTP codes that are not covered individually for this operation.
Code Samples
PowerCLI Client SDK Example
PowerCLI Client SDK All Parameters Example
cURL Command
Vendor Extensions
x-vmw-doc-operation: create_temporary