Skip to content

Commit b0de48a

Browse files
bradenwatkinsBraden Watkins
andauthored
BillingRP AssociatedTenants and BillingRequests (#22538)
* Baseline for 2023-04-01 from 2020-05-01 * Add package info in readme * Fix filename reference * Split billing.json into different resource files * GA for associated tenants and permission requests * Update with latest generated files * Update with latest types.json file * Incorporate PR comments for display name * PR comments from 9/27 * Update with comments from 10/4 * Incoporate PR comments from 10/10 * Fix model validation * Update with PR comments from 10/19/2023 --------- Co-authored-by: Braden Watkins <[email protected]>
1 parent b0b657c commit b0de48a

19 files changed

+2318
-623
lines changed
Lines changed: 375 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,375 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "BillingManagementClient",
5+
"description": "Documentation for Microsoft.Billing.",
6+
"contact": {
7+
"name": "Microsoft.Billing",
8+
"url": "https://learn.microsoft.com/en-us/rest/api/billing/",
9+
"email": "[email protected]"
10+
},
11+
"version": "2023-04-01"
12+
},
13+
"paths": {
14+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants/{associatedTenantName}": {
15+
"delete": {
16+
"tags": [
17+
"AssociatedTenant"
18+
],
19+
"description": "Deletes an associated tenant for a billing account.",
20+
"externalDocs": {
21+
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
22+
},
23+
"operationId": "AssociatedTenants_Delete",
24+
"produces": [
25+
"application/json"
26+
],
27+
"parameters": [
28+
{
29+
"$ref": "./types.json#/parameters/billingAccountName"
30+
},
31+
{
32+
"$ref": "./types.json#/parameters/associatedTenantName"
33+
},
34+
{
35+
"$ref": "./types.json#/parameters/apiVersionParameter"
36+
}
37+
],
38+
"responses": {
39+
"202": {
40+
"description": "An operation accepted result that returns a 'Location' header that the client can poll to view the result of the operation.",
41+
"headers": {
42+
"Location": {
43+
"type": "string"
44+
},
45+
"Retry-After": {
46+
"type": "integer",
47+
"format": "int32"
48+
}
49+
}
50+
},
51+
"204": {
52+
"description": "No Content"
53+
},
54+
"default": {
55+
"description": "Error response describing why the operation failed.",
56+
"schema": {
57+
"$ref": "./types.json#/definitions/ArmErrorResponse"
58+
}
59+
}
60+
},
61+
"x-ms-long-running-operation": true,
62+
"x-ms-long-running-operation-options": {
63+
"final-state-via": "location"
64+
},
65+
"x-ms-examples": {
66+
"AssociatedTenantsDelete": {
67+
"$ref": "./examples/associatedTenantsDelete.json"
68+
}
69+
}
70+
},
71+
"get": {
72+
"tags": [
73+
"AssociatedTenant"
74+
],
75+
"description": "Gets an associated tenant by ID.",
76+
"externalDocs": {
77+
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
78+
},
79+
"operationId": "AssociatedTenants_Get",
80+
"produces": [
81+
"application/json"
82+
],
83+
"parameters": [
84+
{
85+
"$ref": "./types.json#/parameters/billingAccountName"
86+
},
87+
{
88+
"$ref": "./types.json#/parameters/associatedTenantName"
89+
},
90+
{
91+
"$ref": "./types.json#/parameters/apiVersionParameter"
92+
}
93+
],
94+
"responses": {
95+
"200": {
96+
"description": "An associated tenant.",
97+
"schema": {
98+
"$ref": "#/definitions/AssociatedTenant"
99+
}
100+
},
101+
"default": {
102+
"description": "Error response describing why the operation failed.",
103+
"schema": {
104+
"$ref": "./types.json#/definitions/ArmErrorResponse"
105+
}
106+
}
107+
},
108+
"x-ms-examples": {
109+
"AssociatedTenantsGet": {
110+
"$ref": "./examples/associatedTenantsGet.json"
111+
}
112+
}
113+
},
114+
"put": {
115+
"tags": [
116+
"AssociatedTenant"
117+
],
118+
"description": "Create or update an associated tenant for the billing account.",
119+
"externalDocs": {
120+
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
121+
},
122+
"operationId": "AssociatedTenants_CreateOrUpdate",
123+
"consumes": [
124+
"application/json"
125+
],
126+
"produces": [
127+
"application/json"
128+
],
129+
"parameters": [
130+
{
131+
"$ref": "./types.json#/parameters/billingAccountName"
132+
},
133+
{
134+
"$ref": "./types.json#/parameters/associatedTenantName"
135+
},
136+
{
137+
"$ref": "./types.json#/parameters/apiVersionParameter"
138+
},
139+
{
140+
"in": "body",
141+
"name": "body",
142+
"description": "An associated tenant.",
143+
"schema": {
144+
"$ref": "#/definitions/AssociatedTenant"
145+
}
146+
}
147+
],
148+
"responses": {
149+
"200": {
150+
"description": "An associated tenant.",
151+
"schema": {
152+
"$ref": "#/definitions/AssociatedTenant"
153+
}
154+
},
155+
"201": {
156+
"description": "An associated tenant.",
157+
"schema": {
158+
"$ref": "#/definitions/AssociatedTenant"
159+
},
160+
"headers": {
161+
"Location": {
162+
"type": "string"
163+
},
164+
"Retry-After": {
165+
"type": "integer",
166+
"format": "int32"
167+
}
168+
}
169+
},
170+
"default": {
171+
"description": "Error response describing why the operation failed.",
172+
"schema": {
173+
"$ref": "./types.json#/definitions/ArmErrorResponse"
174+
}
175+
}
176+
},
177+
"x-ms-long-running-operation": true,
178+
"x-ms-long-running-operation-options": {
179+
"final-state-via": "location"
180+
},
181+
"x-ms-examples": {
182+
"AssociatedTenantsCreateOrUpdate": {
183+
"$ref": "./examples/associatedTenantsCreateOrUpdate.json"
184+
}
185+
}
186+
}
187+
},
188+
"/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/associatedTenants": {
189+
"get": {
190+
"tags": [
191+
"AssociatedTenant"
192+
],
193+
"description": "Lists the associated tenants that can collaborate with the billing account on commerce activities like viewing and downloading invoices, managing payments, making purchases, and managing or provisioning licenses.",
194+
"externalDocs": {
195+
"url": "https://docs.microsoft.com/en-us/rest/api/billing/"
196+
},
197+
"operationId": "AssociatedTenants_ListByBillingAccount",
198+
"produces": [
199+
"application/json"
200+
],
201+
"parameters": [
202+
{
203+
"$ref": "./types.json#/parameters/billingAccountName"
204+
},
205+
{
206+
"in": "query",
207+
"name": "includeRevoked",
208+
"description": "Can be used to get revoked associated tenants.",
209+
"type": "boolean",
210+
"default": false
211+
},
212+
{
213+
"$ref": "./types.json#/parameters/apiVersionParameter"
214+
},
215+
{
216+
"$ref": "./types.json#/parameters/filter"
217+
},
218+
{
219+
"$ref": "./types.json#/parameters/orderBy"
220+
},
221+
{
222+
"$ref": "./types.json#/parameters/top"
223+
},
224+
{
225+
"$ref": "./types.json#/parameters/skip"
226+
},
227+
{
228+
"$ref": "./types.json#/parameters/count"
229+
},
230+
{
231+
"$ref": "./types.json#/parameters/search"
232+
}
233+
],
234+
"responses": {
235+
"200": {
236+
"description": "A list of associated tenants.",
237+
"schema": {
238+
"$ref": "#/definitions/AssociatedTenantListResult"
239+
}
240+
},
241+
"default": {
242+
"description": "Error response describing why the operation failed.",
243+
"schema": {
244+
"$ref": "./types.json#/definitions/ArmErrorResponse"
245+
}
246+
}
247+
},
248+
"x-ms-examples": {
249+
"AssociatedTenantsListByBillingAccount": {
250+
"$ref": "./examples/associatedTenantsListByBillingAccount.json"
251+
}
252+
},
253+
"x-ms-pageable": {
254+
"nextLinkName": "nextLink"
255+
}
256+
}
257+
}
258+
},
259+
"definitions": {
260+
"AssociatedTenant": {
261+
"description": "An associated tenant.",
262+
"type": "object",
263+
"allOf": [
264+
{
265+
"$ref": "./types.json#/definitions/ArmResource"
266+
}
267+
],
268+
"properties": {
269+
"properties": {
270+
"description": "The properties of a(n) AssociatedTenant",
271+
"allOf": [
272+
{
273+
"$ref": "#/definitions/AssociatedTenantProperties"
274+
}
275+
],
276+
"x-ms-client-flatten": true
277+
}
278+
},
279+
"x-ms-azure-resource": true
280+
},
281+
"AssociatedTenantListResult": {
282+
"description": "A container for a list of resources",
283+
"type": "object",
284+
"properties": {
285+
"nextLink": {
286+
"description": "The link (url) to the next page of results.",
287+
"type": "string",
288+
"readOnly": true
289+
},
290+
"value": {
291+
"description": "The list of resources.",
292+
"type": "array",
293+
"items": {
294+
"$ref": "#/definitions/AssociatedTenant"
295+
},
296+
"readOnly": true,
297+
"x-ms-identifiers": [
298+
"id"
299+
]
300+
}
301+
}
302+
},
303+
"AssociatedTenantProperties": {
304+
"description": "An associated tenant.",
305+
"type": "object",
306+
"properties": {
307+
"displayName": {
308+
"description": "The name of the associated tenant.",
309+
"type": "string"
310+
},
311+
"tenantId": {
312+
"description": "The ID that uniquely identifies a tenant.",
313+
"type": "string"
314+
},
315+
"billingManagementState": {
316+
"description": "The state determines whether users from the associated tenant can be assigned roles for commerce activities like viewing and downloading invoices, managing payments, and making purchases.",
317+
"enum": [
318+
"Other",
319+
"NotAllowed",
320+
"Active",
321+
"Revoked"
322+
],
323+
"type": "string",
324+
"x-ms-enum": {
325+
"name": "BillingManagementTenantState",
326+
"modelAsString": true
327+
}
328+
},
329+
"provisioningManagementState": {
330+
"description": "The state determines whether subscriptions and licenses can be provisioned in the associated tenant. It can be set to 'Pending' to initiate a billing request.",
331+
"enum": [
332+
"Other",
333+
"NotRequested",
334+
"Active",
335+
"Pending",
336+
"BillingRequestExpired",
337+
"BillingRequestDeclined",
338+
"Revoked"
339+
],
340+
"type": "string",
341+
"x-ms-enum": {
342+
"name": "ProvisioningTenantState",
343+
"modelAsString": true
344+
}
345+
},
346+
"provisioningBillingRequestId": {
347+
"description": "The unique identifier for the billing request that is created when enabling provisioning for an associated tenant.",
348+
"type": "string",
349+
"readOnly": true
350+
}
351+
}
352+
}
353+
},
354+
"securityDefinitions": {
355+
"azure_auth": {
356+
"type": "oauth2",
357+
"flow": "implicit",
358+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
359+
"scopes": {
360+
"user_impersonation": "impersonate your user account"
361+
},
362+
"description": "Azure Active Directory OAuth2 Flow."
363+
}
364+
},
365+
"host": "management.azure.com",
366+
"schemes": [
367+
"https"
368+
],
369+
"consumes": [
370+
"application/json"
371+
],
372+
"produces": [
373+
"application/json"
374+
]
375+
}

0 commit comments

Comments
 (0)