github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/neptune/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 neptune 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Manages a Neptune Parameter Group 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/neptune" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := neptune.NewParameterGroup(ctx, "example", &neptune.ParameterGroupArgs{ 33 // Family: pulumi.String("neptune1"), 34 // Name: pulumi.String("example"), 35 // Parameters: neptune.ParameterGroupParameterArray{ 36 // &neptune.ParameterGroupParameterArgs{ 37 // Name: pulumi.String("neptune_query_timeout"), 38 // Value: pulumi.String("25"), 39 // }, 40 // }, 41 // }) 42 // if err != nil { 43 // return err 44 // } 45 // return nil 46 // }) 47 // } 48 // 49 // ``` 50 // <!--End PulumiCodeChooser --> 51 // 52 // ## Import 53 // 54 // Using `pulumi import`, import Neptune Parameter Groups using the `name`. For example: 55 // 56 // ```sh 57 // $ pulumi import aws:neptune/parameterGroup:ParameterGroup some_pg some-pg 58 // ``` 59 type ParameterGroup struct { 60 pulumi.CustomResourceState 61 62 // The Neptune parameter group Amazon Resource Name (ARN). 63 Arn pulumi.StringOutput `pulumi:"arn"` 64 // The description of the Neptune parameter group. Defaults to "Managed by Pulumi". 65 Description pulumi.StringPtrOutput `pulumi:"description"` 66 // The family of the Neptune parameter group. 67 Family pulumi.StringOutput `pulumi:"family"` 68 // The name of the Neptune parameter. 69 Name pulumi.StringOutput `pulumi:"name"` 70 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 71 NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` 72 // A list of Neptune parameters to apply. 73 Parameters ParameterGroupParameterArrayOutput `pulumi:"parameters"` 74 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 75 Tags pulumi.StringMapOutput `pulumi:"tags"` 76 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 77 // 78 // Deprecated: Please use `tags` instead. 79 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 80 } 81 82 // NewParameterGroup registers a new resource with the given unique name, arguments, and options. 83 func NewParameterGroup(ctx *pulumi.Context, 84 name string, args *ParameterGroupArgs, opts ...pulumi.ResourceOption) (*ParameterGroup, error) { 85 if args == nil { 86 return nil, errors.New("missing one or more required arguments") 87 } 88 89 if args.Family == nil { 90 return nil, errors.New("invalid value for required argument 'Family'") 91 } 92 opts = internal.PkgResourceDefaultOpts(opts) 93 var resource ParameterGroup 94 err := ctx.RegisterResource("aws:neptune/parameterGroup:ParameterGroup", name, args, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // GetParameterGroup gets an existing ParameterGroup resource's state with the given name, ID, and optional 102 // state properties that are used to uniquely qualify the lookup (nil if not required). 103 func GetParameterGroup(ctx *pulumi.Context, 104 name string, id pulumi.IDInput, state *ParameterGroupState, opts ...pulumi.ResourceOption) (*ParameterGroup, error) { 105 var resource ParameterGroup 106 err := ctx.ReadResource("aws:neptune/parameterGroup:ParameterGroup", name, id, state, &resource, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return &resource, nil 111 } 112 113 // Input properties used for looking up and filtering ParameterGroup resources. 114 type parameterGroupState struct { 115 // The Neptune parameter group Amazon Resource Name (ARN). 116 Arn *string `pulumi:"arn"` 117 // The description of the Neptune parameter group. Defaults to "Managed by Pulumi". 118 Description *string `pulumi:"description"` 119 // The family of the Neptune parameter group. 120 Family *string `pulumi:"family"` 121 // The name of the Neptune parameter. 122 Name *string `pulumi:"name"` 123 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 124 NamePrefix *string `pulumi:"namePrefix"` 125 // A list of Neptune parameters to apply. 126 Parameters []ParameterGroupParameter `pulumi:"parameters"` 127 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 128 Tags map[string]string `pulumi:"tags"` 129 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 130 // 131 // Deprecated: Please use `tags` instead. 132 TagsAll map[string]string `pulumi:"tagsAll"` 133 } 134 135 type ParameterGroupState struct { 136 // The Neptune parameter group Amazon Resource Name (ARN). 137 Arn pulumi.StringPtrInput 138 // The description of the Neptune parameter group. Defaults to "Managed by Pulumi". 139 Description pulumi.StringPtrInput 140 // The family of the Neptune parameter group. 141 Family pulumi.StringPtrInput 142 // The name of the Neptune parameter. 143 Name pulumi.StringPtrInput 144 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 145 NamePrefix pulumi.StringPtrInput 146 // A list of Neptune parameters to apply. 147 Parameters ParameterGroupParameterArrayInput 148 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 149 Tags pulumi.StringMapInput 150 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 151 // 152 // Deprecated: Please use `tags` instead. 153 TagsAll pulumi.StringMapInput 154 } 155 156 func (ParameterGroupState) ElementType() reflect.Type { 157 return reflect.TypeOf((*parameterGroupState)(nil)).Elem() 158 } 159 160 type parameterGroupArgs struct { 161 // The description of the Neptune parameter group. Defaults to "Managed by Pulumi". 162 Description *string `pulumi:"description"` 163 // The family of the Neptune parameter group. 164 Family string `pulumi:"family"` 165 // The name of the Neptune parameter. 166 Name *string `pulumi:"name"` 167 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 168 NamePrefix *string `pulumi:"namePrefix"` 169 // A list of Neptune parameters to apply. 170 Parameters []ParameterGroupParameter `pulumi:"parameters"` 171 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 172 Tags map[string]string `pulumi:"tags"` 173 } 174 175 // The set of arguments for constructing a ParameterGroup resource. 176 type ParameterGroupArgs struct { 177 // The description of the Neptune parameter group. Defaults to "Managed by Pulumi". 178 Description pulumi.StringPtrInput 179 // The family of the Neptune parameter group. 180 Family pulumi.StringInput 181 // The name of the Neptune parameter. 182 Name pulumi.StringPtrInput 183 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 184 NamePrefix pulumi.StringPtrInput 185 // A list of Neptune parameters to apply. 186 Parameters ParameterGroupParameterArrayInput 187 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 188 Tags pulumi.StringMapInput 189 } 190 191 func (ParameterGroupArgs) ElementType() reflect.Type { 192 return reflect.TypeOf((*parameterGroupArgs)(nil)).Elem() 193 } 194 195 type ParameterGroupInput interface { 196 pulumi.Input 197 198 ToParameterGroupOutput() ParameterGroupOutput 199 ToParameterGroupOutputWithContext(ctx context.Context) ParameterGroupOutput 200 } 201 202 func (*ParameterGroup) ElementType() reflect.Type { 203 return reflect.TypeOf((**ParameterGroup)(nil)).Elem() 204 } 205 206 func (i *ParameterGroup) ToParameterGroupOutput() ParameterGroupOutput { 207 return i.ToParameterGroupOutputWithContext(context.Background()) 208 } 209 210 func (i *ParameterGroup) ToParameterGroupOutputWithContext(ctx context.Context) ParameterGroupOutput { 211 return pulumi.ToOutputWithContext(ctx, i).(ParameterGroupOutput) 212 } 213 214 // ParameterGroupArrayInput is an input type that accepts ParameterGroupArray and ParameterGroupArrayOutput values. 215 // You can construct a concrete instance of `ParameterGroupArrayInput` via: 216 // 217 // ParameterGroupArray{ ParameterGroupArgs{...} } 218 type ParameterGroupArrayInput interface { 219 pulumi.Input 220 221 ToParameterGroupArrayOutput() ParameterGroupArrayOutput 222 ToParameterGroupArrayOutputWithContext(context.Context) ParameterGroupArrayOutput 223 } 224 225 type ParameterGroupArray []ParameterGroupInput 226 227 func (ParameterGroupArray) ElementType() reflect.Type { 228 return reflect.TypeOf((*[]*ParameterGroup)(nil)).Elem() 229 } 230 231 func (i ParameterGroupArray) ToParameterGroupArrayOutput() ParameterGroupArrayOutput { 232 return i.ToParameterGroupArrayOutputWithContext(context.Background()) 233 } 234 235 func (i ParameterGroupArray) ToParameterGroupArrayOutputWithContext(ctx context.Context) ParameterGroupArrayOutput { 236 return pulumi.ToOutputWithContext(ctx, i).(ParameterGroupArrayOutput) 237 } 238 239 // ParameterGroupMapInput is an input type that accepts ParameterGroupMap and ParameterGroupMapOutput values. 240 // You can construct a concrete instance of `ParameterGroupMapInput` via: 241 // 242 // ParameterGroupMap{ "key": ParameterGroupArgs{...} } 243 type ParameterGroupMapInput interface { 244 pulumi.Input 245 246 ToParameterGroupMapOutput() ParameterGroupMapOutput 247 ToParameterGroupMapOutputWithContext(context.Context) ParameterGroupMapOutput 248 } 249 250 type ParameterGroupMap map[string]ParameterGroupInput 251 252 func (ParameterGroupMap) ElementType() reflect.Type { 253 return reflect.TypeOf((*map[string]*ParameterGroup)(nil)).Elem() 254 } 255 256 func (i ParameterGroupMap) ToParameterGroupMapOutput() ParameterGroupMapOutput { 257 return i.ToParameterGroupMapOutputWithContext(context.Background()) 258 } 259 260 func (i ParameterGroupMap) ToParameterGroupMapOutputWithContext(ctx context.Context) ParameterGroupMapOutput { 261 return pulumi.ToOutputWithContext(ctx, i).(ParameterGroupMapOutput) 262 } 263 264 type ParameterGroupOutput struct{ *pulumi.OutputState } 265 266 func (ParameterGroupOutput) ElementType() reflect.Type { 267 return reflect.TypeOf((**ParameterGroup)(nil)).Elem() 268 } 269 270 func (o ParameterGroupOutput) ToParameterGroupOutput() ParameterGroupOutput { 271 return o 272 } 273 274 func (o ParameterGroupOutput) ToParameterGroupOutputWithContext(ctx context.Context) ParameterGroupOutput { 275 return o 276 } 277 278 // The Neptune parameter group Amazon Resource Name (ARN). 279 func (o ParameterGroupOutput) Arn() pulumi.StringOutput { 280 return o.ApplyT(func(v *ParameterGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 281 } 282 283 // The description of the Neptune parameter group. Defaults to "Managed by Pulumi". 284 func (o ParameterGroupOutput) Description() pulumi.StringPtrOutput { 285 return o.ApplyT(func(v *ParameterGroup) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 286 } 287 288 // The family of the Neptune parameter group. 289 func (o ParameterGroupOutput) Family() pulumi.StringOutput { 290 return o.ApplyT(func(v *ParameterGroup) pulumi.StringOutput { return v.Family }).(pulumi.StringOutput) 291 } 292 293 // The name of the Neptune parameter. 294 func (o ParameterGroupOutput) Name() pulumi.StringOutput { 295 return o.ApplyT(func(v *ParameterGroup) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 296 } 297 298 // Creates a unique name beginning with the specified prefix. Conflicts with `name`. 299 func (o ParameterGroupOutput) NamePrefix() pulumi.StringOutput { 300 return o.ApplyT(func(v *ParameterGroup) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput) 301 } 302 303 // A list of Neptune parameters to apply. 304 func (o ParameterGroupOutput) Parameters() ParameterGroupParameterArrayOutput { 305 return o.ApplyT(func(v *ParameterGroup) ParameterGroupParameterArrayOutput { return v.Parameters }).(ParameterGroupParameterArrayOutput) 306 } 307 308 // A map of tags to assign to the resource. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 309 func (o ParameterGroupOutput) Tags() pulumi.StringMapOutput { 310 return o.ApplyT(func(v *ParameterGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 311 } 312 313 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 314 // 315 // Deprecated: Please use `tags` instead. 316 func (o ParameterGroupOutput) TagsAll() pulumi.StringMapOutput { 317 return o.ApplyT(func(v *ParameterGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 318 } 319 320 type ParameterGroupArrayOutput struct{ *pulumi.OutputState } 321 322 func (ParameterGroupArrayOutput) ElementType() reflect.Type { 323 return reflect.TypeOf((*[]*ParameterGroup)(nil)).Elem() 324 } 325 326 func (o ParameterGroupArrayOutput) ToParameterGroupArrayOutput() ParameterGroupArrayOutput { 327 return o 328 } 329 330 func (o ParameterGroupArrayOutput) ToParameterGroupArrayOutputWithContext(ctx context.Context) ParameterGroupArrayOutput { 331 return o 332 } 333 334 func (o ParameterGroupArrayOutput) Index(i pulumi.IntInput) ParameterGroupOutput { 335 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ParameterGroup { 336 return vs[0].([]*ParameterGroup)[vs[1].(int)] 337 }).(ParameterGroupOutput) 338 } 339 340 type ParameterGroupMapOutput struct{ *pulumi.OutputState } 341 342 func (ParameterGroupMapOutput) ElementType() reflect.Type { 343 return reflect.TypeOf((*map[string]*ParameterGroup)(nil)).Elem() 344 } 345 346 func (o ParameterGroupMapOutput) ToParameterGroupMapOutput() ParameterGroupMapOutput { 347 return o 348 } 349 350 func (o ParameterGroupMapOutput) ToParameterGroupMapOutputWithContext(ctx context.Context) ParameterGroupMapOutput { 351 return o 352 } 353 354 func (o ParameterGroupMapOutput) MapIndex(k pulumi.StringInput) ParameterGroupOutput { 355 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ParameterGroup { 356 return vs[0].(map[string]*ParameterGroup)[vs[1].(string)] 357 }).(ParameterGroupOutput) 358 } 359 360 func init() { 361 pulumi.RegisterInputType(reflect.TypeOf((*ParameterGroupInput)(nil)).Elem(), &ParameterGroup{}) 362 pulumi.RegisterInputType(reflect.TypeOf((*ParameterGroupArrayInput)(nil)).Elem(), ParameterGroupArray{}) 363 pulumi.RegisterInputType(reflect.TypeOf((*ParameterGroupMapInput)(nil)).Elem(), ParameterGroupMap{}) 364 pulumi.RegisterOutputType(ParameterGroupOutput{}) 365 pulumi.RegisterOutputType(ParameterGroupArrayOutput{}) 366 pulumi.RegisterOutputType(ParameterGroupMapOutput{}) 367 }