Skip to content

Commit c7313dd

Browse files
author
Deven Chen
committed
Versioning LRO for RuleSet Create/Update
1 parent d62c20c commit c7313dd

File tree

9 files changed

+115
-67
lines changed

9 files changed

+115
-67
lines changed

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/RuleSet.tsp

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,28 @@ interface RuleSets {
3636
/**
3737
* Creates a new rule set within the specified profile.
3838
*/
39-
@armResourceCreateOrUpdate(RuleSet)
40-
@Azure.Core.useFinalStateVia("azure-async-operation")
41-
create(
42-
...ResourceInstanceParameters<RuleSet>,
39+
@removed(Versions.v2025_12_01)
40+
@sharedRoute
41+
@put
42+
create is Azure.ResourceManager.Legacy.CustomPatchAsync<
43+
RuleSet,
44+
PatchModel = void,
45+
Response = ArmResponse<RuleSet> | ArmCreatedResponse<RuleSet>
46+
>;
4347

44-
/** The rule set to create. Making it optional to be backwards compatible */
45-
@body resource?: RuleSet,
46-
): ArmResponse<RuleSet> | (ArmCreatedResponse<RuleSet> &
47-
ArmAsyncOperationHeader<FinalResult = RuleSet> &
48-
ArmLroLocationHeader<FinalResult = RuleSet>) | ErrorResponse;
48+
/**
49+
* Creates or update a batch rule set within the specified profile along with the rules associate to it.
50+
*/
51+
@added(Versions.v2025_12_01)
52+
@sharedRoute
53+
@Azure.Core.useFinalStateVia("azure-async-operation")
54+
createOrUpdate is Azure.ResourceManager.Legacy.CreateOrReplaceAsync<
55+
RuleSet,
56+
OptionalRequestBody = true,
57+
Response = ArmResponse<RuleSet> | (ArmCreatedResponse<RuleSet> &
58+
ArmAsyncOperationHeader<FinalResult = RuleSet> &
59+
ArmLroLocationHeader<FinalResult = RuleSet>) | ErrorResponse
60+
>;
4961

5062
/**
5163
* Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile.

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/examples/2025-12-01/RuleSets_Create.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"type": "Microsoft.Cdn/profiles/rulesets",
1515
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
1616
"properties": {
17-
"batchMode": false,
1817
"deploymentStatus": "NotStarted",
1918
"provisioningState": "Succeeded"
2019
}
@@ -26,7 +25,6 @@
2625
"type": "Microsoft.Cdn/profiles/rulesets",
2726
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
2827
"properties": {
29-
"batchMode": false,
3028
"deploymentStatus": "NotStarted",
3129
"provisioningState": "Succeeded"
3230
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-12-01",
4+
"profileName": "profile1",
5+
"resourceGroupName": "RG",
6+
"ruleSetName": "ruleSet1",
7+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
8+
"batchMode": false
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"name": "ruleSet1",
14+
"type": "Microsoft.Cdn/profiles/rulesets",
15+
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
16+
"properties": {
17+
"batchMode": false,
18+
"deploymentStatus": "NotStarted",
19+
"provisioningState": "Succeeded"
20+
}
21+
}
22+
},
23+
"201": {
24+
"body": {
25+
"name": "ruleSet1",
26+
"type": "Microsoft.Cdn/profiles/rulesets",
27+
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
28+
"properties": {
29+
"batchMode": false,
30+
"deploymentStatus": "NotStarted",
31+
"provisioningState": "Succeeded"
32+
}
33+
}
34+
}
35+
},
36+
"operationId": "RuleSets_CreateOrUpdate",
37+
"title": "RuleSets_CreateOrUpdate"
38+
}

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/preview/2025-09-01-preview/openapi.json

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7918,15 +7918,6 @@
79187918
"description": "Name of the rule set under the profile which is unique globally.",
79197919
"required": true,
79207920
"type": "string"
7921-
},
7922-
{
7923-
"name": "resource",
7924-
"in": "body",
7925-
"description": "The rule set to create. Making it optional to be backwards compatible",
7926-
"required": false,
7927-
"schema": {
7928-
"$ref": "#/definitions/RuleSet"
7929-
}
79307921
}
79317922
],
79327923
"responses": {
@@ -7937,19 +7928,11 @@
79377928
}
79387929
},
79397930
"201": {
7940-
"description": "The request has succeeded and a new resource has been created as a result.",
7931+
"description": "Azure create operation completed successfully.",
79417932
"schema": {
79427933
"$ref": "#/definitions/RuleSet"
79437934
},
79447935
"headers": {
7945-
"Azure-AsyncOperation": {
7946-
"type": "string",
7947-
"description": "A link to the status monitor"
7948-
},
7949-
"Location": {
7950-
"type": "string",
7951-
"description": "The Location header contains the URL where the status of the long running operation can be checked."
7952-
},
79537936
"Retry-After": {
79547937
"type": "integer",
79557938
"format": "int32",
@@ -7968,12 +7951,7 @@
79687951
"RuleSets_Create": {
79697952
"$ref": "./examples/RuleSets_Create.json"
79707953
}
7971-
},
7972-
"x-ms-long-running-operation-options": {
7973-
"final-state-via": "azure-async-operation",
7974-
"final-state-schema": "#/definitions/RuleSet"
7975-
},
7976-
"x-ms-long-running-operation": true
7954+
}
79777955
},
79787956
"delete": {
79797957
"operationId": "RuleSets_Delete",

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ These are the global settings for the Cdn API.
2929
title: CdnManagementClient
3030
description: Cdn Management Client
3131
openapi-type: arm
32-
tag: package-2025-06
32+
tag: package-2025-12
33+
```
34+
35+
### Tag: package-2025-12
36+
These settings apply only when `--tag=package-2025-12` is specified on the command line.
37+
38+
```yaml $(tag) == 'package-2025-12'
39+
input-file:
40+
- stable/2025-12-01/openapi.json
3341
```
3442

3543
### Tag: package-preview-2025-09

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/stable/2025-06-01/openapi.json

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6845,15 +6845,6 @@
68456845
"description": "Name of the rule set under the profile which is unique globally.",
68466846
"required": true,
68476847
"type": "string"
6848-
},
6849-
{
6850-
"name": "resource",
6851-
"in": "body",
6852-
"description": "The rule set to create. Making it optional to be backwards compatible",
6853-
"required": false,
6854-
"schema": {
6855-
"$ref": "#/definitions/RuleSet"
6856-
}
68576848
}
68586849
],
68596850
"responses": {
@@ -6864,19 +6855,11 @@
68646855
}
68656856
},
68666857
"201": {
6867-
"description": "The request has succeeded and a new resource has been created as a result.",
6858+
"description": "Azure create operation completed successfully.",
68686859
"schema": {
68696860
"$ref": "#/definitions/RuleSet"
68706861
},
68716862
"headers": {
6872-
"Azure-AsyncOperation": {
6873-
"type": "string",
6874-
"description": "A link to the status monitor"
6875-
},
6876-
"Location": {
6877-
"type": "string",
6878-
"description": "The Location header contains the URL where the status of the long running operation can be checked."
6879-
},
68806863
"Retry-After": {
68816864
"type": "integer",
68826865
"format": "int32",
@@ -6895,12 +6878,7 @@
68956878
"RuleSets_Create": {
68966879
"$ref": "./examples/RuleSets_Create.json"
68976880
}
6898-
},
6899-
"x-ms-long-running-operation-options": {
6900-
"final-state-via": "azure-async-operation",
6901-
"final-state-schema": "#/definitions/RuleSet"
6902-
},
6903-
"x-ms-long-running-operation": true
6881+
}
69046882
},
69056883
"delete": {
69066884
"operationId": "RuleSets_Delete",

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/stable/2025-12-01/examples/RuleSets_Create.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"type": "Microsoft.Cdn/profiles/rulesets",
1515
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
1616
"properties": {
17-
"batchMode": false,
1817
"deploymentStatus": "NotStarted",
1918
"provisioningState": "Succeeded"
2019
}
@@ -26,7 +25,6 @@
2625
"type": "Microsoft.Cdn/profiles/rulesets",
2726
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
2827
"properties": {
29-
"batchMode": false,
3028
"deploymentStatus": "NotStarted",
3129
"provisioningState": "Succeeded"
3230
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"parameters": {
3+
"api-version": "2025-12-01",
4+
"profileName": "profile1",
5+
"resourceGroupName": "RG",
6+
"ruleSetName": "ruleSet1",
7+
"subscriptionId": "00000000-0000-0000-0000-000000000000",
8+
"batchMode": false
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"name": "ruleSet1",
14+
"type": "Microsoft.Cdn/profiles/rulesets",
15+
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
16+
"properties": {
17+
"batchMode": false,
18+
"deploymentStatus": "NotStarted",
19+
"provisioningState": "Succeeded"
20+
}
21+
}
22+
},
23+
"201": {
24+
"body": {
25+
"name": "ruleSet1",
26+
"type": "Microsoft.Cdn/profiles/rulesets",
27+
"id": "/subscriptions/subid/resourcegroups/RG/providers/Microsoft.Cdn/profiles/profile1/rulesets/ruleSet1",
28+
"properties": {
29+
"batchMode": false,
30+
"deploymentStatus": "NotStarted",
31+
"provisioningState": "Succeeded"
32+
}
33+
}
34+
}
35+
},
36+
"operationId": "RuleSets_CreateOrUpdate",
37+
"title": "RuleSets_CreateOrUpdate"
38+
}

specification/cdn/resource-manager/Microsoft.Cdn/Cdn/stable/2025-12-01/openapi.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7807,11 +7807,11 @@
78077807
}
78087808
},
78097809
"put": {
7810-
"operationId": "RuleSets_Create",
7810+
"operationId": "RuleSets_CreateOrUpdate",
78117811
"tags": [
78127812
"RuleSets"
78137813
],
7814-
"description": "Creates a new rule set within the specified profile.",
7814+
"description": "Creates or update a batch rule set within the specified profile along with the rules associate to it.",
78157815
"parameters": [
78167816
{
78177817
"$ref": "../../../../../../common-types/resource-management/v6/types.json#/parameters/ApiVersionParameter"
@@ -7842,7 +7842,7 @@
78427842
{
78437843
"name": "resource",
78447844
"in": "body",
7845-
"description": "The rule set to create. Making it optional to be backwards compatible",
7845+
"description": "Resource create parameters.",
78467846
"required": false,
78477847
"schema": {
78487848
"$ref": "#/definitions/RuleSet"
@@ -7885,8 +7885,8 @@
78857885
}
78867886
},
78877887
"x-ms-examples": {
7888-
"RuleSets_Create": {
7889-
"$ref": "./examples/RuleSets_Create.json"
7888+
"RuleSets_CreateOrUpdate": {
7889+
"$ref": "./examples/RuleSets_CreateOrUpdate.json"
78907890
}
78917891
},
78927892
"x-ms-long-running-operation-options": {

0 commit comments

Comments
 (0)