Iot Hub Resource - Get Keys For Key Name

IoT ハブから名前で共有アクセス ポリシーを取得します。 詳細については、「https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security」を参照してください。

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys?api-version=2018-04-01

URI パラメーター

名前 / 必須 説明
keyName
path True

string

共有アクセス ポリシーの名前。

resourceGroupName
path True

string

IoT ハブを含むリソース グループの名前。

resourceName
path True

string

IoT ハブの名前。

subscriptionId
path True

string

サブスクリプションの識別子です。

api-version
query True

string

API のバージョン。

応答

名前 説明
200 OK

SharedAccessSignatureAuthorizationRule

これは同期操作です。 本文には、1 つ以上の IoT ハブ エンドポイントへのアクセスに使用できる、キーを含む JSON でシリアル化された共有アクセス ポリシーが含まれています。

Other Status Codes

ErrorDetails

DefaultErrorResponse

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

IotHubResource_GetKeysForKeyName

Sample Request

POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/IotHubKeys/iothubowner/listkeys?api-version=2018-04-01

Sample Response

{
  "keyName": "iothubowner",
  "primaryKey": "<primaryKey>",
  "secondaryKey": "<secondaryKey>",
  "rights": "RegistryWrite, ServiceConnect, DeviceConnect"
}

定義

名前 説明
AccessRights

共有アクセス ポリシーに割り当てられたアクセス許可。

ErrorDetails

エラーの詳細。

SharedAccessSignatureAuthorizationRule

IoT ハブ共有アクセス ポリシーのプロパティ。

AccessRights

共有アクセス ポリシーに割り当てられたアクセス許可。

名前 説明
DeviceConnect

string

RegistryRead

string

RegistryRead, DeviceConnect

string

RegistryRead, RegistryWrite

string

RegistryRead, RegistryWrite, DeviceConnect

string

RegistryRead, RegistryWrite, ServiceConnect

string

RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect

string

RegistryRead, ServiceConnect

string

RegistryRead, ServiceConnect, DeviceConnect

string

RegistryWrite

string

RegistryWrite, DeviceConnect

string

RegistryWrite, ServiceConnect

string

RegistryWrite, ServiceConnect, DeviceConnect

string

ServiceConnect

string

ServiceConnect, DeviceConnect

string

ErrorDetails

エラーの詳細。

名前 説明
code

string

エラー コード。

details

string

エラーの詳細です。

httpStatusCode

string

HTTP 状態コード。

message

string

エラー メッセージ。

SharedAccessSignatureAuthorizationRule

IoT ハブ共有アクセス ポリシーのプロパティ。

名前 説明
keyName

string

共有アクセス ポリシーの名前。

primaryKey

string

主キー。

rights

AccessRights

共有アクセス ポリシーに割り当てられたアクセス許可。

secondaryKey

string

セカンダリ キー。