github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/docdb/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 docdb 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 DocumentDB 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/docdb" 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 := docdb.GetEngineVersion(ctx, &docdb.GetEngineVersionArgs{ 32 // Version: pulumi.StringRef("3.6.0"), 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func GetEngineVersion(ctx *pulumi.Context, args *GetEngineVersionArgs, opts ...pulumi.InvokeOption) (*GetEngineVersionResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv GetEngineVersionResult 46 err := ctx.Invoke("aws:docdb/getEngineVersion:getEngineVersion", args, &rv, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &rv, nil 51 } 52 53 // A collection of arguments for invoking getEngineVersion. 54 type GetEngineVersionArgs struct { 55 // DB engine. (Default: `docdb`) 56 Engine *string `pulumi:"engine"` 57 // Name of a specific DB parameter group family. An example parameter group family is `docdb3.6`. 58 ParameterGroupFamily *string `pulumi:"parameterGroupFamily"` 59 // 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. 60 PreferredVersions []string `pulumi:"preferredVersions"` 61 // Version of the DB engine. For example, `3.6.0`. If `version` and `preferredVersions` are not set, the data source will provide information for the AWS-defined default version. If both the `version` and `preferredVersions` arguments are not configured, the data source will return the default version for the engine. 62 Version *string `pulumi:"version"` 63 } 64 65 // A collection of values returned by getEngineVersion. 66 type GetEngineVersionResult struct { 67 Engine *string `pulumi:"engine"` 68 // Description of the database engine. 69 EngineDescription string `pulumi:"engineDescription"` 70 // Set of log types that the database engine has available for export to CloudWatch Logs. 71 ExportableLogTypes []string `pulumi:"exportableLogTypes"` 72 // The provider-assigned unique ID for this managed resource. 73 Id string `pulumi:"id"` 74 ParameterGroupFamily string `pulumi:"parameterGroupFamily"` 75 PreferredVersions []string `pulumi:"preferredVersions"` 76 // Indicates whether the engine version supports exporting the log types specified by `exportableLogTypes` to CloudWatch Logs. 77 SupportsLogExportsToCloudwatch bool `pulumi:"supportsLogExportsToCloudwatch"` 78 // A set of engine versions that this database engine version can be upgraded to. 79 ValidUpgradeTargets []string `pulumi:"validUpgradeTargets"` 80 Version string `pulumi:"version"` 81 // Description of the database engine version. 82 VersionDescription string `pulumi:"versionDescription"` 83 } 84 85 func GetEngineVersionOutput(ctx *pulumi.Context, args GetEngineVersionOutputArgs, opts ...pulumi.InvokeOption) GetEngineVersionResultOutput { 86 return pulumi.ToOutputWithContext(context.Background(), args). 87 ApplyT(func(v interface{}) (GetEngineVersionResult, error) { 88 args := v.(GetEngineVersionArgs) 89 r, err := GetEngineVersion(ctx, &args, opts...) 90 var s GetEngineVersionResult 91 if r != nil { 92 s = *r 93 } 94 return s, err 95 }).(GetEngineVersionResultOutput) 96 } 97 98 // A collection of arguments for invoking getEngineVersion. 99 type GetEngineVersionOutputArgs struct { 100 // DB engine. (Default: `docdb`) 101 Engine pulumi.StringPtrInput `pulumi:"engine"` 102 // Name of a specific DB parameter group family. An example parameter group family is `docdb3.6`. 103 ParameterGroupFamily pulumi.StringPtrInput `pulumi:"parameterGroupFamily"` 104 // 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. 105 PreferredVersions pulumi.StringArrayInput `pulumi:"preferredVersions"` 106 // Version of the DB engine. For example, `3.6.0`. If `version` and `preferredVersions` are not set, the data source will provide information for the AWS-defined default version. If both the `version` and `preferredVersions` arguments are not configured, the data source will return the default version for the engine. 107 Version pulumi.StringPtrInput `pulumi:"version"` 108 } 109 110 func (GetEngineVersionOutputArgs) ElementType() reflect.Type { 111 return reflect.TypeOf((*GetEngineVersionArgs)(nil)).Elem() 112 } 113 114 // A collection of values returned by getEngineVersion. 115 type GetEngineVersionResultOutput struct{ *pulumi.OutputState } 116 117 func (GetEngineVersionResultOutput) ElementType() reflect.Type { 118 return reflect.TypeOf((*GetEngineVersionResult)(nil)).Elem() 119 } 120 121 func (o GetEngineVersionResultOutput) ToGetEngineVersionResultOutput() GetEngineVersionResultOutput { 122 return o 123 } 124 125 func (o GetEngineVersionResultOutput) ToGetEngineVersionResultOutputWithContext(ctx context.Context) GetEngineVersionResultOutput { 126 return o 127 } 128 129 func (o GetEngineVersionResultOutput) Engine() pulumi.StringPtrOutput { 130 return o.ApplyT(func(v GetEngineVersionResult) *string { return v.Engine }).(pulumi.StringPtrOutput) 131 } 132 133 // Description of the database engine. 134 func (o GetEngineVersionResultOutput) EngineDescription() pulumi.StringOutput { 135 return o.ApplyT(func(v GetEngineVersionResult) string { return v.EngineDescription }).(pulumi.StringOutput) 136 } 137 138 // Set of log types that the database engine has available for export to CloudWatch Logs. 139 func (o GetEngineVersionResultOutput) ExportableLogTypes() pulumi.StringArrayOutput { 140 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ExportableLogTypes }).(pulumi.StringArrayOutput) 141 } 142 143 // The provider-assigned unique ID for this managed resource. 144 func (o GetEngineVersionResultOutput) Id() pulumi.StringOutput { 145 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Id }).(pulumi.StringOutput) 146 } 147 148 func (o GetEngineVersionResultOutput) ParameterGroupFamily() pulumi.StringOutput { 149 return o.ApplyT(func(v GetEngineVersionResult) string { return v.ParameterGroupFamily }).(pulumi.StringOutput) 150 } 151 152 func (o GetEngineVersionResultOutput) PreferredVersions() pulumi.StringArrayOutput { 153 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.PreferredVersions }).(pulumi.StringArrayOutput) 154 } 155 156 // Indicates whether the engine version supports exporting the log types specified by `exportableLogTypes` to CloudWatch Logs. 157 func (o GetEngineVersionResultOutput) SupportsLogExportsToCloudwatch() pulumi.BoolOutput { 158 return o.ApplyT(func(v GetEngineVersionResult) bool { return v.SupportsLogExportsToCloudwatch }).(pulumi.BoolOutput) 159 } 160 161 // A set of engine versions that this database engine version can be upgraded to. 162 func (o GetEngineVersionResultOutput) ValidUpgradeTargets() pulumi.StringArrayOutput { 163 return o.ApplyT(func(v GetEngineVersionResult) []string { return v.ValidUpgradeTargets }).(pulumi.StringArrayOutput) 164 } 165 166 func (o GetEngineVersionResultOutput) Version() pulumi.StringOutput { 167 return o.ApplyT(func(v GetEngineVersionResult) string { return v.Version }).(pulumi.StringOutput) 168 } 169 170 // Description of the database engine version. 171 func (o GetEngineVersionResultOutput) VersionDescription() pulumi.StringOutput { 172 return o.ApplyT(func(v GetEngineVersionResult) string { return v.VersionDescription }).(pulumi.StringOutput) 173 } 174 175 func init() { 176 pulumi.RegisterOutputType(GetEngineVersionResultOutput{}) 177 }