StacClient.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(WaitUntil, String, RequestContent, RequestContext) |
Create a new STAC item or a set of items in a collection. |
| CreateItemAsync(WaitUntil, String, StacItemOrStacItemCollection, CancellationToken) |
Create a new STAC item or a set of items in a collection. |
CreateItemAsync(WaitUntil, String, RequestContent, RequestContext)
- Source:
- StacClient.cs
Create a new STAC item or a set of items in a collection.
public virtual System.Threading.Tasks.Task<Azure.Operation> CreateItemAsync(Azure.WaitUntil waitUntil, string collectionId, Azure.Core.RequestContent content, Azure.RequestContext context = default);
abstract member CreateItemAsync : Azure.WaitUntil * string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
override this.CreateItemAsync : Azure.WaitUntil * string * Azure.Core.RequestContent * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Operation>
Public Overridable Function CreateItemAsync (waitUntil As WaitUntil, collectionId As String, content As RequestContent, Optional context As RequestContext = Nothing) As Task(Of Operation)
Parameters
- waitUntil
- WaitUntil
Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- collectionId
- String
Catalog collection id.
- content
- RequestContent
The content to send as the body of the request.
- context
- RequestContext
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
collectionId or content is null.
collectionId is an empty string, and was expected to be non-empty.
Applies to
CreateItemAsync(WaitUntil, String, StacItemOrStacItemCollection, CancellationToken)
- Source:
- StacClient.cs
Create a new STAC item or a set of items in a collection.
public virtual System.Threading.Tasks.Task<Azure.Operation> CreateItemAsync(Azure.WaitUntil waitUntil, string collectionId, Azure.Analytics.PlanetaryComputer.StacItemOrStacItemCollection body, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateItemAsync : Azure.WaitUntil * string * Azure.Analytics.PlanetaryComputer.StacItemOrStacItemCollection * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation>
override this.CreateItemAsync : Azure.WaitUntil * string * Azure.Analytics.PlanetaryComputer.StacItemOrStacItemCollection * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Operation>
Public Overridable Function CreateItemAsync (waitUntil As WaitUntil, collectionId As String, body As StacItemOrStacItemCollection, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Operation)
Parameters
- waitUntil
- WaitUntil
Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
- collectionId
- String
Catalog collection id.
STAC Item or StacItemCollection Represents a STAC Item or StacItemCollection as defined by the STAC 1.0.0 standard. Item: A GeoJSON Feature that represents a single spatiotemporal asset. It includes metadata such as geometry, datetime, and links to related assets. Example: A satellite image with its metadata. StacItemCollection: A GeoJSON FeatureCollection that contains multiple Items. It is used to group multiple related Items together, such as a collection of satellite images. This union allows the request body to accept either a single Item or a collection of Items.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
collectionId or body is null.
collectionId is an empty string, and was expected to be non-empty.