-
Notifications
You must be signed in to change notification settings - Fork 18
/
getEnvironment.go
120 lines (99 loc) · 5.57 KB
/
getEnvironment.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
// 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 v1beta1
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get an existing environment.
func LookupEnvironment(ctx *pulumi.Context, args *LookupEnvironmentArgs, opts ...pulumi.InvokeOption) (*LookupEnvironmentResult, error) {
var rv LookupEnvironmentResult
err := ctx.Invoke("google-native:composer/v1beta1:getEnvironment", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupEnvironmentArgs struct {
EnvironmentId string `pulumi:"environmentId"`
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
}
type LookupEnvironmentResult struct {
// Configuration parameters for this environment.
Config EnvironmentConfigResponse `pulumi:"config"`
// The time at which this environment was created.
CreateTime string `pulumi:"createTime"`
// Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size.
Labels map[string]string `pulumi:"labels"`
// The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
Name string `pulumi:"name"`
// The current state of the environment.
State string `pulumi:"state"`
// The time at which this environment was last modified.
UpdateTime string `pulumi:"updateTime"`
// The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created.
Uuid string `pulumi:"uuid"`
}
func LookupEnvironmentOutput(ctx *pulumi.Context, args LookupEnvironmentOutputArgs, opts ...pulumi.InvokeOption) LookupEnvironmentResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupEnvironmentResult, error) {
args := v.(LookupEnvironmentArgs)
r, err := LookupEnvironment(ctx, &args, opts...)
var s LookupEnvironmentResult
if r != nil {
s = *r
}
return s, err
}).(LookupEnvironmentResultOutput)
}
type LookupEnvironmentOutputArgs struct {
EnvironmentId pulumi.StringInput `pulumi:"environmentId"`
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupEnvironmentOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEnvironmentArgs)(nil)).Elem()
}
type LookupEnvironmentResultOutput struct{ *pulumi.OutputState }
func (LookupEnvironmentResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupEnvironmentResult)(nil)).Elem()
}
func (o LookupEnvironmentResultOutput) ToLookupEnvironmentResultOutput() LookupEnvironmentResultOutput {
return o
}
func (o LookupEnvironmentResultOutput) ToLookupEnvironmentResultOutputWithContext(ctx context.Context) LookupEnvironmentResultOutput {
return o
}
// Configuration parameters for this environment.
func (o LookupEnvironmentResultOutput) Config() EnvironmentConfigResponseOutput {
return o.ApplyT(func(v LookupEnvironmentResult) EnvironmentConfigResponse { return v.Config }).(EnvironmentConfigResponseOutput)
}
// The time at which this environment was created.
func (o LookupEnvironmentResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \p{Ll}\p{Lo}{0,62} * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size.
func (o LookupEnvironmentResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupEnvironmentResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.
func (o LookupEnvironmentResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.Name }).(pulumi.StringOutput)
}
// The current state of the environment.
func (o LookupEnvironmentResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.State }).(pulumi.StringOutput)
}
// The time at which this environment was last modified.
func (o LookupEnvironmentResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
// The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created.
func (o LookupEnvironmentResultOutput) Uuid() pulumi.StringOutput {
return o.ApplyT(func(v LookupEnvironmentResult) string { return v.Uuid }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupEnvironmentResultOutput{})
}