Megosztás a következőn keresztül:


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
configurationName
path True

string

A hálózatkezelő biztonsági konfigurációjának neve.

networkManagerName
path True

string

pattern: ^[0-9a-zA-Z]([0-9a-zA-Z_.-]{0,62}[0-9a-zA-Z_])?$

A hálózatkezelő neve.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

Az erőforráscsoport neve. A név nem megkülönbözteti a kis- és nagybetűket.

ruleCollectionName
path True

string

A network manager biztonsági konfigurációs szabálygyűjteményének neve.

ruleName
path True

string

A szabály neve.

subscriptionId
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
AdminRule

Hálózati rendszergazdai szabály.

DefaultAdminRule

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

SecurityConfigurationRuleAccess

Az adott szabályhoz engedélyezett hozzáférést jelzi

properties.direction True

SecurityConfigurationRuleDirection

Azt jelzi, hogy a forgalom megfelelt-e a bejövő vagy kimenő szabálynak.

properties.priority True

integer (int32)

minimum: 1
maximum: 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

SecurityConfigurationRuleProtocol

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

AddressPrefixItem[]

A célcímelőtagok. CIDR- vagy cél IP-tartományok.

properties.sourcePortRanges

string[]

A forrásporttartományok.

properties.sources

AddressPrefixItem[]

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

CommonErrorResponse

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
AddressPrefixItem

Címelőtag elem.

AddressPrefixType

Címelőtag típusa.

AdminRule

Hálózati rendszergazdai szabály.

AdminRuleKind

Legyen az egyéni vagy alapértelmezett szabály.

CommonErrorAdditionalInfo

Az erőforrás-kezelési hiba további információi.

CommonErrorDetail

A hiba részletei.

CommonErrorResponse

Hibaválasz

createdByType

Az erőforrást létrehozó identitás típusa.

DefaultAdminRule

Hálózati alapértelmezett rendszergazdai szabály.

ProvisioningState

Erőforrás kiépítési állapotai.

SecurityConfigurationRuleAccess

A hálózati forgalom engedélyezett-e vagy megtagadva.

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.

SecurityConfigurationRuleProtocol

Ez a szabály a hálózati protokollra vonatkozik.

systemData

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

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

SecurityConfigurationRuleAccess

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

AddressPrefixItem[]

A célcímelőtagok. CIDR- vagy cél IP-tartományok.

properties.direction

SecurityConfigurationRuleDirection

Azt jelzi, hogy a forgalom megfelelt-e a bejövő vagy kimenő szabálynak.

properties.priority

integer (int32)

minimum: 1
maximum: 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

SecurityConfigurationRuleProtocol

Ez a szabály a hálózati protokollra vonatkozik.

properties.provisioningState

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

AddressPrefixItem[]

A CIDR vagy a forrás IP-tartományai.

systemData

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

CommonErrorAdditionalInfo[]

A hiba további információi.

code

string

A hibakód.

details

CommonErrorDetail[]

A hiba részletei.

message

string

A hibaüzenet.

target

string

A hibacél.

CommonErrorResponse

Hibaválasz

Name Típus Description
error

CommonErrorDetail

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

SecurityConfigurationRuleAccess

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

AddressPrefixItem[]

A célcímelőtagok. CIDR- vagy cél IP-tartományok.

properties.direction

SecurityConfigurationRuleDirection

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

SecurityConfigurationRuleProtocol

Ez a szabály a hálózati protokollra vonatkozik.

properties.provisioningState

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

AddressPrefixItem[]

A CIDR vagy a forrás IP-tartományai.

systemData

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

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

createdByType

Az erőforrást legutóbb módosító identitás típusa.