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