Table of Contents

Interface ISchemaRegistryClient

Namespace
Azure.Iot.Operations.Services.SchemaRegistry
Assembly
Azure.Iot.Operations.Services.dll
public interface ISchemaRegistryClient : IAsyncDisposable
Inherited Members

Methods

DisposeAsync(bool)

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

ValueTask DisposeAsync(bool disposing)

Parameters

disposing bool

If true, this client will also dispose the underlying MQTT client.

Returns

ValueTask

DisposeAsync(bool, CancellationToken)

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

ValueTask DisposeAsync(bool disposing, CancellationToken cancellationToken)

Parameters

disposing bool

If true, this client will also dispose the underlying MQTT client.

cancellationToken CancellationToken

Cancellation token

Returns

ValueTask

DisposeAsync(CancellationToken)

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

ValueTask DisposeAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Cancellation token

Returns

ValueTask

GetAsync(string, string, TimeSpan?, CancellationToken)

Retrieves schema information from a schema registry service based on the provided schema ID and version.

Task<Schema> GetAsync(string schemaId, string version = "1", TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaId string

The unique identifier of the schema to retrieve. This is required to locate the schema in the registry.

version string

The version of the schema to fetch. If not specified, defaults to "1". Values are expected to be whole integers.

timeout TimeSpan?

An optional timeout for the operation, which specifies the maximum time allowed for the request to complete.

cancellationToken CancellationToken

A token that can be used to cancel the operation before completion if needed.

Returns

Task<Schema>

Information about the requested schema

Exceptions

SchemaRegistryErrorException

If the requested schema does not exist

PutAsync(string, Format, SchemaType, string, Dictionary<string, string>, string?, string?, TimeSpan?, CancellationToken)

Adds or updates a schema in the schema registry service with the specified content, format, type, and metadata.

Task<Schema> PutAsync(string schemaContent, Format schemaFormat, SchemaType schemaType = SchemaType.MessageSchema, string version = "1", Dictionary<string, string> tags = null, string? displayName = null, string? description = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)

Parameters

schemaContent string

The content of the schema to be added or updated in the registry.

schemaFormat Format

The format of the schema. Specifies how the schema content should be interpreted.

schemaType SchemaType

The type of the schema, such as message schema or data schema. Defaults to SchemaType.MessageSchema.

version string

The version of the schema to add or update. If not specified, defaults to "1". Values are expected to be whole integers.

tags Dictionary<string, string>

Optional metadata tags to associate with the schema. These tags can be used to store additional information about the schema in key-value format.

displayName string

The optional display name of the schema.

description string

The optional description of the schema.

timeout TimeSpan?

An optional timeout for the operation, which specifies the maximum time allowed for the request to complete.

cancellationToken CancellationToken

A token that can be used to cancel the operation before completion if needed.

Returns

Task<Schema>

Information about the created/updated schema

StopAsync(CancellationToken)

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

Task StopAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task