CLI - Array of object feature request
- Dominant language
- Python
- Stars
- 27
- Forks
- 77
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 3
Description
CLI - Array of object feature request
The multiple addition/deletion feature is not supported by the aaz-dev-tool subcommand's current version. That is, when I use a subcommand to construct, for example, `az eventhubs namespace encryption add`, we can only add one encryption attribute at a time.
Therefore, in order to avoid this, we have built custom code. For example, I added the cli_add_encryption method. https://github.com/schaudhari6254888/azure-cli/blob/cccd800d7c631dbc33e9710719bfe6a3ea142fb1/src/azure-cli/azure/cli/command_modules/eventhubs/operations/namespace_custom.py#L90
However, if we can construct this Array of objects using a tool, for example, look at this swagger file.
https://github.com/schaudhari6254888/azure-rest-api-specs/blob/6c6b16dc98d720304633b76c8e82c282ffa9cc08/specification/eventhub/resource-manager/Microsoft.EventHub/preview/2022-10-01-preview/namespaces-preview.json#L915
**keyVaultProperties** is an array of objects containing keyName, keyVaultURI, KeyVersion, and Identity. So the encryption add subcommand should take this `keyVaultProperties` as an array of objects, allowing us to handle multiple addition of encryption for the `add` subcommand.
Similarly, for the delete subcommand operation, we may use **x-ms-identifier**=['properties/keyVaultProperties'] to identify the deletion to be done on **keyVaultProperties** only.
for ex - `az eventhubs namespace encryption remove --resource-group {rg} --namespace-name {namespacename} --encryption-config key-name={key2} key-vault-uri={key_uri} user-assigned-identity={id1} --encryption-config key-name={key3} key-vault-uri={key_uri} user-assigned-identity={id1}`
This way, we can simplify the subcommands and avoid future custom code.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.