/
getService.go
227 lines (191 loc) · 11.4 KB
/
getService.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
// 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 v1beta
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets the details of a single service.
func LookupService(ctx *pulumi.Context, args *LookupServiceArgs, opts ...pulumi.InvokeOption) (*LookupServiceResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupServiceResult
err := ctx.Invoke("google-native:metastore/v1beta:getService", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupServiceArgs struct {
Location string `pulumi:"location"`
Project *string `pulumi:"project"`
ServiceId string `pulumi:"serviceId"`
}
type LookupServiceResult struct {
// A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.
ArtifactGcsUri string `pulumi:"artifactGcsUri"`
// The time when the metastore service was created.
CreateTime string `pulumi:"createTime"`
// Immutable. The database type that the Metastore service stores its data.
DatabaseType string `pulumi:"databaseType"`
// Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated.
EncryptionConfig EncryptionConfigResponse `pulumi:"encryptionConfig"`
// The URI of the endpoint used to access the metastore service.
EndpointUri string `pulumi:"endpointUri"`
// Configuration information specific to running Hive metastore software as the metastore service.
HiveMetastoreConfig HiveMetastoreConfigResponse `pulumi:"hiveMetastoreConfig"`
// User-defined labels for the metastore service.
Labels map[string]string `pulumi:"labels"`
// The one hour maintenance window of the metastore service. This specifies when the service can be restarted for maintenance purposes in UTC time. Maintenance window is not needed for services with the SPANNER database type.
MaintenanceWindow MaintenanceWindowResponse `pulumi:"maintenanceWindow"`
// Optional. The setting that defines how metastore metadata should be integrated with external services and systems.
MetadataIntegration MetadataIntegrationResponse `pulumi:"metadataIntegration"`
// The metadata management activities of the metastore service.
MetadataManagementActivity MetadataManagementActivityResponse `pulumi:"metadataManagementActivity"`
// Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.
Name string `pulumi:"name"`
// Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.
Network string `pulumi:"network"`
// The configuration specifying the network settings for the Dataproc Metastore service.
NetworkConfig NetworkConfigResponse `pulumi:"networkConfig"`
// The TCP port at which the metastore service is reached. Default: 9083.
Port int `pulumi:"port"`
// Immutable. The release channel of the service. If unspecified, defaults to STABLE.
ReleaseChannel string `pulumi:"releaseChannel"`
// Scaling configuration of the metastore service.
ScalingConfig ScalingConfigResponse `pulumi:"scalingConfig"`
// The current state of the metastore service.
State string `pulumi:"state"`
// Additional information about the current state of the metastore service, if available.
StateMessage string `pulumi:"stateMessage"`
// The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON.
TelemetryConfig TelemetryConfigResponse `pulumi:"telemetryConfig"`
// The tier of the service.
Tier string `pulumi:"tier"`
// The globally unique resource identifier of the metastore service.
Uid string `pulumi:"uid"`
// The time when the metastore service was last updated.
UpdateTime string `pulumi:"updateTime"`
}
func LookupServiceOutput(ctx *pulumi.Context, args LookupServiceOutputArgs, opts ...pulumi.InvokeOption) LookupServiceResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupServiceResult, error) {
args := v.(LookupServiceArgs)
r, err := LookupService(ctx, &args, opts...)
var s LookupServiceResult
if r != nil {
s = *r
}
return s, err
}).(LookupServiceResultOutput)
}
type LookupServiceOutputArgs struct {
Location pulumi.StringInput `pulumi:"location"`
Project pulumi.StringPtrInput `pulumi:"project"`
ServiceId pulumi.StringInput `pulumi:"serviceId"`
}
func (LookupServiceOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceArgs)(nil)).Elem()
}
type LookupServiceResultOutput struct{ *pulumi.OutputState }
func (LookupServiceResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupServiceResult)(nil)).Elem()
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutput() LookupServiceResultOutput {
return o
}
func (o LookupServiceResultOutput) ToLookupServiceResultOutputWithContext(ctx context.Context) LookupServiceResultOutput {
return o
}
// A Cloud Storage URI (starting with gs://) that specifies where artifacts related to the metastore service are stored.
func (o LookupServiceResultOutput) ArtifactGcsUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ArtifactGcsUri }).(pulumi.StringOutput)
}
// The time when the metastore service was created.
func (o LookupServiceResultOutput) CreateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.CreateTime }).(pulumi.StringOutput)
}
// Immutable. The database type that the Metastore service stores its data.
func (o LookupServiceResultOutput) DatabaseType() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.DatabaseType }).(pulumi.StringOutput)
}
// Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated.
func (o LookupServiceResultOutput) EncryptionConfig() EncryptionConfigResponseOutput {
return o.ApplyT(func(v LookupServiceResult) EncryptionConfigResponse { return v.EncryptionConfig }).(EncryptionConfigResponseOutput)
}
// The URI of the endpoint used to access the metastore service.
func (o LookupServiceResultOutput) EndpointUri() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.EndpointUri }).(pulumi.StringOutput)
}
// Configuration information specific to running Hive metastore software as the metastore service.
func (o LookupServiceResultOutput) HiveMetastoreConfig() HiveMetastoreConfigResponseOutput {
return o.ApplyT(func(v LookupServiceResult) HiveMetastoreConfigResponse { return v.HiveMetastoreConfig }).(HiveMetastoreConfigResponseOutput)
}
// User-defined labels for the metastore service.
func (o LookupServiceResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupServiceResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
// The one hour maintenance window of the metastore service. This specifies when the service can be restarted for maintenance purposes in UTC time. Maintenance window is not needed for services with the SPANNER database type.
func (o LookupServiceResultOutput) MaintenanceWindow() MaintenanceWindowResponseOutput {
return o.ApplyT(func(v LookupServiceResult) MaintenanceWindowResponse { return v.MaintenanceWindow }).(MaintenanceWindowResponseOutput)
}
// Optional. The setting that defines how metastore metadata should be integrated with external services and systems.
func (o LookupServiceResultOutput) MetadataIntegration() MetadataIntegrationResponseOutput {
return o.ApplyT(func(v LookupServiceResult) MetadataIntegrationResponse { return v.MetadataIntegration }).(MetadataIntegrationResponseOutput)
}
// The metadata management activities of the metastore service.
func (o LookupServiceResultOutput) MetadataManagementActivity() MetadataManagementActivityResponseOutput {
return o.ApplyT(func(v LookupServiceResult) MetadataManagementActivityResponse { return v.MetadataManagementActivity }).(MetadataManagementActivityResponseOutput)
}
// Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.
func (o LookupServiceResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Name }).(pulumi.StringOutput)
}
// Immutable. The relative resource name of the VPC network on which the instance can be accessed. It is specified in the following form:projects/{project_number}/global/networks/{network_id}.
func (o LookupServiceResultOutput) Network() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Network }).(pulumi.StringOutput)
}
// The configuration specifying the network settings for the Dataproc Metastore service.
func (o LookupServiceResultOutput) NetworkConfig() NetworkConfigResponseOutput {
return o.ApplyT(func(v LookupServiceResult) NetworkConfigResponse { return v.NetworkConfig }).(NetworkConfigResponseOutput)
}
// The TCP port at which the metastore service is reached. Default: 9083.
func (o LookupServiceResultOutput) Port() pulumi.IntOutput {
return o.ApplyT(func(v LookupServiceResult) int { return v.Port }).(pulumi.IntOutput)
}
// Immutable. The release channel of the service. If unspecified, defaults to STABLE.
func (o LookupServiceResultOutput) ReleaseChannel() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.ReleaseChannel }).(pulumi.StringOutput)
}
// Scaling configuration of the metastore service.
func (o LookupServiceResultOutput) ScalingConfig() ScalingConfigResponseOutput {
return o.ApplyT(func(v LookupServiceResult) ScalingConfigResponse { return v.ScalingConfig }).(ScalingConfigResponseOutput)
}
// The current state of the metastore service.
func (o LookupServiceResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.State }).(pulumi.StringOutput)
}
// Additional information about the current state of the metastore service, if available.
func (o LookupServiceResultOutput) StateMessage() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.StateMessage }).(pulumi.StringOutput)
}
// The configuration specifying telemetry settings for the Dataproc Metastore service. If unspecified defaults to JSON.
func (o LookupServiceResultOutput) TelemetryConfig() TelemetryConfigResponseOutput {
return o.ApplyT(func(v LookupServiceResult) TelemetryConfigResponse { return v.TelemetryConfig }).(TelemetryConfigResponseOutput)
}
// The tier of the service.
func (o LookupServiceResultOutput) Tier() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Tier }).(pulumi.StringOutput)
}
// The globally unique resource identifier of the metastore service.
func (o LookupServiceResultOutput) Uid() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.Uid }).(pulumi.StringOutput)
}
// The time when the metastore service was last updated.
func (o LookupServiceResultOutput) UpdateTime() pulumi.StringOutput {
return o.ApplyT(func(v LookupServiceResult) string { return v.UpdateTime }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupServiceResultOutput{})
}