DeviceUpdateClient.GetFiles(String, 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.
Get a list of all update file identifiers for the specified version.
public virtual Azure.Pageable<BinaryData> GetFiles (string provider, string name, string version, Azure.RequestContext context = default);
abstract member GetFiles : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
override this.GetFiles : string * string * string * Azure.RequestContext -> Azure.Pageable<BinaryData>
Public Overridable Function GetFiles (provider As String, name As String, version As String, Optional context As RequestContext = Nothing) As Pageable(Of BinaryData)
Parameters
- provider
- String
Update provider.
- name
- String
Update name.
- version
- String
Update version.
- 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
provider
, name
or version
is null.
provider
, name
or version
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 GetFiles with required parameters and parse the result.
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new DeviceUpdateClient(endpoint, "<instanceId>", credential);
foreach (var data in client.GetFiles("<provider>", "<name>", "<version>"))
{
JsonElement result = JsonDocument.Parse(data.ToStream()).RootElement;
Console.WriteLine(result.ToString());
}
Remarks
Schema for Response Body
:
{
value: [string],
nextLink: string
}
Schema for Response Error
:
{
error: {
code: string,
message: string,
target: string,
details: [Error],
innererror: {
code: string,
message: string,
errorDetail: string,
innerError: InnerError
},
occurredDateTime: string (ISO 8601 Format)
}
}
Applies to
Azure SDK for .NET