Skip to content

Commit b993024

Browse files
authored
self version creator (#40479)
1 parent 3382f99 commit b993024

23 files changed

Lines changed: 2879 additions & 1705 deletions

specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/clusterJobs.tsp renamed to specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/ClusterJobs.tsp

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -49,46 +49,4 @@ interface ClusterJobs {
4949
>;
5050
}
5151

52-
/** Cluster Job properties */
53-
@added(Versions.v2026_03_01_preview)
54-
@discriminator("jobType")
55-
model ClusterJobProperties {
56-
/** Job Type to support polymorphic resource. */
57-
@visibility(Lifecycle.Create, Lifecycle.Read)
58-
jobType: HciJobType;
59-
60-
/** Deployment mode to trigger job. */
61-
deploymentMode?: DeploymentMode = DeploymentMode.Deploy;
62-
63-
/** Job provisioning state */
64-
@visibility(Lifecycle.Read)
65-
provisioningState?: ProvisioningState;
66-
67-
/** Unique, immutable job id. */
68-
@visibility(Lifecycle.Read)
69-
jobId?: string;
70-
71-
/** The UTC date and time at which the job started. */
72-
@visibility(Lifecycle.Read)
73-
startTimeUtc?: utcDateTime;
74-
75-
/** The UTC date and time at which the job completed. */
76-
@visibility(Lifecycle.Read)
77-
endTimeUtc?: utcDateTime;
78-
79-
/** Status of Cluster job. */
80-
@visibility(Lifecycle.Read)
81-
status?: JobStatus;
82-
83-
/** Reported properties for job */
84-
@visibility(Lifecycle.Read)
85-
reportedProperties?: JobReportedProperties;
86-
}
87-
8852
@@doc(ClusterJob.name, "Name of ClusterJob");
89-
90-
/**
91-
* List of Cluster Job resources for the HCI cluster.
92-
*/
93-
@added(Versions.v2026_03_01_preview)
94-
model ClusterJobListResult is Azure.Core.Page<ClusterJob>;

specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/devicePool.tsp renamed to specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/DevicePool.tsp

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import "@azure-tools/typespec-azure-core";
22
import "@azure-tools/typespec-azure-resource-manager";
3-
import "@typespec/openapi";
43
import "@typespec/rest";
4+
import "@typespec/http";
5+
import "./models.tsp";
56

67
using TypeSpec.Rest;
7-
using Azure.ResourceManager;
88
using TypeSpec.Http;
9-
using TypeSpec.OpenAPI;
10-
using Azure.Core;
9+
using Azure.ResourceManager;
1110
using TypeSpec.Versioning;
1211

13-
@armProviderNamespace("Microsoft.AzureStackHCI")
1412
namespace Microsoft.AzureStackHCI;
1513

14+
/**
15+
* DevicePool details.
16+
*/
1617
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state"
17-
@doc("DevicePool details.")
1818
@added(Versions.v2026_03_01_preview)
1919
model DevicePool
2020
is Azure.ResourceManager.TrackedResource<DevicePoolProperties> {
@@ -45,25 +45,35 @@ interface DevicePools {
4545
*/
4646
delete is ArmResourceDeleteWithoutOkAsync<DevicePool>;
4747

48-
@doc("Update a devicePool")
48+
/**
49+
* Update a devicePool
50+
*/
4951
@patch(#{ implicitOptionality: false })
5052
update is ArmCustomPatchAsync<DevicePool, DevicePoolPatch>;
5153

52-
@doc("List all device pools in a resource group.")
54+
/**
55+
* List all device pools in a resource group.
56+
*/
5357
listByResourceGroup is ArmResourceListByParent<DevicePool>;
5458

55-
@doc("List all device pools in a subscription.")
59+
/**
60+
* List all device pools in a subscription.
61+
*/
5662
listBySubscription is ArmListBySubscription<DevicePool>;
5763

64+
/**
65+
* Claiming devices of the pool.
66+
*/
5867
#suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "The final response has no content, so 204 is returned."
59-
@doc("Claiming devices of the pool.")
6068
claimDevices is ArmResourceActionNoContentAsync<
6169
DevicePool,
6270
ClaimDeviceRequest
6371
>;
6472

73+
/**
74+
* Releasing devices of the pool.
75+
*/
6576
#suppress "@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes" "The final response has no content, so 204 is returned."
66-
@doc("Releasing devices of the pool.")
6777
releaseDevices is ArmResourceActionNoContentAsync<
6878
DevicePool,
6979
ReleaseDeviceRequest
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@typespec/rest";
4+
import "@typespec/http";
5+
import "./models.tsp";
6+
7+
using TypeSpec.Rest;
8+
using TypeSpec.Http;
9+
using TypeSpec.Versioning;
10+
using Azure.ResourceManager;
11+
12+
namespace Microsoft.AzureStackHCI;
13+
14+
/**
15+
* EdgeMachine details.
16+
*/
17+
@added(Versions.v2026_03_01_preview)
18+
model EdgeMachine
19+
is Azure.ResourceManager.TrackedResource<EdgeMachineProperties> {
20+
...ResourceNameParameter<
21+
Resource = EdgeMachine,
22+
KeyName = "edgeMachineName",
23+
SegmentName = "edgeMachines",
24+
NamePattern = "^[a-zA-Z0-9-_]{3,63}$"
25+
>;
26+
...ManagedServiceIdentityProperty;
27+
}
28+
29+
@added(Versions.v2026_03_01_preview)
30+
@armResourceOperations
31+
interface EdgeMachines {
32+
/**
33+
* Get an edge machine.
34+
*/
35+
get is ArmResourceRead<EdgeMachine>;
36+
37+
/**
38+
* Create or update an edge machine.
39+
*/
40+
createOrUpdate is ArmResourceCreateOrReplaceAsync<EdgeMachine>;
41+
42+
/**
43+
* Update an edge machine.
44+
*/
45+
@patch(#{ implicitOptionality: false })
46+
update is ArmCustomPatchAsync<EdgeMachine, EdgeMachinePatch>;
47+
48+
/**
49+
* Delete an edge machine.
50+
*/
51+
delete is ArmResourceDeleteWithoutOkAsync<EdgeMachine>;
52+
53+
/**
54+
* List all edge machines in a resource group.
55+
*/
56+
listByResourceGroup is ArmResourceListByParent<EdgeMachine>;
57+
58+
/**
59+
* List all edge machines in a subscription.
60+
*/
61+
listBySubscription is ArmListBySubscription<EdgeMachine>;
62+
}
63+
64+
@@doc(EdgeMachine.name, "Name of Device");
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@typespec/rest";
4+
import "./models.tsp";
5+
6+
using TypeSpec.Rest;
7+
using TypeSpec.Versioning;
8+
using Azure.ResourceManager;
9+
10+
namespace Microsoft.AzureStackHCI;
11+
12+
/**
13+
* Cluster Jobs resource
14+
*/
15+
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state" ""
16+
@added(Versions.v2026_03_01_preview)
17+
@parentResource(EdgeMachine)
18+
model EdgeMachineJob
19+
is Azure.ResourceManager.ProxyResource<EdgeMachineJobProperties> {
20+
...ResourceNameParameter<
21+
Resource = EdgeMachineJob,
22+
KeyName = "jobsName",
23+
SegmentName = "jobs",
24+
NamePattern = "^[a-zA-Z0-9-_]{3,63}$"
25+
>;
26+
}
27+
28+
@@doc(EdgeMachineJob.name, "Name of EdgeMachineJob");
29+
30+
@added(Versions.v2026_03_01_preview)
31+
@armResourceOperations
32+
interface EdgeMachineJobs {
33+
/**
34+
* Get a EdgeMachineJob
35+
*/
36+
get is ArmResourceRead<EdgeMachineJob>;
37+
38+
/**
39+
* Create a EdgeMachineJob
40+
*/
41+
createOrUpdate is ArmResourceCreateOrUpdateAsync<EdgeMachineJob>;
42+
43+
/**
44+
* Delete a EdgeMachineJob
45+
*/
46+
delete is ArmResourceDeleteWithoutOkAsync<EdgeMachineJob>;
47+
48+
/**
49+
* List EdgeMachineJob resources by EdgeMachines
50+
*/
51+
list is ArmResourceListByParent<EdgeMachineJob>;
52+
}

specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/kubernetesVersions.tsp renamed to specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/KubernetesVersions.tsp

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import "@azure-tools/typespec-azure-core";
22
import "@azure-tools/typespec-azure-resource-manager";
3-
import "@typespec/openapi";
43
import "@typespec/rest";
5-
import "@typespec/http";
6-
import "@azure-tools/typespec-azure-resource-manager";
4+
import "./models.tsp";
75

86
using TypeSpec.Rest;
97
using Azure.ResourceManager;
108
using TypeSpec.Versioning;
119

12-
@armProviderNamespace("Microsoft.AzureStackHCI")
1310
namespace Microsoft.AzureStackHCI;
1411

15-
@doc("Represents a kubernetes version resource.")
12+
/**
13+
* Represents a kubernetes version resource.
14+
*/
1615
@parentResource(SubscriptionLocationResource)
1716
@added(Versions.v2026_03_01_preview)
1817
model KubernetesVersion
@@ -26,14 +25,8 @@ model KubernetesVersion
2625
@armResourceOperations
2726
@added(Versions.v2026_03_01_preview)
2827
interface KubernetesVersions {
29-
@doc("List all kubernetes versions.")
28+
/**
29+
* List all kubernetes versions.
30+
*/
3031
list is ArmResourceListAtScope<KubernetesVersion>;
3132
}
32-
33-
#suppress "@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state"
34-
@doc("Represents properties of a kubernetes version.")
35-
@added(Versions.v2026_03_01_preview)
36-
model KubernetesVersionProperties {
37-
@doc("Represents kubernetes version.")
38-
version: string;
39-
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@typespec/rest";
4+
import "./models.tsp";
5+
6+
using TypeSpec.Rest;
7+
using Azure.ResourceManager;
8+
using TypeSpec.Versioning;
9+
10+
namespace Microsoft.AzureStackHCI;
11+
12+
/**
13+
* Represents a os image resource.
14+
*/
15+
@parentResource(SubscriptionLocationResource)
16+
@added(Versions.v2026_03_01_preview)
17+
model OsImage is Azure.ResourceManager.ProxyResource<OsImageProperties> {
18+
...ResourceNameParameter<
19+
Resource = OsImage,
20+
NamePattern = "^[a-zA-Z0-9-.]{3,50}$"
21+
>;
22+
}
23+
24+
@armResourceOperations
25+
@added(Versions.v2026_03_01_preview)
26+
interface OsImages {
27+
/**
28+
* Get a os image.
29+
*/
30+
get is ArmResourceRead<OsImage>;
31+
32+
/**
33+
* List all os images.
34+
*/
35+
list is ArmResourceListAtScope<OsImage>;
36+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@typespec/rest";
4+
import "./models.tsp";
5+
6+
using TypeSpec.Rest;
7+
using Azure.ResourceManager;
8+
using TypeSpec.Versioning;
9+
10+
namespace Microsoft.AzureStackHCI;
11+
12+
/**
13+
* Represents a platform update resource.
14+
*/
15+
@parentResource(SubscriptionLocationResource)
16+
@added(Versions.v2026_03_01_preview)
17+
model PlatformUpdate
18+
is Azure.ResourceManager.ProxyResource<PlatformUpdateProperties> {
19+
...ResourceNameParameter<
20+
Resource = PlatformUpdate,
21+
NamePattern = "^[a-zA-Z0-9-.]{3,50}$"
22+
>;
23+
}
24+
25+
@armResourceOperations
26+
@added(Versions.v2026_03_01_preview)
27+
interface PlatformUpdates {
28+
/**
29+
* Get a platform update.
30+
*/
31+
get is ArmResourceRead<PlatformUpdate>;
32+
33+
/**
34+
* List all platform updates.
35+
*/
36+
list is ArmResourceListByParent<
37+
PlatformUpdate,
38+
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters
39+
>;
40+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import "@azure-tools/typespec-azure-core";
2+
import "@azure-tools/typespec-azure-resource-manager";
3+
import "@typespec/rest";
4+
import "./models.tsp";
5+
6+
using TypeSpec.Rest;
7+
using Azure.ResourceManager;
8+
using TypeSpec.Versioning;
9+
10+
namespace Microsoft.AzureStackHCI;
11+
12+
/**
13+
* Represents a update content.
14+
*/
15+
@parentResource(SubscriptionLocationResource)
16+
@added(Versions.v2026_03_01_preview)
17+
model UpdateContent
18+
is Azure.ResourceManager.ProxyResource<UpdateContentProperties> {
19+
...ResourceNameParameter<
20+
Resource = UpdateContent,
21+
NamePattern = "^[a-zA-Z0-9-.]{3,50}$"
22+
>;
23+
}
24+
25+
@armResourceOperations
26+
@added(Versions.v2026_03_01_preview)
27+
interface UpdateContents {
28+
/**
29+
* Gets content for an update.
30+
*/
31+
get is ArmResourceRead<UpdateContent>;
32+
33+
/**
34+
* List all update contents.
35+
*/
36+
list is ArmResourceListByParent<
37+
UpdateContent,
38+
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters
39+
>;
40+
}

0 commit comments

Comments
 (0)