@@ -35,7 +35,10 @@ internal sealed class ResourceExportVisitor
35
35
36
36
private const string TYPE_CONTAINERSERVICE_MANAGEDCLUSTERS = "Microsoft.ContainerService/managedClusters" ;
37
37
private const string TYPE_CONTAINERREGISTRY_REGISTRIES = "Microsoft.ContainerRegistry/registries" ;
38
+ private const string TYPE_CONTAINERREGISTRY_REGISTRIES_LISTUSAGES = "Microsoft.ContainerRegistry/registries/listUsages" ;
39
+ private const string TYPE_CDN_PROFILES = "Microsoft.Cdn/profiles" ;
38
40
private const string TYPE_CDN_PROFILES_ENDPOINTS = "Microsoft.Cdn/profiles/endpoints" ;
41
+ private const string TYPE_CDN_PROFILES_AFDENDPOINTS = "Microsoft.Cdn/profiles/afdEndpoints" ;
39
42
private const string TYPE_AUTOMATION_ACCOUNTS = "Microsoft.Automation/automationAccounts" ;
40
43
private const string TYPE_APIMANAGEMENT_SERVICE = "Microsoft.ApiManagement/service" ;
41
44
private const string TYPE_SQL_SERVERS = "Microsoft.Sql/servers" ;
@@ -75,7 +78,6 @@ internal sealed class ResourceExportVisitor
75
78
private const string APIVERSION_2016_09_01 = "2016-09-01" ;
76
79
private const string APIVERSION_2017_12_01 = "2017-12-01" ;
77
80
private const string APIVERSION_2021_05_01_PREVIEW = "2021-05-01-preview" ;
78
- private const string APIVERSION_2021_06_01 = "2021-06-01" ;
79
81
private const string APIVERSION_2021_11_01 = "2021-11-01" ;
80
82
private const string APIVERSION_2022_07_01 = "2022-07-01" ;
81
83
private const string APIVERSION_2022_08_01 = "2022-08-01" ;
@@ -84,6 +86,7 @@ internal sealed class ResourceExportVisitor
84
86
private const string APIVERSION_2022_09_10 = "2022-09-10" ;
85
87
private const string APIVERSION_2022_05_01 = "2022-05-01" ;
86
88
private const string APIVERSION_2023_04_01 = "2023-04-01" ;
89
+ private const string APIVERSION_2023_05_01 = "2023-05-01" ;
87
90
88
91
private readonly ProviderData _ProviderData ;
89
92
@@ -146,6 +149,8 @@ private async Task<bool> ExpandResource(IResourceExportContext context, JObject
146
149
await VisitAPIManagement ( resourceContext , resource , resourceType , resourceId ) ||
147
150
await VisitAutomationAccount ( resourceContext , resource , resourceType , resourceId ) ||
148
151
await VisitCDNEndpoint ( resourceContext , resource , resourceType , resourceId ) ||
152
+ await VisitCDNProfile ( resourceContext , resource , resourceType , resourceId ) ||
153
+ await VisitFrontDoorEndpoint ( resourceContext , resource , resourceType , resourceId ) ||
149
154
await VisitContainerRegistry ( resourceContext , resource , resourceType , resourceId ) ||
150
155
await VisitAKSCluster ( resourceContext , resource , resourceType , resourceId ) ||
151
156
await VisitSqlServers ( resourceContext , resource , resourceType , resourceId ) ||
@@ -237,7 +242,8 @@ private static async Task<bool> VisitDevCenterProject(ResourceContext context, J
237
242
var pools = await GetSubResourcesByType ( context , resourceId , "pools" , APIVERSION_2023_04_01 ) ;
238
243
foreach ( var pool in pools )
239
244
{
240
- AddSubResource ( pool , await GetSubResourcesByType ( context , resourceId , "schedules" , APIVERSION_2023_04_01 ) ) ;
245
+ if ( pool . TryStringProperty ( PROPERTY_ID , out var poolId ) )
246
+ AddSubResource ( pool , await GetSubResourcesByType ( context , poolId , "schedules" , APIVERSION_2023_04_01 ) ) ;
241
247
}
242
248
AddSubResource ( resource , pools ) ;
243
249
@@ -297,6 +303,15 @@ private static async Task<bool> VisitFrontDoorClassic(ResourceContext context, J
297
303
return true ;
298
304
}
299
305
306
+ private static async Task < bool > VisitFrontDoorEndpoint ( ResourceContext context , JObject resource , string resourceType , string resourceId )
307
+ {
308
+ if ( ! string . Equals ( resourceType , TYPE_CDN_PROFILES_AFDENDPOINTS , StringComparison . OrdinalIgnoreCase ) )
309
+ return false ;
310
+
311
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "routes" , APIVERSION_2023_05_01 ) ) ;
312
+ return true ;
313
+ }
314
+
300
315
private static async Task < bool > VisitKeyVault ( ResourceContext context , JObject resource , string resourceType , string resourceId )
301
316
{
302
317
if ( ! string . Equals ( resourceType , TYPE_KEYVAULT_VAULT , StringComparison . OrdinalIgnoreCase ) )
@@ -454,9 +469,16 @@ private static async Task<bool> VisitContainerRegistry(ResourceContext context,
454
469
if ( ! string . Equals ( resourceType , TYPE_CONTAINERREGISTRY_REGISTRIES , StringComparison . OrdinalIgnoreCase ) )
455
470
return false ;
456
471
457
- AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "replications" , "2022-02-01-preview" ) ) ;
458
- AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "webhooks" , "2022-02-01-preview" ) ) ;
459
- AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "tasks" , "2019-06-01-preview" ) ) ;
472
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "replications" , "2023-01-01-preview" ) ) ;
473
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "webhooks" , "2023-01-01-preview" ) ) ;
474
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "tasks" , "2019-04-01" ) ) ;
475
+
476
+ // Handle usage information that does not include a strong type.
477
+ foreach ( var usage in await GetSubResourcesByType ( context , resourceId , "listUsages" , "2023-01-01-preview" ) )
478
+ {
479
+ usage [ PROPERTY_TYPE ] = TYPE_CONTAINERREGISTRY_REGISTRIES_LISTUSAGES ;
480
+ AddSubResource ( resource , usage ) ;
481
+ }
460
482
return true ;
461
483
}
462
484
@@ -465,7 +487,23 @@ private static async Task<bool> VisitCDNEndpoint(ResourceContext context, JObjec
465
487
if ( ! string . Equals ( resourceType , TYPE_CDN_PROFILES_ENDPOINTS , StringComparison . OrdinalIgnoreCase ) )
466
488
return false ;
467
489
468
- AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "customDomains" , APIVERSION_2021_06_01 ) ) ;
490
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "customDomains" , APIVERSION_2023_05_01 ) ) ;
491
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "originGroups" , APIVERSION_2023_05_01 ) ) ;
492
+
493
+ await GetDiagnosticSettings ( context , resource , resourceId ) ;
494
+ return true ;
495
+ }
496
+
497
+ private static async Task < bool > VisitCDNProfile ( ResourceContext context , JObject resource , string resourceType , string resourceId )
498
+ {
499
+ if ( ! string . Equals ( resourceType , TYPE_CDN_PROFILES , StringComparison . OrdinalIgnoreCase ) )
500
+ return false ;
501
+
502
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "customDomains" , APIVERSION_2023_05_01 ) ) ;
503
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "originGroups" , APIVERSION_2023_05_01 ) ) ;
504
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "ruleSets" , APIVERSION_2023_05_01 ) ) ;
505
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "secrets" , APIVERSION_2023_05_01 ) ) ;
506
+ AddSubResource ( resource , await GetSubResourcesByType ( context , resourceId , "securityPolicies" , APIVERSION_2023_05_01 ) ) ;
469
507
return true ;
470
508
}
471
509
0 commit comments