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

--destination-name parameter is not optional during first time setup of capture for eventhub

Open ambhatia opened this issue 1 year ago • 3 comments

Describe the bug

--destination-name parameter is not optional during first time setup of capture for eventhub. and not adding that in command results in poor error which doesn't even hints that create/update eventhub failed due to not specifying --destination-name .

az eventhubs eventhub create --name azcaptureeh --namespace-name ambhatiaehbdr --resource-group ambhatiaehbrg --enable-capture true --storage-account "/subscriptions/1da6539d-2c29-426a-b770-230f4ed67a93/resourceGroups/ambhatiatempstgrg/providers/Microsoft.Storage/storageAccounts/ambhatiatempstg"

cli.azure.cli.core.azclierror: (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. Code: RequestJsonDeserializationFailure Message: Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. az_command_data_logger: (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. Code: RequestJsonDeserializationFailure Message: Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246.

Related command

az eventhubs eventhub create --name azcaptureeh --namespace-name ambhatiaehbdr --resource-group ambhatiaehbrg --enable-capture true --storage-account "/subscriptions/1da6539d-2c29-426a-b770-230f4ed67a93/resourceGroups/ambhatiatempstgrg/providers/Microsoft.Storage/storageAccounts/ambhatiatempstg"

Errors

cli.azure.cli.core.azclierror: (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. Code: RequestJsonDeserializationFailure Message: Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. az_command_data_logger: (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. Code: RequestJsonDeserializationFailure Message: Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246.

Issue script & Debug output

az eventhubs eventhub create --name azcaptureeh --namespace-name ambhatiaehbdr --resource-group ambhatiaehbrg --enable-capture true --storage-account "/subscriptions/XXXX/resourceGroups/ambhatiatempstgrg/providers/Microsoft.Storage/storageAccounts/ambhatiatempstg"

cli.azure.cli.core.azclierror: (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. Code: RequestJsonDeserializationFailure Message: Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. az_command_data_logger: (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246. Code: RequestJsonDeserializationFailure Message: Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination', line 1, position 246.

Expected behavior

Command could take some default value and avoid failure or error message should suggest clearly what's missed.

Environment Summary

azure-cli 2.57.0 core 2.57.0 telemetry 1.1.0

Extensions: ai-examples 0.2.5 ml 2.22.0 ssh 2.0.2

Dependencies: msal 1.26.0 azure-mgmt-resource 23.1.0b2

Additional context

No response

ambhatia avatar Feb 09 '24 22:02 ambhatia

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

yonzhan avatar Feb 09 '24 22:02 yonzhan

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

Thanks for reporting @ambhatia . We'll investigate on the behavior, and I shall circle back with updates.

Saglodha avatar May 07 '24 05:05 Saglodha

Hey @ambhatia, The --destination-name parameter is required. when --enable-capture is true. also error msg is correctly shown below. (RequestJsonDeserializationFailure) Failed to deserialize input. Got error message: Required property 'name' not found in JSON. Path 'properties.captureDescription.destination',

schaudhari6254888 avatar Aug 05 '24 09:08 schaudhari6254888