/
getPreparedStatement.go
89 lines (73 loc) · 3.18 KB
/
getPreparedStatement.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Code generated by pulumi-language-go DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package athena
import (
"context"
"reflect"
"github.com/pulumi/pulumi-aws-native/sdk/go/aws/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Resource schema for AWS::Athena::PreparedStatement
func LookupPreparedStatement(ctx *pulumi.Context, args *LookupPreparedStatementArgs, opts ...pulumi.InvokeOption) (*LookupPreparedStatementResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupPreparedStatementResult
err := ctx.Invoke("aws-native:athena:getPreparedStatement", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupPreparedStatementArgs struct {
// The name of the prepared statement.
StatementName string `pulumi:"statementName"`
// The name of the workgroup to which the prepared statement belongs.
WorkGroup string `pulumi:"workGroup"`
}
type LookupPreparedStatementResult struct {
// The description of the prepared statement.
Description *string `pulumi:"description"`
// The query string for the prepared statement.
QueryStatement *string `pulumi:"queryStatement"`
}
func LookupPreparedStatementOutput(ctx *pulumi.Context, args LookupPreparedStatementOutputArgs, opts ...pulumi.InvokeOption) LookupPreparedStatementResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupPreparedStatementResult, error) {
args := v.(LookupPreparedStatementArgs)
r, err := LookupPreparedStatement(ctx, &args, opts...)
var s LookupPreparedStatementResult
if r != nil {
s = *r
}
return s, err
}).(LookupPreparedStatementResultOutput)
}
type LookupPreparedStatementOutputArgs struct {
// The name of the prepared statement.
StatementName pulumi.StringInput `pulumi:"statementName"`
// The name of the workgroup to which the prepared statement belongs.
WorkGroup pulumi.StringInput `pulumi:"workGroup"`
}
func (LookupPreparedStatementOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPreparedStatementArgs)(nil)).Elem()
}
type LookupPreparedStatementResultOutput struct{ *pulumi.OutputState }
func (LookupPreparedStatementResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupPreparedStatementResult)(nil)).Elem()
}
func (o LookupPreparedStatementResultOutput) ToLookupPreparedStatementResultOutput() LookupPreparedStatementResultOutput {
return o
}
func (o LookupPreparedStatementResultOutput) ToLookupPreparedStatementResultOutputWithContext(ctx context.Context) LookupPreparedStatementResultOutput {
return o
}
// The description of the prepared statement.
func (o LookupPreparedStatementResultOutput) Description() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupPreparedStatementResult) *string { return v.Description }).(pulumi.StringPtrOutput)
}
// The query string for the prepared statement.
func (o LookupPreparedStatementResultOutput) QueryStatement() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupPreparedStatementResult) *string { return v.QueryStatement }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupPreparedStatementResultOutput{})
}