github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/msk/getBrokerNodes.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package msk 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Get information on an Amazon MSK Broker Nodes. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/msk" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := msk.GetBrokerNodes(ctx, &msk.GetBrokerNodesArgs{ 32 // ClusterArn: exampleAwsMskCluster.Arn, 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func GetBrokerNodes(ctx *pulumi.Context, args *GetBrokerNodesArgs, opts ...pulumi.InvokeOption) (*GetBrokerNodesResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv GetBrokerNodesResult 46 err := ctx.Invoke("aws:msk/getBrokerNodes:getBrokerNodes", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getBrokerNodes. 54 type GetBrokerNodesArgs struct { 55 // ARN of the cluster the nodes belong to. 56 ClusterArn string `pulumi:"clusterArn"` 57 } 58 59 // A collection of values returned by getBrokerNodes. 60 type GetBrokerNodesResult struct { 61 ClusterArn string `pulumi:"clusterArn"` 62 // The provider-assigned unique ID for this managed resource. 63 Id string `pulumi:"id"` 64 NodeInfoLists []GetBrokerNodesNodeInfoList `pulumi:"nodeInfoLists"` 65 } 66 67 func GetBrokerNodesOutput(ctx *pulumi.Context, args GetBrokerNodesOutputArgs, opts ...pulumi.InvokeOption) GetBrokerNodesResultOutput { 68 return pulumi.ToOutputWithContext(context.Background(), args). 69 ApplyT(func(v interface{}) (GetBrokerNodesResult, error) { 70 args := v.(GetBrokerNodesArgs) 71 r, err := GetBrokerNodes(ctx, &args, opts...) 72 var s GetBrokerNodesResult 73 if r != nil { 74 s = *r 75 } 76 return s, err 77 }).(GetBrokerNodesResultOutput) 78 } 79 80 // A collection of arguments for invoking getBrokerNodes. 81 type GetBrokerNodesOutputArgs struct { 82 // ARN of the cluster the nodes belong to. 83 ClusterArn pulumi.StringInput `pulumi:"clusterArn"` 84 } 85 86 func (GetBrokerNodesOutputArgs) ElementType() reflect.Type { 87 return reflect.TypeOf((*GetBrokerNodesArgs)(nil)).Elem() 88 } 89 90 // A collection of values returned by getBrokerNodes. 91 type GetBrokerNodesResultOutput struct{ *pulumi.OutputState } 92 93 func (GetBrokerNodesResultOutput) ElementType() reflect.Type { 94 return reflect.TypeOf((*GetBrokerNodesResult)(nil)).Elem() 95 } 96 97 func (o GetBrokerNodesResultOutput) ToGetBrokerNodesResultOutput() GetBrokerNodesResultOutput { 98 return o 99 } 100 101 func (o GetBrokerNodesResultOutput) ToGetBrokerNodesResultOutputWithContext(ctx context.Context) GetBrokerNodesResultOutput { 102 return o 103 } 104 105 func (o GetBrokerNodesResultOutput) ClusterArn() pulumi.StringOutput { 106 return o.ApplyT(func(v GetBrokerNodesResult) string { return v.ClusterArn }).(pulumi.StringOutput) 107 } 108 109 // The provider-assigned unique ID for this managed resource. 110 func (o GetBrokerNodesResultOutput) Id() pulumi.StringOutput { 111 return o.ApplyT(func(v GetBrokerNodesResult) string { return v.Id }).(pulumi.StringOutput) 112 } 113 114 func (o GetBrokerNodesResultOutput) NodeInfoLists() GetBrokerNodesNodeInfoListArrayOutput { 115 return o.ApplyT(func(v GetBrokerNodesResult) []GetBrokerNodesNodeInfoList { return v.NodeInfoLists }).(GetBrokerNodesNodeInfoListArrayOutput) 116 } 117 118 func init() { 119 pulumi.RegisterOutputType(GetBrokerNodesResultOutput{}) 120 }