github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/mq/configuration.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 mq 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 MQ Configuration Resource. 16 // 17 // For more information on Amazon MQ, see [Amazon MQ documentation](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/welcome.html). 18 // 19 // ## Example Usage 20 // 21 // ### ActiveMQ 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mq" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // _, err := mq.NewConfiguration(ctx, "example", &mq.ConfigurationArgs{ 37 // Description: pulumi.String("Example Configuration"), 38 // Name: pulumi.String("example"), 39 // EngineType: pulumi.String("ActiveMQ"), 40 // EngineVersion: pulumi.String("5.17.6"), 41 // Data: pulumi.String(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 42 // 43 // <broker xmlns="http://activemq.apache.org/schema/core"> 44 // 45 // <plugins> 46 // <forcePersistencyModeBrokerPlugin persistenceFlag="true"/> 47 // <statisticsBrokerPlugin/> 48 // <timeStampingBrokerPlugin ttlCeiling="86400000" zeroExpirationOverride="86400000"/> 49 // </plugins> 50 // 51 // </broker> 52 // `), 53 // 54 // }) 55 // if err != nil { 56 // return err 57 // } 58 // return nil 59 // }) 60 // } 61 // 62 // ``` 63 // <!--End PulumiCodeChooser --> 64 // 65 // ### RabbitMQ 66 // 67 // <!--Start PulumiCodeChooser --> 68 // ```go 69 // package main 70 // 71 // import ( 72 // 73 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/mq" 74 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 75 // 76 // ) 77 // 78 // func main() { 79 // pulumi.Run(func(ctx *pulumi.Context) error { 80 // _, err := mq.NewConfiguration(ctx, "example", &mq.ConfigurationArgs{ 81 // Description: pulumi.String("Example Configuration"), 82 // Name: pulumi.String("example"), 83 // EngineType: pulumi.String("RabbitMQ"), 84 // EngineVersion: pulumi.String("3.11.20"), 85 // Data: pulumi.String("# Default RabbitMQ delivery acknowledgement timeout is 30 minutes in milliseconds\nconsumer_timeout = 1800000\n"), 86 // }) 87 // if err != nil { 88 // return err 89 // } 90 // return nil 91 // }) 92 // } 93 // 94 // ``` 95 // <!--End PulumiCodeChooser --> 96 // 97 // ## Import 98 // 99 // Using `pulumi import`, import MQ Configurations using the configuration ID. For example: 100 // 101 // ```sh 102 // $ pulumi import aws:mq/configuration:Configuration example c-0187d1eb-88c8-475a-9b79-16ef5a10c94f 103 // ``` 104 type Configuration struct { 105 pulumi.CustomResourceState 106 107 // ARN of the configuration. 108 Arn pulumi.StringOutput `pulumi:"arn"` 109 // Authentication strategy associated with the configuration. Valid values are `simple` and `ldap`. `ldap` is not supported for `engineType` `RabbitMQ`. 110 AuthenticationStrategy pulumi.StringOutput `pulumi:"authenticationStrategy"` 111 // Broker configuration in XML format for `ActiveMQ` or [Cuttlefish](https://github.com/Kyorai/cuttlefish) format for `RabbitMQ`. See [official docs](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/amazon-mq-broker-configuration-parameters.html) for supported parameters and format of the XML. 112 Data pulumi.StringOutput `pulumi:"data"` 113 // Description of the configuration. 114 Description pulumi.StringPtrOutput `pulumi:"description"` 115 // Type of broker engine. Valid values are `ActiveMQ` and `RabbitMQ`. 116 EngineType pulumi.StringOutput `pulumi:"engineType"` 117 // Version of the broker engine. 118 EngineVersion pulumi.StringOutput `pulumi:"engineVersion"` 119 // Latest revision of the configuration. 120 LatestRevision pulumi.IntOutput `pulumi:"latestRevision"` 121 // Name of the configuration. 122 // 123 // The following arguments are optional: 124 Name pulumi.StringOutput `pulumi:"name"` 125 // 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. 126 Tags pulumi.StringMapOutput `pulumi:"tags"` 127 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 128 // 129 // Deprecated: Please use `tags` instead. 130 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 131 } 132 133 // NewConfiguration registers a new resource with the given unique name, arguments, and options. 134 func NewConfiguration(ctx *pulumi.Context, 135 name string, args *ConfigurationArgs, opts ...pulumi.ResourceOption) (*Configuration, error) { 136 if args == nil { 137 return nil, errors.New("missing one or more required arguments") 138 } 139 140 if args.Data == nil { 141 return nil, errors.New("invalid value for required argument 'Data'") 142 } 143 if args.EngineType == nil { 144 return nil, errors.New("invalid value for required argument 'EngineType'") 145 } 146 if args.EngineVersion == nil { 147 return nil, errors.New("invalid value for required argument 'EngineVersion'") 148 } 149 opts = internal.PkgResourceDefaultOpts(opts) 150 var resource Configuration 151 err := ctx.RegisterResource("aws:mq/configuration:Configuration", name, args, &resource, opts...) 152 if err != nil { 153 return nil, err 154 } 155 return &resource, nil 156 } 157 158 // GetConfiguration gets an existing Configuration resource's state with the given name, ID, and optional 159 // state properties that are used to uniquely qualify the lookup (nil if not required). 160 func GetConfiguration(ctx *pulumi.Context, 161 name string, id pulumi.IDInput, state *ConfigurationState, opts ...pulumi.ResourceOption) (*Configuration, error) { 162 var resource Configuration 163 err := ctx.ReadResource("aws:mq/configuration:Configuration", name, id, state, &resource, opts...) 164 if err != nil { 165 return nil, err 166 } 167 return &resource, nil 168 } 169 170 // Input properties used for looking up and filtering Configuration resources. 171 type configurationState struct { 172 // ARN of the configuration. 173 Arn *string `pulumi:"arn"` 174 // Authentication strategy associated with the configuration. Valid values are `simple` and `ldap`. `ldap` is not supported for `engineType` `RabbitMQ`. 175 AuthenticationStrategy *string `pulumi:"authenticationStrategy"` 176 // Broker configuration in XML format for `ActiveMQ` or [Cuttlefish](https://github.com/Kyorai/cuttlefish) format for `RabbitMQ`. See [official docs](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/amazon-mq-broker-configuration-parameters.html) for supported parameters and format of the XML. 177 Data *string `pulumi:"data"` 178 // Description of the configuration. 179 Description *string `pulumi:"description"` 180 // Type of broker engine. Valid values are `ActiveMQ` and `RabbitMQ`. 181 EngineType *string `pulumi:"engineType"` 182 // Version of the broker engine. 183 EngineVersion *string `pulumi:"engineVersion"` 184 // Latest revision of the configuration. 185 LatestRevision *int `pulumi:"latestRevision"` 186 // Name of the configuration. 187 // 188 // The following arguments are optional: 189 Name *string `pulumi:"name"` 190 // 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. 191 Tags map[string]string `pulumi:"tags"` 192 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 193 // 194 // Deprecated: Please use `tags` instead. 195 TagsAll map[string]string `pulumi:"tagsAll"` 196 } 197 198 type ConfigurationState struct { 199 // ARN of the configuration. 200 Arn pulumi.StringPtrInput 201 // Authentication strategy associated with the configuration. Valid values are `simple` and `ldap`. `ldap` is not supported for `engineType` `RabbitMQ`. 202 AuthenticationStrategy pulumi.StringPtrInput 203 // Broker configuration in XML format for `ActiveMQ` or [Cuttlefish](https://github.com/Kyorai/cuttlefish) format for `RabbitMQ`. See [official docs](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/amazon-mq-broker-configuration-parameters.html) for supported parameters and format of the XML. 204 Data pulumi.StringPtrInput 205 // Description of the configuration. 206 Description pulumi.StringPtrInput 207 // Type of broker engine. Valid values are `ActiveMQ` and `RabbitMQ`. 208 EngineType pulumi.StringPtrInput 209 // Version of the broker engine. 210 EngineVersion pulumi.StringPtrInput 211 // Latest revision of the configuration. 212 LatestRevision pulumi.IntPtrInput 213 // Name of the configuration. 214 // 215 // The following arguments are optional: 216 Name pulumi.StringPtrInput 217 // 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. 218 Tags pulumi.StringMapInput 219 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 220 // 221 // Deprecated: Please use `tags` instead. 222 TagsAll pulumi.StringMapInput 223 } 224 225 func (ConfigurationState) ElementType() reflect.Type { 226 return reflect.TypeOf((*configurationState)(nil)).Elem() 227 } 228 229 type configurationArgs struct { 230 // Authentication strategy associated with the configuration. Valid values are `simple` and `ldap`. `ldap` is not supported for `engineType` `RabbitMQ`. 231 AuthenticationStrategy *string `pulumi:"authenticationStrategy"` 232 // Broker configuration in XML format for `ActiveMQ` or [Cuttlefish](https://github.com/Kyorai/cuttlefish) format for `RabbitMQ`. See [official docs](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/amazon-mq-broker-configuration-parameters.html) for supported parameters and format of the XML. 233 Data string `pulumi:"data"` 234 // Description of the configuration. 235 Description *string `pulumi:"description"` 236 // Type of broker engine. Valid values are `ActiveMQ` and `RabbitMQ`. 237 EngineType string `pulumi:"engineType"` 238 // Version of the broker engine. 239 EngineVersion string `pulumi:"engineVersion"` 240 // Name of the configuration. 241 // 242 // The following arguments are optional: 243 Name *string `pulumi:"name"` 244 // 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. 245 Tags map[string]string `pulumi:"tags"` 246 } 247 248 // The set of arguments for constructing a Configuration resource. 249 type ConfigurationArgs struct { 250 // Authentication strategy associated with the configuration. Valid values are `simple` and `ldap`. `ldap` is not supported for `engineType` `RabbitMQ`. 251 AuthenticationStrategy pulumi.StringPtrInput 252 // Broker configuration in XML format for `ActiveMQ` or [Cuttlefish](https://github.com/Kyorai/cuttlefish) format for `RabbitMQ`. See [official docs](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/amazon-mq-broker-configuration-parameters.html) for supported parameters and format of the XML. 253 Data pulumi.StringInput 254 // Description of the configuration. 255 Description pulumi.StringPtrInput 256 // Type of broker engine. Valid values are `ActiveMQ` and `RabbitMQ`. 257 EngineType pulumi.StringInput 258 // Version of the broker engine. 259 EngineVersion pulumi.StringInput 260 // Name of the configuration. 261 // 262 // The following arguments are optional: 263 Name pulumi.StringPtrInput 264 // 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. 265 Tags pulumi.StringMapInput 266 } 267 268 func (ConfigurationArgs) ElementType() reflect.Type { 269 return reflect.TypeOf((*configurationArgs)(nil)).Elem() 270 } 271 272 type ConfigurationInput interface { 273 pulumi.Input 274 275 ToConfigurationOutput() ConfigurationOutput 276 ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput 277 } 278 279 func (*Configuration) ElementType() reflect.Type { 280 return reflect.TypeOf((**Configuration)(nil)).Elem() 281 } 282 283 func (i *Configuration) ToConfigurationOutput() ConfigurationOutput { 284 return i.ToConfigurationOutputWithContext(context.Background()) 285 } 286 287 func (i *Configuration) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput { 288 return pulumi.ToOutputWithContext(ctx, i).(ConfigurationOutput) 289 } 290 291 // ConfigurationArrayInput is an input type that accepts ConfigurationArray and ConfigurationArrayOutput values. 292 // You can construct a concrete instance of `ConfigurationArrayInput` via: 293 // 294 // ConfigurationArray{ ConfigurationArgs{...} } 295 type ConfigurationArrayInput interface { 296 pulumi.Input 297 298 ToConfigurationArrayOutput() ConfigurationArrayOutput 299 ToConfigurationArrayOutputWithContext(context.Context) ConfigurationArrayOutput 300 } 301 302 type ConfigurationArray []ConfigurationInput 303 304 func (ConfigurationArray) ElementType() reflect.Type { 305 return reflect.TypeOf((*[]*Configuration)(nil)).Elem() 306 } 307 308 func (i ConfigurationArray) ToConfigurationArrayOutput() ConfigurationArrayOutput { 309 return i.ToConfigurationArrayOutputWithContext(context.Background()) 310 } 311 312 func (i ConfigurationArray) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput { 313 return pulumi.ToOutputWithContext(ctx, i).(ConfigurationArrayOutput) 314 } 315 316 // ConfigurationMapInput is an input type that accepts ConfigurationMap and ConfigurationMapOutput values. 317 // You can construct a concrete instance of `ConfigurationMapInput` via: 318 // 319 // ConfigurationMap{ "key": ConfigurationArgs{...} } 320 type ConfigurationMapInput interface { 321 pulumi.Input 322 323 ToConfigurationMapOutput() ConfigurationMapOutput 324 ToConfigurationMapOutputWithContext(context.Context) ConfigurationMapOutput 325 } 326 327 type ConfigurationMap map[string]ConfigurationInput 328 329 func (ConfigurationMap) ElementType() reflect.Type { 330 return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem() 331 } 332 333 func (i ConfigurationMap) ToConfigurationMapOutput() ConfigurationMapOutput { 334 return i.ToConfigurationMapOutputWithContext(context.Background()) 335 } 336 337 func (i ConfigurationMap) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput { 338 return pulumi.ToOutputWithContext(ctx, i).(ConfigurationMapOutput) 339 } 340 341 type ConfigurationOutput struct{ *pulumi.OutputState } 342 343 func (ConfigurationOutput) ElementType() reflect.Type { 344 return reflect.TypeOf((**Configuration)(nil)).Elem() 345 } 346 347 func (o ConfigurationOutput) ToConfigurationOutput() ConfigurationOutput { 348 return o 349 } 350 351 func (o ConfigurationOutput) ToConfigurationOutputWithContext(ctx context.Context) ConfigurationOutput { 352 return o 353 } 354 355 // ARN of the configuration. 356 func (o ConfigurationOutput) Arn() pulumi.StringOutput { 357 return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 358 } 359 360 // Authentication strategy associated with the configuration. Valid values are `simple` and `ldap`. `ldap` is not supported for `engineType` `RabbitMQ`. 361 func (o ConfigurationOutput) AuthenticationStrategy() pulumi.StringOutput { 362 return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.AuthenticationStrategy }).(pulumi.StringOutput) 363 } 364 365 // Broker configuration in XML format for `ActiveMQ` or [Cuttlefish](https://github.com/Kyorai/cuttlefish) format for `RabbitMQ`. See [official docs](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/amazon-mq-broker-configuration-parameters.html) for supported parameters and format of the XML. 366 func (o ConfigurationOutput) Data() pulumi.StringOutput { 367 return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Data }).(pulumi.StringOutput) 368 } 369 370 // Description of the configuration. 371 func (o ConfigurationOutput) Description() pulumi.StringPtrOutput { 372 return o.ApplyT(func(v *Configuration) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 373 } 374 375 // Type of broker engine. Valid values are `ActiveMQ` and `RabbitMQ`. 376 func (o ConfigurationOutput) EngineType() pulumi.StringOutput { 377 return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.EngineType }).(pulumi.StringOutput) 378 } 379 380 // Version of the broker engine. 381 func (o ConfigurationOutput) EngineVersion() pulumi.StringOutput { 382 return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.EngineVersion }).(pulumi.StringOutput) 383 } 384 385 // Latest revision of the configuration. 386 func (o ConfigurationOutput) LatestRevision() pulumi.IntOutput { 387 return o.ApplyT(func(v *Configuration) pulumi.IntOutput { return v.LatestRevision }).(pulumi.IntOutput) 388 } 389 390 // Name of the configuration. 391 // 392 // The following arguments are optional: 393 func (o ConfigurationOutput) Name() pulumi.StringOutput { 394 return o.ApplyT(func(v *Configuration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 395 } 396 397 // 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. 398 func (o ConfigurationOutput) Tags() pulumi.StringMapOutput { 399 return o.ApplyT(func(v *Configuration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 400 } 401 402 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 403 // 404 // Deprecated: Please use `tags` instead. 405 func (o ConfigurationOutput) TagsAll() pulumi.StringMapOutput { 406 return o.ApplyT(func(v *Configuration) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 407 } 408 409 type ConfigurationArrayOutput struct{ *pulumi.OutputState } 410 411 func (ConfigurationArrayOutput) ElementType() reflect.Type { 412 return reflect.TypeOf((*[]*Configuration)(nil)).Elem() 413 } 414 415 func (o ConfigurationArrayOutput) ToConfigurationArrayOutput() ConfigurationArrayOutput { 416 return o 417 } 418 419 func (o ConfigurationArrayOutput) ToConfigurationArrayOutputWithContext(ctx context.Context) ConfigurationArrayOutput { 420 return o 421 } 422 423 func (o ConfigurationArrayOutput) Index(i pulumi.IntInput) ConfigurationOutput { 424 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Configuration { 425 return vs[0].([]*Configuration)[vs[1].(int)] 426 }).(ConfigurationOutput) 427 } 428 429 type ConfigurationMapOutput struct{ *pulumi.OutputState } 430 431 func (ConfigurationMapOutput) ElementType() reflect.Type { 432 return reflect.TypeOf((*map[string]*Configuration)(nil)).Elem() 433 } 434 435 func (o ConfigurationMapOutput) ToConfigurationMapOutput() ConfigurationMapOutput { 436 return o 437 } 438 439 func (o ConfigurationMapOutput) ToConfigurationMapOutputWithContext(ctx context.Context) ConfigurationMapOutput { 440 return o 441 } 442 443 func (o ConfigurationMapOutput) MapIndex(k pulumi.StringInput) ConfigurationOutput { 444 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Configuration { 445 return vs[0].(map[string]*Configuration)[vs[1].(string)] 446 }).(ConfigurationOutput) 447 } 448 449 func init() { 450 pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationInput)(nil)).Elem(), &Configuration{}) 451 pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationArrayInput)(nil)).Elem(), ConfigurationArray{}) 452 pulumi.RegisterInputType(reflect.TypeOf((*ConfigurationMapInput)(nil)).Elem(), ConfigurationMap{}) 453 pulumi.RegisterOutputType(ConfigurationOutput{}) 454 pulumi.RegisterOutputType(ConfigurationArrayOutput{}) 455 pulumi.RegisterOutputType(ConfigurationMapOutput{}) 456 }