你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Pre Rules - Create Or Update

创建 PreRulesResource

PUT https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}?api-version=2025-05-23

URI 参数

名称 必需 类型 说明
globalRulestackName
path True

string

GlobalRulestack 资源名称

priority
path True

string

Pre Rule 优先级

api-version
query True

string

minLength: 1

用于此操作的 API 版本。

请求正文

名称 必需 类型 说明
properties.ruleName True

string

规则名称

properties.actionType

ActionEnum

规则操作

properties.applications

string[]

规则应用程序的数组

properties.auditComment

string

规则注释

properties.category

Category

规则类别

properties.decryptionRuleType

DecryptionRuleTypeEnum

启用或禁用解密

properties.description

string

规则说明

properties.destination

DestinationAddr

目标地址

properties.enableLogging

StateEnum

启用或禁用日志记录

properties.etag

string

etag 信息

properties.inboundInspectionCertificate

string

入站检查证书

properties.negateDestination

BooleanEnum

cidr 不应为“any”

properties.negateSource

BooleanEnum

cidr 不应为“any”

properties.protocol

string

any, application-default, TCP:number, UDP:number

properties.protocolPortList

string[]

prot 端口列表

properties.ruleState

StateEnum

此规则的状态

properties.source

SourceAddr

源地址

properties.tags

TagInfo[]

规则标记

响应

名称 类型 说明
200 OK

PreRulesResource

Azure 操作已成功完成。

201 Created

PreRulesResource

Azure 创建作已成功完成。

Other Status Codes

ErrorResponse

所有 Azure 资源管理器 API 的常见错误响应,以返回失败作的错误详细信息。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

PreRules_CreateOrUpdate_MaximumSet_Gen
PreRules_CreateOrUpdate_MinimumSet_Gen

PreRules_CreateOrUpdate_MaximumSet_Gen

示例请求

PUT https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/preRules/1?api-version=2025-05-23

{
  "properties": {
    "actionType": "Allow",
    "applications": [
      "app1"
    ],
    "auditComment": "example comment",
    "category": {
      "feeds": [
        "feed"
      ],
      "urlCustom": [
        "https://microsoft.com"
      ]
    },
    "decryptionRuleType": "SSLOutboundInspection",
    "description": "description of pre rule",
    "destination": {
      "cidrs": [
        "1.0.0.1/10"
      ],
      "countries": [
        "India"
      ],
      "feeds": [
        "feed"
      ],
      "fqdnLists": [
        "FQDN1"
      ],
      "prefixLists": [
        "PL1"
      ]
    },
    "enableLogging": "DISABLED",
    "etag": "c18e6eef-ba3e-49ee-8a85-2b36c863a9d0",
    "inboundInspectionCertificate": "cert1",
    "negateDestination": "TRUE",
    "negateSource": "TRUE",
    "protocol": "HTTP",
    "protocolPortList": [
      "80"
    ],
    "provisioningState": "Accepted",
    "ruleName": "preRule1",
    "ruleState": "DISABLED",
    "source": {
      "cidrs": [
        "1.0.0.1/10"
      ],
      "countries": [
        "India"
      ],
      "feeds": [
        "feed"
      ],
      "prefixLists": [
        "PL1"
      ]
    },
    "tags": [
      {
        "key": "keyName",
        "value": "value"
      }
    ]
  }
}

示例响应

{
  "id": "aaaaaaaaaaaaaaaaaaaaaa",
  "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "properties": {
    "actionType": "Allow",
    "applications": [
      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    ],
    "auditComment": "aaa",
    "category": {
      "feeds": [
        "aaaaaaaaaaaa"
      ],
      "urlCustom": [
        "aaaaa"
      ]
    },
    "decryptionRuleType": "SSLOutboundInspection",
    "description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "destination": {
      "cidrs": [
        "aaaaaaa"
      ],
      "countries": [
        "aaaaaaaaaaaaaa"
      ],
      "feeds": [
        "aaaaaaaaaaaaaaaaaaaaaaaaaa"
      ],
      "fqdnLists": [
        "aaaaaaaaaaaaa"
      ],
      "prefixLists": [
        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      ]
    },
    "enableLogging": "DISABLED",
    "etag": "aaaaaaaaaaaaaaaaaaaa",
    "inboundInspectionCertificate": "aaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "negateDestination": "TRUE",
    "negateSource": "TRUE",
    "priority": 24,
    "protocol": "aaaa",
    "protocolPortList": [
      "aaaaaaaaaaaa"
    ],
    "provisioningState": "Accepted",
    "ruleName": "aaaaaaaaaaaaaaaaaaaaaaaaa",
    "ruleState": "DISABLED",
    "source": {
      "cidrs": [
        "aaa"
      ],
      "countries": [
        "aaaaa"
      ],
      "feeds": [
        "aaaaaaaaaaaaaaaaaaa"
      ],
      "prefixLists": [
        "aaaaaaaaaaaaaaaaaaaa"
      ]
    },
    "tags": [
      {
        "key": "keyName",
        "value": "value"
      }
    ]
  },
  "systemData": {
    "createdAt": "2022-09-09T05:08:24.229Z",
    "createdBy": "praval",
    "createdByType": "User",
    "lastModifiedAt": "2022-09-09T05:08:24.229Z",
    "lastModifiedBy": "praval",
    "lastModifiedByType": "User"
  },
  "type": "aaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Azure-AsyncOperation: https://foo.com/operationstatus
{
  "id": "aaaaaaaaaaaaaaaaaaaaaa",
  "name": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "properties": {
    "actionType": "Allow",
    "applications": [
      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
    ],
    "auditComment": "aaa",
    "category": {
      "feeds": [
        "aaaaaaaaaaaa"
      ],
      "urlCustom": [
        "aaaaa"
      ]
    },
    "decryptionRuleType": "SSLOutboundInspection",
    "description": "aaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "destination": {
      "cidrs": [
        "aaaaaaa"
      ],
      "countries": [
        "aaaaaaaaaaaaaa"
      ],
      "feeds": [
        "aaaaaaaaaaaaaaaaaaaaaaaaaa"
      ],
      "fqdnLists": [
        "aaaaaaaaaaaaa"
      ],
      "prefixLists": [
        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
      ]
    },
    "enableLogging": "DISABLED",
    "etag": "aaaaaaaaaaaaaaaaaaaa",
    "inboundInspectionCertificate": "aaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "negateDestination": "TRUE",
    "negateSource": "TRUE",
    "priority": 24,
    "protocol": "aaaa",
    "protocolPortList": [
      "aaaaaaaaaaaa"
    ],
    "provisioningState": "Accepted",
    "ruleName": "aaaaaaaaaaaaaaaaaaaaaaaaa",
    "ruleState": "DISABLED",
    "source": {
      "cidrs": [
        "aaa"
      ],
      "countries": [
        "aaaaa"
      ],
      "feeds": [
        "aaaaaaaaaaaaaaaaaaa"
      ],
      "prefixLists": [
        "aaaaaaaaaaaaaaaaaaaa"
      ]
    },
    "tags": [
      {
        "key": "keyName",
        "value": "value"
      }
    ]
  },
  "systemData": {
    "createdAt": "2022-09-09T05:08:24.229Z",
    "createdBy": "praval",
    "createdByType": "User",
    "lastModifiedAt": "2022-09-09T05:08:24.229Z",
    "lastModifiedBy": "praval",
    "lastModifiedByType": "User"
  },
  "type": "aaaaaaaaaaaaaaaaaaaaaaaaaa"
}

