FoundryStateStore.CreateItemAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| CreateItemAsync(String, IDictionary<String,BinaryData>, IReadOnlyDictionary<String,String>, CancellationToken) |
Creates a new item, failing on a duplicate key. |
| CreateItemAsync(String, IDictionary<String,BinaryData>, IReadOnlyDictionary<String,String>, String, CancellationToken) |
Creates a new item, failing on a duplicate key. |
CreateItemAsync(String, IDictionary<String,BinaryData>, IReadOnlyDictionary<String,String>, CancellationToken)
- Source:
- FoundryStateStore.cs
Creates a new item, failing on a duplicate key.
public virtual System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Storage.StateStoreItemRef> CreateItemAsync(string key, System.Collections.Generic.IDictionary<string,BinaryData> value, System.Collections.Generic.IReadOnlyDictionary<string,string>? tags = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateItemAsync : string * System.Collections.Generic.IDictionary<string, BinaryData> * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Storage.StateStoreItemRef>
override this.CreateItemAsync : string * System.Collections.Generic.IDictionary<string, BinaryData> * System.Collections.Generic.IReadOnlyDictionary<string, string> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Storage.StateStoreItemRef>
Public Overridable Function CreateItemAsync (key As String, value As IDictionary(Of String, BinaryData), Optional tags As IReadOnlyDictionary(Of String, String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of StateStoreItemRef)
Parameters
- key
- String
The item key.
- value
- IDictionary<String,BinaryData>
The item value as a JSON object.
- tags
- IReadOnlyDictionary<String,String>
Optional item metadata tags.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
A reference to the created item.
Applies to
CreateItemAsync(String, IDictionary<String,BinaryData>, IReadOnlyDictionary<String,String>, String, CancellationToken)
- Source:
- FoundryStateStore.cs
Creates a new item, failing on a duplicate key.
public virtual System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Storage.StateStoreItemRef> CreateItemAsync(string key, System.Collections.Generic.IDictionary<string,BinaryData> value, System.Collections.Generic.IReadOnlyDictionary<string,string>? tags, string? callId, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateItemAsync : string * System.Collections.Generic.IDictionary<string, BinaryData> * System.Collections.Generic.IReadOnlyDictionary<string, string> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Storage.StateStoreItemRef>
override this.CreateItemAsync : string * System.Collections.Generic.IDictionary<string, BinaryData> * System.Collections.Generic.IReadOnlyDictionary<string, string> * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.AI.AgentServer.Core.Storage.StateStoreItemRef>
Public Overridable Function CreateItemAsync (key As String, value As IDictionary(Of String, BinaryData), tags As IReadOnlyDictionary(Of String, String), callId As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of StateStoreItemRef)
Parameters
- key
- String
The item key.
- value
- IDictionary<String,BinaryData>
The item value as a JSON object.
- tags
- IReadOnlyDictionary<String,String>
Optional item metadata tags.
- callId
- String
The Foundry call ID to forward, or null to use the current request context.
- cancellationToken
- CancellationToken
A cancellation token.
Returns
A reference to the created item.