github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/neptune/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 neptune 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 a Neptune engine version. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/neptune" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := neptune.GetEngineVersion(ctx, &neptune.GetEngineVersionArgs{ 32 // PreferredVersions: []string{ 33 // "1.0.3.0", 34 // "1.0.2.2", 35 // "1.0.2.1", 36 // }, 37 // }, nil) 38 // if err != nil { 39 // return err 40 // } 41 // return nil 42 // }) 43 // } 44 // 45 // ``` 46 // <!--End PulumiCodeChooser --> 47 func GetEngineVersion(ctx *pulumi.Context, args *GetEngineVersionArgs, opts ...pulumi.InvokeOption) (*GetEngineVersionResult, error) { 48 opts = internal.PkgInvokeDefaultOpts(opts) 49 var rv GetEngineVersionResult 50 err := ctx.Invoke("aws:neptune/getEngineVersion:getEngineVersion", args, &rv, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return &rv, nil 55 } 56 57 // A collection of arguments for invoking getEngineVersion. 58 type GetEngineVersionArgs struct { 59 // DB engine. (Default: `neptune`) 60 Engine *string `pulumi:"engine"` 61 // Name of a specific DB parameter group family. An example parameter group family is `neptune1`. 62 ParameterGroupFamily *string `pulumi:"parameterGroupFamily"` 63 // Ordered list of preferred engine versions. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned. If both the `version` and `preferredVersions` arguments are not configured, the data source will return the default version for the engine. 64 PreferredVersions []string `pulumi:"preferredVersions"` 65 // Version of the DB engine. For example, `1.0.1.0`, `1.0.2.2`, and `1.0.3.0`. If both the `version` and `preferredVersions` arguments are not configured, the data source will return the default version for the engine. 66 Version *string `pulumi:"version"` 67 } 68 69 // A collection of values returned by getEngineVersion. 70 type GetEngineVersionResult struct { 71 Engine *string `pulumi:"engine"` 72 // Description of the database engine. 73 EngineDescription string `pulumi:"engineDescription"` 74 // Set of log types that the database engine has available for export to CloudWatch Logs. 75 ExportableLogTypes []string `pulumi:"exportableLogTypes"` 76 // The provider-assigned unique ID for this managed resource. 77 Id string `pulumi:"id"` 78 ParameterGroupFamily string `pulumi:"parameterGroupFamily"` 79 PreferredVersions []string `pulumi:"preferredVersions"` 80 // Set of the time zones supported by this engine. 81 SupportedTimezones []string `pulumi:"supportedTimezones"` 82 // Indicates whether the engine version supports exporting the log types specified by `exportableLogTypes` to CloudWatch Logs. 83 SupportsLogExportsToCloudwatch bool `pulumi:"supportsLogExportsToCloudwatch"` 84 // Indicates whether the database engine version supports read replicas. 85 SupportsReadReplica bool `pulumi:"supportsReadReplica"` 86 // Set of engine versions that this database engine version can be upgraded to. 87 ValidUpgradeTargets []string `pulumi:"validUpgradeTargets"` 88 Version string `pulumi:"version"` 89 // Description of the database engine version. 90 VersionDescription string `pulumi:"versionDescription"` 91 } 92 93 func GetEngineVersionOutput(ctx *pulumi.Context, args GetEngineVersionOutputArgs, opts ...pulumi.InvokeOption) GetEngineVersionResultOutput { 94 return pulumi.ToOutputWithContext(context.Background(), args). 95 ApplyT(func(v interface{}) (GetEngineVersionResult, error) { 96 args := v.(GetEngineVersionArgs) 97 r, err := GetEngineVersion(ctx, &args, opts...) 98 var s GetEngineVersionResult 99 if r != nil { 100 s = *r 101 } 102 return s, err 103 }).(GetEngineVersionResultOutput) 104 } 105 106 // A collection of arguments for invoking getEngineVersion. 107 type GetEngineVersionOutputArgs struct { 108 // DB engine. (Default: `neptune`) 109 Engine pulumi.StringPtrInput `pulumi:"engine"` 110 // Name of a specific DB parameter group family. An example parameter group family is `neptune1`. 111 ParameterGroupFamily pulumi.StringPtrInput `pulumi:"parameterGroupFamily"` 112 // Ordered list of preferred engine versions. The first match in this list will be returned. If no preferred matches are found and the original search returned more than one result, an error is returned. If both the `version` and `preferredVersions` arguments are not configured, the data source will return the default version for the engine. 113 PreferredVersions pulumi.StringArrayInput `pulumi:"preferredVersions"` 114 // Version of the DB engine. For example, `1.0.1.0`, `1.0.2.2`, and `1.0.3.0`. If both the `version` and `preferredVersions` arguments are not configured, the data source will return the default version for the engine. 115 Version pulumi.StringPtrInput `pulumi:"version"` 116 } 117 118 func (GetEngineVersionOutputArgs) ElementType() reflect.Type { 119 return reflect.TypeOf((*GetEngineVersionArgs)(nil)).Elem() 120 } 121 122 // A collection of values returned by getEngineVersion. 123 type GetEngineVersionResultOutput struct{ *pulumi.OutputState } 124 125 func (GetEngineVersionResultOutput) ElementType() reflect.Type { 126 return reflect.TypeOf((*GetEngineVersionResult)(nil)).Elem() 127 } 128 129 func (o GetEngineVersionResultOutput) ToGetEngineVersionResultOutput() GetEngineVersionResultOutput { 130 return o 131 } 132 133 func (o GetEngineVersionResultOutput) ToGetEngineVersionResultOutputWithContext(ctx context.Context) GetEngineVersionResultOutput { 134 return o 135 } 136 137 func (o GetEngineVersionResultOutput) Engine() pulumi.StringPtrOutput { 138 return o.ApplyT(func(v GetEngineVersionResult) *string { return v.Engine }).(pulumi.StringPtrOutput) 139 } 140 141 // Description of the database engine. 142 func (o GetEngineVersionResultOutput) EngineDescription() pulumi.StringOutput { 143 return o.ApplyT(func(v GetEngineVersionResult) string { return v.EngineDescription }).(pulumi.StringOutput) 144 } 145 146 // Set of log types that the database engine has available for export to CloudWatch Logs. 147 func (o GetEngineVersionResultOutput) ExportableLogTypes() pulumi.StringArrayOutput { 148 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ExportableLogTypes }).(pulumi.StringArrayOutput) 149 } 150 151 // The provider-assigned unique ID for this managed resource. 152 func (o GetEngineVersionResultOutput) Id() pulumi.StringOutput { 153 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Id }).(pulumi.StringOutput) 154 } 155 156 func (o GetEngineVersionResultOutput) ParameterGroupFamily() pulumi.StringOutput { 157 return o.ApplyT(func(v GetEngineVersionResult) string { return v.ParameterGroupFamily }).(pulumi.StringOutput) 158 } 159 160 func (o GetEngineVersionResultOutput) PreferredVersions() pulumi.StringArrayOutput { 161 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.PreferredVersions }).(pulumi.StringArrayOutput) 162 } 163 164 // Set of the time zones supported by this engine. 165 func (o GetEngineVersionResultOutput) SupportedTimezones() pulumi.StringArrayOutput { 166 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.SupportedTimezones }).(pulumi.StringArrayOutput) 167 } 168 169 // Indicates whether the engine version supports exporting the log types specified by `exportableLogTypes` to CloudWatch Logs. 170 func (o GetEngineVersionResultOutput) SupportsLogExportsToCloudwatch() pulumi.BoolOutput { 171 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsLogExportsToCloudwatch }).(pulumi.BoolOutput) 172 } 173 174 // Indicates whether the database engine version supports read replicas. 175 func (o GetEngineVersionResultOutput) SupportsReadReplica() pulumi.BoolOutput { 176 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsReadReplica }).(pulumi.BoolOutput) 177 } 178 179 // Set of engine versions that this database engine version can be upgraded to. 180 func (o GetEngineVersionResultOutput) ValidUpgradeTargets() pulumi.StringArrayOutput { 181 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ValidUpgradeTargets }).(pulumi.StringArrayOutput) 182 } 183 184 func (o GetEngineVersionResultOutput) Version() pulumi.StringOutput { 185 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Version }).(pulumi.StringOutput) 186 } 187 188 // Description of the database engine version. 189 func (o GetEngineVersionResultOutput) VersionDescription() pulumi.StringOutput { 190 return o.ApplyT(func(v GetEngineVersionResult) string { return v.VersionDescription }).(pulumi.StringOutput) 191 } 192 193 func init() { 194 pulumi.RegisterOutputType(GetEngineVersionResultOutput{}) 195 }