Firewall Rules - Create Or Update
Buat atau perbarui aturan firewall.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/firewallRules/{firewallRuleName}?api-version=2021-11-01
Parameter URI
Nama | Dalam | Diperlukan | Jenis | Deskripsi |
---|---|---|---|---|
firewall
|
path | True |
string |
Nama aturan firewall. |
resource
|
path | True |
string |
Nama grup sumber daya yang berisi sumber daya. Anda dapat memperoleh nilai ini dari Azure Resource Manager API atau portal. |
server
|
path | True |
string |
Nama server. |
subscription
|
path | True |
string |
ID langganan yang mengidentifikasi langganan Azure. |
api-version
|
query | True |
string |
Versi API yang digunakan untuk permintaan. |
Isi Permintaan
Nama | Jenis | Deskripsi |
---|---|---|
name |
string |
Nama sumber daya. |
properties.endIpAddress |
string |
Alamat IP akhir aturan firewall. Harus format IPv4. Harus lebih besar dari atau sama dengan startIpAddress. Gunakan nilai '0.0.0.0' untuk semua alamat IP internal Azure. |
properties.startIpAddress |
string |
Alamat IP awal aturan firewall. Harus format IPv4. Gunakan nilai '0.0.0.0' untuk semua alamat IP internal Azure. |
Respons
Nama | Jenis | Deskripsi |
---|---|---|
200 OK |
Berhasil memperbarui aturan firewall. |
|
201 Created |
Berhasil membuat aturan firewall. |
|
Other Status Codes |
Respons Kesalahan: ***
|
Contoh
Create a firewall rule max/min |
Update a firewall rule max/min |
Create a firewall rule max/min
Permintaan sampel
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370?api-version=2021-11-01
{
"properties": {
"startIpAddress": "0.0.0.3",
"endIpAddress": "0.0.0.3"
}
}
Respon sampel
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370",
"name": "firewallrulecrudtest-5370",
"type": "Microsoft.Sql/servers/firewallRules",
"properties": {
"startIpAddress": "0.0.0.3",
"endIpAddress": "0.0.0.3"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-5370",
"name": "firewallrulecrudtest-5370",
"properties": {
"startIpAddress": "0.0.0.3",
"endIpAddress": "0.0.0.3"
}
}
Update a firewall rule max/min
Permintaan sampel
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927?api-version=2021-11-01
{
"properties": {
"startIpAddress": "0.0.0.1",
"endIpAddress": "0.0.0.1"
}
}
Respon sampel
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927",
"name": "firewallrulecrudtest-3927",
"type": "Microsoft.Sql/servers/firewallRules",
"properties": {
"startIpAddress": "0.0.0.1",
"endIpAddress": "0.0.0.1"
}
}
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/firewallrulecrudtest-12/providers/Microsoft.Sql/servers/firewallrulecrudtest-6285/firewallRules/firewallrulecrudtest-3927",
"name": "firewallrulecrudtest-3927",
"type": "Microsoft.Sql/servers/firewallRules",
"properties": {
"startIpAddress": "0.0.0.1",
"endIpAddress": "0.0.0.1"
}
}
Definisi
FirewallRule
Aturan firewall server.
Nama | Jenis | Deskripsi |
---|---|---|
id |
string |
ID Sumber Daya. |
name |
string |
Nama sumber daya. |
properties.endIpAddress |
string |
Alamat IP akhir aturan firewall. Harus format IPv4. Harus lebih besar dari atau sama dengan startIpAddress. Gunakan nilai '0.0.0.0' untuk semua alamat IP internal Azure. |
properties.startIpAddress |
string |
Alamat IP awal aturan firewall. Harus format IPv4. Gunakan nilai '0.0.0.0' untuk semua alamat IP internal Azure. |
type |
string |
Jenis sumber daya |