Stopping/Susspending cloud service without deleting it

Z A 101 Reputation points
2021-08-05T16:27:51.96+00:00

I am trying to stop a cloud service and from azure portal it suspends the slot but if I try to stop it from cli it will automatically delete it
Here is the command that I used
Invoke-AzResourceAction -ResourceId: /subscriptions/_subscription_id_/resourceGroups/_resource_group_/providers/Microsoft.ClassicCompute/domainNames/_cloud_service_/slots/Production -Action: stop -Force

Am I missing something?
Or is there any other way to stop the cloud service from powershell?

Azure Cloud Services
Azure Cloud Services
An Azure platform as a service offer that is used to deploy web and cloud applications.
742 questions
0 comments No comments
{count} votes

Accepted answer
  1. Z A 101 Reputation points
    2021-08-06T10:06:54.447+00:00

    manage to suspend it with:
    Invoke-AzResourceAction -ResourceGroupName resource_group -ResourceType 'Microsoft.ClassicCompute/domainNames/slots' -ResourceName cloud_service/Production -ApiVersion '2018-06-01' -Action 'Stop' -Force

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.