This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
getVirtualMachine.go
88 lines (83 loc) · 7.44 KB
/
getVirtualMachine.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package v20200601
import (
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func LookupVirtualMachine(ctx *pulumi.Context, args *LookupVirtualMachineArgs, opts ...pulumi.InvokeOption) (*LookupVirtualMachineResult, error) {
var rv LookupVirtualMachineResult
err := ctx.Invoke("azure-nextgen:compute/v20200601:getVirtualMachine", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupVirtualMachineArgs struct {
// The expand expression to apply on the operation.
Expand *string `pulumi:"expand"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the virtual machine.
VmName string `pulumi:"vmName"`
}
// Describes a Virtual Machine.
type LookupVirtualMachineResult struct {
// Specifies additional capabilities enabled or disabled on the virtual machine.
AdditionalCapabilities *AdditionalCapabilitiesResponse `pulumi:"additionalCapabilities"`
// Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) <br><br> Currently, a VM can only be added to availability set at creation time. The availability set to which the VM is being added should be under the same resource group as the availability set resource. An existing VM cannot be added to an availability set. <br><br>This property cannot exist along with a non-null properties.virtualMachineScaleSet reference.
AvailabilitySet *SubResourceResponse `pulumi:"availabilitySet"`
// Specifies the billing related details of a Azure Spot virtual machine. <br><br>Minimum api-version: 2019-03-01.
BillingProfile *BillingProfileResponse `pulumi:"billingProfile"`
// Specifies the boot diagnostic settings state. <br><br>Minimum api-version: 2015-06-15.
DiagnosticsProfile *DiagnosticsProfileResponse `pulumi:"diagnosticsProfile"`
// Specifies the eviction policy for the Azure Spot virtual machine and Azure Spot scale set. <br><br>For Azure Spot virtual machines, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2019-03-01. <br><br>For Azure Spot scale sets, both 'Deallocate' and 'Delete' are supported and the minimum api-version is 2017-10-30-preview.
EvictionPolicy *string `pulumi:"evictionPolicy"`
// Specifies the time alloted for all extensions to start. The time duration should be between 15 minutes and 120 minutes (inclusive) and should be specified in ISO 8601 format. The default value is 90 minutes (PT1H30M). <br><br> Minimum api-version: 2020-06-01
ExtensionsTimeBudget *string `pulumi:"extensionsTimeBudget"`
// Specifies the hardware settings for the virtual machine.
HardwareProfile *HardwareProfileResponse `pulumi:"hardwareProfile"`
// Specifies information about the dedicated host that the virtual machine resides in. <br><br>Minimum api-version: 2018-10-01.
Host *SubResourceResponse `pulumi:"host"`
// Specifies information about the dedicated host group that the virtual machine resides in. <br><br>Minimum api-version: 2020-06-01. <br><br>NOTE: User cannot specify both host and hostGroup properties.
HostGroup *SubResourceResponse `pulumi:"hostGroup"`
// Resource Id
Id string `pulumi:"id"`
// The identity of the virtual machine, if configured.
Identity *VirtualMachineIdentityResponse `pulumi:"identity"`
// The virtual machine instance view.
InstanceView VirtualMachineInstanceViewResponse `pulumi:"instanceView"`
// Specifies that the image or disk that is being used was licensed on-premises. <br><br> Possible values for Windows Server operating system are: <br><br> Windows_Client <br><br> Windows_Server <br><br> Possible values for Linux Server operating system are: <br><br> RHEL_BYOS (for RHEL) <br><br> SLES_BYOS (for SUSE) <br><br> For more information, see [Azure Hybrid Use Benefit for Windows Server](https://docs.microsoft.com/azure/virtual-machines/windows/hybrid-use-benefit-licensing) <br><br> [Azure Hybrid Use Benefit for Linux Server](https://docs.microsoft.com/azure/virtual-machines/linux/azure-hybrid-benefit-linux) <br><br> Minimum api-version: 2015-06-15
LicenseType *string `pulumi:"licenseType"`
// Resource location
Location string `pulumi:"location"`
// Resource name
Name string `pulumi:"name"`
// Specifies the network interfaces of the virtual machine.
NetworkProfile *NetworkProfileResponse `pulumi:"networkProfile"`
// Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned.
OsProfile *OSProfileResponse `pulumi:"osProfile"`
// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
Plan *PlanResponse `pulumi:"plan"`
// Specifies the priority for the virtual machine. <br><br>Minimum api-version: 2019-03-01
Priority *string `pulumi:"priority"`
// The provisioning state, which only appears in the response.
ProvisioningState string `pulumi:"provisioningState"`
// Specifies information about the proximity placement group that the virtual machine should be assigned to. <br><br>Minimum api-version: 2018-04-01.
ProximityPlacementGroup *SubResourceResponse `pulumi:"proximityPlacementGroup"`
// The virtual machine child extension resources.
Resources []VirtualMachineExtensionResponse `pulumi:"resources"`
// Specifies the Security related profile settings for the virtual machine.
SecurityProfile *SecurityProfileResponse `pulumi:"securityProfile"`
// Specifies the storage settings for the virtual machine disks.
StorageProfile *StorageProfileResponse `pulumi:"storageProfile"`
// Resource tags
Tags map[string]string `pulumi:"tags"`
// Resource type
Type string `pulumi:"type"`
// Specifies information about the virtual machine scale set that the virtual machine should be assigned to. Virtual machines specified in the same virtual machine scale set are allocated to different nodes to maximize availability. Currently, a VM can only be added to virtual machine scale set at creation time. An existing VM cannot be added to a virtual machine scale set. <br><br>This property cannot exist along with a non-null properties.availabilitySet reference. <br><br>Minimum api‐version: 2019‐03‐01
VirtualMachineScaleSet *SubResourceResponse `pulumi:"virtualMachineScaleSet"`
// Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure IaaS VMs SMBIOS and can be read using platform BIOS commands.
VmId string `pulumi:"vmId"`
// The virtual machine zones.
Zones []string `pulumi:"zones"`
}