generated from pulumi/pulumi-tf-provider-boilerplate
/
getApp.go
205 lines (177 loc) · 7.15 KB
/
getApp.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
// 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 rancher2
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to retrieve information about a Rancher v2 app.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-rancher2/sdk/v4/go/rancher2"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := rancher2.LookupApp(ctx, &rancher2.LookupAppArgs{
// Name: "foo",
// ProjectId: "<project_id>",
// TargetNamespace: pulumi.StringRef("<namespace_name>"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func LookupApp(ctx *pulumi.Context, args *LookupAppArgs, opts ...pulumi.InvokeOption) (*LookupAppResult, error) {
var rv LookupAppResult
err := ctx.Invoke("rancher2:index/getApp:getApp", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getApp.
type LookupAppArgs struct {
// (Computed) Annotations for the catalog (map)
Annotations map[string]interface{} `pulumi:"annotations"`
// The app name (string)
Name string `pulumi:"name"`
// The id of the project where the app is deployed (string)
ProjectId string `pulumi:"projectId"`
// The namespace name where the app is deployed (string)
TargetNamespace *string `pulumi:"targetNamespace"`
}
// A collection of values returned by getApp.
type LookupAppResult struct {
// (Computed) Annotations for the catalog (map)
Annotations map[string]interface{} `pulumi:"annotations"`
// (Computed) Answers for the app (map)
Answers map[string]interface{} `pulumi:"answers"`
// (Computed) Catalog name of the app (string)
CatalogName string `pulumi:"catalogName"`
// (Computed) Description for the app (string)
Description string `pulumi:"description"`
// (Computed) The URL of the helm catalog app (string)
ExternalId string `pulumi:"externalId"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// (Computed) Labels for the catalog (map)
Labels map[string]interface{} `pulumi:"labels"`
Name string `pulumi:"name"`
ProjectId string `pulumi:"projectId"`
// (Computed) Current revision id for the app (string)
RevisionId string `pulumi:"revisionId"`
TargetNamespace string `pulumi:"targetNamespace"`
// (Computed) Template name of the app (string)
TemplateName string `pulumi:"templateName"`
// (Computed) Template version of the app (string)
TemplateVersion string `pulumi:"templateVersion"`
// (Computed) values.yaml base64 encoded file content for the app (string)
ValuesYaml string `pulumi:"valuesYaml"`
}
func LookupAppOutput(ctx *pulumi.Context, args LookupAppOutputArgs, opts ...pulumi.InvokeOption) LookupAppResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupAppResult, error) {
args := v.(LookupAppArgs)
r, err := LookupApp(ctx, &args, opts...)
var s LookupAppResult
if r != nil {
s = *r
}
return s, err
}).(LookupAppResultOutput)
}
// A collection of arguments for invoking getApp.
type LookupAppOutputArgs struct {
// (Computed) Annotations for the catalog (map)
Annotations pulumi.MapInput `pulumi:"annotations"`
// The app name (string)
Name pulumi.StringInput `pulumi:"name"`
// The id of the project where the app is deployed (string)
ProjectId pulumi.StringInput `pulumi:"projectId"`
// The namespace name where the app is deployed (string)
TargetNamespace pulumi.StringPtrInput `pulumi:"targetNamespace"`
}
func (LookupAppOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAppArgs)(nil)).Elem()
}
// A collection of values returned by getApp.
type LookupAppResultOutput struct{ *pulumi.OutputState }
func (LookupAppResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupAppResult)(nil)).Elem()
}
func (o LookupAppResultOutput) ToLookupAppResultOutput() LookupAppResultOutput {
return o
}
func (o LookupAppResultOutput) ToLookupAppResultOutputWithContext(ctx context.Context) LookupAppResultOutput {
return o
}
// (Computed) Annotations for the catalog (map)
func (o LookupAppResultOutput) Annotations() pulumi.MapOutput {
return o.ApplyT(func(v LookupAppResult) map[string]interface{} { return v.Annotations }).(pulumi.MapOutput)
}
// (Computed) Answers for the app (map)
func (o LookupAppResultOutput) Answers() pulumi.MapOutput {
return o.ApplyT(func(v LookupAppResult) map[string]interface{} { return v.Answers }).(pulumi.MapOutput)
}
// (Computed) Catalog name of the app (string)
func (o LookupAppResultOutput) CatalogName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.CatalogName }).(pulumi.StringOutput)
}
// (Computed) Description for the app (string)
func (o LookupAppResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Description }).(pulumi.StringOutput)
}
// (Computed) The URL of the helm catalog app (string)
func (o LookupAppResultOutput) ExternalId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.ExternalId }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupAppResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Id }).(pulumi.StringOutput)
}
// (Computed) Labels for the catalog (map)
func (o LookupAppResultOutput) Labels() pulumi.MapOutput {
return o.ApplyT(func(v LookupAppResult) map[string]interface{} { return v.Labels }).(pulumi.MapOutput)
}
func (o LookupAppResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o LookupAppResultOutput) ProjectId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.ProjectId }).(pulumi.StringOutput)
}
// (Computed) Current revision id for the app (string)
func (o LookupAppResultOutput) RevisionId() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.RevisionId }).(pulumi.StringOutput)
}
func (o LookupAppResultOutput) TargetNamespace() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.TargetNamespace }).(pulumi.StringOutput)
}
// (Computed) Template name of the app (string)
func (o LookupAppResultOutput) TemplateName() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.TemplateName }).(pulumi.StringOutput)
}
// (Computed) Template version of the app (string)
func (o LookupAppResultOutput) TemplateVersion() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.TemplateVersion }).(pulumi.StringOutput)
}
// (Computed) values.yaml base64 encoded file content for the app (string)
func (o LookupAppResultOutput) ValuesYaml() pulumi.StringOutput {
return o.ApplyT(func(v LookupAppResult) string { return v.ValuesYaml }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupAppResultOutput{})
}