This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
generated from pulumi/pulumi-tf-provider-boilerplate
/
getCeph.go
200 lines (175 loc) · 5.66 KB
/
getCeph.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
// 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 dedicated
import (
"context"
"reflect"
"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to retrieve information about a dedicated CEPH.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Dedicated"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := Dedicated.GetCeph(ctx, &dedicated.GetCephArgs{
// ServiceName: "XXXXXX",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func GetCeph(ctx *pulumi.Context, args *GetCephArgs, opts ...pulumi.InvokeOption) (*GetCephResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetCephResult
err := ctx.Invoke("ovh:Dedicated/getCeph:getCeph", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCeph.
type GetCephArgs struct {
// CEPH cluster version
CephVersion *string `pulumi:"cephVersion"`
// The service name of the dedicated CEPH cluster.
ServiceName string `pulumi:"serviceName"`
// the status of the service
Status *string `pulumi:"status"`
}
// A collection of values returned by getCeph.
type GetCephResult struct {
// list of CEPH monitors IPs
CephMons []string `pulumi:"cephMons"`
// CEPH cluster version
CephVersion string `pulumi:"cephVersion"`
// CRUSH algorithm settings. Possible values
// * OPTIMAL
// * DEFAULT
// * LEGACY
// * BOBTAIL
// * ARGONAUT
// * FIREFLY
// * HAMMER
// * JEWEL
CrushTunables string `pulumi:"crushTunables"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// CEPH cluster label
Label string `pulumi:"label"`
// cluster region
Region string `pulumi:"region"`
ServiceName string `pulumi:"serviceName"`
// Cluster size in TB
Size float64 `pulumi:"size"`
// the state of the cluster
State string `pulumi:"state"`
// the status of the service
Status string `pulumi:"status"`
// URN of the CEPH instance
Urn string `pulumi:"urn"`
}
func GetCephOutput(ctx *pulumi.Context, args GetCephOutputArgs, opts ...pulumi.InvokeOption) GetCephResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetCephResult, error) {
args := v.(GetCephArgs)
r, err := GetCeph(ctx, &args, opts...)
var s GetCephResult
if r != nil {
s = *r
}
return s, err
}).(GetCephResultOutput)
}
// A collection of arguments for invoking getCeph.
type GetCephOutputArgs struct {
// CEPH cluster version
CephVersion pulumi.StringPtrInput `pulumi:"cephVersion"`
// The service name of the dedicated CEPH cluster.
ServiceName pulumi.StringInput `pulumi:"serviceName"`
// the status of the service
Status pulumi.StringPtrInput `pulumi:"status"`
}
func (GetCephOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCephArgs)(nil)).Elem()
}
// A collection of values returned by getCeph.
type GetCephResultOutput struct{ *pulumi.OutputState }
func (GetCephResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCephResult)(nil)).Elem()
}
func (o GetCephResultOutput) ToGetCephResultOutput() GetCephResultOutput {
return o
}
func (o GetCephResultOutput) ToGetCephResultOutputWithContext(ctx context.Context) GetCephResultOutput {
return o
}
// list of CEPH monitors IPs
func (o GetCephResultOutput) CephMons() pulumi.StringArrayOutput {
return o.ApplyT(func(v GetCephResult) []string { return v.CephMons }).(pulumi.StringArrayOutput)
}
// CEPH cluster version
func (o GetCephResultOutput) CephVersion() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.CephVersion }).(pulumi.StringOutput)
}
// CRUSH algorithm settings. Possible values
// * OPTIMAL
// * DEFAULT
// * LEGACY
// * BOBTAIL
// * ARGONAUT
// * FIREFLY
// * HAMMER
// * JEWEL
func (o GetCephResultOutput) CrushTunables() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.CrushTunables }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetCephResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.Id }).(pulumi.StringOutput)
}
// CEPH cluster label
func (o GetCephResultOutput) Label() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.Label }).(pulumi.StringOutput)
}
// cluster region
func (o GetCephResultOutput) Region() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.Region }).(pulumi.StringOutput)
}
func (o GetCephResultOutput) ServiceName() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.ServiceName }).(pulumi.StringOutput)
}
// Cluster size in TB
func (o GetCephResultOutput) Size() pulumi.Float64Output {
return o.ApplyT(func(v GetCephResult) float64 { return v.Size }).(pulumi.Float64Output)
}
// the state of the cluster
func (o GetCephResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.State }).(pulumi.StringOutput)
}
// the status of the service
func (o GetCephResultOutput) Status() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.Status }).(pulumi.StringOutput)
}
// URN of the CEPH instance
func (o GetCephResultOutput) Urn() pulumi.StringOutput {
return o.ApplyT(func(v GetCephResult) string { return v.Urn }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetCephResultOutput{})
}