Azure / Azure/azure-cli

[Stream Analytics] Bugs related to clusterid property

Open
#22,990 4 comments 0 reactions 1 assignee Assigned to @jsntcy View on GitHub
Auto-Assign Service Attention Stream Analytics
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Related command**
az stream-analytics job update

In our [streaming job definition](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/streamanalytics/resource-manager/Microsoft.StreamAnalytics/stable/2020-03-01/streamingjobs.json#:~:text=%7D%2C-,%22cluster%22%3A%20%7B,%7D%2C,-%22Sku%22%3A%20%7B), we have the following nested cluster and id properties:
```
"properties": {
"cluster": {
"id": "subscriptions/{mysub}/resourceGroup/{myrg}/etc..."
}
}
```

**Describe the bug**
1. In the CLI, this cluster id property gets translated into just id:
o az stream-analytics job update --job-name 'asa-fleide-large396' --resource-group $rg **--id** $clusterId
We think this is a possible source of confusion for the user -- because this command is an operation on the job, it's reasonable to infer that id is the job id, not the cluster id. Could we possible change this parameter to clusterid?

2. Another possible scenario is that the user should be able to set this id value to null. I tried to do this via CLI (setting the value to null or empty string), but got the following error:
```
(LinkedInvalidPropertyId) Property id '' at path 'properties.cluster.id' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
Code: LinkedInvalidPropertyId
Message: Property id '' at path 'properties.cluster.id' is invalid. Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'.
```
Is there another way to set it this property to null? If not, can we remove this validation?

**To Reproduce**
1. az stream-analytics job update --job-name 'asa-fleide-large396' --resource-group $rg --id $clusterId
2. az stream-analytics job update --job-name 'asa-fleide-large396' --resource-group $rg --id ""

**Expected behavior**
1. property name is clusterid instead of id
2. user able to set id value to null

**Environment summary**

**Additional context**

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.