Skip to content

source id is not optional, should be listed as required attribute #20899

@lindacmsheard

Description

@lindacmsheard

[Enter feedback here]
(using "azure-cli": "2.31.0")

contrary to the docs, --source-resource-id appears to be a required parameter for az eventgrid event-subscription show (and possibly for the other operations too)?

Leaving it off results in an unhandled error:

az eventgrid event-subscription show --name $subname
// ->
The command failed with an unexpected error. Here is the traceback:
No value for given attribute
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 231, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/eventgrid/custom.py", line 873, in cli_eventgrid_event_subscription_get
    retrieved_event_subscription = client.get(source_resource_id, event_subscription_name)
  File "/opt/az/lib/python3.6/site-packages/azure/mgmt/eventgrid/operations/_event_subscriptions_operations.py", line 88, in get
    'scope': self._serialize.url("scope", scope, 'str', skip_quote=True),
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 650, in url
    output = self.serialize_data(data, data_type, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/msrest/serialization.py", line 758, in serialize_data
    raise ValueError("No value for given attribute")
ValueError: No value for given attribute

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions