-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
- Package Name: azure-mgmt-postgresqlflexibleservers
- Package Version: 2.0.0
- Operating System: Windows 11
- Python Version: 3.10
Describe the bug
A clear and concise description of what the bug is.
After the major change to 2.0.0 I am testing my script and receiving the following error message:
Invalid value given for parameter Tier from the class 'azure.core.exceptions.HttpResponseError'.
The tier values are provided for SKU and Storage. The error appeared after I have changed the code for the server creation from begin_create to begin_create_and_update. The begin_update function was also updated and that works fine with the same parametrisation.
By debugging the code I can see, that the SKU tier is Bustable and the Storage is serialized to P1 value.
The documentation in the Python SDK reference seems not to be updated, but based on the code the change can be implemented more or less straight forward.
The error message is not referring which Tire argument is None more precisely.
(<class 'azure.core.exceptions.HttpResponseError'>, HttpResponseError('(InvalidParameterValue) Invalid value given for parameter Tier. Specify a valid parameter value.\nCode: InvalidParameterValue\nMessage: Invalid value given for parameter Tier. Specify a valid parameter value.'), <traceback object at 0x000001C62954C1C0>)
'(InvalidParameterValue) Invalid value given for parameter Tier. Specify a valid parameter value.
Code: InvalidParameterValue
Message: Invalid value given for parameter Tier. Specify a valid parameter value., NoneType: None'
The serialized json content sent is based on debugging looks similar
{'location': 'westeurope', 'properties': {'administratorLogin': 'dbpostgres', 'administratorLoginPassword': 'something', 'authConfig': {'activeDirectoryAuth': 'Enabled', 'passwordAuth': 'Enabled', 'tenantId': ''}, 'availabilityZone': '', 'backup': {'backupRetentionDays': 7, 'geoRedundantBackup': 'Enabled'}, 'createMode': 'Create', 'highAvailability': {'standbyAvailabilityZone': ''}, 'maintenanceWindow': {'customWindow': 'Disabled', 'dayOfWeek': 0, 'startHour': 0, 'startMinute': 0}, 'network': {'delegatedSubnetResourceId': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/common/providers/Microsoft.Network/virtualNetworks/vNet1/subnets/build-postgres-subnet', 'privateDnsZoneArmResourceId': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/platform-rg/providers/Microsoft.Network/privateDnsZones/flexible.private.postgres.database.azure.com', 'publicNetworkAccess': 'Disabled'}, 'storage': {'storageSizeGB': 32, 'tier': 'P1'}, 'version': '11'}, 'sku': {'name': 'Standard_B1ms', 'tier': 'Burstable'}}
To Reproduce
Steps to reproduce the behavior:
- I am trying to create a flexible server to test the code after the major change.
Expected behavior
A clear and concise description of what you expected to happen.
The request is accepted to create the server.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.