From f255b69d2d41800084b1d6675e5e10ee33c0578a Mon Sep 17 00:00:00 2001 From: zdelacerda-microsoft <90284189+zdelacerda-microsoft@users.noreply.github.com> Date: Tue, 3 May 2022 16:14:54 -0700 Subject: [PATCH 01/11] Adds base for updating Microsoft.VirtualMachineImages from version stable/2021-10-01 to version 2022-02-14 --- .../2022-02-14/examples/CancelImageBuild.json | 17 + .../examples/CreateImageTemplateLinux.json | 147 ++ .../examples/CreateImageTemplateWindows.json | 372 +++++ .../examples/DeleteImageTemplate.json | 17 + .../2022-02-14/examples/GetImageTemplate.json | 55 + .../2022-02-14/examples/GetRunOutput.json | 22 + .../examples/ListImageTemplates.json | 109 ++ .../examples/ListImageTemplatesByRg.json | 118 ++ .../2022-02-14/examples/ListRunOutputs.json | 35 + .../2022-02-14/examples/OperationsList.json | 112 ++ .../2022-02-14/examples/RunImageTemplate.json | 17 + .../examples/UpdateImageTemplateTags.json | 68 + ...UpdateImageTemplateToRemoveIdentities.json | 62 + .../stable/2022-02-14/imagebuilder.json | 1456 +++++++++++++++++ 14 files changed, 2607 insertions(+) create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json create mode 100644 specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json new file mode 100644 index 000000000000..0e3e45ac755a --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "200": {}, + "204": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json new file mode 100644 index 000000000000..542f0918be16 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01", + "imageTemplateName": "myImageTemplate", + "parameters": { + "location": "westus", + "tags": { + "imagetemplate_tag1": "IT_T1", + "imagetemplate_tag2": "IT_T2" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {} + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json new file mode 100644 index 000000000000..7a8637761937 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json @@ -0,0 +1,372 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01", + "imageTemplateName": "myImageTemplate", + "parameters": { + "location": "westus", + "tags": { + "imagetemplate_tag1": "IT_T1", + "imagetemplate_tag2": "IT_T2" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {} + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated Local System user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": true + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "WindowsRestart", + "name": "Restart Customizer Example", + "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", + "restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"", + "restartTimeout": "10m" + }, + { + "type": "WindowsUpdate", + "name": "Windows Update Customizer Example", + "searchCriteria": "BrowseOnly=0 and IsInstalled=0", + "filters": [ + "$_.BrowseOnly" + ], + "updateLimit": 100 + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated Local System user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": true + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "validExitCodes": [ + 0, + 1 + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": false, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "WindowsRestart", + "name": "Restart Customizer Example", + "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", + "restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"", + "restartTimeout": "10m" + }, + { + "type": "WindowsUpdate", + "name": "Windows Update Customizer Example", + "searchCriteria": "BrowseOnly=0 and IsInstalled=0", + "filters": [ + "$_.BrowseOnly" + ], + "updateLimit": 100 + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated Local System user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": true + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "validExitCodes": [ + 0, + 1 + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": false, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "WindowsRestart", + "name": "Restart Customizer Example", + "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", + "restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"", + "restartTimeout": "10m" + }, + { + "type": "WindowsUpdate", + "name": "Windows Update Customizer Example", + "searchCriteria": "BrowseOnly=0 and IsInstalled=0", + "filters": [ + "$_.BrowseOnly" + ], + "updateLimit": 100 + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json new file mode 100644 index 000000000000..fc9d523a4b91 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + }, + "200": {}, + "204": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json new file mode 100644 index 000000000000..afa5eb4c8b7f --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01", + "imageTemplateName": "myImageTemplate" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json new file mode 100644 index 000000000000..bd29d0f0b978 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "runOutputName": "myManagedImageOutput", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput", + "name": "myManagedImageOutput", + "properties": { + "artifactId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image", + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json new file mode 100644 index 000000000000..6eca47cf4ce5 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myOtherResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/mySecondImageTemplate", + "name": "mySecondImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "PlatformImage", + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "18.04.201902121", + "planInfo": { + "planName": "example_plan_name", + "planProduct": "example_plan_product", + "planPublisher": "example_plan_publisher" + } + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "eastus", + "runOutputName": "eus", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/mySecondImage-eus", + "artifactTags": { + "stage": "development" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D8s_v3", + "osDiskSizeGB": 32 + } + } + } + ], + "nextLink": "/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2018-02-01-preview&skip-token=2" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json new file mode 100644 index 000000000000..4b60174e5fd3 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myOtherImageTemplate", + "name": "myOtherImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "PlatformImage", + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "18.04.201902121", + "planInfo": { + "planName": "example_plan_name", + "planProduct": "example_plan_product", + "planPublisher": "example_plan_publisher" + } + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "centralus", + "runOutputName": "singleImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/baseimage-cus" + }, + { + "type": "SharedImage", + "galleryImageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/gallery/baseimages/images/baseimage", + "replicationRegions": [ + "eastus", + "westus" + ], + "runOutputName": "gallery", + "excludeFromLatest": true, + "storageAccountType": "Standard_LRS" + } + ], + "vmProfile": { + "vmSize": "Standard_D8s_v3", + "osDiskSizeGB": 64 + } + } + } + ], + "nextLink": "/subscriptions/{subscription-id}/resourceGroup/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2021-10-01&skip-token=2" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json new file mode 100644 index 000000000000..faa0e4079b56 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput", + "name": "myManagedImageOutput", + "properties": { + "artifactId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image", + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" + }, + { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/mySharedImageOutput", + "name": "mySharedImageOutput", + "properties": { + "artifactId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/galleries/Gallery1/images/SharedImageOutput/imageversions/1.2.3", + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" + } + ], + "nextLink": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs?api-version=2018-02-01-preview&$skipToken=3" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json new file mode 100644 index 000000000000..8b92987f87c0 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.VirtualMachineImages/register/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Register Virtual Machine Image Builder RP", + "description": "Register Virtual Machine Image Builder RP" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/unregister/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Unregister Virtual Machine Image Builder RP", + "description": "Unregister Virtual Machine Image Builder RP" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template instance resource", + "resource": "VM Image template", + "description": "Get a VM image template instance resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/write", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Create or update a VM image template instance resource", + "resource": "VM Image template", + "description": "Create or update a VM image template instance resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/delete", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Delete a VM image template instance resource", + "resource": "VM Image template", + "description": "Delete a VM image template instance resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/run/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Execute a VM image template to produce its outputs", + "resource": "VM Image template", + "description": "Execute a VM image template to produce its outputs" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template run output resource", + "resource": "VM Image template run output", + "description": "Get a VM image template run output resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "List available Virtual Machine Image Builder Operations", + "resource": "Operation", + "description": "List available Virtual Machine Image Builder Operations" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/locations/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get the status of an asynchronous operation", + "resource": "Asynchronous Operation", + "description": "Get the status of an asynchronous operation" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/cancel/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Cancel a running image build", + "resource": "VM Image template", + "description": "Cancel a running image build" + }, + "isDataAction": false + } + ], + "nextLink": "providers/Microsoft.AppPlatform?$skipToken={opaqueString}" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json new file mode 100644 index 000000000000..9b4e383f2cfd --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + }, + "204": {}, + "200": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json new file mode 100644 index 000000000000..af3b77d266c8 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01", + "parameters": { + "tags": { + "new-tag": "new-value" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "tags": { + "new-tag": "new-value" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json new file mode 100644 index 000000000000..a518fba536c8 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01", + "parameters": { + "identity": { + "type": "None" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "None" + }, + "tags": { + "new-tag": "new-value" + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json new file mode 100644 index 000000000000..ba7cadba2b9c --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -0,0 +1,1456 @@ +{ + "swagger": "2.0", + "info": { + "title": "VirtualMachineImageTemplate", + "description": "Virtual Machine Image Template", + "version": "2021-10-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_List", + "description": "Gets information about the VM image templates associated with the subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplateListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List images by subscription.": { + "$ref": "./examples/ListImageTemplates.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_ListByResourceGroup", + "description": "Gets information about the VM image templates associated with the specified resource group.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplateListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List images by resource group": { + "$ref": "./examples/ListImageTemplatesByRg.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}": { + "put": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_CreateOrUpdate", + "description": "Create or update a virtual machine image template", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImageTemplate" + }, + "description": "Parameters supplied to the CreateImageTemplate operation" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create an Image Template for Linux.": { + "$ref": "./examples/CreateImageTemplateLinux.json" + }, + "Create an Image Template for Windows.": { + "$ref": "./examples/CreateImageTemplateWindows.json" + } + } + }, + "patch": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Update", + "description": "Update the tags for this Virtual Machine Image Template", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImageTemplateUpdateParameters" + }, + "description": "Additional parameters for Image Template update." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "202": { + "description": "The operation will be completed asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update the tags for an Image Template.": { + "$ref": "./examples/UpdateImageTemplateTags.json" + }, + "Remove identities for an Image Template.": { + "$ref": "./examples/UpdateImageTemplateToRemoveIdentities.json" + } + } + }, + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Get", + "description": "Get information about a virtual machine image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Retrieve an Image Template.": { + "$ref": "./examples/GetImageTemplate.json" + } + } + }, + "delete": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Delete", + "description": "Delete a virtual machine image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful." + }, + "202": { + "description": "The operation will be completed asynchronously." + }, + "204": { + "description": "NoContent -- VM image template does not exist in the subscription." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Delete an Image Template.": { + "$ref": "./examples/DeleteImageTemplate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/run": { + "post": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Run", + "description": "Create artifacts from a existing image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful." + }, + "204": { + "description": "The operation was successful." + }, + "202": { + "description": "The operation will be completed asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create image(s) from existing imageTemplate.": { + "$ref": "./examples/RunImageTemplate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/cancel": { + "post": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Cancel", + "description": "Cancel the long running image build based on the image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful." + }, + "204": { + "description": "The long running image build has been canceled." + }, + "202": { + "description": "The request is accepted." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Cancel the image build based on the imageTemplate.": { + "$ref": "./examples/CancelImageBuild.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_ListRunOutputs", + "description": "List all run outputs for the specified Image Template resource", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RunOutputCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Retrieve a list of all outputs created by the last run of an Image Template": { + "$ref": "./examples/ListRunOutputs.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs/{runOutputName}": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_GetRunOutput", + "description": "Get the specified run output for the specified image template resource", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/RunOutputNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RunOutput" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Retrieve single runOutput": { + "$ref": "./examples/GetRunOutput.json" + } + } + } + }, + "/providers/Microsoft.VirtualMachineImages/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists available operations for the Microsoft.VirtualMachineImages provider", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful. The response contains the list of available operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Retrieve operations list": { + "$ref": "./examples/OperationsList.json" + } + } + } + } + }, + "definitions": { + "ImageTemplateListResult": { + "description": "The result of List image templates operation", + "type": "object", + "properties": { + "value": { + "description": "An array of image templates", + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "nextLink": { + "type": "string", + "description": "The continuation token." + } + } + }, + "ImageTemplateSource": { + "type": "object", + "description": "Describes a virtual machine image source for building, customizing and distributing", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "Specifies the type of source image you want to start with." + } + }, + "required": [ + "type" + ] + }, + "ImageTemplatePlatformImageSource": { + "type": "object", + "description": "Describes an image source from [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).", + "x-ms-discriminator-value": "PlatformImage", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "publisher": { + "type": "string", + "description": "Image Publisher in [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "offer": { + "type": "string", + "description": "Image offer from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "sku": { + "type": "string", + "description": "Image sku from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "version": { + "type": "string", + "description": "Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). If 'latest' is specified here, the version is evaluated when the image build takes place, not when the template is submitted." + }, + "exactVersion": { + "type": "string", + "description": "Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.", + "readOnly": true + }, + "planInfo": { + "$ref": "#/definitions/PlatformImagePurchasePlan", + "description": "Optional configuration of purchase plan for platform image." + } + } + }, + "ImageTemplateManagedImageSource": { + "type": "object", + "description": "Describes an image source that is a managed image in customer subscription.", + "x-ms-discriminator-value": "ManagedImage", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "imageId": { + "type": "string", + "description": "ARM resource id of the managed image in customer subscription" + } + }, + "required": [ + "imageId" + ] + }, + "ImageTemplateSharedImageVersionSource": { + "type": "object", + "description": "Describes an image source that is an image version in a shared image gallery.", + "x-ms-discriminator-value": "SharedImageVersion", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "imageVersionId": { + "type": "string", + "description": "ARM resource id of the image version in the shared image gallery" + } + }, + "required": [ + "imageVersionId" + ] + }, + "ImageTemplateCustomizer": { + "type": "object", + "description": "Describes a unit of image customization", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "The type of customization tool you want to use on the Image. For example, \"Shell\" can be shell customizer" + }, + "name": { + "type": "string", + "description": "Friendly Name to provide context on what this customization step does" + } + }, + "required": [ + "type" + ] + }, + "ImageTemplateShellCustomizer": { + "type": "object", + "description": "Runs a shell script during the customization phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", + "x-ms-discriminator-value": "Shell", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "scriptUri": { + "type": "string", + "description": "URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the shell script provided in the scriptUri field" + }, + "inline": { + "type": "array", + "description": "Array of shell commands to execute", + "items": { + "type": "string" + } + } + } + }, + "ImageTemplateRestartCustomizer": { + "type": "object", + "description": "Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner", + "x-ms-discriminator-value": "WindowsRestart", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "restartCommand": { + "type": "string", + "description": "Command to execute the restart [Default: 'shutdown /r /f /t 0 /c \"packer restart\"']" + }, + "restartCheckCommand": { + "type": "string", + "description": "Command to check if restart succeeded [Default: '']" + }, + "restartTimeout": { + "type": "string", + "description": "Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m']" + } + } + }, + "ImageTemplateWindowsUpdateCustomizer": { + "type": "object", + "description": "Installs Windows Updates. Corresponds to Packer Windows Update Provisioner (https://github.com/rgl/packer-provisioner-windows-update)", + "x-ms-discriminator-value": "WindowsUpdate", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "searchCriteria": { + "type": "string", + "description": "Criteria to search updates. Omit or specify empty string to use the default (search all). Refer to above link for examples and detailed description of this field." + }, + "filters": { + "type": "array", + "description": "Array of filters to select updates to apply. Omit or specify empty array to use the default (no filter). Refer to above link for examples and detailed description of this field.", + "items": { + "type": "string" + } + }, + "updateLimit": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" + } + } + }, + "ImageTemplatePowerShellCustomizer": { + "type": "object", + "description": "Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", + "x-ms-discriminator-value": "PowerShell", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "scriptUri": { + "type": "string", + "description": "URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the power shell script provided in the scriptUri field above" + }, + "inline": { + "type": "array", + "description": "Array of PowerShell commands to execute", + "items": { + "type": "string" + } + }, + "runElevated": { + "type": "boolean", + "default": false, + "description": "If specified, the PowerShell script will be run with elevated privileges" + }, + "runAsSystem": { + "type": "boolean", + "default": false, + "description": "If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true." + }, + "validExitCodes": { + "type": "array", + "description": "Valid exit codes for the PowerShell script. [Default: 0]", + "items": { + "type": "integer" + } + } + } + }, + "ImageTemplateFileCustomizer": { + "type": "object", + "description": "Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner", + "x-ms-discriminator-value": "File", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "sourceUri": { + "type": "string", + "description": "The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the file provided in the sourceUri field above" + }, + "destination": { + "type": "string", + "description": "The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM" + } + } + }, + "ImageTemplateDistributor": { + "type": "object", + "description": "Generic distribution object", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "Type of distribution." + }, + "runOutputName": { + "type": "string", + "description": "The name to be used for the associated RunOutput.", + "pattern": "^[A-Za-z0-9-_.]{1,64}$" + }, + "artifactTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags that will be applied to the artifact once it has been created/updated by the distributor." + } + }, + "required": [ + "type", + "runOutputName" + ] + }, + "ImageTemplateManagedImageDistributor": { + "x-ms-discriminator-value": "ManagedImage", + "description": "Distribute as a Managed Disk Image.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ], + "properties": { + "imageId": { + "type": "string", + "description": "Resource Id of the Managed Disk Image" + }, + "location": { + "type": "string", + "description": "Azure location for the image, should match if image already exists" + } + }, + "required": [ + "imageId", + "location" + ] + }, + "ImageTemplateSharedImageDistributor": { + "x-ms-discriminator-value": "SharedImage", + "description": "Distribute via Shared Image Gallery.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ], + "properties": { + "galleryImageId": { + "type": "string", + "description": "Resource Id of the Shared Image Gallery image" + }, + "replicationRegions": { + "description": "A list of regions that the image will be replicated to", + "type": "array", + "items": { + "type": "string" + } + }, + "excludeFromLatest": { + "type": "boolean", + "default": false, + "description": "Flag that indicates whether created image version should be excluded from latest. Omit to use the default (false)." + }, + "storageAccountType": { + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_ZRS" + ], + "x-ms-enum": { + "name": "SharedImageStorageAccountType", + "modelAsString": true + }, + "description": "Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS)." + } + }, + "required": [ + "galleryImageId", + "replicationRegions" + ] + }, + "ImageTemplateVhdDistributor": { + "x-ms-discriminator-value": "VHD", + "description": "Distribute via VHD in a storage account.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ] + }, + "PlatformImagePurchasePlan": { + "type": "object", + "description": "Purchase plan configuration for platform image.", + "properties": { + "planName": { + "type": "string", + "description": "Name of the purchase plan." + }, + "planProduct": { + "type": "string", + "description": "Product of the purchase plan." + }, + "planPublisher": { + "type": "string", + "description": "Publisher of the purchase plan." + } + }, + "required": [ + "planName", + "planProduct", + "planPublisher" + ] + }, + "VirtualNetworkConfig": { + "type": "object", + "description": "Virtual Network configuration.", + "properties": { + "subnetId": { + "type": "string", + "description": "Resource id of a pre-existing subnet." + }, + "proxyVmSize": { + "type": "string", + "default": "", + "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2 for Gen1 images and Standard_D2ds_v4 for Gen2 images)." + } + } + }, + "ImageTemplateVmProfile": { + "type": "object", + "description": "Describes the virtual machine used to build, customize and capture images", + "properties": { + "vmSize": { + "type": "string", + "default": "", + "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D2ds_v4)." + }, + "osDiskSizeGB": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." + }, + "userAssignedIdentities": { + "type": "array", + "description": "Optional array of resource IDs of user assigned managed identities to be configured on the build VM. This may include the identity of the image template.", + "items": { + "type": "string" + } + }, + "vnetConfig": { + "$ref": "#/definitions/VirtualNetworkConfig", + "description": "Optional configuration of the virtual network to use to deploy the build virtual machine in. Omit if no specific virtual network needs to be used." + } + } + }, + "ProvisioningState": { + "type": "string", + "enum": [ + "Creating", + "Updating", + "Succeeded", + "Failed", + "Deleting" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false + }, + "description": "Provisioning state of the resource" + }, + "ProvisioningError": { + "type": "object", + "description": "Describes the error happened when create or update an image template", + "properties": { + "provisioningErrorCode": { + "type": "string", + "enum": [ + "BadSourceType", + "BadPIRSource", + "BadManagedImageSource", + "BadSharedImageVersionSource", + "BadCustomizerType", + "UnsupportedCustomizerType", + "NoCustomizerScript", + "BadDistributeType", + "BadSharedImageDistribute", + "ServerError", + "Other" + ], + "x-ms-enum": { + "name": "ProvisioningErrorCode", + "modelAsString": true + }, + "description": "Error code of the provisioning failure" + }, + "message": { + "type": "string", + "description": "Verbose error message about the provisioning failure" + } + } + }, + "ImageTemplateLastRunStatus": { + "type": "object", + "description": "Describes the latest status of running an image template", + "properties": { + "startTime": { + "type": "string", + "format": "date-time", + "description": "Start time of the last run (UTC)" + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "End time of the last run (UTC)" + }, + "runState": { + "type": "string", + "enum": [ + "Running", + "Canceling", + "Succeeded", + "PartiallySucceeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "RunState", + "modelAsString": false + }, + "description": "State of the last run" + }, + "runSubState": { + "type": "string", + "enum": [ + "Queued", + "Building", + "Customizing", + "Distributing" + ], + "x-ms-enum": { + "name": "RunSubState", + "modelAsString": false + }, + "description": "Sub-state of the last run" + }, + "message": { + "type": "string", + "description": "Verbose information about the last run state" + } + } + }, + "ImageTemplateProperties": { + "type": "object", + "description": "Describes the properties of an image template", + "properties": { + "source": { + "$ref": "#/definitions/ImageTemplateSource", + "description": "Specifies the properties used to describe the source image." + }, + "customize": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateCustomizer" + }, + "description": "Specifies the properties used to describe the customization steps of the image, like Image source etc" + }, + "distribute": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateDistributor" + }, + "description": "The distribution targets where the image output needs to go to." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource", + "readOnly": true + }, + "provisioningError": { + "$ref": "#/definitions/ProvisioningError", + "description": "Provisioning error, if any", + "readOnly": true + }, + "lastRunStatus": { + "$ref": "#/definitions/ImageTemplateLastRunStatus", + "description": "State of 'run' that is currently executing or was last executed.", + "readOnly": true + }, + "buildTimeoutInMinutes": { + "type": "integer", + "minimum": 0, + "maximum": 960, + "default": 0, + "description": "Maximum duration to wait while building the image template. Omit or specify 0 to use the default (4 hours)." + }, + "vmProfile": { + "$ref": "#/definitions/ImageTemplateVmProfile", + "description": "Describes how virtual machine is set up to build images" + } + }, + "required": [ + "source", + "distribute" + ] + }, + "ImageTemplateIdentity": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of identity used for the image template. The type 'None' will remove any identities from the image template.", + "enum": [ + "UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal id of user assigned identity." + }, + "clientId": { + "readOnly": true, + "type": "string", + "description": "The client id of user assigned identity." + } + } + }, + "description": "The list of user identities associated with the image template. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'." + } + }, + "description": "Identity for the image template." + }, + "RunOutputProperties": { + "type": "object", + "description": "Describes the properties of a run output", + "properties": { + "artifactId": { + "type": "string", + "description": "The resource id of the artifact." + }, + "artifactUri": { + "type": "string", + "description": "The location URI of the artifact." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource", + "readOnly": true + } + } + }, + "ImageTemplate": { + "type": "object", + "description": "Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ImageTemplateProperties", + "description": "The properties of the image template" + }, + "identity": { + "$ref": "#/definitions/ImageTemplateIdentity", + "description": "The identity of the image template, if configured." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData", + "description": "Metadata pertaining to creation and last modification of the resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "required": [ + "identity" + ] + }, + "ImageTemplateUpdateParameters": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/ImageTemplateIdentity", + "description": "The identity of the image template, if configured." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The user-specified tags associated with the image template." + } + }, + "description": "Parameters for updating an image template." + }, + "RunOutput": { + "type": "object", + "description": "Represents an output that was created by running an image template.", + "allOf": [ + { + "$ref": "#/definitions/SubResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RunOutputProperties", + "x-ms-client-flatten": true, + "description": "The properties of the run output" + } + } + }, + "RunOutputCollection": { + "type": "object", + "description": "The result of List run outputs operation", + "properties": { + "value": { + "description": "An array of run outputs", + "type": "array", + "items": { + "$ref": "#/definitions/RunOutput" + } + }, + "nextLink": { + "type": "string", + "description": "The continuation token." + } + } + }, + "SubResource": { + "type": "object", + "description": "The Sub Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + } + }, + "required": [ + "name" + ] + }, + "Operation": { + "title": "A REST API operation", + "type": "object", + "properties": { + "name": { + "title": "The operation name.", + "description": "This is of the format {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "type": "object", + "title": "The object that describes the operation.", + "properties": { + "provider": { + "title": "Friendly name of the resource provider.", + "type": "string" + }, + "operation": { + "title": "The operation type.", + "description": "For example: read, write, delete, or listKeys/action", + "type": "string" + }, + "resource": { + "title": "The resource type on which the operation is performed.", + "type": "string" + }, + "description": { + "title": "The friendly name of the operation", + "type": "string" + } + } + }, + "origin": { + "title": "The intended executor of the operation.", + "type": "string" + }, + "properties": { + "title": "Properties of the operation.", + "type": "object" + }, + "isDataAction": { + "title": "The flag that indicates whether the operation applies to data plane.", + "type": "boolean" + } + } + }, + "OperationListResult": { + "type": "object", + "title": "Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "title": "The list of operations supported by the resource provider." + }, + "nextLink": { + "type": "string", + "title": "The URL to get the next set of operation list results if there are any." + } + } + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/CloudErrorBody", + "description": "Details about the error." + } + }, + "description": "An error response from the Azure VM Image Builder service." + }, + "CloudErrorBody": { + "type": "object", + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from the Azure VM Image Builder service." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ImageTemplateNameParameter": { + "name": "imageTemplateName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the image Template", + "pattern": "^[A-Za-z0-9-_.]{1,64}$", + "x-ms-parameter-location": "method" + }, + "RunOutputNameParameter": { + "name": "runOutputName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the run output", + "pattern": "^[A-Za-z0-9-_.]{1,64}$", + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "Location of the service.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} From b25a397475348eaadb5d1845b4812c725b7ef54f Mon Sep 17 00:00:00 2001 From: zdelacerda-microsoft <90284189+zdelacerda-microsoft@users.noreply.github.com> Date: Tue, 3 May 2022 16:14:57 -0700 Subject: [PATCH 02/11] Updates readme --- .../imagebuilder/resource-manager/readme.md | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/specification/imagebuilder/resource-manager/readme.md b/specification/imagebuilder/resource-manager/readme.md index 57a3e1778809..be4dd8469207 100644 --- a/specification/imagebuilder/resource-manager/readme.md +++ b/specification/imagebuilder/resource-manager/readme.md @@ -28,15 +28,24 @@ These are the global settings for the Virtual Machine Image Builder API. title: ImageBuilderClient description: Azure Virtual Machine Image Builder Client openapi-type: arm -tag: package-2021-10 +tag: package-2022-02 azure-arm: true ``` + +### Tag: package-2022-02 + +These settings apply only when `--tag=package-2022-02` is specified on the command line. + +```yaml $(tag) == 'package-2022-02' +input-file: + - Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +``` ### Tag: package-2021-10 These settings apply only when `--tag=package-2021-10` is specified on the command line. -```yaml $(tag) == 'package-2021-10' +``` yaml $(tag) == 'package-2021-10' input-file: - Microsoft.VirtualMachineImages/stable/2021-10-01/imagebuilder.json ``` @@ -45,10 +54,11 @@ input-file: These settings apply only when `--tag=package-2020-02` is specified on the command line. -```yaml $(tag) == 'package-2020-02' +``` yaml $(tag) == 'package-2020-02' input-file: - Microsoft.VirtualMachineImages/stable/2020-02-14/imagebuilder.json ``` + ### Tag: package-preview-2019-05 These settings apply only when `--tag=package-preview-2019-05` is specified on the command line. @@ -93,7 +103,7 @@ swagger-to-sdk: - repo: azure-sdk-for-node - repo: azure-resource-manager-schemas - repo: azure-powershell -``` +``` ## Python @@ -149,6 +159,3 @@ java: regenerate-manager: true generate-interface: true ``` - - - From 26a96e4008e618f6b599d9fb0005c900d850a911 Mon Sep 17 00:00:00 2001 From: zdelacerda-microsoft <90284189+zdelacerda-microsoft@users.noreply.github.com> Date: Tue, 3 May 2022 16:14:58 -0700 Subject: [PATCH 03/11] Updates API version in new specs and examples --- .../stable/2022-02-14/examples/CancelImageBuild.json | 4 ++-- .../stable/2022-02-14/examples/CreateImageTemplateLinux.json | 2 +- .../2022-02-14/examples/CreateImageTemplateWindows.json | 2 +- .../stable/2022-02-14/examples/DeleteImageTemplate.json | 4 ++-- .../stable/2022-02-14/examples/GetImageTemplate.json | 2 +- .../stable/2022-02-14/examples/GetRunOutput.json | 2 +- .../stable/2022-02-14/examples/ListImageTemplates.json | 2 +- .../stable/2022-02-14/examples/ListImageTemplatesByRg.json | 4 ++-- .../stable/2022-02-14/examples/ListRunOutputs.json | 2 +- .../stable/2022-02-14/examples/OperationsList.json | 2 +- .../stable/2022-02-14/examples/RunImageTemplate.json | 4 ++-- .../stable/2022-02-14/examples/UpdateImageTemplateTags.json | 4 ++-- .../examples/UpdateImageTemplateToRemoveIdentities.json | 4 ++-- .../stable/2022-02-14/imagebuilder.json | 2 +- 14 files changed, 20 insertions(+), 20 deletions(-) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json index 0e3e45ac755a..92529ff62cb2 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CancelImageBuild.json @@ -3,14 +3,14 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "200": {}, "204": {}, "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2022-02-14" } } } diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json index 542f0918be16..18568fc495c5 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateLinux.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", - "api-version": "2021-10-01", + "api-version": "2022-02-14", "imageTemplateName": "myImageTemplate", "parameters": { "location": "westus", diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json index 7a8637761937..d16d27dae7b1 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/CreateImageTemplateWindows.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", - "api-version": "2021-10-01", + "api-version": "2022-02-14", "imageTemplateName": "myImageTemplate", "parameters": { "location": "westus", diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json index fc9d523a4b91..24dcf35b267f 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/DeleteImageTemplate.json @@ -3,12 +3,12 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2022-02-14" } }, "200": {}, diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json index afa5eb4c8b7f..26a6d02f3b15 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetImageTemplate.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", - "api-version": "2021-10-01", + "api-version": "2022-02-14", "imageTemplateName": "myImageTemplate" }, "responses": { diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json index bd29d0f0b978..77e41d08ab78 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/GetRunOutput.json @@ -4,7 +4,7 @@ "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", "runOutputName": "myManagedImageOutput", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "200": { diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json index 6eca47cf4ce5..62deb572ee0d 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "{subscription-id}", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "200": { diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json index 4b60174e5fd3..621d280beafd 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "200": { @@ -111,7 +111,7 @@ } } ], - "nextLink": "/subscriptions/{subscription-id}/resourceGroup/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2021-10-01&skip-token=2" + "nextLink": "/subscriptions/{subscription-id}/resourceGroup/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2022-02-14&skip-token=2" } } } diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json index faa0e4079b56..da735e5a88b9 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "200": { diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json index 8b92987f87c0..5ba37190bc66 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "200": { diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json index 9b4e383f2cfd..9a78af516c0e 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/RunImageTemplate.json @@ -3,12 +3,12 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", - "api-version": "2021-10-01" + "api-version": "2022-02-14" }, "responses": { "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2022-02-14" } }, "204": {}, diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json index af3b77d266c8..c103c5bfc8c1 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateTags.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", - "api-version": "2021-10-01", + "api-version": "2022-02-14", "parameters": { "tags": { "new-tag": "new-value" @@ -61,7 +61,7 @@ }, "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2022-02-14" } } } diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json index a518fba536c8..66852f666bc8 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/UpdateImageTemplateToRemoveIdentities.json @@ -3,7 +3,7 @@ "subscriptionId": "{subscription-id}", "resourceGroupName": "myResourceGroup", "imageTemplateName": "myImageTemplate", - "api-version": "2021-10-01", + "api-version": "2022-02-14", "parameters": { "identity": { "type": "None" @@ -55,7 +55,7 @@ }, "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2022-02-14" } } } diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index ba7cadba2b9c..e19d66f8a24e 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -3,7 +3,7 @@ "info": { "title": "VirtualMachineImageTemplate", "description": "Virtual Machine Image Template", - "version": "2021-10-01" + "version": "2022-02-14" }, "host": "management.azure.com", "schemes": [ From 45ecfec9d08d959293a142b3b495980a90091f1b Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Tue, 3 May 2022 23:18:55 +0000 Subject: [PATCH 04/11] adding 2022 changes --- .../examples/ListImageTemplates.json | 2 +- .../examples/ListImageTemplatesByRg.json | 2 +- .../2022-02-14/examples/ListRunOutputs.json | 2 +- .../2022-02-14/examples/OperationsList.json | 198 +++++++++--------- .../stable/2022-02-14/imagebuilder.json | 178 ++++++++++++---- 5 files changed, 242 insertions(+), 140 deletions(-) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json index 62deb572ee0d..6ed04cfd2160 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplates.json @@ -102,7 +102,7 @@ } } ], - "nextLink": "/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2018-02-01-preview&skip-token=2" + "nextLink": "/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2022-02-14&skip-token=2" } } } diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json index 621d280beafd..15b522e04ca5 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListImageTemplatesByRg.json @@ -54,7 +54,7 @@ { "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myOtherImageTemplate", "name": "myOtherImageTemplate", - "location": "westus", + "location": "eastus", "type": "Microsoft.VirtualMachineImages/imageTemplate", "identity": { "type": "UserAssigned", diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json index da735e5a88b9..02ba9b52bc68 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/ListRunOutputs.json @@ -28,7 +28,7 @@ "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" } ], - "nextLink": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs?api-version=2018-02-01-preview&$skipToken=3" + "nextLink": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs?api-version=2022-02-14&$skipToken=3" } } } diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json index 5ba37190bc66..f3c04bd4e065 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json @@ -1,112 +1,112 @@ { - "parameters": { - "api-version": "2022-02-14" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.VirtualMachineImages/register/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Register Virtual Machine Image Builder RP", - "description": "Register Virtual Machine Image Builder RP" + "parameters": { + "api-version": "2022-02-14" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.VirtualMachineImages/register/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Register Virtual Machine Image Builder RP", + "description": "Register Virtual Machine Image Builder RP" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/unregister/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Unregister Virtual Machine Image Builder RP", - "description": "Unregister Virtual Machine Image Builder RP" + { + "name": "Microsoft.VirtualMachineImages/unregister/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Unregister Virtual Machine Image Builder RP", + "description": "Unregister Virtual Machine Image Builder RP" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Get a VM image template instance resource", - "resource": "VM Image template", - "description": "Get a VM image template instance resource" + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template instance resource", + "resource": "VM Image template", + "description": "Get a VM image template instance resource" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/write", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Create or update a VM image template instance resource", - "resource": "VM Image template", - "description": "Create or update a VM image template instance resource" + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/write", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Create or update a VM image template instance resource", + "resource": "VM Image template", + "description": "Create or update a VM image template instance resource" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/delete", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Delete a VM image template instance resource", - "resource": "VM Image template", - "description": "Delete a VM image template instance resource" + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/delete", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Delete a VM image template instance resource", + "resource": "VM Image template", + "description": "Delete a VM image template instance resource" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/run/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Execute a VM image template to produce its outputs", - "resource": "VM Image template", - "description": "Execute a VM image template to produce its outputs" + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/run/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Execute a VM image template to produce its outputs", + "resource": "VM Image template", + "description": "Execute a VM image template to produce its outputs" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Get a VM image template run output resource", - "resource": "VM Image template run output", - "description": "Get a VM image template run output resource" + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template run output resource", + "resource": "VM Image template run output", + "description": "Get a VM image template run output resource" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/operations/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "List available Virtual Machine Image Builder Operations", - "resource": "Operation", - "description": "List available Virtual Machine Image Builder Operations" + { + "name": "Microsoft.VirtualMachineImages/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "List available Virtual Machine Image Builder Operations", + "resource": "Operation", + "description": "List available Virtual Machine Image Builder Operations" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/locations/operations/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Get the status of an asynchronous operation", - "resource": "Asynchronous Operation", - "description": "Get the status of an asynchronous operation" + { + "name": "Microsoft.VirtualMachineImages/locations/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get the status of an asynchronous operation", + "resource": "Asynchronous Operation", + "description": "Get the status of an asynchronous operation" + }, + "isDataAction": false }, - "isDataAction": false - }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/cancel/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Cancel a running image build", - "resource": "VM Image template", - "description": "Cancel a running image build" - }, - "isDataAction": false - } - ], - "nextLink": "providers/Microsoft.AppPlatform?$skipToken={opaqueString}" + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/cancel/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Cancel a running image build", + "resource": "VM Image template", + "description": "Cancel a running image build" + }, + "isDataAction": false + } + ] + } } } } -} + \ No newline at end of file diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index e19d66f8a24e..6aa12a88c2b6 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -621,7 +621,7 @@ }, "ImageTemplateManagedImageSource": { "type": "object", - "description": "Describes an image source that is a managed image in customer subscription.", + "description": "Describes an image source that is a managed image in customer subscription. This image must reside in the same subscription and region as the Image Builder template.", "x-ms-discriminator-value": "ManagedImage", "allOf": [ { @@ -657,6 +657,95 @@ "imageVersionId" ] }, + "ImageTemplateInVMValidator": { + "description": "Describes a unit of in-VM validation of image", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "The type of validation you want to use on the Image. For example, \"Shell\" can be shell validation" + }, + "name": { + "type": "string", + "description": "Friendly Name to provide context on what this validation step does" + } + }, + "required": [ + "type" + ] + }, + "ImageTemplateShellValidator": { + "description": "Runs the specified shell script during the validation phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", + "x-ms-discriminator-value": "Shell", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateInVMValidator" + } + ], + "properties": { + "scriptUri": { + "type": "string", + "description": "URI of the shell script to be run for validation. It can be a github link, Azure Storage URI, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the shell script provided in the scriptUri field" + }, + "inline": { + "type": "array", + "description": "Array of shell commands to execute", + "items": { + "type": "string" + } + } + } + }, + "ImageTemplatePowerShellValidator": { + "description": "Runs the specified PowerShell script during the validation phase (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", + "x-ms-discriminator-value": "PowerShell", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateInVMValidator" + } + ], + "properties": { + "scriptUri": { + "type": "string", + "description": "URI of the PowerShell script to be run for validation. It can be a github link, Azure Storage URI, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the power shell script provided in the scriptUri field above" + }, + "inline": { + "type": "array", + "description": "Array of PowerShell commands to execute", + "items": { + "type": "string" + } + }, + "runElevated": { + "type": "boolean", + "default": false, + "description": "If specified, the PowerShell script will be run with elevated privileges" + }, + "runAsSystem": { + "type": "boolean", + "default": false, + "description": "If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true." + }, + "validExitCodes": { + "type": "array", + "description": "Valid exit codes for the PowerShell script. [Default: 0]", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, "ImageTemplateCustomizer": { "type": "object", "description": "Describes a unit of image customization", @@ -750,6 +839,7 @@ }, "updateLimit": { "type": "integer", + "format": "int32", "minimum": 0, "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" } @@ -795,7 +885,8 @@ "type": "array", "description": "Valid exit codes for the PowerShell script. [Default: 0]", "items": { - "type": "integer" + "type": "integer", + "format": "int32" } } } @@ -964,35 +1055,36 @@ "proxyVmSize": { "type": "string", "default": "", - "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2 for Gen1 images and Standard_D2ds_v4 for Gen2 images)." + "description": "Size of the proxy virtual machine used to pass traffic to the build VM and validation VM. Omit or specify empty string to use the default (Standard_A1_v2)." } } }, "ImageTemplateVmProfile": { "type": "object", - "description": "Describes the virtual machine used to build, customize and capture images", + "description": "Describes the virtual machines used to build and validate images", "properties": { "vmSize": { "type": "string", "default": "", - "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D2ds_v4)." + "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2 for Gen1 images and Standard_D2ds_v4 for Gen2 images)." }, "osDiskSizeGB": { "type": "integer", + "format": "int32", "minimum": 0, "default": 0, "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." }, "userAssignedIdentities": { "type": "array", - "description": "Optional array of resource IDs of user assigned managed identities to be configured on the build VM. This may include the identity of the image template.", + "description": "Optional array of resource IDs of user assigned managed identities to be configured on the build VM and validation VM. This may include the identity of the image template.", "items": { "type": "string" } }, "vnetConfig": { "$ref": "#/definitions/VirtualNetworkConfig", - "description": "Optional configuration of the virtual network to use to deploy the build virtual machine in. Omit if no specific virtual network needs to be used." + "description": "Optional configuration of the virtual network to use to deploy the build VM and validation VM in. Omit if no specific virtual network needs to be used." } } }, @@ -1025,8 +1117,12 @@ "BadCustomizerType", "UnsupportedCustomizerType", "NoCustomizerScript", + "BadValidatorType", + "UnsupportedValidatorType", + "NoValidatorScript", "BadDistributeType", "BadSharedImageDistribute", + "BadStagingResourceGroup", "ServerError", "Other" ], @@ -1078,6 +1174,7 @@ "Queued", "Building", "Customizing", + "Validating", "Distributing" ], "x-ms-enum": { @@ -1107,6 +1204,28 @@ }, "description": "Specifies the properties used to describe the customization steps of the image, like Image source etc" }, + "validate": { + "description": "Configuration options and list of validations to be performed on the resulting image.", + "properties": { + "continueDistributeOnFailure": { + "type": "boolean", + "default": false, + "description": "If validation fails and this field is set to false, output image(s) will not be distributed. This is the default behavior. If validation fails and this field is set to true, output image(s) will still be distributed. Please use this option with caution as it may result in bad images being distributed for use. In either case (true or false), the end to end image run will be reported as having failed in case of a validation failure. [Note: This field has no effect if validation succeeds.]" + }, + "sourceValidationOnly": { + "type": "boolean", + "default": false, + "description": "If this field is set to true, the image specified in the 'source' section will directly be validated. No separate build will be run to generate and then validate a customized image." + }, + "inVMValidations": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateInVMValidator" + }, + "description": "List of validations to be performed." + } + } + }, "distribute": { "type": "array", "items": { @@ -1131,14 +1250,24 @@ }, "buildTimeoutInMinutes": { "type": "integer", + "format": "int32", "minimum": 0, "maximum": 960, "default": 0, - "description": "Maximum duration to wait while building the image template. Omit or specify 0 to use the default (4 hours)." + "description": "Maximum duration to wait while building the image template (includes all customizations, validations, and distributions). Omit or specify 0 to use the default (4 hours)." }, "vmProfile": { "$ref": "#/definitions/ImageTemplateVmProfile", "description": "Describes how virtual machine is set up to build images" + }, + "stagingResourceGroup": { + "type": "string", + "description": "The staging resource group id in the same subscription as the image template that will be used to build the image. If this field is empty, a resource group with a random name will be created. If the resource group specified in this field doesn't exist, it will be created with the same name. If the resource group specified exists, it must be empty and in the same region as the image template. The resource group created will be deleted during template deletion if this field is empty or the resource group specified doesn't exist, but if the resource group specified exists the resources created in the resource group will be deleted during template deletion and the resource group itself will remain." + }, + "exactStagingResourceGroup": { + "type": "string", + "description": "The staging resource group id in the same subscription as the image template that will be used to build the image. This read-only field differs from 'stagingResourceGroup' only if the value specified in the 'stagingResourceGroup' field is empty.", + "readOnly": true } }, "required": [ @@ -1214,15 +1343,11 @@ "identity": { "$ref": "#/definitions/ImageTemplateIdentity", "description": "The identity of the image template, if configured." - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData", - "description": "Metadata pertaining to creation and last modification of the resource." } }, "allOf": [ { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" } ], "required": [ @@ -1251,7 +1376,7 @@ "description": "Represents an output that was created by running an image template.", "allOf": [ { - "$ref": "#/definitions/SubResource" + "$ref": "#../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ], "properties": { @@ -1279,29 +1404,6 @@ } } }, - "SubResource": { - "type": "object", - "description": "The Sub Resource model definition.", - "properties": { - "id": { - "readOnly": true, - "type": "string", - "description": "Resource Id" - }, - "name": { - "type": "string", - "description": "Resource name" - }, - "type": { - "readOnly": true, - "type": "string", - "description": "Resource type" - } - }, - "required": [ - "name" - ] - }, "Operation": { "title": "A REST API operation", "type": "object", @@ -1453,4 +1555,4 @@ "description": "Client Api Version." } } -} +} \ No newline at end of file From 01d417c1f1ac4a05ce8f688ec3d45760ef7b6515 Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Wed, 4 May 2022 16:58:30 +0000 Subject: [PATCH 05/11] fixed proxy resource path --- .../stable/2022-02-14/imagebuilder.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index 6aa12a88c2b6..a6e4eb772bb7 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -1376,7 +1376,7 @@ "description": "Represents an output that was created by running an image template.", "allOf": [ { - "$ref": "#../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" } ], "properties": { @@ -1555,4 +1555,4 @@ "description": "Client Api Version." } } -} \ No newline at end of file +} From 68e57c6c45301a02cd3a50a6107ed4b12fd489b6 Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Wed, 4 May 2022 17:13:37 +0000 Subject: [PATCH 06/11] added object to ImageTemplate* --- .../stable/2022-02-14/imagebuilder.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index a6e4eb772bb7..62123a5be6db 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -658,6 +658,7 @@ ] }, "ImageTemplateInVMValidator": { + "type": "object", "description": "Describes a unit of in-VM validation of image", "discriminator": "type", "properties": { @@ -675,6 +676,7 @@ ] }, "ImageTemplateShellValidator": { + "type": "object", "description": "Runs the specified shell script during the validation phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", "x-ms-discriminator-value": "Shell", "allOf": [ @@ -702,6 +704,7 @@ } }, "ImageTemplatePowerShellValidator": { + "type": "object", "description": "Runs the specified PowerShell script during the validation phase (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", "x-ms-discriminator-value": "PowerShell", "allOf": [ From 5b022c6159f15b7f0f7d219b201d0511e85f34cb Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Mon, 9 May 2022 22:08:36 +0000 Subject: [PATCH 07/11] added object to valide and prettier to examples --- .../2022-02-14/examples/OperationsList.json | 197 +++++++++--------- .../stable/2022-02-14/imagebuilder.json | 1 + 2 files changed, 99 insertions(+), 99 deletions(-) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json index f3c04bd4e065..8a8921a9cb1b 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/examples/OperationsList.json @@ -1,112 +1,111 @@ { - "parameters": { - "api-version": "2022-02-14" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.VirtualMachineImages/register/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Register Virtual Machine Image Builder RP", - "description": "Register Virtual Machine Image Builder RP" - }, - "isDataAction": false + "parameters": { + "api-version": "2022-02-14" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.VirtualMachineImages/register/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Register Virtual Machine Image Builder RP", + "description": "Register Virtual Machine Image Builder RP" }, - { - "name": "Microsoft.VirtualMachineImages/unregister/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Unregister Virtual Machine Image Builder RP", - "description": "Unregister Virtual Machine Image Builder RP" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/unregister/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Unregister Virtual Machine Image Builder RP", + "description": "Unregister Virtual Machine Image Builder RP" }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Get a VM image template instance resource", - "resource": "VM Image template", - "description": "Get a VM image template instance resource" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template instance resource", + "resource": "VM Image template", + "description": "Get a VM image template instance resource" }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/write", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Create or update a VM image template instance resource", - "resource": "VM Image template", - "description": "Create or update a VM image template instance resource" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/write", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Create or update a VM image template instance resource", + "resource": "VM Image template", + "description": "Create or update a VM image template instance resource" }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/delete", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Delete a VM image template instance resource", - "resource": "VM Image template", - "description": "Delete a VM image template instance resource" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/delete", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Delete a VM image template instance resource", + "resource": "VM Image template", + "description": "Delete a VM image template instance resource" }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/run/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Execute a VM image template to produce its outputs", - "resource": "VM Image template", - "description": "Execute a VM image template to produce its outputs" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/run/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Execute a VM image template to produce its outputs", + "resource": "VM Image template", + "description": "Execute a VM image template to produce its outputs" }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Get a VM image template run output resource", - "resource": "VM Image template run output", - "description": "Get a VM image template run output resource" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template run output resource", + "resource": "VM Image template run output", + "description": "Get a VM image template run output resource" }, - { - "name": "Microsoft.VirtualMachineImages/operations/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "List available Virtual Machine Image Builder Operations", - "resource": "Operation", - "description": "List available Virtual Machine Image Builder Operations" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "List available Virtual Machine Image Builder Operations", + "resource": "Operation", + "description": "List available Virtual Machine Image Builder Operations" }, - { - "name": "Microsoft.VirtualMachineImages/locations/operations/read", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Get the status of an asynchronous operation", - "resource": "Asynchronous Operation", - "description": "Get the status of an asynchronous operation" - }, - "isDataAction": false + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/locations/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get the status of an asynchronous operation", + "resource": "Asynchronous Operation", + "description": "Get the status of an asynchronous operation" }, - { - "name": "Microsoft.VirtualMachineImages/imageTemplates/cancel/action", - "display": { - "provider": "Virtual Machine Image Builder", - "operation": "Cancel a running image build", - "resource": "VM Image template", - "description": "Cancel a running image build" - }, - "isDataAction": false - } - ] - } + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/cancel/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Cancel a running image build", + "resource": "VM Image template", + "description": "Cancel a running image build" + }, + "isDataAction": false + } + ] } } } - \ No newline at end of file +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index 62123a5be6db..60e8094f96e2 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -1208,6 +1208,7 @@ "description": "Specifies the properties used to describe the customization steps of the image, like Image source etc" }, "validate": { + "type": "object", "description": "Configuration options and list of validations to be performed on the resulting image.", "properties": { "continueDistributeOnFailure": { From 1b2afa0d1aa8845443113eea2984357ded1e7361 Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Tue, 10 May 2022 23:49:38 +0000 Subject: [PATCH 08/11] added identifier --- .../stable/2022-02-14/imagebuilder.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index 60e8094f96e2..2e77bfb9f76c 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -1226,6 +1226,7 @@ "items": { "$ref": "#/definitions/ImageTemplateInVMValidator" }, + "x-ms-identifiers": [], "description": "List of validations to be performed." } } From 43d8c1da7e5fcc617ba4d4a299e930598b476267 Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Mon, 16 May 2022 18:01:25 +0000 Subject: [PATCH 09/11] removed format integer 32 for breaking change --- .../stable/2022-02-14/imagebuilder.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index 2e77bfb9f76c..5a9aa016e0ac 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -842,7 +842,6 @@ }, "updateLimit": { "type": "integer", - "format": "int32", "minimum": 0, "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" } @@ -889,7 +888,6 @@ "description": "Valid exit codes for the PowerShell script. [Default: 0]", "items": { "type": "integer", - "format": "int32" } } } @@ -1073,7 +1071,6 @@ }, "osDiskSizeGB": { "type": "integer", - "format": "int32", "minimum": 0, "default": 0, "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." @@ -1255,7 +1252,6 @@ }, "buildTimeoutInMinutes": { "type": "integer", - "format": "int32", "minimum": 0, "maximum": 960, "default": 0, From 8d60aa0b1ca9db97f495daa4144f5aeb09f4cfd5 Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Mon, 16 May 2022 22:25:52 +0000 Subject: [PATCH 10/11] added back format integer 64, to be in compliance for lintdiff and breaking change --- .../stable/2022-02-14/imagebuilder.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index 5a9aa016e0ac..16a4cb32fa72 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -842,6 +842,7 @@ }, "updateLimit": { "type": "integer", + "format": "int64", "minimum": 0, "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" } @@ -888,6 +889,7 @@ "description": "Valid exit codes for the PowerShell script. [Default: 0]", "items": { "type": "integer", + "format": "int64" } } } @@ -1071,6 +1073,7 @@ }, "osDiskSizeGB": { "type": "integer", + "format": "int64", "minimum": 0, "default": 0, "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." @@ -1252,6 +1255,7 @@ }, "buildTimeoutInMinutes": { "type": "integer", + "format": "int64", "minimum": 0, "maximum": 960, "default": 0, From 57de9b7f42435ce4e107764aa995a9b030cf3a6c Mon Sep 17 00:00:00 2001 From: zdelacerda Date: Tue, 17 May 2022 18:28:27 +0000 Subject: [PATCH 11/11] adding back int32 after getting jeffrey richters approval --- .../stable/2022-02-14/imagebuilder.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json index 16a4cb32fa72..2e77bfb9f76c 100644 --- a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2022-02-14/imagebuilder.json @@ -842,7 +842,7 @@ }, "updateLimit": { "type": "integer", - "format": "int64", + "format": "int32", "minimum": 0, "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" } @@ -889,7 +889,7 @@ "description": "Valid exit codes for the PowerShell script. [Default: 0]", "items": { "type": "integer", - "format": "int64" + "format": "int32" } } } @@ -1073,7 +1073,7 @@ }, "osDiskSizeGB": { "type": "integer", - "format": "int64", + "format": "int32", "minimum": 0, "default": 0, "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." @@ -1255,7 +1255,7 @@ }, "buildTimeoutInMinutes": { "type": "integer", - "format": "int64", + "format": "int32", "minimum": 0, "maximum": 960, "default": 0,