Iot Hub Resource - Get Keys For Key Name

IoT Hub에서 이름으로 공유 액세스 정책을 가져옵니다. 자세한 내용은 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 매개 변수

Name In(다음 안에) 필수 형식 Description
keyName
path True

string

공유 액세스 정책의 이름입니다.

resourceGroupName
path True

string

IoT Hub를 포함하는 리소스 그룹의 이름입니다.

resourceName
path True

string

IoT Hub의 이름입니다.

subscriptionId
path True

string

구독 식별자입니다.

api-version
query True

string

API 버전입니다.

응답

Name 형식 Description
200 OK

SharedAccessSignatureAuthorizationRule

동기 작업입니다. 본문에는 하나 이상의 IoT 허브 엔드포인트에 액세스하는 데 사용할 수 있는 키를 포함하여 JSON 직렬화된 공유 액세스 정책이 포함되어 있습니다.

Other Status Codes

ErrorDetails

DefaultErrorResponse

보안

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 사용자 계정 가장

예제

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

정의

Name Description
AccessRights

공유 액세스 정책에 할당된 권한입니다.

ErrorDetails

오류 세부 정보입니다.

SharedAccessSignatureAuthorizationRule

IoT Hub 공유 액세스 정책의 속성입니다.

AccessRights

공유 액세스 정책에 할당된 권한입니다.

Name 형식 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

오류 세부 정보입니다.

Name 형식 Description
code

string

오류 코드입니다.

details

string

오류 세부 정보입니다.

httpStatusCode

string

HTTP 상태 코드입니다.

message

string

오류 메시지입니다.

SharedAccessSignatureAuthorizationRule

IoT Hub 공유 액세스 정책의 속성입니다.

Name 형식 Description
keyName

string

공유 액세스 정책의 이름입니다.

primaryKey

string

기본 키입니다.

rights

AccessRights

공유 액세스 정책에 할당된 권한입니다.

secondaryKey

string

보조 키입니다.