const ( CPUCapacityProperty = 0x00010000 CPUSchedulingPriorityProperty = 0x00020000 IdleLPReserveProperty = 0x00030000 )
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
var InterruptModerationValueToName = map[InterruptModerationValue]InterruptModerationName{ DefaultValue: DefaultName, AdaptiveValue: AdaptiveName, OffValue: OffName, LowValue: LowName, MediumValue: MediumName, HighValue: HighName, }
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIKey struct { Key string Prefix string }
type Attachment struct { Type_ string `json:"Type,omitempty"` Path string `json:"Path,omitempty"` IgnoreFlushes bool `json:"IgnoreFlushes,omitempty"` CachingMode string `json:"CachingMode,omitempty"` NoWriteHardening bool `json:"NoWriteHardening,omitempty"` DisableExpansionOptimization bool `json:"DisableExpansionOptimization,omitempty"` IgnoreRelativeLocator bool `json:"IgnoreRelativeLocator,omitempty"` CaptureIoAttributionContext bool `json:"CaptureIoAttributionContext,omitempty"` ReadOnly bool `json:"ReadOnly,omitempty"` SupportCompressedVolumes bool `json:"SupportCompressedVolumes,omitempty"` AlwaysAllowSparseFiles bool `json:"AlwaysAllowSparseFiles,omitempty"` ExtensibleVirtualDiskType string `json:"ExtensibleVirtualDiskType,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
type Battery struct { }
type CPUGroupOperation string
const ( CreateGroup CPUGroupOperation = "CreateGroup" DeleteGroup CPUGroupOperation = "DeleteGroup" SetProperty CPUGroupOperation = "SetProperty" )
type CPUGroupPropertyCode uint32
type CacheQueryStatsResponse struct { L3OccupancyBytes int32 `json:"L3OccupancyBytes,omitempty"` L3TotalBwBytes int32 `json:"L3TotalBwBytes,omitempty"` L3LocalBwBytes int32 `json:"L3LocalBwBytes,omitempty"` }
type Chipset struct { Uefi *Uefi `json:"Uefi,omitempty"` IsNumLockDisabled bool `json:"IsNumLockDisabled,omitempty"` BaseBoardSerialNumber string `json:"BaseBoardSerialNumber,omitempty"` ChassisSerialNumber string `json:"ChassisSerialNumber,omitempty"` ChassisAssetTag string `json:"ChassisAssetTag,omitempty"` UseUtc bool `json:"UseUtc,omitempty"` // LinuxKernelDirect - Added in v2.2 Builds >=181117 LinuxKernelDirect *LinuxKernelDirect `json:"LinuxKernelDirect,omitempty"` }
type CloseHandle struct { Handle string `json:"Handle,omitempty"` }
ComPort specifies the named pipe that will be used for the port, with empty string indicating a disconnected port.
type ComPort struct { NamedPipe string `json:"NamedPipe,omitempty"` OptimizeForDebugger bool `json:"OptimizeForDebugger,omitempty"` }
type ComputeSystem struct { Owner string `json:"Owner,omitempty"` SchemaVersion *Version `json:"SchemaVersion,omitempty"` HostingSystemId string `json:"HostingSystemId,omitempty"` HostedSystem interface{} `json:"HostedSystem,omitempty"` Container *Container `json:"Container,omitempty"` VirtualMachine *VirtualMachine `json:"VirtualMachine,omitempty"` ShouldTerminateOnLastHandleClosed bool `json:"ShouldTerminateOnLastHandleClosed,omitempty"` }
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration() *Configuration
func (c *Configuration) AddDefaultHeader(key string, value string)
type ConsoleSize struct { Height int32 `json:"Height,omitempty"` Width int32 `json:"Width,omitempty"` }
type Container struct { GuestOs *GuestOs `json:"GuestOs,omitempty"` Storage *Storage `json:"Storage,omitempty"` MappedDirectories []MappedDirectory `json:"MappedDirectories,omitempty"` MappedPipes []MappedPipe `json:"MappedPipes,omitempty"` Memory *Memory `json:"Memory,omitempty"` Processor *Processor `json:"Processor,omitempty"` Networking *Networking `json:"Networking,omitempty"` HvSocket *HvSocket `json:"HvSocket,omitempty"` ContainerCredentialGuard *ContainerCredentialGuardState `json:"ContainerCredentialGuard,omitempty"` RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"` AssignedDevices []Device `json:"AssignedDevices,omitempty"` AdditionalDeviceNamespace *ContainerDefinitionDevice `json:"AdditionalDeviceNamespace,omitempty"` }
type ContainerCredentialGuardAddInstanceRequest struct { Id string `json:"Id,omitempty"` CredentialSpec string `json:"CredentialSpec,omitempty"` Transport string `json:"Transport,omitempty"` }
type ContainerCredentialGuardHvSocketServiceConfig struct { ServiceId string `json:"ServiceId,omitempty"` ServiceConfig *HvSocketServiceConfig `json:"ServiceConfig,omitempty"` }
type ContainerCredentialGuardInstance struct { Id string `json:"Id,omitempty"` CredentialGuard *ContainerCredentialGuardState `json:"CredentialGuard,omitempty"` HvSocketConfig *ContainerCredentialGuardHvSocketServiceConfig `json:"HvSocketConfig,omitempty"` }
type ContainerCredentialGuardModifyOperation string
const ( AddInstance ContainerCredentialGuardModifyOperation = "AddInstance" RemoveInstance ContainerCredentialGuardModifyOperation = "RemoveInstance" )
type ContainerCredentialGuardOperationRequest struct { Operation ContainerCredentialGuardModifyOperation `json:"Operation,omitempty"` OperationDetails interface{} `json:"OperationDetails,omitempty"` }
type ContainerCredentialGuardRemoveInstanceRequest struct { Id string `json:"Id,omitempty"` }
type ContainerCredentialGuardState struct { // Authentication cookie for calls to a Container Credential Guard instance. Cookie string `json:"Cookie,omitempty"` // Name of the RPC endpoint of the Container Credential Guard instance. RpcEndpoint string `json:"RpcEndpoint,omitempty"` // Transport used for the configured Container Credential Guard instance. Transport string `json:"Transport,omitempty"` // Credential spec used for the configured Container Credential Guard instance. CredentialSpec string `json:"CredentialSpec,omitempty"` }
type ContainerCredentialGuardSystemInfo struct { Instances []ContainerCredentialGuardInstance `json:"Instances,omitempty"` }
type ContainerDefinitionDevice struct { DeviceExtension []DeviceExtension `json:"device_extension,omitempty"` }
memory usage as viewed from within the container
type ContainerMemoryInformation struct { TotalPhysicalBytes int32 `json:"TotalPhysicalBytes,omitempty"` TotalUsage int32 `json:"TotalUsage,omitempty"` CommittedBytes int32 `json:"CommittedBytes,omitempty"` SharedCommittedBytes int32 `json:"SharedCommittedBytes,omitempty"` CommitLimitBytes int32 `json:"CommitLimitBytes,omitempty"` PeakCommitmentBytes int32 `json:"PeakCommitmentBytes,omitempty"` }
CPU groups allow Hyper-V administrators to better manage and allocate the host's CPU resources across guest virtual machines
type CpuGroup struct { Id string `json:"Id,omitempty"` }
type CpuGroupAffinity struct { LogicalProcessorCount int32 `json:"LogicalProcessorCount,omitempty"` LogicalProcessors []int32 `json:"LogicalProcessors,omitempty"` }
type CpuGroupConfig struct { GroupId string `json:"GroupId,omitempty"` Affinity *CpuGroupAffinity `json:"Affinity,omitempty"` GroupProperties []CpuGroupProperty `json:"GroupProperties,omitempty"` // Hypervisor CPU group IDs exposed to clients HypervisorGroupId uint64 `json:"HypervisorGroupId,omitempty"` }
Structure used to return cpu groups for a Service property query
type CpuGroupConfigurations struct { CpuGroups []CpuGroupConfig `json:"CpuGroups,omitempty"` }
type CpuGroupProperty struct { PropertyCode uint32 `json:"PropertyCode,omitempty"` PropertyValue uint32 `json:"PropertyValue,omitempty"` }
Create group operation settings
type CreateGroupOperation struct { GroupId string `json:"GroupId,omitempty"` LogicalProcessorCount uint32 `json:"LogicalProcessorCount,omitempty"` LogicalProcessors []uint32 `json:"LogicalProcessors,omitempty"` }
type DebugOptions struct { // BugcheckSavedStateFileName is the path for the file in which the guest VM state will be saved when // the guest crashes. BugcheckSavedStateFileName string `json:"BugcheckSavedStateFileName,omitempty"` // BugcheckNoCrashdumpSavedStateFileName is the path of the file in which the guest VM state will be // saved when the guest crashes but the guest isn't able to generate the crash dump. This usually // happens in early boot failures. BugcheckNoCrashdumpSavedStateFileName string `json:"BugcheckNoCrashdumpSavedStateFileName,omitempty"` TripleFaultSavedStateFileName string `json:"TripleFaultSavedStateFileName,omitempty"` FirmwareDumpFileName string `json:"FirmwareDumpFileName,omitempty"` }
Delete group operation settings
type DeleteGroupOperation struct { GroupId string `json:"GroupId,omitempty"` }
type Device struct { // The type of device to assign to the container. Type DeviceType `json:"Type,omitempty"` // The interface class guid of the device interfaces to assign to the container. Only used when Type is ClassGuid. InterfaceClassGuid string `json:"InterfaceClassGuid,omitempty"` // The location path of the device to assign to the container. Only used when Type is DeviceInstanceID. LocationPath string `json:"LocationPath,omitempty"` }
type DeviceCategory struct { Name string `json:"name,omitempty"` InterfaceClass []InterfaceClass `json:"interface_class,omitempty"` }
type DeviceExtension struct { DeviceCategory *DeviceCategory `json:"device_category,omitempty"` Namespace *DeviceExtensionNamespace `json:"namespace,omitempty"` }
type DeviceExtensionNamespace struct { Ob *ObjectNamespace `json:"ob,omitempty"` Device *DeviceNamespace `json:"device,omitempty"` }
type DeviceInstance struct { Id string `json:"id,omitempty"` LocationPath string `json:"location_path,omitempty"` PortName string `json:"port_name,omitempty"` InterfaceClass []InterfaceClass `json:"interface_class,omitempty"` }
type DeviceNamespace struct { RequiresDriverstore bool `json:"requires_driverstore,omitempty"` DeviceCategory []DeviceCategory `json:"device_category,omitempty"` DeviceInstance []DeviceInstance `json:"device_instance,omitempty"` }
type DeviceType string
const ( ClassGUID DeviceType = "ClassGuid" DeviceInstanceID DeviceType = "DeviceInstance" GPUMirror DeviceType = "GpuMirror" )
type Devices struct { ComPorts map[string]ComPort `json:"ComPorts,omitempty"` Scsi map[string]Scsi `json:"Scsi,omitempty"` VirtualPMem *VirtualPMemController `json:"VirtualPMem,omitempty"` NetworkAdapters map[string]NetworkAdapter `json:"NetworkAdapters,omitempty"` VideoMonitor *VideoMonitor `json:"VideoMonitor,omitempty"` Keyboard *Keyboard `json:"Keyboard,omitempty"` Mouse *Mouse `json:"Mouse,omitempty"` HvSocket *HvSocket2 `json:"HvSocket,omitempty"` EnhancedModeVideo *EnhancedModeVideo `json:"EnhancedModeVideo,omitempty"` GuestCrashReporting *GuestCrashReporting `json:"GuestCrashReporting,omitempty"` VirtualSmb *VirtualSmb `json:"VirtualSmb,omitempty"` Plan9 *Plan9 `json:"Plan9,omitempty"` Battery *Battery `json:"Battery,omitempty"` FlexibleIov map[string]FlexibleIoDevice `json:"FlexibleIov,omitempty"` SharedMemory *SharedMemoryConfiguration `json:"SharedMemory,omitempty"` // TODO: This is pre-release support in schema 2.3. Need to add build number // docs when a public build with this is out. VirtualPci map[string]VirtualPciDevice `json:",omitempty"` }
type EnhancedModeVideo struct { ConnectionOptions *RdpConnectionOptions `json:"ConnectionOptions,omitempty"` }
type FlexibleIoDevice struct { EmulatorId string `json:"EmulatorId,omitempty"` HostingModel string `json:"HostingModel,omitempty"` Configuration []string `json:"Configuration,omitempty"` }
type GuestConnection struct { // Use Vsock rather than Hyper-V sockets to communicate with the guest service. UseVsock bool `json:"UseVsock,omitempty"` // Don't disconnect the guest connection when pausing the virtual machine. UseConnectedSuspend bool `json:"UseConnectedSuspend,omitempty"` }
Information about the guest.
type GuestConnectionInfo struct { // Each schema version x.y stands for the range of versions a.b where a==x and b<=y. This list comes from the SupportedSchemaVersions field in GcsCapabilities. SupportedSchemaVersions []Version `json:"SupportedSchemaVersions,omitempty"` ProtocolVersion int32 `json:"ProtocolVersion,omitempty"` GuestDefinedCapabilities *interface{} `json:"GuestDefinedCapabilities,omitempty"` }
type GuestCrashReporting struct { WindowsCrashSettings *WindowsCrashReporting `json:"WindowsCrashSettings,omitempty"` }
type GuestOs struct { HostName string `json:"HostName,omitempty"` }
type GuestState struct { // The path to an existing file uses for persistent guest state storage. An empty string indicates the system should initialize new transient, in-memory guest state. GuestStateFilePath string `json:"GuestStateFilePath,omitempty"` // The guest state file type affected by different guest isolation modes - whether a file or block storage. GuestStateFileType string `json:"GuestStateFileType,omitempty"` // The path to an existing file for persistent runtime state storage. An empty string indicates the system should initialize new transient, in-memory runtime state. RuntimeStateFilePath string `json:"RuntimeStateFilePath,omitempty"` // If true, the guest state and runtime state files will be used as templates to populate transient, in-memory state instead of using the files as persistent backing store. ForceTransientState bool `json:"ForceTransientState,omitempty"` }
Structure used to request a service processor modification
type HostProcessorModificationRequest struct { Operation CPUGroupOperation `json:"Operation,omitempty"` OperationDetails interface{} `json:"OperationDetails,omitempty"` }
type HostedSystem struct { SchemaVersion *Version `json:"SchemaVersion,omitempty"` Container *Container `json:"Container,omitempty"` }
type HvSocket struct { Config *HvSocketSystemConfig `json:"Config,omitempty"` EnablePowerShellDirect bool `json:"EnablePowerShellDirect,omitempty"` }
HvSocket configuration for a VM
type HvSocket2 struct { HvSocketConfig *HvSocketSystemConfig `json:"HvSocketConfig,omitempty"` }
This class defines address settings applied to a VM by the GCS every time a VM starts or restores.
type HvSocketAddress struct { LocalAddress string `json:"LocalAddress,omitempty"` ParentAddress string `json:"ParentAddress,omitempty"` }
type HvSocketServiceConfig struct { // SDDL string that HvSocket will check before allowing a host process to bind to this specific service. If not specified, defaults to the system DefaultBindSecurityDescriptor, defined in HvSocketSystemWpConfig in V1. BindSecurityDescriptor string `json:"BindSecurityDescriptor,omitempty"` // SDDL string that HvSocket will check before allowing a host process to connect to this specific service. If not specified, defaults to the system DefaultConnectSecurityDescriptor, defined in HvSocketSystemWpConfig in V1. ConnectSecurityDescriptor string `json:"ConnectSecurityDescriptor,omitempty"` // If true, HvSocket will process wildcard binds for this service/system combination. Wildcard binds are secured in the registry at SOFTWARE/Microsoft/Windows NT/CurrentVersion/Virtualization/HvSocket/WildcardDescriptors AllowWildcardBinds bool `json:"AllowWildcardBinds,omitempty"` // Disabled controls whether the HvSocket service is accepting connection requests. // This set to true will make the service refuse all incoming connections as well as cancel // any connections already established. The service itself will still be active however // and can be re-enabled at a future time. Disabled bool `json:"Disabled,omitempty"` }
This is the HCS Schema version of the HvSocket configuration. The VMWP version is located in Config.Devices.IC in V1.
type HvSocketSystemConfig struct { // SDDL string that HvSocket will check before allowing a host process to bind to an unlisted service for this specific container/VM (not wildcard binds). DefaultBindSecurityDescriptor string `json:"DefaultBindSecurityDescriptor,omitempty"` // SDDL string that HvSocket will check before allowing a host process to connect to an unlisted service in the VM/container. DefaultConnectSecurityDescriptor string `json:"DefaultConnectSecurityDescriptor,omitempty"` ServiceTable map[string]HvSocketServiceConfig `json:"ServiceTable,omitempty"` }
type InterfaceClass struct { Type_ string `json:"type,omitempty"` Identifier string `json:"identifier,omitempty"` Recurse bool `json:"recurse,omitempty"` }
type InterruptModerationName string
The valid interrupt moderation modes for I/O virtualization (IOV) offloading.
const ( DefaultName InterruptModerationName = "Default" AdaptiveName InterruptModerationName = "Adaptive" OffName InterruptModerationName = "Off" LowName InterruptModerationName = "Low" MediumName InterruptModerationName = "Medium" HighName InterruptModerationName = "High" )
type InterruptModerationValue uint32
const ( DefaultValue InterruptModerationValue = iota AdaptiveValue OffValue LowValue InterruptModerationValue = 100 MediumValue InterruptModerationValue = 200 HighValue InterruptModerationValue = 300 )
type IovSettings struct { // The weight assigned to this port for I/O virtualization (IOV) offloading. // Setting this to 0 disables IOV offloading. OffloadWeight *uint32 `json:"OffloadWeight,omitempty"` // The number of queue pairs requested for this port for I/O virtualization (IOV) offloading. QueuePairsRequested *uint32 `json:"QueuePairsRequested,omitempty"` // The interrupt moderation mode for I/O virtualization (IOV) offloading. InterruptModeration *InterruptModerationName `json:"InterruptModeration,omitempty"` }
type IsolationSettings struct { // Guest isolation type options to decide virtual trust levels of virtual machine IsolationType string `json:"IsolationType,omitempty"` // Configuration to debug HCL layer for HCS VM TODO: Task 31102306: Miss the way to prevent the exposure of private debug configuration in HCS TODO: Think about the secret configurations which are private in VMMS VM (only edit by hvsedit) DebugHost string `json:"DebugHost,omitempty"` DebugPort int64 `json:"DebugPort,omitempty"` // Optional data passed by host on isolated virtual machine start LaunchData string `json:"LaunchData,omitempty"` HclEnabled bool `json:"HclEnabled,omitempty"` }
type Keyboard struct { }
type Layer struct { Id string `json:"Id,omitempty"` Path string `json:"Path,omitempty"` PathType string `json:"PathType,omitempty"` // Unspecified defaults to Enabled Cache string `json:"Cache,omitempty"` }
type LinuxKernelDirect struct { KernelFilePath string `json:"KernelFilePath,omitempty"` InitRdPath string `json:"InitRdPath,omitempty"` KernelCmdLine string `json:"KernelCmdLine,omitempty"` }
type LogicalProcessor struct { LpIndex uint32 `json:"LpIndex,omitempty"` NodeNumber uint8 `json:"NodeNumber,omitempty"` PackageId uint32 `json:"PackageId,omitempty"` CoreId uint32 `json:"CoreId,omitempty"` RootVpIndex int32 `json:"RootVpIndex,omitempty"` }
type MappedDirectory struct { HostPath string `json:"HostPath,omitempty"` HostPathType string `json:"HostPathType,omitempty"` ContainerPath string `json:"ContainerPath,omitempty"` ReadOnly bool `json:"ReadOnly,omitempty"` }
type MappedPipe struct { ContainerPipeName string `json:"ContainerPipeName,omitempty"` HostPath string `json:"HostPath,omitempty"` HostPathType string `json:"HostPathType,omitempty"` }
type Memory struct { SizeInMB uint64 `json:"SizeInMB,omitempty"` }
type Memory2 struct { SizeInMB uint64 `json:"SizeInMB,omitempty"` AllowOvercommit bool `json:"AllowOvercommit,omitempty"` EnableHotHint bool `json:"EnableHotHint,omitempty"` EnableColdHint bool `json:"EnableColdHint,omitempty"` EnableEpf bool `json:"EnableEpf,omitempty"` // EnableDeferredCommit is private in the schema. If regenerated need to add back. EnableDeferredCommit bool `json:"EnableDeferredCommit,omitempty"` // EnableColdDiscardHint if enabled, then the memory cold discard hint feature is exposed // to the VM, allowing it to trim non-zeroed pages from the working set (if supported by // the guest operating system). EnableColdDiscardHint bool `json:"EnableColdDiscardHint,omitempty"` // LowMmioGapInMB is the low MMIO region allocated below 4GB. // // TODO: This is pre-release support in schema 2.3. Need to add build number // docs when a public build with this is out. LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"` // HighMmioBaseInMB is the high MMIO region allocated above 4GB (base and // size). // // TODO: This is pre-release support in schema 2.3. Need to add build number // docs when a public build with this is out. HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"` // HighMmioGapInMB is the high MMIO region. // // TODO: This is pre-release support in schema 2.3. Need to add build number // docs when a public build with this is out. HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"` }
type MemoryInformationForVm struct { VirtualNodeCount uint32 `json:"VirtualNodeCount,omitempty"` VirtualMachineMemory *VmMemory `json:"VirtualMachineMemory,omitempty"` VirtualNodes []VirtualNodeInfo `json:"VirtualNodes,omitempty"` }
Memory runtime statistics
type MemoryStats struct { MemoryUsageCommitBytes uint64 `json:"MemoryUsageCommitBytes,omitempty"` MemoryUsageCommitPeakBytes uint64 `json:"MemoryUsageCommitPeakBytes,omitempty"` MemoryUsagePrivateWorkingSetBytes uint64 `json:"MemoryUsagePrivateWorkingSetBytes,omitempty"` }
type ModificationRequest struct { PropertyType PropertyType `json:"PropertyType,omitempty"` Settings interface{} `json:"Settings,omitempty"` }
type ModifySettingRequest struct { ResourcePath string `json:"ResourcePath,omitempty"` RequestType guestrequest.RequestType `json:"RequestType,omitempty"` // NOTE: Swagger generated as string. Locally updated. Settings interface{} `json:"Settings,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated GuestRequest interface{} `json:"GuestRequest,omitempty"` // NOTE: Swagger generated as *interface{}. Locally updated }
type Mouse struct { }
type NetworkAdapter struct { EndpointId string `json:"EndpointId,omitempty"` MacAddress string `json:"MacAddress,omitempty"` // The I/O virtualization (IOV) offloading configuration. IovSettings *IovSettings `json:"IovSettings,omitempty"` }
type Networking struct { AllowUnqualifiedDnsQuery bool `json:"AllowUnqualifiedDnsQuery,omitempty"` DnsSearchList string `json:"DnsSearchList,omitempty"` NetworkSharedContainerName string `json:"NetworkSharedContainerName,omitempty"` // Guid in windows; string in linux Namespace string `json:"Namespace,omitempty"` NetworkAdapters []string `json:"NetworkAdapters,omitempty"` }
type ObjectDirectory struct { Name string `json:"name,omitempty"` Clonesd string `json:"clonesd,omitempty"` Shadow string `json:"shadow,omitempty"` Symlink []ObjectSymlink `json:"symlink,omitempty"` Objdir []ObjectDirectory `json:"objdir,omitempty"` }
type ObjectNamespace struct { Shadow string `json:"shadow,omitempty"` Symlink []ObjectSymlink `json:"symlink,omitempty"` Objdir []ObjectDirectory `json:"objdir,omitempty"` }
type ObjectSymlink struct { Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` Scope string `json:"scope,omitempty"` Pathtoclone string `json:"pathtoclone,omitempty"` AccessMask int32 `json:"access_mask,omitempty"` }
Notification data that is indicated to components running in the Virtual Machine.
type PauseNotification struct { Reason string `json:"Reason,omitempty"` }
Options for HcsPauseComputeSystem
type PauseOptions struct { SuspensionLevel string `json:"SuspensionLevel,omitempty"` HostedNotification *PauseNotification `json:"HostedNotification,omitempty"` }
type Plan9 struct { Shares []Plan9Share `json:"Shares,omitempty"` }
type Plan9Share struct { Name string `json:"Name,omitempty"` // The name by which the guest operation system can access this share, via the aname parameter in the Plan9 protocol. AccessName string `json:"AccessName,omitempty"` Path string `json:"Path,omitempty"` Port int32 `json:"Port,omitempty"` // Flags are marked private. Until they are exported correctly // // ReadOnly 0x00000001 // LinuxMetadata 0x00000004 // CaseSensitive 0x00000008 Flags int32 `json:"Flags,omitempty"` ReadOnly bool `json:"ReadOnly,omitempty"` UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"` AllowedFiles []string `json:"AllowedFiles,omitempty"` }
Information about a process running in a container
type ProcessDetails struct { ProcessId int32 `json:"ProcessId,omitempty"` ImageName string `json:"ImageName,omitempty"` CreateTimestamp time.Time `json:"CreateTimestamp,omitempty"` UserTime100ns int32 `json:"UserTime100ns,omitempty"` KernelTime100ns int32 `json:"KernelTime100ns,omitempty"` MemoryCommitBytes int32 `json:"MemoryCommitBytes,omitempty"` MemoryWorkingSetPrivateBytes int32 `json:"MemoryWorkingSetPrivateBytes,omitempty"` MemoryWorkingSetSharedBytes int32 `json:"MemoryWorkingSetSharedBytes,omitempty"` }
Passed to HcsRpc_ModifyProcess
type ProcessModifyRequest struct { Operation string `json:"Operation,omitempty"` ConsoleSize *ConsoleSize `json:"ConsoleSize,omitempty"` CloseHandle *CloseHandle `json:"CloseHandle,omitempty"` }
type ProcessParameters struct { ApplicationName string `json:"ApplicationName,omitempty"` CommandLine string `json:"CommandLine,omitempty"` // optional alternative to CommandLine, currently only supported by Linux GCS CommandArgs []string `json:"CommandArgs,omitempty"` User string `json:"User,omitempty"` WorkingDirectory string `json:"WorkingDirectory,omitempty"` Environment map[string]string `json:"Environment,omitempty"` // if set, will run as low-privilege process RestrictedToken bool `json:"RestrictedToken,omitempty"` // if set, ignore StdErrPipe EmulateConsole bool `json:"EmulateConsole,omitempty"` CreateStdInPipe bool `json:"CreateStdInPipe,omitempty"` CreateStdOutPipe bool `json:"CreateStdOutPipe,omitempty"` CreateStdErrPipe bool `json:"CreateStdErrPipe,omitempty"` // height then width ConsoleSize []int32 `json:"ConsoleSize,omitempty"` // if set, find an existing session for the user and create the process in it UseExistingLogin bool `json:"UseExistingLogin,omitempty"` // if set, use the legacy console instead of conhost UseLegacyConsole bool `json:"UseLegacyConsole,omitempty"` }
Status of a process running in a container
type ProcessStatus struct { ProcessId int32 `json:"ProcessId,omitempty"` Exited bool `json:"Exited,omitempty"` ExitCode int32 `json:"ExitCode,omitempty"` LastWaitResult int32 `json:"LastWaitResult,omitempty"` }
type Processor struct { Count int32 `json:"Count,omitempty"` Maximum int32 `json:"Maximum,omitempty"` Weight int32 `json:"Weight,omitempty"` }
type Processor2 struct { Count int32 `json:"Count,omitempty"` Limit int32 `json:"Limit,omitempty"` Weight int32 `json:"Weight,omitempty"` ExposeVirtualizationExtensions bool `json:"ExposeVirtualizationExtensions,omitempty"` // An optional object that configures the CPU Group to which a Virtual Machine is going to bind to. CpuGroup *CpuGroup `json:"CpuGroup,omitempty"` }
ProcessorLimits is used when modifying processor scheduling limits of a virtual machine.
type ProcessorLimits struct { // Maximum amount of host CPU resources that the virtual machine can use. Limit uint64 `json:"Limit,omitempty"` // Value describing the relative priority of this virtual machine compared to other virtual machines. Weight uint64 `json:"Weight,omitempty"` // Minimum amount of host CPU resources that the virtual machine is guaranteed. Reservation uint64 `json:"Reservation,omitempty"` // Provides the target maximum CPU frequency, in MHz, for a virtual machine. MaximumFrequencyMHz uint32 `json:"MaximumFrequencyMHz,omitempty"` }
CPU runtime statistics
type ProcessorStats struct { TotalRuntime100ns uint64 `json:"TotalRuntime100ns,omitempty"` RuntimeUser100ns uint64 `json:"RuntimeUser100ns,omitempty"` RuntimeKernel100ns uint64 `json:"RuntimeKernel100ns,omitempty"` }
type ProcessorTopology struct { LogicalProcessorCount uint32 `json:"LogicalProcessorCount,omitempty"` LogicalProcessors []LogicalProcessor `json:"LogicalProcessors,omitempty"` }
type Properties struct { Id string `json:"Id,omitempty"` SystemType string `json:"SystemType,omitempty"` RuntimeOsType string `json:"RuntimeOsType,omitempty"` Name string `json:"Name,omitempty"` Owner string `json:"Owner,omitempty"` RuntimeId string `json:"RuntimeId,omitempty"` RuntimeTemplateId string `json:"RuntimeTemplateId,omitempty"` State string `json:"State,omitempty"` Stopped bool `json:"Stopped,omitempty"` ExitType string `json:"ExitType,omitempty"` Memory *MemoryInformationForVm `json:"Memory,omitempty"` Statistics *Statistics `json:"Statistics,omitempty"` ProcessList []ProcessDetails `json:"ProcessList,omitempty"` TerminateOnLastHandleClosed bool `json:"TerminateOnLastHandleClosed,omitempty"` HostingSystemId string `json:"HostingSystemId,omitempty"` SharedMemoryRegionInfo []SharedMemoryRegionInfo `json:"SharedMemoryRegionInfo,omitempty"` GuestConnectionInfo *GuestConnectionInfo `json:"GuestConnectionInfo,omitempty"` // Metrics is not part of the API for HCS but this is used for LCOW v2 to // return the full cgroup metrics from the guest. Metrics *v1.Metrics `json:"LCOWMetrics,omitempty"` }
By default the basic properties will be returned. This query provides a way to request specific properties.
type PropertyQuery struct { PropertyTypes []PropertyType `json:"PropertyTypes,omitempty"` }
type PropertyType string
const ( PTMemory PropertyType = "Memory" PTGuestMemory PropertyType = "GuestMemory" PTStatistics PropertyType = "Statistics" PTProcessList PropertyType = "ProcessList" PTTerminateOnLastHandleClosed PropertyType = "TerminateOnLastHandleClosed" PropertyType = "SharedMemoryRegion" PTContainerCredentialGuard PropertyType = "ContainerCredentialGuard" // This field is not generated by swagger. This was added manually. PTGuestConnection PropertyType = "GuestConnection" PTICHeartbeatStatus PropertyType = "ICHeartbeatStatus" PTProcessorTopology PropertyType = "ProcessorTopology" PTCPUGroup PropertyType = "CpuGroup" )
type RdpConnectionOptions struct { AccessSids []string `json:"AccessSids,omitempty"` NamedPipe string `json:"NamedPipe,omitempty"` }
type RegistryChanges struct { AddValues []RegistryValue `json:"AddValues,omitempty"` DeleteKeys []RegistryKey `json:"DeleteKeys,omitempty"` }
type RegistryKey struct { Hive string `json:"Hive,omitempty"` Name string `json:"Name,omitempty"` Volatile bool `json:"Volatile,omitempty"` }
type RegistryValue struct { Key *RegistryKey `json:"Key,omitempty"` Name string `json:"Name,omitempty"` Type_ string `json:"Type,omitempty"` // One and only one value type must be set. StringValue string `json:"StringValue,omitempty"` BinaryValue string `json:"BinaryValue,omitempty"` DWordValue int32 `json:"DWordValue,omitempty"` QWordValue int32 `json:"QWordValue,omitempty"` // Only used if RegistryValueType is CustomType The data is in BinaryValue CustomType int32 `json:"CustomType,omitempty"` }
type RestoreState struct { // The path to the save state file to restore the system from. SaveStateFilePath string `json:"SaveStateFilePath,omitempty"` // The ID of the template system to clone this new system off of. An empty string indicates the system should not be cloned from a template. TemplateSystemId string `json:"TemplateSystemId,omitempty"` }
type SaveOptions struct { // The type of save operation to be performed. SaveType string `json:"SaveType,omitempty"` // The path to the file that will container the saved state. SaveStateFilePath string `json:"SaveStateFilePath,omitempty"` }
type Scsi struct { // Map of attachments, where the key is the integer LUN number on the controller. Attachments map[string]Attachment `json:"Attachments,omitempty"` }
type SecuritySettings struct { // Enablement of Trusted Platform Module on the computer system EnableTpm bool `json:"EnableTpm,omitempty"` Isolation *IsolationSettings `json:"Isolation,omitempty"` }
type ServiceProperties struct { // Changed Properties field to []json.RawMessage from []interface{} to avoid having to // remarshal sp.Properties[n] and unmarshal into the type(s) we want. Properties []json.RawMessage `json:"Properties,omitempty"` }
type SharedMemoryConfiguration struct { Regions []SharedMemoryRegion `json:"Regions,omitempty"` }
type SharedMemoryRegion struct { SectionName string `json:"SectionName,omitempty"` StartOffset int32 `json:"StartOffset,omitempty"` Length int32 `json:"Length,omitempty"` AllowGuestWrite bool `json:"AllowGuestWrite,omitempty"` HiddenFromGuest bool `json:"HiddenFromGuest,omitempty"` }
type SharedMemoryRegionInfo struct { SectionName string `json:"SectionName,omitempty"` GuestPhysicalAddress int32 `json:"GuestPhysicalAddress,omitempty"` }
Silo job information
type SiloProperties struct { Enabled bool `json:"Enabled,omitempty"` JobName string `json:"JobName,omitempty"` }
Runtime statistics for a container
type Statistics struct { Timestamp time.Time `json:"Timestamp,omitempty"` ContainerStartTime time.Time `json:"ContainerStartTime,omitempty"` Uptime100ns uint64 `json:"Uptime100ns,omitempty"` Processor *ProcessorStats `json:"Processor,omitempty"` Memory *MemoryStats `json:"Memory,omitempty"` Storage *StorageStats `json:"Storage,omitempty"` }
type Storage struct { // List of layers that describe the parent hierarchy for a container's storage. These layers combined together, presented as a disposable and/or committable working storage, are used by the container to record all changes done to the parent layers. Layers []Layer `json:"Layers,omitempty"` // Path that points to the scratch space of a container, where parent layers are combined together to present a new disposable and/or committable layer with the changes done during its runtime. Path string `json:"Path,omitempty"` QoS *StorageQoS `json:"QoS,omitempty"` }
type StorageQoS struct { IopsMaximum int32 `json:"IopsMaximum,omitempty"` BandwidthMaximum int32 `json:"BandwidthMaximum,omitempty"` }
Storage runtime statistics
type StorageStats struct { ReadCountNormalized uint64 `json:"ReadCountNormalized,omitempty"` ReadSizeBytes uint64 `json:"ReadSizeBytes,omitempty"` WriteCountNormalized uint64 `json:"WriteCountNormalized,omitempty"` WriteSizeBytes uint64 `json:"WriteSizeBytes,omitempty"` }
type SystemTime struct { Year int32 `json:"Year,omitempty"` Month int32 `json:"Month,omitempty"` DayOfWeek int32 `json:"DayOfWeek,omitempty"` Day int32 `json:"Day,omitempty"` Hour int32 `json:"Hour,omitempty"` Minute int32 `json:"Minute,omitempty"` Second int32 `json:"Second,omitempty"` Milliseconds int32 `json:"Milliseconds,omitempty"` }
type TimeZoneInformation struct { Bias int32 `json:"Bias,omitempty"` StandardName string `json:"StandardName,omitempty"` StandardDate *SystemTime `json:"StandardDate,omitempty"` StandardBias int32 `json:"StandardBias,omitempty"` DaylightName string `json:"DaylightName,omitempty"` DaylightDate *SystemTime `json:"DaylightDate,omitempty"` DaylightBias int32 `json:"DaylightBias,omitempty"` }
type Topology struct { Memory *Memory2 `json:"Memory,omitempty"` Processor *Processor2 `json:"Processor,omitempty"` }
type Uefi struct { EnableDebugger bool `json:"EnableDebugger,omitempty"` ApplySecureBootTemplate string `json:"ApplySecureBootTemplate,omitempty"` SecureBootTemplateId string `json:"SecureBootTemplateId,omitempty"` BootThis *UefiBootEntry `json:"BootThis,omitempty"` Console string `json:"Console,omitempty"` }
type UefiBootEntry struct { DeviceType string `json:"DeviceType,omitempty"` DevicePath string `json:"DevicePath,omitempty"` DiskNumber int32 `json:"DiskNumber,omitempty"` OptionalData string `json:"OptionalData,omitempty"` VmbFsRootPath string `json:"VmbFsRootPath,omitempty"` }
type Version struct { Major int32 `json:"Major,omitempty"` Minor int32 `json:"Minor,omitempty"` }
type VideoMonitor struct { HorizontalResolution int32 `json:"HorizontalResolution,omitempty"` VerticalResolution int32 `json:"VerticalResolution,omitempty"` ConnectionOptions *RdpConnectionOptions `json:"ConnectionOptions,omitempty"` }
type VirtualMachine struct { // StopOnReset is private in the schema. If regenerated need to put back. StopOnReset bool `json:"StopOnReset,omitempty"` Chipset *Chipset `json:"Chipset,omitempty"` ComputeTopology *Topology `json:"ComputeTopology,omitempty"` Devices *Devices `json:"Devices,omitempty"` GuestState *GuestState `json:"GuestState,omitempty"` RestoreState *RestoreState `json:"RestoreState,omitempty"` RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"` StorageQoS *StorageQoS `json:"StorageQoS,omitempty"` GuestConnection *GuestConnection `json:"GuestConnection,omitempty"` SecuritySettings *SecuritySettings `json:"SecuritySettings,omitempty"` DebugOptions *DebugOptions `json:"DebugOptions,omitempty"` }
type VirtualNodeInfo struct { VirtualNodeIndex int32 `json:"VirtualNodeIndex,omitempty"` PhysicalNodeNumber int32 `json:"PhysicalNodeNumber,omitempty"` VirtualProcessorCount int32 `json:"VirtualProcessorCount,omitempty"` MemoryUsageInPages int32 `json:"MemoryUsageInPages,omitempty"` }
type VirtualPMemController struct { Devices map[string]VirtualPMemDevice `json:"Devices,omitempty"` MaximumCount uint32 `json:"MaximumCount,omitempty"` MaximumSizeBytes uint64 `json:"MaximumSizeBytes,omitempty"` Backing string `json:"Backing,omitempty"` }
type VirtualPMemDevice struct { HostPath string `json:"HostPath,omitempty"` ReadOnly bool `json:"ReadOnly,omitempty"` ImageFormat string `json:"ImageFormat,omitempty"` }
type VirtualPMemMapping struct { HostPath string `json:"HostPath,omitempty"` ImageFormat string `json:"ImageFormat,omitempty"` }
TODO: This is pre-release support in schema 2.3. Need to add build number docs when a public build with this is out.
type VirtualPciDevice struct { Functions []VirtualPciFunction `json:",omitempty"` }
TODO: This is pre-release support in schema 2.3. Need to add build number docs when a public build with this is out.
type VirtualPciFunction struct { DeviceInstancePath string `json:",omitempty"` VirtualFunction uint16 `json:",omitempty"` }
type VirtualSmb struct { Shares []VirtualSmbShare `json:"Shares,omitempty"` DirectFileMappingInMB int64 `json:"DirectFileMappingInMB,omitempty"` }
type VirtualSmbShare struct { Name string `json:"Name,omitempty"` Path string `json:"Path,omitempty"` AllowedFiles []string `json:"AllowedFiles,omitempty"` Options *VirtualSmbShareOptions `json:"Options,omitempty"` }
type VirtualSmbShareOptions struct { ReadOnly bool `json:"ReadOnly,omitempty"` // convert exclusive access to shared read access ShareRead bool `json:"ShareRead,omitempty"` // all opens will use cached I/O CacheIo bool `json:"CacheIo,omitempty"` // disable oplock support NoOplocks bool `json:"NoOplocks,omitempty"` // Acquire the backup privilege when attempting to open TakeBackupPrivilege bool `json:"TakeBackupPrivilege,omitempty"` // Use the identity of the share root when opening UseShareRootIdentity bool `json:"UseShareRootIdentity,omitempty"` // disable Direct Mapping NoDirectmap bool `json:"NoDirectmap,omitempty"` // disable Byterange locks NoLocks bool `json:"NoLocks,omitempty"` // disable Directory CHange Notifications NoDirnotify bool `json:"NoDirnotify,omitempty"` // share is use for VM shared memory VmSharedMemory bool `json:"VmSharedMemory,omitempty"` // allow access only to the files specified in AllowedFiles RestrictFileAccess bool `json:"RestrictFileAccess,omitempty"` // disable all oplocks except Level II ForceLevelIIOplocks bool `json:"ForceLevelIIOplocks,omitempty"` // Allow the host to reparse this base layer ReparseBaseLayer bool `json:"ReparseBaseLayer,omitempty"` // Enable pseudo-oplocks PseudoOplocks bool `json:"PseudoOplocks,omitempty"` // All opens will use non-cached IO NonCacheIo bool `json:"NonCacheIo,omitempty"` // Enable pseudo directory change notifications PseudoDirnotify bool `json:"PseudoDirnotify,omitempty"` // Block directory enumeration, renames, and deletes. SingleFileMapping bool `json:"SingleFileMapping,omitempty"` }
type VmMemory struct { AvailableMemory int32 `json:"AvailableMemory,omitempty"` AvailableMemoryBuffer int32 `json:"AvailableMemoryBuffer,omitempty"` ReservedMemory uint64 `json:"ReservedMemory,omitempty"` AssignedMemory uint64 `json:"AssignedMemory,omitempty"` SlpActive bool `json:"SlpActive,omitempty"` BalancingEnabled bool `json:"BalancingEnabled,omitempty"` DmOperationInProgress bool `json:"DmOperationInProgress,omitempty"` }
type WindowsCrashReporting struct { DumpFileName string `json:"DumpFileName,omitempty"` MaxDumpSize int64 `json:"MaxDumpSize,omitempty"` }