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