-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KeyVault] Add Status Methods to Query Backup and Restore Operations #14158
Conversation
...eyvault-administration/tests/recordings/test_backup_client.test_full_backup_and_restore.yaml
Outdated
Show resolved
Hide resolved
@@ -61,14 +75,28 @@ def test_selective_key_restore(self, container_uri, sas_token): | |||
# backup the vault | |||
backup_client = KeyVaultBackupClient(self.managed_hsm["url"], self.credential) | |||
backup_poller = backup_client.begin_full_backup(container_uri, sas_token) | |||
|
|||
# check backup status and result | |||
job_id = backup_poller.polling_method().resource().id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#14169 tracks improving this
return await self._client.restore_status( | ||
vault_base_url=self._vault_url, | ||
job_id=job_id, | ||
cls=RestoreOperation._wrap_generated, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a general comment with no action for this PR: interestingly, we can't learn whether the operation is selective from the job ID or the service's status response. We therefore can't know whether to choose RestoreOperation
or SelectiveKeyRestoreOperation
here. Further reason to merge those classes, I suppose.
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_backup_client.py
Outdated
Show resolved
Hide resolved
…into fr-business-cards * 'master' of https://github.com/Azure/azure-sdk-for-python: (71 commits) move the environment prep above the tooling that needs it (#14246) Increment version for appconfiguration releases (#14245) Azure Communication Service - Phone Number Administration (#14237) [text analytics] fix query param in cli call to get endpoint (#14243) Resolve Failing Documentation Build for azure-mgmt-core (#14239) Add code reviewers (#14229) [ServiceBus] make amqp_message properties read-only (#14095) [ServiceBus]remove topic parameter object settability (#14116) app config owner (#12986) [KeyVault] Handle Role Definition UUID Name Internally (#14218) Increment version for storage releases (#14224) Update Key Vault changelogs for October release (#14226) [ServiceBus] CI Test hotfixes (#14195) [text analytics] regen TA with GA autorest (#14215) [Storage][STG74]ChangeLog (#14192) fixes python 2.7 issue with unicode and strings again! (#14216) Feature/storage stg74 (#14175) Update communication pacakges to version b2 (#14209) [KeyVault] Add Status Methods to Query Backup and Restore Operations (#14158) Update buffered sender (#13851) ...
Closes #13718.
Adds methods to
KeyVaultBackupClient
for checking backup and restore operation status. We may want to create a new polling class to make getting job IDs (that are necessary for these methods) easier to obtain.