/
getProxy.go
181 lines (154 loc) · 6.73 KB
/
getProxy.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package rds
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source to get information about a DB Proxy.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/rds"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := rds.LookupProxy(ctx, &rds.LookupProxyArgs{
// Name: "my-test-db-proxy",
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
func LookupProxy(ctx *pulumi.Context, args *LookupProxyArgs, opts ...pulumi.InvokeOption) (*LookupProxyResult, error) {
var rv LookupProxyResult
err := ctx.Invoke("aws:rds/getProxy:getProxy", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getProxy.
type LookupProxyArgs struct {
// The name of the DB proxy.
Name string `pulumi:"name"`
}
// A collection of values returned by getProxy.
type LookupProxyResult struct {
// The ARN of the DB Proxy.
Arn string `pulumi:"arn"`
// The configuration(s) with authorization mechanisms to connect to the associated instance or cluster.
Auths []GetProxyAuth `pulumi:"auths"`
// Whether the proxy includes detailed information about SQL statements in its logs.
DebugLogging bool `pulumi:"debugLogging"`
// The endpoint that you can use to connect to the DB proxy.
Endpoint string `pulumi:"endpoint"`
// The kinds of databases that the proxy can connect to.
EngineFamily string `pulumi:"engineFamily"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
// The number of seconds a connection to the proxy can have no activity before the proxy drops the client connection.
IdleClientTimeout int `pulumi:"idleClientTimeout"`
Name string `pulumi:"name"`
// Indicates whether Transport Layer Security (TLS) encryption is required for connections to the proxy.
RequireTls bool `pulumi:"requireTls"`
// The Amazon Resource Name (ARN) for the IAM role that the proxy uses to access Amazon Secrets Manager.
RoleArn string `pulumi:"roleArn"`
// Provides the VPC ID of the DB proxy.
VpcId string `pulumi:"vpcId"`
// Provides a list of VPC security groups that the proxy belongs to.
VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"`
// The EC2 subnet IDs for the proxy.
VpcSubnetIds []string `pulumi:"vpcSubnetIds"`
}
func LookupProxyOutput(ctx *pulumi.Context, args LookupProxyOutputArgs, opts ...pulumi.InvokeOption) LookupProxyResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupProxyResult, error) {
args := v.(LookupProxyArgs)
r, err := LookupProxy(ctx, &args, opts...)
return *r, err
}).(LookupProxyResultOutput)
}
// A collection of arguments for invoking getProxy.
type LookupProxyOutputArgs struct {
// The name of the DB proxy.
Name pulumi.StringInput `pulumi:"name"`
}
func (LookupProxyOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProxyArgs)(nil)).Elem()
}
// A collection of values returned by getProxy.
type LookupProxyResultOutput struct{ *pulumi.OutputState }
func (LookupProxyResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupProxyResult)(nil)).Elem()
}
func (o LookupProxyResultOutput) ToLookupProxyResultOutput() LookupProxyResultOutput {
return o
}
func (o LookupProxyResultOutput) ToLookupProxyResultOutputWithContext(ctx context.Context) LookupProxyResultOutput {
return o
}
// The ARN of the DB Proxy.
func (o LookupProxyResultOutput) Arn() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.Arn }).(pulumi.StringOutput)
}
// The configuration(s) with authorization mechanisms to connect to the associated instance or cluster.
func (o LookupProxyResultOutput) Auths() GetProxyAuthArrayOutput {
return o.ApplyT(func(v LookupProxyResult) []GetProxyAuth { return v.Auths }).(GetProxyAuthArrayOutput)
}
// Whether the proxy includes detailed information about SQL statements in its logs.
func (o LookupProxyResultOutput) DebugLogging() pulumi.BoolOutput {
return o.ApplyT(func(v LookupProxyResult) bool { return v.DebugLogging }).(pulumi.BoolOutput)
}
// The endpoint that you can use to connect to the DB proxy.
func (o LookupProxyResultOutput) Endpoint() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.Endpoint }).(pulumi.StringOutput)
}
// The kinds of databases that the proxy can connect to.
func (o LookupProxyResultOutput) EngineFamily() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.EngineFamily }).(pulumi.StringOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o LookupProxyResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.Id }).(pulumi.StringOutput)
}
// The number of seconds a connection to the proxy can have no activity before the proxy drops the client connection.
func (o LookupProxyResultOutput) IdleClientTimeout() pulumi.IntOutput {
return o.ApplyT(func(v LookupProxyResult) int { return v.IdleClientTimeout }).(pulumi.IntOutput)
}
func (o LookupProxyResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.Name }).(pulumi.StringOutput)
}
// Indicates whether Transport Layer Security (TLS) encryption is required for connections to the proxy.
func (o LookupProxyResultOutput) RequireTls() pulumi.BoolOutput {
return o.ApplyT(func(v LookupProxyResult) bool { return v.RequireTls }).(pulumi.BoolOutput)
}
// The Amazon Resource Name (ARN) for the IAM role that the proxy uses to access Amazon Secrets Manager.
func (o LookupProxyResultOutput) RoleArn() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.RoleArn }).(pulumi.StringOutput)
}
// Provides the VPC ID of the DB proxy.
func (o LookupProxyResultOutput) VpcId() pulumi.StringOutput {
return o.ApplyT(func(v LookupProxyResult) string { return v.VpcId }).(pulumi.StringOutput)
}
// Provides a list of VPC security groups that the proxy belongs to.
func (o LookupProxyResultOutput) VpcSecurityGroupIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupProxyResult) []string { return v.VpcSecurityGroupIds }).(pulumi.StringArrayOutput)
}
// The EC2 subnet IDs for the proxy.
func (o LookupProxyResultOutput) VpcSubnetIds() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupProxyResult) []string { return v.VpcSubnetIds }).(pulumi.StringArrayOutput)
}
func init() {
pulumi.RegisterOutputType(LookupProxyResultOutput{})
}