你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Update-AzApiManagementCache
更新 Api 管理服务中的缓存。
语法
Update-AzApiManagementCache
-Context <PsApiManagementContext>
-CacheId <String>
[-ConnectionString <String>]
[-AzureRedisResourceId <String>]
[-Description <String>]
[-UseFromLocation <String>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzApiManagementCache
-InputObject <PsApiManagementCache>
[-ConnectionString <String>]
[-AzureRedisResourceId <String>]
[-Description <String>]
[-UseFromLocation <String>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzApiManagementCache
-ResourceId <String>
[-ConnectionString <String>]
[-AzureRedisResourceId <String>]
[-Description <String>]
[-UseFromLocation <String>]
[-PassThru]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
说明
cmdlet Update-AzApiManagementCache 更新 ApiManagement 服务中的缓存。
示例
示例 1:更新 centralus 中缓存的说明
$context=New-AzApiManagementContext -ResourceGroupName Api-Default-Central-US -ServiceName contoso
Update-AzApiManagementCache -Context $context -CacheId centralus -Description "Team new cache" -PassThru
CacheId : centralus
Description : Team new cache
ConnectionString : {{5cc19889e6ed3b0524c3f7d3}}
AzureRedisResourceId :
Id : /subscriptions/subid/resourceGroups/Api-Default-Central-US/providers/M
icrosoft.ApiManagement/service/contoso/caches/centralus
ResourceGroupName : Api-Default-Central-US
ServiceName : contoso
更新美国中部缓存的说明。
参数
-AzureRedisResourceId
Azure Redis 缓存实例的 Arm ResourceId。 此参数是可选的。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-CacheId
新缓存的标识符。 此参数是必需的。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Confirm
在运行 cmdlet 之前,提示你进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-ConnectionString
Redis 连接字符串。 此参数是可选的。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-Context
PsApiManagementContext 的实例。 此参数是必需的。
类型: | PsApiManagementContext |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Description
缓存说明。 此参数是可选的。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-InputObject
PsApiManagementCache 的实例。 此参数是必需的。
类型: | PsApiManagementCache |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-PassThru
如果指定,则表示修改后的缓存的 Microsoft.Azure.Commands.ApiManagement.ServiceManagement.Models.PsApiManagementCache 类型的实例将写入输出。
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-ResourceId
缓存的 Arm ResourceId。 此参数是必需的。
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-UseFromLocation
Cache UseFromLocation。 此参数是可选的默认值“default”。
类型: | String |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | True |
接受通配符: | False |
-WhatIf
显示 cmdlet 运行时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |