generated from pulumi/pulumi-tf-provider-boilerplate
/
getCockroachCluster.go
143 lines (115 loc) · 5.93 KB
/
getCockroachCluster.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
// 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 cockroach
import (
"context"
"reflect"
"github.com/lbrlabs/pulumi-cockroach/sdk/go/cockroach/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// CockroachDB Cloud cluster. Can be Dedicated or Serverless.
func GetCockroachCluster(ctx *pulumi.Context, args *GetCockroachClusterArgs, opts ...pulumi.InvokeOption) (*GetCockroachClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetCockroachClusterResult
err := ctx.Invoke("cockroach:index/getCockroachCluster:getCockroachCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getCockroachCluster.
type GetCockroachClusterArgs struct {
Id string `pulumi:"id"`
}
// A collection of values returned by getCockroachCluster.
type GetCockroachClusterResult struct {
AccountId string `pulumi:"accountId"`
CloudProvider string `pulumi:"cloudProvider"`
CockroachVersion string `pulumi:"cockroachVersion"`
CreatorId string `pulumi:"creatorId"`
Dedicated GetCockroachClusterDedicated `pulumi:"dedicated"`
Id string `pulumi:"id"`
Name string `pulumi:"name"`
OperationStatus string `pulumi:"operationStatus"`
ParentId string `pulumi:"parentId"`
Plan string `pulumi:"plan"`
Regions []GetCockroachClusterRegion `pulumi:"regions"`
Serverless GetCockroachClusterServerless `pulumi:"serverless"`
State string `pulumi:"state"`
UpgradeStatus string `pulumi:"upgradeStatus"`
}
func GetCockroachClusterOutput(ctx *pulumi.Context, args GetCockroachClusterOutputArgs, opts ...pulumi.InvokeOption) GetCockroachClusterResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetCockroachClusterResult, error) {
args := v.(GetCockroachClusterArgs)
r, err := GetCockroachCluster(ctx, &args, opts...)
var s GetCockroachClusterResult
if r != nil {
s = *r
}
return s, err
}).(GetCockroachClusterResultOutput)
}
// A collection of arguments for invoking getCockroachCluster.
type GetCockroachClusterOutputArgs struct {
Id pulumi.StringInput `pulumi:"id"`
}
func (GetCockroachClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetCockroachClusterArgs)(nil)).Elem()
}
// A collection of values returned by getCockroachCluster.
type GetCockroachClusterResultOutput struct{ *pulumi.OutputState }
func (GetCockroachClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetCockroachClusterResult)(nil)).Elem()
}
func (o GetCockroachClusterResultOutput) ToGetCockroachClusterResultOutput() GetCockroachClusterResultOutput {
return o
}
func (o GetCockroachClusterResultOutput) ToGetCockroachClusterResultOutputWithContext(ctx context.Context) GetCockroachClusterResultOutput {
return o
}
func (o GetCockroachClusterResultOutput) AccountId() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.AccountId }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) CloudProvider() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.CloudProvider }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) CockroachVersion() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.CockroachVersion }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) CreatorId() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.CreatorId }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) Dedicated() GetCockroachClusterDedicatedOutput {
return o.ApplyT(func(v GetCockroachClusterResult) GetCockroachClusterDedicated { return v.Dedicated }).(GetCockroachClusterDedicatedOutput)
}
func (o GetCockroachClusterResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.Name }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) OperationStatus() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.OperationStatus }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) ParentId() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.ParentId }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) Plan() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.Plan }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) Regions() GetCockroachClusterRegionArrayOutput {
return o.ApplyT(func(v GetCockroachClusterResult) []GetCockroachClusterRegion { return v.Regions }).(GetCockroachClusterRegionArrayOutput)
}
func (o GetCockroachClusterResultOutput) Serverless() GetCockroachClusterServerlessOutput {
return o.ApplyT(func(v GetCockroachClusterResult) GetCockroachClusterServerless { return v.Serverless }).(GetCockroachClusterServerlessOutput)
}
func (o GetCockroachClusterResultOutput) State() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.State }).(pulumi.StringOutput)
}
func (o GetCockroachClusterResultOutput) UpgradeStatus() pulumi.StringOutput {
return o.ApplyT(func(v GetCockroachClusterResult) string { return v.UpgradeStatus }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(GetCockroachClusterResultOutput{})
}