ReceivedAssetsClient.GetReceivedAssets(String, String, RequestContext) 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.
List source asset of a received share.
public virtual Azure.Pageable<BinaryData> GetReceivedAssets (string receivedShareName, string skipToken = default, Azure.RequestContext context = default);
abstract member GetReceivedAssets : string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetReceivedAssets : string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetReceivedAssets (receivedShareName As String, Optional skipToken As String = Nothing, Optional context As RequestContext = Nothing) As Pageable(Of BinaryData)
Parameters
- receivedShareName
- String
The name of the received share.
- skipToken
- String
The continuation token to list the next page.
- context
- RequestContext
The request context, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The Pageable<T> from the service containing a list of BinaryData objects. Details of the body schema for each item in the collection are in the Remarks section below.
Exceptions
receivedShareName
is null.
receivedShareName
is an empty string, and was expected to be non-empty.
Service returned a non-success status code.
Examples
This sample shows how to call GetReceivedAssets with required parameters and parse the result.
var credential = new DefaultAzureCredential();
var client = new ReceivedAssetsClient("<https://my-service.azure.com>", credential);
foreach (var data in client.GetReceivedAssets("<receivedShareName>"))
{
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
This sample shows how to call GetReceivedAssets with all parameters, and how to parse the result.
var credential = new DefaultAzureCredential();
var client = new ReceivedAssetsClient("<https://my-service.azure.com>", credential);
foreach (var data in client.GetReceivedAssets("<receivedShareName>", "<skipToken>"))
{
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.GetProperty("id").ToString());
Console.WriteLine(result.GetProperty("name").ToString());
Console.WriteLine(result.GetProperty("type").ToString());
Console.WriteLine(result.GetProperty("kind").ToString());
}
Remarks
List received assets for a received share
Below is the JSON schema for one item in the pageable response.
Response Body:
Schema for ReceivedAssetListValue
:
{
id: string, # Optional. The resource id of the resource.
name: string, # Optional. Name of the resource.
type: string, # Optional. Type of the resource.
kind: "AdlsGen2Account" | "BlobAccount", # Required. The types of asset.
}
Applies to
Azure SDK for .NET