次の方法で共有


Sensors - Get Connection String

センサー接続文字列を取得します。

GET {endpoint}/sensor-partners/{sensorPartnerId}/sensors/{sensorId}/connection-strings?api-version=2023-11-01-preview

URI パラメーター

名前 / 必須 説明
endpoint
path True

string (uri)

名前空間のホスト名 (例: admaInstanceName.farmbeats.azure.net

sensorId
path True

string

センサー リソースの ID。

sensorPartnerId
path True

string

センサー パートナーの ID。

api-version
query True

string

要求された API バージョン

要求ヘッダー

名前 必須 説明
Authorization True

string

承認された API 呼び出しに有効なベアラー トークンを指定してください。 以前に認証されていない呼び出しを試した場合は、ブラウザーのキャッシュをクリアする必要がある場合があることに注意してください。

応答

名前 説明
200 OK

IoTHubDeviceAuthentication

成功

Other Status Codes

ErrorResponse

エラー

ヘッダー

x-ms-error-code: string

セキュリティ

Authorization

承認された API 呼び出しに有効なベアラー トークンを指定してください。 以前に認証されていない呼び出しを試した場合は、ブラウザーのキャッシュをクリアする必要がある場合があることに注意してください。

型: apiKey
/: header

Sensors_GetConnectionString

要求のサンプル

GET {endpoint}/sensor-partners/sp1/sensors/s124/connection-strings?api-version=2023-11-01-preview

応答のサンプル

{
  "primaryDeviceConnectionString": "HostName=iothubName.azure-devices.net;DeviceId=809f4379-b4d3-de01-6425-f088de6645f5;SharedAccessKey=****",
  "secondaryDeviceConnectionString": "HostName=iothubName.azure-devices.net;DeviceId=809f4379-b4d3-de01-6425-f088de6645f5;SharedAccessKey=****"
}

定義

名前 説明
Error

Azure AgPlatform サービスからのエラー。

ErrorResponse

Azure AgPlatform サービスからのエラー応答。 ErrorResponse リファレンス ドキュメントについては、https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses を参照してください。

InnerError

エラーの一覧を含む内部エラー。InnerError のリファレンス ドキュメントについては、https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object を参照してください。

IoTHubDeviceAuthentication

IoTHub デバイスへの接続文字列による認証。

Error

Azure AgPlatform サービスからのエラー。

名前 説明
code

string

minLength: 1

サーバー定義のエラー コードのセット。

details

Error[]

この報告されたエラーの原因となった特定のエラーに関する詳細の配列。

innererror

InnerError

エラーの一覧を含む内部エラー。InnerError のリファレンス ドキュメントについては、https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object を参照してください。

message

string

minLength: 1

エラーの人間が判読できる表現。

target

string

エラーのターゲット。

ErrorResponse

Azure AgPlatform サービスからのエラー応答。 ErrorResponse リファレンス ドキュメントについては、https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses を参照してください。

名前 説明
error

Error

Azure AgPlatform サービスからのエラー。

traceId

string

一意のトレース ID。

InnerError

エラーの一覧を含む内部エラー。InnerError のリファレンス ドキュメントについては、https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object を参照してください。

名前 説明
code

string

含まれているエラーによって提供されたエラー コードよりも具体的なエラー コード。

innererror

InnerError

エラーの一覧を含む内部エラー。InnerError のリファレンス ドキュメントについては、https://github.com/Microsoft/api-guidelines/blob/vNext/Guidelines.md#innererror--object を参照してください。

IoTHubDeviceAuthentication

IoTHub デバイスへの接続文字列による認証。

名前 説明
primaryDeviceConnectionString

string

ioTHub デバイスのプライマリ接続文字列。

secondaryDeviceConnectionString

string

ioTHub デバイスのセカンダリ接続文字列。