Table of Contents

Class EdgeRegistryClient

Namespace
Azure.Iot.Operations.Services.EdgeRegistry
Assembly
Azure.Iot.Operations.Services.dll
public class EdgeRegistryClient : IEdgeRegistryClient, IAsyncDisposable
Inheritance
EdgeRegistryClient
Implements
Inherited Members

Constructors

EdgeRegistryClient(ApplicationContext, IMqttPubSubClient, string)

Construct a new Edge Registry client.

public EdgeRegistryClient(ApplicationContext applicationContext, IMqttPubSubClient mqttClient, string @namespace)

Parameters

applicationContext ApplicationContext

The shared context for your application.

mqttClient IMqttPubSubClient

The MQTT client to use.

namespace string

The namespace used as the group ID for schema and thing description operations.

Methods

CreateGroupAsync(string, string, GroupCreateAttributes?, TimeSpan?, CancellationToken)

Create a group.

public Task<Group> CreateGroupAsync(string groupType, string groupId, GroupCreateAttributes? attributes = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

groupType string
groupId string
attributes GroupCreateAttributes
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Group>

CreateSchemaAsync(string, CreateSchemaVersionOptions, ResourceMetaCreateAttributes?, TimeSpan?, CancellationToken)

Create a schema with an initial version.

public Task<Schema> CreateSchemaAsync(string schemaId, CreateSchemaVersionOptions versionOptions, ResourceMetaCreateAttributes? metaAttributes = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaId string
versionOptions CreateSchemaVersionOptions
metaAttributes ResourceMetaCreateAttributes
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Schema>

CreateSchemaGroupAsync(GroupCreateAttributes?, TimeSpan?, CancellationToken)

Create the schema group for this client's namespace.

public Task<Group> CreateSchemaGroupAsync(GroupCreateAttributes? attributes = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

attributes GroupCreateAttributes
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Group>

CreateSchemaVersionAsync(string, CreateSchemaVersionOptions, TimeSpan?, CancellationToken)

Create a new schema version.

public Task<SchemaVersion> CreateSchemaVersionAsync(string schemaId, CreateSchemaVersionOptions versionOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaId string
versionOptions CreateSchemaVersionOptions
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<SchemaVersion>

CreateThingDescriptionAsync(string, CreateThingDescriptionVersionOptions, ResourceMetaCreateAttributes?, TimeSpan?, CancellationToken)

Create a thing description with an initial version.

public Task<ThingDescription> CreateThingDescriptionAsync(string thingDescriptionId, CreateThingDescriptionVersionOptions versionOptions, ResourceMetaCreateAttributes? metaAttributes = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

thingDescriptionId string
versionOptions CreateThingDescriptionVersionOptions
metaAttributes ResourceMetaCreateAttributes
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<ThingDescription>

CreateThingDescriptionGroupAsync(GroupCreateAttributes?, TimeSpan?, CancellationToken)

Create the thing description group for this client's namespace.

public Task<Group> CreateThingDescriptionGroupAsync(GroupCreateAttributes? attributes = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

attributes GroupCreateAttributes
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Group>

CreateThingDescriptionVersionAsync(string, CreateThingDescriptionVersionOptions, TimeSpan?, CancellationToken)

Create a new thing description version.

public Task<ThingDescriptionVersion> CreateThingDescriptionVersionAsync(string thingDescriptionId, CreateThingDescriptionVersionOptions versionOptions, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

thingDescriptionId string
versionOptions CreateThingDescriptionVersionOptions
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<ThingDescriptionVersion>

DisposeAsync()

Asynchronously dispose this object, but not the underlying MQTT client.

public ValueTask DisposeAsync()

Returns

ValueTask

DisposeAsync(bool)

Asynchronously dispose of this client and optionally dispose the underlying MQTT client.

public ValueTask DisposeAsync(bool disposing)

Parameters

disposing bool

Returns

ValueTask

DisposeAsync(bool, CancellationToken)

Asynchronously dispose of this client and optionally dispose the underlying MQTT client.

public ValueTask DisposeAsync(bool disposing, CancellationToken cancellationToken)

Parameters

disposing bool
cancellationToken CancellationToken

Returns

ValueTask

DisposeAsync(CancellationToken)

Asynchronously dispose this object, but not the underlying MQTT client.

public ValueTask DisposeAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

ValueTask

DisposeAsyncCore(bool, CancellationToken)

protected virtual ValueTask DisposeAsyncCore(bool disposing, CancellationToken cancellationToken)

Parameters

disposing bool
cancellationToken CancellationToken

Returns

ValueTask

GetGroupAsync(string, string, TimeSpan?, CancellationToken)

Get a group by type and ID.

public Task<Group> GetGroupAsync(string groupType, string groupId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

groupType string
groupId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Group>

GetSchemaAsync(string, TimeSpan?, CancellationToken)

Get a schema by ID.

public Task<Schema> GetSchemaAsync(string schemaId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Schema>

GetSchemaGroupAsync(TimeSpan?, CancellationToken)

Get the schema group for this client's namespace.

public Task<Group> GetSchemaGroupAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Group>

GetSchemaVersionAsync(string, ulong, TimeSpan?, CancellationToken)

Get a specific schema version.

public Task<SchemaVersion> GetSchemaVersionAsync(string schemaId, ulong versionId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaId string
versionId ulong
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<SchemaVersion>

GetThingDescriptionAsync(string, TimeSpan?, CancellationToken)

Get a thing description by ID.

public Task<ThingDescription> GetThingDescriptionAsync(string thingDescriptionId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

thingDescriptionId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<ThingDescription>

GetThingDescriptionGroupAsync(TimeSpan?, CancellationToken)

Get the thing description group for this client's namespace.

public Task<Group> GetThingDescriptionGroupAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<Group>

GetThingDescriptionVersionAsync(string, string, TimeSpan?, CancellationToken)

Get a specific thing description version.

public Task<ThingDescriptionVersion> GetThingDescriptionVersionAsync(string thingDescriptionId, string versionId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

thingDescriptionId string
versionId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<ThingDescriptionVersion>

ListAsync(string, TimeSpan?, CancellationToken)

List entity IDs at the given xId path.

public Task<List<string>> ListAsync(string xid, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

xid string

XID path of the collection to list (e.g. /schemagroups, /schemagroups/g1/schemas).

timeout TimeSpan?

Command timeout.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<List<string>>

A list of entity IDs.

ListGroupsAsync(string, TimeSpan?, CancellationToken)

List group IDs of the given type.

public Task<List<string>> ListGroupsAsync(string groupType, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

groupType string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListResourcesAsync(string, string, string, TimeSpan?, CancellationToken)

List resource IDs within a group.

public Task<List<string>> ListResourcesAsync(string groupType, string groupId, string resourceType, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

groupType string
groupId string
resourceType string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListSchemaGroupsAsync(TimeSpan?, CancellationToken)

List schema group IDs.

public Task<List<string>> ListSchemaGroupsAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListSchemaVersionsAsync(string, TimeSpan?, CancellationToken)

List version IDs for a schema.

public Task<List<ulong>> ListSchemaVersionsAsync(string schemaId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<ulong>>

ListSchemasAsync(TimeSpan?, CancellationToken)

List schema IDs in the schema group.

public Task<List<string>> ListSchemasAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListThingDescriptionGroupsAsync(TimeSpan?, CancellationToken)

List thing description group IDs.

public Task<List<string>> ListThingDescriptionGroupsAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListThingDescriptionVersionsAsync(string, TimeSpan?, CancellationToken)

List version IDs for a thing description.

public Task<List<string>> ListThingDescriptionVersionsAsync(string thingDescriptionId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

thingDescriptionId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListThingDescriptionsAsync(TimeSpan?, CancellationToken)

List thing description IDs in the thing description group.

public Task<List<string>> ListThingDescriptionsAsync(TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

ListVersionsAsync(string, string, string, string, TimeSpan?, CancellationToken)

List version IDs for a resource.

public Task<List<string>> ListVersionsAsync(string groupType, string groupId, string resourceType, string resourceId, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

groupType string
groupId string
resourceType string
resourceId string
timeout TimeSpan?
cancellationToken CancellationToken

Returns

Task<List<string>>

StopAsync(CancellationToken)

Make this client unsubscribe from any topics that it subscribed to.

public Task StopAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task