Create firewall rules
Request
Method | Request URI |
---|---|
PUT | https://management.chinacloudapi.cn/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MySql/servers/{server-name}/firewallRules/{firewall-rule}?api-version=2015-09-01 |
URI parameter
None
Request header
Request package header | Describe URI |
---|---|
x-ms-client-request-id | Optional An opaque value generated by the client, not to exceed 1KB of characters. We strongly recommend setting this value so that the server can use it to obtain the client’s activity information. |
Request body
You must specify parameters when you create or update MySQL Database on Azure servers. A JSON example is provided here:
{
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "255.255.255.255"
}
}
Parameter | Description |
---|---|
startIpAddress | IP whitelist start IP |
endIpAddress | IP whitelist end IP |
Response
An HTTPS response comprises a status code, a response header, and a response body.
Status code
200 OK: Indicates that the server has returned successfully.
Response header
Request package header | Describe URI |
---|---|
x-ms-client-request-id | Can uniquely identify the database request value The request ID is used to track the request information. |
Response body
A JSON example is provided here:
{
"id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MySql/servers/{server-name}/firewallRules/{firewall-rule}",
"name": "{server-name}/{firewall-rule}",
"type": "Microsoft.MySql/servers/firewallRules",
"properties": {
"startIpAddress": "0.0.0.0",
"endIpAddress": "255.255.255.255"
}
}