1 | initial version |
To stop a classic service using Azure REST API, you will need to follow these steps:
Authenticate and obtain an Access Token to use Azure REST API.
Send a DELETE request to the following endpoint using the obtained Access Token:
https://management.core.windows.net/{subscription-id}/services/hostedservices/{cloud-service}/deployments/{deployment-name}
Replace {subscription-id}
with your Subscription ID, {cloud-service}
with the name of the cloud service and {deployment-name}
with the name of the deployment.
Content-Type: application/xml
x-ms-version: 2015-04-01
Authorization: Bearer {Access-Token}
Replace {Access-Token}
with the Access Token obtained in Step 1.
<DeleteDeployment xmlns="http://schemas.microsoft.com/windowsazure">
<deleteAllRoles>true</deleteAllRoles>
</DeleteDeployment>
This XML specifies that all roles should be deleted along with the deployment.
If the request is successful, you will receive a 200 OK response indicating that the deployment has been deleted.