github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/memorydb/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 memorydb
     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  // Provides information about a MemoryDB 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/memorydb"
    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 := memorydb.LookupParameterGroup(ctx, &memorydb.LookupParameterGroupArgs{
    32  //				Name: "my-parameter-group",
    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:memorydb/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  	// Name of the parameter group.
    56  	Name string `pulumi:"name"`
    57  	// Map of tags assigned to the parameter group.
    58  	Tags map[string]string `pulumi:"tags"`
    59  }
    60  
    61  // A collection of values returned by getParameterGroup.
    62  type LookupParameterGroupResult struct {
    63  	// ARN of the parameter group.
    64  	Arn string `pulumi:"arn"`
    65  	// Description of the parameter group.
    66  	Description string `pulumi:"description"`
    67  	// Engine version that the parameter group can be used with.
    68  	Family string `pulumi:"family"`
    69  	// The provider-assigned unique ID for this managed resource.
    70  	Id string `pulumi:"id"`
    71  	// Name of the parameter.
    72  	Name string `pulumi:"name"`
    73  	// Set of user-defined MemoryDB parameters applied by the parameter group.
    74  	Parameters []GetParameterGroupParameter `pulumi:"parameters"`
    75  	// Map of tags assigned to the parameter group.
    76  	Tags map[string]string `pulumi:"tags"`
    77  }
    78  
    79  func LookupParameterGroupOutput(ctx *pulumi.Context, args LookupParameterGroupOutputArgs, opts ...pulumi.InvokeOption) LookupParameterGroupResultOutput {
    80  	return pulumi.ToOutputWithContext(context.Background(), args).
    81  		ApplyT(func(v interface{}) (LookupParameterGroupResult, error) {
    82  			args := v.(LookupParameterGroupArgs)
    83  			r, err := LookupParameterGroup(ctx, &args, opts...)
    84  			var s LookupParameterGroupResult
    85  			if r != nil {
    86  				s = *r
    87  			}
    88  			return s, err
    89  		}).(LookupParameterGroupResultOutput)
    90  }
    91  
    92  // A collection of arguments for invoking getParameterGroup.
    93  type LookupParameterGroupOutputArgs struct {
    94  	// Name of the parameter group.
    95  	Name pulumi.StringInput `pulumi:"name"`
    96  	// Map of tags assigned to the parameter group.
    97  	Tags pulumi.StringMapInput `pulumi:"tags"`
    98  }
    99  
   100  func (LookupParameterGroupOutputArgs) ElementType() reflect.Type {
   101  	return reflect.TypeOf((*LookupParameterGroupArgs)(nil)).Elem()
   102  }
   103  
   104  // A collection of values returned by getParameterGroup.
   105  type LookupParameterGroupResultOutput struct{ *pulumi.OutputState }
   106  
   107  func (LookupParameterGroupResultOutput) ElementType() reflect.Type {
   108  	return reflect.TypeOf((*LookupParameterGroupResult)(nil)).Elem()
   109  }
   110  
   111  func (o LookupParameterGroupResultOutput) ToLookupParameterGroupResultOutput() LookupParameterGroupResultOutput {
   112  	return o
   113  }
   114  
   115  func (o LookupParameterGroupResultOutput) ToLookupParameterGroupResultOutputWithContext(ctx context.Context) LookupParameterGroupResultOutput {
   116  	return o
   117  }
   118  
   119  // ARN of the parameter group.
   120  func (o LookupParameterGroupResultOutput) Arn() pulumi.StringOutput {
   121  	return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Arn }).(pulumi.StringOutput)
   122  }
   123  
   124  // Description of the parameter group.
   125  func (o LookupParameterGroupResultOutput) Description() pulumi.StringOutput {
   126  	return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Description }).(pulumi.StringOutput)
   127  }
   128  
   129  // Engine version that the parameter group can be used with.
   130  func (o LookupParameterGroupResultOutput) Family() pulumi.StringOutput {
   131  	return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Family }).(pulumi.StringOutput)
   132  }
   133  
   134  // The provider-assigned unique ID for this managed resource.
   135  func (o LookupParameterGroupResultOutput) Id() pulumi.StringOutput {
   136  	return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Id }).(pulumi.StringOutput)
   137  }
   138  
   139  // Name of the parameter.
   140  func (o LookupParameterGroupResultOutput) Name() pulumi.StringOutput {
   141  	return o.ApplyT(func(v LookupParameterGroupResult) string { return v.Name }).(pulumi.StringOutput)
   142  }
   143  
   144  // Set of user-defined MemoryDB parameters applied by the parameter group.
   145  func (o LookupParameterGroupResultOutput) Parameters() GetParameterGroupParameterArrayOutput {
   146  	return o.ApplyT(func(v LookupParameterGroupResult) []GetParameterGroupParameter { return v.Parameters }).(GetParameterGroupParameterArrayOutput)
   147  }
   148  
   149  // Map of tags assigned to the parameter group.
   150  func (o LookupParameterGroupResultOutput) Tags() pulumi.StringMapOutput {
   151  	return o.ApplyT(func(v LookupParameterGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   152  }
   153  
   154  func init() {
   155  	pulumi.RegisterOutputType(LookupParameterGroupResultOutput{})
   156  }