你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Certificates - List By Iot Hub

获取证书列表。
返回证书列表。

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

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

包含 IoT 中心的资源组的名称。

resourceName
path True

string

IoT 中心的名称。

subscriptionId
path True

string

订阅标识符。

api-version
query True

string

API 的版本。

响应

名称 类型 说明
200 OK

CertificateListDescription

正文包含所有证书列表。

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 模拟用户帐户

示例

Certificates_ListByIotHub

Sample Request

GET https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testhub/certificates?api-version=2018-04-01

Sample Response

{
  "value": [
    {
      "properties": {
        "subject": "CN=testdevice1",
        "expiry": "Sat, 31 Dec 2039 23:59:59 GMT",
        "thumbprint": "97388663832D0393C9246CAB4FBA2C8677185A25",
        "isVerified": false,
        "created": "Thu, 12 Oct 2017 19:23:50 GMT",
        "updated": "Thu, 12 Oct 2017 19:23:50 GMT"
      },
      "id": "/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/andbuc-hub/certificates/cert",
      "name": "cert",
      "type": "Microsoft.Devices/IotHubs/Certificates",
      "etag": "AAAAAAExpNs="
    }
  ]
}

定义

名称 说明
CertificateDescription

X509 证书。

CertificateListDescription

证书对象的 JSON 序列化数组。

CertificateProperties

X509 CA 证书的说明。

ErrorDetails

错误详细信息。

CertificateDescription

X509 证书。

名称 类型 说明
etag

string

实体标记。

id

string

资源标识符。

name

string

证书的名称。

properties

CertificateProperties

X509 CA 证书的说明。

type

string

资源类型。

CertificateListDescription

证书对象的 JSON 序列化数组。

名称 类型 说明
value

CertificateDescription[]

Certificate 对象的数组。

CertificateProperties

X509 CA 证书的说明。

名称 类型 说明
certificate

string

证书内容

created

string

证书的创建日期和时间。

expiry

string

证书的过期日期和时间。

isVerified

boolean

确定是否已验证证书。

subject

string

证书的使用者名称。

thumbprint

string

证书的指纹。

updated

string

证书的上次更新日期和时间。

ErrorDetails

错误详细信息。

名称 类型 说明
code

string

错误代码。

details

string

错误详细信息。

httpStatusCode

string

HTTP 状态代码。

message

string

错误消息。