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

DeviceProvisioningServicesCertificateResource.GenerateVerificationCode 方法

定义

重载

GenerateVerificationCode(DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions, CancellationToken)

为所有权证明生成验证码。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode
  • 操作IdDpsCertificate_GenerateVerificationCode
GenerateVerificationCode(String, String, Byte[], Nullable<Boolean>, Nullable<DeviceProvisioningServicesCertificatePurpose>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Nullable<Boolean>, String, CancellationToken)

为所有权证明生成验证码。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode
  • 操作IdDpsCertificate_GenerateVerificationCode

GenerateVerificationCode(DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions, CancellationToken)

为所有权证明生成验证码。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode
  • 操作IdDpsCertificate_GenerateVerificationCode
public virtual Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.CertificateVerificationCodeResult> GenerateVerificationCode (Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member GenerateVerificationCode : Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.CertificateVerificationCodeResult>
override this.GenerateVerificationCode : Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.CertificateVerificationCodeResult>
Public Overridable Function GenerateVerificationCode (options As DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of CertificateVerificationCodeResult)

参数

options
DeviceProvisioningServicesCertificateResourceGenerateVerificationCodeOptions

包含此方法的所有参数(LRO 限定符和请求上下文参数除外)的属性包。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

options 为 null。

适用于

GenerateVerificationCode(String, String, Byte[], Nullable<Boolean>, Nullable<DeviceProvisioningServicesCertificatePurpose>, Nullable<DateTimeOffset>, Nullable<DateTimeOffset>, Nullable<Boolean>, String, CancellationToken)

为所有权证明生成验证码。

  • 请求路径/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/provisioningServices/{provisioningServiceName}/certificates/{certificateName}/generateVerificationCode
  • 操作IdDpsCertificate_GenerateVerificationCode
public virtual Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.CertificateVerificationCodeResult> GenerateVerificationCode (string ifMatch, string certificateCommonName = default, byte[] certificateRawBytes = default, bool? certificateIsVerified = default, Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesCertificatePurpose? certificatePurpose = default, DateTimeOffset? certificateCreatedOn = default, DateTimeOffset? certificateLastUpdatedOn = default, bool? certificateHasPrivateKey = default, string certificateNonce = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GenerateVerificationCode : string * string * byte[] * Nullable<bool> * Nullable<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesCertificatePurpose> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<bool> * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.CertificateVerificationCodeResult>
override this.GenerateVerificationCode : string * string * byte[] * Nullable<bool> * Nullable<Azure.ResourceManager.DeviceProvisioningServices.Models.DeviceProvisioningServicesCertificatePurpose> * Nullable<DateTimeOffset> * Nullable<DateTimeOffset> * Nullable<bool> * string * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.DeviceProvisioningServices.Models.CertificateVerificationCodeResult>
Public Overridable Function GenerateVerificationCode (ifMatch As String, Optional certificateCommonName As String = Nothing, Optional certificateRawBytes As Byte() = Nothing, Optional certificateIsVerified As Nullable(Of Boolean) = Nothing, Optional certificatePurpose As Nullable(Of DeviceProvisioningServicesCertificatePurpose) = Nothing, Optional certificateCreatedOn As Nullable(Of DateTimeOffset) = Nothing, Optional certificateLastUpdatedOn As Nullable(Of DateTimeOffset) = Nothing, Optional certificateHasPrivateKey As Nullable(Of Boolean) = Nothing, Optional certificateNonce As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of CertificateVerificationCodeResult)

参数

ifMatch
String

证书的 ETag。 这是更新现有证书所必需的,在创建全新的证书时将被忽略。

certificateCommonName
String

证书的公用名。

certificateRawBytes
Byte[]

证书的原始数据。

certificateIsVerified
Nullable<Boolean>

指示证书是否已由私钥的所有者验证。

certificatePurpose
Nullable<DeviceProvisioningServicesCertificatePurpose>

提及证书用途的说明。

certificateCreatedOn
Nullable<DateTimeOffset>

证书创建时间。

certificateLastUpdatedOn
Nullable<DateTimeOffset>

证书上次更新时间。

certificateHasPrivateKey
Nullable<Boolean>

指示证书是否包含私钥。

certificateNonce
String

为指示所有权证明而生成的随机数。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

ifMatch 为 null。

适用于