-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Expand file tree
/
Copy pathSolution.tsp
More file actions
83 lines (68 loc) · 2.34 KB
/
Copy pathSolution.tsp
File metadata and controls
83 lines (68 loc) · 2.34 KB
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
import "@typespec/http";
import "@typespec/rest";
import "@typespec/versioning";
import "@azure-tools/typespec-azure-core";
import "@azure-tools/typespec-azure-resource-manager";
import "@typespec/openapi";
import "./Target.tsp";
import "./ProvisioningState.tsp";
import "./AvailableSolutionTemplateVersion.tsp";
using TypeSpec.OpenAPI;
using TypeSpec.Http;
using TypeSpec.Rest;
using TypeSpec.Versioning;
using Azure.Core;
using Azure.ResourceManager;
using Azure.ResourceManager.CommonTypes;
namespace Microsoft.Edge;
@doc("Solution Properties")
model SolutionProperties {
@doc("Solution template Id")
@visibility(Lifecycle.Read)
solutionTemplateId?: string;
@added(Versions.v2025_08_01)
@doc("Display name of the solution")
@visibility(Lifecycle.Read)
displayName?: string;
@doc("List of latest revisions for available solution template versions")
@visibility(Lifecycle.Read)
@Azure.ResourceManager.identifiers(#[])
availableSolutionTemplateVersions?: AvailableSolutionTemplateVersion[];
@doc("Provisioning state of resource")
@visibility(Lifecycle.Read)
provisioningState?: ProvisioningState;
}
@doc("The updatable properties of the Solution.")
model SolutionUpdate {
@doc("The resource-specific properties for this resource.")
properties?: SolutionUpdateProperties;
}
@doc("The updatable properties of the Solution.")
model SolutionUpdateProperties is SolutionProperties;
@doc("Solution Resource attached to a Target")
@parentResource(Target)
model Solution is Azure.ResourceManager.ProxyResource<SolutionProperties> {
@doc("Name of the solution")
@maxLength(61)
@minLength(3)
@pattern("^(?!v-)(?!.*-v-)[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$")
@path
@key("solutionName")
@segment("solutions")
name: string;
...ExtendedLocationProperty;
...EntityTagProperty;
}
@armResourceOperations
interface Solutions {
@doc("Get a Solution resource")
get is ArmResourceRead<Solution>;
@doc("Create or update a Solution Resource")
createOrUpdate is ArmResourceCreateOrReplaceAsync<Solution>;
@doc("Update a Solution Resource")
update is ArmCustomPatchAsync<Solution, PatchModel = SolutionUpdate>;
@doc("Delete a Solution Resource")
delete is ArmResourceDeleteWithoutOkAsync<Solution>;
@doc("List Solution resources")
listByTarget is ArmResourceListByParent<Solution>;
}