@azure-tools/typespec-azure-resource-manager 0.71.0-dev.11 → 0.71.0-dev.12
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.
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
using Azure.Core;
|
|
2
|
+
using Versioning;
|
|
3
|
+
|
|
4
|
+
namespace Azure.ResourceManager.CommonTypes;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Billing Data
|
|
8
|
+
*/
|
|
9
|
+
@added(Versions.v6)
|
|
10
|
+
model BillingData {
|
|
11
|
+
/**
|
|
12
|
+
* The system ID of the resource. Globally unique per cloud.
|
|
13
|
+
*/
|
|
14
|
+
@visibility(Lifecycle.Read)
|
|
15
|
+
systemId?: uuid;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Indicates the billing state of the resource.
|
|
19
|
+
*/
|
|
20
|
+
@visibility(Lifecycle.Read)
|
|
21
|
+
state?: BillingState = BillingState.Pending;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Indicates reason(s) for the current billing state of the resource.
|
|
25
|
+
*/
|
|
26
|
+
@visibility(Lifecycle.Read)
|
|
27
|
+
reasons?: BillingStateReason[];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The product identifier referencing a product in the catalog.
|
|
31
|
+
*/
|
|
32
|
+
productCode: uuid;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Product token (JWT) identifying a specific version of the product.
|
|
36
|
+
*/
|
|
37
|
+
@visibility(Lifecycle.Create, Lifecycle.Update)
|
|
38
|
+
productToken?: string;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The number of instances of the product.
|
|
42
|
+
*/
|
|
43
|
+
quantity: int64 = 1;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Start date indicating the beginning of the term for which the resource is committed.
|
|
47
|
+
*/
|
|
48
|
+
startDate?: utcDateTime;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* End date indicating the end of the term for which the resource is committed.
|
|
52
|
+
*/
|
|
53
|
+
endDate?: utcDateTime;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Billing token (JWT) representing additional billing context.
|
|
57
|
+
*/
|
|
58
|
+
@visibility(Lifecycle.Create, Lifecycle.Update)
|
|
59
|
+
billingToken?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The resource's billing schedule.
|
|
63
|
+
*/
|
|
64
|
+
schedule?: BillingSchedule;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Billing schedule.
|
|
69
|
+
*/
|
|
70
|
+
@added(Versions.v6)
|
|
71
|
+
model BillingSchedule {
|
|
72
|
+
/**
|
|
73
|
+
* Indicates the renewal behavior of this resource.
|
|
74
|
+
*/
|
|
75
|
+
renewal: BillingRenewalType = BillingRenewalType.Automatic;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Schedules billing changes for this resource.
|
|
79
|
+
*/
|
|
80
|
+
changes?: BillingScheduleChange[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Billing schedule change.
|
|
85
|
+
*/
|
|
86
|
+
@added(Versions.v6)
|
|
87
|
+
model BillingScheduleChange {
|
|
88
|
+
/**
|
|
89
|
+
* Indicates when the change is expected to become effective.
|
|
90
|
+
*/
|
|
91
|
+
effective: BillingScheduleChangeEffectiveType = BillingScheduleChangeEffectiveType.Renewal;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The absolute date when the change is expected to become effective. Required when `effective` = `AbsoluteDate`.
|
|
95
|
+
*/
|
|
96
|
+
effectiveDate?: utcDateTime;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The kind of change.
|
|
100
|
+
*/
|
|
101
|
+
kind: BillingScheduleChangeKind = BillingScheduleChangeKind.Update;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The new product identifier. When not specified, the resource's product code remains unchanged.
|
|
105
|
+
*/
|
|
106
|
+
productCode?: uuid;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Product token (JWT) identifying a specific version of the scheduled product. Can only be
|
|
110
|
+
* specified when productCode is specified also.
|
|
111
|
+
*/
|
|
112
|
+
@visibility(Lifecycle.Create, Lifecycle.Update)
|
|
113
|
+
productToken?: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The new number of instances of the product. When not specified, the resource's quantity remains unchanged.
|
|
117
|
+
*/
|
|
118
|
+
quantity?: int64;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The new (coterminous) end date of the product. Can only be specified when effective = renewal.
|
|
122
|
+
* When not specified, the resource's end date is calculated based on the renewal date and the
|
|
123
|
+
* product's term duration.
|
|
124
|
+
*/
|
|
125
|
+
endDate?: utcDateTime;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Billing token (JWT) representing additional billing context.
|
|
129
|
+
*/
|
|
130
|
+
@visibility(Lifecycle.Create, Lifecycle.Update)
|
|
131
|
+
billingToken?: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Billing state.
|
|
136
|
+
*/
|
|
137
|
+
@added(Versions.v6)
|
|
138
|
+
union BillingState {
|
|
139
|
+
/** Resource's billing has not yet started. */
|
|
140
|
+
Pending: "Pending",
|
|
141
|
+
|
|
142
|
+
/** Resource's billing is activate. */
|
|
143
|
+
Active: "Active",
|
|
144
|
+
|
|
145
|
+
/** Resource's billing is in a warning state. */
|
|
146
|
+
Warned: "Warned",
|
|
147
|
+
|
|
148
|
+
/** Resource's billing is inactive. */
|
|
149
|
+
Inactive: "Inactive",
|
|
150
|
+
|
|
151
|
+
string,
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Billing state reason.
|
|
156
|
+
*/
|
|
157
|
+
@added(Versions.v6)
|
|
158
|
+
union BillingStateReason {
|
|
159
|
+
/** Resource's billing has been suspended by Microsoft. */
|
|
160
|
+
Suspended: "Suspended",
|
|
161
|
+
|
|
162
|
+
/** Resource has been canceled by the customer. */
|
|
163
|
+
Canceled: "Canceled",
|
|
164
|
+
|
|
165
|
+
/** Resource's billing has expired. */
|
|
166
|
+
Expired: "Expired",
|
|
167
|
+
|
|
168
|
+
string,
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Type of renewal.
|
|
173
|
+
*/
|
|
174
|
+
@added(Versions.v6)
|
|
175
|
+
union BillingRenewalType {
|
|
176
|
+
/** Automatically renew the product when its term ends. */
|
|
177
|
+
Automatic: "Automatic",
|
|
178
|
+
|
|
179
|
+
/** Don't automatically renew the product. */
|
|
180
|
+
None: "None",
|
|
181
|
+
|
|
182
|
+
string,
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* When a scheduled change is expected to become effective.
|
|
187
|
+
*/
|
|
188
|
+
@added(Versions.v6)
|
|
189
|
+
union BillingScheduleChangeEffectiveType {
|
|
190
|
+
/** At a specified date. */
|
|
191
|
+
AbsoluteDate: "AbsoluteDate",
|
|
192
|
+
|
|
193
|
+
/** At time of term renewal. */
|
|
194
|
+
Renewal: "Renewal",
|
|
195
|
+
|
|
196
|
+
string,
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Type of scheduled change.
|
|
201
|
+
*/
|
|
202
|
+
@added(Versions.v6)
|
|
203
|
+
union BillingScheduleChangeKind {
|
|
204
|
+
/** Update the resource. */
|
|
205
|
+
Update: "Update",
|
|
206
|
+
|
|
207
|
+
/** Cancel the resource. */
|
|
208
|
+
Cancel: "Cancel",
|
|
209
|
+
|
|
210
|
+
string,
|
|
211
|
+
}
|
package/lib/models.tsp
CHANGED
|
@@ -452,4 +452,21 @@ model AvailabilityZonesProperty {
|
|
|
452
452
|
zones?: string[];
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Standard resource billing data property to represent the resource's current billing state.
|
|
457
|
+
* Spread this model directly into your resource property model when modeling e.g. prepaid resources.
|
|
458
|
+
*
|
|
459
|
+
* @example
|
|
460
|
+
*
|
|
461
|
+
* ```typespec
|
|
462
|
+
* model FooProperties {
|
|
463
|
+
* ...BillingDataProperty,
|
|
464
|
+
* }
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
467
|
+
model BillingDataProperty {
|
|
468
|
+
/** The billing data of the resource. */
|
|
469
|
+
billingData: CommonTypes.BillingData;
|
|
470
|
+
}
|
|
471
|
+
|
|
455
472
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-tools/typespec-azure-resource-manager",
|
|
3
|
-
"version": "0.71.0-dev.
|
|
3
|
+
"version": "0.71.0-dev.12",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec Azure Resource Manager library",
|
|
6
6
|
"homepage": "https://azure.github.io/typespec-azure",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@azure-tools/typespec-azure-core": "^0.70.0 || >= 0.71.0-dev.4",
|
|
51
|
-
"@typespec/compiler": "^1.14.0",
|
|
52
51
|
"@typespec/http": "^1.14.0",
|
|
52
|
+
"@typespec/compiler": "^1.14.0",
|
|
53
53
|
"@typespec/rest": "^0.84.0",
|
|
54
54
|
"@typespec/openapi": "^1.14.0",
|
|
55
55
|
"@typespec/versioning": "^0.84.0"
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"vitest": "^4.1.3",
|
|
66
66
|
"@typespec/compiler": "^1.14.0",
|
|
67
67
|
"@typespec/library-linter": "^0.84.0",
|
|
68
|
-
"@typespec/http": "^1.14.0",
|
|
69
|
-
"@typespec/versioning": "^0.84.0",
|
|
70
68
|
"@typespec/rest": "^0.84.0",
|
|
69
|
+
"@typespec/versioning": "^0.84.0",
|
|
71
70
|
"@typespec/tspd": "^0.76.0",
|
|
71
|
+
"@typespec/http": "^1.14.0",
|
|
72
72
|
"@typespec/openapi": "^1.14.0"
|
|
73
73
|
},
|
|
74
74
|
"scripts": {
|