Thank you for posting this in Microsoft Q&A.
There are some CLI commands that are used for security alerts. However, there is no specific command for creating security alert as per below article,
https://learn.microsoft.com/en-us/cli/azure/security/alert?view=azure-cli-latest#commands
But you can try this through logic apps,
- Open the Azure portal and create a new Logic App.
- Add a new trigger to the Logic App by selecting the "When a HTTP request is received" trigger.
- Add a new action to the Logic App by selecting the "Create an alert" action.
- Configure the "Create an alert" action to create a sample alert with the specified details.
- Save and run the Logic App.
This will trigger a sample alert in Defender for Cloud.
Let me know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.