github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2clientvpn/getEndpoint.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 ec2clientvpn 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 // Get information on an EC2 Client VPN endpoint. 15 // 16 // ## Example Usage 17 // 18 // ### By Filter 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2clientvpn" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := ec2clientvpn.LookupEndpoint(ctx, &ec2clientvpn.LookupEndpointArgs{ 34 // Filters: []ec2clientvpn.GetEndpointFilter{ 35 // { 36 // Name: "tag:Name", 37 // Values: []string{ 38 // "ExampleVpn", 39 // }, 40 // }, 41 // }, 42 // }, nil) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ### By Identifier 54 // 55 // <!--Start PulumiCodeChooser --> 56 // ```go 57 // package main 58 // 59 // import ( 60 // 61 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2clientvpn" 62 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 63 // 64 // ) 65 // 66 // func main() { 67 // pulumi.Run(func(ctx *pulumi.Context) error { 68 // _, err := ec2clientvpn.LookupEndpoint(ctx, &ec2clientvpn.LookupEndpointArgs{ 69 // ClientVpnEndpointId: pulumi.StringRef("cvpn-endpoint-083cf50d6eb314f21"), 70 // }, nil) 71 // if err != nil { 72 // return err 73 // } 74 // return nil 75 // }) 76 // } 77 // 78 // ``` 79 // <!--End PulumiCodeChooser --> 80 func LookupEndpoint(ctx *pulumi.Context, args *LookupEndpointArgs, opts ...pulumi.InvokeOption) (*LookupEndpointResult, error) { 81 opts = internal.PkgInvokeDefaultOpts(opts) 82 var rv LookupEndpointResult 83 err := ctx.Invoke("aws:ec2clientvpn/getEndpoint:getEndpoint", args, &rv, opts...) 84 if err != nil { 85 return nil, err 86 } 87 return &rv, nil 88 } 89 90 // A collection of arguments for invoking getEndpoint. 91 type LookupEndpointArgs struct { 92 // ID of the Client VPN endpoint. 93 ClientVpnEndpointId *string `pulumi:"clientVpnEndpointId"` 94 // One or more configuration blocks containing name-values filters. Detailed below. 95 Filters []GetEndpointFilter `pulumi:"filters"` 96 // Map of tags, each pair of which must exactly match a pair on the desired endpoint. 97 Tags map[string]string `pulumi:"tags"` 98 } 99 100 // A collection of values returned by getEndpoint. 101 type LookupEndpointResult struct { 102 // The ARN of the Client VPN endpoint. 103 Arn string `pulumi:"arn"` 104 // Information about the authentication method used by the Client VPN endpoint. 105 AuthenticationOptions []GetEndpointAuthenticationOption `pulumi:"authenticationOptions"` 106 // IPv4 address range, in CIDR notation, from which client IP addresses are assigned. 107 ClientCidrBlock string `pulumi:"clientCidrBlock"` 108 // The options for managing connection authorization for new client connections. 109 ClientConnectOptions []GetEndpointClientConnectOption `pulumi:"clientConnectOptions"` 110 // Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established. 111 ClientLoginBannerOptions []GetEndpointClientLoginBannerOption `pulumi:"clientLoginBannerOptions"` 112 ClientVpnEndpointId string `pulumi:"clientVpnEndpointId"` 113 // Information about the client connection logging options for the Client VPN endpoint. 114 ConnectionLogOptions []GetEndpointConnectionLogOption `pulumi:"connectionLogOptions"` 115 // Brief description of the endpoint. 116 Description string `pulumi:"description"` 117 // DNS name to be used by clients when connecting to the Client VPN endpoint. 118 DnsName string `pulumi:"dnsName"` 119 // Information about the DNS servers to be used for DNS resolution. 120 DnsServers []string `pulumi:"dnsServers"` 121 Filters []GetEndpointFilter `pulumi:"filters"` 122 // The provider-assigned unique ID for this managed resource. 123 Id string `pulumi:"id"` 124 // IDs of the security groups for the target network associated with the Client VPN endpoint. 125 SecurityGroupIds []string `pulumi:"securityGroupIds"` 126 // Whether the self-service portal for the Client VPN endpoint is enabled. 127 SelfServicePortal string `pulumi:"selfServicePortal"` 128 // The URL of the self-service portal. 129 SelfServicePortalUrl string `pulumi:"selfServicePortalUrl"` 130 // The ARN of the server certificate. 131 ServerCertificateArn string `pulumi:"serverCertificateArn"` 132 // The maximum VPN session duration time in hours. 133 SessionTimeoutHours int `pulumi:"sessionTimeoutHours"` 134 // Whether split-tunnel is enabled in the AWS Client VPN endpoint. 135 SplitTunnel bool `pulumi:"splitTunnel"` 136 Tags map[string]string `pulumi:"tags"` 137 // Transport protocol used by the Client VPN endpoint. 138 TransportProtocol string `pulumi:"transportProtocol"` 139 // ID of the VPC associated with the Client VPN endpoint. 140 VpcId string `pulumi:"vpcId"` 141 // Port number for the Client VPN endpoint. 142 VpnPort int `pulumi:"vpnPort"` 143 } 144 145 func LookupEndpointOutput(ctx *pulumi.Context, args LookupEndpointOutputArgs, opts ...pulumi.InvokeOption) LookupEndpointResultOutput { 146 return pulumi.ToOutputWithContext(context.Background(), args). 147 ApplyT(func(v interface{}) (LookupEndpointResult, error) { 148 args := v.(LookupEndpointArgs) 149 r, err := LookupEndpoint(ctx, &args, opts...) 150 var s LookupEndpointResult 151 if r != nil { 152 s = *r 153 } 154 return s, err 155 }).(LookupEndpointResultOutput) 156 } 157 158 // A collection of arguments for invoking getEndpoint. 159 type LookupEndpointOutputArgs struct { 160 // ID of the Client VPN endpoint. 161 ClientVpnEndpointId pulumi.StringPtrInput `pulumi:"clientVpnEndpointId"` 162 // One or more configuration blocks containing name-values filters. Detailed below. 163 Filters GetEndpointFilterArrayInput `pulumi:"filters"` 164 // Map of tags, each pair of which must exactly match a pair on the desired endpoint. 165 Tags pulumi.StringMapInput `pulumi:"tags"` 166 } 167 168 func (LookupEndpointOutputArgs) ElementType() reflect.Type { 169 return reflect.TypeOf((*LookupEndpointArgs)(nil)).Elem() 170 } 171 172 // A collection of values returned by getEndpoint. 173 type LookupEndpointResultOutput struct{ *pulumi.OutputState } 174 175 func (LookupEndpointResultOutput) ElementType() reflect.Type { 176 return reflect.TypeOf((*LookupEndpointResult)(nil)).Elem() 177 } 178 179 func (o LookupEndpointResultOutput) ToLookupEndpointResultOutput() LookupEndpointResultOutput { 180 return o 181 } 182 183 func (o LookupEndpointResultOutput) ToLookupEndpointResultOutputWithContext(ctx context.Context) LookupEndpointResultOutput { 184 return o 185 } 186 187 // The ARN of the Client VPN endpoint. 188 func (o LookupEndpointResultOutput) Arn() pulumi.StringOutput { 189 return o.ApplyT(func(v LookupEndpointResult) string { return v.Arn }).(pulumi.StringOutput) 190 } 191 192 // Information about the authentication method used by the Client VPN endpoint. 193 func (o LookupEndpointResultOutput) AuthenticationOptions() GetEndpointAuthenticationOptionArrayOutput { 194 return o.ApplyT(func(v LookupEndpointResult) []GetEndpointAuthenticationOption { return v.AuthenticationOptions }).(GetEndpointAuthenticationOptionArrayOutput) 195 } 196 197 // IPv4 address range, in CIDR notation, from which client IP addresses are assigned. 198 func (o LookupEndpointResultOutput) ClientCidrBlock() pulumi.StringOutput { 199 return o.ApplyT(func(v LookupEndpointResult) string { return v.ClientCidrBlock }).(pulumi.StringOutput) 200 } 201 202 // The options for managing connection authorization for new client connections. 203 func (o LookupEndpointResultOutput) ClientConnectOptions() GetEndpointClientConnectOptionArrayOutput { 204 return o.ApplyT(func(v LookupEndpointResult) []GetEndpointClientConnectOption { return v.ClientConnectOptions }).(GetEndpointClientConnectOptionArrayOutput) 205 } 206 207 // Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established. 208 func (o LookupEndpointResultOutput) ClientLoginBannerOptions() GetEndpointClientLoginBannerOptionArrayOutput { 209 return o.ApplyT(func(v LookupEndpointResult) []GetEndpointClientLoginBannerOption { return v.ClientLoginBannerOptions }).(GetEndpointClientLoginBannerOptionArrayOutput) 210 } 211 212 func (o LookupEndpointResultOutput) ClientVpnEndpointId() pulumi.StringOutput { 213 return o.ApplyT(func(v LookupEndpointResult) string { return v.ClientVpnEndpointId }).(pulumi.StringOutput) 214 } 215 216 // Information about the client connection logging options for the Client VPN endpoint. 217 func (o LookupEndpointResultOutput) ConnectionLogOptions() GetEndpointConnectionLogOptionArrayOutput { 218 return o.ApplyT(func(v LookupEndpointResult) []GetEndpointConnectionLogOption { return v.ConnectionLogOptions }).(GetEndpointConnectionLogOptionArrayOutput) 219 } 220 221 // Brief description of the endpoint. 222 func (o LookupEndpointResultOutput) Description() pulumi.StringOutput { 223 return o.ApplyT(func(v LookupEndpointResult) string { return v.Description }).(pulumi.StringOutput) 224 } 225 226 // DNS name to be used by clients when connecting to the Client VPN endpoint. 227 func (o LookupEndpointResultOutput) DnsName() pulumi.StringOutput { 228 return o.ApplyT(func(v LookupEndpointResult) string { return v.DnsName }).(pulumi.StringOutput) 229 } 230 231 // Information about the DNS servers to be used for DNS resolution. 232 func (o LookupEndpointResultOutput) DnsServers() pulumi.StringArrayOutput { 233 return o.ApplyT(func(v LookupEndpointResult) []string { return v.DnsServers }).(pulumi.StringArrayOutput) 234 } 235 236 func (o LookupEndpointResultOutput) Filters() GetEndpointFilterArrayOutput { 237 return o.ApplyT(func(v LookupEndpointResult) []GetEndpointFilter { return v.Filters }).(GetEndpointFilterArrayOutput) 238 } 239 240 // The provider-assigned unique ID for this managed resource. 241 func (o LookupEndpointResultOutput) Id() pulumi.StringOutput { 242 return o.ApplyT(func(v LookupEndpointResult) string { return v.Id }).(pulumi.StringOutput) 243 } 244 245 // IDs of the security groups for the target network associated with the Client VPN endpoint. 246 func (o LookupEndpointResultOutput) SecurityGroupIds() pulumi.StringArrayOutput { 247 return o.ApplyT(func(v LookupEndpointResult) []string { return v.SecurityGroupIds }).(pulumi.StringArrayOutput) 248 } 249 250 // Whether the self-service portal for the Client VPN endpoint is enabled. 251 func (o LookupEndpointResultOutput) SelfServicePortal() pulumi.StringOutput { 252 return o.ApplyT(func(v LookupEndpointResult) string { return v.SelfServicePortal }).(pulumi.StringOutput) 253 } 254 255 // The URL of the self-service portal. 256 func (o LookupEndpointResultOutput) SelfServicePortalUrl() pulumi.StringOutput { 257 return o.ApplyT(func(v LookupEndpointResult) string { return v.SelfServicePortalUrl }).(pulumi.StringOutput) 258 } 259 260 // The ARN of the server certificate. 261 func (o LookupEndpointResultOutput) ServerCertificateArn() pulumi.StringOutput { 262 return o.ApplyT(func(v LookupEndpointResult) string { return v.ServerCertificateArn }).(pulumi.StringOutput) 263 } 264 265 // The maximum VPN session duration time in hours. 266 func (o LookupEndpointResultOutput) SessionTimeoutHours() pulumi.IntOutput { 267 return o.ApplyT(func(v LookupEndpointResult) int { return v.SessionTimeoutHours }).(pulumi.IntOutput) 268 } 269 270 // Whether split-tunnel is enabled in the AWS Client VPN endpoint. 271 func (o LookupEndpointResultOutput) SplitTunnel() pulumi.BoolOutput { 272 return o.ApplyT(func(v LookupEndpointResult) bool { return v.SplitTunnel }).(pulumi.BoolOutput) 273 } 274 275 func (o LookupEndpointResultOutput) Tags() pulumi.StringMapOutput { 276 return o.ApplyT(func(v LookupEndpointResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput) 277 } 278 279 // Transport protocol used by the Client VPN endpoint. 280 func (o LookupEndpointResultOutput) TransportProtocol() pulumi.StringOutput { 281 return o.ApplyT(func(v LookupEndpointResult) string { return v.TransportProtocol }).(pulumi.StringOutput) 282 } 283 284 // ID of the VPC associated with the Client VPN endpoint. 285 func (o LookupEndpointResultOutput) VpcId() pulumi.StringOutput { 286 return o.ApplyT(func(v LookupEndpointResult) string { return v.VpcId }).(pulumi.StringOutput) 287 } 288 289 // Port number for the Client VPN endpoint. 290 func (o LookupEndpointResultOutput) VpnPort() pulumi.IntOutput { 291 return o.ApplyT(func(v LookupEndpointResult) int { return v.VpnPort }).(pulumi.IntOutput) 292 } 293 294 func init() { 295 pulumi.RegisterOutputType(LookupEndpointResultOutput{}) 296 }