'int' object is not subscriptable when trying to create autoscale profile for recurrence
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
### **This is autogenerated. Please review and update as needed.**
## Describe the bug
When trying to create a recurrence profile using --recurrence week sat sun or any combination of days throws the below error. It does not happen when creating a profile with a start date and end date, seems to be confined to recurrence.
**Command Name**
`az monitor autoscale profile create`
**Errors:**
```
'int' object is not subscriptable
Traceback (most recent call last):
Lib\site-packages\knack\cli.py, ln 231, in invoke
cli\core\commands\__init__.py, ln 657, in execute
cli\core\commands\__init__.py, ln 720, in _run_jobs_serially
cli\core\commands\__init__.py, ln 712, in _run_job
...
cli\core\commands\__init__.py, ln 691, in _run_job
cli\core\commands\__init__.py, ln 328, in __call__
azure\cli\core\__init__.py, ln 807, in default_command_handler
command_modules\monitor\operations\autoscale_settings.py, ln 248, in autoscale_profile_create
command_modules\monitor\operations\autoscale_settings.py, ln 215, in _create_recurring_profile
cli\command_modules\monitor\_autoscale_util.py, ln 591, in build_autoscale_profile
TypeError: 'int' object is not subscriptable
```
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- _Put any pre-requisite steps here..._
- `az monitor autoscale profile create --autoscale-name {} --resource-group {} --name {} --count {} --timezone {} --recurrence {} {} {} {}`
## Expected Behavior
For it to create a recurrence scale setting
## Environment Summary
```
Windows-10-10.0.19041-SP0
Python 3.6.8
Installer: MSI
azure-cli 2.22.1
Extensions:
subscription 0.1.4
webapp 0.3.1
```
## Additional Context
Contributor guide
Assessment
This issue has not been assessed yet.