DeviceManagementClient.DeleteDeviceClassAsync(String, RequestContext) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
デバイス クラスを削除します。 デバイス クラスは、Device Update 対応デバイスがハブに接続されている場合に自動的に作成されますが、DeviceClassSubgroups によって参照されるため、自動的にはクリーンアップされません。 ユーザーがデバイス クラスのすべての DeviceClassSubgroups を削除した場合は、デバイス クラスを削除して、システムからレコードを削除し、このデバイス クラスと新しい更新プログラムの互換性のチェックを停止することもできます。 このデバイス クラスに対してデバイスが再接続された場合は、再作成されます。
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteDeviceClassAsync(string deviceClassId, Azure.RequestContext context = default);
abstract member DeleteDeviceClassAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.DeleteDeviceClassAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function DeleteDeviceClassAsync (deviceClassId As String, Optional context As RequestContext = Nothing) As Task(Of Response)
パラメーター
- deviceClassId
- String
デバイス クラス識別子。
- context
- RequestContext
要求コンテキスト。これは、呼び出しごとにクライアント パイプラインの既定の動作をオーバーライドできます。
戻り値
サービスから返された応答。
例外
deviceClassId
が null です。
deviceClassId
は空の文字列であり、空でないと想定されていました。
サービスから成功以外の状態コードが返されました。
例
このサンプルでは、必要なパラメーターを使用して DeleteDeviceClassAsync を呼び出す方法を示します。
var credential = new DefaultAzureCredential();
var endpoint = new Uri("<https://my-service.azure.com>");
var client = new DeviceManagementClient(endpoint, "<instanceId>", credential);
Response response = await client.DeleteDeviceClassAsync("<deviceClassId>");
Console.WriteLine(response.Status);
適用対象
Azure SDK for .NET