Skip to content

Commit 87cf396

Browse files
Add purge AZ CLI command
1 parent 6e48d86 commit 87cf396

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

shared/python/show_soft_deleted_resources.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ def show_deleted_apim_services(services: list):
7171
service_id = service.get('serviceId', 'N/A')
7272

7373
print(f'{i}/{len(services)}:')
74-
print(f' Service Name : {service_name}')
75-
print(f' Location : {location}')
76-
print(f' Deletion Date : {deletion_date}')
77-
print(f' Purge Date : {scheduled_purge}')
78-
print(f' Service ID : {service_id}')
74+
print(f' Service Name : {service_name}')
75+
print(f' Location : {location}')
76+
print(f' Deletion Date : {deletion_date}')
77+
print(f' Purge Date : {scheduled_purge}')
78+
print(f' Service ID : {service_id}')
79+
print(f' Purge AZ CLI : az apim deletedservice purge --service-name {service_name} --location "{location}"')
7980
print()
8081

8182
print('To purge an APIM service:')
@@ -132,6 +133,7 @@ def show_deleted_key_vaults(vaults: list):
132133
print(f' Purge Date : {scheduled_purge}')
133134
print(f' Purge Protection : {"🔒 ENABLED" if purge_protection else "❌ Disabled"}')
134135
print(f' Vault ID : {vault_id}')
136+
print(f' Purge AZ CLI : az keyvault purge --name {vault_name} --location "{location}"')
135137
print()
136138

137139
if protected_vaults:

0 commit comments

Comments
 (0)