Iot Hub Resource - Get Keys For Key Name

IoT hub'ından ada göre paylaşılan erişim ilkesi alın. Daha fazla bilgi için, bkz. 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 Parametreleri

Name İçinde Gerekli Tür Description
keyName
path True

string

Paylaşılan erişim ilkesinin adı.

resourceGroupName
path True

string

IoT hub'ını içeren kaynak grubunun adı.

resourceName
path True

string

IoT hub'ının adı.

subscriptionId
path True

string

Abonelik tanımlayıcısı.

api-version
query True

string

API sürümü.

Yanıtlar

Name Tür Description
200 OK

SharedAccessSignatureAuthorizationRule

Bu zaman uyumlu bir işlemdir. Gövde, bir veya daha fazla IoT hub uç noktasına erişmek için kullanabileceğiniz anahtarlar da dahil olmak üzere JSON serileştirilmiş bir paylaşılan erişim ilkesi içerir.

Other Status Codes

ErrorDetails

DefaultErrorResponse

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

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"
}

Tanımlar

Name Description
AccessRights

Paylaşılan erişim ilkesine atanan izinler.

ErrorDetails

Hata ayrıntıları.

SharedAccessSignatureAuthorizationRule

IoT hub paylaşılan erişim ilkesinin özellikleri.

AccessRights

Paylaşılan erişim ilkesine atanan izinler.

Name Tür Description
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

Hata ayrıntıları.

Name Tür Description
code

string

Hata kodu.

details

string

Hata ayrıntıları.

httpStatusCode

string

HTTP durum kodu.

message

string

Hata iletisi.

SharedAccessSignatureAuthorizationRule

IoT hub paylaşılan erişim ilkesinin özellikleri.

Name Tür Description
keyName

string

Paylaşılan erişim ilkesinin adı.

primaryKey

string

Birincil anahtar.

rights

AccessRights

Paylaşılan erişim ilkesine atanan izinler.

secondaryKey

string

İkincil anahtar.