Hi Ghulam Abbas,
The only Plan that supports the full enablement (disable and enable) per single VM is P1, P2 supports exclusion only.
- Plan 1 can be enabled and disabled at resource level. - https://learn.microsoft.com/en-us/azure/defender-for-cloud/tutorial-enable-servers-plan#enable-defender-for-servers-at-the-resource-level
- Plan 2 can't be enabled at the resource level, but you can disable the plan at the resource level or turn off a plan for multiple machines. via script or policy or Turn off a plan for specific machines via API - Update Pricing
For more details refer to the deployment scope table here - https://learn.microsoft.com/en-us/azure/defender-for-cloud/plan-defender-for-servers-select-plan#decide-on-deployment-scope