Receive-XenRrdUpdates
Downloads data from the server using the 'rrd\_updates' HTTP interface.
Syntax
Receive-XenRrdUpdates -XenHost <string> -Path <string>
[-DataCopiedDelegate <HTTP.DataCopiedDelegate>] [-Start <long>] [-Cf <string>]
[-Interval <long>] [-IsHost <bool>] [-Uuid <string>] [-Json <bool>]
[-CancellingDelegate <HTTP.FuncBool>] [-TimeoutMs <int>] [-Proxy <IWebProxy>]
[-CertificateValidationCallback <RemoteCertificateValidationCallback>]
[-NoWarnNewCertificates] [-NoWarnCertificates] [-TaskRef <string>] [-BestEffort]
[-SessionOpaqueRef <string>] [<CommonParameters>]
Description
This cmdlet wraps the 'rrd\_updates' HTTP interface of the server. Downloads data from the server over HTTP(S).
Parameters
-BestEffort
If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-CancellingDelegate
A delegate polled during the transfer; returning true cancels it.
| Attribute | Value |
|---|---|
| Type | HTTP.FuncBool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-CertificateValidationCallback
A callback used to validate the server's TLS certificate.
| Attribute | Value |
|---|---|
| Type | RemoteCertificateValidationCallback |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Cf
Limits the data to archives of one consolidation function: AVERAGE, MIN, MAX or LAST.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-DataCopiedDelegate
A delegate called with the number of bytes copied so far.
| Attribute | Value |
|---|---|
| Type | HTTP.DataCopiedDelegate |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Interval
The resolution wanted, in seconds. The server uses the archive that best matches it and still covers the start time.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-IsHost
If true, includes the host's own data as well as the VMs'.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Json
If specified, with any value, the data is returned as JSON rather than XML.
| Attribute | Value |
|---|---|
| Type | bool |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NoWarnCertificates
If set, no warning is issued for certificate validation failures.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-NoWarnNewCertificates
If set, no warning is issued when the server presents a certificate that has not been seen before.
| Attribute | Value |
|---|---|
| Type | SwitchParameter |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Path
The path of the local file to read from or write to.
| Attribute | Value |
|---|---|
| Type | string |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
-Proxy
The web proxy to use for the request.
| Attribute | Value |
|---|---|
| Type | IWebProxy |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-SessionOpaqueRef
The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Start
The time to return updates from, in seconds since the Unix epoch. A negative value counts back from the latest update, so -600 returns the last ten minutes. Required.
| Attribute | Value |
|---|---|
| Type | long |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-TaskRef
The opaque reference of a task to track the transfer with.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-TimeoutMs
The timeout of the HTTP request, in milliseconds.
| Attribute | Value |
|---|---|
| Type | int |
| Required | False |
| Position | Named |
| Accepts pipeline input | False |
-Uuid
Has no effect: the server returns the data of every VM. Its handler filters on vm\_uuid and sr\_uuid, which this cmdlet does not send.
| Attribute | Value |
|---|---|
| Type | string |
| Required | False |
| Position | Named |
| Accepts pipeline input | True (ByPropertyName) |
-XenHost
The address of the server to transfer data with.
| Attribute | Value |
|---|---|
| Type | string |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
Inputs
-
string
Outputs
-
void
Examples
Example 1: Download a file from the server
PS> Receive-XenRrdUpdates -XenHost "myserver" -Path "C:\download.dat" -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff
Downloads from the server into the local file.
Example 2: Set a timeout for the transfer
PS> Receive-XenRrdUpdates -XenHost "myserver" -Path "C:\download.dat" -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff -TimeoutMs 600000
Gives the transfer ten minutes. The timeout covers the HTTP request, not the API call that set it up.
Example 3: Use an existing session
PS> Receive-XenRrdUpdates -XenHost "myserver" -Path "C:\download.dat" -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff -SessionOpaqueRef $session.opaque_ref
Runs against a session already opened with Connect-XenServer rather than the default one, which is how a script drives more than one server at a time.
Related links
-
Using the XenServer PowerShell module