Azure / Azure/azure-cli

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

Open
#28,347 4 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad Auto-Assign bug customer-reported Event Hubs Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### 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_

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.