github.com/microsoft/moc@v0.17.1/rpc/cloudagent/compute/virtualmachine/moc_cloudagent_virtualmachine.proto (about)

     1  // Copyright (c) Microsoft Corporation.
     2  // Licensed under the Apache v2.0 license.
     3  
     4  syntax = "proto3";
     5  option go_package = "github.com/microsoft/moc/rpc/cloudagent/compute";
     6  package moc.cloudagent.compute;
     7  
     8  import "google/protobuf/wrappers.proto";
     9  import "moc_common_common.proto";
    10  import "moc_common_computecommon.proto";
    11  
    12  enum VMType {
    13  	TENANT = 0;
    14  	LOADBALANCER = 1;
    15  	STACKEDCONTROLPLANE = 2;
    16  }
    17  
    18  message VirtualMachineRequest {
    19  	repeated VirtualMachine VirtualMachines = 1;
    20  	Operation OperationType = 2;
    21  }
    22  
    23  message VirtualMachineResponse {
    24  	repeated VirtualMachine VirtualMachines = 1;
    25  	google.protobuf.BoolValue Result = 2;
    26  	string  Error = 3;
    27  }
    28  
    29  message SSHPublicKey {
    30  	string keydata = 1 [(sensitive) = true];
    31  }
    32  
    33  message Disk {
    34  	// reference to the virtual hard disk managed by storage
    35  	string diskname = 1;
    36  }
    37  
    38  message StorageConfiguration {
    39  	Disk osdisk = 1;
    40  	repeated Disk datadisks = 2;
    41  	string imageReference = 3;
    42  	string vmConfigContainerName = 4; // Name of the storage container that hosts the VM configuration file 
    43  }
    44  
    45  message NetworkInterface {
    46  	// reference to network interface managed by network
    47  	string networkInterfaceName = 1;
    48  }
    49  
    50  message NetworkConfiguration {
    51  	repeated NetworkInterface interfaces = 1;
    52  }
    53  
    54  message UserConfiguration {
    55  	string username = 1 [(sensitive) = true];
    56  	string password = 2 [(sensitive) = true];
    57  	UserType usertype = 3;
    58  }
    59  
    60  message RDPConfiguration {
    61  	bool disableRDP = 1;
    62  	uint32 port = 2;
    63  }
    64  
    65  message LinuxConfiguration {
    66  	bool disablePasswordAuthentication = 1;
    67  }
    68  
    69  message WindowsConfiguration {
    70  	bool enableAutomaticUpdates = 1;
    71  	string timeZone = 2;
    72  	RDPConfiguration RDPConfiguration = 3;
    73  	WinRMConfiguration WinRMConfiguration = 4;
    74  }
    75  
    76  message OperatingSystemConfiguration {
    77  	string computerName = 1;
    78  	UserConfiguration administrator = 2;
    79  	repeated UserConfiguration users = 3;
    80  	string customData = 4 [(sensitive) = true];
    81  	repeated SSHPublicKey publickeys = 5;
    82  	OperatingSystemType ostype = 6;
    83  	// bootstrap engine can be cloud-init, Windows answer files, ...
    84  	OperatingSystemBootstrapEngine osBootstrapEngine = 7;
    85  	LinuxConfiguration linuxConfiguration = 8;
    86  	WindowsConfiguration windowsConfiguration = 9;
    87  	ProxyConfiguration proxyConfiguration = 10;
    88  }
    89  
    90  message HardwareConfiguration {
    91  	VirtualMachineSizeType VMSize = 1;
    92  	VirtualMachineCustomSize customSize = 2;
    93  	DynamicMemoryConfiguration dynamicMemoryConfiguration = 3;
    94  }
    95  
    96  message UefiSettings {
    97  	bool secureBootEnabled = 1;
    98  }
    99  
   100  message SecurityConfiguration {
   101  	bool enableTPM = 1;
   102  	UefiSettings uefiSettings = 2;
   103  	SecurityType securityType = 3;
   104  }
   105  
   106  message AvailabilitySetReference {
   107  	string groupName = 1;
   108  	string name = 2;
   109  }
   110  
   111  message VirtualMachine {
   112  	string name = 1;
   113  	string id = 2;
   114  	StorageConfiguration storage = 3;
   115  	OperatingSystemConfiguration os = 4;
   116  	NetworkConfiguration network = 5;
   117  	string nodeName = 6;
   118  	string groupName = 7;
   119  	Status status = 8;
   120  	string locationName = 9;
   121  	bool disableHighAvailability = 10;
   122  	VMType vmType = 11;
   123  	HardwareConfiguration hardware = 12;
   124  	repeated string allowedOwnerNodes = 13;
   125  	PowerState powerState = 14;
   126  	SecurityConfiguration security = 15;
   127  	Tags tags = 16;
   128  	GuestAgentConfiguration guestAgent = 17;
   129  	VirtualMachineAgentInstanceView guestAgentInstanceView = 18;
   130  	AvailabilitySetReference availabilitySet = 19;
   131  }
   132  
   133  message VirtualMachineOperationRequest {
   134  	repeated VirtualMachine VirtualMachines = 1;
   135  	VirtualMachineOperation OBSOLETE_OperationType = 2 [deprecated=true];
   136  	ProviderAccessOperation OperationType = 3;
   137  }
   138  
   139  message VirtualMachineOperationResponse {
   140  	repeated VirtualMachine VirtualMachines = 1;
   141  	google.protobuf.BoolValue Result = 2;
   142  	string  Error = 3;
   143  }
   144  
   145  message VirtualMachineRunCommandRequest {
   146  	VirtualMachine VirtualMachine = 1;
   147  	VirtualMachineRunCommandScriptSource Source = 2;
   148  	repeated VirtualMachineRunCommandInputParameter RunCommandInputParameters = 3;
   149  	string RunAsUser = 4 [(sensitive) = true];
   150  	string RunAsPassword = 5 [(sensitive) = true];
   151  }
   152  
   153  message VirtualMachineRunCommandResponse {
   154  	VirtualMachine VirtualMachine = 1;
   155  	VirtualMachineRunCommandInstanceView InstanceView = 2;
   156  }
   157  
   158  service VirtualMachineAgent {
   159  	rpc Invoke(VirtualMachineRequest) returns (VirtualMachineResponse) {}
   160  	rpc Operate(VirtualMachineOperationRequest) returns (VirtualMachineOperationResponse) {}
   161  	rpc RunCommand(VirtualMachineRunCommandRequest) returns (VirtualMachineRunCommandResponse) {}
   162  }