-
Notifications
You must be signed in to change notification settings - Fork 17
/
getCluster.go
92 lines (75 loc) · 3.12 KB
/
getCluster.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
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package route53recoverycontrol
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// AWS Route53 Recovery Control Cluster resource schema
func LookupCluster(ctx *pulumi.Context, args *LookupClusterArgs, opts ...pulumi.InvokeOption) (*LookupClusterResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupClusterResult
err := ctx.Invoke("aws-native:route53recoverycontrol:getCluster", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupClusterArgs struct {
// The Amazon Resource Name (ARN) of the cluster.
ClusterArn string `pulumi:"clusterArn"`
}
type LookupClusterResult struct {
// The Amazon Resource Name (ARN) of the cluster.
ClusterArn *string `pulumi:"clusterArn"`
// Endpoints for the cluster.
ClusterEndpoints []ClusterEndpoint `pulumi:"clusterEndpoints"`
// Deployment status of a resource. Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
Status *ClusterStatus `pulumi:"status"`
}
func LookupClusterOutput(ctx *pulumi.Context, args LookupClusterOutputArgs, opts ...pulumi.InvokeOption) LookupClusterResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupClusterResult, error) {
args := v.(LookupClusterArgs)
r, err := LookupCluster(ctx, &args, opts...)
var s LookupClusterResult
if r != nil {
s = *r
}
return s, err
}).(LookupClusterResultOutput)
}
type LookupClusterOutputArgs struct {
// The Amazon Resource Name (ARN) of the cluster.
ClusterArn pulumi.StringInput `pulumi:"clusterArn"`
}
func (LookupClusterOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupClusterArgs)(nil)).Elem()
}
type LookupClusterResultOutput struct{ *pulumi.OutputState }
func (LookupClusterResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupClusterResult)(nil)).Elem()
}
func (o LookupClusterResultOutput) ToLookupClusterResultOutput() LookupClusterResultOutput {
return o
}
func (o LookupClusterResultOutput) ToLookupClusterResultOutputWithContext(ctx context.Context) LookupClusterResultOutput {
return o
}
// The Amazon Resource Name (ARN) of the cluster.
func (o LookupClusterResultOutput) ClusterArn() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupClusterResult) *string { return v.ClusterArn }).(pulumi.StringPtrOutput)
}
// Endpoints for the cluster.
func (o LookupClusterResultOutput) ClusterEndpoints() ClusterEndpointArrayOutput {
return o.ApplyT(func(v LookupClusterResult) []ClusterEndpoint { return v.ClusterEndpoints }).(ClusterEndpointArrayOutput)
}
// Deployment status of a resource. Status can be one of the following: PENDING, DEPLOYED, PENDING_DELETION.
func (o LookupClusterResultOutput) Status() ClusterStatusPtrOutput {
return o.ApplyT(func(v LookupClusterResult) *ClusterStatus { return v.Status }).(ClusterStatusPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupClusterResultOutput{})
}