VMImageNamestring`xml:",omitempty"`// Specifies the name of the VM Image that is to be used to create the Virtual Machine. If this element is used, the ConfigurationSets element is not used.
MediaLocationstring`xml:",omitempty"`// Required if the Virtual Machine is being created from a published VM Image. Specifies the location of the VHD file that is created when VMImageName specifies a published VM Image.
AvailabilitySetNamestring`xml:",omitempty"`// Specifies the name of a collection of Virtual Machines. Virtual Machines specified in the same availability set are allocated to different nodes to maximize availability.
DataVirtualHardDisks[]DataVirtualHardDisk`xml:"DataVirtualHardDisks>DataVirtualHardDisk,omitempty"`// Contains the parameters that are used to add a data disk to a Virtual Machine. If you are creating a Virtual Machine by using a VM Image, this element is not used.
OSVirtualHardDisk*OSVirtualHardDisk`xml:",omitempty"`// Contains the parameters that are used to create the operating system disk for a Virtual Machine. If you are creating a Virtual Machine by using a VM Image, this element is not used.
RoleSizestring`xml:",omitempty"`// Specifies the size of the Virtual Machine. The default size is Small.
ProvisionGuestAgentbool`xml:",omitempty"`// Indicates whether the VM Agent is installed on the Virtual Machine. To run a resource extension in a Virtual Machine, this service must be installed.
VMImageInput*VMImageInput`xml:",omitempty"`// When a VM Image is used to create a new PersistentVMRole, the DiskConfigurations in the VM Image are used to create new Disks for the new VM. This parameter can be used to resize the newly created Disks to a larger size than the underlying DiskConfigurations in the VM Image.
UseCertAuthbool`xml:"-"`
CertPathstring`xml:"-"`
}
// VMImageInput is for when a VM Image is used to create a new PersistantVMRole,
// the DiskConfigurations in the VM Image are used to create new Disks for the
// new VM. This parameter can be used to resize the newly created Disks to a
// larger size than the underlying DiskConfigurations in the VM Image.
typeVMImageInputstruct{
OSDiskConfiguration*OSDiskConfiguration`xml:",omitempty"`// This corresponds to the OSDiskConfiguration of the VM Image used to create a new role. The OSDiskConfiguration element is only available using version 2014-10-01 or higher.
DataDiskConfigurations[]DataDiskConfiguration`xml:">DataDiskConfiguration,omitempty"`// This corresponds to the DataDiskConfigurations of the VM Image used to create a new role. The DataDiskConfigurations element is only available using version 2014-10-01 or higher.
}
// OSDiskConfiguration is used to resize the OS disk of a new VM created from a
// previously saved VM image.
typeOSDiskConfigurationstruct{
ResizedSizeInGBint
}
// DataDiskConfiguration is used to resize the data disks of a new VM created
// from a previously saved VM image.
typeDataDiskConfigurationstruct{
OSDiskConfiguration
Namestring// The Name of the DataDiskConfiguration being referenced to.
}
// ResourceExtensionReference contains a collection of resource extensions that
// are to be installed on the Virtual Machine. The VM Agent must be installed on
// the Virtual Machine to install resource extensions. For more information, see
// DataVirtualHardDisk specifies the properties that are used to create a data
// disk.
typeDataVirtualHardDiskstruct{
HostCachingvmdisk.HostCachingType`xml:",omitempty"`// Specifies the caching mode of the data disk. The default value is None.
DiskLabelstring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription, this element is ignored. If a new disk is being created, this element is used to provide a description of the disk. The value of this element is only obtained programmatically and does not appear in the Management Portal.
DiskNamestring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription, this element is used to identify the disk to add. If a new disk and the associated VHD are being created by Azure, this element is not used and Azure assigns a unique name that is a combination of the deployment name, role name, and identifying number. The name of the disk must contain only alphanumeric characters, underscores, periods, or dashes. The name must not be longer than 256 characters. The name must not end with period or dash.
Lunint`xml:",omitempty"`// Specifies the Logical Unit Number (LUN) for the data disk. If the disk is the first disk that is added, this element is optional and the default value of 0 is used. If more than one disk is being added, this element is required. Valid LUN values are 0 through 31.
LogicalDiskSizeInGBint`xml:",omitempty"`// Specifies the size, in GB, of an empty disk to be attached to the Virtual Machine. If the disk that is being added is already registered in the subscription, this element is ignored. If the disk and VHD is being created by Azure as it is added, this element defines the size of the new disk.
MediaLinkstring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription or the VHD for the disk already exists in blob storage, this element is ignored. If a VHD file does not exist in blob storage, this element defines the location of the new VHD that is created when the new disk is added.
SourceMediaLinkstring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription or the VHD for the disk does not exist in blob storage, this element is ignored. If the VHD file exists in blob storage, this element defines the path to the VHD and a disk is registered from it and attached to the virtual machine.
}
// OSVirtualHardDisk specifies the properties that are used to create an OS
// disk.
typeOSVirtualHardDiskstruct{
HostCachingvmdisk.HostCachingType`xml:",omitempty"`// Specifies the caching mode of the data disk. The default value is None.
DiskLabelstring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription, this element is ignored. If a new disk is being created, this element is used to provide a description of the disk. The value of this element is only obtained programmatically and does not appear in the Management Portal.
DiskNamestring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription, this element is used to identify the disk to add. If a new disk and the associated VHD are being created by Azure, this element is not used and Azure assigns a unique name that is a combination of the deployment name, role name, and identifying number. The name of the disk must contain only alphanumeric characters, underscores, periods, or dashes. The name must not be longer than 256 characters. The name must not end with period or dash.
MediaLinkstring`xml:",omitempty"`// If the disk that is being added is already registered in the subscription or the VHD for the disk already exists in blob storage, this element is ignored. If a VHD file does not exist in blob storage, this element defines the location of the new VHD that is created when the new disk is added.
SourceImageNamestring`xml:",omitempty"`
OSstring`xml:",omitempty"`
RemoteSourceImageLinkstring`xml:",omitempty"`// Specifies a publicly accessible URI or a SAS URI to the location where an OS image is stored that is used to create the Virtual Machine. This location can be a different location than the user or platform image repositories in Azure. An image is always associated with a VHD, which is a .vhd file stored as a page blob in a storage account in Azure. If you specify the path to an image with this element, an associated VHD is created and you must use the MediaLink element to specify the location in storage where the VHD will be located. If this element is used, SourceImageName is not used.
ResizedSizeInGBint`xml:",omitempty"`
}
// ConfigurationSet specifies the configuration elements of the Virtual Machine.
// The type attribute is required to prevent the administrator password from
// being written to the operation history file.
typeConfigurationSetstruct{
ConfigurationSetTypeConfigurationSetType
// Windows provisioning:
ComputerNamestring`xml:",omitempty"`// Optional. Specifies the computer name for the Virtual Machine. If you do not specify a computer name, one is assigned that is a combination of the deployment name, role name, and identifying number. Computer names must be 1 to 15 characters long.
AdminPasswordstring`xml:",omitempty"`// Optional. Specifies the password to use for an administrator account on the Virtual Machine that is being created. If you are creating a Virtual Machine using an image, you must specify a name of an administrator account to be created on the machine using the AdminUsername element. You must use the AdminPassword element to specify the password of the administrator account that is being created. If you are creating a Virtual Machine using an existing specialized disk, this element is not used because the account should already exist on the disk.
EnableAutomaticUpdatesbool`xml:",omitempty"`// Optional. Specifies whether automatic updates are enabled for the Virtual Machine. The default value is true.
TimeZonestring`xml:",omitempty"`// Optional. Specifies the time zone for the Virtual Machine.
DomainJoin*DomainJoin`xml:",omitempty"`// Optional. Contains properties that define a domain to which the Virtual Machine will be joined.
StoredCertificateSettings[]CertificateSetting`xml:">StoredCertificateSetting,omitempty"`// Optional. Contains a list of service certificates with which to provision to the new Virtual Machine.
WinRMListeners*[]WinRMListener`xml:"WinRM>Listeners>Listener,omitempty"`// Optional. Contains configuration settings for the Windows Remote Management service on the Virtual Machine. This enables remote Windows PowerShell.
AdminUsernamestring`xml:",omitempty"`// Optional. Specifies the name of the administrator account that is created to access the Virtual Machine. If you are creating a Virtual Machine using an image, you must specify a name of an administrator account to be created by using this element. You must use the AdminPassword element to specify the password of the administrator account that is being created. If you are creating a Virtual Machine using an existing specialized disk, this element is not used because the account should already exist on the disk.
AdditionalUnattendContentstring`xml:",omitempty"`// Specifies additional base-64 encoded XML formatted information that can be included in the Unattend.xml file, which is used by Windows Setup.
// Linux provisioning:
HostNamestring`xml:",omitempty"`// Required. Specifies the host name for the Virtual Machine. Host names must be 1 to 64 characters long.
UserNamestring`xml:",omitempty"`// Required. Specifies the name of a user account to be created in the sudoer group of the Virtual Machine. User account names must be 1 to 32 characters long.
UserPasswordstring`xml:",omitempty"`// Required. Specifies the password for the user account. Passwords must be 6 to 72 characters long.
DisableSSHPasswordAuthenticationstring`xml:"DisableSshPasswordAuthentication,omitempty"`// Optional. Specifies whether SSH password authentication is disabled. By default this value is set to true.
SSH*SSH`xml:",omitempty"`// Optional. Specifies the SSH public keys and key pairs to use with the Virtual Machine.
// In WindowsProvisioningConfiguration: The base-64 encoded string is decoded to a binary array that is saved as a file on the Virtual Machine. The maximum length of the binary array is 65535 bytes. The file is saved to %SYSTEMDRIVE%\AzureData\CustomData.bin. If the file exists, it is overwritten. The security on directory is set to System:Full Control and Administrators:Full Control.
// In LinuxProvisioningConfiguration: The base-64 encoded string is located in the ovf-env.xml file on the ISO of the Virtual Machine. The file is copied to /var/lib/waagent/ovf-env.xml by the Azure Linux Agent. The Azure Linux Agent will also place the base-64 encoded data in /var/lib/waagent/CustomData during provisioning. The maximum length of the binary array is 65535 bytes.
CustomDatastring`xml:",omitempty"`// Specifies a base-64 encoded string of custom data.
// Network configuration:
InputEndpoints[]InputEndpoint`xml:">InputEndpoint,omitempty"`// Optional in NetworkConfiguration. Contains a collection of external endpoints for the Virtual Machine.
SubnetNames[]string`xml:">SubnetName,omitempty"`// Required if StaticVirtualNetworkIPAddress is specified; otherwise, optional in NetworkConfiguration. Contains a list of subnets to which the Virtual Machine will belong.
StaticVirtualNetworkIPAddressstring`xml:",omitempty"`// Specifies the internal IP address for the Virtual Machine in a Virtual Network. If you specify this element, you must also specify the SubnetNames element with only one subnet defined. The IP address specified in this element must belong to the subnet that is defined in SubnetNames and it should not be the one of the first four IP addresses or the last IP address in the subnet. Deploying web roles or worker roles into a subnet that has Virtual Machines with StaticVirtualNetworkIPAddress defined is not supported.
NetworkSecurityGroupstring`xml:",omitempty"`// Optional in NetworkConfiguration. Represents the name of the Network Security Group that will be associated with the Virtual Machine. Network Security Group must exist in the context of subscription and be created in same region to which the virtual machine will be deployed.
PublicIPs[]PublicIP`xml:">PublicIP,omitempty"`// Contains a public IP address that can be used in addition to the default virtual IP address for the Virtual Machine.
// DomainJoin contains properties that define a domain to which the Virtual
// Machine will be joined.
typeDomainJoinstruct{
CredentialsCredentials`xml:",omitempty"`// Specifies the credentials to use to join the Virtual Machine to the domain.
JoinDomainstring`xml:",omitempty"`// Specifies the domain to join.
MachineObjectOUstring`xml:",omitempty"`// Specifies the Lightweight Directory Access Protocol (LDAP) X 500-distinguished name of the organizational unit (OU) in which the computer account is created. This account is in Active Directory on a domain controller in the domain to which the computer is being joined.
}
// Credentials specifies the credentials to use to join the Virtual Machine to
// the domain. If Domain is not specified, Username must specify the user
// principal name (UPN) format (user@fully-qualified-DNS-domain) or the fully-
// qualified-DNS-domain\username format.
typeCredentialsstruct{
Domainstring// Specifies the name of the domain used to authenticate an account. The value is a fully qualified DNS domain.
Usernamestring// Specifies a user name in the domain that can be used to join the domain.
Passwordstring// Specifies the password to use to join the domain.
}
// CertificateSetting specifies the parameters for the certificate which to
// provision to the new Virtual Machine.
typeCertificateSettingstruct{
StoreLocationstring// Required. Specifies the certificate store location on the Virtual Machine. The only supported value is "LocalMachine".
StoreNamestring// Required. Specifies the name of the certificate store from which the certificate is retrieved. For example, "My".
Thumbprintstring// Required. Specifies the thumbprint of the certificate. The thumbprint must specify an existing service certificate.
}
// WinRMListener specifies the protocol and certificate information for a WinRM
// listener.
typeWinRMListenerstruct{
ProtocolWinRMProtocol// Specifies the protocol of listener.
CertificateThumbprintstring`xml:",omitempty"`// Specifies the certificate thumbprint for the secure connection. If this value is not specified, a self-signed certificate is generated and used for the Virtual Machine.
}
typeWinRMProtocolstring
// Enum values for WinRMProtocol
const(
WinRMProtocolHTTPWinRMProtocol="Http"
WinRMProtocolHTTPSWinRMProtocol="Https"
)
// SSH specifies the SSH public keys and key pairs to use with the Virtual Machine.
typeSSHstruct{
PublicKeys[]PublicKey`xml:">PublicKey"`
KeyPairs[]KeyPair`xml:">KeyPair"`
}
// PublicKey specifies a public SSH key.
typePublicKeystruct{
Fingerprintstring// Specifies the SHA1 fingerprint of an X509 certificate associated with the cloud service and includes the SSH public key.
// Specifies the full path of a file, on the Virtual Machine, where the SSH public key is stored. If
// the file already exists, the specified key is appended to the file.
Pathstring// Usually /home/username/.ssh/authorized_keys
}
// KeyPair specifies an SSH keypair.
typeKeyPairstruct{
Fingerprintstring// Specifies the SHA1 fingerprint of an X509 certificate that is associated with the cloud service and includes the SSH keypair.
// Specifies the full path of a file, on the virtual machine, which stores the SSH private key. The
// file is overwritten when multiple keys are written to it. The SSH public key is stored in the same
// directory and has the same name as the private key file with .pub suffix.
Pathstring// Usually /home/username/.ssh/id_rsa
}
// InputEndpoint specifies the properties that define an external endpoint for
// the Virtual Machine.
typeInputEndpointstruct{
LocalPortint// Specifies the internal port on which the Virtual Machine is listening.
Namestring// Specifies the name of the external endpoint.
Portint// Specifies the external port to use for the endpoint.
ProtocolInputEndpointProtocol//Specifies the transport protocol for the endpoint.
// PublicIP contains a public IP address that can be used in addition to default
// virtual IP address for the Virtual Machine.
typePublicIPstruct{
Namestring// Specifies the name of the public IP address.
Addressstring// Specifies the IP address.
IdleTimeoutInMinutesint`xml:",omitempty"`// Specifies the timeout for the TCP idle connection. The value can be set between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the protocol is set to TCP.
}
// ServiceCertificate contains a certificate for adding it to a hosted service
typeServiceCertificatestruct{
XMLNamexml.Name`xml:"CertificateFile"`
Datastring
CertificateFormatstring
Passwordstring`xml:",omitempty"`
}
// StartRoleOperation contains the information for starting a Role.
// RoleSizeList contains a list of the available role sizes
typeRoleSizeListstruct{
XMLNamexml.Name`xml:"RoleSizes"`
RoleSizes[]RoleSize`xml:"RoleSize"`
}
// RoleSize contains a detailed explanation of a role size
typeRoleSizestruct{
Namestring
Labelstring
Coresint
MemoryInMbint
SupportedByWebWorkerRolesbool
SupportedByVirtualMachinesbool
MaxDataDiskCountint
WebWorkerResourceDiskSizeInMbint
VirtualMachineResourceDiskSizeInMbint
}
// DNSServer contains the definition of a DNS server for virtual machine deployment
typeDNSServerstruct{
Namestring
Addressstring
}
// LoadBalancer contains the definition of a load balancer for virtual machine deployment
typeLoadBalancerstruct{
Namestring// Specifies the name of the internal load balancer.
TypeIPAddressType`xml:"FrontendIpConfiguration>Type"`// Specifies the type of virtual IP address that is provided by the load balancer. The only allowable value is Private.
SubnetNamestring`xml:"FrontendIpConfiguration>SubnetName,omitempty"`// Required if the deployment exists in a virtual network and a StaticVirtualNetworkIPAddress is assigned. Specifies the subnet of the virtual network that the load balancer uses. The virtual IP address that is managed by the load balancer is contained in this subnet.
StaticVirtualNetworkIPAddressstring`xml:"FrontendIpConfiguration>StaticVirtualNetworkIPAddress,omitempty"`// Specifies a specific virtual IP address that the load balancer uses from the subnet in the virtual network.
}
typeIPAddressTypestring
// Enum values for IPAddressType
const(
IPAddressTypePrivateIPAddressType="Private"// Only allowed value (currently) for IPAddressType