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