Skip to content

Commit 29cd8ed

Browse files
rezmicrosoft-zz00Kai0
authored andcommitted
[Hub Generated] Review request for Microsoft.VirtualMachineImages to add version stable/2020-02-14 (Azure#8723)
* Adds base for updating Microsoft.VirtualMachineImages from version preview/2019-05-01-preview to version 2020-02-14 * Updates readme * Updates API version in new specs and examples * Add new stable version 2020-02-14, private PR: https://github.com/Azure/azure-rest-api-specs-pr/pull/1156 * add cancel example 202 * run prettier * run prettier on Windows
1 parent 0a8c5ae commit 29cd8ed

15 files changed

+2338
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"imageTemplateName": "myImageTemplate",
6+
"api-version": "2020-02-14"
7+
},
8+
"responses": {
9+
"204": {},
10+
"202": {
11+
"headers": {
12+
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.VirtualMachineImages/locations/{location}/operations/{operation-id}?api-version=2020-02-14"
13+
}
14+
}
15+
}
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"api-version": "2020-02-14",
6+
"imageTemplateName": "myImageTemplate",
7+
"parameters": {
8+
"location": "westus",
9+
"tags": {
10+
"imagetemplate_tag1": "IT_T1",
11+
"imagetemplate_tag2": "IT_T2"
12+
},
13+
"properties": {
14+
"source": {
15+
"type": "ManagedImage",
16+
"imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"
17+
},
18+
"customize": [
19+
{
20+
"type": "Shell",
21+
"name": "Shell Customizer Example",
22+
"scriptUri": "https://example.com/path/to/script.sh"
23+
}
24+
],
25+
"distribute": [
26+
{
27+
"type": "ManagedImage",
28+
"location": "1_location",
29+
"runOutputName": "image_it_pir_1",
30+
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
31+
"artifactTags": {
32+
"tagName": "value"
33+
}
34+
}
35+
],
36+
"vmProfile": {
37+
"vmSize": "Standard_D2s_v3",
38+
"osDiskSizeGB": 64,
39+
"vnetConfig": {
40+
"subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name"
41+
}
42+
}
43+
}
44+
}
45+
},
46+
"responses": {
47+
"201": {
48+
"body": {
49+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate",
50+
"name": "myImageTemplate",
51+
"location": "westus",
52+
"type": "Microsoft.VirtualMachineImages/imageTemplate",
53+
"properties": {
54+
"source": {
55+
"type": "ManagedImage",
56+
"imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"
57+
},
58+
"customize": [
59+
{
60+
"type": "Shell",
61+
"name": "Shell Customizer Example",
62+
"scriptUri": "https://example.com/path/to/script.sh"
63+
}
64+
],
65+
"distribute": [
66+
{
67+
"type": "ManagedImage",
68+
"location": "1_location",
69+
"runOutputName": "image_it_pir_1",
70+
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
71+
"artifactTags": {
72+
"tagName": "value"
73+
}
74+
}
75+
],
76+
"vmProfile": {
77+
"vmSize": "Standard_D2s_v3",
78+
"osDiskSizeGB": 64,
79+
"vnetConfig": {
80+
"subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name"
81+
}
82+
}
83+
}
84+
}
85+
},
86+
"200": {
87+
"body": {
88+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate",
89+
"name": "myImageTemplate",
90+
"location": "westus",
91+
"type": "Microsoft.VirtualMachineImages/imageTemplate",
92+
"properties": {
93+
"source": {
94+
"type": "ManagedImage",
95+
"imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"
96+
},
97+
"customize": [
98+
{
99+
"type": "Shell",
100+
"name": "Shell Customizer Example",
101+
"scriptUri": "https://example.com/path/to/script.sh"
102+
}
103+
],
104+
"distribute": [
105+
{
106+
"type": "ManagedImage",
107+
"location": "1_location",
108+
"runOutputName": "image_it_pir_1",
109+
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
110+
"artifactTags": {
111+
"tagName": "value"
112+
}
113+
}
114+
],
115+
"vmProfile": {
116+
"vmSize": "Standard_D2s_v3",
117+
"osDiskSizeGB": 64
118+
}
119+
}
120+
}
121+
}
122+
}
123+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
{
2+
"parameters": {
3+
"subscriptionId": "{subscription-id}",
4+
"resourceGroupName": "myResourceGroup",
5+
"api-version": "2020-02-14",
6+
"imageTemplateName": "myImageTemplate",
7+
"parameters": {
8+
"location": "westus",
9+
"tags": {
10+
"imagetemplate_tag1": "IT_T1",
11+
"imagetemplate_tag2": "IT_T2"
12+
},
13+
"properties": {
14+
"source": {
15+
"type": "ManagedImage",
16+
"imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"
17+
},
18+
"customize": [
19+
{
20+
"type": "PowerShell",
21+
"name": "PowerShell (inline) Customizer Example",
22+
"inline": [
23+
"Powershell command-1",
24+
"Powershell command-2",
25+
"Powershell command-3"
26+
]
27+
},
28+
{
29+
"type": "PowerShell",
30+
"name": "PowerShell (script) Customizer Example",
31+
"scriptUri": "https://example.com/path/to/script.ps1",
32+
"validExitCodes": [
33+
0,
34+
1
35+
]
36+
},
37+
{
38+
"type": "WindowsRestart",
39+
"name": "Restart Customizer Example",
40+
"restartCommand": "shutdown /f /r /t 0 /c \"packer restart\"",
41+
"restartCheckCommand": "powershell -command \"& {Write-Output 'restarted.'}\"",
42+
"restartTimeout": "10m"
43+
},
44+
{
45+
"type": "WindowsUpdate",
46+
"name": "Windows Update Customizer Example",
47+
"searchCriteria": "BrowseOnly=0 and IsInstalled=0",
48+
"filters": [
49+
"$_.BrowseOnly"
50+
],
51+
"updateLimit": 100
52+
}
53+
],
54+
"distribute": [
55+
{
56+
"type": "ManagedImage",
57+
"location": "1_location",
58+
"runOutputName": "image_it_pir_1",
59+
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
60+
"artifactTags": {
61+
"tagName": "value"
62+
}
63+
}
64+
],
65+
"vmProfile": {
66+
"vmSize": "Standard_D2s_v3",
67+
"osDiskSizeGB": 64,
68+
"vnetConfig": {
69+
"subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name"
70+
}
71+
}
72+
}
73+
}
74+
},
75+
"responses": {
76+
"201": {
77+
"body": {
78+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate",
79+
"name": "myImageTemplate",
80+
"location": "westus",
81+
"type": "Microsoft.VirtualMachineImages/imageTemplate",
82+
"properties": {
83+
"source": {
84+
"type": "ManagedImage",
85+
"imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"
86+
},
87+
"customize": [
88+
{
89+
"type": "Shell",
90+
"name": "Shell Customizer Example",
91+
"scriptUri": "https://example.com/path/to/script.sh"
92+
}
93+
],
94+
"distribute": [
95+
{
96+
"type": "ManagedImage",
97+
"location": "1_location",
98+
"runOutputName": "image_it_pir_1",
99+
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
100+
"artifactTags": {
101+
"tagName": "value"
102+
}
103+
}
104+
],
105+
"vmProfile": {
106+
"vmSize": "Standard_D2s_v3",
107+
"osDiskSizeGB": 64,
108+
"vnetConfig": {
109+
"subnetId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vnet_name/subnets/subnet_name"
110+
}
111+
}
112+
}
113+
}
114+
},
115+
"200": {
116+
"body": {
117+
"id": "/subscriptions/{subscription-id}/resourceGroups/myResourceGroup/providers/Microsoft.VirtualMachineImages/imageTemplates/myImageTemplate",
118+
"name": "myImageTemplate",
119+
"location": "westus",
120+
"type": "Microsoft.VirtualMachineImages/imageTemplate",
121+
"properties": {
122+
"source": {
123+
"type": "ManagedImage",
124+
"imageId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Compute/images/source_image"
125+
},
126+
"customize": [
127+
{
128+
"type": "Shell",
129+
"name": "Shell Customizer Example",
130+
"scriptUri": "https://example.com/path/to/script.sh"
131+
}
132+
],
133+
"distribute": [
134+
{
135+
"type": "ManagedImage",
136+
"location": "1_location",
137+
"runOutputName": "image_it_pir_1",
138+
"imageId": "/subscriptions/{subscription-id}/resourceGroups/rg1/providers/Microsoft.Compute/images/image_it_1",
139+
"artifactTags": {
140+
"tagName": "value"
141+
}
142+
}
143+
],
144+
"vmProfile": {
145+
"vmSize": "Standard_D2s_v3",
146+
"osDiskSizeGB": 64
147+
}
148+
}
149+
}
150+
}
151+
}
152+
}

0 commit comments

Comments
 (0)