/
getSessionTemplate.go
143 lines (119 loc) · 6.58 KB
/
getSessionTemplate.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
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets the resource representation for a session template.
func LookupSessionTemplate(ctx *pulumi.Context, args *LookupSessionTemplateArgs, opts ...pulumi.InvokeOption) (*LookupSessionTemplateResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupSessionTemplateResult
err := ctx.Invoke("google-native:dataproc/v1:getSessionTemplate", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupSessionTemplateArgs struct {
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
SessionTemplateId string `pulumi:"sessionTemplateId"`
}
type LookupSessionTemplateResult struct {
// The time when the template was created.
CreateTime string `pulumi:"createTime"`
// The email address of the user who created the template.
Creator string `pulumi:"creator"`
// Optional. Brief description of the template.
Description string `pulumi:"description"`
// Optional. Environment configuration for session execution.
EnvironmentConfig EnvironmentConfigResponse `pulumi:"environmentConfig"`
// Optional. Jupyter session config.
JupyterSession JupyterConfigResponse `pulumi:"jupyterSession"`
// Optional. Labels to associate with sessions created using this template. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty, but, if present, must contain 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a session.
Labels map[string]string `pulumi:"labels"`
// The resource name of the session template.
Name string `pulumi:"name"`
// Optional. Runtime configuration for session execution.
RuntimeConfig RuntimeConfigResponse `pulumi:"runtimeConfig"`
// The time the template was last updated.
UpdateTime string `pulumi:"updateTime"`
// A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.
Uuid string `pulumi:"uuid"`
}
func LookupSessionTemplateOutput(ctx *pulumi.Context, args LookupSessionTemplateOutputArgs, opts ...pulumi.InvokeOption) LookupSessionTemplateResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupSessionTemplateResult, error) {
args := v.(LookupSessionTemplateArgs)
r, err := LookupSessionTemplate(ctx, &args, opts...)
var s LookupSessionTemplateResult
if r != nil {
s = *r
}
return s, err
}).(LookupSessionTemplateResultOutput)
}
type LookupSessionTemplateOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
SessionTemplateId pulumi.StringInput `pulumi:"sessionTemplateId"`
}
func (LookupSessionTemplateOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSessionTemplateArgs)(nil)).Elem()
}
type LookupSessionTemplateResultOutput struct{ *pulumi.OutputState }
func (LookupSessionTemplateResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSessionTemplateResult)(nil)).Elem()
}
func (o LookupSessionTemplateResultOutput) ToLookupSessionTemplateResultOutput() LookupSessionTemplateResultOutput {
return o
}
func (o LookupSessionTemplateResultOutput) ToLookupSessionTemplateResultOutputWithContext(ctx context.Context) LookupSessionTemplateResultOutput {
return o
}
// The time when the template was created.
func (o LookupSessionTemplateResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// The email address of the user who created the template.
func (o LookupSessionTemplateResultOutput) Creator() pulumi.StringOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) string { return v.Creator }).(pulumi.StringOutput)
}
// Optional. Brief description of the template.
func (o LookupSessionTemplateResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) string { return v.Description }).(pulumi.StringOutput)
}
// Optional. Environment configuration for session execution.
func (o LookupSessionTemplateResultOutput) EnvironmentConfig() EnvironmentConfigResponseOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) EnvironmentConfigResponse { return v.EnvironmentConfig }).(EnvironmentConfigResponseOutput)
}
// Optional. Jupyter session config.
func (o LookupSessionTemplateResultOutput) JupyterSession() JupyterConfigResponseOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) JupyterConfigResponse { return v.JupyterSession }).(JupyterConfigResponseOutput)
}
// Optional. Labels to associate with sessions created using this template. Label keys must contain 1 to 63 characters, and must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). Label values can be empty, but, if present, must contain 1 to 63 characters and conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a session.
func (o LookupSessionTemplateResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// The resource name of the session template.
func (o LookupSessionTemplateResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) string { return v.Name }).(pulumi.StringOutput)
}
// Optional. Runtime configuration for session execution.
func (o LookupSessionTemplateResultOutput) RuntimeConfig() RuntimeConfigResponseOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) RuntimeConfigResponse { return v.RuntimeConfig }).(RuntimeConfigResponseOutput)
}
// The time the template was last updated.
func (o LookupSessionTemplateResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
// A session template UUID (Unique Universal Identifier). The service generates this value when it creates the session template.
func (o LookupSessionTemplateResultOutput) Uuid() pulumi.StringOutput {
return o.ApplyT(func(v LookupSessionTemplateResult) string { return v.Uuid }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSessionTemplateResultOutput{})
}