Skip to content

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

@ambhatia

Description

@ambhatia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botEvent Hubsaz eventhubsService AttentionThis issue is responsible by Azure service team.act-codegen-extensibility-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions