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 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
profile
|
path | True |
string minLength: 1maxLength: 260 pattern: ^[a-zA-Z0-9]+(-*[a-zA-Z0-9])*$ |
在资源组中唯一的 Azure Front Door 标准版或 Azure Front Door Premium 的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+$ |
Azure 订阅中的资源组的名称。 |
|
rule
|
path | True |
string |
全局唯一的配置文件下的规则集的名称 |
|
subscription
|
path | True |
string |
Azure 订阅 ID。 |
|
api-version
|
query | True |
string |
要用于客户端请求的 API 的版本。 当前版本为 2025-04-15。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
还行 |
|
| 201 Created |
创建。 请求已完成,并创建了一个新规则集。 |
|
| Other Status Codes |
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"
}
}
定义
| 名称 | 说明 |
|---|---|
|
Afd |
错误响应 |
|
Afd |
预配状态 |
|
Deployment |
|
|
Error |
资源管理错误附加信息。 |
|
Error |
错误详细信息。 |
|
Identity |
创建/修改资源的标识类型 |
|
Rule |
友好 RuleSet 名称映射到任何 RuleSet 或机密相关信息。 |
|
System |
只读系统数据 |
AfdErrorResponse
错误响应
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误对象。 |
AfdProvisioningState
预配状态
| 值 | 说明 |
|---|---|
| Succeeded | |
| Failed | |
| Updating | |
| Deleting | |
| Creating |
DeploymentStatus
| 值 | 说明 |
|---|---|
| NotStarted | |
| InProgress | |
| Succeeded | |
| Failed |
ErrorAdditionalInfo
资源管理错误附加信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| info |
object |
其他信息。 |
| type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| additionalInfo |
错误附加信息。 |
|
| code |
string |
错误代码。 |
| details |
错误详细信息。 |
|
| message |
string |
错误消息。 |
| target |
string |
错误目标。 |
IdentityType
创建/修改资源的标识类型
| 值 | 说明 |
|---|---|
| user | |
| application | |
| managedIdentity | |
| key |
RuleSet
友好 RuleSet 名称映射到任何 RuleSet 或机密相关信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| name |
string |
资源名称。 |
| properties.deploymentStatus | ||
| properties.profileName |
string |
保存规则集的配置文件的名称。 |
| properties.provisioningState |
预配状态 |
|
| systemData |
只读系统数据 |
|
| type |
string |
资源类型。 |
SystemData
只读系统数据
| 名称 | 类型 | 说明 |
|---|---|---|
| createdAt |
string (date-time) |
资源创建时间戳(UTC) |
| createdBy |
string |
创建资源的标识的标识符 |
| createdByType |
创建资源的标识类型 |
|
| lastModifiedAt |
string (date-time) |
上次修改的资源时间戳(UTC) |
| lastModifiedBy |
string |
上次修改资源的标识的标识符 |
| lastModifiedByType |
上次修改资源的标识类型 |