Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide object property docs for az apic api update --custom-properties + example #20

Open
neilpeterson opened this issue Feb 9, 2024 · 1 comment

Comments

@neilpeterson
Copy link
Member

I am trying to add custom data to an API with the Azure CLI and cannot get the shorthand syntax correct. Are there properties and / or examples that can be added to the CLI docs / help to assist?

CLI help output

PS > az apic api update --custom-properties ??

Argument
    --custom-properties : Object
        The custom metadata defined for API catalog entities.
        See https://github.com/Azure/azure-cli/tree/dev/doc/shorthand_syntax.md for more about
        shorthand syntax.

Object Properties

I've tried several things, based on the REST spec this seems most likely. Notes, the API schema has been updated to include internal_id.

az apic api update -g $API_CENTER_RESOURCE_GROUP_NAME -s $API_CENTER_INSTANCE_NAME -w default --name $APICAPIName --custom-properties "{properties:{internal_id:'3c3544e5-d623-4650-aaa4-b06c5467f162'}}"

However, this results in the following error.

Failed to parse '--custom-properties' argument: Shorthand Syntax Error: Expect character ',' or ']':
        {properties:[internal_id:

Thanks a bunch.

@neilpeterson
Copy link
Member Author

Regardless of updating the docs, any hint here would be helpful. Struggling to get this working :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant