@azure-tools/typespec-azure-resource-manager 0.38.0-dev.4 → 0.38.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/arm.foundations.tsp +63 -56
- package/lib/interfaces.tsp +192 -198
- package/lib/models.tsp +27 -26
- package/lib/operations.tsp +234 -233
- package/lib/parameters.tsp +20 -20
- package/lib/private-links.tsp +6 -6
- package/lib/private.decorators.tsp +3 -3
- package/lib/responses.tsp +20 -20
- package/package.json +4 -2
- package/dist/vitest.config.d.ts +0 -3
- package/dist/vitest.config.d.ts.map +0 -1
- package/dist/vitest.config.js +0 -14
- package/dist/vitest.config.js.map +0 -1
package/lib/models.tsp
CHANGED
|
@@ -11,49 +11,49 @@ namespace Azure.ResourceManager;
|
|
|
11
11
|
* Concrete tracked resource types can be created by aliasing this type using a specific property type.
|
|
12
12
|
*
|
|
13
13
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
14
|
-
* @template
|
|
14
|
+
* @template Properties A model containing the provider-specific properties for this resource
|
|
15
15
|
*/
|
|
16
16
|
@doc("Concrete tracked resource types can be created by aliasing this type using a specific property type.")
|
|
17
|
-
@armResourceInternal(
|
|
17
|
+
@armResourceInternal(Properties)
|
|
18
18
|
@includeInapplicableMetadataInPayload(false)
|
|
19
|
-
model TrackedResource<
|
|
19
|
+
model TrackedResource<Properties extends {}> extends TrackedResourceBase {
|
|
20
20
|
@doc("The resource-specific properties for this resource.")
|
|
21
21
|
@visibility("read", "create")
|
|
22
22
|
@extension("x-ms-client-flatten", true)
|
|
23
|
-
properties?:
|
|
23
|
+
properties?: Properties;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Concrete proxy resource types can be created by aliasing this type using a specific property type.
|
|
28
28
|
*
|
|
29
29
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
30
|
-
* @template
|
|
30
|
+
* @template Properties A model containing the provider-specific properties for this resource
|
|
31
31
|
*/
|
|
32
32
|
@doc("Concrete proxy resource types can be created by aliasing this type using a specific property type.")
|
|
33
|
-
@armResourceInternal(
|
|
33
|
+
@armResourceInternal(Properties)
|
|
34
34
|
@includeInapplicableMetadataInPayload(false)
|
|
35
|
-
model ProxyResource<
|
|
35
|
+
model ProxyResource<Properties extends {}> extends ProxyResourceBase {
|
|
36
36
|
@doc("The resource-specific properties for this resource.")
|
|
37
37
|
@visibility("read", "create")
|
|
38
38
|
@extension("x-ms-client-flatten", true)
|
|
39
|
-
properties?:
|
|
39
|
+
properties?: Properties;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Concrete extension resource types can be created by aliasing this type using a specific property type.
|
|
44
44
|
*
|
|
45
45
|
* See more details on [different ARM resource type here.](https://azure.github.io/typespec-azure/docs/howtos/ARM/resource-type)
|
|
46
|
-
* @template
|
|
46
|
+
* @template Properties A model containing the provider-specific properties for this resource
|
|
47
47
|
*/
|
|
48
48
|
@extensionResource
|
|
49
49
|
@doc("Concrete extension resource types can be created by aliasing this type using a specific property type.")
|
|
50
|
-
@armResourceInternal(
|
|
50
|
+
@armResourceInternal(Properties)
|
|
51
51
|
@includeInapplicableMetadataInPayload(false)
|
|
52
|
-
model ExtensionResource<
|
|
52
|
+
model ExtensionResource<Properties extends {}> extends ExtensionResourceBase {
|
|
53
53
|
@doc("The resource-specific properties for this resource.")
|
|
54
54
|
@visibility("read", "create")
|
|
55
55
|
@extension("x-ms-client-flatten", true)
|
|
56
|
-
properties?:
|
|
56
|
+
properties?: Properties;
|
|
57
57
|
}
|
|
58
58
|
//#region
|
|
59
59
|
|
|
@@ -61,26 +61,26 @@ model ExtensionResource<TProperties extends {}> extends ExtensionResourceBase {
|
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Extracts the key (path) parameters from a resource and its parents
|
|
64
|
-
* @template
|
|
64
|
+
* @template Resource The resource to extract properties from
|
|
65
65
|
*/
|
|
66
66
|
@copyResourceKeyParameters
|
|
67
|
-
model KeysOf<
|
|
67
|
+
model KeysOf<Resource> {}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* Extracts the key (path) parameters from the parent(s) of the given resource
|
|
71
|
-
* @template
|
|
71
|
+
* @template Resource The resource to extract properties from
|
|
72
72
|
*/
|
|
73
73
|
@copyResourceKeyParameters("parent")
|
|
74
|
-
model ParentKeysOf<
|
|
74
|
+
model ParentKeysOf<Resource> {}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Model describing the provider namespace.
|
|
78
|
-
* @template
|
|
78
|
+
* @template Resource The resource provided by the namespace.
|
|
79
79
|
*/
|
|
80
|
-
model ProviderNamespace<
|
|
80
|
+
model ProviderNamespace<Resource extends {}> {
|
|
81
81
|
@path
|
|
82
82
|
@segment("providers")
|
|
83
|
-
@assignProviderNameValue(
|
|
83
|
+
@assignProviderNameValue(Resource)
|
|
84
84
|
@doc("The provider namespace for the resource.")
|
|
85
85
|
provider: "Microsoft.ThisWillBeReplaced";
|
|
86
86
|
}
|
|
@@ -95,17 +95,18 @@ model ProviderNamespace<TResource extends {}> {
|
|
|
95
95
|
* otherArmId: ResourceIdentifier;
|
|
96
96
|
* networkId: ResourceIdentifier<[{type:"\\Microsoft.Network\\vnet"}]>
|
|
97
97
|
* vmIds: ResourceIdentifier<[{type:"\\Microsoft.Compute\\vm", scopes["*"]}]>
|
|
98
|
-
* @template
|
|
98
|
+
* @template AllowedResourceTypes An array of allowed resource types for the resource reference
|
|
99
99
|
*/
|
|
100
100
|
@doc("A type definition that refers the id to an ARM resource.")
|
|
101
101
|
@format("arm-id")
|
|
102
102
|
@OpenAPI.extension(
|
|
103
103
|
"x-ms-arm-id-details",
|
|
104
104
|
{
|
|
105
|
-
allowedResources:
|
|
105
|
+
allowedResources: AllowedResourceTypes,
|
|
106
106
|
}
|
|
107
107
|
)
|
|
108
|
-
scalar ResourceIdentifier<
|
|
108
|
+
scalar ResourceIdentifier<AllowedResourceTypes extends ResourceIdentifierAllowedResource[] = []>
|
|
109
|
+
extends string;
|
|
109
110
|
|
|
110
111
|
/**
|
|
111
112
|
* Used in ResourceIdentifier definition to represent a particular type of ARM resource, enabling constraints based on resource type.
|
|
@@ -229,11 +230,11 @@ model ResourceKind {
|
|
|
229
230
|
|
|
230
231
|
/**
|
|
231
232
|
* Paged response containing resources
|
|
232
|
-
* @template
|
|
233
|
+
* @template Resource The type of the values returned in the paged response (must be a resource)
|
|
233
234
|
*/
|
|
234
|
-
@doc("The response of a {name} list operation.",
|
|
235
|
-
@friendlyName("{name}ListResult",
|
|
236
|
-
model ResourceListResult<
|
|
235
|
+
@doc("The response of a {name} list operation.", Resource)
|
|
236
|
+
@friendlyName("{name}ListResult", Resource)
|
|
237
|
+
model ResourceListResult<Resource extends ArmResource> is Azure.Core.Page<Resource>;
|
|
237
238
|
|
|
238
239
|
/**
|
|
239
240
|
* Model used only to spread in the standard `plan` envelope property for a resource
|