generated from pulumi/pulumi-tf-provider-boilerplate
/
getK8sRuntime.go
107 lines (89 loc) · 3.54 KB
/
getK8sRuntime.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
// 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 prodvana
import (
"context"
"reflect"
"github.com/prodvana/pulumi-prodvana/sdk/go/prodvana/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Prodvana Kubernetes Runtime
func LookupK8sRuntime(ctx *pulumi.Context, args *LookupK8sRuntimeArgs, opts ...pulumi.InvokeOption) (*LookupK8sRuntimeResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupK8sRuntimeResult
err := ctx.Invoke("prodvana:index/getK8sRuntime:getK8sRuntime", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getK8sRuntime.
type LookupK8sRuntimeArgs struct {
// List of labels to apply to the runtime
Labels []GetK8sRuntimeLabel `pulumi:"labels"`
// Runtime name
Name string `pulumi:"name"`
}
// A collection of values returned by getK8sRuntime.
type LookupK8sRuntimeResult struct {
// API Token used for linking the Kubernetes Prodvana agent
AgentApiToken string `pulumi:"agentApiToken"`
// Runtime identifier
Id string `pulumi:"id"`
// List of labels to apply to the runtime
Labels []GetK8sRuntimeLabel `pulumi:"labels"`
// Runtime name
Name string `pulumi:"name"`
}
func LookupK8sRuntimeOutput(ctx *pulumi.Context, args LookupK8sRuntimeOutputArgs, opts ...pulumi.InvokeOption) LookupK8sRuntimeResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupK8sRuntimeResult, error) {
args := v.(LookupK8sRuntimeArgs)
r, err := LookupK8sRuntime(ctx, &args, opts...)
var s LookupK8sRuntimeResult
if r != nil {
s = *r
}
return s, err
}).(LookupK8sRuntimeResultOutput)
}
// A collection of arguments for invoking getK8sRuntime.
type LookupK8sRuntimeOutputArgs struct {
// List of labels to apply to the runtime
Labels GetK8sRuntimeLabelArrayInput `pulumi:"labels"`
// Runtime name
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupK8sRuntimeOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupK8sRuntimeArgs)(nil)).Elem()
}
// A collection of values returned by getK8sRuntime.
type LookupK8sRuntimeResultOutput struct{ *pulumi.OutputState }
func (LookupK8sRuntimeResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupK8sRuntimeResult)(nil)).Elem()
}
func (o LookupK8sRuntimeResultOutput) ToLookupK8sRuntimeResultOutput() LookupK8sRuntimeResultOutput {
return o
}
func (o LookupK8sRuntimeResultOutput) ToLookupK8sRuntimeResultOutputWithContext(ctx context.Context) LookupK8sRuntimeResultOutput {
return o
}
// API Token used for linking the Kubernetes Prodvana agent
func (o LookupK8sRuntimeResultOutput) AgentApiToken() pulumi.StringOutput {
return o.ApplyT(func(v LookupK8sRuntimeResult) string { return v.AgentApiToken }).(pulumi.StringOutput)
}
// Runtime identifier
func (o LookupK8sRuntimeResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupK8sRuntimeResult) string { return v.Id }).(pulumi.StringOutput)
}
// List of labels to apply to the runtime
func (o LookupK8sRuntimeResultOutput) Labels() GetK8sRuntimeLabelArrayOutput {
return o.ApplyT(func(v LookupK8sRuntimeResult) []GetK8sRuntimeLabel { return v.Labels }).(GetK8sRuntimeLabelArrayOutput)
}
// Runtime name
func (o LookupK8sRuntimeResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupK8sRuntimeResult) string { return v.Name }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupK8sRuntimeResultOutput{})
}