question

DnyaneshwarSurywanshi-3200 avatar image
0 Votes"
DnyaneshwarSurywanshi-3200 asked DnyaneshwarSurywanshi-3200 commented

How to check backup policy enable for Virtual Machine using azure .net SDK or Fluent API?

I want to delete virtual machine if backup policy enabled and backup should be taken before 12 hours if backup not taken since 2 days then show the popup message to user please take backup .

I want to achieve this using azure .net SDK or Fluent API?

azure-virtual-machines
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@DnyaneshwarSurywanshi-3200 , thank you for reaching out to us. To check backup policy enable for a Virtual machine, you will have to make a call to REST API. Backup Status - Get gets the backup status of your Virtual Machine - Check out Azure REST API on details about setup required for calling Azure API from your code.

Further, you can use a DB (like Cosmos DB) to store status for last queried time for a Backup policy status for each VM. Let me know if this answers your question.




0 Votes 0 ·

@HarshitaSingh-MSFT Thank you for the reply but i got the solution using Fluent API.

1 Vote 1 ·

0 Answers