Redis - List Keys

Hämta åtkomstnycklarna för en Redis-cache. Den här åtgärden kräver skrivbehörighet till cacheresursen.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redis/{name}/listKeys?api-version=2023-08-01

URI-parametrar

Name I Obligatorisk Typ Description
name
path True

string

Namnet på Redis-cachen.

resourceGroupName
path True

string

Namnet på resursgruppen. Namnet är skiftlägesokänsligt.

subscriptionId
path True

string

ID för målprenumerationen.

api-version
query True

string

Den API-version som ska användas för den här åtgärden.

Svar

Name Typ Description
200 OK

RedisAccessKeys

Listor nycklarna för den angivna Redis-cachen.

Other Status Codes

ErrorResponse

Felsvar som beskriver varför åtgärden misslyckades.

Säkerhet

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation personifiera ditt användarkonto

Exempel

RedisCacheListKeys

Sample Request

POST https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/redis/cache1/listKeys?api-version=2023-08-01

Sample Response

{
  "primaryKey": "<primaryKey>",
  "secondaryKey": "<secondaryKey>"
}

Definitioner

Name Description
ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

ErrorDetail

Felinformationen.

ErrorResponse

Felsvar

RedisAccessKeys

Redis cache-åtkomstnycklar.

ErrorAdditionalInfo

Ytterligare information om resurshanteringsfelet.

Name Typ Description
info

object

Den ytterligare informationen.

type

string

Ytterligare informationstyp.

ErrorDetail

Felinformationen.

Name Typ Description
additionalInfo

ErrorAdditionalInfo[]

Ytterligare information om felet.

code

string

Felkoden.

details

ErrorDetail[]

Felinformationen.

message

string

Felmeddelandet.

target

string

Felmålet.

ErrorResponse

Felsvar

Name Typ Description
error

ErrorDetail

Felobjektet.

RedisAccessKeys

Redis cache-åtkomstnycklar.

Name Typ Description
primaryKey

string

Den aktuella primärnyckeln som klienter kan använda för att autentisera med Redis-cache.

secondaryKey

string

Den aktuella sekundära nyckeln som klienter kan använda för att autentisera med Redis Cache.