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

{Storage} Fix #30377: az storage entity insert: Add instructions for specifying odata type #30534

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/azure-cli/azure/cli/command_modules/storage/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,7 +1860,13 @@
- name: --entity -e
type: list
short-summary: Space-separated list of key=value pairs. Must contain a PartitionKey and a RowKey.
long-summary: The PartitionKey and RowKey must be unique within the table, and may be up to 64Kb in size. If using an integer value as a key, convert it to a fixed-width string which can be canonically sorted. For example, convert the integer value 1 to the string value "0000001" to ensure proper sorting.
long-summary: >
The PartitionKey and RowKey must be unique within the table, and may be up to 64Kb in size.
If using an integer value as a key, convert it to a fixed-width string which can be canonically sorted.
For example, convert the integer value 1 to the string value "0000001" to ensure proper sorting. \n
To manually specify the value type, an additional key,value pair can be added in the format of
key@odata.type=<EdmType> where <EdmType> can be from the following list: Edm.Binary, Edm.Int64, Edm.Guid,
Edm.DateTime, Edm.String, Edm.Int32, Edm.Double, Edm.Boolean
- name: --if-exists
type: string
short-summary: Behavior when an entity already exists for the specified PartitionKey and RowKey.
Expand All @@ -1869,6 +1875,9 @@
text: |
az storage entity insert --connection-string $connectionString --entity PartitionKey=AAA RowKey=BBB Content=ASDF2 --if-exists fail --table-name MyTable
crafted: true
- name: Insert an entity when specifying the odatatype.
text: |
az storage entity insert --connection-string $connectionString --entity PartitionKey=AAA RowKey=BBB Content=0152 Content@odata.type=Edm.String --if-exists merge --table-name MyTable
"""

helps['storage entity merge'] = """
Expand Down
Loading
Loading