/
getGlobalNetworkEndpointGroup.go
242 lines (205 loc) · 14.3 KB
/
getGlobalNetworkEndpointGroup.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
// 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 alpha
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Returns the specified network endpoint group.
func LookupGlobalNetworkEndpointGroup(ctx *pulumi.Context, args *LookupGlobalNetworkEndpointGroupArgs, opts ...pulumi.InvokeOption) (*LookupGlobalNetworkEndpointGroupResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupGlobalNetworkEndpointGroupResult
err := ctx.Invoke("google-native:compute/alpha:getGlobalNetworkEndpointGroup", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupGlobalNetworkEndpointGroupArgs struct {
NetworkEndpointGroup string `pulumi:"networkEndpointGroup"`
Project *string `pulumi:"project"`
}
type LookupGlobalNetworkEndpointGroupResult struct {
// Metadata defined as annotations on the network endpoint group.
Annotations map[string]string `pulumi:"annotations"`
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.
AppEngine NetworkEndpointGroupAppEngineResponse `pulumi:"appEngine"`
// Only valid when networkEndpointType is "GCE_VM_IP_PORT" and the NEG is regional.
ClientPortMappingMode string `pulumi:"clientPortMappingMode"`
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.
CloudFunction NetworkEndpointGroupCloudFunctionResponse `pulumi:"cloudFunction"`
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.
CloudRun NetworkEndpointGroupCloudRunResponse `pulumi:"cloudRun"`
// Creation timestamp in RFC3339 text format.
CreationTimestamp string `pulumi:"creationTimestamp"`
// The default port used if the port number is not specified in the network endpoint.
DefaultPort int `pulumi:"defaultPort"`
// An optional description of this resource. Provide this property when you create the resource.
Description string `pulumi:"description"`
// Type of the resource. Always compute#networkEndpointGroup for network endpoint group.
Kind string `pulumi:"kind"`
// This field is only valid when the network endpoint group is used for load balancing. [Deprecated] This field is deprecated.
//
// Deprecated: This field is only valid when the network endpoint group is used for load balancing. [Deprecated] This field is deprecated.
LoadBalancer NetworkEndpointGroupLbNetworkEndpointGroupResponse `pulumi:"loadBalancer"`
// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
Name string `pulumi:"name"`
// The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
Network string `pulumi:"network"`
// Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT.
NetworkEndpointType string `pulumi:"networkEndpointType"`
PscData NetworkEndpointGroupPscDataResponse `pulumi:"pscData"`
// The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: "asia-northeast3-cloudkms.googleapis.com"
PscTargetService string `pulumi:"pscTargetService"`
// The URL of the region where the network endpoint group is located.
Region string `pulumi:"region"`
// Server-defined URL for the resource.
SelfLink string `pulumi:"selfLink"`
// Server-defined URL for this resource with the resource id.
SelfLinkWithId string `pulumi:"selfLinkWithId"`
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.
ServerlessDeployment NetworkEndpointGroupServerlessDeploymentResponse `pulumi:"serverlessDeployment"`
// [Output only] Number of network endpoints in the network endpoint group.
Size int `pulumi:"size"`
// Optional URL of the subnetwork to which all network endpoints in the NEG belong.
Subnetwork string `pulumi:"subnetwork"`
// Specify the type of this network endpoint group. Only LOAD_BALANCING is valid for now.
Type string `pulumi:"type"`
// The URL of the zone where the network endpoint group is located.
Zone string `pulumi:"zone"`
}
func LookupGlobalNetworkEndpointGroupOutput(ctx *pulumi.Context, args LookupGlobalNetworkEndpointGroupOutputArgs, opts ...pulumi.InvokeOption) LookupGlobalNetworkEndpointGroupResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupGlobalNetworkEndpointGroupResult, error) {
args := v.(LookupGlobalNetworkEndpointGroupArgs)
r, err := LookupGlobalNetworkEndpointGroup(ctx, &args, opts...)
var s LookupGlobalNetworkEndpointGroupResult
if r != nil {
s = *r
}
return s, err
}).(LookupGlobalNetworkEndpointGroupResultOutput)
}
type LookupGlobalNetworkEndpointGroupOutputArgs struct {
NetworkEndpointGroup pulumi.StringInput `pulumi:"networkEndpointGroup"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupGlobalNetworkEndpointGroupOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGlobalNetworkEndpointGroupArgs)(nil)).Elem()
}
type LookupGlobalNetworkEndpointGroupResultOutput struct{ *pulumi.OutputState }
func (LookupGlobalNetworkEndpointGroupResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupGlobalNetworkEndpointGroupResult)(nil)).Elem()
}
func (o LookupGlobalNetworkEndpointGroupResultOutput) ToLookupGlobalNetworkEndpointGroupResultOutput() LookupGlobalNetworkEndpointGroupResultOutput {
return o
}
func (o LookupGlobalNetworkEndpointGroupResultOutput) ToLookupGlobalNetworkEndpointGroupResultOutputWithContext(ctx context.Context) LookupGlobalNetworkEndpointGroupResultOutput {
return o
}
// Metadata defined as annotations on the network endpoint group.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Annotations() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) map[string]string { return v.Annotations }).(pulumi.StringMapOutput)
}
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.
func (o LookupGlobalNetworkEndpointGroupResultOutput) AppEngine() NetworkEndpointGroupAppEngineResponseOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) NetworkEndpointGroupAppEngineResponse {
return v.AppEngine
}).(NetworkEndpointGroupAppEngineResponseOutput)
}
// Only valid when networkEndpointType is "GCE_VM_IP_PORT" and the NEG is regional.
func (o LookupGlobalNetworkEndpointGroupResultOutput) ClientPortMappingMode() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.ClientPortMappingMode }).(pulumi.StringOutput)
}
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.
func (o LookupGlobalNetworkEndpointGroupResultOutput) CloudFunction() NetworkEndpointGroupCloudFunctionResponseOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) NetworkEndpointGroupCloudFunctionResponse {
return v.CloudFunction
}).(NetworkEndpointGroupCloudFunctionResponseOutput)
}
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine or cloudFunction may be set.
func (o LookupGlobalNetworkEndpointGroupResultOutput) CloudRun() NetworkEndpointGroupCloudRunResponseOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) NetworkEndpointGroupCloudRunResponse { return v.CloudRun }).(NetworkEndpointGroupCloudRunResponseOutput)
}
// Creation timestamp in RFC3339 text format.
func (o LookupGlobalNetworkEndpointGroupResultOutput) CreationTimestamp() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.CreationTimestamp }).(pulumi.StringOutput)
}
// The default port used if the port number is not specified in the network endpoint.
func (o LookupGlobalNetworkEndpointGroupResultOutput) DefaultPort() pulumi.IntOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) int { return v.DefaultPort }).(pulumi.IntOutput)
}
// An optional description of this resource. Provide this property when you create the resource.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Description }).(pulumi.StringOutput)
}
// Type of the resource. Always compute#networkEndpointGroup for network endpoint group.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Kind() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Kind }).(pulumi.StringOutput)
}
// This field is only valid when the network endpoint group is used for load balancing. [Deprecated] This field is deprecated.
//
// Deprecated: This field is only valid when the network endpoint group is used for load balancing. [Deprecated] This field is deprecated.
func (o LookupGlobalNetworkEndpointGroupResultOutput) LoadBalancer() NetworkEndpointGroupLbNetworkEndpointGroupResponseOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) NetworkEndpointGroupLbNetworkEndpointGroupResponse {
return v.LoadBalancer
}).(NetworkEndpointGroupLbNetworkEndpointGroupResponseOutput)
}
// Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Name }).(pulumi.StringOutput)
}
// The URL of the network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Network() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Network }).(pulumi.StringOutput)
}
// Type of network endpoints in this network endpoint group. Can be one of GCE_VM_IP, GCE_VM_IP_PORT, NON_GCP_PRIVATE_IP_PORT, INTERNET_FQDN_PORT, INTERNET_IP_PORT, SERVERLESS, PRIVATE_SERVICE_CONNECT.
func (o LookupGlobalNetworkEndpointGroupResultOutput) NetworkEndpointType() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.NetworkEndpointType }).(pulumi.StringOutput)
}
func (o LookupGlobalNetworkEndpointGroupResultOutput) PscData() NetworkEndpointGroupPscDataResponseOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) NetworkEndpointGroupPscDataResponse { return v.PscData }).(NetworkEndpointGroupPscDataResponseOutput)
}
// The target service url used to set up private service connection to a Google API or a PSC Producer Service Attachment. An example value is: "asia-northeast3-cloudkms.googleapis.com"
func (o LookupGlobalNetworkEndpointGroupResultOutput) PscTargetService() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.PscTargetService }).(pulumi.StringOutput)
}
// The URL of the region where the network endpoint group is located.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Region }).(pulumi.StringOutput)
}
// Server-defined URL for the resource.
func (o LookupGlobalNetworkEndpointGroupResultOutput) SelfLink() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.SelfLink }).(pulumi.StringOutput)
}
// Server-defined URL for this resource with the resource id.
func (o LookupGlobalNetworkEndpointGroupResultOutput) SelfLinkWithId() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.SelfLinkWithId }).(pulumi.StringOutput)
}
// Only valid when networkEndpointType is "SERVERLESS". Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.
func (o LookupGlobalNetworkEndpointGroupResultOutput) ServerlessDeployment() NetworkEndpointGroupServerlessDeploymentResponseOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) NetworkEndpointGroupServerlessDeploymentResponse {
return v.ServerlessDeployment
}).(NetworkEndpointGroupServerlessDeploymentResponseOutput)
}
// [Output only] Number of network endpoints in the network endpoint group.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Size() pulumi.IntOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) int { return v.Size }).(pulumi.IntOutput)
}
// Optional URL of the subnetwork to which all network endpoints in the NEG belong.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Subnetwork() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Subnetwork }).(pulumi.StringOutput)
}
// Specify the type of this network endpoint group. Only LOAD_BALANCING is valid for now.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Type }).(pulumi.StringOutput)
}
// The URL of the zone where the network endpoint group is located.
func (o LookupGlobalNetworkEndpointGroupResultOutput) Zone() pulumi.StringOutput {
return o.ApplyT(func(v LookupGlobalNetworkEndpointGroupResult) string { return v.Zone }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupGlobalNetworkEndpointGroupResultOutput{})
}