Hello @Priyanka Mahadik ,
I understand that you would like to know how to create Application Gateway using existing one on the same subscription.
You can export a template from an existing resource and modify it for your scenario. The exported template helps you understand the JSON syntax and properties that deploy your resources.
The export template process attempts to create a usable template. However, most exported templates require some modifications before they can be used to deploy Azure resources.
Export is not guaranteed to succeed. Export is not a reliable way to turn pre-existing resources into templates that are usable in production. It is better to create resources from scratch using hand-written Bicep file, ARM template or terraform.
And there are some limitations in Export as mentioned in the below doc:
You can also use the readily available ARM/Bicep templates to deploy Application gateway by editing the template as per requirement.
Refer the FAQ about ARM templates for more information: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/frequently-asked-questions
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.