Restore Azure webapp Slot into another slot via Python SDK

DICKSON Dikizeyiko 1 Reputation point
2021-06-14T09:40:41.45+00:00

Hello,

I currently have a webapp MyWebApp and two slots named OldDev and NewDev.

I try to restore the slot OldDev in the slot NewDev but I always get a conflict error saying that the slot OldDev already exists. Here is my snippet of code

SNIPPET OF CODE

webapp_client.web_apps.begin_restore_slot(
    resource_group_name="myResourceGroup",
    name="MyWebApp",
    backup_id=100,
    slot="OldDev",
    request={
        "kind": "app,linux",
        "properties": {
            "storageAccountUrl": "storageAccountUrl",
            "overwrite": False,
            "ignoreDatabases": True,
            "ignoreConflictingHostNames": True,
            "siteName": 'MyWebApp/NewDev',
            "operationType": {
                "Relocation": 'MyWebApp/NewDev'
            }
        }
    }
)

Response message

Website with given name MyWebApp(OldDev) already exists.

Do You have any ideas of what's wrong in my code?

Thanks in advance

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,963 questions
{count} votes