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

Rule Sets - Create

在指定的配置文件中创建一个新规则集。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/ruleSets/{ruleSetName}?api-version=2025-04-15

URI 参数

名称 必需 类型 说明
profileName
path True

string

minLength: 1
maxLength: 260
pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$

在资源组中唯一的 Azure Front Door 标准版或 Azure Front Door Premium 的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$

Azure 订阅中的资源组的名称。

ruleSetName
path True

string

全局唯一的配置文件下的规则集的名称

subscriptionId
path True

string

Azure 订阅 ID。

api-version
query True

string

要用于客户端请求的 API 的版本。 当前版本为 2025-04-15。

响应

名称 类型 说明
200 OK

RuleSet

还行

201 Created

RuleSet

创建。 请求已完成,并创建了一个新规则集。

Other Status Codes

AfdErrorResponse

Azure Front Door 错误响应,描述作失败的原因。

安全性

azure_auth

Azure Active Directory OAuth2 Flow。

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

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

RuleSets_Create

示例请求

PUT https://management.azure.com/subscriptions/subid/resourceGroups/RG/providers/Microsoft.Cdn/profiles/profile1/ruleSets/ruleSet1?api-version=2025-04-15

示例响应

{
  "name": "ruleSet1",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
  "type": "Microsoft.Cdn/profiles/rulesets",
  "properties": {
    "provisioningState": "Succeeded",
    "deploymentStatus": "NotStarted"
  }
}
{
  "name": "ruleSet1",
  "id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
  "type": "Microsoft.Cdn/profiles/rulesets",
  "properties": {
    "provisioningState": "Succeeded",
    "deploymentStatus": "NotStarted"
  }
}

定义

名称 说明
AfdErrorResponse

错误响应

AfdProvisioningState

预配状态

DeploymentStatus
ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

IdentityType

创建/修改资源的标识类型

RuleSet

友好 RuleSet 名称映射到任何 RuleSet 或机密相关信息。

SystemData

只读系统数据

AfdErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

AfdProvisioningState

预配状态

说明
Succeeded
Failed
Updating
Deleting
Creating

DeploymentStatus

说明
NotStarted
InProgress
Succeeded
Failed

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

IdentityType

创建/修改资源的标识类型

说明
user
application
managedIdentity
key

RuleSet

友好 RuleSet 名称映射到任何 RuleSet 或机密相关信息。

名称 类型 说明
id

string

资源 ID。

name

string

资源名称。

properties.deploymentStatus

DeploymentStatus

properties.profileName

string

保存规则集的配置文件的名称。

properties.provisioningState

AfdProvisioningState

预配状态

systemData

SystemData

只读系统数据

type

string

资源类型。

SystemData

只读系统数据

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)

createdBy

string

创建资源的标识的标识符

createdByType

IdentityType

创建资源的标识类型

lastModifiedAt

string (date-time)

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

lastModifiedBy

string

上次修改资源的标识的标识符

lastModifiedByType

IdentityType

上次修改资源的标识类型