Skip to content

Commit e675c2b

Browse files
containerservice: PreparedImageSpecification 2026-02-02-preview API updates (Azure#43365)
* fix: make prepared image spec version writable * docs: clarify prepared image spec version input * fix: restrict PreparedImageSpecification PATCH to ARM tags only Remove properties field from PreparedImageSpecificationPatch so that PATCH operations only accept ARM tags. Also remove the now-unused patch-specific models: - PreparedImageSpecificationPatchProperties - PreparedImageSpecificationManagedIdentityProfileUpdate - PreparedImageSpecificationScriptUpdate This is a breaking change that aligns with ADO task 38037921. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: limit version field to 63 chars, add version to PUT examples - Align version pattern max length with Kubernetes label value limit (63) - Add version field to PUT (CreateOrUpdate) example request bodies Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: restrict node customization PATCH to tags only, make sync - Add NodeCustomizationPatch (tags-only) model - Change ArmCustomPatchAsync -> ArmCustomPatchSync - Update examples: tags-only request body, remove 202 response - Affects both 2025-08-02-preview and 2025-09-02-preview Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address PR feedback - rename to NodeCustomizationUpdate, make version mutable, revert doc noise - Rename NodeCustomizationPatch to NodeCustomizationUpdate to minimize diff (keeps original model name) - Remove @visibility(Lifecycle.Read) from NC version field (customer-provided, same as PIS) - Revert unnecessary doc string change on update operation - Add version to NC CreateOrUpdate examples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Revert NodeCustomization PATCH LRO change Keep the tags-only patch body and version updates, but leave the deprecated NodeCustomization PATCH operation documented as async to minimize the PR's LRO behavior changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * restore NC Update example 202 response and revert cosmetic tags change Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(nodecustomization): restore NC Update source examples with 202 response and team:blue tags Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(preparedimagespecification): remove extra blank line in models.tsp (formatting) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix(preparedimagespecification): remove duplicate version from create example Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: address PIS review comments --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8966e49 commit e675c2b

19 files changed

Lines changed: 63 additions & 332 deletions

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/examples/2025-08-02-preview/NodeCustomizations_CreateOrUpdate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
2020
}
2121
],
22-
"identityProfile": {}
22+
"identityProfile": {},
23+
"version": "1.0.0"
2324
},
2425
"tags": {
2526
"team": "blue"

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/examples/2025-08-02-preview/NodeCustomizations_Update.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@
99
"properties": {
1010
"tags": {
1111
"key5558": "xufgvdnarflvwbcdkmhqhgbop"
12-
},
13-
"properties": {
14-
"containerImages": [
15-
"qmetlvqgbvhjnncyraxlhs"
16-
],
17-
"customizationScripts": [
18-
{
19-
"name": "initialize-node",
20-
"executionPoint": "NodeImageBuildTime",
21-
"scriptType": "Bash",
22-
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
23-
}
24-
],
25-
"identityProfile": {}
2612
}
2713
}
2814
},

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/examples/2025-09-02-preview/NodeCustomizations_CreateOrUpdate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
2020
}
2121
],
22-
"identityProfile": {}
22+
"identityProfile": {},
23+
"version": "1.0.0"
2324
},
2425
"tags": {
2526
"team": "blue"

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/examples/2025-09-02-preview/NodeCustomizations_Update.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@
99
"properties": {
1010
"tags": {
1111
"key5558": "xufgvdnarflvwbcdkmhqhgbop"
12-
},
13-
"properties": {
14-
"containerImages": [
15-
"qmetlvqgbvhjnncyraxlhs"
16-
],
17-
"customizationScripts": [
18-
{
19-
"name": "initialize-node",
20-
"executionPoint": "NodeImageBuildTime",
21-
"scriptType": "Bash",
22-
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
23-
}
24-
],
25-
"identityProfile": {}
2612
}
2713
}
2814
},

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/models.tsp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@ model NodeCustomizationProperties {
3737
""")
3838
identityProfile?: Foundations.UserAssignedIdentity;
3939

40-
@visibility(Lifecycle.Read)
41-
@doc("An auto-generated value that changes when the other fields of the image customization are changed.")
42-
@pattern("^[\\w\\-\\.]+$")
40+
@doc("The client-provided version of the node customization.")
41+
@pattern("^(?![.-])[A-Za-z0-9_.-]{1,63}$")
4342
version?: string;
4443

4544
@visibility(Lifecycle.Read)
@@ -122,12 +121,17 @@ union ProvisioningState {
122121
Accepted: "Accepted",
123122
}
124123

124+
@doc("The type used for update operations of the NodeCustomization.")
125+
model NodeCustomizationUpdate {
126+
...Azure.ResourceManager.Foundations.ArmTagsProperty;
127+
}
128+
125129
@parentResource(NodeCustomization)
126130
@doc("A version of the Node Customization resource.")
127131
model NodeCustomizationVersion is ProxyResource<NodeCustomizationProperties> {
128-
@pattern("^[\\w\\-\\.]+$")
132+
@pattern("^(?![.-])[A-Za-z0-9_.-]{1,63}$")
129133
@minLength(1)
130-
@maxLength(64)
134+
@maxLength(63)
131135
@doc("The version of the Node Customization.")
132136
@key("version")
133137
@path

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/operations.tsp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ interface NodeCustomizations {
2525
@doc("Deprecated: Update a node customization. Use Prepared Image Specification APIs instead.")
2626
update is ArmCustomPatchAsync<
2727
NodeCustomization,
28-
Azure.ResourceManager.Foundations.ResourceUpdateModel<
29-
NodeCustomization,
30-
NodeCustomizationProperties
31-
>,
32-
Azure.ResourceManager.Foundations.BaseParameters<NodeCustomization> &
33-
IfMatchParameters<NodeCustomization>
28+
PatchModel = NodeCustomizationUpdate,
29+
Parameters = IfMatchParameters<NodeCustomization>
3430
>;
3531

3632
#deprecated "Node Customization APIs are deprecated. Use Prepared Image Specification APIs instead."

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/preview/2025-08-02-preview/examples/NodeCustomizations_CreateOrUpdate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
2020
}
2121
],
22-
"identityProfile": {}
22+
"identityProfile": {},
23+
"version": "1.0.0"
2324
},
2425
"tags": {
2526
"team": "blue"

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/preview/2025-08-02-preview/examples/NodeCustomizations_Update.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,6 @@
99
"properties": {
1010
"tags": {
1111
"key5558": "xufgvdnarflvwbcdkmhqhgbop"
12-
},
13-
"properties": {
14-
"containerImages": [
15-
"qmetlvqgbvhjnncyraxlhs"
16-
],
17-
"customizationScripts": [
18-
{
19-
"name": "initialize-node",
20-
"executionPoint": "NodeImageBuildTime",
21-
"scriptType": "Bash",
22-
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
23-
}
24-
],
25-
"identityProfile": {}
2612
}
2713
}
2814
},

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/preview/2025-08-02-preview/nodecustomization.json

Lines changed: 14 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -325,14 +325,6 @@
325325
{
326326
"$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
327327
},
328-
{
329-
"name": "If-Match",
330-
"in": "header",
331-
"description": "The request should only proceed if the targeted resource's etag matches the value provided.",
332-
"required": false,
333-
"type": "string",
334-
"x-ms-client-name": "ifMatch"
335-
},
336328
{
337329
"name": "nodeCustomizationName",
338330
"in": "path",
@@ -343,6 +335,14 @@
343335
"maxLength": 63,
344336
"pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$"
345337
},
338+
{
339+
"name": "If-Match",
340+
"in": "header",
341+
"description": "The request should only proceed if the targeted resource's etag matches the value provided.",
342+
"required": false,
343+
"type": "string",
344+
"x-ms-client-name": "ifMatch"
345+
},
346346
{
347347
"name": "properties",
348348
"in": "body",
@@ -551,8 +551,8 @@
551551
"required": true,
552552
"type": "string",
553553
"minLength": 1,
554-
"maxLength": 64,
555-
"pattern": "^[\\w\\-\\.]+$"
554+
"maxLength": 63,
555+
"pattern": "^(?![.-])[A-Za-z0-9_.-]{1,63}$"
556556
}
557557
],
558558
"responses": {
@@ -617,8 +617,8 @@
617617
"required": true,
618618
"type": "string",
619619
"minLength": 1,
620-
"maxLength": 64,
621-
"pattern": "^[\\w\\-\\.]+$"
620+
"maxLength": 63,
621+
"pattern": "^(?![.-])[A-Za-z0-9_.-]{1,63}$"
622622
}
623623
],
624624
"responses": {
@@ -742,9 +742,8 @@
742742
},
743743
"version": {
744744
"type": "string",
745-
"description": "An auto-generated value that changes when the other fields of the image customization are changed.",
746-
"pattern": "^[\\w\\-\\.]+$",
747-
"readOnly": true
745+
"description": "The client-provided version of the node customization.",
746+
"pattern": "^(?![.-])[A-Za-z0-9_.-]{1,63}$"
748747
},
749748
"provisioningState": {
750749
"$ref": "#/definitions/ProvisioningState",
@@ -810,35 +809,6 @@
810809
"additionalProperties": {
811810
"type": "string"
812811
}
813-
},
814-
"properties": {
815-
"$ref": "#/definitions/NodeCustomizationUpdateProperties",
816-
"description": "The resource-specific properties for this resource."
817-
}
818-
}
819-
},
820-
"NodeCustomizationUpdateProperties": {
821-
"type": "object",
822-
"description": "The updatable properties of the NodeCustomization.",
823-
"properties": {
824-
"containerImages": {
825-
"type": "array",
826-
"description": "The list of container images to cache on nodes. See https://kubernetes.io/docs/concepts/containers/images/#image-names",
827-
"items": {
828-
"type": "string"
829-
}
830-
},
831-
"identityProfile": {
832-
"$ref": "../../../../../../common-types/resource-management/v5/managedidentity.json#/definitions/UserAssignedIdentity",
833-
"description": "The identity used to execute node customization tasks during image build time and provisioning time. \nIf not specified the default agentpool identity will be used.\nThis does not affect provisioned nodes."
834-
},
835-
"customizationScripts": {
836-
"type": "array",
837-
"description": "The scripts to customize the node before or after image capture.",
838-
"items": {
839-
"$ref": "#/definitions/NodeCustomizationScript"
840-
},
841-
"x-ms-identifiers": []
842812
}
843813
}
844814
},

specification/containerservice/resource-manager/Microsoft.ContainerService/nodecustomization/preview/2025-09-02-preview/examples/NodeCustomizations_CreateOrUpdate.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"script": "echo \"test node customization\" > /var/log/test-node-customization.txt"
2020
}
2121
],
22-
"identityProfile": {}
22+
"identityProfile": {},
23+
"version": "1.0.0"
2324
},
2425
"tags": {
2526
"team": "blue"

0 commit comments

Comments
 (0)