github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/rds/getParameterGroup.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 rds 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 // Information about a database parameter group. 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/rds" 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 := rds.LookupParameterGroup(ctx, &rds.LookupParameterGroupArgs{ 32 // Name: "default.postgres15", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupParameterGroup(ctx *pulumi.Context, args *LookupParameterGroupArgs, opts ...pulumi.InvokeOption) (*LookupParameterGroupResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupParameterGroupResult 46 err := ctx.Invoke("aws:rds/getParameterGroup:getParameterGroup", 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 getParameterGroup. 54 type LookupParameterGroupArgs struct { 55 // DB parameter group name. 56 Name string `pulumi:"name"` 57 } 58 59 // A collection of values returned by getParameterGroup. 60 type LookupParameterGroupResult struct { 61 // ARN of the parameter group. 62 Arn string `pulumi:"arn"` 63 // Description of the parameter group. 64 Description string `pulumi:"description"` 65 // Family of the parameter group. 66 Family string `pulumi:"family"` 67 // The provider-assigned unique ID for this managed resource. 68 Id string `pulumi:"id"` 69 Name string `pulumi:"name"` 70 } 71 72 func LookupParameterGroupOutput(ctx *pulumi.Context, args LookupParameterGroupOutputArgs, opts ...pulumi.InvokeOption) LookupParameterGroupResultOutput { 73 return pulumi.ToOutputWithContext(context.Background(), args). 74 ApplyT(func(v interface{}) (LookupParameterGroupResult, error) { 75 args := v.(LookupParameterGroupArgs) 76 r, err := LookupParameterGroup(ctx, &args, opts...) 77 var s LookupParameterGroupResult 78 if r != nil { 79 s = *r 80 } 81 return s, err 82 }).(LookupParameterGroupResultOutput) 83 } 84 85 // A collection of arguments for invoking getParameterGroup. 86 type LookupParameterGroupOutputArgs struct { 87 // DB parameter group name. 88 Name pulumi.StringInput `pulumi:"name"` 89 } 90 91 func (LookupParameterGroupOutputArgs) ElementType() reflect.Type { 92 return reflect.TypeOf((*LookupParameterGroupArgs)(nil)).Elem() 93 } 94 95 // A collection of values returned by getParameterGroup. 96 type LookupParameterGroupResultOutput struct{ *pulumi.OutputState } 97 98 func (LookupParameterGroupResultOutput) ElementType() reflect.Type { 99 return reflect.TypeOf((*LookupParameterGroupResult)(nil)).Elem() 100 } 101 102 func (o LookupParameterGroupResultOutput) ToLookupParameterGroupResultOutput() LookupParameterGroupResultOutput { 103 return o 104 } 105 106 func (o LookupParameterGroupResultOutput) ToLookupParameterGroupResultOutputWithContext(ctx context.Context) LookupParameterGroupResultOutput { 107 return o 108 } 109 110 // ARN of the parameter group. 111 func (o LookupParameterGroupResultOutput) Arn() pulumi.StringOutput { 112 return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Arn }).(pulumi.StringOutput) 113 } 114 115 // Description of the parameter group. 116 func (o LookupParameterGroupResultOutput) Description() pulumi.StringOutput { 117 return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Description }).(pulumi.StringOutput) 118 } 119 120 // Family of the parameter group. 121 func (o LookupParameterGroupResultOutput) Family() pulumi.StringOutput { 122 return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Family }).(pulumi.StringOutput) 123 } 124 125 // The provider-assigned unique ID for this managed resource. 126 func (o LookupParameterGroupResultOutput) Id() pulumi.StringOutput { 127 return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Id }).(pulumi.StringOutput) 128 } 129 130 func (o LookupParameterGroupResultOutput) Name() pulumi.StringOutput { 131 return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Name }).(pulumi.StringOutput) 132 } 133 134 func init() { 135 pulumi.RegisterOutputType(LookupParameterGroupResultOutput{}) 136 }