am not sure what mistake I have done, created the maintenance config successfully but while creating assignment giving following
Command I have used:
PS /home/user> $mc=Get-AZMaintenanceConfiguration -ResourceGroupName UE2PRD01RESOURCEGROUP -Name Dr01MainteanceConfig
PS /home/user> New-AzConfigurationAssignment -ConfigurationAssignmentName $mc.Name -MaintenanceConfigurationId $mc.Id -FilterLocation eastus2euap,centraluseuap -FilterOsType Windows -FilterTag '{"EnvironmentCode" : ["Dev01"] }' '{"EnvironmentType" : ["Development"] }'
New-AzConfigurationAssignment: 'resourceType' cannot be null.
PS /home/user> New-AzConfigurationAssignment -ConfigurationAssignmentName $mc.Name -MaintenanceConfigurationId $mc.Id -FilterLocation eastus2 -FilterOsType Windows -FilterTag '{"EnvironmentCode" : ["Dev01"] }' '{"EnvironmentType" : ["Development"] }'
New-AzConfigurationAssignment: 'resourceType' cannot be null.
PS /home/user> New-AzConfigurationAssignment -ConfigurationAssignmentName $mc.Name -MaintenanceConfigurationId $mc.Id -FilterLocation eastus2 -FilterOsType Windows -FilterTag '{"EnvironmentCode" : ["Dev01"] }' '{"EnvironmentType" : ["Development"] }' -Debug
I have enabled debug. please suggest
I have used debug
Logs:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Linux 5.10.102.2-microsoft-standard #1 SMP Mon Mar 7 17:36:34 UTC 2022 [2023-11-22 10:29:19Z - 9f2fb8e4-fb60-4bee-9460-87f6afe35c22]
=== Token Acquisition finished successfully:
DEBUG: False MSAL 4.49.1.0 MSAL.NetCore .NET 7.0.13 Linux 5.10.102.2-microsoft-standard #1 SMP Mon Mar 7 17:36:34 UTC 2022 [2023-11-22 10:29:19Z - 9f2fb8e4-fb60-4bee-9460-87f6afe35c22] AT expiration time: 11/22/2023 11:29:06 AM +00:00, scopes: https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default. source: Cache
DEBUG: SharedTokenCacheCredential.GetToken succeeded. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId: ExpiresOn: 2023-11-22T11:29:06.0000000+00:00
DEBUG: [Common.Authentication]: Received token with LoginType 'User', Tenant: 'xxx', UserId: 'test'
DEBUG: 10:29:19 AM - [ConfigManager] Got nothing from [DisableErrorRecordsPersistence], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: 10:29:19 AM - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = [].
New-AzConfigurationAssignment: 'resourceType' cannot be null.
DEBUG: 10:29:19 AM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:29:19 AM - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 10:29:19 AM - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: AzureQoSEvent: Module: Az.Maintenance:1.4.0; CommandName: New-AzConfigurationAssignment; PSVersion: 7.3.9; IsSuccess: False; Duration: 00:00:02.5565269; Exception: 'resourceType' cannot be null.;
DEBUG: 10:29:19 AM - NewAzureRmConfigurationAssignment end processing.