你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Certificates - Generate Verification Code
为所有权证明流生成验证码。
为所有权证明流生成验证码。 验证码将用于生成叶证书。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/certificates/{certificateName}/generateVerificationCode?api-version=2018-04-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
certificate
|
path | True |
string |
证书的名称 Regex pattern: |
resource
|
path | True |
string |
包含 IoT 中心的资源组的名称。 |
resource
|
path | True |
string |
IoT 中心的名称。 |
subscription
|
path | True |
string |
订阅标识符。 |
api-version
|
query | True |
string |
API 的版本。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
If-Match | True |
string |
证书的 ETag。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
正文包含证书。 |
|
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 | 模拟用户帐户 |
示例
Certificates_GenerateVerificationCode
Sample Request
POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/certificates/cert/generateVerificationCode?api-version=2018-04-01
Sample Response
{
"name": "cert",
"properties": {
"verificationCode": "##################################",
"subject": "CN=andbucdevice1",
"expiry": "Sat, 31 Dec 2039 23:59:59 GMT",
"thumbprint": "##############################",
"isVerified": false,
"created": "Thu, 12 Oct 2017 19:23:50 GMT",
"updated": "Thu, 12 Oct 2017 19:26:56 GMT"
}
}
定义
名称 | 说明 |
---|---|
Certificate |
X509 CA 证书的说明,包括为所有权证明流颁发的质询 nonce。 |
Certificate |
X509 证书。 |
Error |
错误详细信息。 |
CertificatePropertiesWithNonce
X509 CA 证书的说明,包括为所有权证明流颁发的质询 nonce。
名称 | 类型 | 说明 |
---|---|---|
certificate |
string |
证书内容 |
created |
string |
证书的创建日期和时间。 |
expiry |
string |
证书的过期日期和时间。 |
isVerified |
boolean |
确定是否已验证证书。 |
subject |
string |
证书的使用者名称。 |
thumbprint |
string |
证书的指纹。 |
updated |
string |
证书的上次更新日期和时间。 |
verificationCode |
string |
将用于所有权证明的证书验证码。 |
CertificateWithNonceDescription
X509 证书。
名称 | 类型 | 说明 |
---|---|---|
etag |
string |
实体标记。 |
id |
string |
资源标识符。 |
name |
string |
证书的名称。 |
properties |
X509 CA 证书的说明,包括为所有权证明流颁发的质询 nonce。 |
|
type |
string |
资源类型。 |
ErrorDetails
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误代码。 |
details |
string |
错误详细信息。 |
httpStatusCode |
string |
HTTP 状态代码。 |
message |
string |
错误消息。 |