Azure Resources Created Date /Azure app Service Created Date


Azure app Service Created Date

Azure Resources Created Date


Issue:
·       Get the list of resource with created date
·       Web App Created date
·       How can I know when my web app is created?

Solution:
It is not possible to get the web app created date directly.

You can check relevant details on Activity Logs.

Through activity logs, you can determine:

·       What operations were taken on the resources in your subscription
·       Who started the operation?
·       When the operation occurred
·       The status of the operation
·       The values of other properties that might help you research the operation

I just created one web app and able to see the activity logs. You can also check who created it in “Event Initiated By” columns

Azure Resources Created Date



But Activity log has limitation as it retained logs only for 90 days. You can query for any range of dates, as long as the starting date is not more than 90 days in the past.

You can get more information in below URL,

I have investigated and observed that there is no REST API exposed for the web app’s created date property hence we have to think about the alternative way to achieve this.
And one of the most important feature which can help us here is the “TAGS
TAGS are used to organize your azure resources.
You apply tags to your Azure resources giving metadata to logically organize them into a taxonomy. Each tag consists of a name and a value pair.
For example, you can apply the name "Environment" and the value "Production" to all the resources in production similarly you can have “CREATED DATE” tag with the date value.
After you apply tags, you can retrieve all the resources in your subscription with that tag name and value. Tags enable you to retrieve related resources from different resource groups. This approach is helpful when you need to organize resources for billing or management.

You can get more details on below URL,


Once you create tags for “created date” than you can get the list of all your web app/App Services along with the created date.

You can go to your subscription -> resources -> Edit Columns
You can see the  filter name “Tags”



Once you select the Tags and move it to right section then then tag column appear in the filter and you can see the list of all web app along with “created tag” value.



I understand that it is not possible to add tag every time when someone create a web app hence you can use Azure Policy to enforce tagging rules and conventions. By creating a policy, you avoid the scenario of resources being deployed to your subscription that don't comply with the expected tags for your organization. Instead of manually applying tags or searching for resources that aren't compliant, you can create a policy that automatically applies the needed tags during deployment. The following section shows example policies for tags.

You can get more details on below URL,

You can simply apply tag and it’s default value.



References: 


No comments:

Post a Comment