你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzApiManagementSubscriptionKey
获取订阅密钥。
语法
Get-AzApiManagementSubscriptionKey
-Context <PsApiManagementContext>
-SubscriptionId <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
说明
Get-AzApiManagementSubscriptionKey cmdlet 获取指定订阅的密钥。
示例
示例 1:获取具有指定 ID 的订阅密钥
$apimContext = New-AzApiManagementContext -ResourceGroupName "Api-Default-East-US" -ServiceName "contoso"
Get-AzApiManagementSubscriptionKey -Context $apimContext -SubscriptionId "0123456789"
PrimaryKey : 5e48532634114fe999a6979ce0d63a64
SecondaryKey : 0a8efaf85a664aa0a412241015c7c8f6
此命令按 ID 获取订阅。
参数
-Context
指定 PsApiManagementContext 对象。
类型: | PsApiManagementContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-SubscriptionId
指定订阅标识符。 如果指定,则此 cmdlet 按标识符查找订阅。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
输入
输出
PsApiManagementSubscriptionKey