diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CancelImageBuild.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CancelImageBuild.json new file mode 100644 index 000000000000..0e3e45ac755a --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CancelImageBuild.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "200": {}, + "204": {}, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateLinux.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateLinux.json new file mode 100644 index 000000000000..542f0918be16 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateLinux.json @@ -0,0 +1,147 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01", + "imageTemplateName": "myImageTemplate", + "parameters": { + "location": "westus", + "tags": { + "imagetemplate_tag1": "IT_T1", + "imagetemplate_tag2": "IT_T2" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {} + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateWindows.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateWindows.json new file mode 100644 index 000000000000..7a8637761937 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/CreateImageTemplateWindows.json @@ -0,0 +1,372 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01", + "imageTemplateName": "myImageTemplate", + "parameters": { + "location": "westus", + "tags": { + "imagetemplate_tag1": "IT_T1", + "imagetemplate_tag2": "IT_T2" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {} + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated Local System user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": true + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "WindowsRestart", + "name": "Restart Customizer Example", + "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", + "restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"", + "restartTimeout": "10m" + }, + { + "type": "WindowsUpdate", + "name": "Windows Update Customizer Example", + "searchCriteria": "BrowseOnly=0 and IsInstalled=0", + "filters": [ + "$_.BrowseOnly" + ], + "updateLimit": 100 + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated Local System user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": true + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "validExitCodes": [ + 0, + 1 + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": false, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "WindowsRestart", + "name": "Restart Customizer Example", + "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", + "restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"", + "restartTimeout": "10m" + }, + { + "type": "WindowsUpdate", + "name": "Windows Update Customizer Example", + "searchCriteria": "BrowseOnly=0 and IsInstalled=0", + "filters": [ + "$_.BrowseOnly" + ], + "updateLimit": 100 + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64, + "vnetConfig": { + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" + } + } + } + } + }, + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (inline) Customizer Elevated Local System user Example", + "inline": [ + "Powershell command-1", + "Powershell command-2", + "Powershell command-3" + ], + "runElevated": true, + "runAsSystem": true + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "validExitCodes": [ + 0, + 1 + ], + "runElevated": false, + "runAsSystem": false + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": false, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "PowerShell", + "name": "PowerShell (script) Customizer Elevated Local System user Example", + "scriptUri": "https://example.com/path/to/script.ps1", + "runElevated": true, + "runAsSystem": true, + "validExitCodes": [ + 0, + 1 + ] + }, + { + "type": "WindowsRestart", + "name": "Restart Customizer Example", + "restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"", + "restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"", + "restartTimeout": "10m" + }, + { + "type": "WindowsUpdate", + "name": "Windows Update Customizer Example", + "searchCriteria": "BrowseOnly=0 and IsInstalled=0", + "filters": [ + "$_.BrowseOnly" + ], + "updateLimit": 100 + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/DeleteImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/DeleteImageTemplate.json new file mode 100644 index 000000000000..fc9d523a4b91 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/DeleteImageTemplate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + }, + "200": {}, + "204": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetImageTemplate.json new file mode 100644 index 000000000000..afa5eb4c8b7f --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetImageTemplate.json @@ -0,0 +1,55 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01", + "imageTemplateName": "myImageTemplate" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell Customizer Example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetRunOutput.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetRunOutput.json new file mode 100644 index 000000000000..bd29d0f0b978 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/GetRunOutput.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "runOutputName": "myManagedImageOutput", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput", + "name": "myManagedImageOutput", + "properties": { + "artifactId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image", + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplates.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplates.json new file mode 100644 index 000000000000..6eca47cf4ce5 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplates.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myOtherResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/mySecondImageTemplate", + "name": "mySecondImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "PlatformImage", + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "18.04.201902121", + "planInfo": { + "planName": "example_plan_name", + "planProduct": "example_plan_product", + "planPublisher": "example_plan_publisher" + } + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "eastus", + "runOutputName": "eus", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/mySecondImage-eus", + "artifactTags": { + "stage": "development" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D8s_v3", + "osDiskSizeGB": 32 + } + } + } + ], + "nextLink": "/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2018-02-01-preview&skip-token=2" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplatesByRg.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplatesByRg.json new file mode 100644 index 000000000000..4b60174e5fd3 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListImageTemplatesByRg.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + }, + { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myOtherImageTemplate", + "name": "myOtherImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "PlatformImage", + "publisher": "Canonical", + "offer": "UbuntuServer", + "sku": "18.04-LTS", + "version": "18.04.201902121", + "planInfo": { + "planName": "example_plan_name", + "planProduct": "example_plan_product", + "planPublisher": "example_plan_publisher" + } + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "centralus", + "runOutputName": "singleImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/baseimage-cus" + }, + { + "type": "SharedImage", + "galleryImageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/gallery/baseimages/images/baseimage", + "replicationRegions": [ + "eastus", + "westus" + ], + "runOutputName": "gallery", + "excludeFromLatest": true, + "storageAccountType": "Standard_LRS" + } + ], + "vmProfile": { + "vmSize": "Standard_D8s_v3", + "osDiskSizeGB": 64 + } + } + } + ], + "nextLink": "/subscriptions/{subscription-id}/resourceGroup/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates?api-version=2021-10-01&skip-token=2" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListRunOutputs.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListRunOutputs.json new file mode 100644 index 000000000000..faa0e4079b56 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/ListRunOutputs.json @@ -0,0 +1,35 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/myManagedImageOutput", + "name": "myManagedImageOutput", + "properties": { + "artifactId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/output_managed_image", + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" + }, + { + "id": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs/mySharedImageOutput", + "name": "mySharedImageOutput", + "properties": { + "artifactId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/galleries/Gallery1/images/SharedImageOutput/imageversions/1.2.3", + "provisioningState": "Succeeded" + }, + "type": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs" + } + ], + "nextLink": "/subscriptions/{subscription-id}/resourcegroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate/runOutputs?api-version=2018-02-01-preview&$skipToken=3" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/OperationsList.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/OperationsList.json new file mode 100644 index 000000000000..8b92987f87c0 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/OperationsList.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2021-10-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.VirtualMachineImages/register/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Register Virtual Machine Image Builder RP", + "description": "Register Virtual Machine Image Builder RP" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/unregister/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Unregister Virtual Machine Image Builder RP", + "description": "Unregister Virtual Machine Image Builder RP" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template instance resource", + "resource": "VM Image template", + "description": "Get a VM image template instance resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/write", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Create or update a VM image template instance resource", + "resource": "VM Image template", + "description": "Create or update a VM image template instance resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/delete", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Delete a VM image template instance resource", + "resource": "VM Image template", + "description": "Delete a VM image template instance resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/run/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Execute a VM image template to produce its outputs", + "resource": "VM Image template", + "description": "Execute a VM image template to produce its outputs" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/runOutputs/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get a VM image template run output resource", + "resource": "VM Image template run output", + "description": "Get a VM image template run output resource" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "List available Virtual Machine Image Builder Operations", + "resource": "Operation", + "description": "List available Virtual Machine Image Builder Operations" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/locations/operations/read", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Get the status of an asynchronous operation", + "resource": "Asynchronous Operation", + "description": "Get the status of an asynchronous operation" + }, + "isDataAction": false + }, + { + "name": "Microsoft.VirtualMachineImages/imageTemplates/cancel/action", + "display": { + "provider": "Virtual Machine Image Builder", + "operation": "Cancel a running image build", + "resource": "VM Image template", + "description": "Cancel a running image build" + }, + "isDataAction": false + } + ], + "nextLink": "providers/Microsoft.AppPlatform?$skipToken={opaqueString}" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/RunImageTemplate.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/RunImageTemplate.json new file mode 100644 index 000000000000..9b4e383f2cfd --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/RunImageTemplate.json @@ -0,0 +1,17 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01" + }, + "responses": { + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + }, + "204": {}, + "200": {} + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateTags.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateTags.json new file mode 100644 index 000000000000..af3b77d266c8 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateTags.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01", + "parameters": { + "tags": { + "new-tag": "new-value" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "tags": { + "new-tag": "new-value" + }, + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { + "clientId": "00000000-0000-0000-0000-000000000000", + "principalId": "00000000-0000-0000-0000-000000000000" + } + } + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateToRemoveIdentities.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateToRemoveIdentities.json new file mode 100644 index 000000000000..a518fba536c8 --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/examples/UpdateImageTemplateToRemoveIdentities.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "subscriptionId": "{subscription-id}", + "resourceGroupName": "myResourceGroup", + "imageTemplateName": "myImageTemplate", + "api-version": "2021-10-01", + "parameters": { + "identity": { + "type": "None" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", + "name": "myImageTemplate", + "location": "westus", + "type": "Microsoft.VirtualMachineImages/imageTemplate", + "identity": { + "type": "None" + }, + "tags": { + "new-tag": "new-value" + }, + "properties": { + "source": { + "type": "ManagedImage", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/source_rg/providers/Microsoft.Compute/images/source_image" + }, + "customize": [ + { + "type": "Shell", + "name": "Shell customization example", + "scriptUri": "https://example.com/path/to/script.sh" + } + ], + "distribute": [ + { + "type": "ManagedImage", + "location": "1_location", + "runOutputName": "image_it_pir_1", + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", + "artifactTags": { + "tagName": "value" + } + } + ], + "vmProfile": { + "vmSize": "Standard_D2s_v3", + "osDiskSizeGB": 64 + } + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2021-10-01" + } + } + } +} diff --git a/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/imagebuilder.json b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/imagebuilder.json new file mode 100644 index 000000000000..ba7cadba2b9c --- /dev/null +++ b/specification/imagebuilder/resource-manager/Microsoft.VirtualMachineImages/stable/2021-10-01/imagebuilder.json @@ -0,0 +1,1456 @@ +{ + "swagger": "2.0", + "info": { + "title": "VirtualMachineImageTemplate", + "description": "Virtual Machine Image Template", + "version": "2021-10-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.VirtualMachineImages/imageTemplates": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_List", + "description": "Gets information about the VM image templates associated with the subscription.", + "parameters": [ + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplateListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List images by subscription.": { + "$ref": "./examples/ListImageTemplates.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_ListByResourceGroup", + "description": "Gets information about the VM image templates associated with the specified resource group.", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplateListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List images by resource group": { + "$ref": "./examples/ListImageTemplatesByRg.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}": { + "put": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_CreateOrUpdate", + "description": "Create or update a virtual machine image template", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImageTemplate" + }, + "description": "Parameters supplied to the CreateImageTemplate operation" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "201": { + "description": "Created", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create an Image Template for Linux.": { + "$ref": "./examples/CreateImageTemplateLinux.json" + }, + "Create an Image Template for Windows.": { + "$ref": "./examples/CreateImageTemplateWindows.json" + } + } + }, + "patch": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Update", + "description": "Update the tags for this Virtual Machine Image Template", + "parameters": [ + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ImageTemplateUpdateParameters" + }, + "description": "Additional parameters for Image Template update." + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "202": { + "description": "The operation will be completed asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Update the tags for an Image Template.": { + "$ref": "./examples/UpdateImageTemplateTags.json" + }, + "Remove identities for an Image Template.": { + "$ref": "./examples/UpdateImageTemplateToRemoveIdentities.json" + } + } + }, + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Get", + "description": "Get information about a virtual machine image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Retrieve an Image Template.": { + "$ref": "./examples/GetImageTemplate.json" + } + } + }, + "delete": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Delete", + "description": "Delete a virtual machine image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful." + }, + "202": { + "description": "The operation will be completed asynchronously." + }, + "204": { + "description": "NoContent -- VM image template does not exist in the subscription." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Delete an Image Template.": { + "$ref": "./examples/DeleteImageTemplate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/run": { + "post": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Run", + "description": "Create artifacts from a existing image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful." + }, + "204": { + "description": "The operation was successful." + }, + "202": { + "description": "The operation will be completed asynchronously." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Create image(s) from existing imageTemplate.": { + "$ref": "./examples/RunImageTemplate.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/cancel": { + "post": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_Cancel", + "description": "Cancel the long running image build based on the image template", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful." + }, + "204": { + "description": "The long running image build has been canceled." + }, + "202": { + "description": "The request is accepted." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-examples": { + "Cancel the image build based on the imageTemplate.": { + "$ref": "./examples/CancelImageBuild.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_ListRunOutputs", + "description": "List all run outputs for the specified Image Template resource", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RunOutputCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Retrieve a list of all outputs created by the last run of an Image Template": { + "$ref": "./examples/ListRunOutputs.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VirtualMachineImages/imageTemplates/{imageTemplateName}/runOutputs/{runOutputName}": { + "get": { + "tags": [ + "VirtualMachineImageTemplate" + ], + "operationId": "VirtualMachineImageTemplates_GetRunOutput", + "description": "Get the specified run output for the specified image template resource", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ImageTemplateNameParameter" + }, + { + "$ref": "#/parameters/RunOutputNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/RunOutput" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "Retrieve single runOutput": { + "$ref": "./examples/GetRunOutput.json" + } + } + } + }, + "/providers/Microsoft.VirtualMachineImages/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists available operations for the Microsoft.VirtualMachineImages provider", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The operation was successful. The response contains the list of available operations.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Retrieve operations list": { + "$ref": "./examples/OperationsList.json" + } + } + } + } + }, + "definitions": { + "ImageTemplateListResult": { + "description": "The result of List image templates operation", + "type": "object", + "properties": { + "value": { + "description": "An array of image templates", + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplate" + } + }, + "nextLink": { + "type": "string", + "description": "The continuation token." + } + } + }, + "ImageTemplateSource": { + "type": "object", + "description": "Describes a virtual machine image source for building, customizing and distributing", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "Specifies the type of source image you want to start with." + } + }, + "required": [ + "type" + ] + }, + "ImageTemplatePlatformImageSource": { + "type": "object", + "description": "Describes an image source from [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages).", + "x-ms-discriminator-value": "PlatformImage", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "publisher": { + "type": "string", + "description": "Image Publisher in [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "offer": { + "type": "string", + "description": "Image offer from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "sku": { + "type": "string", + "description": "Image sku from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages)." + }, + "version": { + "type": "string", + "description": "Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). If 'latest' is specified here, the version is evaluated when the image build takes place, not when the template is submitted." + }, + "exactVersion": { + "type": "string", + "description": "Image version from the [Azure Gallery Images](https://docs.microsoft.com/en-us/rest/api/compute/virtualmachineimages). This readonly field differs from 'version', only if the value specified in 'version' field is 'latest'.", + "readOnly": true + }, + "planInfo": { + "$ref": "#/definitions/PlatformImagePurchasePlan", + "description": "Optional configuration of purchase plan for platform image." + } + } + }, + "ImageTemplateManagedImageSource": { + "type": "object", + "description": "Describes an image source that is a managed image in customer subscription.", + "x-ms-discriminator-value": "ManagedImage", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "imageId": { + "type": "string", + "description": "ARM resource id of the managed image in customer subscription" + } + }, + "required": [ + "imageId" + ] + }, + "ImageTemplateSharedImageVersionSource": { + "type": "object", + "description": "Describes an image source that is an image version in a shared image gallery.", + "x-ms-discriminator-value": "SharedImageVersion", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateSource" + } + ], + "properties": { + "imageVersionId": { + "type": "string", + "description": "ARM resource id of the image version in the shared image gallery" + } + }, + "required": [ + "imageVersionId" + ] + }, + "ImageTemplateCustomizer": { + "type": "object", + "description": "Describes a unit of image customization", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "The type of customization tool you want to use on the Image. For example, \"Shell\" can be shell customizer" + }, + "name": { + "type": "string", + "description": "Friendly Name to provide context on what this customization step does" + } + }, + "required": [ + "type" + ] + }, + "ImageTemplateShellCustomizer": { + "type": "object", + "description": "Runs a shell script during the customization phase (Linux). Corresponds to Packer shell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", + "x-ms-discriminator-value": "Shell", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "scriptUri": { + "type": "string", + "description": "URI of the shell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the shell script provided in the scriptUri field" + }, + "inline": { + "type": "array", + "description": "Array of shell commands to execute", + "items": { + "type": "string" + } + } + } + }, + "ImageTemplateRestartCustomizer": { + "type": "object", + "description": "Reboots a VM and waits for it to come back online (Windows). Corresponds to Packer windows-restart provisioner", + "x-ms-discriminator-value": "WindowsRestart", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "restartCommand": { + "type": "string", + "description": "Command to execute the restart [Default: 'shutdown /r /f /t 0 /c \"packer restart\"']" + }, + "restartCheckCommand": { + "type": "string", + "description": "Command to check if restart succeeded [Default: '']" + }, + "restartTimeout": { + "type": "string", + "description": "Restart timeout specified as a string of magnitude and unit, e.g. '5m' (5 minutes) or '2h' (2 hours) [Default: '5m']" + } + } + }, + "ImageTemplateWindowsUpdateCustomizer": { + "type": "object", + "description": "Installs Windows Updates. Corresponds to Packer Windows Update Provisioner (https://github.com/rgl/packer-provisioner-windows-update)", + "x-ms-discriminator-value": "WindowsUpdate", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "searchCriteria": { + "type": "string", + "description": "Criteria to search updates. Omit or specify empty string to use the default (search all). Refer to above link for examples and detailed description of this field." + }, + "filters": { + "type": "array", + "description": "Array of filters to select updates to apply. Omit or specify empty array to use the default (no filter). Refer to above link for examples and detailed description of this field.", + "items": { + "type": "string" + } + }, + "updateLimit": { + "type": "integer", + "minimum": 0, + "description": "Maximum number of updates to apply at a time. Omit or specify 0 to use the default (1000)" + } + } + }, + "ImageTemplatePowerShellCustomizer": { + "type": "object", + "description": "Runs the specified PowerShell on the VM (Windows). Corresponds to Packer powershell provisioner. Exactly one of 'scriptUri' or 'inline' can be specified.", + "x-ms-discriminator-value": "PowerShell", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "scriptUri": { + "type": "string", + "description": "URI of the PowerShell script to be run for customizing. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the power shell script provided in the scriptUri field above" + }, + "inline": { + "type": "array", + "description": "Array of PowerShell commands to execute", + "items": { + "type": "string" + } + }, + "runElevated": { + "type": "boolean", + "default": false, + "description": "If specified, the PowerShell script will be run with elevated privileges" + }, + "runAsSystem": { + "type": "boolean", + "default": false, + "description": "If specified, the PowerShell script will be run with elevated privileges using the Local System user. Can only be true when the runElevated field above is set to true." + }, + "validExitCodes": { + "type": "array", + "description": "Valid exit codes for the PowerShell script. [Default: 0]", + "items": { + "type": "integer" + } + } + } + }, + "ImageTemplateFileCustomizer": { + "type": "object", + "description": "Uploads files to VMs (Linux, Windows). Corresponds to Packer file provisioner", + "x-ms-discriminator-value": "File", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateCustomizer" + } + ], + "properties": { + "sourceUri": { + "type": "string", + "description": "The URI of the file to be uploaded for customizing the VM. It can be a github link, SAS URI for Azure Storage, etc" + }, + "sha256Checksum": { + "type": "string", + "default": "", + "description": "SHA256 checksum of the file provided in the sourceUri field above" + }, + "destination": { + "type": "string", + "description": "The absolute path to a file (with nested directory structures already created) where the file (from sourceUri) will be uploaded to in the VM" + } + } + }, + "ImageTemplateDistributor": { + "type": "object", + "description": "Generic distribution object", + "discriminator": "type", + "properties": { + "type": { + "type": "string", + "description": "Type of distribution." + }, + "runOutputName": { + "type": "string", + "description": "The name to be used for the associated RunOutput.", + "pattern": "^[A-Za-z0-9-_.]{1,64}$" + }, + "artifactTags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags that will be applied to the artifact once it has been created/updated by the distributor." + } + }, + "required": [ + "type", + "runOutputName" + ] + }, + "ImageTemplateManagedImageDistributor": { + "x-ms-discriminator-value": "ManagedImage", + "description": "Distribute as a Managed Disk Image.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ], + "properties": { + "imageId": { + "type": "string", + "description": "Resource Id of the Managed Disk Image" + }, + "location": { + "type": "string", + "description": "Azure location for the image, should match if image already exists" + } + }, + "required": [ + "imageId", + "location" + ] + }, + "ImageTemplateSharedImageDistributor": { + "x-ms-discriminator-value": "SharedImage", + "description": "Distribute via Shared Image Gallery.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ], + "properties": { + "galleryImageId": { + "type": "string", + "description": "Resource Id of the Shared Image Gallery image" + }, + "replicationRegions": { + "description": "A list of regions that the image will be replicated to", + "type": "array", + "items": { + "type": "string" + } + }, + "excludeFromLatest": { + "type": "boolean", + "default": false, + "description": "Flag that indicates whether created image version should be excluded from latest. Omit to use the default (false)." + }, + "storageAccountType": { + "type": "string", + "enum": [ + "Standard_LRS", + "Standard_ZRS" + ], + "x-ms-enum": { + "name": "SharedImageStorageAccountType", + "modelAsString": true + }, + "description": "Storage account type to be used to store the shared image. Omit to use the default (Standard_LRS)." + } + }, + "required": [ + "galleryImageId", + "replicationRegions" + ] + }, + "ImageTemplateVhdDistributor": { + "x-ms-discriminator-value": "VHD", + "description": "Distribute via VHD in a storage account.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ImageTemplateDistributor" + } + ] + }, + "PlatformImagePurchasePlan": { + "type": "object", + "description": "Purchase plan configuration for platform image.", + "properties": { + "planName": { + "type": "string", + "description": "Name of the purchase plan." + }, + "planProduct": { + "type": "string", + "description": "Product of the purchase plan." + }, + "planPublisher": { + "type": "string", + "description": "Publisher of the purchase plan." + } + }, + "required": [ + "planName", + "planProduct", + "planPublisher" + ] + }, + "VirtualNetworkConfig": { + "type": "object", + "description": "Virtual Network configuration.", + "properties": { + "subnetId": { + "type": "string", + "description": "Resource id of a pre-existing subnet." + }, + "proxyVmSize": { + "type": "string", + "default": "", + "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D1_v2 for Gen1 images and Standard_D2ds_v4 for Gen2 images)." + } + } + }, + "ImageTemplateVmProfile": { + "type": "object", + "description": "Describes the virtual machine used to build, customize and capture images", + "properties": { + "vmSize": { + "type": "string", + "default": "", + "description": "Size of the virtual machine used to build, customize and capture images. Omit or specify empty string to use the default (Standard_D2ds_v4)." + }, + "osDiskSizeGB": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "Size of the OS disk in GB. Omit or specify 0 to use Azure's default OS disk size." + }, + "userAssignedIdentities": { + "type": "array", + "description": "Optional array of resource IDs of user assigned managed identities to be configured on the build VM. This may include the identity of the image template.", + "items": { + "type": "string" + } + }, + "vnetConfig": { + "$ref": "#/definitions/VirtualNetworkConfig", + "description": "Optional configuration of the virtual network to use to deploy the build virtual machine in. Omit if no specific virtual network needs to be used." + } + } + }, + "ProvisioningState": { + "type": "string", + "enum": [ + "Creating", + "Updating", + "Succeeded", + "Failed", + "Deleting" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": false + }, + "description": "Provisioning state of the resource" + }, + "ProvisioningError": { + "type": "object", + "description": "Describes the error happened when create or update an image template", + "properties": { + "provisioningErrorCode": { + "type": "string", + "enum": [ + "BadSourceType", + "BadPIRSource", + "BadManagedImageSource", + "BadSharedImageVersionSource", + "BadCustomizerType", + "UnsupportedCustomizerType", + "NoCustomizerScript", + "BadDistributeType", + "BadSharedImageDistribute", + "ServerError", + "Other" + ], + "x-ms-enum": { + "name": "ProvisioningErrorCode", + "modelAsString": true + }, + "description": "Error code of the provisioning failure" + }, + "message": { + "type": "string", + "description": "Verbose error message about the provisioning failure" + } + } + }, + "ImageTemplateLastRunStatus": { + "type": "object", + "description": "Describes the latest status of running an image template", + "properties": { + "startTime": { + "type": "string", + "format": "date-time", + "description": "Start time of the last run (UTC)" + }, + "endTime": { + "type": "string", + "format": "date-time", + "description": "End time of the last run (UTC)" + }, + "runState": { + "type": "string", + "enum": [ + "Running", + "Canceling", + "Succeeded", + "PartiallySucceeded", + "Failed", + "Canceled" + ], + "x-ms-enum": { + "name": "RunState", + "modelAsString": false + }, + "description": "State of the last run" + }, + "runSubState": { + "type": "string", + "enum": [ + "Queued", + "Building", + "Customizing", + "Distributing" + ], + "x-ms-enum": { + "name": "RunSubState", + "modelAsString": false + }, + "description": "Sub-state of the last run" + }, + "message": { + "type": "string", + "description": "Verbose information about the last run state" + } + } + }, + "ImageTemplateProperties": { + "type": "object", + "description": "Describes the properties of an image template", + "properties": { + "source": { + "$ref": "#/definitions/ImageTemplateSource", + "description": "Specifies the properties used to describe the source image." + }, + "customize": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateCustomizer" + }, + "description": "Specifies the properties used to describe the customization steps of the image, like Image source etc" + }, + "distribute": { + "type": "array", + "items": { + "$ref": "#/definitions/ImageTemplateDistributor" + }, + "description": "The distribution targets where the image output needs to go to." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource", + "readOnly": true + }, + "provisioningError": { + "$ref": "#/definitions/ProvisioningError", + "description": "Provisioning error, if any", + "readOnly": true + }, + "lastRunStatus": { + "$ref": "#/definitions/ImageTemplateLastRunStatus", + "description": "State of 'run' that is currently executing or was last executed.", + "readOnly": true + }, + "buildTimeoutInMinutes": { + "type": "integer", + "minimum": 0, + "maximum": 960, + "default": 0, + "description": "Maximum duration to wait while building the image template. Omit or specify 0 to use the default (4 hours)." + }, + "vmProfile": { + "$ref": "#/definitions/ImageTemplateVmProfile", + "description": "Describes how virtual machine is set up to build images" + } + }, + "required": [ + "source", + "distribute" + ] + }, + "ImageTemplateIdentity": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of identity used for the image template. The type 'None' will remove any identities from the image template.", + "enum": [ + "UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "ResourceIdentityType", + "modelAsString": false + } + }, + "userAssignedIdentities": { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "principalId": { + "readOnly": true, + "type": "string", + "description": "The principal id of user assigned identity." + }, + "clientId": { + "readOnly": true, + "type": "string", + "description": "The client id of user assigned identity." + } + } + }, + "description": "The list of user identities associated with the image template. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'." + } + }, + "description": "Identity for the image template." + }, + "RunOutputProperties": { + "type": "object", + "description": "Describes the properties of a run output", + "properties": { + "artifactId": { + "type": "string", + "description": "The resource id of the artifact." + }, + "artifactUri": { + "type": "string", + "description": "The location URI of the artifact." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "Provisioning state of the resource", + "readOnly": true + } + } + }, + "ImageTemplate": { + "type": "object", + "description": "Image template is an ARM resource managed by Microsoft.VirtualMachineImages provider", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ImageTemplateProperties", + "description": "The properties of the image template" + }, + "identity": { + "$ref": "#/definitions/ImageTemplateIdentity", + "description": "The identity of the image template, if configured." + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData", + "description": "Metadata pertaining to creation and last modification of the resource." + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/TrackedResource" + } + ], + "required": [ + "identity" + ] + }, + "ImageTemplateUpdateParameters": { + "type": "object", + "properties": { + "identity": { + "$ref": "#/definitions/ImageTemplateIdentity", + "description": "The identity of the image template, if configured." + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The user-specified tags associated with the image template." + } + }, + "description": "Parameters for updating an image template." + }, + "RunOutput": { + "type": "object", + "description": "Represents an output that was created by running an image template.", + "allOf": [ + { + "$ref": "#/definitions/SubResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/RunOutputProperties", + "x-ms-client-flatten": true, + "description": "The properties of the run output" + } + } + }, + "RunOutputCollection": { + "type": "object", + "description": "The result of List run outputs operation", + "properties": { + "value": { + "description": "An array of run outputs", + "type": "array", + "items": { + "$ref": "#/definitions/RunOutput" + } + }, + "nextLink": { + "type": "string", + "description": "The continuation token." + } + } + }, + "SubResource": { + "type": "object", + "description": "The Sub Resource model definition.", + "properties": { + "id": { + "readOnly": true, + "type": "string", + "description": "Resource Id" + }, + "name": { + "type": "string", + "description": "Resource name" + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type" + } + }, + "required": [ + "name" + ] + }, + "Operation": { + "title": "A REST API operation", + "type": "object", + "properties": { + "name": { + "title": "The operation name.", + "description": "This is of the format {provider}/{resource}/{operation}", + "type": "string" + }, + "display": { + "type": "object", + "title": "The object that describes the operation.", + "properties": { + "provider": { + "title": "Friendly name of the resource provider.", + "type": "string" + }, + "operation": { + "title": "The operation type.", + "description": "For example: read, write, delete, or listKeys/action", + "type": "string" + }, + "resource": { + "title": "The resource type on which the operation is performed.", + "type": "string" + }, + "description": { + "title": "The friendly name of the operation", + "type": "string" + } + } + }, + "origin": { + "title": "The intended executor of the operation.", + "type": "string" + }, + "properties": { + "title": "Properties of the operation.", + "type": "object" + }, + "isDataAction": { + "title": "The flag that indicates whether the operation applies to data plane.", + "type": "boolean" + } + } + }, + "OperationListResult": { + "type": "object", + "title": "Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/Operation" + }, + "title": "The list of operations supported by the resource provider." + }, + "nextLink": { + "type": "string", + "title": "The URL to get the next set of operation list results if there are any." + } + } + }, + "CloudError": { + "type": "object", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/CloudErrorBody", + "description": "Details about the error." + } + }, + "description": "An error response from the Azure VM Image Builder service." + }, + "CloudErrorBody": { + "type": "object", + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "An identifier for the error. Codes are invariant and are intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "A message describing the error, intended to be suitable for display in a user interface." + }, + "target": { + "type": "string", + "description": "The target of the particular error. For example, the name of the property in error." + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/CloudErrorBody" + }, + "description": "A list of additional details about the error." + } + }, + "description": "An error response from the Azure VM Image Builder service." + } + }, + "parameters": { + "SubscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription Id forms part of the URI for every service call." + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "ImageTemplateNameParameter": { + "name": "imageTemplateName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the image Template", + "pattern": "^[A-Za-z0-9-_.]{1,64}$", + "x-ms-parameter-location": "method" + }, + "RunOutputNameParameter": { + "name": "runOutputName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the run output", + "pattern": "^[A-Za-z0-9-_.]{1,64}$", + "x-ms-parameter-location": "method" + }, + "LocationParameter": { + "name": "location", + "in": "path", + "required": true, + "type": "string", + "description": "Location of the service.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} diff --git a/specification/imagebuilder/resource-manager/readme.md b/specification/imagebuilder/resource-manager/readme.md index 09350e9bb5b6..1d0cded3da58 100644 --- a/specification/imagebuilder/resource-manager/readme.md +++ b/specification/imagebuilder/resource-manager/readme.md @@ -28,10 +28,18 @@ 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-2020-02 +tag: package-2021-10 azure-arm: true ``` +### Tag: package-2021-10 + +These settings apply only when `--tag=package-2021-10` is specified on the command line. + +```yaml $(tag) == 'package-2021-10' +input-file: + - Microsoft.VirtualMachineImages/stable/2021-10-01/imagebuilder.json +``` ### Tag: package-2020-02