|
| 1 | +{ |
| 2 | + "parameters": { |
| 3 | + "subscriptionId": "{subscription-id}", |
| 4 | + "resourceGroupName": "myResourceGroup", |
| 5 | + "api-version": "2022-02-14", |
| 6 | + "imageTemplateName": "myImageTemplate", |
| 7 | + "parameters": { |
| 8 | + "location": "westus", |
| 9 | + "tags": { |
| 10 | + "imagetemplate_tag1": "IT_T1", |
| 11 | + "imagetemplate_tag2": "IT_T2" |
| 12 | + }, |
| 13 | + "identity": { |
| 14 | + "type": "UserAssigned", |
| 15 | + "userAssignedIdentities": { |
| 16 | + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": {} |
| 17 | + } |
| 18 | + }, |
| 19 | + "properties": { |
| 20 | + "source": { |
| 21 | + "type": "ManagedImage", |
| 22 | + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" |
| 23 | + }, |
| 24 | + "customize": [ |
| 25 | + { |
| 26 | + "type": "Shell", |
| 27 | + "name": "Shell Customizer Example", |
| 28 | + "scriptUri": "https://example.com/path/to/script.sh" |
| 29 | + } |
| 30 | + ], |
| 31 | + "distribute": [ |
| 32 | + { |
| 33 | + "type": "ManagedImage", |
| 34 | + "location": "1_location", |
| 35 | + "runOutputName": "image_it_pir_1", |
| 36 | + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", |
| 37 | + "artifactTags": { |
| 38 | + "tagName": "value" |
| 39 | + } |
| 40 | + } |
| 41 | + ], |
| 42 | + "vmProfile": { |
| 43 | + "vmSize": "Standard_D2s_v3", |
| 44 | + "osDiskSizeGB": 64, |
| 45 | + "vnetConfig": { |
| 46 | + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | + } |
| 51 | + }, |
| 52 | + "responses": { |
| 53 | + "201": { |
| 54 | + "body": { |
| 55 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", |
| 56 | + "name": "myImageTemplate", |
| 57 | + "location": "westus", |
| 58 | + "type": "Microsoft.VirtualMachineImages/imageTemplate", |
| 59 | + "identity": { |
| 60 | + "type": "UserAssigned", |
| 61 | + "userAssignedIdentities": { |
| 62 | + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { |
| 63 | + "clientId": "00000000-0000-0000-0000-000000000000", |
| 64 | + "principalId": "00000000-0000-0000-0000-000000000000" |
| 65 | + } |
| 66 | + } |
| 67 | + }, |
| 68 | + "properties": { |
| 69 | + "source": { |
| 70 | + "type": "ManagedImage", |
| 71 | + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" |
| 72 | + }, |
| 73 | + "customize": [ |
| 74 | + { |
| 75 | + "type": "Shell", |
| 76 | + "name": "Shell Customizer Example", |
| 77 | + "scriptUri": "https://example.com/path/to/script.sh" |
| 78 | + } |
| 79 | + ], |
| 80 | + "distribute": [ |
| 81 | + { |
| 82 | + "type": "ManagedImage", |
| 83 | + "location": "1_location", |
| 84 | + "runOutputName": "image_it_pir_1", |
| 85 | + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", |
| 86 | + "artifactTags": { |
| 87 | + "tagName": "value" |
| 88 | + } |
| 89 | + } |
| 90 | + ], |
| 91 | + "vmProfile": { |
| 92 | + "vmSize": "Standard_D2s_v3", |
| 93 | + "osDiskSizeGB": 64, |
| 94 | + "vnetConfig": { |
| 95 | + "subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name" |
| 96 | + } |
| 97 | + } |
| 98 | + } |
| 99 | + } |
| 100 | + }, |
| 101 | + "200": { |
| 102 | + "body": { |
| 103 | + "id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate", |
| 104 | + "name": "myImageTemplate", |
| 105 | + "location": "westus", |
| 106 | + "type": "Microsoft.VirtualMachineImages/imageTemplate", |
| 107 | + "identity": { |
| 108 | + "type": "UserAssigned", |
| 109 | + "userAssignedIdentities": { |
| 110 | + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity_1": { |
| 111 | + "clientId": "00000000-0000-0000-0000-000000000000", |
| 112 | + "principalId": "00000000-0000-0000-0000-000000000000" |
| 113 | + } |
| 114 | + } |
| 115 | + }, |
| 116 | + "properties": { |
| 117 | + "source": { |
| 118 | + "type": "ManagedImage", |
| 119 | + "imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image" |
| 120 | + }, |
| 121 | + "customize": [ |
| 122 | + { |
| 123 | + "type": "Shell", |
| 124 | + "name": "Shell Customizer Example", |
| 125 | + "scriptUri": "https://example.com/path/to/script.sh" |
| 126 | + } |
| 127 | + ], |
| 128 | + "distribute": [ |
| 129 | + { |
| 130 | + "type": "ManagedImage", |
| 131 | + "location": "1_location", |
| 132 | + "runOutputName": "image_it_pir_1", |
| 133 | + "imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1", |
| 134 | + "artifactTags": { |
| 135 | + "tagName": "value" |
| 136 | + } |
| 137 | + } |
| 138 | + ], |
| 139 | + "vmProfile": { |
| 140 | + "vmSize": "Standard_D2s_v3", |
| 141 | + "osDiskSizeGB": 64 |
| 142 | + } |
| 143 | + } |
| 144 | + } |
| 145 | + } |
| 146 | + } |
| 147 | +} |
0 commit comments