Skip to content

Quotes in --set parameter of redis update command given in the doc looks inaccurate  #22498

@evanlwj

Description

@evanlwj

[Enter feedback here]

I followed az redis update doc to update shardCount for an existing redis instance.

If double quotes are included in --set parameter like --set "shardCount"="1", An usage error promoted to me

az redis update --subscription xxxxxx --name {my redis} --resource-group {my resourcegroup} --set "shardCount"="1" --output json
usage error: Empty key in --set. Correct syntax: --set KEY=VALUE [KEY=VALUE ...]

If try this, another error promoted to me

az redis update --subscription xxxxxx --name {my redis} --resource-group {my resourcegroup} --set \"shardCount\"=\"1\" --output json
Property '\shardCount\' not found on root. Send it as an additional property .
(InvalidRequestContent) The request content was invalid and could not be deserialized: 'Could not find member '\shardCount\' on object of type 'ResourceDefinition'. Path '['\\shardCount\\']', line 1, position 359.'.
Code: InvalidRequestContent
Message: The request content was invalid and could not be deserialized: 'Could not find member '\shardCount\' on object of type 'ResourceDefinition'. Path '['\\shardCount\\']', line 1, position 359.'.

If --set doesn't include double quotes like --set shardCount=1, command worked for me and updated the redis instance with a desired shard count in couple minutes later.

az redis update --subscription xxxxxx --name {my redis} --resource-group {my resourcegroup} --set shardCount=1 --output json

Thus, I am wondering the sample command with double quotes in --set parameter below in the doc is inaccurate.

az redis update --name MyRedisCache --resource-group MyResourceGroup --set "shardCount"="2"


Document Details

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions