你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Redis - List Keys
检索 Redis 缓存的访问密钥。 此操作需要缓存资源的写入权限。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listKeys?api-version=2024-03-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
name
|
path | True |
string |
Redis 缓存的名称。 |
resource
|
path | True |
string |
资源组的名称。 此名称不区分大小写。 |
subscription
|
path | True |
string |
目标订阅的 ID。 |
api-version
|
query | True |
string |
要用于此操作的 API 版本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
Lists指定 Redis 缓存的密钥。 |
|
Other Status Codes |
描述操作失败原因的错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
RedisCacheListKeys
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1/listKeys?api-version=2024-03-01
Sample Response
{
"primaryKey": "<primaryKey>",
"secondaryKey": "<secondaryKey>"
}
定义
名称 | 说明 |
---|---|
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Redis |
Redis 缓存访问密钥。 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
RedisAccessKeys
Redis 缓存访问密钥。
名称 | 类型 | 说明 |
---|---|---|
primaryKey |
string |
客户端可用于对 Redis 缓存进行身份验证的当前主密钥。 |
secondaryKey |
string |
客户端可用于对 Redis 缓存进行身份验证的当前辅助密钥。 |