azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az logic workflow update --set unrecognized arguments

Open staycool13 opened this issue 10 months ago • 6 comments

Describe the bug

I'm currently using Logic App Consumption and I'm trying to update one specific value in a definition of that logic app using Azure CLI

below is the json shows when I executed az logic workflow show

{ "accessControl": null, "accessEndpoint": "", "changedTime": "0", "createdTime": "", "definition": { "$schema": "https://schema.management.azure.com/", "actions": { "Initialize_variable": { "inputs": { "variables": [ { "name": "set", "type": "string", "value": "" } ] } } } }

I'm trying to update the value under definition > actions > Initialize_variable.inputs.variables > input > variables > array index 0 > value

here's the Azure CLI I'm using - az-logic-workflow-update image

When I tried using --set command this is the response I received unrecognized arguments: --set definition.actions.Initialize_variable.inputs.variables[0].value=MyValue

This is the command I used. az logic workflow update --resource-group $resourceGroupName --name $logicConsumptionName --set definition.actions.Initialize_variable.inputs.variables[0].value=MyValue

Could you guide me on how to use --set command please.

Related command

az logic workflow update

Errors

unrecognized arguments: --set

Issue script & Debug output

cli.knack.cli: Command arguments: ['logic', 'workflow', 'update', '--resource-group', '$resourceGroup', '--name', '$logicConsumptionName', '--set', 'definition.actions.Initialize_variable.inputs.variables[0].value=MyValue', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001C88553B9C0>, <function OutputProducer.on_global_arguments at 0x000001C8856C6160>, <function CLIQuery.on_global_arguments at 0x000001C8856F3CE0>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'logic': ['azext_logic'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: Total (0) 0.000 0 0 cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next'] cli.azure.cli.core: Loading extensions: cli.azure.cli.core: Name Load Time Groups Commands Directory cli.azure.cli.core: logic 0.477 4 13 C:\Users\user.azure\cliextensions\logic cli.azure.cli.core: Total (1) 0.477 4 13
cli.azure.cli.core: Loaded 4 groups, 13 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : logic workflow update cli.azure.cli.core: Command table: logic workflow update cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001C88718EFC0>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\user.azure\commands\2024-04-19.03-08-53.logic_workflow_update.22964.log'. az_command_data_logger: command args: logic workflow update --resource-group {} --name {} --set {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000001C88719E700>] cli.knack.commands: Configured default '$resourceGroup' for arg resource_group_name cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001C8871DD4E0>, <function register_cache_arguments..add_cache_arguments at 0x000001C8871DD620>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.azure.cli.core.command_recommender: "--set" is an invalid parameter for command "logic workflow update". urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443 urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22logic+workflow+update%22%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.59.0%22%2C+%22errorType%22%3A+%22UnrecognizedArguments%22%2C+%22correlationId%22%3A+%22d421cd3a-1b69-470e-94b5-6c6e23e7bd8a%22%2C+%22subscriptionId%22%3A+%2200621a3c-4c64-4d88-8821-cfe7c63bd3fe%22%2C+%22eventId%22%3A+%22d289923a-9af0-4d4f-9fb1-a5ffc71dd335%22%7D HTTP/1.1" 200 None cli.azure.cli.core.command_recommender: "--set" is an invalid parameter for command "logic workflow update". cli.azure.cli.core.azclierror: NoneType: None

cli.azure.cli.core.azclierror: unrecognized arguments: --set definition.actions.Initialize_variable.inputs.variables[0].value=MyValue az_command_data_logger: unrecognized arguments: --set definition.actions.Initialize_variable.inputs.variables[0].value=MyValue

Examples from AI knowledge base: https://aka.ms/cli_ref Read more about the command in reference docs cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001C88718F240>] az_command_data_logger: exit code: 2 cli.main: Command ran in 2.397 seconds (init: 0.867, invoke: 1.530) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 3765 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\user.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

This should update the definition schema of my initialize variable

Environment Summary

azure-cli 2.52.0
core 2.52.0 telemetry 1.1.0

Additional context

No response

staycool13 avatar Apr 18 '24 17:04 staycool13

Hi @staycool13,

2.52.0 is not the latest Azure CLI(2.59.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

Thank you for opening this issue, we will look into it.

yonzhan avatar Apr 18 '24 17:04 yonzhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @wsilveiranz.

Hi @staycool13,

2.52.0 is not the latest Azure CLI(2.59.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

still occurs in 2.59.0

staycool13 avatar Apr 18 '24 18:04 staycool13

updates anyone?

staycool13 avatar Apr 23 '24 18:04 staycool13

updates?

staycool13 avatar May 01 '24 17:05 staycool13

Hi @staycool13 , az logic workflow update belongs to the logic extension. Please check and update the extension by following https://learn.microsoft.com/en-us/cli/azure/azure-cli-extensions-overview#how-to-update-extensions.

Additionally, I was unable to replicate the issue using the latest logic extension. It may be beneficial to verify that your extension is up to date.

ReaNAiveD avatar May 06 '24 09:05 ReaNAiveD

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @wsilveiranz.