|
| 1 | +import "@azure-tools/typespec-azure-core"; |
| 2 | +import "@azure-tools/typespec-azure-resource-manager"; |
| 3 | +import "@typespec/openapi"; |
| 4 | +import "@typespec/rest"; |
| 5 | +import "@typespec/http"; |
| 6 | +import "@azure-tools/typespec-azure-resource-manager"; |
| 7 | + |
| 8 | +using TypeSpec.Rest; |
| 9 | +using Azure.ResourceManager; |
| 10 | +using TypeSpec.Versioning; |
| 11 | + |
| 12 | +namespace Microsoft.AzureStackHCI; |
| 13 | + |
| 14 | +/** |
| 15 | + * Represents the Confidential Virtual Machine (CVM) support intent and current status for the cluster resource. |
| 16 | + */ |
| 17 | +@added(Versions.v2025_12_01_preview) |
| 18 | +model ConfidentialVmProperties { |
| 19 | + /** |
| 20 | + * Captures the customer's intent to enable or disable CVM support on the cluster, either during initial deployment (Day-0) or at a later stage (Day-N). |
| 21 | + */ |
| 22 | + @visibility(Lifecycle.Read) |
| 23 | + confidentialVmIntent?: ConfidentialVmIntent = ConfidentialVmIntent.Disable; |
| 24 | + |
| 25 | + /** |
| 26 | + * Captures the current status of CVM support on the cluster. |
| 27 | + */ |
| 28 | + @visibility(Lifecycle.Read) |
| 29 | + confidentialVmStatus?: ConfidentialVmStatus = ConfidentialVmStatus.Disabled; |
| 30 | + |
| 31 | + /** |
| 32 | + * Additional context about CVM support on the cluster, such as reasons for partial enablement or hardware constraints. |
| 33 | + */ |
| 34 | + @visibility(Lifecycle.Read) |
| 35 | + confidentialVmStatusSummary?: string; |
| 36 | +} |
| 37 | + |
| 38 | +/** |
| 39 | + * Captures the customer's intent to enable or disable Confidential Virtual Machine (CVM) support on the cluster, either during initial deployment (Day-0) or at a later stage (Day-N). |
| 40 | + */ |
| 41 | +@added(Versions.v2025_12_01_preview) |
| 42 | +union ConfidentialVmIntent { |
| 43 | + string, |
| 44 | + |
| 45 | + /** |
| 46 | + * Indicates that the customer intends to enable CVM support on the cluster. |
| 47 | + */ |
| 48 | + Enable: "Enable", |
| 49 | + |
| 50 | + /** |
| 51 | + * Indicates that the customer intends to disable CVM support on the cluster. |
| 52 | + */ |
| 53 | + Disable: "Disable", |
| 54 | +} |
| 55 | + |
| 56 | +/** |
| 57 | + * Captures the current status of Confidential Virtual Machine (CVM) support on the cluster. |
| 58 | + */ |
| 59 | +@added(Versions.v2025_12_01_preview) |
| 60 | +union ConfidentialVmStatus { |
| 61 | + string, |
| 62 | + |
| 63 | + /** |
| 64 | + * CVM support is fully enabled on the cluster. All nodes are CVM capable. |
| 65 | + */ |
| 66 | + Enabled: "Enabled", |
| 67 | + |
| 68 | + /** |
| 69 | + * CVM support is partially enabled. At least one node in the cluster is CVM capable. |
| 70 | + */ |
| 71 | + PartiallyEnabled: "PartiallyEnabled", |
| 72 | + |
| 73 | + /** |
| 74 | + * CVM support is disabled. None of the nodes in the cluster are CVM capable. |
| 75 | + */ |
| 76 | + Disabled: "Disabled", |
| 77 | +} |
| 78 | + |
| 79 | +/** |
| 80 | + * Represents the Confidential Virtual Machine (CVM) configuration status for an edge device. It includes the current IGVM support state and detailed component-level status information. |
| 81 | + */ |
| 82 | +@added(Versions.v2025_12_01_preview) |
| 83 | +model ConfidentialVmProfile { |
| 84 | + /** |
| 85 | + * Indicates whether Independent Guest Virtual Machine (IGVM) support is available on the device. This will be 'Enabled' if the device supports CVMs, 'Disabled' if not, and 'Unknown' if the status cannot be determined. |
| 86 | + */ |
| 87 | + @visibility(Lifecycle.Read) |
| 88 | + igvmStatus?: IgvmStatus; |
| 89 | + |
| 90 | + /** |
| 91 | + * Provides detailed status entries for IGVM-related components, including deployment status, compatibility checks, and error diagnostics. |
| 92 | + */ |
| 93 | + @Azure.ResourceManager.identifiers(#["code"]) |
| 94 | + statusDetails?: IgvmStatusDetail[]; |
| 95 | +} |
| 96 | + |
| 97 | +/** |
| 98 | + * Provides component-level status information related to IGVM enablement on the device. |
| 99 | + */ |
| 100 | +@added(Versions.v2025_12_01_preview) |
| 101 | +model IgvmStatusDetail { |
| 102 | + /** |
| 103 | + * A machine-readable status code indicating the result or condition of a specific IGVM-related check or operation. |
| 104 | + */ |
| 105 | + @visibility(Lifecycle.Read) |
| 106 | + code?: string; |
| 107 | + |
| 108 | + /** |
| 109 | + * A human-readable message providing context or explanation for the associated status code. |
| 110 | + */ |
| 111 | + @visibility(Lifecycle.Read) |
| 112 | + message?: string; |
| 113 | +} |
| 114 | + |
| 115 | +/** |
| 116 | + * Represents the IGVM support status for the device. |
| 117 | + */ |
| 118 | +@added(Versions.v2025_12_01_preview) |
| 119 | +union IgvmStatus { |
| 120 | + string, |
| 121 | + |
| 122 | + /** |
| 123 | + * The IGVM status could not be determined due to a query failure or inconsistent system state. |
| 124 | + */ |
| 125 | + Unknown: "Unknown", |
| 126 | + |
| 127 | + /** |
| 128 | + * IGVM support is enabled, indicating that confidential VM features are available on this device. |
| 129 | + */ |
| 130 | + Enabled: "Enabled", |
| 131 | + |
| 132 | + /** |
| 133 | + * IGVM status is disabled, indicating that confidential VM features are not supported on this device. |
| 134 | + */ |
| 135 | + Disabled: "Disabled", |
| 136 | +} |
| 137 | + |
| 138 | +/** |
| 139 | + * Represents the Software Defined Networking (SDN) configuration state of the Azure Stack HCI cluster. |
| 140 | + */ |
| 141 | +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" |
| 142 | +@added(Versions.v2025_12_01_preview) |
| 143 | +model ClusterSdnProperties extends SdnProperties { |
| 144 | + /** |
| 145 | + * Indicates whether Software Defined Networking (SDN) integration should be enabled or disabled for this deployment. |
| 146 | + */ |
| 147 | + @visibility(Lifecycle.Read) |
| 148 | + sdnIntegrationIntent?: SdnIntegrationIntent; |
| 149 | +} |
| 150 | + |
| 151 | +/** |
| 152 | + * Indicates whether Software Defined Networking (SDN) integration should be enabled or disabled for this deployment. |
| 153 | + */ |
| 154 | +@added(Versions.v2025_12_01_preview) |
| 155 | +union SdnIntegrationIntent { |
| 156 | + string, |
| 157 | + |
| 158 | + /** |
| 159 | + * Enable SDN integration for the deployment. |
| 160 | + */ |
| 161 | + Enable: "Enable", |
| 162 | + |
| 163 | + /** |
| 164 | + * Disable SDN integration for the deployment. |
| 165 | + */ |
| 166 | + Disable: "Disable", |
| 167 | +} |
| 168 | + |
| 169 | +/** |
| 170 | + * Represents the Software Defined Networking (SDN) configuration state. |
| 171 | + */ |
| 172 | +@added(Versions.v2025_12_01_preview) |
| 173 | +model SdnProperties { |
| 174 | + /** |
| 175 | + * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device or a cluster. |
| 176 | + */ |
| 177 | + @visibility(Lifecycle.Read) |
| 178 | + sdnStatus?: SdnStatus; |
| 179 | + |
| 180 | + /** |
| 181 | + * The fully qualified domain name (FQDN) associated with the SDN deployment. This value is propagated from the Device Management Extension to the cluster resource. It is typically in the format `<sdnPrefix>-nc.<domain>` when SDN is enabled. May be null or absent in unsupported or disabled states. |
| 182 | + */ |
| 183 | + @visibility(Lifecycle.Read) |
| 184 | + sdnDomainName?: string; |
| 185 | + |
| 186 | + /** |
| 187 | + * Represents the API address for the SDN deployment. |
| 188 | + */ |
| 189 | + @visibility(Lifecycle.Read) |
| 190 | + sdnApiAddress?: string; |
| 191 | +} |
| 192 | + |
| 193 | +/** |
| 194 | + * Indicates the current Software Defined Networking (SDN) status of the resource, which may be an individual device or a cluster. |
| 195 | + */ |
| 196 | +@added(Versions.v2025_12_01_preview) |
| 197 | +union SdnStatus { |
| 198 | + string, |
| 199 | + |
| 200 | + /** |
| 201 | + * The SDN status could not be determined due to a failure in querying the SDN API service. This may occur if the query script fails or if the system is in an inconsistent state. The domain name will be null in this case. |
| 202 | + */ |
| 203 | + Unknown: "Unknown", |
| 204 | + |
| 205 | + /** |
| 206 | + * SDN is not enabled on the resource. The domain name will be null. This is the default state when SDN has not been configured. |
| 207 | + */ |
| 208 | + Disabled: "Disabled", |
| 209 | + |
| 210 | + /** |
| 211 | + * SDN is successfully enabled on the resource. The domain name will be populated in the format `<sdnPrefix>-nc.<domain>`. Customers may need to manage DNS settings to ensure proper resolution. |
| 212 | + */ |
| 213 | + Enabled: "Enabled", |
| 214 | +} |
0 commit comments