Azure / Azure/azure-cli-extensions

az monitor app-insights workbook create | Can't create workbook with serialized-data, too long for CLI

Open
#8,422 1 comment 1 reaction 1 assignee Claimed by @AllyW View on GitHub
Auto-Assign Azure CLI Team customer-reported Monitor question
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Describe the bug

We are unable to create a pre-populated workbook using the Azure CLI due to the serialized data for the workbook being too long for the CLI tool.

The command returns an error status and the following output:

> The command line is too long.

This error might originate from the shell itself. This command is being executed from Windows 11.

The input we are passing in, minified, is more than 28000 characters long and is a fairly large workbook. It is being passed in via the `--serialized-data` CLI parameter.

### Related command

```shell
az monitor app-insights workbook create \
--resource-name $uuid \
--resource-group $rg \
--kind shared \
--category workbook \
--display-name test \
--source-id '/subscriptions/.../resourceGroups/.../providers/Microsoft.Insights/components/...' \
--serialized-data $data
```

### Errors

```
The command line is too long.
```

### Issue script & Debug output

```
The command line is too long.
```

There is no other output. It's possible this error originates from the shell itself.

### Expected behavior

I think passing in this much data via the CLI is expected to result in an error. Instead, I would expect to be able to pass in the serialized data through some other means, such as via stdin or a file.

### Environment Summary

azure-cli 2.68.0

core 2.68.0
telemetry 1.1.0

Extensions:
application-insights 1.2.2
bastion 1.1.0

Dependencies:
msal 1.31.1
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\redacted\.azure\cliextensions'

Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

### Additional context

Adding a `--serialized-data-file` argument or accepting a special value to pipe in the serialized data via stdin would likely resolve this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.