-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
VirtualMachineScaleSetVmData.cs
217 lines (206 loc) · 17.5 KB
/
VirtualMachineScaleSetVmData.cs
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
using Azure.ResourceManager.Compute.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.Compute
{
/// <summary>
/// A class representing the VirtualMachineScaleSetVm data model.
/// Describes a virtual machine scale set virtual machine.
/// </summary>
public partial class VirtualMachineScaleSetVmData : TrackedResourceData
{
/// <summary>
/// Keeps track of any properties unknown to the library.
/// <para>
/// To assign an object to the value of this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formatted json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
private IDictionary<string, BinaryData> _serializedAdditionalRawData;
/// <summary> Initializes a new instance of <see cref="VirtualMachineScaleSetVmData"/>. </summary>
/// <param name="location"> The location. </param>
public VirtualMachineScaleSetVmData(AzureLocation location) : base(location)
{
Resources = new ChangeTrackingList<VirtualMachineExtensionData>();
Zones = new ChangeTrackingList<string>();
}
/// <summary> Initializes a new instance of <see cref="VirtualMachineScaleSetVmData"/>. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="tags"> The tags. </param>
/// <param name="location"> The location. </param>
/// <param name="instanceId"> The virtual machine instance ID. </param>
/// <param name="sku"> The virtual machine SKU. </param>
/// <param name="plan"> 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**. </param>
/// <param name="resources"> The virtual machine child extension resources. </param>
/// <param name="zones"> The virtual machine zones. </param>
/// <param name="identity"> The identity of the virtual machine, if configured. </param>
/// <param name="etag"> Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. </param>
/// <param name="latestModelApplied"> Specifies whether the latest model has been applied to the virtual machine. </param>
/// <param name="vmId"> Azure VM unique ID. </param>
/// <param name="instanceView"> The virtual machine instance view. </param>
/// <param name="hardwareProfile"> Specifies the hardware settings for the virtual machine. </param>
/// <param name="storageProfile"> Specifies the storage settings for the virtual machine disks. </param>
/// <param name="additionalCapabilities"> Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. </param>
/// <param name="osProfile"> Specifies the operating system settings for the virtual machine. </param>
/// <param name="securityProfile"> Specifies the Security related profile settings for the virtual machine. </param>
/// <param name="networkProfile"> Specifies the network interfaces of the virtual machine. </param>
/// <param name="networkProfileConfiguration"> Specifies the network profile configuration of the virtual machine. </param>
/// <param name="diagnosticsProfile"> Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. </param>
/// <param name="availabilitySet"> 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 [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. </param>
/// <param name="provisioningState"> The provisioning state, which only appears in the response. </param>
/// <param name="licenseType"> 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. </param>
/// <param name="modelDefinitionApplied"> Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. </param>
/// <param name="protectionPolicy"> Specifies the protection policy of the virtual machine. </param>
/// <param name="userData"> UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. </param>
/// <param name="timeCreated"> Specifies the time at which the Virtual Machine resource was created.<br><br>Minimum api-version: 2021-11-01. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal VirtualMachineScaleSetVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, string instanceId, ComputeSku sku, ComputePlan plan, IReadOnlyList<VirtualMachineExtensionData> resources, IReadOnlyList<string> zones, ManagedServiceIdentity identity, string etag, bool? latestModelApplied, string vmId, VirtualMachineScaleSetVmInstanceView instanceView, VirtualMachineHardwareProfile hardwareProfile, VirtualMachineStorageProfile storageProfile, AdditionalCapabilities additionalCapabilities, VirtualMachineOSProfile osProfile, SecurityProfile securityProfile, VirtualMachineNetworkProfile networkProfile, VirtualMachineScaleSetVmNetworkProfileConfiguration networkProfileConfiguration, DiagnosticsProfile diagnosticsProfile, WritableSubResource availabilitySet, string provisioningState, string licenseType, string modelDefinitionApplied, VirtualMachineScaleSetVmProtectionPolicy protectionPolicy, string userData, DateTimeOffset? timeCreated, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
InstanceId = instanceId;
Sku = sku;
Plan = plan;
Resources = resources;
Zones = zones;
Identity = identity;
ETag = etag;
LatestModelApplied = latestModelApplied;
VmId = vmId;
InstanceView = instanceView;
HardwareProfile = hardwareProfile;
StorageProfile = storageProfile;
AdditionalCapabilities = additionalCapabilities;
OSProfile = osProfile;
SecurityProfile = securityProfile;
NetworkProfile = networkProfile;
NetworkProfileConfiguration = networkProfileConfiguration;
DiagnosticsProfile = diagnosticsProfile;
AvailabilitySet = availabilitySet;
ProvisioningState = provisioningState;
LicenseType = licenseType;
ModelDefinitionApplied = modelDefinitionApplied;
ProtectionPolicy = protectionPolicy;
UserData = userData;
TimeCreated = timeCreated;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> Initializes a new instance of <see cref="VirtualMachineScaleSetVmData"/> for deserialization. </summary>
internal VirtualMachineScaleSetVmData()
{
}
/// <summary> The virtual machine instance ID. </summary>
public string InstanceId { get; }
/// <summary> The virtual machine SKU. </summary>
public ComputeSku Sku { get; }
/// <summary> 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**. </summary>
public ComputePlan Plan { get; set; }
/// <summary> The virtual machine child extension resources. </summary>
public IReadOnlyList<VirtualMachineExtensionData> Resources { get; }
/// <summary> The virtual machine zones. </summary>
public IReadOnlyList<string> Zones { get; }
/// <summary> The identity of the virtual machine, if configured. </summary>
public ManagedServiceIdentity Identity { get; set; }
/// <summary> Etag is property returned in Update/Get response of the VMSS VM, so that customer can supply it in the header to ensure optimistic updates. </summary>
public string ETag { get; }
/// <summary> Specifies whether the latest model has been applied to the virtual machine. </summary>
public bool? LatestModelApplied { get; }
/// <summary> Azure VM unique ID. </summary>
public string VmId { get; }
/// <summary> The virtual machine instance view. </summary>
public VirtualMachineScaleSetVmInstanceView InstanceView { get; }
/// <summary> Specifies the hardware settings for the virtual machine. </summary>
public VirtualMachineHardwareProfile HardwareProfile { get; set; }
/// <summary> Specifies the storage settings for the virtual machine disks. </summary>
public VirtualMachineStorageProfile StorageProfile { get; set; }
/// <summary> Specifies additional capabilities enabled or disabled on the virtual machine in the scale set. For instance: whether the virtual machine has the capability to support attaching managed data disks with UltraSSD_LRS storage account type. </summary>
public AdditionalCapabilities AdditionalCapabilities { get; set; }
/// <summary> Specifies the operating system settings for the virtual machine. </summary>
public VirtualMachineOSProfile OSProfile { get; set; }
/// <summary> Specifies the Security related profile settings for the virtual machine. </summary>
public SecurityProfile SecurityProfile { get; set; }
/// <summary> Specifies the network interfaces of the virtual machine. </summary>
public VirtualMachineNetworkProfile NetworkProfile { get; set; }
/// <summary> Specifies the network profile configuration of the virtual machine. </summary>
internal VirtualMachineScaleSetVmNetworkProfileConfiguration NetworkProfileConfiguration { get; set; }
/// <summary> The list of network configurations. </summary>
public IList<VirtualMachineScaleSetNetworkConfiguration> NetworkInterfaceConfigurations
{
get
{
if (NetworkProfileConfiguration is null)
NetworkProfileConfiguration = new VirtualMachineScaleSetVmNetworkProfileConfiguration();
return NetworkProfileConfiguration.NetworkInterfaceConfigurations;
}
}
/// <summary> Specifies the boot diagnostic settings state. Minimum api-version: 2015-06-15. </summary>
internal DiagnosticsProfile DiagnosticsProfile { get; set; }
/// <summary> Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status. **NOTE**: If storageUri is being specified then ensure that the storage account is in the same region and subscription as the VM. You can easily view the output of your console log. Azure also enables you to see a screenshot of the VM from the hypervisor. </summary>
public BootDiagnostics BootDiagnostics
{
get => DiagnosticsProfile is null ? default : DiagnosticsProfile.BootDiagnostics;
set
{
if (DiagnosticsProfile is null)
DiagnosticsProfile = new DiagnosticsProfile();
DiagnosticsProfile.BootDiagnostics = value;
}
}
/// <summary> 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 [Availability sets overview](https://docs.microsoft.com/azure/virtual-machines/availability-set-overview). For more information on Azure planned maintenance, see [Maintenance and updates for Virtual Machines in Azure](https://docs.microsoft.com/azure/virtual-machines/maintenance-and-updates). Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set. </summary>
internal WritableSubResource AvailabilitySet { get; set; }
/// <summary> Gets or sets Id. </summary>
public ResourceIdentifier AvailabilitySetId
{
get => AvailabilitySet is null ? default : AvailabilitySet.Id;
set
{
if (AvailabilitySet is null)
AvailabilitySet = new WritableSubResource();
AvailabilitySet.Id = value;
}
}
/// <summary> The provisioning state, which only appears in the response. </summary>
public string ProvisioningState { get; }
/// <summary> 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. </summary>
public string LicenseType { get; set; }
/// <summary> Specifies whether the model applied to the virtual machine is the model of the virtual machine scale set or the customized model for the virtual machine. </summary>
public string ModelDefinitionApplied { get; }
/// <summary> Specifies the protection policy of the virtual machine. </summary>
public VirtualMachineScaleSetVmProtectionPolicy ProtectionPolicy { get; set; }
/// <summary> UserData for the VM, which must be base-64 encoded. Customer should not pass any secrets in here. <br><br>Minimum api-version: 2021-03-01. </summary>
public string UserData { get; set; }
/// <summary> Specifies the time at which the Virtual Machine resource was created.<br><br>Minimum api-version: 2021-11-01. </summary>
public DateTimeOffset? TimeCreated { get; }
}
}