Azure CLI command to enable Advanced Threat Protection and Data encryption in MySQL servers

Haolan Ye 21 Reputation points
2020-09-04T18:52:04.363+00:00

I am trying to enable "Advanced Threat Protection" and "Data encryption" features for MySQL databases. I found the tutorials for enabling the features in the Azure portal, but I didn't find any documentations for Azure CLI. According to the Azure documentation, “Advanced Threat Protection can be accessed and managed via the Azure portal or using REST API”. I tried to use REST API, but I never find the corresponding API from Azure documentation.

I would like to use Azure CLI to do those operations because we have many MySQL databases, and it's not ideal for us to enable them in the Azure portal. Could you please provide some guidances to enable those features programmatically (such as API endpoints or az command)?

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
842 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mike Ubezzi 2,776 Reputation points
    2020-09-04T23:06:15.907+00:00

    Hi @Haolan Ye - Advanced Threat Detection can only be enable through the Azure Portal and Data Encryption can only be enabled through the Azure Portal or via Azure CLI. The Azure CLI instructions are here: Data encryption for Azure Database for MySQL by using the Azure CLI

    The entire Azure RESTful API Documentation Reference can be found: Azure REST API Reference and the MySQL specification is here: Azure Database for MySQL REST API

    The Azure CLI Examples: Azure CLI samples for Azure Database for MySQL (Link) where the List and update configurations of an Azure Database for MySQL server using Azure CLI (Link) would be the CLI script to list and change server parameters.

    As for a REST operations, the Server Configurations - Create Or Update and Database Configurations - Create Or Update endpoint will invoke the desired modification. You can use the Operations - List endpoint to list all available REST operations.

    Neither Advanced Threat Detection nor Data Encryption can be enable via RESTful API but I have provided the information as a helpful means towards your automation efforts.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.