github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/rds/getProxy.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 // Use this data source to get information about a DB Proxy. 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/rds" 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 := rds.LookupProxy(ctx, &rds.LookupProxyArgs{ 32 // Name: "my-test-db-proxy", 33 // }, nil) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 func LookupProxy(ctx *pulumi.Context, args *LookupProxyArgs, opts ...pulumi.InvokeOption) (*LookupProxyResult, error) { 44 opts = internal.PkgInvokeDefaultOpts(opts) 45 var rv LookupProxyResult 46 err := ctx.Invoke("aws:rds/getProxy:getProxy", 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 getProxy. 54 type LookupProxyArgs struct { 55 // Name of the DB proxy. 56 Name string `pulumi:"name"` 57 } 58 59 // A collection of values returned by getProxy. 60 type LookupProxyResult struct { 61 // ARN of the DB Proxy. 62 Arn string `pulumi:"arn"` 63 // Configuration(s) with authorization mechanisms to connect to the associated instance or cluster. 64 Auths []GetProxyAuth `pulumi:"auths"` 65 // Whether the proxy includes detailed information about SQL statements in its logs. 66 DebugLogging bool `pulumi:"debugLogging"` 67 // Endpoint that you can use to connect to the DB proxy. 68 Endpoint string `pulumi:"endpoint"` 69 // Kinds of databases that the proxy can connect to. 70 EngineFamily string `pulumi:"engineFamily"` 71 // The provider-assigned unique ID for this managed resource. 72 Id string `pulumi:"id"` 73 // Number of seconds a connection to the proxy can have no activity before the proxy drops the client connection. 74 IdleClientTimeout int `pulumi:"idleClientTimeout"` 75 Name string `pulumi:"name"` 76 // Whether Transport Layer Security (TLS) encryption is required for connections to the proxy. 77 RequireTls bool `pulumi:"requireTls"` 78 // ARN for the IAM role that the proxy uses to access Amazon Secrets Manager. 79 RoleArn string `pulumi:"roleArn"` 80 // Provides the VPC ID of the DB proxy. 81 VpcId string `pulumi:"vpcId"` 82 // Provides a list of VPC security groups that the proxy belongs to. 83 VpcSecurityGroupIds []string `pulumi:"vpcSecurityGroupIds"` 84 // EC2 subnet IDs for the proxy. 85 VpcSubnetIds []string `pulumi:"vpcSubnetIds"` 86 } 87 88 func LookupProxyOutput(ctx *pulumi.Context, args LookupProxyOutputArgs, opts ...pulumi.InvokeOption) LookupProxyResultOutput { 89 return pulumi.ToOutputWithContext(context.Background(), args). 90 ApplyT(func(v interface{}) (LookupProxyResult, error) { 91 args := v.(LookupProxyArgs) 92 r, err := LookupProxy(ctx, &args, opts...) 93 var s LookupProxyResult 94 if r != nil { 95 s = *r 96 } 97 return s, err 98 }).(LookupProxyResultOutput) 99 } 100 101 // A collection of arguments for invoking getProxy. 102 type LookupProxyOutputArgs struct { 103 // Name of the DB proxy. 104 Name pulumi.StringInput `pulumi:"name"` 105 } 106 107 func (LookupProxyOutputArgs) ElementType() reflect.Type { 108 return reflect.TypeOf((*LookupProxyArgs)(nil)).Elem() 109 } 110 111 // A collection of values returned by getProxy. 112 type LookupProxyResultOutput struct{ *pulumi.OutputState } 113 114 func (LookupProxyResultOutput) ElementType() reflect.Type { 115 return reflect.TypeOf((*LookupProxyResult)(nil)).Elem() 116 } 117 118 func (o LookupProxyResultOutput) ToLookupProxyResultOutput() LookupProxyResultOutput { 119 return o 120 } 121 122 func (o LookupProxyResultOutput) ToLookupProxyResultOutputWithContext(ctx context.Context) LookupProxyResultOutput { 123 return o 124 } 125 126 // ARN of the DB Proxy. 127 func (o LookupProxyResultOutput) Arn() pulumi.StringOutput { 128 return o.ApplyT(func(v LookupProxyResult) string { return v.Arn }).(pulumi.StringOutput) 129 } 130 131 // Configuration(s) with authorization mechanisms to connect to the associated instance or cluster. 132 func (o LookupProxyResultOutput) Auths() GetProxyAuthArrayOutput { 133 return o.ApplyT(func(v LookupProxyResult) []GetProxyAuth { return v.Auths }).(GetProxyAuthArrayOutput) 134 } 135 136 // Whether the proxy includes detailed information about SQL statements in its logs. 137 func (o LookupProxyResultOutput) DebugLogging() pulumi.BoolOutput { 138 return o.ApplyT(func(v LookupProxyResult) bool { return v.DebugLogging }).(pulumi.BoolOutput) 139 } 140 141 // Endpoint that you can use to connect to the DB proxy. 142 func (o LookupProxyResultOutput) Endpoint() pulumi.StringOutput { 143 return o.ApplyT(func(v LookupProxyResult) string { return v.Endpoint }).(pulumi.StringOutput) 144 } 145 146 // Kinds of databases that the proxy can connect to. 147 func (o LookupProxyResultOutput) EngineFamily() pulumi.StringOutput { 148 return o.ApplyT(func(v LookupProxyResult) string { return v.EngineFamily }).(pulumi.StringOutput) 149 } 150 151 // The provider-assigned unique ID for this managed resource. 152 func (o LookupProxyResultOutput) Id() pulumi.StringOutput { 153 return o.ApplyT(func(v LookupProxyResult) string { return v.Id }).(pulumi.StringOutput) 154 } 155 156 // Number of seconds a connection to the proxy can have no activity before the proxy drops the client connection. 157 func (o LookupProxyResultOutput) IdleClientTimeout() pulumi.IntOutput { 158 return o.ApplyT(func(v LookupProxyResult) int { return v.IdleClientTimeout }).(pulumi.IntOutput) 159 } 160 161 func (o LookupProxyResultOutput) Name() pulumi.StringOutput { 162 return o.ApplyT(func(v LookupProxyResult) string { return v.Name }).(pulumi.StringOutput) 163 } 164 165 // Whether Transport Layer Security (TLS) encryption is required for connections to the proxy. 166 func (o LookupProxyResultOutput) RequireTls() pulumi.BoolOutput { 167 return o.ApplyT(func(v LookupProxyResult) bool { return v.RequireTls }).(pulumi.BoolOutput) 168 } 169 170 // ARN for the IAM role that the proxy uses to access Amazon Secrets Manager. 171 func (o LookupProxyResultOutput) RoleArn() pulumi.StringOutput { 172 return o.ApplyT(func(v LookupProxyResult) string { return v.RoleArn }).(pulumi.StringOutput) 173 } 174 175 // Provides the VPC ID of the DB proxy. 176 func (o LookupProxyResultOutput) VpcId() pulumi.StringOutput { 177 return o.ApplyT(func(v LookupProxyResult) string { return v.VpcId }).(pulumi.StringOutput) 178 } 179 180 // Provides a list of VPC security groups that the proxy belongs to. 181 func (o LookupProxyResultOutput) VpcSecurityGroupIds() pulumi.StringArrayOutput { 182 return o.ApplyT(func(v LookupProxyResult) []string { return v.VpcSecurityGroupIds }).(pulumi.StringArrayOutput) 183 } 184 185 // EC2 subnet IDs for the proxy. 186 func (o LookupProxyResultOutput) VpcSubnetIds() pulumi.StringArrayOutput { 187 return o.ApplyT(func(v LookupProxyResult) []string { return v.VpcSubnetIds }).(pulumi.StringArrayOutput) 188 } 189 190 func init() { 191 pulumi.RegisterOutputType(LookupProxyResultOutput{}) 192 }