PreRules_CreateOrUpdate_MinimumSet_Gen

示例请求

PUT https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/preRules/1?api-version=2025-05-23

{
  "properties": {
    "ruleName": "preRule1"
  }
}

示例响应

{
  "id": "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/prerules/1",
  "properties": {
    "ruleName": "aaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}
Azure-AsyncOperation: https://foo.com/operationstatus
{
  "id": "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/lrs1/prerules/1",
  "properties": {
    "ruleName": "aaaaaaaaaaaaaaaaaaaaaaaaa"
  }
}

定义

名称 说明
ActionEnum
BooleanEnum

布尔枚举

Category

要匹配的 URL/EDL

createdByType

创建资源的标识的类型。

DecryptionRuleTypeEnum
DestinationAddr

目标地址

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

PreRulesResource

PreRulestack 规则列表

ProvisioningState

防火墙资源的供应状态。

SourceAddr

地址属性

StateEnum

启用或禁用的枚举

systemData

与创建和上次修改资源相关的元数据。

TagInfo

标记

ActionEnum

说明
Allow
DenyResetBoth
DenyResetServer
DenySilent

BooleanEnum

布尔枚举

说明
FALSE
TRUE

Category

要匹配的 URL/EDL

名称 类型 说明
feeds

string[]

源列表

urlCustom

string[]

自定义 URL

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

DecryptionRuleTypeEnum

说明
None
SSLInboundInspection
SSLOutboundInspection

DestinationAddr

目标地址

名称 类型 说明
cidrs

string[]

特殊值“any”

countries

string[]

国家/地区列表

feeds

string[]

源列表

fqdnLists

string[]

fqdn 列表

prefixLists

string[]

前缀列表

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

PreRulesResource

PreRulestack 规则列表

名称 类型 默认值 说明
id

string

资源的完全限定资源 ID。 示例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

资源的名称

properties.actionType

ActionEnum

规则操作

properties.applications

string[]

规则应用程序的数组

properties.auditComment

string

规则注释

properties.category

Category

规则类别

properties.decryptionRuleType

DecryptionRuleTypeEnum

启用或禁用解密

properties.description

string

规则说明

properties.destination

DestinationAddr

目标地址

properties.enableLogging

StateEnum

启用或禁用日志记录

properties.etag

string

etag 信息

properties.inboundInspectionCertificate

string

入站检查证书

properties.negateDestination

BooleanEnum

cidr 不应为“any”

properties.negateSource

BooleanEnum

cidr 不应为“any”

properties.priority

integer (int32)

properties.protocol

string

application-default

any, application-default, TCP:number, UDP:number

properties.protocolPortList

string[]

prot 端口列表

properties.provisioningState

ProvisioningState

资源的预配状态。

properties.ruleName

string

规则名称

properties.ruleState

StateEnum

此规则的状态

properties.source

SourceAddr

源地址

properties.tags

TagInfo[]

规则标记

systemData

systemData

此资源的系统元数据。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

ProvisioningState

防火墙资源的供应状态。

说明
Accepted
Canceled
Creating
Deleted
Deleting
Failed
NotSpecified
Succeeded
Updating

SourceAddr

地址属性

名称 类型 说明
cidrs

string[]

特殊值“any”

countries

string[]

国家/地区列表

feeds

string[]

源列表

prefixLists

string[]

前缀列表

StateEnum

启用或禁用的枚举

说明
DISABLED
ENABLED

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。

TagInfo

标记

名称 类型 说明
key

string

标记名称

value

string

标记值