Skip to content

Commit aa52d30

Browse files
Merge pull request #1986 from Azure/onboard_multiple
Onboard a number of newer RPs for autogen
2 parents 2027349 + d415b14 commit aa52d30

File tree

64 files changed

+53959
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+53959
-179
lines changed

generator/autogenlist.ts

Lines changed: 59 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { postProcessor as storageProcessor } from './processors/Microsoft.Storag
77
import { postProcessor as computeProcessor } from './processors/Microsoft.Compute';
88
import { postProcessor as policyProcessor } from './processors/Microsoft.Authorization';
99
import { postProcessor as securityInsightsPostProcessor } from './processors/Microsoft.SecurityInsights';
10+
import { postProcessor as costManagementPostProcessor } from './processors/Microsoft.CostManagement';
11+
import { postProcessor as providerHubPostProcessor } from './processors/Microsoft.ProviderHub';
1012
import { lowerCaseEquals } from './utils';
1113

1214
// New providers are onboarded by default. The providers listed here are the only ones **not** onboarded.
@@ -16,26 +18,11 @@ const disabledProviders: AutoGenConfig[] = [
1618
namespace: 'Microsoft.Advisor',
1719
disabledForAutogen: true,
1820
},
19-
{
20-
basePath: 'agrifood/resource-manager',
21-
namespace: 'Microsoft.AgFoodPlatform',
22-
disabledForAutogen: true,
23-
},
2421
{
2522
basePath: 'azure-kusto/resource-manager',
2623
namespace: 'Microsoft.Kusto',
2724
disabledForAutogen: true,
2825
},
29-
{
30-
basePath: 'azurestackhci/resource-manager',
31-
namespace: 'Microsoft.AzureStackHCI',
32-
disabledForAutogen: true,
33-
},
34-
{
35-
basePath: 'baremetalinfrastructure/resource-manager',
36-
namespace: 'Microsoft.BareMetalInfrastructure',
37-
disabledForAutogen: true,
38-
},
3926
{
4027
basePath: 'cloudshell/resource-manager',
4128
namespace: 'Microsoft.Portal',
@@ -46,92 +33,33 @@ const disabledProviders: AutoGenConfig[] = [
4633
namespace: 'Microsoft.ContainerService',
4734
disabledForAutogen: true,
4835
},
49-
{
50-
basePath: 'confidentialledger/resource-manager',
51-
namespace: 'Microsoft.ConfidentialLedger',
52-
disabledForAutogen: true,
53-
},
54-
{
55-
basePath: 'cost-management/resource-manager',
56-
namespace: 'Microsoft.CostManagement',
57-
disabledForAutogen: true,
58-
},
59-
{
60-
basePath: 'cpim/resource-manager',
61-
namespace: 'Microsoft.AzureActiveDirectory',
62-
disabledForAutogen: true,
63-
},
64-
{
65-
basePath: 'dataprotection/resource-manager',
66-
namespace: 'Microsoft.DataProtection',
67-
disabledForAutogen: true,
68-
},
6936
{
7037
// Disabled as the swagger spec contains a type ("DateTimeRfc1123") which autorest is unable to parse: https://github.com/Azure/autorest.azureresourceschema/issues/71
7138
basePath: 'domainservices/resource-manager',
7239
namespace: 'Microsoft.AAD',
7340
disabledForAutogen: true,
7441
},
75-
{
76-
basePath: 'dfp/resource-manager',
77-
namespace: 'Microsoft.Dynamics365Fraudprotection',
78-
disabledForAutogen: true,
79-
},
80-
{
81-
basePath: 'dnc/resource-manager',
82-
namespace: 'Microsoft.DelegatedNetwork',
83-
disabledForAutogen: true,
84-
},
8542
{
8643
basePath: 'dns/resource-manager',
8744
namespace: 'Microsoft.Network',
8845
disabledForAutogen: true,
8946
},
9047
{
91-
basePath: 'edgeorder/resource-manager',
92-
namespace: 'Microsoft.EdgeOrder',
93-
disabledForAutogen: true,
94-
},
95-
{
48+
// Disabled as the swagger spec contains a bug (enum mismatch)
9649
basePath: 'edgeorderpartner/resource-manager',
9750
namespace: 'Microsoft.EdgeOrderPartner',
9851
disabledForAutogen: true,
9952
},
100-
{
101-
basePath: 'fluidrelay/resource-manager',
102-
namespace: 'Microsoft.FluidRelay',
103-
disabledForAutogen: true,
104-
},
105-
{
106-
basePath: 'iotsecurity/resource-manager',
107-
namespace: 'Microsoft.IoTSecurity',
108-
disabledForAutogen: true,
109-
},
11053
{
11154
basePath: 'logic/resource-manager',
11255
namespace: 'Microsoft.Logic',
11356
disabledForAutogen: true,
11457
},
115-
{
116-
basePath: 'm365securityandcompliance/resource-manager',
117-
namespace: 'Microsoft.M365SecurityAndCompliance',
118-
disabledForAutogen: true,
119-
},
12058
{
12159
basePath: 'managedservices/resource-manager',
12260
namespace: 'Microsoft.ManagedServices',
12361
disabledForAutogen: true,
12462
},
125-
{
126-
basePath: 'marketplacenotifications/resource-manager',
127-
namespace: 'Microsoft.MarketplaceNotifications',
128-
disabledForAutogen: true,
129-
},
130-
{
131-
basePath: 'marketplaceordering/resource-manager',
132-
namespace: 'Microsoft.MarketplaceOrdering',
133-
disabledForAutogen: true,
134-
},
13563
{
13664
basePath: 'mediaservices/resource-manager',
13765
namespace: 'Microsoft.Media',
@@ -157,46 +85,11 @@ const disabledProviders: AutoGenConfig[] = [
15785
namespace: 'Microsoft.Network',
15886
disabledForAutogen: true,
15987
},
160-
{
161-
basePath: 'providerhub/resource-manager',
162-
namespace: 'Microsoft.ProviderHub',
163-
disabledForAutogen: true,
164-
},
165-
{
166-
basePath: 'quota/resource-manager',
167-
namespace: 'Microsoft.Quota',
168-
disabledForAutogen: true,
169-
},
170-
{
171-
basePath: 'resources/resource-manager',
172-
namespace: 'Microsoft.Features',
173-
disabledForAutogen: true,
174-
},
175-
{
176-
basePath: 'resources/resource-manager',
177-
namespace: 'Microsoft.Solutions',
178-
disabledForAutogen: true,
179-
},
180-
{
181-
basePath: 'securityandcompliance/resource-manager',
182-
namespace: 'Microsoft.SecurityAndCompliance',
183-
disabledForAutogen: true,
184-
},
18588
{
18689
basePath: 'service-map/resource-manager',
18790
namespace: 'Microsoft.OperationalInsights',
18891
disabledForAutogen: true,
18992
},
190-
{
191-
basePath: 'servicefabricmanagedclusters/resource-manager',
192-
namespace: 'Microsoft.ServiceFabricManagedClusters',
193-
disabledForAutogen: true,
194-
},
195-
{
196-
basePath: 'testbase/resource-manager',
197-
namespace: 'Microsoft.TestBase',
198-
disabledForAutogen: true,
199-
},
20093
{
20194
basePath: 'trafficmanager/resource-manager',
20295
namespace: 'Microsoft.Network',
@@ -362,6 +255,25 @@ const autoGenList: AutoGenConfig[] = [
362255
},
363256
],
364257
},
258+
{
259+
basePath: 'cost-management/resource-manager',
260+
namespace: 'Microsoft.CostManagement',
261+
resourceConfig: [
262+
{
263+
type: 'exports',
264+
scopes: ScopeType.ManagementGroup | ScopeType.Subcription | ScopeType.ResourceGroup,
265+
},
266+
{
267+
type: 'budgets',
268+
scopes: ScopeType.ManagementGroup | ScopeType.Subcription | ScopeType.ResourceGroup | ScopeType.Extension,
269+
},
270+
{
271+
type: 'views',
272+
scopes: ScopeType.Tenant | ScopeType.ManagementGroup | ScopeType.Subcription | ScopeType.ResourceGroup | ScopeType.Extension,
273+
},
274+
],
275+
postProcessor: costManagementPostProcessor,
276+
},
365277
{
366278
basePath: 'customerlockbox/resource-manager',
367279
namespace: 'Microsoft.CustomerLockbox',
@@ -511,6 +423,20 @@ const autoGenList: AutoGenConfig[] = [
511423
basePath: 'iotspaces/resource-manager',
512424
namespace: 'Microsoft.IoTSpaces',
513425
},
426+
{
427+
basePath: 'iotsecurity/resource-manager',
428+
namespace: 'Microsoft.IoTSecurity',
429+
resourceConfig: [
430+
{
431+
type: 'sensors',
432+
scopes: ScopeType.Extension,
433+
},
434+
{
435+
type: 'sites',
436+
scopes: ScopeType.Extension,
437+
}
438+
]
439+
},
514440
{
515441
basePath: 'intune/resource-manager',
516442
namespace: 'Microsoft.Intune',
@@ -650,6 +576,25 @@ const autoGenList: AutoGenConfig[] = [
650576
basePath: 'powerbiembedded/resource-manager',
651577
namespace: 'Microsoft.PowerBI',
652578
},
579+
{
580+
basePath: 'providerhub/resource-manager',
581+
namespace: 'Microsoft.ProviderHub',
582+
postProcessor: providerHubPostProcessor
583+
},
584+
{
585+
basePath: 'quota/resource-manager',
586+
namespace: 'Microsoft.Quota',
587+
resourceConfig: [
588+
{
589+
type: 'quotaLimits',
590+
scopes: ScopeType.Extension,
591+
},
592+
{
593+
type: 'quotas',
594+
scopes: ScopeType.Extension,
595+
},
596+
],
597+
},
653598
{
654599
basePath: 'redhatopenshift/resource-manager',
655600
namespace: 'Microsoft.RedHatOpenShift',
@@ -689,6 +634,10 @@ const autoGenList: AutoGenConfig[] = [
689634
type: 'policyExemptions',
690635
scopes: ScopeType.ManagementGroup | ScopeType.Subcription | ScopeType.ResourceGroup | ScopeType.Extension,
691636
},
637+
{
638+
type: 'policyPricings',
639+
scopes: ScopeType.ManagementGroup | ScopeType.Subcription,
640+
},
692641
{
693642
type: 'locks',
694643
scopes: ScopeType.Subcription | ScopeType.ResourceGroup | ScopeType.Extension,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { SchemaPostProcessor } from '../models';
2+
import { replaceCyclicRef } from './helpers';
3+
4+
export const postProcessor: SchemaPostProcessor = async (namespace: string, apiVersion: string, schema: any) => {
5+
replaceCyclicRef(schema.definitions?.ReportConfigFilter?.properties?.and?.oneOf[0]?.items);
6+
replaceCyclicRef(schema.definitions?.ReportConfigFilter?.properties?.not?.oneOf[0]);
7+
replaceCyclicRef(schema.definitions?.ReportConfigFilter?.properties?.or?.oneOf[0]?.items);
8+
replaceCyclicRef(schema.definitions?.ReportFilter?.properties?.and?.oneOf[0]?.items);
9+
replaceCyclicRef(schema.definitions?.ReportFilter?.properties?.not?.oneOf[0]);
10+
replaceCyclicRef(schema.definitions?.ReportFilter?.properties?.or?.oneOf[0]?.items);
11+
replaceCyclicRef(schema.definitions?.QueryFilter?.properties?.and?.oneOf[0]?.items);
12+
replaceCyclicRef(schema.definitions?.QueryFilter?.properties?.not?.oneOf[0]);
13+
replaceCyclicRef(schema.definitions?.QueryFilter?.properties?.or?.oneOf[0]?.items);
14+
replaceCyclicRef(schema.definitions?.QueryFilterModel?.properties?.and?.oneOf[0]?.items);
15+
replaceCyclicRef(schema.definitions?.QueryFilterModel?.properties?.not?.oneOf[0]);
16+
replaceCyclicRef(schema.definitions?.QueryFilterModel?.properties?.or?.oneOf[0]?.items);
17+
replaceCyclicRef(schema.definitions?.Scope?.properties?.childScope?.oneOf[0]);
18+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { SchemaPostProcessor } from '../models';
2+
import { replaceCyclicRef } from './helpers';
3+
4+
export const postProcessor: SchemaPostProcessor = async (namespace: string, apiVersion: string, schema: any) => {
5+
replaceCyclicRef(schema.definitions?.ExtendedErrorInfo?.properties?.details?.oneOf[0]?.items);
6+
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
{
2+
"id": "https://schema.management.azure.com/schemas/2015-06-01/Microsoft.MarketplaceOrdering.json#",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"title": "Microsoft.MarketplaceOrdering",
5+
"description": "Microsoft MarketplaceOrdering Resource Types",
6+
"resourceDefinitions": {},
7+
"subscription_resourceDefinitions": {
8+
"offerTypes_publishers_offers_plans_agreements": {
9+
"type": "object",
10+
"properties": {
11+
"apiVersion": {
12+
"type": "string",
13+
"enum": [
14+
"2015-06-01"
15+
]
16+
},
17+
"name": {
18+
"oneOf": [
19+
{
20+
"type": "string",
21+
"pattern": "^.*/current$"
22+
},
23+
{
24+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
25+
}
26+
]
27+
},
28+
"properties": {
29+
"oneOf": [
30+
{
31+
"$ref": "#/definitions/AgreementProperties"
32+
},
33+
{
34+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
35+
}
36+
],
37+
"description": "Agreement Terms definition"
38+
},
39+
"type": {
40+
"type": "string",
41+
"enum": [
42+
"Microsoft.MarketplaceOrdering/offerTypes/publishers/offers/plans/agreements"
43+
]
44+
}
45+
},
46+
"required": [
47+
"apiVersion",
48+
"name",
49+
"properties",
50+
"type"
51+
],
52+
"description": "Microsoft.MarketplaceOrdering/offerTypes/publishers/offers/plans/agreements"
53+
}
54+
},
55+
"definitions": {
56+
"AgreementProperties": {
57+
"type": "object",
58+
"properties": {
59+
"accepted": {
60+
"oneOf": [
61+
{
62+
"type": "boolean"
63+
},
64+
{
65+
"$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression"
66+
}
67+
],
68+
"description": "If any version of the terms have been accepted, otherwise false."
69+
},
70+
"licenseTextLink": {
71+
"type": "string",
72+
"description": "Link to HTML with Microsoft and Publisher terms."
73+
},
74+
"plan": {
75+
"type": "string",
76+
"description": "Plan identifier string of image being deployed."
77+
},
78+
"privacyPolicyLink": {
79+
"type": "string",
80+
"description": "Link to the privacy policy of the publisher."
81+
},
82+
"product": {
83+
"type": "string",
84+
"description": "Offer identifier string of image being deployed."
85+
},
86+
"publisher": {
87+
"type": "string",
88+
"description": "Publisher identifier string of image being deployed."
89+
},
90+
"retrieveDatetime": {
91+
"type": "string",
92+
"format": "date-time",
93+
"description": "Date and time in UTC of when the terms were accepted. This is empty if Accepted is false."
94+
},
95+
"signature": {
96+
"type": "string",
97+
"description": "Terms signature."
98+
}
99+
},
100+
"description": "Agreement Terms definition"
101+
}
102+
}
103+
}

0 commit comments

Comments
 (0)