Skip to content

Commit db2416c

Browse files
authored
Updating based on feedback
- Added CLI and PowerShell commands for pinning API version when creating an image - Removed instance of API release date - Added disclaimer/warning for pinning API version - Added second condition that needs to be met for breaking change to occur (using the new API version)
1 parent 3e73648 commit db2416c

File tree

1 file changed

+37
-8
lines changed

1 file changed

+37
-8
lines changed

articles/virtual-machines/image-builder-api-update-release-notes.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ Starting from May 21, 2024, Azure VM Image Builder's API version 2024-02-01 and
2525

2626
> **Important Note for Existing Azure Image Builder Users**
2727
>
28-
> If you're an existing user of Azure VM Image Builder, rest assured that this change will **not** impact your existing resources. The case sensitivity enforcement applies only to **newly created resources** starting from **May 21, 2024**. Your existing resources will continue to function as expected without any changes.
28+
> If you're an existing user of Azure VM Image Builder, rest assured that this change will **not** impact your existing resources. The case sensitivity enforcement applies only to **newly created resources** using **API version 2024-02-01 and beyond**. Your existing resources will continue to function as expected without any changes.
2929
>
30-
> If you encounter any issues related to case sensitivity, please refer to our updated API documentation for guidance.
30+
> If you encounter any issues related to case sensitivity, please refer to Azure Image Builder's updated API documentation for guidance.
3131
32-
Previously, our API was more forgiving in terms of case, but moving forward, precision is crucial. When making API calls, ensure that you use the correct capitalization for field names, parameters, and values. For example, if a field is named “vmBoot,” you must use “vmBoot” (not “VMBoot” or “vmboot”).
32+
Previously, Azure Image Builder's API was more forgiving in terms of case, but moving forward, precision is crucial. When making API calls, ensure that you use the correct capitalization for field names, parameters, and values. For example, if a field is named “vmBoot,” you must use “vmBoot” (not “VMBoot” or “vmboot”).
3333

34-
If you send an API request to Azure Image Builder's API version 2024-02-01 and beyond with incorrect case or unrecognized fields, our system will reject it. You will receive an error response indicating that the request is invalid. The error will look something like this:
34+
If you send an API request to Azure Image Builder's API version 2024-02-01 and beyond with incorrect case or unrecognized fields, the service will reject it. You will receive an error response indicating that the request is invalid. The error will look something like this:
3535

3636
`Unmarshalling entity encountered error: unmarshalling type *v2024_02_01.ImageTemplate: struct field Properties: unmarshalling type *v2024_02_01.ImageTemplateProperties: struct field Optimize: unmarshalling type *v2024_02_01.ImageTemplatePropertiesOptimize: unmarshalling type *v2024_02_01.ImageTemplatePropertiesOptimize, unknown field \"vmboot\". There is an issue with the syntax with the JSON template you are submitting. Please check the JSON template for syntax and grammar. For more information on the syntax and grammar of the JSON template, visit http://aka.ms/azvmimagebuildertmplref.`
3737

38-
The error message will mention an "unknown field" and direct you to our official documentation: [Create an Azure Image Builder Bicep or ARM template JSON template](./linux/image-builder-json.md). This documentation will guide you on the proper syntax and grammar for constructing valid API calls to the Azure Image Builder service.
38+
The error message will mention an "unknown field" and direct you to the official documentation: [Create an Azure Image Builder Bicep or ARM template JSON template](./linux/image-builder-json.md). This documentation will guide you on the proper syntax and grammar for constructing valid API calls to the Azure Image Builder service.
3939

40-
We have updated our documentation to include the proper capitalization and field names ahead of the API release. Below is a list of the documentation changes we made to match the field names in API version 2024-02-01:
40+
The documentation has been updated to include the proper capitalization and field names ahead of the API release. Below is a list of the documentation changes that were made to match the field names in API version 2024-02-01:
4141

4242
In the [Create an Azure Image Builder Bicep or ARM template JSON template](./linux/image-builder-json.md) documentation:
4343

@@ -62,19 +62,48 @@ In the [Azure VM Image Builder networking options](./linux/image-builder-network
6262
- `resourceGroupName` in the `vnetConfig` property – this field is deprecated and the new field is `subnetId`
6363

6464
#### How to Pin to an Older Azure Image Builder API Version
65+
66+
> **Important Consideration for Pinning to Older API Versions**
67+
>
68+
> Pinning to an older Azure Image Builder API version can provide compatibility with your existing templates, but it's not recommended due to the following factors:
69+
>
70+
> - Deprecation Risk: Older API versions may eventually be deprecated. When this happens, your pinned templates could become unsupported, leading to potential issues.
71+
>
72+
> - Missing Features: By pinning to an older API version, you miss out on the latest features and improvements introduced in newer versions. These enhancements often improve performance, security, and functionality.
73+
6574
If you’d like to avoid making changes to the properties in your image templates due to the new case sensitivity rules, you have the option to pin your Azure VM Image Builder API calls to a previous API version. This allows you to continue using the familiar behavior without any modifications.
6675

6776
Follow these steps to pin your API calls to an older version:
6877

6978
1. Review the REST API Documentation: Visit the [Azure Image Builder REST API documentation](https://learn.microsoft.com/rest/api/imagebuilder/virtual-machine-image-templates/create-or-update) for Azure Image Builder (AIB). This documentation provides detailed information on how to create or update an Azure Image Builder template using the API.
7079

71-
2. Add the `api-version` URI Parameter: When making a `PUT` call to create or update an image template, include the `api-version` URI parameter. Specify the desired API version (e.g., api-version=2022-07-01) to ensure compatibility with your existing templates. Example:
80+
2. Specify the `api-version`: To ensure compatibility with your existing templates, When creating or updating an image template, specify the desired API version (e.g., api-version=2022-07-01) by including the `api-version` parameter in your call to the service. Example:
7281

82+
# [HTTP](#tab/http)
7383
```http
7484
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}?api-version=2022-07-01
7585
```
7686

77-
3. Test Your API Calls: After pinning to the older API version, test your API calls to verify that they behave as expected. Ensure that your existing templates continue to function correctly.
87+
# [Azure CLI](#tab/azurecli-interactive)
88+
89+
```azurecli-interactive
90+
az resource create \
91+
--api-version=2022-07-01 \
92+
--resource-group <resourceGroupName> \
93+
--properties <jsonResource> \
94+
--is-full-object \
95+
--resource-type Microsoft.VirtualMachineImages/imageTemplates \
96+
-n <imageTemplateName>
97+
```
98+
99+
# [Azure PowerShell](#tab/azurecli-interactive)
100+
101+
```azurepowershell-interactive
102+
New-AzResourceGroupDeployment -ResourceGroupName <resourceGroupName> -TemplateFile <templateFilePath> -TemplateParameterObject @{"api-version" = "2022-07-01"; "imageTemplateName" = <imageTemplateName>; "svclocation" = <location>}
103+
```
104+
105+
106+
3. Test Your Code: After pinning to the older API version, test your code to verify that it behaves as expected. Ensure that your existing templates continue to function correctly.
78107

79108
### November 2023
80109
Azure Image Builder is enabling Isolated Image Builds using Azure Container Instances in a phased manner. The rollout is expected to be completed by early 2024. Your existing image templates will continue to work and there is no change in the way you create or build new image templates.

0 commit comments

Comments
 (0)