Comments (4)
Hit the same issue today, ResourceGroup got completely ignored and all the machines in the subscription got affected.
As per docs in here, this should work:
In the request body, if you want to manage VMs for specific resource groups, modify the request body as shown in the following example. Each resource path specified must be separated by a comma. You can specify one resource group or more if required.
This example also demonstrates excluding a virtual machine. You can exclude the VM by specifying the VMs resource path or by wildcard.
{
"Action": "start",
"EnableClassic": false,
"RequestScopes": {
"Subscriptions": [
"/subscriptions/12345678-1234-5678-1234-123456781234/",
"/subscriptions/11111111-0000-1111-2222-444444444444/"
],
"ResourceGroups": [
"/subscriptions/12345678-1234-5678-1234-123456781234/resourceGroups/rg1/",
"/subscriptions/11111111-0000-1111-2222-444444444444/resourceGroups/rg2/"
],
"ExcludedVMLists": [
"/subscriptions/12345678-1234-5678-1234-123456781234/resourceGroups/vmrg1/providers/Microsoft.Compute/virtualMachines/vm1"
]
}
}
from startstopv2-deployments.
Dear gatti2602,
thank you for your answer. Glad (and sad the same time) that you hit the same problem. So it seems to be not on us.
Are holidays in the US, or why is nobody from MS answering this thread?
EDIT: Tried to update, but this
from startstopv2-deployments.
Are holidays in the US
There's Microsoft Build conference this week, which might explain some of this, but judging by lack of recent commits or answers to other issues, I'd hazard a guess that there's no longer a person assigned to it, sadly.
from startstopv2-deployments.
OK, I found a solution, or better an explanation. The main misunderstanding seems to come from a bad documentation and partially not working examples. Maybe it's also unintended behaviour of the function app. But we will never know, nobody is answering here.
Explanation:
"ResourceGroups" and "Subscriptions" logically expand "RequestScopes", they do not limit the scope. Means:
- If you name a subscription in "Subscriptions", all VMs in the subscription are targeted. Despite single named VMs or resource groups.
- If you name a resource group in "ResourceGroups", all VMs in the Resource group are targeted. Despite single named VMs.
Leaving "Subscriptions" blank or out, solved my problem:
{
"Action": "start",
"EnableClassic": false,
"RequestScopes": {
"ExcludedVMLists": [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/DEFAULT-STORAGE-WESTEUROPE/providers/Microsoft.Compute/virtualMachines/VM01",
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/DEFAULT-STORAGE-WESTEUROPE/providers/Microsoft.Compute/virtualMachines/VM08"
],
"ResourceGroups": [
"/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-Storage-WestEurope/"
]
}
}
from startstopv2-deployments.
Related Issues (20)
- New to Azure HOT 4
- Stop all VM in subscription HOT 3
- Excessive Azure Function consumption HOT 1
- Tag-based schedules HOT 1
- region deployment
- Deployment using Classic Application Insight HOT 1
- Scheduled VM's start/stop is ignored HOT 2
- Extend StartStopVMs-FA
- No logic apps created HOT 1
- Create example on how to enable/disable a VM Monitor Alert for Availability
- unable to use resource group with "." in name HOT 2
- Dashboard not showing statistics.
- Empty Dashboard HOT 4
- Get Latest Version (Existing Users) link is broken HOT 2
- AutoStop fails with a 409 Conflict warning and BadRequest error in CreateAutoStopAlertExecutor HOT 1
- ATTENTION Project is erroneous and no longer supported by Github issues
- Template needs updating to conform to current standards HOT 1
- Use for other Subscriptions HOT 1
- Warning - excessive functions use and cost HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from startstopv2-deployments.