-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
DedicatedHostGroupData.cs
123 lines (114 loc) · 8.18 KB
/
DedicatedHostGroupData.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
// 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 DedicatedHostGroup data model.
/// Specifies information about the dedicated host group that the dedicated hosts should be assigned to. Currently, a dedicated host can only be added to a dedicated host group at creation time. An existing dedicated host cannot be added to another dedicated host group.
/// </summary>
public partial class DedicatedHostGroupData : 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="DedicatedHostGroupData"/>. </summary>
/// <param name="location"> The location. </param>
public DedicatedHostGroupData(AzureLocation location) : base(location)
{
Zones = new ChangeTrackingList<string>();
DedicatedHosts = new ChangeTrackingList<SubResource>();
}
/// <summary> Initializes a new instance of <see cref="DedicatedHostGroupData"/>. </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="zones"> Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. </param>
/// <param name="platformFaultDomainCount"> Number of fault domains that the host group can span. </param>
/// <param name="dedicatedHosts"> A list of references to all dedicated hosts in the dedicated host group. </param>
/// <param name="instanceView"> The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. </param>
/// <param name="supportAutomaticPlacement"> Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. </param>
/// <param name="additionalCapabilities"> Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
internal DedicatedHostGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, IList<string> zones, int? platformFaultDomainCount, IReadOnlyList<SubResource> dedicatedHosts, DedicatedHostGroupInstanceView instanceView, bool? supportAutomaticPlacement, DedicatedHostGroupPropertiesAdditionalCapabilities additionalCapabilities, IDictionary<string, BinaryData> serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
Zones = zones;
PlatformFaultDomainCount = platformFaultDomainCount;
DedicatedHosts = dedicatedHosts;
InstanceView = instanceView;
SupportAutomaticPlacement = supportAutomaticPlacement;
AdditionalCapabilities = additionalCapabilities;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
/// <summary> Initializes a new instance of <see cref="DedicatedHostGroupData"/> for deserialization. </summary>
internal DedicatedHostGroupData()
{
}
/// <summary> Availability Zone to use for this host group. Only single zone is supported. The zone can be assigned only during creation. If not provided, the group supports all zones in the region. If provided, enforces each host in the group to be in the same zone. </summary>
public IList<string> Zones { get; }
/// <summary> Number of fault domains that the host group can span. </summary>
public int? PlatformFaultDomainCount { get; set; }
/// <summary> A list of references to all dedicated hosts in the dedicated host group. </summary>
public IReadOnlyList<SubResource> DedicatedHosts { get; }
/// <summary> The dedicated host group instance view, which has the list of instance view of the dedicated hosts under the dedicated host group. </summary>
internal DedicatedHostGroupInstanceView InstanceView { get; }
/// <summary> List of instance view of the dedicated hosts under the dedicated host group. </summary>
public IReadOnlyList<DedicatedHostInstanceViewWithName> InstanceViewHosts
{
get => InstanceView?.Hosts;
}
/// <summary> Specifies whether virtual machines or virtual machine scale sets can be placed automatically on the dedicated host group. Automatic placement means resources are allocated on dedicated hosts, that are chosen by Azure, under the dedicated host group. The value is defaulted to 'false' when not provided. Minimum api-version: 2020-06-01. </summary>
public bool? SupportAutomaticPlacement { get; set; }
/// <summary> Enables or disables a capability on the dedicated host group. Minimum api-version: 2022-03-01. </summary>
internal DedicatedHostGroupPropertiesAdditionalCapabilities AdditionalCapabilities { get; set; }
/// <summary> The flag that enables or disables a capability to have UltraSSD Enabled Virtual Machines on Dedicated Hosts of the Dedicated Host Group. For the Virtual Machines to be UltraSSD Enabled, UltraSSDEnabled flag for the resource needs to be set true as well. The value is defaulted to 'false' when not provided. Please refer to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd for more details on Ultra SSD feature. **Note:** The ultraSSDEnabled setting can only be enabled for Host Groups that are created as zonal. Minimum api-version: 2022-03-01. </summary>
public bool? UltraSsdEnabled
{
get => AdditionalCapabilities is null ? default : AdditionalCapabilities.UltraSsdEnabled;
set
{
if (AdditionalCapabilities is null)
AdditionalCapabilities = new DedicatedHostGroupPropertiesAdditionalCapabilities();
AdditionalCapabilities.UltraSsdEnabled = value;
}
}
}
}