Skip to content

Commit 1ce64eb

Browse files
Adding 2025-09-01-preview API for StackHCIVM (#38577)
* Add field for enabling/disabling SDN on a NIC * update doc * Adding 2025-09-01-preview api version for stackhcivm * fix compile issue * run npx tsv for Operation folder * add new api version in README to fix lint errors --------- Co-authored-by: abaranwal-ms <124332815+abaranwal-ms@users.noreply.github.com>
1 parent 047cc0e commit 1ce64eb

File tree

226 files changed

+23755
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+23755
-406
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@azure-tools/typespec-client-generator-core";
4+
import "@typespec/rest";
5+
import "@typespec/versioning";
6+
import "./models.tsp";
7+
8+
using TypeSpec.Rest;
9+
using Azure.ResourceManager;
10+
using TypeSpec.Http;
11+
using TypeSpec.OpenAPI;
12+
using TypeSpec.Versioning;
13+
14+
namespace Microsoft.AzureStackHCI;
15+
16+
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
17+
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO - x-ms-azure-resource is this needed?"
18+
@doc("The LoadBalancer resource definition.")
19+
@extension("x-ms-azure-resource", true)
20+
@added(Versions.v2025_09_01_preview)
21+
model LoadBalancer is TrackedResource<LoadBalancerProperties> {
22+
@doc("Name of the load balancer")
23+
@pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$")
24+
@path
25+
@key("loadBalancerName")
26+
@segment("loadBalancers")
27+
@visibility(Lifecycle.Read)
28+
name: string;
29+
30+
@doc("The extendedLocation of the resource.")
31+
extendedLocation?: ExtendedLocation;
32+
}
33+
34+
@armResourceOperations
35+
@added(Versions.v2025_09_01_preview)
36+
interface LoadBalancers {
37+
@doc("The operation to get a loadBalancer.")
38+
get is ArmResourceRead<LoadBalancer>;
39+
40+
@doc("The operation to create or update a loadBalancer. Please note some properties can be set only during LoadBalancer creation.")
41+
createOrUpdate is ArmResourceCreateOrReplaceAsync<LoadBalancer>;
42+
43+
@doc("Updates a loadBalancer tags.")
44+
updateTags is ArmTagsPatchAsync<LoadBalancer, TagsObject>;
45+
46+
@doc("The operation to delete a loadBalancer.")
47+
delete is ArmResourceDeleteWithoutOkAsync<LoadBalancer>;
48+
49+
@doc("Lists all of the loadBalancers in the specified resource group. Use the nextLink property in the response to get the next page of LoadBalancer.")
50+
listByResourceGroup is ArmResourceListByParent<LoadBalancer>;
51+
52+
@doc("Lists all of the loadBalancers in the specified subscription. Use the nextLink property in the response to get the next page of LoadBalancer.")
53+
listAll is ArmListBySubscription<LoadBalancer>;
54+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@azure-tools/typespec-client-generator-core";
4+
import "@typespec/rest";
5+
import "@typespec/versioning";
6+
import "./models.tsp";
7+
8+
using TypeSpec.Rest;
9+
using Azure.ResourceManager;
10+
using TypeSpec.Http;
11+
using TypeSpec.OpenAPI;
12+
using TypeSpec.Versioning;
13+
14+
namespace Microsoft.AzureStackHCI;
15+
16+
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
17+
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO - x-ms-azure-resource is this needed?"
18+
@doc("The NatGateway resource definition.")
19+
@extension("x-ms-azure-resource", true)
20+
@added(Versions.v2025_09_01_preview)
21+
model NatGateway is TrackedResource<NatGatewayProperties> {
22+
@doc("Name of the nat gateway")
23+
@pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$")
24+
@path
25+
@key("natGatewayName")
26+
@segment("natGateways")
27+
@visibility(Lifecycle.Read)
28+
name: string;
29+
30+
@doc("The extendedLocation of the resource.")
31+
extendedLocation?: ExtendedLocation;
32+
}
33+
34+
@armResourceOperations
35+
@added(Versions.v2025_09_01_preview)
36+
interface NatGateways {
37+
@doc("The operation to get a natGateway.")
38+
get is ArmResourceRead<NatGateway>;
39+
40+
@doc("The operation to create or update a natGateway. Please note some properties can be set only during NatGateway creation.")
41+
createOrUpdate is ArmResourceCreateOrReplaceAsync<NatGateway>;
42+
43+
@doc("Updates a natGateway tags.")
44+
updateTags is ArmTagsPatchAsync<NatGateway, TagsObject>;
45+
46+
@doc("The operation to delete a natGateway.")
47+
delete is ArmResourceDeleteWithoutOkAsync<NatGateway>;
48+
49+
@doc("Lists all of the natGateways in the specified resource group. Use the nextLink property in the response to get the next page of NatGateway.")
50+
listByResourceGroup is ArmResourceListByParent<NatGateway>;
51+
52+
@doc("Lists all of the natGateways in the specified subscription. Use the nextLink property in the response to get the next page of NatGateway.")
53+
listAll is ArmListBySubscription<NatGateway>;
54+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@azure-tools/typespec-client-generator-core";
4+
import "@typespec/rest";
5+
import "@typespec/versioning";
6+
import "./models.tsp";
7+
8+
using TypeSpec.Rest;
9+
using Azure.ResourceManager;
10+
using TypeSpec.Http;
11+
using TypeSpec.OpenAPI;
12+
using TypeSpec.Versioning;
13+
14+
namespace Microsoft.AzureStackHCI;
15+
16+
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
17+
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO - x-ms-azure-resource is this needed?"
18+
#suppress "@azure-tools/typespec-azure-core/casing-style" "IP is a short form. The casing is correct."
19+
@doc("The publicIP resource definition.")
20+
@extension("x-ms-azure-resource", true)
21+
@added(Versions.v2025_09_01_preview)
22+
model PublicIPAddress is TrackedResource<PublicIPAddressProperties> {
23+
@doc("Name of the public IP")
24+
@pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$")
25+
@path
26+
@key("publicIPAddressName")
27+
@segment("publicIPAddresses")
28+
@visibility(Lifecycle.Read)
29+
name: string;
30+
31+
@doc("The extendedLocation of the resource.")
32+
extendedLocation?: ExtendedLocation;
33+
}
34+
35+
#suppress "@azure-tools/typespec-azure-core/casing-style" "IP is a short form. The casing is correct."
36+
@armResourceOperations
37+
@added(Versions.v2025_09_01_preview)
38+
interface PublicIPAddresses {
39+
@doc("The operation to get a virtual network.")
40+
get is ArmResourceRead<PublicIPAddress>;
41+
42+
@doc("The operation to create or update a publicIPAddress. Please note some properties can be set only during PublicIP creation.")
43+
createOrUpdate is ArmResourceCreateOrReplaceAsync<PublicIPAddress>;
44+
45+
@doc("Updates a publicIPAddress tags.")
46+
updateTags is ArmTagsPatchAsync<PublicIPAddress, TagsObject>;
47+
48+
@doc("The operation to delete a publicIPAddresses.")
49+
delete is ArmResourceDeleteWithoutOkAsync<PublicIPAddress>;
50+
51+
@doc("Lists all of the publicIPAddresses in the specified resource group. Use the nextLink property in the response to get the next page of PublicIP.")
52+
listByResourceGroup is ArmResourceListByParent<PublicIPAddress>;
53+
54+
@doc("Lists all of the publicIPAddresses in the specified subscription. Use the nextLink property in the response to get the next page of PublicIP.")
55+
listAll is ArmListBySubscription<PublicIPAddress>;
56+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@azure-tools/typespec-client-generator-core";
4+
import "@typespec/rest";
5+
import "@typespec/versioning";
6+
import "./models.tsp";
7+
8+
using TypeSpec.Rest;
9+
using Azure.ResourceManager;
10+
using TypeSpec.Http;
11+
using TypeSpec.OpenAPI;
12+
using TypeSpec.Versioning;
13+
14+
namespace Microsoft.AzureStackHCI;
15+
16+
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
17+
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO - x-ms-azure-resource is this needed?"
18+
@doc("The virtual network resource definition.")
19+
@extension("x-ms-azure-resource", true)
20+
@parentResource(VirtualNetwork)
21+
@added(Versions.v2025_09_01_preview)
22+
model VirtualNetworkSubnet is ProxyResource<VirtualNetworkSubnetProperties> {
23+
@doc("Name of the virtual network subnet")
24+
@pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$")
25+
@path
26+
@key("subnetName")
27+
@segment("subnets")
28+
@visibility(Lifecycle.Read)
29+
name: string;
30+
31+
@doc("The extendedLocation of the resource.")
32+
extendedLocation?: ExtendedLocation;
33+
}
34+
35+
@armResourceOperations
36+
@added(Versions.v2025_09_01_preview)
37+
interface VirtualNetworkSubnets {
38+
@doc("The operation to get a virtual network subnet.")
39+
get is ArmResourceRead<VirtualNetworkSubnet>;
40+
41+
@doc("The operation to create or update a virtual network subnet.")
42+
createOrUpdate is ArmResourceCreateOrReplaceAsync<VirtualNetworkSubnet>;
43+
44+
@doc("The operation to update a virtual network subnet.")
45+
@patch(#{ implicitOptionality: false })
46+
update is ArmCustomPatchAsync<
47+
VirtualNetworkSubnet,
48+
VirtualNetworkSubnetUpdateRequest
49+
>;
50+
51+
@doc("The operation to delete a virtual network.")
52+
delete is ArmResourceDeleteWithoutOkAsync<VirtualNetworkSubnet>;
53+
54+
@doc("Lists all of the virtual network subnets in a virtual network.")
55+
listByVirtualNetwork is ArmResourceListByParent<VirtualNetworkSubnet>;
56+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@azure-tools/typespec-client-generator-core";
4+
import "@typespec/rest";
5+
import "@typespec/versioning";
6+
import "./models.tsp";
7+
8+
using TypeSpec.Rest;
9+
using Azure.ResourceManager;
10+
using TypeSpec.Http;
11+
using TypeSpec.OpenAPI;
12+
using TypeSpec.Versioning;
13+
14+
namespace Microsoft.AzureStackHCI;
15+
16+
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property" "For backward compatibility"
17+
#suppress "@azure-tools/typespec-azure-core/no-openapi" "TODO - x-ms-azure-resource is this needed?"
18+
@doc("The virtual network resource definition.")
19+
@extension("x-ms-azure-resource", true)
20+
@added(Versions.v2025_09_01_preview)
21+
model VirtualNetwork is TrackedResource<VirtualNetworkProperties> {
22+
@doc("Name of the virtual network")
23+
@pattern("^[a-zA-Z0-9]$|^[a-zA-Z0-9][-._a-zA-Z0-9]{0,62}[a-zA-Z0-9]$")
24+
@path
25+
@key("virtualNetworkName")
26+
@segment("virtualNetworks")
27+
@visibility(Lifecycle.Read)
28+
name: string;
29+
30+
@doc("The extendedLocation of the resource.")
31+
extendedLocation?: ExtendedLocation;
32+
}
33+
34+
@armResourceOperations
35+
@added(Versions.v2025_09_01_preview)
36+
interface VirtualNetworks {
37+
@doc("The operation to get a virtual network.")
38+
get is ArmResourceRead<VirtualNetwork>;
39+
40+
@doc("The operation to create or update a virtual network. Please note some properties can be set only during virtualNetwork network creation.")
41+
createOrUpdate is ArmResourceCreateOrReplaceAsync<VirtualNetwork>;
42+
43+
@doc("Updates a virtual network tags.")
44+
updateTags is ArmTagsPatchAsync<VirtualNetwork, TagsObject>;
45+
46+
@doc("The operation to delete a virtual network.")
47+
delete is ArmResourceDeleteWithoutOkAsync<VirtualNetwork>;
48+
49+
@doc("Lists all of the virtual networks in the specified resource group. Use the nextLink property in the response to get the next page of virtualNetwork networks.")
50+
listByResourceGroup is ArmResourceListByParent<VirtualNetwork>;
51+
52+
@doc("Lists all of the virtual networks in the specified subscription. Use the nextLink property in the response to get the next page of virtualNetwork networks.")
53+
listAll is ArmListBySubscription<VirtualNetwork>;
54+
}

specification/azurestackhci/AzureStackHCI.StackHCIVM.Management/client.tsp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,4 @@ using Microsoft.AzureStackHCI;
321321
"HciVmInstanceProvisioningStatus",
322322
"csharp"
323323
);
324-
@@clientName(VmImageRepositoryCredentials,
325-
"HciVmImageRepositoryCredentials",
326-
"csharp"
327-
);
328324
@@clientName(VmSizeEnum, "HciVmSize", "csharp");
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-09-01-preview",
4+
"resourceUri": "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"name": "default",
10+
"type": "Microsoft.AzureStackHCI/virtualMachineInstances/AttestationStatus",
11+
"id": "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM/providers/Microsoft.AzureStackHCI/virtualMachineInstances/default/attestationStatus/default",
12+
"properties": {
13+
"attestSecureBootEnabled": "Disabled",
14+
"attestationCertValidated": "Invalid",
15+
"bootIntegrityValidated": "Invalid",
16+
"errorMessage": "Attestation token has invalid signature",
17+
"healthStatus": "Unhealthy",
18+
"linuxKernelVersion": "1.0.0.0",
19+
"timestamp": "2023/11/10 9:48"
20+
}
21+
}
22+
}
23+
},
24+
"operationId": "AttestationStatuses_Get",
25+
"title": "GetAttestationStatus"
26+
}

0 commit comments

Comments
 (0)