-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathschema_queries.go
306 lines (274 loc) · 7.95 KB
/
schema_queries.go
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
package octopusdeploy
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
func getQueryAccountType() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of account types. Valid account types are `AmazonWebServicesAccount`, `AmazonWebServicesRoleAccount`, `AzureServicePrincipal`, `AzureSubscription`, `None`, `SshKeyPair`, `Token`, or `UsernamePassword`.",
Optional: true,
Type: schema.TypeString,
ValidateDiagFunc: validateValueFunc([]string{
"AmazonWebServicesAccount",
"AmazonWebServicesRoleAccount",
"AzureServicePrincipal",
"AzureSubscription",
"None",
"SshKeyPair",
"Token",
"UsernamePassword",
}),
}
}
func getQueryArchived() *schema.Schema {
return &schema.Schema{
Description: "A filter to search for resources that have been archived.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryClonedFromProjectID() *schema.Schema {
return &schema.Schema{
Description: "A filter to search for cloned resources by a project ID.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryClonedFromTenantID() *schema.Schema {
return &schema.Schema{
Description: "A filter to search for a cloned tenant by its ID.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryCommunicationStyles() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of communication styles. Valid communication styles are `AzureCloudService`, `AzureServiceFabricCluster`, `AzureWebApp`, `Ftp`, `Kubernetes`, `None`, `OfflineDrop`, `Ssh`, `TentacleActive`, or `TentaclePassive`.",
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{
"AzureCloudService",
"AzureServiceFabricCluster",
"AzureWebApp",
"Ftp",
"Kubernetes",
"None",
"OfflineDrop",
"Ssh",
"TentacleActive",
"TentaclePassive",
}, false)),
},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryContentType() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by content type.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryDeploymentID() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by deployment ID.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryEnvironments() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of environment IDs.",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryFeedType() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by feed type. Valid feed types are `AwsElasticContainerRegistry`, `BuiltIn`, `Docker`, `GitHub`, `Helm`, `Maven`, `NuGet`, or `OctopusProject`.",
Optional: true,
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{
"AwsElasticContainerRegistry",
"BuiltIn",
"Docker",
"GitHub",
"Helm",
"Maven",
"NuGet",
"OctopusProject",
}, false)),
}
}
func getQueryFilter() *schema.Schema {
return &schema.Schema{
Description: "A filter with which to search.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryFirstResult() *schema.Schema {
return &schema.Schema{
Description: "A filter to define the first result.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryHealthStatuses() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of health statuses of resources. Valid health statuses are `HasWarnings`, `Healthy`, `Unavailable`, `Unhealthy`, or `Unknown`.",
Elem: &schema.Schema{
Type: schema.TypeString,
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{
"HasWarnings",
"Healthy",
"Unavailable",
"Unhealthy",
"Unknown",
}, false)),
},
Optional: true,
Type: schema.TypeList,
}
}
func getDataSchemaID() *schema.Schema {
return &schema.Schema{
Computed: true,
Description: "A auto-generated identifier that includes the timestamp when this data source was last modified.",
Type: schema.TypeString,
}
}
func getQueryShellNames() *schema.Schema {
return &schema.Schema{
Description: "A list of shell names to match in the query and/or search",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryIDs() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of IDs.",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryIncludeSystem() *schema.Schema {
return &schema.Schema{
Description: "A filter to include system teams.",
Optional: true,
Type: schema.TypeBool,
}
}
func getQueryIsClone() *schema.Schema {
return &schema.Schema{
Description: "A filter to search for cloned resources.",
Optional: true,
Type: schema.TypeBool,
}
}
func getQueryIsDisabled() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by the disabled status of a resource.",
Optional: true,
Type: schema.TypeBool,
}
}
func getQueryName() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by name.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryOrderBy() *schema.Schema {
return &schema.Schema{
Description: "A filter used to order the search results.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryPartialName() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by the partial match of a name.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryProjectID() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a project ID.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryRoles() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of role IDs.",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQuerySearch() *schema.Schema {
return &schema.Schema{
Description: "A filter of terms used the search operation.",
Optional: true,
Type: schema.TypeString,
}
}
func getQuerySkip() *schema.Schema {
return &schema.Schema{
Description: "A filter to specify the number of items to skip in the response.",
Optional: true,
Type: schema.TypeInt,
}
}
func getQueryTags() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of tags.",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryTake() *schema.Schema {
return &schema.Schema{
Description: "A filter to specify the number of items to take (or return) in the response.",
Type: schema.TypeInt,
Optional: true,
}
}
func getQueryTenant() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a tenant ID.",
Optional: true,
Type: schema.TypeString,
}
}
func getQueryTenants() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of tenant IDs.",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryTenantTags() *schema.Schema {
return &schema.Schema{
Description: "A filter to search by a list of tenant tags.",
Elem: &schema.Schema{Type: schema.TypeString},
Optional: true,
Type: schema.TypeList,
}
}
func getQueryThumbprint() *schema.Schema {
return &schema.Schema{
Description: "The thumbprint of the deployment target to match in the query and/or search",
Optional: true,
Type: schema.TypeString,
}
}