diff --git a/custom-words.txt b/custom-words.txt index 839757224072..9332326fade7 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -263,6 +263,7 @@ autoregressive autorenew autorenewable autorest +autorun autosave autoscale autoscaler diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CancelImageBuild.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CancelImageBuild.json new file mode 100644 index 000000000000..c3d1545c1222 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CancelImageBuild.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-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=2024-02-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateLinux.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateLinux.json new file mode 100644 index 000000000000..4f21034a7b5b --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateLinux.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-02-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/imageTemplates", + "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/imageTemplates", + "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/2024-02-01/examples/CreateImageTemplateWindows.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateWindows.json new file mode 100644 index 000000000000..5c3a66276565 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateImageTemplateWindows.json @@ -0,0 +1,372 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-02-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/imageTemplates", + "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/imageTemplates", + "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/2024-02-01/examples/CreateSourceImageTrigger.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateSourceImageTrigger.json new file mode 100644 index 000000000000..c8a6cca99113 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/CreateSourceImageTrigger.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-02-01", + "imageTemplateName": "myImageTemplate", + "triggerName": "source", + "parameters": { + "properties": { + "kind": "SourceImage" + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source", + "name": "source", + "type": "Microsoft.VirtualMachineImages/imageTemplates/triggers", + "properties": { + "kind": "SourceImage", + "status": { + "code": "Healthy", + "message": "", + "time": "2024-02-21T17:32:28Z" + }, + "provisioningState": "Succeeded" + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source", + "name": "source", + "type": "Microsoft.VirtualMachineImages/imageTemplates/triggers", + "properties": { + "kind": "SourceImage", + "status": { + "code": "Healthy", + "message": "", + "time": "2024-02-21T17:32:28Z" + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteImageTemplate.json new file mode 100644 index 000000000000..18660b6f66eb --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteImageTemplate.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2024-02-01" + } + }, + "204": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteTrigger.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteTrigger.json new file mode 100644 index 000000000000..4676df333185 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/DeleteTrigger.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "triggerName": "trigger1", + "api-version": "2024-02-01" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2024-02-01" + } + }, + "204": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetImageTemplate.json new file mode 100644 index 000000000000..cd596bf5c50b --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetImageTemplate.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-02-01", + "imageTemplateName": "myImageTemplate" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplates", + "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/2024-02-01/examples/GetRunOutput.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetRunOutput.json new file mode 100644 index 000000000000..d4f6d94fda1f --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetRunOutput.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "runOutputName": "myManagedImageOutput", + "api-version": "2024-02-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/2024-02-01/examples/GetTrigger.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetTrigger.json new file mode 100644 index 000000000000..37835a9672f0 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/GetTrigger.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "triggerName": "source", + "api-version": "2024-02-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source", + "name": "source", + "properties": { + "kind": "SourceImage", + "status": { + "code": "Healthy", + "message": "", + "time": "2024-02-21T17:32:28Z" + }, + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/triggers" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplates.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplates.json new file mode 100644 index 000000000000..0106d842b3e4 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplates.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "api-version": "2024-02-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplates", + "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/imageTemplates", + "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=2024-02-01&skip-token=2" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplatesByRg.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplatesByRg.json new file mode 100644 index 000000000000..f165f531d8a6 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListImageTemplatesByRg.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2024-02-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplates", + "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": "eastus", + "type": "Microsoft.VirtualMachineImages/imageTemplates", + "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=2024-02-01&skip-token=2" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListRunOutputs.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListRunOutputs.json new file mode 100644 index 000000000000..2ff268030720 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListRunOutputs.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-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=2024-02-01&$skipToken=3" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListTriggers.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListTriggers.json new file mode 100644 index 000000000000..c65acb471cac --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/ListTriggers.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers/source", + "name": "source", + "properties": { + "kind": "SourceImage", + "status": { + "code": "Healthy", + "message": "", + "time": "2024-02-21T17:32:28Z" + }, + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/triggers" + } + ], + "nextLink": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/triggers?api-version=2024-02-01&$skipToken=3" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/OperationsList.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/OperationsList.json new file mode 100644 index 000000000000..42565906913d --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/OperationsList.json @@ -0,0 +1,141 @@ +{ + "parameters": { + "api-version": "2024-02-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 + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/triggers/write", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Create or update a trigger for a VM image template resource", + "resource": "Trigger", + "description": "Create or update a trigger for a VM image template resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/triggers/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a trigger for a VM image template resource", + "resource": "Trigger", + "description": "Get a trigger for a VM image template resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/triggers/delete", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Delete a trigger for a VM image template resource", + "resource": "Trigger", + "description": "Delete a trigger for a VM image template resource" + }, + "isDataAction": false + } + ] + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/RunImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/RunImageTemplate.json new file mode 100644 index 000000000000..ca726db45be6 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/RunImageTemplate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-01" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2024-02-01" + } + }, + "204": {}, + "200": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateTags.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateTags.json new file mode 100644 index 000000000000..cff81c6039a4 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateTags.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-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/imageTemplates", + "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=2024-02-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateToRemoveIdentities.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateToRemoveIdentities.json new file mode 100644 index 000000000000..d07a57de59a5 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateToRemoveIdentities.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-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/imageTemplates", + "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=2024-02-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateVmProfile.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateVmProfile.json new file mode 100644 index 000000000000..3cd282115eca --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/examples/UpdateImageTemplateVmProfile.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2024-02-01", + "parameters": { + "properties": { + "vmProfile": { + "osDiskSizeGB": 127, + "vmSize": "{updated_vmsize}", + "vnetConfig": { + "containerInstanceSubnetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/subnetname", + "subnetId": "{updated_aci_subnet}" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplates", + "identity": { + "type": "None" + }, + "tags": { + "tag": "tag-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": { + "osDiskSizeGB": 127, + "vmSize": "{updated_vmsize}", + "vnetConfig": { + "containerInstanceSubnetId": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnetname/subnets/subnetname", + "subnetId": "{updated_aci_subnet}}" + } + } + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2024-02-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/imagebuilder.json new file mode 100644 index 000000000000..6c390d119b52 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2024-02-01/imagebuilder.json @@ -0,0 +1,2095 @@ +{ + "swagger": "2.0", + "info": { + "title": "VirtualMachineImageTemplate", + "description": "Virtual Machine Image Template", + "version": "2024-02-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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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" + }, + "Update parameters for vm profile.": { + "$ref": "./examples/UpdateImageTemplateVmProfile.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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": { + "202": { + "description": "The operation will be completed asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } + }, + "204": { + "description": "NoContent -- VM image template does not exist in the subscription." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Retrieve single runOutput": { + "$ref": "./examples/GetRunOutput.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/triggers": { + "get": { + "tags": [ + "Triggers" + ], + "operationId": "Triggers_ListByImageTemplate", + "description": "List all triggers 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/TriggerCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List triggers by image template": { + "$ref": "./examples/ListTriggers.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/triggers/{triggerName}": { + "get": { + "tags": [ + "Triggers" + ], + "operationId": "Triggers_Get", + "description": "Get the specified trigger for the specified image template resource", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/TriggerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Trigger" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a trigger resource": { + "$ref": "./examples/GetTrigger.json" + } + } + }, + "put": { + "tags": [ + "Triggers" + ], + "operationId": "Triggers_CreateOrUpdate", + "description": "Create or update a trigger for the specified virtual machine image template", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/Trigger" + }, + "description": "Parameters supplied to the CreateTrigger operation" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/TriggerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/Trigger" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/Trigger" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create or update a source image type trigger": { + "$ref": "./examples/CreateSourceImageTrigger.json" + } + } + }, + "delete": { + "tags": [ + "Triggers" + ], + "operationId": "Triggers_Delete", + "description": "Delete a trigger for the specified virtual machine image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/TriggerNameParameter" + } + ], + "responses": { + "202": { + "description": "The operation will be completed asynchronously.", + "headers": { + "Location": { + "description": "The URI to poll for completion status.", + "type": "string" + } + } + }, + "204": { + "description": "NoContent -- trigger by the name doesn't exist." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-examples": { + "Delete a trigger resource": { + "$ref": "./examples/DeleteTrigger.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": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "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. This image must reside in the same subscription and region as the Image Builder template.", + "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 an Azure Compute Gallery or a Direct Shared Gallery.", + "x-ms-discriminator-value": "SharedImageVersion", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "imageVersionId": { + "type": "string", + "description": "ARM resource id of the image version. When image version name is 'latest', the version is evaluated when the image build takes place." + }, + "exactVersion": { + "type": "string", + "description": "Exact ARM resource id of the image version. This readonly field differs from the image version Id in 'imageVersionId' only if the version name specified in 'imageVersionId' field is 'latest'.", + "readOnly": true + } + }, + "required": [ + "imageVersionId" + ] + }, + "ImageTemplateInVMValidator": { + "type": "object", + "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": { + "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": [ + { + "$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": { + "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": [ + { + "$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" + } + } + } + }, + "ImageTemplateFileValidator": { + "type": "object", + "description": "Uploads files required for validation to VMs (Linux, Windows). Corresponds to Packer file provisioner", + "x-ms-discriminator-value": "File", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateInVMValidator" + } + ], + "properties": { + "sourceUri": { + "type": "string", + "description": "The URI of the file to be uploaded to the VM for validation. It can be a github link, Azure Storage URI (authorized or SAS), 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" + } + } + }, + "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", + "format": "int32", + "minimum": 0, + "default": 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", + "format": "int32" + } + } + } + }, + "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 Azure Compute Gallery.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ], + "properties": { + "galleryImageId": { + "type": "string", + "description": "Resource Id of the Azure Compute Gallery image" + }, + "replicationRegions": { + "description": "[Deprecated] A list of regions that the image will be replicated to. This list can be specified only if targetRegions is not specified. This field is deprecated - use targetRegions instead.", + "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": { + "$ref": "#/definitions/SharedImageStorageAccountType", + "description": "[Deprecated] Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS). This field can be specified only if replicationRegions is specified. This field is deprecated - use targetRegions instead." + }, + "targetRegions": { + "type": "array", + "items": { + "$ref": "#/definitions/TargetRegion" + }, + "x-ms-identifiers": [], + "description": "The target regions where the distributed Image Version is going to be replicated to. This object supersedes replicationRegions and can be specified only if replicationRegions is not specified." + }, + "versioning": { + "$ref": "#/definitions/DistributeVersioner" + } + }, + "required": [ + "galleryImageId" + ] + }, + "TargetRegion": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the region." + }, + "replicaCount": { + "type": "integer", + "format": "int32", + "minimum": 1, + "default": 1, + "description": "The number of replicas of the Image Version to be created in this region. Omit to use the default (1)." + }, + "storageAccountType": { + "$ref": "#/definitions/SharedImageStorageAccountType", + "description": "Specifies the storage account type to be used to store the image in this region. Omit to use the default (Standard_LRS)." + } + }, + "required": [ + "name" + ], + "description": "Describes the target region information." + }, + "ImageTemplateVhdDistributor": { + "x-ms-discriminator-value": "VHD", + "description": "Distribute via VHD in a storage account.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ], + "properties": { + "uri": { + "type": "string", + "description": "Optional Azure Storage URI for the distributed VHD blob. Omit to use the default (empty string) in which case VHD would be published to the storage account in the staging resource group." + } + } + }, + "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 on which the build VM and validation VM will be deployed" + }, + "containerInstanceSubnetId": { + "type": "string", + "description": "Resource id of a pre-existing subnet on which Azure Container Instance will be deployed for Isolated Builds. This field may be specified only if `subnetId` is also specified and must be on the same Virtual Network as the subnet specified in `subnetId`." + }, + "proxyVmSize": { + "type": "string", + "default": "", + "description": "Size of the proxy virtual machine used to pass traffic to the build VM and validation VM. This must not be specified if `containerInstanceSubnetId` is specified because no proxy virtual machine is deployed in that case. Omit or specify empty string to use the default (Standard_A1_v2)." + } + } + }, + "ImageTemplateVmProfile": { + "type": "object", + "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_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 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 VM and validation VM in. Omit if no specific virtual network needs to be used." + } + } + }, + "SharedImageStorageAccountType": { + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_ZRS", + "Premium_LRS" + ], + "x-ms-enum": { + "name": "SharedImageStorageAccountType", + "modelAsString": true + }, + "description": "Specifies the storage account type to be used to store the Azure Compute Gallery image version in." + }, + "ProvisioningState": { + "type": "string", + "enum": [ + "Creating", + "Updating", + "Succeeded", + "Failed", + "Deleting", + "Canceled" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false + }, + "description": "Provisioning state of the resource" + }, + "onBuildError": { + "type": "string", + "enum": [ + "cleanup", + "abort" + ], + "x-ms-enum": { + "name": "onBuildError", + "modelAsString": true + }, + "description": "Error handling behavior upon build failure" + }, + "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", + "BadValidatorType", + "UnsupportedValidatorType", + "NoValidatorScript", + "BadDistributeType", + "BadSharedImageDistribute", + "BadStagingResourceGroup", + "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", + "Optimizing", + "Validating", + "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" + } + } + }, + "ImageTemplateAutoRun": { + "type": "object", + "description": "Indicates if the image template needs to be built on create/update", + "properties": { + "state": { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "AutoRunState", + "modelAsString": false, + "values": [ + { + "value": "Enabled", + "description": "Autorun is enabled", + "name": "AutoRunEnabled" + }, + { + "value": "Disabled", + "description": "Autorun is disabled", + "name": "AutoRunDisabled" + } + ] + }, + "description": "Enabling this field will trigger an automatic build on image template creation or update." + } + } + }, + "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" + }, + "x-ms-identifiers": [], + "description": "Specifies the properties used to describe the customization steps of the image, like Image source etc" + }, + "optimize": { + "type": "object", + "description": "Specifies optimization to be performed on image.", + "properties": { + "vmBoot": { + "type": "object", + "description": "Optimization is applied on the image for a faster VM boot.", + "properties": { + "state": { + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "VMBootOptimizationState", + "modelAsString": false + }, + "description": "Enabling this field will improve VM boot time by optimizing the final customized image output." + } + } + } + } + }, + "validate": { + "type": "object", + "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" + }, + "x-ms-identifiers": [], + "description": "List of validations to be performed." + } + } + }, + "distribute": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateDistributor" + }, + "x-ms-identifiers": [], + "description": "The distribution targets where the image output needs to go to." + }, + "errorHandling": { + "type": "object", + "description": "Error handling options upon a build failure", + "properties": { + "onCustomizerError": { + "$ref": "#/definitions/onBuildError", + "default": "cleanup", + "description": "If there is a customizer error and this field is set to 'cleanup', the build VM and associated network resources will be cleaned up. This is the default behavior. If there is a customizer error and this field is set to 'abort', the build VM will be preserved." + }, + "onValidationError": { + "$ref": "#/definitions/onBuildError", + "default": "cleanup", + "description": "If there is a validation error and this field is set to 'cleanup', the build VM and associated network resources will be cleaned up. This is the default behavior. If there is a validation error and this field is set to 'abort', the build VM will be preserved." + } + } + }, + "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", + "format": "int32", + "minimum": 0, + "maximum": 960, + "default": 0, + "description": "Maximum duration to wait while building the image template (includes all customizations, optimization, 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 + }, + "autoRun": { + "$ref": "#/definitions/ImageTemplateAutoRun", + "description": "Indicates whether or not to automatically run the image template build on template creation or update." + }, + "managedResourceTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Tags that will be applied to the resource group and/or resources created by the service." + } + }, + "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": { + "$ref": "#/definitions/UserAssignedIdentities" + } + }, + "description": "Identity for the image template." + }, + "UserAssignedIdentities": { + "title": "User-Assigned Identities", + "description": "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/UserAssignedIdentity" + } + }, + "UserAssignedIdentity": { + "type": "object", + "description": "User assigned identity properties", + "properties": { + "principalId": { + "description": "The principal ID of the assigned identity.", + "type": "string", + "readOnly": true + }, + "clientId": { + "description": "The client ID of the assigned identity.", + "type": "string", + "readOnly": true + } + } + }, + "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." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/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." + }, + "properties": { + "type": "object", + "description": "Parameters for updating an image template.", + "properties": { + "distribute": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateDistributor" + }, + "x-ms-identifiers": [], + "description": "The distribution targets where the image output needs to go to." + }, + "vmProfile": { + "$ref": "#/definitions/ImageTemplateVmProfile", + "description": "Describes how virtual machine is set up to build images" + } + } + } + }, + "description": "Parameters for updating an image template." + }, + "RunOutput": { + "type": "object", + "description": "Represents an output that was created by running an image template.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ], + "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." + } + } + }, + "TriggerStatus": { + "type": "object", + "description": "Describes the status of a trigger", + "properties": { + "code": { + "type": "string", + "description": "The status code.", + "readOnly": true + }, + "message": { + "type": "string", + "description": "The detailed status message, including for alerts and error messages.", + "readOnly": true + }, + "time": { + "type": "string", + "format": "date-time", + "description": "The time of the status.", + "readOnly": true + } + } + }, + "TriggerProperties": { + "type": "object", + "description": "Describes the properties of a trigger", + "discriminator": "kind", + "properties": { + "kind": { + "type": "string", + "description": "The kind of trigger.", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "status": { + "$ref": "#/definitions/TriggerStatus", + "description": "Trigger status", + "readOnly": true + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource", + "readOnly": true + } + }, + "required": [ + "kind" + ] + }, + "SourceImageTriggerProperties": { + "type": "object", + "description": "Properties of SourceImage kind of trigger", + "x-ms-discriminator-value": "SourceImage", + "allOf": [ + { + "$ref": "#/definitions/TriggerProperties" + } + ], + "properties": {} + }, + "Trigger": { + "type": "object", + "description": "Represents a trigger that can invoke an image template build.", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/TriggerProperties", + "x-ms-client-flatten": true, + "description": "The properties of a trigger" + } + } + }, + "TriggerCollection": { + "type": "object", + "description": "The result of List triggers operation", + "properties": { + "value": { + "description": "An array of triggers", + "type": "array", + "items": { + "$ref": "#/definitions/Trigger" + } + }, + "nextLink": { + "type": "string", + "description": "The continuation token." + } + }, + "required": [ + "value" + ] + }, + "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" + }, + "x-ms-identifiers": [], + "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." + } + } + }, + "DistributeVersioner": { + "type": "object", + "discriminator": "scheme", + "properties": { + "scheme": { + "type": "string", + "description": "Version numbering scheme to be used." + } + }, + "description": "Describes how to generate new x.y.z version number for distribution.", + "required": [ + "scheme" + ] + }, + "DistributeVersionerLatest": { + "type": "object", + "x-ms-discriminator-value": "Latest", + "allOf": [ + { + "$ref": "#/definitions/DistributeVersioner" + } + ], + "properties": { + "major": { + "type": "integer", + "format": "int32", + "minimum": -1, + "default": -1, + "description": "Major version for the generated version number. Determine what is \"latest\" based on versions with this value as the major version. -1 is equivalent to leaving it unset." + } + }, + "description": "Generates version number that will be latest based on existing version numbers." + }, + "DistributeVersionerSource": { + "type": "object", + "x-ms-discriminator-value": "Source", + "allOf": [ + { + "$ref": "#/definitions/DistributeVersioner" + } + ], + "description": "Generates version number based on version number of source image" + } + }, + "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" + }, + "TriggerNameParameter": { + "name": "triggerName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the trigger", + "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." + } + } +} diff --git a/specification/imagebuilder/resource-manager/readme.md b/specification/imagebuilder/resource-manager/readme.md index 4c6ec887d75b..5006127c7dd6 100644 --- a/specification/imagebuilder/resource-manager/readme.md +++ b/specification/imagebuilder/resource-manager/readme.md @@ -28,11 +28,20 @@ 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-2023-07 +tag: package-2024-02 azure-arm: true ``` +### Tag: package-2024-02 + +These settings apply only when `--tag=package-2024-02` is specified on the command line. + +```yaml $(tag) == 'package-2024-02' +input-file: + - Microsoft.VirtualMachineImages/stable/2024-02-01/imagebuilder.json +``` + ### Tag: package-2023-07 These settings apply only when `--tag=package-2023-07` is specified on the command line. @@ -133,3 +142,12 @@ See configuration in [readme.go.md](./readme.go.md) ## Java See configuration in [readme.java.md](./readme.java.md) + +## Suppression + +``` yaml +directive: + - suppress: AvoidAdditionalProperties + from: imagebuilder.json + reason: Needed value. Exception provided in API Design review meeting. Note - suppressing entire file due to bug with where field. Suppression targets are as follows, $.definitions.ImageTemplateDistributor.properties.artifactTags, $.definitions.ImageTemplateProperties.properties.managedResourceTags, $.definitions.UserAssignedIdentities, $.definitions.ImageTemplateUpdateParameters.properties.tags +``` \ No newline at end of file