github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/msk/getConfiguration.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 Configuration. 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.LookupConfiguration(ctx, &msk.LookupConfigurationArgs{ 32 // Name: "example", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupConfiguration(ctx *pulumi.Context, args *LookupConfigurationArgs, opts ...pulumi.InvokeOption) (*LookupConfigurationResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupConfigurationResult 46 err := ctx.Invoke("aws:msk/getConfiguration:getConfiguration", 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 getConfiguration. 54 type LookupConfigurationArgs struct { 55 // Name of the configuration. 56 Name string `pulumi:"name"` 57 } 58 59 // A collection of values returned by getConfiguration. 60 type LookupConfigurationResult struct { 61 // ARN of the configuration. 62 Arn string `pulumi:"arn"` 63 // Description of the configuration. 64 Description string `pulumi:"description"` 65 // The provider-assigned unique ID for this managed resource. 66 Id string `pulumi:"id"` 67 // List of Apache Kafka versions which can use this configuration. 68 KafkaVersions []string `pulumi:"kafkaVersions"` 69 // Latest revision of the configuration. 70 LatestRevision int `pulumi:"latestRevision"` 71 Name string `pulumi:"name"` 72 // Contents of the server.properties file. 73 ServerProperties string `pulumi:"serverProperties"` 74 } 75 76 func LookupConfigurationOutput(ctx *pulumi.Context, args LookupConfigurationOutputArgs, opts ...pulumi.InvokeOption) LookupConfigurationResultOutput { 77 return pulumi.ToOutputWithContext(context.Background(), args). 78 ApplyT(func(v interface{}) (LookupConfigurationResult, error) { 79 args := v.(LookupConfigurationArgs) 80 r, err := LookupConfiguration(ctx, &args, opts...) 81 var s LookupConfigurationResult 82 if r != nil { 83 s = *r 84 } 85 return s, err 86 }).(LookupConfigurationResultOutput) 87 } 88 89 // A collection of arguments for invoking getConfiguration. 90 type LookupConfigurationOutputArgs struct { 91 // Name of the configuration. 92 Name pulumi.StringInput `pulumi:"name"` 93 } 94 95 func (LookupConfigurationOutputArgs) ElementType() reflect.Type { 96 return reflect.TypeOf((*LookupConfigurationArgs)(nil)).Elem() 97 } 98 99 // A collection of values returned by getConfiguration. 100 type LookupConfigurationResultOutput struct{ *pulumi.OutputState } 101 102 func (LookupConfigurationResultOutput) ElementType() reflect.Type { 103 return reflect.TypeOf((*LookupConfigurationResult)(nil)).Elem() 104 } 105 106 func (o LookupConfigurationResultOutput) ToLookupConfigurationResultOutput() LookupConfigurationResultOutput { 107 return o 108 } 109 110 func (o LookupConfigurationResultOutput) ToLookupConfigurationResultOutputWithContext(ctx context.Context) LookupConfigurationResultOutput { 111 return o 112 } 113 114 // ARN of the configuration. 115 func (o LookupConfigurationResultOutput) Arn() pulumi.StringOutput { 116 return o.ApplyT(func(v LookupConfigurationResult) string { return v.Arn }).(pulumi.StringOutput) 117 } 118 119 // Description of the configuration. 120 func (o LookupConfigurationResultOutput) Description() pulumi.StringOutput { 121 return o.ApplyT(func(v LookupConfigurationResult) string { return v.Description }).(pulumi.StringOutput) 122 } 123 124 // The provider-assigned unique ID for this managed resource. 125 func (o LookupConfigurationResultOutput) Id() pulumi.StringOutput { 126 return o.ApplyT(func(v LookupConfigurationResult) string { return v.Id }).(pulumi.StringOutput) 127 } 128 129 // List of Apache Kafka versions which can use this configuration. 130 func (o LookupConfigurationResultOutput) KafkaVersions() pulumi.StringArrayOutput { 131 return o.ApplyT(func(v LookupConfigurationResult) []string { return v.KafkaVersions }).(pulumi.StringArrayOutput) 132 } 133 134 // Latest revision of the configuration. 135 func (o LookupConfigurationResultOutput) LatestRevision() pulumi.IntOutput { 136 return o.ApplyT(func(v LookupConfigurationResult) int { return v.LatestRevision }).(pulumi.IntOutput) 137 } 138 139 func (o LookupConfigurationResultOutput) Name() pulumi.StringOutput { 140 return o.ApplyT(func(v LookupConfigurationResult) string { return v.Name }).(pulumi.StringOutput) 141 } 142 143 // Contents of the server.properties file. 144 func (o LookupConfigurationResultOutput) ServerProperties() pulumi.StringOutput { 145 return o.ApplyT(func(v LookupConfigurationResult) string { return v.ServerProperties }).(pulumi.StringOutput) 146 } 147 148 func init() { 149 pulumi.RegisterOutputType(LookupConfigurationResultOutput{}) 150 }