Admin Rules - Create Or Update
Rendszergazdai szabályt hoz létre vagy frissít.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}?api-version=2025-05-01
URI-paraméterek
| Name | In | Kötelező | Típus | Description |
|---|---|---|---|---|
|
configuration
|
path | True |
string |
A hálózatkezelő biztonsági konfigurációjának neve. |
|
network
|
path | True |
string pattern: ^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$ |
A hálózatkezelő neve. |
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket. |
|
rule
|
path | True |
string |
A network manager biztonsági konfigurációs szabálygyűjteményének neve. |
|
rule
|
path | True |
string |
A szabály neve. |
|
subscription
|
path | True |
string (uuid) |
A cél-előfizetés azonosítója. Az értéknek UUID-nek kell lennie. |
|
api-version
|
query | True |
string minLength: 1 |
A művelethez használandó API-verzió. |
Kérelem törzse
A kérelem törzse az alábbiak valamelyike lehet:
| Name | Description |
|---|---|
|
Admin |
Hálózati rendszergazdai szabály. |
|
Default |
Hálózati alapértelmezett rendszergazdai szabály. |
AdminRule
Hálózati rendszergazdai szabály.
| Name | Kötelező | Típus | Description |
|---|---|---|---|
| kind | True |
string:
Custom |
Legyen az egyéni vagy alapértelmezett szabály. |
| properties.access | True |
Az adott szabályhoz engedélyezett hozzáférést jelzi |
|
| properties.direction | True |
Azt jelzi, hogy a forgalom megfelelt-e a bejövő vagy kimenő szabálynak. |
|
| properties.priority | True |
integer (int32) minimum: 1maximum: 4096 |
A szabály prioritása. Az érték 1 és 4096 között lehet. A prioritási számnak egyedinek kell lennie a gyűjtemény minden szabályához. Minél alacsonyabb a prioritási szám, annál magasabb a szabály prioritása. |
| properties.protocol | True |
Ez a szabály a hálózati protokollra vonatkozik. |
|
| properties.description |
string |
A szabály leírása. 140 karakterre korlátozva. |
|
| properties.destinationPortRanges |
string[] |
A célporttartományok. |
|
| properties.destinations |
A célcímelőtagok. CIDR- vagy cél IP-tartományok. |
||
| properties.sourcePortRanges |
string[] |
A forrásporttartományok. |
|
| properties.sources |
A CIDR vagy a forrás IP-tartományai. |
DefaultAdminRule
Hálózati alapértelmezett rendszergazdai szabály.
| Name | Kötelező | Típus | Description |
|---|---|---|---|
| kind | True |
string:
Default |
Legyen az egyéni vagy alapértelmezett szabály. |
| properties.flag |
string |
Alapértelmezett szabályjelölő. |
Válaszok
| Name | Típus | Description |
|---|---|---|
| 200 OK | BaseAdminRule: |
Resource 'BaseAdminRule' frissítési művelete sikeres |
| 201 Created | BaseAdminRule: |
'BaseAdminRule' erőforrás létrehozása művelet sikeres |
| Other Status Codes |
Váratlan hibaválasz. |
Biztonság
azure_auth
Azure Active Directory OAuth2-folyamat.
Típus:
oauth2
Folyamat:
implicit
Engedélyezési URL:
https://login.microsoftonline.com/common/oauth2/authorize
Hatókörök
| Name | Description |
|---|---|
| user_impersonation | a felhasználói fiók megszemélyesítése |
Példák
| Create a admin rule with network group as source or destination |
| Create an admin rule |
Create a admin rule with network group as source or destination
Mintakérelem
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule?api-version=2025-05-01
{
"kind": "Custom",
"properties": {
"description": "This is Sample Admin Rule",
"access": "Deny",
"destinationPortRanges": [
"22"
],
"destinations": [
{
"addressPrefix": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/networkGroups/ng1",
"addressPrefixType": "NetworkGroup"
}
],
"direction": "Inbound",
"priority": 1,
"sourcePortRanges": [
"0-65535"
],
"sources": [
{
"addressPrefix": "Internet",
"addressPrefixType": "ServiceTag"
}
],
"protocol": "Tcp"
}
}
Mintaválasz
{
"name": "SampleAdminRule",
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule",
"kind": "Custom",
"properties": {
"description": "This is Sample Admin Rule using a network group as a source and destination.",
"access": "Deny",
"destinationPortRanges": [
"22"
],
"destinations": [
{
"addressPrefix": "*",
"addressPrefixType": "IPPrefix"
}
],
"direction": "Inbound",
"priority": 1,
"provisioningState": "Succeeded",
"sourcePortRanges": [
"0-65535"
],
"sources": [
{
"addressPrefix": "Internet",
"addressPrefixType": "ServiceTag"
}
],
"protocol": "Tcp"
},
"systemData": {
"createdAt": "2021-01-11T18:52:27Z",
"createdBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"createdByType": "User",
"lastModifiedAt": "2021-01-11T18:52:27Z",
"lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"lastModifiedByType": "User"
}
}
{
"name": "SampleAdminRule",
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule",
"kind": "Custom",
"properties": {
"description": "This is Sample Admin Rule using a network group as a source and destination.",
"access": "Deny",
"destinationPortRanges": [
"22"
],
"destinations": [
{
"addressPrefix": "*",
"addressPrefixType": "IPPrefix"
}
],
"direction": "Inbound",
"priority": 1,
"provisioningState": "Succeeded",
"sourcePortRanges": [
"0-65535"
],
"sources": [
{
"addressPrefix": "Internet",
"addressPrefixType": "ServiceTag"
}
],
"protocol": "Tcp"
},
"systemData": {
"createdAt": "2021-01-11T18:52:27Z",
"createdBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"createdByType": "User",
"lastModifiedAt": "2021-01-11T18:52:27Z",
"lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"lastModifiedByType": "User"
}
}
Create an admin rule
Mintakérelem
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule?api-version=2025-05-01
{
"kind": "Custom",
"properties": {
"description": "This is Sample Admin Rule",
"access": "Deny",
"destinationPortRanges": [
"22"
],
"destinations": [
{
"addressPrefix": "*",
"addressPrefixType": "IPPrefix"
}
],
"direction": "Inbound",
"priority": 1,
"sourcePortRanges": [
"0-65535"
],
"sources": [
{
"addressPrefix": "Internet",
"addressPrefixType": "ServiceTag"
}
],
"protocol": "Tcp"
}
}
Mintaválasz
{
"name": "SampleAdminRule",
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule",
"kind": "Custom",
"properties": {
"description": "This is Sample Admin Rule",
"access": "Deny",
"destinationPortRanges": [
"22"
],
"destinations": [
{
"addressPrefix": "*",
"addressPrefixType": "IPPrefix"
}
],
"direction": "Inbound",
"priority": 1,
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
"sourcePortRanges": [
"0-65535"
],
"sources": [
{
"addressPrefix": "Internet",
"addressPrefixType": "ServiceTag"
}
],
"protocol": "Tcp"
},
"systemData": {
"createdAt": "2021-01-11T18:52:27Z",
"createdBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"createdByType": "User",
"lastModifiedAt": "2021-01-11T18:52:27Z",
"lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"lastModifiedByType": "User"
}
}
{
"name": "SampleAdminRule",
"type": "Microsoft.Network/networkManagers/securityAdminConfigurations/ruleCollections/rules",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/networkManagers/testNetworkManager/securityAdminConfigurations/myTestSecurityConfig/ruleCollections/testRuleCollection/rules/SampleAdminRule",
"kind": "Custom",
"properties": {
"description": "This is Sample Admin Rule",
"access": "Deny",
"destinationPortRanges": [
"22"
],
"destinations": [
{
"addressPrefix": "*",
"addressPrefixType": "IPPrefix"
}
],
"direction": "Inbound",
"priority": 1,
"provisioningState": "Succeeded",
"resourceGuid": "00000000-0000-0000-0000-000000000000",
"sourcePortRanges": [
"0-65535"
],
"sources": [
{
"addressPrefix": "Internet",
"addressPrefixType": "ServiceTag"
}
],
"protocol": "Tcp"
},
"systemData": {
"createdAt": "2021-01-11T18:52:27Z",
"createdBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"createdByType": "User",
"lastModifiedAt": "2021-01-11T18:52:27Z",
"lastModifiedBy": "b69a9388-9488-4534-b470-7ec6d41beef5",
"lastModifiedByType": "User"
}
}
Definíciók
| Name | Description |
|---|---|
|
Address |
Címelőtag elem. |
|
Address |
Címelőtag típusa. |
|
Admin |
Hálózati rendszergazdai szabály. |
|
Admin |
Legyen az egyéni vagy alapértelmezett szabály. |
|
Common |
Az erőforrás-kezelési hiba további információi. |
|
Common |
A hiba részletei. |
|
Common |
Hibaválasz |
|
created |
Az erőforrást létrehozó identitás típusa. |
|
Default |
Hálózati alapértelmezett rendszergazdai szabály. |
|
Provisioning |
Erőforrás kiépítési állapotai. |
|
Security |
A hálózati forgalom engedélyezett-e vagy megtagadva. |
|
Security |
A szabály iránya. Az irány határozza meg, hogy a szabály kiértékelése a bejövő vagy a kimenő forgalom esetén történik-e. |
|
Security |
Ez a szabály a hálózati protokollra vonatkozik. |
|
system |
Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok. |
AddressPrefixItem
Címelőtag elem.
| Name | Típus | Description |
|---|---|---|
| addressPrefix |
string |
Címelőtag. |
| addressPrefixType |
Címelőtag típusa. |
AddressPrefixType
Címelőtag típusa.
| Érték | Description |
|---|---|
| IPPrefix |
IPPrefix |
| ServiceTag |
ServiceTag |
| NetworkGroup |
NetworkGroup |
AdminRule
Hálózati rendszergazdai szabály.
| Name | Típus | Description |
|---|---|---|
| etag |
string |
Egyedi írásvédett sztring, amely az erőforrás frissítésekor változik. |
| id |
string |
Erőforrás-azonosító. |
| kind |
string:
Custom |
Legyen az egyéni vagy alapértelmezett szabály. |
| name |
string |
Erőforrás neve. |
| properties.access |
Az adott szabályhoz engedélyezett hozzáférést jelzi |
|
| properties.description |
string |
A szabály leírása. 140 karakterre korlátozva. |
| properties.destinationPortRanges |
string[] |
A célporttartományok. |
| properties.destinations |
A célcímelőtagok. CIDR- vagy cél IP-tartományok. |
|
| properties.direction |
Azt jelzi, hogy a forgalom megfelelt-e a bejövő vagy kimenő szabálynak. |
|
| properties.priority |
integer (int32) minimum: 1maximum: 4096 |
A szabály prioritása. Az érték 1 és 4096 között lehet. A prioritási számnak egyedinek kell lennie a gyűjtemény minden szabályához. Minél alacsonyabb a prioritási szám, annál magasabb a szabály prioritása. |
| properties.protocol |
Ez a szabály a hálózati protokollra vonatkozik. |
|
| properties.provisioningState |
Az erőforrás kiépítési állapota. |
|
| properties.resourceGuid |
string |
Az erőforrás egyedi azonosítója. |
| properties.sourcePortRanges |
string[] |
A forrásporttartományok. |
| properties.sources |
A CIDR vagy a forrás IP-tartományai. |
|
| systemData |
Az erőforráshoz kapcsolódó rendszer metaadatai. |
|
| type |
string |
Erőforrás típusa. |
AdminRuleKind
Legyen az egyéni vagy alapértelmezett szabály.
| Érték | Description |
|---|---|
| Custom |
Személyre szabott |
| Default |
Alapértelmezett |
CommonErrorAdditionalInfo
Az erőforrás-kezelési hiba további információi.
| Name | Típus | Description |
|---|---|---|
| info |
A további információk. |
|
| type |
string |
A további információtípus. |
CommonErrorDetail
A hiba részletei.
| Name | Típus | Description |
|---|---|---|
| additionalInfo |
A hiba további információi. |
|
| code |
string |
A hibakód. |
| details |
A hiba részletei. |
|
| message |
string |
A hibaüzenet. |
| target |
string |
A hibacél. |
CommonErrorResponse
Hibaválasz
| Name | Típus | Description |
|---|---|---|
| error |
A hibaobjektum. |
createdByType
Az erőforrást létrehozó identitás típusa.
| Érték | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
DefaultAdminRule
Hálózati alapértelmezett rendszergazdai szabály.
| Name | Típus | Description |
|---|---|---|
| etag |
string |
Egyedi írásvédett sztring, amely az erőforrás frissítésekor változik. |
| id |
string |
Erőforrás-azonosító. |
| kind |
string:
Default |
Legyen az egyéni vagy alapértelmezett szabály. |
| name |
string |
Erőforrás neve. |
| properties.access |
Az adott szabályhoz engedélyezett hozzáférést jelzi |
|
| properties.description |
string |
A szabály leírása. 140 karakterre korlátozva. |
| properties.destinationPortRanges |
string[] |
A célporttartományok. |
| properties.destinations |
A célcímelőtagok. CIDR- vagy cél IP-tartományok. |
|
| properties.direction |
Azt jelzi, hogy a forgalom megfelelt-e a bejövő vagy kimenő szabálynak. |
|
| properties.flag |
string |
Alapértelmezett szabályjelölő. |
| properties.priority |
integer (int32) |
A szabály prioritása. Az érték 1 és 4096 között lehet. A prioritási számnak egyedinek kell lennie a gyűjtemény minden szabályához. Minél alacsonyabb a prioritási szám, annál magasabb a szabály prioritása. |
| properties.protocol |
Ez a szabály a hálózati protokollra vonatkozik. |
|
| properties.provisioningState |
Az erőforrás kiépítési állapota. |
|
| properties.resourceGuid |
string |
Az erőforrás egyedi azonosítója. |
| properties.sourcePortRanges |
string[] |
A forrásporttartományok. |
| properties.sources |
A CIDR vagy a forrás IP-tartományai. |
|
| systemData |
Az erőforráshoz kapcsolódó rendszer metaadatai. |
|
| type |
string |
Erőforrás típusa. |
ProvisioningState
Erőforrás kiépítési állapotai.
| Érték | Description |
|---|---|
| Failed |
Meghiúsult |
| Succeeded |
Sikerült |
| Canceled |
Érvénytelenített |
| Creating |
Létrehozás |
| Updating |
Frissítés |
| Deleting |
Törlés |
SecurityConfigurationRuleAccess
A hálózati forgalom engedélyezett-e vagy megtagadva.
| Érték | Description |
|---|---|
| Allow |
Allow |
| Deny |
Megtagadás |
| AlwaysAllow |
Mindig engedélyezni |
SecurityConfigurationRuleDirection
A szabály iránya. Az irány határozza meg, hogy a szabály kiértékelése a bejövő vagy a kimenő forgalom esetén történik-e.
| Érték | Description |
|---|---|
| Inbound |
Bejövő |
| Outbound |
Kimenő |
SecurityConfigurationRuleProtocol
Ez a szabály a hálózati protokollra vonatkozik.
| Érték | Description |
|---|---|
| Tcp |
Tcp |
| Udp |
Udp |
| Icmp |
Icmp |
| Esp |
Esp |
| Any |
Bármely |
| Ah |
Ah |
systemData
Az erőforrás létrehozásával és utolsó módosításával kapcsolatos metaadatok.
| Name | Típus | Description |
|---|---|---|
| createdAt |
string (date-time) |
Az erőforrás-létrehozás időbélyege (UTC). |
| createdBy |
string |
Az erőforrást létrehozó identitás. |
| createdByType |
Az erőforrást létrehozó identitás típusa. |
|
| lastModifiedAt |
string (date-time) |
Az erőforrás utolsó módosításának időbélyege (UTC) |
| lastModifiedBy |
string |
Az erőforrást legutóbb módosító identitás. |
| lastModifiedByType |
Az erőforrást legutóbb módosító identitás típusa. |