github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/rds/getEngineVersion.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 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Information about an RDS engine version. 15 // 16 // ## Example Usage 17 // 18 // ### Basic Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := rds.GetEngineVersion(ctx, &rds.GetEngineVersionArgs{ 34 // Engine: "mysql", 35 // PreferredVersions: []string{ 36 // "8.0.27", 37 // "8.0.26", 38 // }, 39 // }, nil) 40 // if err != nil { 41 // return err 42 // } 43 // return nil 44 // }) 45 // } 46 // 47 // ``` 48 // <!--End PulumiCodeChooser --> 49 // 50 // ### With `filter` 51 // 52 // <!--Start PulumiCodeChooser --> 53 // ```go 54 // package main 55 // 56 // import ( 57 // 58 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds" 59 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 60 // 61 // ) 62 // 63 // func main() { 64 // pulumi.Run(func(ctx *pulumi.Context) error { 65 // _, err := rds.GetEngineVersion(ctx, &rds.GetEngineVersionArgs{ 66 // Engine: "aurora-postgresql", 67 // Version: pulumi.StringRef("10.14"), 68 // IncludeAll: pulumi.BoolRef(true), 69 // Filters: []rds.GetEngineVersionFilter{ 70 // { 71 // Name: "engine-mode", 72 // Values: []string{ 73 // "serverless", 74 // }, 75 // }, 76 // }, 77 // }, nil) 78 // if err != nil { 79 // return err 80 // } 81 // return nil 82 // }) 83 // } 84 // 85 // ``` 86 // <!--End PulumiCodeChooser --> 87 func GetEngineVersion(ctx *pulumi.Context, args *GetEngineVersionArgs, opts ...pulumi.InvokeOption) (*GetEngineVersionResult, error) { 88 opts = internal.PkgInvokeDefaultOpts(opts) 89 var rv GetEngineVersionResult 90 err := ctx.Invoke("aws:rds/getEngineVersion:getEngineVersion", args, &rv, opts...) 91 if err != nil { 92 return nil, err 93 } 94 return &rv, nil 95 } 96 97 // A collection of arguments for invoking getEngineVersion. 98 type GetEngineVersionArgs struct { 99 // Whether the engine version must be an AWS-defined default version. Some engines have multiple default versions, such as for each major version. Using `defaultOnly` may help avoid `multiple RDS engine versions` errors. See also `latest`. 100 DefaultOnly *bool `pulumi:"defaultOnly"` 101 // Database engine. Engine values include `aurora`, `aurora-mysql`, `aurora-postgresql`, `docdb`, `mariadb`, `mysql`, `neptune`, `oracle-ee`, `oracle-se`, `oracle-se1`, `oracle-se2`, `postgres`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se`, and `sqlserver-web`. 102 // 103 // The following arguments are optional: 104 Engine string `pulumi:"engine"` 105 // One or more name/value pairs to use in filtering versions. There are several valid keys; for a full reference, check out [describe-db-engine-versions in the AWS CLI reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/describe-db-engine-versions.html). 106 Filters []GetEngineVersionFilter `pulumi:"filters"` 107 // Whether the engine version must have one or more major upgrade targets. Not including `hasMajorTarget` or setting it to `false` doesn't imply that there's no corresponding major upgrade target for the engine version. 108 HasMajorTarget *bool `pulumi:"hasMajorTarget"` 109 // Whether the engine version must have one or more minor upgrade targets. Not including `hasMinorTarget` or setting it to `false` doesn't imply that there's no corresponding minor upgrade target for the engine version. 110 HasMinorTarget *bool `pulumi:"hasMinorTarget"` 111 // Whether the engine version `status` can either be `deprecated` or `available`. When not set or set to `false`, the engine version `status` will always be `available`. 112 IncludeAll *bool `pulumi:"includeAll"` 113 // Whether the engine version is the most recent version matching the other criteria. This is different from `defaultOnly` in important ways: "default" relies on AWS-defined defaults, the latest version isn't always the default, and AWS might have multiple default versions for an engine. As a result, `defaultOnly` might not prevent errors from `multiple RDS engine versions`, while `latest` will. (`latest` can be used with `defaultOnly`.) **Note:** The data source uses a best-effort approach at selecting the latest version. Due to the complexity of version identifiers across engines and incomplete version date information provided by AWS, using `latest` may not always result in the engine version being the actual latest version. 114 Latest *bool `pulumi:"latest"` 115 // Name of a specific database parameter group family. Examples of parameter group families are `mysql8.0`, `mariadb10.4`, and `postgres12`. 116 ParameterGroupFamily *string `pulumi:"parameterGroupFamily"` 117 // Ordered list of preferred major version upgrade targets. The engine version will be the first match in the list unless the `latest` parameter is set to `true`. The engine version will be the default version if you don't include any criteria, such as `preferredMajorTargets`. 118 PreferredMajorTargets []string `pulumi:"preferredMajorTargets"` 119 // Ordered list of preferred version upgrade targets. The engine version will be the first match in this list unless the `latest` parameter is set to `true`. The engine version will be the default version if you don't include any criteria, such as `preferredUpgradeTargets`. 120 PreferredUpgradeTargets []string `pulumi:"preferredUpgradeTargets"` 121 // Ordered list of preferred versions. The engine version will be the first match in this list unless the `latest` parameter is set to `true`. The engine version will be the default version if you don't include any criteria, such as `preferredVersions`. 122 PreferredVersions []string `pulumi:"preferredVersions"` 123 Version *string `pulumi:"version"` 124 } 125 126 // A collection of values returned by getEngineVersion. 127 type GetEngineVersionResult struct { 128 // Default character set for new instances of the engine version. 129 DefaultCharacterSet string `pulumi:"defaultCharacterSet"` 130 DefaultOnly *bool `pulumi:"defaultOnly"` 131 Engine string `pulumi:"engine"` 132 // Description of the engine. 133 EngineDescription string `pulumi:"engineDescription"` 134 // Set of log types that the engine version has available for export to CloudWatch Logs. 135 ExportableLogTypes []string `pulumi:"exportableLogTypes"` 136 Filters []GetEngineVersionFilter `pulumi:"filters"` 137 HasMajorTarget *bool `pulumi:"hasMajorTarget"` 138 HasMinorTarget *bool `pulumi:"hasMinorTarget"` 139 // The provider-assigned unique ID for this managed resource. 140 Id string `pulumi:"id"` 141 IncludeAll *bool `pulumi:"includeAll"` 142 Latest *bool `pulumi:"latest"` 143 ParameterGroupFamily string `pulumi:"parameterGroupFamily"` 144 PreferredMajorTargets []string `pulumi:"preferredMajorTargets"` 145 PreferredUpgradeTargets []string `pulumi:"preferredUpgradeTargets"` 146 PreferredVersions []string `pulumi:"preferredVersions"` 147 // Status of the engine version, either `available` or `deprecated`. 148 Status string `pulumi:"status"` 149 // Set of character sets supported by th engine version. 150 SupportedCharacterSets []string `pulumi:"supportedCharacterSets"` 151 // Set of features supported by the engine version. 152 SupportedFeatureNames []string `pulumi:"supportedFeatureNames"` 153 // Set of supported engine version modes. 154 SupportedModes []string `pulumi:"supportedModes"` 155 // Set of the time zones supported by the engine version. 156 SupportedTimezones []string `pulumi:"supportedTimezones"` 157 // Whether you can use Aurora global databases with the engine version. 158 SupportsGlobalDatabases bool `pulumi:"supportsGlobalDatabases"` 159 // Whether the engine version supports exporting the log types specified by `exportableLogTypes` to CloudWatch Logs. 160 SupportsLogExportsToCloudwatch bool `pulumi:"supportsLogExportsToCloudwatch"` 161 // Whether you can use Aurora parallel query with the engine version. 162 SupportsParallelQuery bool `pulumi:"supportsParallelQuery"` 163 // Whether the engine version supports read replicas. 164 SupportsReadReplica bool `pulumi:"supportsReadReplica"` 165 // Set of versions that are valid major version upgrades for the engine version. 166 ValidMajorTargets []string `pulumi:"validMajorTargets"` 167 // Set of versions that are valid minor version upgrades for the engine version. 168 ValidMinorTargets []string `pulumi:"validMinorTargets"` 169 // Set of versions that are valid major or minor upgrades for the engine version. 170 ValidUpgradeTargets []string `pulumi:"validUpgradeTargets"` 171 Version string `pulumi:"version"` 172 // Complete engine version. 173 VersionActual string `pulumi:"versionActual"` 174 // Description of the engine version. 175 VersionDescription string `pulumi:"versionDescription"` 176 } 177 178 func GetEngineVersionOutput(ctx *pulumi.Context, args GetEngineVersionOutputArgs, opts ...pulumi.InvokeOption) GetEngineVersionResultOutput { 179 return pulumi.ToOutputWithContext(context.Background(), args). 180 ApplyT(func(v interface{}) (GetEngineVersionResult, error) { 181 args := v.(GetEngineVersionArgs) 182 r, err := GetEngineVersion(ctx, &args, opts...) 183 var s GetEngineVersionResult 184 if r != nil { 185 s = *r 186 } 187 return s, err 188 }).(GetEngineVersionResultOutput) 189 } 190 191 // A collection of arguments for invoking getEngineVersion. 192 type GetEngineVersionOutputArgs struct { 193 // Whether the engine version must be an AWS-defined default version. Some engines have multiple default versions, such as for each major version. Using `defaultOnly` may help avoid `multiple RDS engine versions` errors. See also `latest`. 194 DefaultOnly pulumi.BoolPtrInput `pulumi:"defaultOnly"` 195 // Database engine. Engine values include `aurora`, `aurora-mysql`, `aurora-postgresql`, `docdb`, `mariadb`, `mysql`, `neptune`, `oracle-ee`, `oracle-se`, `oracle-se1`, `oracle-se2`, `postgres`, `sqlserver-ee`, `sqlserver-ex`, `sqlserver-se`, and `sqlserver-web`. 196 // 197 // The following arguments are optional: 198 Engine pulumi.StringInput `pulumi:"engine"` 199 // One or more name/value pairs to use in filtering versions. There are several valid keys; for a full reference, check out [describe-db-engine-versions in the AWS CLI reference](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/describe-db-engine-versions.html). 200 Filters GetEngineVersionFilterArrayInput `pulumi:"filters"` 201 // Whether the engine version must have one or more major upgrade targets. Not including `hasMajorTarget` or setting it to `false` doesn't imply that there's no corresponding major upgrade target for the engine version. 202 HasMajorTarget pulumi.BoolPtrInput `pulumi:"hasMajorTarget"` 203 // Whether the engine version must have one or more minor upgrade targets. Not including `hasMinorTarget` or setting it to `false` doesn't imply that there's no corresponding minor upgrade target for the engine version. 204 HasMinorTarget pulumi.BoolPtrInput `pulumi:"hasMinorTarget"` 205 // Whether the engine version `status` can either be `deprecated` or `available`. When not set or set to `false`, the engine version `status` will always be `available`. 206 IncludeAll pulumi.BoolPtrInput `pulumi:"includeAll"` 207 // Whether the engine version is the most recent version matching the other criteria. This is different from `defaultOnly` in important ways: "default" relies on AWS-defined defaults, the latest version isn't always the default, and AWS might have multiple default versions for an engine. As a result, `defaultOnly` might not prevent errors from `multiple RDS engine versions`, while `latest` will. (`latest` can be used with `defaultOnly`.) **Note:** The data source uses a best-effort approach at selecting the latest version. Due to the complexity of version identifiers across engines and incomplete version date information provided by AWS, using `latest` may not always result in the engine version being the actual latest version. 208 Latest pulumi.BoolPtrInput `pulumi:"latest"` 209 // Name of a specific database parameter group family. Examples of parameter group families are `mysql8.0`, `mariadb10.4`, and `postgres12`. 210 ParameterGroupFamily pulumi.StringPtrInput `pulumi:"parameterGroupFamily"` 211 // Ordered list of preferred major version upgrade targets. The engine version will be the first match in the list unless the `latest` parameter is set to `true`. The engine version will be the default version if you don't include any criteria, such as `preferredMajorTargets`. 212 PreferredMajorTargets pulumi.StringArrayInput `pulumi:"preferredMajorTargets"` 213 // Ordered list of preferred version upgrade targets. The engine version will be the first match in this list unless the `latest` parameter is set to `true`. The engine version will be the default version if you don't include any criteria, such as `preferredUpgradeTargets`. 214 PreferredUpgradeTargets pulumi.StringArrayInput `pulumi:"preferredUpgradeTargets"` 215 // Ordered list of preferred versions. The engine version will be the first match in this list unless the `latest` parameter is set to `true`. The engine version will be the default version if you don't include any criteria, such as `preferredVersions`. 216 PreferredVersions pulumi.StringArrayInput `pulumi:"preferredVersions"` 217 Version pulumi.StringPtrInput `pulumi:"version"` 218 } 219 220 func (GetEngineVersionOutputArgs) ElementType() reflect.Type { 221 return reflect.TypeOf((*GetEngineVersionArgs)(nil)).Elem() 222 } 223 224 // A collection of values returned by getEngineVersion. 225 type GetEngineVersionResultOutput struct{ *pulumi.OutputState } 226 227 func (GetEngineVersionResultOutput) ElementType() reflect.Type { 228 return reflect.TypeOf((*GetEngineVersionResult)(nil)).Elem() 229 } 230 231 func (o GetEngineVersionResultOutput) ToGetEngineVersionResultOutput() GetEngineVersionResultOutput { 232 return o 233 } 234 235 func (o GetEngineVersionResultOutput) ToGetEngineVersionResultOutputWithContext(ctx context.Context) GetEngineVersionResultOutput { 236 return o 237 } 238 239 // Default character set for new instances of the engine version. 240 func (o GetEngineVersionResultOutput) DefaultCharacterSet() pulumi.StringOutput { 241 return o.ApplyT(func(v GetEngineVersionResult) string { return v.DefaultCharacterSet }).(pulumi.StringOutput) 242 } 243 244 func (o GetEngineVersionResultOutput) DefaultOnly() pulumi.BoolPtrOutput { 245 return o.ApplyT(func(v GetEngineVersionResult) *bool { return v.DefaultOnly }).(pulumi.BoolPtrOutput) 246 } 247 248 func (o GetEngineVersionResultOutput) Engine() pulumi.StringOutput { 249 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Engine }).(pulumi.StringOutput) 250 } 251 252 // Description of the engine. 253 func (o GetEngineVersionResultOutput) EngineDescription() pulumi.StringOutput { 254 return o.ApplyT(func(v GetEngineVersionResult) string { return v.EngineDescription }).(pulumi.StringOutput) 255 } 256 257 // Set of log types that the engine version has available for export to CloudWatch Logs. 258 func (o GetEngineVersionResultOutput) ExportableLogTypes() pulumi.StringArrayOutput { 259 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ExportableLogTypes }).(pulumi.StringArrayOutput) 260 } 261 262 func (o GetEngineVersionResultOutput) Filters() GetEngineVersionFilterArrayOutput { 263 return o.ApplyT(func(v GetEngineVersionResult) []GetEngineVersionFilter { return v.Filters }).(GetEngineVersionFilterArrayOutput) 264 } 265 266 func (o GetEngineVersionResultOutput) HasMajorTarget() pulumi.BoolPtrOutput { 267 return o.ApplyT(func(v GetEngineVersionResult) *bool { return v.HasMajorTarget }).(pulumi.BoolPtrOutput) 268 } 269 270 func (o GetEngineVersionResultOutput) HasMinorTarget() pulumi.BoolPtrOutput { 271 return o.ApplyT(func(v GetEngineVersionResult) *bool { return v.HasMinorTarget }).(pulumi.BoolPtrOutput) 272 } 273 274 // The provider-assigned unique ID for this managed resource. 275 func (o GetEngineVersionResultOutput) Id() pulumi.StringOutput { 276 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Id }).(pulumi.StringOutput) 277 } 278 279 func (o GetEngineVersionResultOutput) IncludeAll() pulumi.BoolPtrOutput { 280 return o.ApplyT(func(v GetEngineVersionResult) *bool { return v.IncludeAll }).(pulumi.BoolPtrOutput) 281 } 282 283 func (o GetEngineVersionResultOutput) Latest() pulumi.BoolPtrOutput { 284 return o.ApplyT(func(v GetEngineVersionResult) *bool { return v.Latest }).(pulumi.BoolPtrOutput) 285 } 286 287 func (o GetEngineVersionResultOutput) ParameterGroupFamily() pulumi.StringOutput { 288 return o.ApplyT(func(v GetEngineVersionResult) string { return v.ParameterGroupFamily }).(pulumi.StringOutput) 289 } 290 291 func (o GetEngineVersionResultOutput) PreferredMajorTargets() pulumi.StringArrayOutput { 292 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.PreferredMajorTargets }).(pulumi.StringArrayOutput) 293 } 294 295 func (o GetEngineVersionResultOutput) PreferredUpgradeTargets() pulumi.StringArrayOutput { 296 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.PreferredUpgradeTargets }).(pulumi.StringArrayOutput) 297 } 298 299 func (o GetEngineVersionResultOutput) PreferredVersions() pulumi.StringArrayOutput { 300 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.PreferredVersions }).(pulumi.StringArrayOutput) 301 } 302 303 // Status of the engine version, either `available` or `deprecated`. 304 func (o GetEngineVersionResultOutput) Status() pulumi.StringOutput { 305 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Status }).(pulumi.StringOutput) 306 } 307 308 // Set of character sets supported by th engine version. 309 func (o GetEngineVersionResultOutput) SupportedCharacterSets() pulumi.StringArrayOutput { 310 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.SupportedCharacterSets }).(pulumi.StringArrayOutput) 311 } 312 313 // Set of features supported by the engine version. 314 func (o GetEngineVersionResultOutput) SupportedFeatureNames() pulumi.StringArrayOutput { 315 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.SupportedFeatureNames }).(pulumi.StringArrayOutput) 316 } 317 318 // Set of supported engine version modes. 319 func (o GetEngineVersionResultOutput) SupportedModes() pulumi.StringArrayOutput { 320 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.SupportedModes }).(pulumi.StringArrayOutput) 321 } 322 323 // Set of the time zones supported by the engine version. 324 func (o GetEngineVersionResultOutput) SupportedTimezones() pulumi.StringArrayOutput { 325 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.SupportedTimezones }).(pulumi.StringArrayOutput) 326 } 327 328 // Whether you can use Aurora global databases with the engine version. 329 func (o GetEngineVersionResultOutput) SupportsGlobalDatabases() pulumi.BoolOutput { 330 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsGlobalDatabases }).(pulumi.BoolOutput) 331 } 332 333 // Whether the engine version supports exporting the log types specified by `exportableLogTypes` to CloudWatch Logs. 334 func (o GetEngineVersionResultOutput) SupportsLogExportsToCloudwatch() pulumi.BoolOutput { 335 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsLogExportsToCloudwatch }).(pulumi.BoolOutput) 336 } 337 338 // Whether you can use Aurora parallel query with the engine version. 339 func (o GetEngineVersionResultOutput) SupportsParallelQuery() pulumi.BoolOutput { 340 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsParallelQuery }).(pulumi.BoolOutput) 341 } 342 343 // Whether the engine version supports read replicas. 344 func (o GetEngineVersionResultOutput) SupportsReadReplica() pulumi.BoolOutput { 345 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsReadReplica }).(pulumi.BoolOutput) 346 } 347 348 // Set of versions that are valid major version upgrades for the engine version. 349 func (o GetEngineVersionResultOutput) ValidMajorTargets() pulumi.StringArrayOutput { 350 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ValidMajorTargets }).(pulumi.StringArrayOutput) 351 } 352 353 // Set of versions that are valid minor version upgrades for the engine version. 354 func (o GetEngineVersionResultOutput) ValidMinorTargets() pulumi.StringArrayOutput { 355 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ValidMinorTargets }).(pulumi.StringArrayOutput) 356 } 357 358 // Set of versions that are valid major or minor upgrades for the engine version. 359 func (o GetEngineVersionResultOutput) ValidUpgradeTargets() pulumi.StringArrayOutput { 360 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ValidUpgradeTargets }).(pulumi.StringArrayOutput) 361 } 362 363 func (o GetEngineVersionResultOutput) Version() pulumi.StringOutput { 364 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Version }).(pulumi.StringOutput) 365 } 366 367 // Complete engine version. 368 func (o GetEngineVersionResultOutput) VersionActual() pulumi.StringOutput { 369 return o.ApplyT(func(v GetEngineVersionResult) string { return v.VersionActual }).(pulumi.StringOutput) 370 } 371 372 // Description of the engine version. 373 func (o GetEngineVersionResultOutput) VersionDescription() pulumi.StringOutput { 374 return o.ApplyT(func(v GetEngineVersionResult) string { return v.VersionDescription }).(pulumi.StringOutput) 375 } 376 377 func init() { 378 pulumi.RegisterOutputType(GetEngineVersionResultOutput{}) 379 }