I am trying to create a database in SQL server under a subscription and its resource group through Python code, the response I get in the code is 202 but upon checking the logs, it shows failed. I am trying to copy the database from another sub and its sql resource group. Below is the status message:
"statusMessage": "{\"status\":\"Failed\",\"error\":{\"code\":\"ResourceOperationFailure\",\"message\":\"The resource operation completed with terminal provisioning state 'Failed'.\",\"details\":[{\"code\":\"ProvisioningDisabled\",\"message\":\"The specified max size is invalid.\"}]}}"
here is the code that i am using :
db = Database(location=self.server_location,
sku=Sku(name='GP_gen5',
capacity='4'),
create_mode='copy',
source_database_id=snap_db.database_resource_id,
tags=default_tags(pod),
collation='Latin1_General_100_CI_AS')
sql_client.databases.create_or_update(self.resource_group_name,
self.database_host_name,
self.database_name,
db,
polling=False)