Udostępnij za pośrednictwem


SecretClient.GetPropertiesOfSecretVersionsAsync Method

Definition

Lists the properties of all enabled and disabled versions of the specified secret. You can use the returned Name and Version in subsequent calls to GetSecretAsync(String, String, CancellationToken).

public virtual Azure.AsyncPageable<Azure.Security.KeyVault.Secrets.SecretProperties> GetPropertiesOfSecretVersionsAsync (string name, System.Threading.CancellationToken cancellationToken = default);
abstract member GetPropertiesOfSecretVersionsAsync : string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Security.KeyVault.Secrets.SecretProperties>
override this.GetPropertiesOfSecretVersionsAsync : string * System.Threading.CancellationToken -> Azure.AsyncPageable<Azure.Security.KeyVault.Secrets.SecretProperties>
Public Overridable Function GetPropertiesOfSecretVersionsAsync (name As String, Optional cancellationToken As CancellationToken = Nothing) As AsyncPageable(Of SecretProperties)

Parameters

name
String

The name of the secret.

cancellationToken
CancellationToken

A CancellationToken controlling the request lifetime.

Returns

Exceptions

name is an empty string.

name is null.

The server returned an error. See Message for details returned from the server.

Remarks

The full secret identifier and attributes are provided in the response. No values are returned for the secrets. This operations requires the secrets/list permission.

Managed secrets may also be listed. They contain the certificate and private key for certificates stored in Key Vault.

Applies to