generated from pulumi/pulumi-tf-provider-boilerplate
/
getMdbElasticSearchCluster.go
239 lines (208 loc) · 10.7 KB
/
getMdbElasticSearchCluster.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
// 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 yandex
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get information about a Yandex Managed Elasticsearch cluster. For more information, see
// [the official documentation](https://cloud.yandex.com/docs/managed-elasticsearch/concepts).
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-yandex/sdk/go/yandex"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// foo, err := yandex.LookupMdbElasticSearchCluster(ctx, &GetMdbElasticSearchClusterArgs{
// Name: pulumi.StringRef("test"),
// }, nil)
// if err != nil {
// return err
// }
// ctx.Export("networkId", foo.NetworkId)
// return nil
// })
// }
//
// ```
func LookupMdbElasticSearchCluster(ctx *pulumi.Context, args *LookupMdbElasticSearchClusterArgs, opts ...pulumi.InvokeOption) (*LookupMdbElasticSearchClusterResult, error) {
opts = pkgInvokeDefaultOpts(opts)
var rv LookupMdbElasticSearchClusterResult
err := ctx.Invoke("yandex:index/getMdbElasticSearchCluster:getMdbElasticSearchCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getMdbElasticSearchCluster.
type LookupMdbElasticSearchClusterArgs struct {
// The ID of the Elasticsearch cluster.
ClusterId *string `pulumi:"clusterId"`
DeletionProtection *bool `pulumi:"deletionProtection"`
// Description of the Elasticsearch cluster.
Description *string `pulumi:"description"`
// The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
FolderId *string `pulumi:"folderId"`
// A set of key/value label pairs to assign to the Elasticsearch cluster.
Labels map[string]string `pulumi:"labels"`
// The name of the Elasticsearch cluster.
Name *string `pulumi:"name"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// ID of the service account authorized for this cluster.
ServiceAccountId *string `pulumi:"serviceAccountId"`
}
// A collection of values returned by getMdbElasticSearchCluster.
type LookupMdbElasticSearchClusterResult struct {
ClusterId string `pulumi:"clusterId"`
// Configuration of the Elasticsearch cluster. The structure is documented below.
Configs []GetMdbElasticSearchClusterConfig `pulumi:"configs"`
// Creation timestamp of the key.
CreatedAt string `pulumi:"createdAt"`
DeletionProtection bool `pulumi:"deletionProtection"`
// Description of the Elasticsearch cluster.
Description string `pulumi:"description"`
// Deployment environment of the Elasticsearch cluster.
Environment string `pulumi:"environment"`
FolderId string `pulumi:"folderId"`
// Aggregated health of the cluster.
Health string `pulumi:"health"`
// A host of the Elasticsearch cluster. The structure is documented below.
Hosts []GetMdbElasticSearchClusterHost `pulumi:"hosts"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// A set of key/value label pairs to assign to the Elasticsearch cluster.
Labels map[string]string `pulumi:"labels"`
MaintenanceWindows []GetMdbElasticSearchClusterMaintenanceWindow `pulumi:"maintenanceWindows"`
Name string `pulumi:"name"`
// ID of the network, to which the Elasticsearch cluster belongs.
NetworkId string `pulumi:"networkId"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds []string `pulumi:"securityGroupIds"`
// ID of the service account authorized for this cluster.
ServiceAccountId string `pulumi:"serviceAccountId"`
// Status of the cluster.
Status string `pulumi:"status"`
}
func LookupMdbElasticSearchClusterOutput(ctx *pulumi.Context, args LookupMdbElasticSearchClusterOutputArgs, opts ...pulumi.InvokeOption) LookupMdbElasticSearchClusterResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupMdbElasticSearchClusterResult, error) {
args := v.(LookupMdbElasticSearchClusterArgs)
r, err := LookupMdbElasticSearchCluster(ctx, &args, opts...)
var s LookupMdbElasticSearchClusterResult
if r != nil {
s = *r
}
return s, err
}).(LookupMdbElasticSearchClusterResultOutput)
}
// A collection of arguments for invoking getMdbElasticSearchCluster.
type LookupMdbElasticSearchClusterOutputArgs struct {
// The ID of the Elasticsearch cluster.
ClusterId pulumi.StringPtrInput `pulumi:"clusterId"`
DeletionProtection pulumi.BoolPtrInput `pulumi:"deletionProtection"`
// Description of the Elasticsearch cluster.
Description pulumi.StringPtrInput `pulumi:"description"`
// The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
FolderId pulumi.StringPtrInput `pulumi:"folderId"`
// A set of key/value label pairs to assign to the Elasticsearch cluster.
Labels pulumi.StringMapInput `pulumi:"labels"`
// The name of the Elasticsearch cluster.
Name pulumi.StringPtrInput `pulumi:"name"`
// A set of ids of security groups assigned to hosts of the cluster.
SecurityGroupIds pulumi.StringArrayInput `pulumi:"securityGroupIds"`
// ID of the service account authorized for this cluster.
ServiceAccountId pulumi.StringPtrInput `pulumi:"serviceAccountId"`
}
func (LookupMdbElasticSearchClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMdbElasticSearchClusterArgs)(nil)).Elem()
}
// A collection of values returned by getMdbElasticSearchCluster.
type LookupMdbElasticSearchClusterResultOutput struct{ *pulumi.OutputState }
func (LookupMdbElasticSearchClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupMdbElasticSearchClusterResult)(nil)).Elem()
}
func (o LookupMdbElasticSearchClusterResultOutput) ToLookupMdbElasticSearchClusterResultOutput() LookupMdbElasticSearchClusterResultOutput {
return o
}
func (o LookupMdbElasticSearchClusterResultOutput) ToLookupMdbElasticSearchClusterResultOutputWithContext(ctx context.Context) LookupMdbElasticSearchClusterResultOutput {
return o
}
func (o LookupMdbElasticSearchClusterResultOutput) ClusterId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.ClusterId }).(pulumi.StringOutput)
}
// Configuration of the Elasticsearch cluster. The structure is documented below.
func (o LookupMdbElasticSearchClusterResultOutput) Configs() GetMdbElasticSearchClusterConfigArrayOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) []GetMdbElasticSearchClusterConfig { return v.Configs }).(GetMdbElasticSearchClusterConfigArrayOutput)
}
// Creation timestamp of the key.
func (o LookupMdbElasticSearchClusterResultOutput) CreatedAt() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.CreatedAt }).(pulumi.StringOutput)
}
func (o LookupMdbElasticSearchClusterResultOutput) DeletionProtection() pulumi.BoolOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) bool { return v.DeletionProtection }).(pulumi.BoolOutput)
}
// Description of the Elasticsearch cluster.
func (o LookupMdbElasticSearchClusterResultOutput) Description() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.Description }).(pulumi.StringOutput)
}
// Deployment environment of the Elasticsearch cluster.
func (o LookupMdbElasticSearchClusterResultOutput) Environment() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.Environment }).(pulumi.StringOutput)
}
func (o LookupMdbElasticSearchClusterResultOutput) FolderId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.FolderId }).(pulumi.StringOutput)
}
// Aggregated health of the cluster.
func (o LookupMdbElasticSearchClusterResultOutput) Health() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.Health }).(pulumi.StringOutput)
}
// A host of the Elasticsearch cluster. The structure is documented below.
func (o LookupMdbElasticSearchClusterResultOutput) Hosts() GetMdbElasticSearchClusterHostArrayOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) []GetMdbElasticSearchClusterHost { return v.Hosts }).(GetMdbElasticSearchClusterHostArrayOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupMdbElasticSearchClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
// A set of key/value label pairs to assign to the Elasticsearch cluster.
func (o LookupMdbElasticSearchClusterResultOutput) Labels() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
}
func (o LookupMdbElasticSearchClusterResultOutput) MaintenanceWindows() GetMdbElasticSearchClusterMaintenanceWindowArrayOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) []GetMdbElasticSearchClusterMaintenanceWindow {
return v.MaintenanceWindows
}).(GetMdbElasticSearchClusterMaintenanceWindowArrayOutput)
}
func (o LookupMdbElasticSearchClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
// ID of the network, to which the Elasticsearch cluster belongs.
func (o LookupMdbElasticSearchClusterResultOutput) NetworkId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.NetworkId }).(pulumi.StringOutput)
}
// A set of ids of security groups assigned to hosts of the cluster.
func (o LookupMdbElasticSearchClusterResultOutput) SecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) []string { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
}
// ID of the service account authorized for this cluster.
func (o LookupMdbElasticSearchClusterResultOutput) ServiceAccountId() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.ServiceAccountId }).(pulumi.StringOutput)
}
// Status of the cluster.
func (o LookupMdbElasticSearchClusterResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v LookupMdbElasticSearchClusterResult) string { return v.Status }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupMdbElasticSearchClusterResultOutput{})
}