I would like to get the Secret value from given SecretID using Python API's. I have folowing code. On the last line I am trying to get the SECRET_VERSION using get_secret_versions function. The function returns SecretItemPaged type of Object. Can someone please help to to retrieve secret_version from this objet.
#!/usr/bin/python
from azure.keyvault import KeyVaultClient
from azure.common.credentials import ServicePrincipalCredentials
import pprint
#from msrestazure.azure_active_directory import
ServicePrincipalCredentials
credentials = ServicePrincipalCredentials(
client_id = 'XXX',
secret = 'XXX',
tenant = 'XXX'
)
client = KeyVaultClient(credentials)
VAULT_URL='https://xxxxxxx.vault.azure.net'
SECRET_ID='https://xxxxxxxx.vault.azure.net/secrets/2345mat'
SECRET_VERSION= client.get_secret_versions(VAULT_URL , SECRET_ID)