你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzApiManagementCertificate
修改配置为与后端进行相互身份验证的 API 管理证书。
语法
Set-AzApiManagementCertificate
-Context <PsApiManagementContext>
-CertificateId <String>
[-PfxFilePath <String>]
[-PfxPassword <String>]
[-PassThru]
[-KeyVault <PsApiManagementKeyVaultEntity>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Set-AzApiManagementCertificate
-Context <PsApiManagementContext>
-CertificateId <String>
[-PfxBytes <Byte[]>]
[-PfxPassword <String>]
[-PassThru]
[-KeyVault <PsApiManagementKeyVaultEntity>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Set-AzApiManagementCertificate cmdlet 修改 Azure API 管理证书。
示例
示例 1:修改证书
$ApiMgmtContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-WestUS" -ServiceName "contoso"
Set-AzApiManagementCertificate -Context $ApiMgmtContext -CertificateId "0123456789" -PfxFilePath "C:\contoso\certificates\apimanagementnew.pfx" -PfxPassword "2222"
此命令修改指定的 API 管理证书。
参数
-CertificateId
指定要修改的证书的 ID。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Context
指定 PsApiManagementContext 对象。
类型: | PsApiManagementContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-KeyVault
用于提取证书数据的 KeyVault。如果未指定 -PfxFilePath,则此参数是必需的。
类型: | PsApiManagementKeyVaultEntity |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-PassThru
passthru
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-PfxBytes
以 .pfx 格式指定证书文件的字节数组。 如果未指定 PfxFilePath 参数,则需要此参数。
类型: | Byte[] |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-PfxFilePath
以 .pfx 格式指定要创建和上传的证书文件的路径。 如果未指定 PfxBytes 参数,则需要此参数。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-PfxPassword
指定证书的密码。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
输入
Byte[]