github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/dax/parameterGroup.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 dax 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 a DAX Parameter Group resource. 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/dax" 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 := dax.NewParameterGroup(ctx, "example", &dax.ParameterGroupArgs{ 32 // Name: pulumi.String("example"), 33 // Parameters: dax.ParameterGroupParameterArray{ 34 // &dax.ParameterGroupParameterArgs{ 35 // Name: pulumi.String("query-ttl-millis"), 36 // Value: pulumi.String("100000"), 37 // }, 38 // &dax.ParameterGroupParameterArgs{ 39 // Name: pulumi.String("record-ttl-millis"), 40 // Value: pulumi.String("100000"), 41 // }, 42 // }, 43 // }) 44 // if err != nil { 45 // return err 46 // } 47 // return nil 48 // }) 49 // } 50 // 51 // ``` 52 // <!--End PulumiCodeChooser --> 53 // 54 // ## Import 55 // 56 // Using `pulumi import`, import DAX Parameter Group using the `name`. For example: 57 // 58 // ```sh 59 // $ pulumi import aws:dax/parameterGroup:ParameterGroup example my_dax_pg 60 // ``` 61 type ParameterGroup struct { 62 pulumi.CustomResourceState 63 64 // A description of the parameter group. 65 Description pulumi.StringPtrOutput `pulumi:"description"` 66 // The name of the parameter group. 67 Name pulumi.StringOutput `pulumi:"name"` 68 // The parameters of the parameter group. 69 Parameters ParameterGroupParameterArrayOutput `pulumi:"parameters"` 70 } 71 72 // NewParameterGroup registers a new resource with the given unique name, arguments, and options. 73 func NewParameterGroup(ctx *pulumi.Context, 74 name string, args *ParameterGroupArgs, opts ...pulumi.ResourceOption) (*ParameterGroup, error) { 75 if args == nil { 76 args = &ParameterGroupArgs{} 77 } 78 79 opts = internal.PkgResourceDefaultOpts(opts) 80 var resource ParameterGroup 81 err := ctx.RegisterResource("aws:dax/parameterGroup:ParameterGroup", name, args, &resource, opts...) 82 if err != nil { 83 return nil, err 84 } 85 return &resource, nil 86 } 87 88 // GetParameterGroup gets an existing ParameterGroup resource's state with the given name, ID, and optional 89 // state properties that are used to uniquely qualify the lookup (nil if not required). 90 func GetParameterGroup(ctx *pulumi.Context, 91 name string, id pulumi.IDInput, state *ParameterGroupState, opts ...pulumi.ResourceOption) (*ParameterGroup, error) { 92 var resource ParameterGroup 93 err := ctx.ReadResource("aws:dax/parameterGroup:ParameterGroup", name, id, state, &resource, opts...) 94 if err != nil { 95 return nil, err 96 } 97 return &resource, nil 98 } 99 100 // Input properties used for looking up and filtering ParameterGroup resources. 101 type parameterGroupState struct { 102 // A description of the parameter group. 103 Description *string `pulumi:"description"` 104 // The name of the parameter group. 105 Name *string `pulumi:"name"` 106 // The parameters of the parameter group. 107 Parameters []ParameterGroupParameter `pulumi:"parameters"` 108 } 109 110 type ParameterGroupState struct { 111 // A description of the parameter group. 112 Description pulumi.StringPtrInput 113 // The name of the parameter group. 114 Name pulumi.StringPtrInput 115 // The parameters of the parameter group. 116 Parameters ParameterGroupParameterArrayInput 117 } 118 119 func (ParameterGroupState) ElementType() reflect.Type { 120 return reflect.TypeOf((*parameterGroupState)(nil)).Elem() 121 } 122 123 type parameterGroupArgs struct { 124 // A description of the parameter group. 125 Description *string `pulumi:"description"` 126 // The name of the parameter group. 127 Name *string `pulumi:"name"` 128 // The parameters of the parameter group. 129 Parameters []ParameterGroupParameter `pulumi:"parameters"` 130 } 131 132 // The set of arguments for constructing a ParameterGroup resource. 133 type ParameterGroupArgs struct { 134 // A description of the parameter group. 135 Description pulumi.StringPtrInput 136 // The name of the parameter group. 137 Name pulumi.StringPtrInput 138 // The parameters of the parameter group. 139 Parameters ParameterGroupParameterArrayInput 140 } 141 142 func (ParameterGroupArgs) ElementType() reflect.Type { 143 return reflect.TypeOf((*parameterGroupArgs)(nil)).Elem() 144 } 145 146 type ParameterGroupInput interface { 147 pulumi.Input 148 149 ToParameterGroupOutput() ParameterGroupOutput 150 ToParameterGroupOutputWithContext(ctx context.Context) ParameterGroupOutput 151 } 152 153 func (*ParameterGroup) ElementType() reflect.Type { 154 return reflect.TypeOf((**ParameterGroup)(nil)).Elem() 155 } 156 157 func (i *ParameterGroup) ToParameterGroupOutput() ParameterGroupOutput { 158 return i.ToParameterGroupOutputWithContext(context.Background()) 159 } 160 161 func (i *ParameterGroup) ToParameterGroupOutputWithContext(ctx context.Context) ParameterGroupOutput { 162 return pulumi.ToOutputWithContext(ctx, i).(ParameterGroupOutput) 163 } 164 165 // ParameterGroupArrayInput is an input type that accepts ParameterGroupArray and ParameterGroupArrayOutput values. 166 // You can construct a concrete instance of `ParameterGroupArrayInput` via: 167 // 168 // ParameterGroupArray{ ParameterGroupArgs{...} } 169 type ParameterGroupArrayInput interface { 170 pulumi.Input 171 172 ToParameterGroupArrayOutput() ParameterGroupArrayOutput 173 ToParameterGroupArrayOutputWithContext(context.Context) ParameterGroupArrayOutput 174 } 175 176 type ParameterGroupArray []ParameterGroupInput 177 178 func (ParameterGroupArray) ElementType() reflect.Type { 179 return reflect.TypeOf((*[]*ParameterGroup)(nil)).Elem() 180 } 181 182 func (i ParameterGroupArray) ToParameterGroupArrayOutput() ParameterGroupArrayOutput { 183 return i.ToParameterGroupArrayOutputWithContext(context.Background()) 184 } 185 186 func (i ParameterGroupArray) ToParameterGroupArrayOutputWithContext(ctx context.Context) ParameterGroupArrayOutput { 187 return pulumi.ToOutputWithContext(ctx, i).(ParameterGroupArrayOutput) 188 } 189 190 // ParameterGroupMapInput is an input type that accepts ParameterGroupMap and ParameterGroupMapOutput values. 191 // You can construct a concrete instance of `ParameterGroupMapInput` via: 192 // 193 // ParameterGroupMap{ "key": ParameterGroupArgs{...} } 194 type ParameterGroupMapInput interface { 195 pulumi.Input 196 197 ToParameterGroupMapOutput() ParameterGroupMapOutput 198 ToParameterGroupMapOutputWithContext(context.Context) ParameterGroupMapOutput 199 } 200 201 type ParameterGroupMap map[string]ParameterGroupInput 202 203 func (ParameterGroupMap) ElementType() reflect.Type { 204 return reflect.TypeOf((*map[string]*ParameterGroup)(nil)).Elem() 205 } 206 207 func (i ParameterGroupMap) ToParameterGroupMapOutput() ParameterGroupMapOutput { 208 return i.ToParameterGroupMapOutputWithContext(context.Background()) 209 } 210 211 func (i ParameterGroupMap) ToParameterGroupMapOutputWithContext(ctx context.Context) ParameterGroupMapOutput { 212 return pulumi.ToOutputWithContext(ctx, i).(ParameterGroupMapOutput) 213 } 214 215 type ParameterGroupOutput struct{ *pulumi.OutputState } 216 217 func (ParameterGroupOutput) ElementType() reflect.Type { 218 return reflect.TypeOf((**ParameterGroup)(nil)).Elem() 219 } 220 221 func (o ParameterGroupOutput) ToParameterGroupOutput() ParameterGroupOutput { 222 return o 223 } 224 225 func (o ParameterGroupOutput) ToParameterGroupOutputWithContext(ctx context.Context) ParameterGroupOutput { 226 return o 227 } 228 229 // A description of the parameter group. 230 func (o ParameterGroupOutput) Description() pulumi.StringPtrOutput { 231 return o.ApplyT(func(v *ParameterGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 232 } 233 234 // The name of the parameter group. 235 func (o ParameterGroupOutput) Name() pulumi.StringOutput { 236 return o.ApplyT(func(v *ParameterGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 237 } 238 239 // The parameters of the parameter group. 240 func (o ParameterGroupOutput) Parameters() ParameterGroupParameterArrayOutput { 241 return o.ApplyT(func(v *ParameterGroup) ParameterGroupParameterArrayOutput { return v.Parameters }).(ParameterGroupParameterArrayOutput) 242 } 243 244 type ParameterGroupArrayOutput struct{ *pulumi.OutputState } 245 246 func (ParameterGroupArrayOutput) ElementType() reflect.Type { 247 return reflect.TypeOf((*[]*ParameterGroup)(nil)).Elem() 248 } 249 250 func (o ParameterGroupArrayOutput) ToParameterGroupArrayOutput() ParameterGroupArrayOutput { 251 return o 252 } 253 254 func (o ParameterGroupArrayOutput) ToParameterGroupArrayOutputWithContext(ctx context.Context) ParameterGroupArrayOutput { 255 return o 256 } 257 258 func (o ParameterGroupArrayOutput) Index(i pulumi.IntInput) ParameterGroupOutput { 259 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ParameterGroup { 260 return vs[0].([]*ParameterGroup)[vs[1].(int)] 261 }).(ParameterGroupOutput) 262 } 263 264 type ParameterGroupMapOutput struct{ *pulumi.OutputState } 265 266 func (ParameterGroupMapOutput) ElementType() reflect.Type { 267 return reflect.TypeOf((*map[string]*ParameterGroup)(nil)).Elem() 268 } 269 270 func (o ParameterGroupMapOutput) ToParameterGroupMapOutput() ParameterGroupMapOutput { 271 return o 272 } 273 274 func (o ParameterGroupMapOutput) ToParameterGroupMapOutputWithContext(ctx context.Context) ParameterGroupMapOutput { 275 return o 276 } 277 278 func (o ParameterGroupMapOutput) MapIndex(k pulumi.StringInput) ParameterGroupOutput { 279 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ParameterGroup { 280 return vs[0].(map[string]*ParameterGroup)[vs[1].(string)] 281 }).(ParameterGroupOutput) 282 } 283 284 func init() { 285 pulumi.RegisterInputType(reflect.TypeOf((*ParameterGroupInput)(nil)).Elem(), &ParameterGroup{}) 286 pulumi.RegisterInputType(reflect.TypeOf((*ParameterGroupArrayInput)(nil)).Elem(), ParameterGroupArray{}) 287 pulumi.RegisterInputType(reflect.TypeOf((*ParameterGroupMapInput)(nil)).Elem(), ParameterGroupMap{}) 288 pulumi.RegisterOutputType(ParameterGroupOutput{}) 289 pulumi.RegisterOutputType(ParameterGroupArrayOutput{}) 290 pulumi.RegisterOutputType(ParameterGroupMapOutput{}) 291 }