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 パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
key
|
path | True |
string |
共有アクセス ポリシーの名前。 |
resource
|
path | True |
string |
IoT ハブを含むリソース グループの名前。 |
resource
|
path | True |
string |
IoT ハブの名前。 |
subscription
|
path | True |
string |
サブスクリプションの識別子です。 |
api-version
|
query | True |
string |
API のバージョン。 |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
これは同期操作です。 本文には、1 つ以上の IoT ハブ エンドポイントへのアクセスに使用できる、キーを含む JSON でシリアル化された共有アクセス ポリシーが含まれています。 |
|
Other Status Codes |
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"
}
定義
名前 | 説明 |
---|---|
Access |
共有アクセス ポリシーに割り当てられたアクセス許可。 |
Error |
エラーの詳細。 |
Shared |
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 |
共有アクセス ポリシーに割り当てられたアクセス許可。 |
|
secondaryKey |
string |
セカンダリ キー。 |