Error when Creating Backup Policies: Invalid NO_PARAM Value

Sanket Ghorpade 0 Reputation points
2024-10-22T08:38:14.71+00:00

Encountering the following error during Bicep deployment for creating Backup Policies:

"details": [
      {
        "code": "UserErrorInvalidRequestParameter",
        "message": "Parameter NO_PARAM in request is invalid. Please provide correct value for parameter NO_PARAM"
      }
    ]

Assistance is needed to identify what might be missing.

Using the following version from the documentation: Backup Policies Documentation.

Here are the parameters for the backup policy:

param utcValue9PM = '2024-10-21T21:00:00.000Z'

@description('Parameters for the File backup policy')
param paramFileBackupPolicy = {
  properties: {
        backupManagementType: 'AzureStorage'
        workloadType: 'AzureFileShare'
        schedulePolicy: {
          schedulePolicyType: 'SimpleSchedulePolicyV2'
          scheduleRunFrequency: 'Daily'
          dailySchedule: {
            scheduleRunTimes: [
              utcValue9PM
            ]
          }
        }
        timeZone: 'W. Europe Standard Time'
        retentionPolicy: {
          retentionPolicyType: 'LongTermRetentionPolicy'
          dailySchedule: {
            retentionTimes: [
              utcValue9PM
            ]
            retentionDuration: {
              count: 30
              durationType: 'Days'
            }
          }
        }
        vaultRetentionPolicy : {
          snapshotRetentionInDays: 90
          vaultRetention: {
            retentionPolicyType: 'SimpleRetentionPolicy'
            retentionDuration: {
              count: 30
              durationType: 'Days'
            }
          }
        }
      }
}

@description('Array of parameters for multiple Recovery Services Vaults')
param paramsRecoveryServicesVaults = [
  {
    name: 'file'
    environment: 'o'
    backupConfig: {
      softDeleteFeatureState: 'Enabled'
      enhancedSecurityState: 'Disabled'
    }
    backupPolicies: paramFileBackupPolicy
    redundancySettings: {
      storageModelType: 'GeoRedundant'
      crossRegionRestore: 'Enabled'
    }
    monitoringSettings: {
      useOnlyAzureMonitorAlertsForBackup: true
      useOnlyAzureMonitorAlertsForSiteRecovery: true
      azureMonitorAlertForAllFailoverIssues: 'Disabled'
      azureMonitorAlertForAllJobFailures: 'Enabled'
      azureMonitorAlertForAllReplicationIssues: 'Disabled'
    }
    publicNetworkAccess: 'Enabled'
    softDeleteSettings: {
      softDeleteRetentionPeriodInDays: 14
      softDeleteState: 'Enabled' 
      enhancedSecurityState: 'Disabled'
    }
    crossSubscriptionRestoreState: 'Enabled'
    immutabilityState: 'Unlocked'
  }
]

Passing this parameter to the backup policy module:

resource backupPolicy 'Microsoft.RecoveryServices/vaults/backupPolicies@2024-04-01' = {
  parent: recoveryServicesVault
  name: paramsRecoveryServicesVault.backupPolicies.name
  properties: paramsRecoveryServicesVault.backupPolicies.properties
}
Azure Backup
Azure Backup
An Azure backup service that provides built-in management at scale.
1,286 questions
Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,307 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.