-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathudf-xmas-tree.json
140 lines (140 loc) · 3.25 KB
/
udf-xmas-tree.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"functions": [
{
"namespace": "udf",
"members": {
"storageUri": {
"parameters": [
{
"name": "storageAccountName",
"type": "string"
}
],
"output": {
"type": "string",
"value": "[reference(concat('Microsoft.Storage/storageAccounts/', parameters('storageAccountName')), '2018-02-01').primaryEndpoints.blob]"
}
},
"date": {
"parameters": [
{
"name": "year",
"type": "Int"
},
{
"name": "month",
"type": "Int"
},
{
"name": "day",
"type": "Int"
}
],
"output": {
"type": "string",
"value": "[concat(string(parameters('year')), '-', string(parameters('month')), '-', string(parameters('day')))]"
}
},
"odd": {
"parameters": [
{
"name": "number",
"type": "Int"
}
],
"output": {
"type": "Bool",
"value": "[equals(mod(parameters('number'), 2), 1)]"
}
},
"even": {
"parameters": [
{
"name": "number",
"type": "Int"
}
],
"output": {
"type": "Bool",
"value": "[equals(mod(parameters('number'), 2), 0)]"
}
},
"getSubscriptionId": {
"parameters": [],
"output": {
"type": "string",
"value": "[subscription().subscriptionId]"
}
}
}
}
],
"parameters": {
"p1": {
"type": "string",
"defaultValue": "[udf.storageUri('p1')]"
},
"p2": {
"type": "string",
"defaultValue": "[udf.date(2017, 11, 2)]"
},
"p3": {
"type": "bool",
"defaultValue": "[udf.odd(3)]"
},
"p4": {
"type": "bool",
"defaultValue": "[udf.even(3)]"
},
"p5": {
"type": "string",
"defaultValue": "[udf.getSubscriptionId()]"
},
"storageAccountName": {
"type": "string"
}
},
"variables": {
"uri": "[udf.storageUri('uri')]",
"time": "[udf.date(2017, 11, 2)]",
"condition1": "[udf.odd(3)]",
"condition2": "[udf.even(3)]",
"subscriptionId": "[udf.getSubscriptionId()]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[parameters('storageAccountName')]",
"apiVersion": "2015-06-15",
"location": "East US",
"condition": "[udf.odd(3)]",
"properties": {
"accountType": "Standard_LRS"
}
}
],
"outputs": {
"o1": {
"type": "string",
"value": "[udf.storageUri('o1')]"
},
"o2": {
"type": "string",
"value": "[udf.date(2017, 11, 2)]"
},
"o3": {
"type": "bool",
"value": "[udf.odd(3)]"
},
"o4": {
"type": "bool",
"value": "[udf.even(3)]"
},
"o5": {
"type": "string",
"value": "[udf.getSubscriptionId()]"
}
}
}