Skip to content

Commit 3c540df

Browse files
authored
{Storage} Fix #30377: az storage entity insert: Add instructions for specifying odata type (#30534)
* add instruction for specifying odatatype for entity values * fix lint
1 parent 5b5c1e7 commit 3c540df

File tree

3 files changed

+410
-187
lines changed

3 files changed

+410
-187
lines changed

src/azure-cli/azure/cli/command_modules/storage/_help.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,13 @@
18601860
- name: --entity -e
18611861
type: list
18621862
short-summary: Space-separated list of key=value pairs. Must contain a PartitionKey and a RowKey.
1863-
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.
1863+
long-summary: >
1864+
The PartitionKey and RowKey must be unique within the table, and may be up to 64Kb in size.
1865+
If using an integer value as a key, convert it to a fixed-width string which can be canonically sorted.
1866+
For example, convert the integer value 1 to the string value "0000001" to ensure proper sorting. \n
1867+
To manually specify the value type, an additional key,value pair can be added in the format of
1868+
[email protected]=<EdmType> where <EdmType> can be from the following list: Edm.Binary, Edm.Int64, Edm.Guid,
1869+
Edm.DateTime, Edm.String, Edm.Int32, Edm.Double, Edm.Boolean
18641870
- name: --if-exists
18651871
type: string
18661872
short-summary: Behavior when an entity already exists for the specified PartitionKey and RowKey.
@@ -1869,6 +1875,9 @@
18691875
text: |
18701876
az storage entity insert --connection-string $connectionString --entity PartitionKey=AAA RowKey=BBB Content=ASDF2 --if-exists fail --table-name MyTable
18711877
crafted: true
1878+
- name: Insert an entity when specifying the odatatype.
1879+
text: |
1880+
az storage entity insert --connection-string $connectionString --entity PartitionKey=AAA RowKey=BBB Content=0152 [email protected]=Edm.String --if-exists merge --table-name MyTable
18721881
"""
18731882

18741883
helps['storage entity merge'] = """

0 commit comments

Comments
 (0)