sbm-eval / Secret_Breach-Survey

0 stars 0 forks source link

Issue 1 #184

Open BarneyStinson73 opened 1 month ago

BarneyStinson73 commented 1 month ago

Trying to create a SQL VM with auto backup enabled, but getting a 400 error with code BackupScheduleTypeNotSet, despite backupScheduleType being specified in the request.

Request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-mssql-210108235644463787/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/acctest-VM-210108235644463787?api-version=2017-03-01-preview

{
    "location": "westeurope",
    "properties": {
        "autoBackupSettings": {
            "enable": true,
            "enableEncryption": false,
            "retentionPeriod": 21,
            "storageAccountUrl": My Storage acc url,
            "storageAccessKey": Access key,
            "password": My password,
            "backupSystemDbs": false,
            "backupScheduleType": "Automated",
            "fullBackupFrequency": "Weekly",
            "fullBackupStartTime": 0,
            "fullBackupWindowHours": 0,
            "logBackupFrequency": 0
        },
        "serverConfigurationsManagementSettings": {
            "sqlConnectivityUpdateSettings": {
                "connectivityType": "PRIVATE",
                "port": 1433,
                "sqlAuthUpdateUserName": Updated user name,
                "sqlAuthUpdatePassword": Updated pass
            },
            "additionalFeaturesServerConfigurations": {
                "isRServicesEnabled": false
            }
        },
        "sqlManagement": "Full",
        "sqlServerLicenseType": "PAYG",
        "virtualMachineResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-mssql-210108235644463787/providers/Microsoft.Compute/virtualMachines/acctest-VM-210108235644463787"
    },
    "tags": {}
}

Response

400 Bad Request

{
    "error": {
        "code": "BackupScheduleTypeNotSet",
        "message": "Backup schedule type needs to be set."
    }
}