generated from pulumi/pulumi-tf-provider-boilerplate
/
getGitopsApplications.go
350 lines (313 loc) · 15.8 KB
/
getGitopsApplications.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
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package platform
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Datasource for fetching a Harness GitOps Application.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := platform.GetGitopsApplications(ctx, &platform.GetGitopsApplicationsArgs{
// AccountId: "account_id",
// AgentId: "agent_id",
// Identifier: pulumi.StringRef("identifier"),
// OrgId: "org_id",
// ProjectId: "project_id",
// RepoId: "repo_id",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetGitopsApplications(ctx *pulumi.Context, args *GetGitopsApplicationsArgs, opts ...pulumi.InvokeOption) (*GetGitopsApplicationsResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv GetGitopsApplicationsResult
err := ctx.Invoke("harness:platform/getGitopsApplications:getGitopsApplications", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getGitopsApplications.
type GetGitopsApplicationsArgs struct {
// Account identifier of the GitOps application.
AccountId string `pulumi:"accountId"`
// Agent identifier of the GitOps application.
AgentId string `pulumi:"agentId"`
// Definition of the GitOps application resource.
Applications []GetGitopsApplicationsApplication `pulumi:"applications"`
// Cluster identifier of the GitOps application.
ClusterId *string `pulumi:"clusterId"`
// Identifier of the GitOps application.
Identifier *string `pulumi:"identifier"`
// Kind of the GitOps application.
Kind *string `pulumi:"kind"`
// Name of the GitOps application.
Name string `pulumi:"name"`
// Options to remove existing finalizers to delete the GitOps application.
OptionsRemoveExistingFinalizers *bool `pulumi:"optionsRemoveExistingFinalizers"`
// Organization identifier of the GitOps application.
OrgId string `pulumi:"orgId"`
// Reference to the project corresponding to this GitOps application. An empty string means that the GitOps application belongs to the 'default' project.
Project *string `pulumi:"project"`
// Project identifier of the GitOps application.
ProjectId string `pulumi:"projectId"`
// Project names to filter the corresponding GitOps applications.
QueryProject *string `pulumi:"queryProject"`
// Forces the GitOps application to reconcile when set to true.
QueryRefresh *string `pulumi:"queryRefresh"`
// Repo URL to restrict returned list applications.
QueryRepo *string `pulumi:"queryRepo"`
// Shows modifications after a version that is specified with a watch call.
QueryResourceVersion *string `pulumi:"queryResourceVersion"`
// Filters GitOps applications corresponding to the labels.
QuerySelector *string `pulumi:"querySelector"`
// Repository identifier of the GitOps application.
RepoId string `pulumi:"repoId"`
// Request cascade to delete the GitOps application.
RequestCascade *bool `pulumi:"requestCascade"`
// Request name to delete the GitOps application.
RequestName *string `pulumi:"requestName"`
// Request propagation policy to delete the GitOps application.
RequestPropagationPolicy *string `pulumi:"requestPropagationPolicy"`
// Indicates if the GitOps application should be updated if existing and inserted if not.
Upsert *bool `pulumi:"upsert"`
// Indicates if the GitOps application has to be validated.
Validate *bool `pulumi:"validate"`
}
// A collection of values returned by getGitopsApplications.
type GetGitopsApplicationsResult struct {
// Account identifier of the GitOps application.
AccountId string `pulumi:"accountId"`
// Agent identifier of the GitOps application.
AgentId string `pulumi:"agentId"`
// Definition of the GitOps application resource.
Applications []GetGitopsApplicationsApplication `pulumi:"applications"`
// Cluster identifier of the GitOps application.
ClusterId *string `pulumi:"clusterId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// Identifier of the GitOps application.
Identifier *string `pulumi:"identifier"`
// Kind of the GitOps application.
Kind *string `pulumi:"kind"`
// Name of the GitOps application.
Name string `pulumi:"name"`
// Options to remove existing finalizers to delete the GitOps application.
OptionsRemoveExistingFinalizers *bool `pulumi:"optionsRemoveExistingFinalizers"`
// Organization identifier of the GitOps application.
OrgId string `pulumi:"orgId"`
// Reference to the project corresponding to this GitOps application. An empty string means that the GitOps application belongs to the 'default' project.
Project *string `pulumi:"project"`
// Project identifier of the GitOps application.
ProjectId string `pulumi:"projectId"`
// Project names to filter the corresponding GitOps applications.
QueryProject *string `pulumi:"queryProject"`
// Forces the GitOps application to reconcile when set to true.
QueryRefresh *string `pulumi:"queryRefresh"`
// Repo URL to restrict returned list applications.
QueryRepo *string `pulumi:"queryRepo"`
// Shows modifications after a version that is specified with a watch call.
QueryResourceVersion *string `pulumi:"queryResourceVersion"`
// Filters GitOps applications corresponding to the labels.
QuerySelector *string `pulumi:"querySelector"`
// Repository identifier of the GitOps application.
RepoId string `pulumi:"repoId"`
// Request cascade to delete the GitOps application.
RequestCascade *bool `pulumi:"requestCascade"`
// Request name to delete the GitOps application.
RequestName *string `pulumi:"requestName"`
// Request propagation policy to delete the GitOps application.
RequestPropagationPolicy *string `pulumi:"requestPropagationPolicy"`
// Indicates if the GitOps application should be updated if existing and inserted if not.
Upsert *bool `pulumi:"upsert"`
// Indicates if the GitOps application has to be validated.
Validate *bool `pulumi:"validate"`
}
func GetGitopsApplicationsOutput(ctx *pulumi.Context, args GetGitopsApplicationsOutputArgs, opts ...pulumi.InvokeOption) GetGitopsApplicationsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetGitopsApplicationsResult, error) {
args := v.(GetGitopsApplicationsArgs)
r, err := GetGitopsApplications(ctx, &args, opts...)
var s GetGitopsApplicationsResult
if r != nil {
s = *r
}
return s, err
}).(GetGitopsApplicationsResultOutput)
}
// A collection of arguments for invoking getGitopsApplications.
type GetGitopsApplicationsOutputArgs struct {
// Account identifier of the GitOps application.
AccountId pulumi.StringInput `pulumi:"accountId"`
// Agent identifier of the GitOps application.
AgentId pulumi.StringInput `pulumi:"agentId"`
// Definition of the GitOps application resource.
Applications GetGitopsApplicationsApplicationArrayInput `pulumi:"applications"`
// Cluster identifier of the GitOps application.
ClusterId pulumi.StringPtrInput `pulumi:"clusterId"`
// Identifier of the GitOps application.
Identifier pulumi.StringPtrInput `pulumi:"identifier"`
// Kind of the GitOps application.
Kind pulumi.StringPtrInput `pulumi:"kind"`
// Name of the GitOps application.
Name pulumi.StringInput `pulumi:"name"`
// Options to remove existing finalizers to delete the GitOps application.
OptionsRemoveExistingFinalizers pulumi.BoolPtrInput `pulumi:"optionsRemoveExistingFinalizers"`
// Organization identifier of the GitOps application.
OrgId pulumi.StringInput `pulumi:"orgId"`
// Reference to the project corresponding to this GitOps application. An empty string means that the GitOps application belongs to the 'default' project.
Project pulumi.StringPtrInput `pulumi:"project"`
// Project identifier of the GitOps application.
ProjectId pulumi.StringInput `pulumi:"projectId"`
// Project names to filter the corresponding GitOps applications.
QueryProject pulumi.StringPtrInput `pulumi:"queryProject"`
// Forces the GitOps application to reconcile when set to true.
QueryRefresh pulumi.StringPtrInput `pulumi:"queryRefresh"`
// Repo URL to restrict returned list applications.
QueryRepo pulumi.StringPtrInput `pulumi:"queryRepo"`
// Shows modifications after a version that is specified with a watch call.
QueryResourceVersion pulumi.StringPtrInput `pulumi:"queryResourceVersion"`
// Filters GitOps applications corresponding to the labels.
QuerySelector pulumi.StringPtrInput `pulumi:"querySelector"`
// Repository identifier of the GitOps application.
RepoId pulumi.StringInput `pulumi:"repoId"`
// Request cascade to delete the GitOps application.
RequestCascade pulumi.BoolPtrInput `pulumi:"requestCascade"`
// Request name to delete the GitOps application.
RequestName pulumi.StringPtrInput `pulumi:"requestName"`
// Request propagation policy to delete the GitOps application.
RequestPropagationPolicy pulumi.StringPtrInput `pulumi:"requestPropagationPolicy"`
// Indicates if the GitOps application should be updated if existing and inserted if not.
Upsert pulumi.BoolPtrInput `pulumi:"upsert"`
// Indicates if the GitOps application has to be validated.
Validate pulumi.BoolPtrInput `pulumi:"validate"`
}
func (GetGitopsApplicationsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetGitopsApplicationsArgs)(nil)).Elem()
}
// A collection of values returned by getGitopsApplications.
type GetGitopsApplicationsResultOutput struct{ *pulumi.OutputState }
func (GetGitopsApplicationsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetGitopsApplicationsResult)(nil)).Elem()
}
func (o GetGitopsApplicationsResultOutput) ToGetGitopsApplicationsResultOutput() GetGitopsApplicationsResultOutput {
return o
}
func (o GetGitopsApplicationsResultOutput) ToGetGitopsApplicationsResultOutputWithContext(ctx context.Context) GetGitopsApplicationsResultOutput {
return o
}
// Account identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) AccountId() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.AccountId }).(pulumi.StringOutput)
}
// Agent identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) AgentId() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.AgentId }).(pulumi.StringOutput)
}
// Definition of the GitOps application resource.
func (o GetGitopsApplicationsResultOutput) Applications() GetGitopsApplicationsApplicationArrayOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) []GetGitopsApplicationsApplication { return v.Applications }).(GetGitopsApplicationsApplicationArrayOutput)
}
// Cluster identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) ClusterId() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.ClusterId }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetGitopsApplicationsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.Id }).(pulumi.StringOutput)
}
// Identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) Identifier() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.Identifier }).(pulumi.StringPtrOutput)
}
// Kind of the GitOps application.
func (o GetGitopsApplicationsResultOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.Kind }).(pulumi.StringPtrOutput)
}
// Name of the GitOps application.
func (o GetGitopsApplicationsResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.Name }).(pulumi.StringOutput)
}
// Options to remove existing finalizers to delete the GitOps application.
func (o GetGitopsApplicationsResultOutput) OptionsRemoveExistingFinalizers() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *bool { return v.OptionsRemoveExistingFinalizers }).(pulumi.BoolPtrOutput)
}
// Organization identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) OrgId() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.OrgId }).(pulumi.StringOutput)
}
// Reference to the project corresponding to this GitOps application. An empty string means that the GitOps application belongs to the 'default' project.
func (o GetGitopsApplicationsResultOutput) Project() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.Project }).(pulumi.StringPtrOutput)
}
// Project identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
// Project names to filter the corresponding GitOps applications.
func (o GetGitopsApplicationsResultOutput) QueryProject() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.QueryProject }).(pulumi.StringPtrOutput)
}
// Forces the GitOps application to reconcile when set to true.
func (o GetGitopsApplicationsResultOutput) QueryRefresh() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.QueryRefresh }).(pulumi.StringPtrOutput)
}
// Repo URL to restrict returned list applications.
func (o GetGitopsApplicationsResultOutput) QueryRepo() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.QueryRepo }).(pulumi.StringPtrOutput)
}
// Shows modifications after a version that is specified with a watch call.
func (o GetGitopsApplicationsResultOutput) QueryResourceVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.QueryResourceVersion }).(pulumi.StringPtrOutput)
}
// Filters GitOps applications corresponding to the labels.
func (o GetGitopsApplicationsResultOutput) QuerySelector() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.QuerySelector }).(pulumi.StringPtrOutput)
}
// Repository identifier of the GitOps application.
func (o GetGitopsApplicationsResultOutput) RepoId() pulumi.StringOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) string { return v.RepoId }).(pulumi.StringOutput)
}
// Request cascade to delete the GitOps application.
func (o GetGitopsApplicationsResultOutput) RequestCascade() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *bool { return v.RequestCascade }).(pulumi.BoolPtrOutput)
}
// Request name to delete the GitOps application.
func (o GetGitopsApplicationsResultOutput) RequestName() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.RequestName }).(pulumi.StringPtrOutput)
}
// Request propagation policy to delete the GitOps application.
func (o GetGitopsApplicationsResultOutput) RequestPropagationPolicy() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *string { return v.RequestPropagationPolicy }).(pulumi.StringPtrOutput)
}
// Indicates if the GitOps application should be updated if existing and inserted if not.
func (o GetGitopsApplicationsResultOutput) Upsert() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *bool { return v.Upsert }).(pulumi.BoolPtrOutput)
}
// Indicates if the GitOps application has to be validated.
func (o GetGitopsApplicationsResultOutput) Validate() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetGitopsApplicationsResult) *bool { return v.Validate }).(pulumi.BoolPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetGitopsApplicationsResultOutput{})
}