github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2clientvpn/endpoint.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  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an AWS Client VPN endpoint for OpenVPN clients. For more information on usage, please see the
    16  // [AWS Client VPN Administrator's Guide](https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/what-is.html).
    17  //
    18  // ## Example Usage
    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.NewEndpoint(ctx, "example", &ec2clientvpn.EndpointArgs{
    34  //				Description:          pulumi.String("clientvpn-example"),
    35  //				ServerCertificateArn: pulumi.Any(cert.Arn),
    36  //				ClientCidrBlock:      pulumi.String("10.0.0.0/16"),
    37  //				AuthenticationOptions: ec2clientvpn.EndpointAuthenticationOptionArray{
    38  //					&ec2clientvpn.EndpointAuthenticationOptionArgs{
    39  //						Type:                    pulumi.String("certificate-authentication"),
    40  //						RootCertificateChainArn: pulumi.Any(rootCert.Arn),
    41  //					},
    42  //				},
    43  //				ConnectionLogOptions: &ec2clientvpn.EndpointConnectionLogOptionsArgs{
    44  //					Enabled:             pulumi.Bool(true),
    45  //					CloudwatchLogGroup:  pulumi.Any(lg.Name),
    46  //					CloudwatchLogStream: pulumi.Any(ls.Name),
    47  //				},
    48  //			})
    49  //			if err != nil {
    50  //				return err
    51  //			}
    52  //			return nil
    53  //		})
    54  //	}
    55  //
    56  // ```
    57  // <!--End PulumiCodeChooser -->
    58  //
    59  // ## Import
    60  //
    61  // Using `pulumi import`, import AWS Client VPN endpoints using the `id` value found via `aws ec2 describe-client-vpn-endpoints`. For example:
    62  //
    63  // ```sh
    64  // $ pulumi import aws:ec2clientvpn/endpoint:Endpoint example cvpn-endpoint-0ac3a1abbccddd666
    65  // ```
    66  type Endpoint struct {
    67  	pulumi.CustomResourceState
    68  
    69  	// The ARN of the Client VPN endpoint.
    70  	Arn pulumi.StringOutput `pulumi:"arn"`
    71  	// Information about the authentication method to be used to authenticate clients.
    72  	AuthenticationOptions EndpointAuthenticationOptionArrayOutput `pulumi:"authenticationOptions"`
    73  	// The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.
    74  	ClientCidrBlock pulumi.StringOutput `pulumi:"clientCidrBlock"`
    75  	// The options for managing connection authorization for new client connections.
    76  	ClientConnectOptions EndpointClientConnectOptionsOutput `pulumi:"clientConnectOptions"`
    77  	// Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
    78  	ClientLoginBannerOptions EndpointClientLoginBannerOptionsOutput `pulumi:"clientLoginBannerOptions"`
    79  	// Information about the client connection logging options.
    80  	ConnectionLogOptions EndpointConnectionLogOptionsOutput `pulumi:"connectionLogOptions"`
    81  	// A brief description of the Client VPN endpoint.
    82  	Description pulumi.StringPtrOutput `pulumi:"description"`
    83  	// The DNS name to be used by clients when establishing their VPN session.
    84  	DnsName pulumi.StringOutput `pulumi:"dnsName"`
    85  	// Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address of the connecting device is used.
    86  	DnsServers pulumi.StringArrayOutput `pulumi:"dnsServers"`
    87  	// The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.
    88  	SecurityGroupIds pulumi.StringArrayOutput `pulumi:"securityGroupIds"`
    89  	// Specify whether to enable the self-service portal for the Client VPN endpoint. Values can be `enabled` or `disabled`. Default value is `disabled`.
    90  	SelfServicePortal pulumi.StringPtrOutput `pulumi:"selfServicePortal"`
    91  	// The URL of the self-service portal.
    92  	SelfServicePortalUrl pulumi.StringOutput `pulumi:"selfServicePortalUrl"`
    93  	// The ARN of the ACM server certificate.
    94  	ServerCertificateArn pulumi.StringOutput `pulumi:"serverCertificateArn"`
    95  	// The maximum session duration is a trigger by which end-users are required to re-authenticate prior to establishing a VPN session. Default value is `24` - Valid values: `8 | 10 | 12 | 24`
    96  	SessionTimeoutHours pulumi.IntPtrOutput `pulumi:"sessionTimeoutHours"`
    97  	// Indicates whether split-tunnel is enabled on VPN endpoint. Default value is `false`.
    98  	SplitTunnel pulumi.BoolPtrOutput `pulumi:"splitTunnel"`
    99  	// A mapping of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   100  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   101  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   102  	//
   103  	// Deprecated: Please use `tags` instead.
   104  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   105  	// The transport protocol to be used by the VPN session. Default value is `udp`.
   106  	TransportProtocol pulumi.StringPtrOutput `pulumi:"transportProtocol"`
   107  	// The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
   108  	VpcId pulumi.StringOutput `pulumi:"vpcId"`
   109  	// The port number for the Client VPN endpoint. Valid values are `443` and `1194`. Default value is `443`.
   110  	VpnPort pulumi.IntPtrOutput `pulumi:"vpnPort"`
   111  }
   112  
   113  // NewEndpoint registers a new resource with the given unique name, arguments, and options.
   114  func NewEndpoint(ctx *pulumi.Context,
   115  	name string, args *EndpointArgs, opts ...pulumi.ResourceOption) (*Endpoint, error) {
   116  	if args == nil {
   117  		return nil, errors.New("missing one or more required arguments")
   118  	}
   119  
   120  	if args.AuthenticationOptions == nil {
   121  		return nil, errors.New("invalid value for required argument 'AuthenticationOptions'")
   122  	}
   123  	if args.ClientCidrBlock == nil {
   124  		return nil, errors.New("invalid value for required argument 'ClientCidrBlock'")
   125  	}
   126  	if args.ConnectionLogOptions == nil {
   127  		return nil, errors.New("invalid value for required argument 'ConnectionLogOptions'")
   128  	}
   129  	if args.ServerCertificateArn == nil {
   130  		return nil, errors.New("invalid value for required argument 'ServerCertificateArn'")
   131  	}
   132  	opts = internal.PkgResourceDefaultOpts(opts)
   133  	var resource Endpoint
   134  	err := ctx.RegisterResource("aws:ec2clientvpn/endpoint:Endpoint", name, args, &resource, opts...)
   135  	if err != nil {
   136  		return nil, err
   137  	}
   138  	return &resource, nil
   139  }
   140  
   141  // GetEndpoint gets an existing Endpoint resource's state with the given name, ID, and optional
   142  // state properties that are used to uniquely qualify the lookup (nil if not required).
   143  func GetEndpoint(ctx *pulumi.Context,
   144  	name string, id pulumi.IDInput, state *EndpointState, opts ...pulumi.ResourceOption) (*Endpoint, error) {
   145  	var resource Endpoint
   146  	err := ctx.ReadResource("aws:ec2clientvpn/endpoint:Endpoint", name, id, state, &resource, opts...)
   147  	if err != nil {
   148  		return nil, err
   149  	}
   150  	return &resource, nil
   151  }
   152  
   153  // Input properties used for looking up and filtering Endpoint resources.
   154  type endpointState struct {
   155  	// The ARN of the Client VPN endpoint.
   156  	Arn *string `pulumi:"arn"`
   157  	// Information about the authentication method to be used to authenticate clients.
   158  	AuthenticationOptions []EndpointAuthenticationOption `pulumi:"authenticationOptions"`
   159  	// The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.
   160  	ClientCidrBlock *string `pulumi:"clientCidrBlock"`
   161  	// The options for managing connection authorization for new client connections.
   162  	ClientConnectOptions *EndpointClientConnectOptions `pulumi:"clientConnectOptions"`
   163  	// Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
   164  	ClientLoginBannerOptions *EndpointClientLoginBannerOptions `pulumi:"clientLoginBannerOptions"`
   165  	// Information about the client connection logging options.
   166  	ConnectionLogOptions *EndpointConnectionLogOptions `pulumi:"connectionLogOptions"`
   167  	// A brief description of the Client VPN endpoint.
   168  	Description *string `pulumi:"description"`
   169  	// The DNS name to be used by clients when establishing their VPN session.
   170  	DnsName *string `pulumi:"dnsName"`
   171  	// Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address of the connecting device is used.
   172  	DnsServers []string `pulumi:"dnsServers"`
   173  	// The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.
   174  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   175  	// Specify whether to enable the self-service portal for the Client VPN endpoint. Values can be `enabled` or `disabled`. Default value is `disabled`.
   176  	SelfServicePortal *string `pulumi:"selfServicePortal"`
   177  	// The URL of the self-service portal.
   178  	SelfServicePortalUrl *string `pulumi:"selfServicePortalUrl"`
   179  	// The ARN of the ACM server certificate.
   180  	ServerCertificateArn *string `pulumi:"serverCertificateArn"`
   181  	// The maximum session duration is a trigger by which end-users are required to re-authenticate prior to establishing a VPN session. Default value is `24` - Valid values: `8 | 10 | 12 | 24`
   182  	SessionTimeoutHours *int `pulumi:"sessionTimeoutHours"`
   183  	// Indicates whether split-tunnel is enabled on VPN endpoint. Default value is `false`.
   184  	SplitTunnel *bool `pulumi:"splitTunnel"`
   185  	// A mapping of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   186  	Tags map[string]string `pulumi:"tags"`
   187  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   188  	//
   189  	// Deprecated: Please use `tags` instead.
   190  	TagsAll map[string]string `pulumi:"tagsAll"`
   191  	// The transport protocol to be used by the VPN session. Default value is `udp`.
   192  	TransportProtocol *string `pulumi:"transportProtocol"`
   193  	// The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
   194  	VpcId *string `pulumi:"vpcId"`
   195  	// The port number for the Client VPN endpoint. Valid values are `443` and `1194`. Default value is `443`.
   196  	VpnPort *int `pulumi:"vpnPort"`
   197  }
   198  
   199  type EndpointState struct {
   200  	// The ARN of the Client VPN endpoint.
   201  	Arn pulumi.StringPtrInput
   202  	// Information about the authentication method to be used to authenticate clients.
   203  	AuthenticationOptions EndpointAuthenticationOptionArrayInput
   204  	// The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.
   205  	ClientCidrBlock pulumi.StringPtrInput
   206  	// The options for managing connection authorization for new client connections.
   207  	ClientConnectOptions EndpointClientConnectOptionsPtrInput
   208  	// Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
   209  	ClientLoginBannerOptions EndpointClientLoginBannerOptionsPtrInput
   210  	// Information about the client connection logging options.
   211  	ConnectionLogOptions EndpointConnectionLogOptionsPtrInput
   212  	// A brief description of the Client VPN endpoint.
   213  	Description pulumi.StringPtrInput
   214  	// The DNS name to be used by clients when establishing their VPN session.
   215  	DnsName pulumi.StringPtrInput
   216  	// Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address of the connecting device is used.
   217  	DnsServers pulumi.StringArrayInput
   218  	// The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.
   219  	SecurityGroupIds pulumi.StringArrayInput
   220  	// Specify whether to enable the self-service portal for the Client VPN endpoint. Values can be `enabled` or `disabled`. Default value is `disabled`.
   221  	SelfServicePortal pulumi.StringPtrInput
   222  	// The URL of the self-service portal.
   223  	SelfServicePortalUrl pulumi.StringPtrInput
   224  	// The ARN of the ACM server certificate.
   225  	ServerCertificateArn pulumi.StringPtrInput
   226  	// The maximum session duration is a trigger by which end-users are required to re-authenticate prior to establishing a VPN session. Default value is `24` - Valid values: `8 | 10 | 12 | 24`
   227  	SessionTimeoutHours pulumi.IntPtrInput
   228  	// Indicates whether split-tunnel is enabled on VPN endpoint. Default value is `false`.
   229  	SplitTunnel pulumi.BoolPtrInput
   230  	// A mapping of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   231  	Tags pulumi.StringMapInput
   232  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   233  	//
   234  	// Deprecated: Please use `tags` instead.
   235  	TagsAll pulumi.StringMapInput
   236  	// The transport protocol to be used by the VPN session. Default value is `udp`.
   237  	TransportProtocol pulumi.StringPtrInput
   238  	// The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
   239  	VpcId pulumi.StringPtrInput
   240  	// The port number for the Client VPN endpoint. Valid values are `443` and `1194`. Default value is `443`.
   241  	VpnPort pulumi.IntPtrInput
   242  }
   243  
   244  func (EndpointState) ElementType() reflect.Type {
   245  	return reflect.TypeOf((*endpointState)(nil)).Elem()
   246  }
   247  
   248  type endpointArgs struct {
   249  	// Information about the authentication method to be used to authenticate clients.
   250  	AuthenticationOptions []EndpointAuthenticationOption `pulumi:"authenticationOptions"`
   251  	// The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.
   252  	ClientCidrBlock string `pulumi:"clientCidrBlock"`
   253  	// The options for managing connection authorization for new client connections.
   254  	ClientConnectOptions *EndpointClientConnectOptions `pulumi:"clientConnectOptions"`
   255  	// Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
   256  	ClientLoginBannerOptions *EndpointClientLoginBannerOptions `pulumi:"clientLoginBannerOptions"`
   257  	// Information about the client connection logging options.
   258  	ConnectionLogOptions EndpointConnectionLogOptions `pulumi:"connectionLogOptions"`
   259  	// A brief description of the Client VPN endpoint.
   260  	Description *string `pulumi:"description"`
   261  	// Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address of the connecting device is used.
   262  	DnsServers []string `pulumi:"dnsServers"`
   263  	// The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.
   264  	SecurityGroupIds []string `pulumi:"securityGroupIds"`
   265  	// Specify whether to enable the self-service portal for the Client VPN endpoint. Values can be `enabled` or `disabled`. Default value is `disabled`.
   266  	SelfServicePortal *string `pulumi:"selfServicePortal"`
   267  	// The ARN of the ACM server certificate.
   268  	ServerCertificateArn string `pulumi:"serverCertificateArn"`
   269  	// The maximum session duration is a trigger by which end-users are required to re-authenticate prior to establishing a VPN session. Default value is `24` - Valid values: `8 | 10 | 12 | 24`
   270  	SessionTimeoutHours *int `pulumi:"sessionTimeoutHours"`
   271  	// Indicates whether split-tunnel is enabled on VPN endpoint. Default value is `false`.
   272  	SplitTunnel *bool `pulumi:"splitTunnel"`
   273  	// A mapping of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   274  	Tags map[string]string `pulumi:"tags"`
   275  	// The transport protocol to be used by the VPN session. Default value is `udp`.
   276  	TransportProtocol *string `pulumi:"transportProtocol"`
   277  	// The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
   278  	VpcId *string `pulumi:"vpcId"`
   279  	// The port number for the Client VPN endpoint. Valid values are `443` and `1194`. Default value is `443`.
   280  	VpnPort *int `pulumi:"vpnPort"`
   281  }
   282  
   283  // The set of arguments for constructing a Endpoint resource.
   284  type EndpointArgs struct {
   285  	// Information about the authentication method to be used to authenticate clients.
   286  	AuthenticationOptions EndpointAuthenticationOptionArrayInput
   287  	// The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.
   288  	ClientCidrBlock pulumi.StringInput
   289  	// The options for managing connection authorization for new client connections.
   290  	ClientConnectOptions EndpointClientConnectOptionsPtrInput
   291  	// Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
   292  	ClientLoginBannerOptions EndpointClientLoginBannerOptionsPtrInput
   293  	// Information about the client connection logging options.
   294  	ConnectionLogOptions EndpointConnectionLogOptionsInput
   295  	// A brief description of the Client VPN endpoint.
   296  	Description pulumi.StringPtrInput
   297  	// Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address of the connecting device is used.
   298  	DnsServers pulumi.StringArrayInput
   299  	// The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.
   300  	SecurityGroupIds pulumi.StringArrayInput
   301  	// Specify whether to enable the self-service portal for the Client VPN endpoint. Values can be `enabled` or `disabled`. Default value is `disabled`.
   302  	SelfServicePortal pulumi.StringPtrInput
   303  	// The ARN of the ACM server certificate.
   304  	ServerCertificateArn pulumi.StringInput
   305  	// The maximum session duration is a trigger by which end-users are required to re-authenticate prior to establishing a VPN session. Default value is `24` - Valid values: `8 | 10 | 12 | 24`
   306  	SessionTimeoutHours pulumi.IntPtrInput
   307  	// Indicates whether split-tunnel is enabled on VPN endpoint. Default value is `false`.
   308  	SplitTunnel pulumi.BoolPtrInput
   309  	// A mapping of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   310  	Tags pulumi.StringMapInput
   311  	// The transport protocol to be used by the VPN session. Default value is `udp`.
   312  	TransportProtocol pulumi.StringPtrInput
   313  	// The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
   314  	VpcId pulumi.StringPtrInput
   315  	// The port number for the Client VPN endpoint. Valid values are `443` and `1194`. Default value is `443`.
   316  	VpnPort pulumi.IntPtrInput
   317  }
   318  
   319  func (EndpointArgs) ElementType() reflect.Type {
   320  	return reflect.TypeOf((*endpointArgs)(nil)).Elem()
   321  }
   322  
   323  type EndpointInput interface {
   324  	pulumi.Input
   325  
   326  	ToEndpointOutput() EndpointOutput
   327  	ToEndpointOutputWithContext(ctx context.Context) EndpointOutput
   328  }
   329  
   330  func (*Endpoint) ElementType() reflect.Type {
   331  	return reflect.TypeOf((**Endpoint)(nil)).Elem()
   332  }
   333  
   334  func (i *Endpoint) ToEndpointOutput() EndpointOutput {
   335  	return i.ToEndpointOutputWithContext(context.Background())
   336  }
   337  
   338  func (i *Endpoint) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput {
   339  	return pulumi.ToOutputWithContext(ctx, i).(EndpointOutput)
   340  }
   341  
   342  // EndpointArrayInput is an input type that accepts EndpointArray and EndpointArrayOutput values.
   343  // You can construct a concrete instance of `EndpointArrayInput` via:
   344  //
   345  //	EndpointArray{ EndpointArgs{...} }
   346  type EndpointArrayInput interface {
   347  	pulumi.Input
   348  
   349  	ToEndpointArrayOutput() EndpointArrayOutput
   350  	ToEndpointArrayOutputWithContext(context.Context) EndpointArrayOutput
   351  }
   352  
   353  type EndpointArray []EndpointInput
   354  
   355  func (EndpointArray) ElementType() reflect.Type {
   356  	return reflect.TypeOf((*[]*Endpoint)(nil)).Elem()
   357  }
   358  
   359  func (i EndpointArray) ToEndpointArrayOutput() EndpointArrayOutput {
   360  	return i.ToEndpointArrayOutputWithContext(context.Background())
   361  }
   362  
   363  func (i EndpointArray) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput {
   364  	return pulumi.ToOutputWithContext(ctx, i).(EndpointArrayOutput)
   365  }
   366  
   367  // EndpointMapInput is an input type that accepts EndpointMap and EndpointMapOutput values.
   368  // You can construct a concrete instance of `EndpointMapInput` via:
   369  //
   370  //	EndpointMap{ "key": EndpointArgs{...} }
   371  type EndpointMapInput interface {
   372  	pulumi.Input
   373  
   374  	ToEndpointMapOutput() EndpointMapOutput
   375  	ToEndpointMapOutputWithContext(context.Context) EndpointMapOutput
   376  }
   377  
   378  type EndpointMap map[string]EndpointInput
   379  
   380  func (EndpointMap) ElementType() reflect.Type {
   381  	return reflect.TypeOf((*map[string]*Endpoint)(nil)).Elem()
   382  }
   383  
   384  func (i EndpointMap) ToEndpointMapOutput() EndpointMapOutput {
   385  	return i.ToEndpointMapOutputWithContext(context.Background())
   386  }
   387  
   388  func (i EndpointMap) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput {
   389  	return pulumi.ToOutputWithContext(ctx, i).(EndpointMapOutput)
   390  }
   391  
   392  type EndpointOutput struct{ *pulumi.OutputState }
   393  
   394  func (EndpointOutput) ElementType() reflect.Type {
   395  	return reflect.TypeOf((**Endpoint)(nil)).Elem()
   396  }
   397  
   398  func (o EndpointOutput) ToEndpointOutput() EndpointOutput {
   399  	return o
   400  }
   401  
   402  func (o EndpointOutput) ToEndpointOutputWithContext(ctx context.Context) EndpointOutput {
   403  	return o
   404  }
   405  
   406  // The ARN of the Client VPN endpoint.
   407  func (o EndpointOutput) Arn() pulumi.StringOutput {
   408  	return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   409  }
   410  
   411  // Information about the authentication method to be used to authenticate clients.
   412  func (o EndpointOutput) AuthenticationOptions() EndpointAuthenticationOptionArrayOutput {
   413  	return o.ApplyT(func(v *Endpoint) EndpointAuthenticationOptionArrayOutput { return v.AuthenticationOptions }).(EndpointAuthenticationOptionArrayOutput)
   414  }
   415  
   416  // The IPv4 address range, in CIDR notation, from which to assign client IP addresses. The address range cannot overlap with the local CIDR of the VPC in which the associated subnet is located, or the routes that you add manually. The address range cannot be changed after the Client VPN endpoint has been created. The CIDR block should be /22 or greater.
   417  func (o EndpointOutput) ClientCidrBlock() pulumi.StringOutput {
   418  	return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.ClientCidrBlock }).(pulumi.StringOutput)
   419  }
   420  
   421  // The options for managing connection authorization for new client connections.
   422  func (o EndpointOutput) ClientConnectOptions() EndpointClientConnectOptionsOutput {
   423  	return o.ApplyT(func(v *Endpoint) EndpointClientConnectOptionsOutput { return v.ClientConnectOptions }).(EndpointClientConnectOptionsOutput)
   424  }
   425  
   426  // Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
   427  func (o EndpointOutput) ClientLoginBannerOptions() EndpointClientLoginBannerOptionsOutput {
   428  	return o.ApplyT(func(v *Endpoint) EndpointClientLoginBannerOptionsOutput { return v.ClientLoginBannerOptions }).(EndpointClientLoginBannerOptionsOutput)
   429  }
   430  
   431  // Information about the client connection logging options.
   432  func (o EndpointOutput) ConnectionLogOptions() EndpointConnectionLogOptionsOutput {
   433  	return o.ApplyT(func(v *Endpoint) EndpointConnectionLogOptionsOutput { return v.ConnectionLogOptions }).(EndpointConnectionLogOptionsOutput)
   434  }
   435  
   436  // A brief description of the Client VPN endpoint.
   437  func (o EndpointOutput) Description() pulumi.StringPtrOutput {
   438  	return o.ApplyT(func(v *Endpoint) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   439  }
   440  
   441  // The DNS name to be used by clients when establishing their VPN session.
   442  func (o EndpointOutput) DnsName() pulumi.StringOutput {
   443  	return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.DnsName }).(pulumi.StringOutput)
   444  }
   445  
   446  // Information about the DNS servers to be used for DNS resolution. A Client VPN endpoint can have up to two DNS servers. If no DNS server is specified, the DNS address of the connecting device is used.
   447  func (o EndpointOutput) DnsServers() pulumi.StringArrayOutput {
   448  	return o.ApplyT(func(v *Endpoint) pulumi.StringArrayOutput { return v.DnsServers }).(pulumi.StringArrayOutput)
   449  }
   450  
   451  // The IDs of one or more security groups to apply to the target network. You must also specify the ID of the VPC that contains the security groups.
   452  func (o EndpointOutput) SecurityGroupIds() pulumi.StringArrayOutput {
   453  	return o.ApplyT(func(v *Endpoint) pulumi.StringArrayOutput { return v.SecurityGroupIds }).(pulumi.StringArrayOutput)
   454  }
   455  
   456  // Specify whether to enable the self-service portal for the Client VPN endpoint. Values can be `enabled` or `disabled`. Default value is `disabled`.
   457  func (o EndpointOutput) SelfServicePortal() pulumi.StringPtrOutput {
   458  	return o.ApplyT(func(v *Endpoint) pulumi.StringPtrOutput { return v.SelfServicePortal }).(pulumi.StringPtrOutput)
   459  }
   460  
   461  // The URL of the self-service portal.
   462  func (o EndpointOutput) SelfServicePortalUrl() pulumi.StringOutput {
   463  	return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.SelfServicePortalUrl }).(pulumi.StringOutput)
   464  }
   465  
   466  // The ARN of the ACM server certificate.
   467  func (o EndpointOutput) ServerCertificateArn() pulumi.StringOutput {
   468  	return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.ServerCertificateArn }).(pulumi.StringOutput)
   469  }
   470  
   471  // The maximum session duration is a trigger by which end-users are required to re-authenticate prior to establishing a VPN session. Default value is `24` - Valid values: `8 | 10 | 12 | 24`
   472  func (o EndpointOutput) SessionTimeoutHours() pulumi.IntPtrOutput {
   473  	return o.ApplyT(func(v *Endpoint) pulumi.IntPtrOutput { return v.SessionTimeoutHours }).(pulumi.IntPtrOutput)
   474  }
   475  
   476  // Indicates whether split-tunnel is enabled on VPN endpoint. Default value is `false`.
   477  func (o EndpointOutput) SplitTunnel() pulumi.BoolPtrOutput {
   478  	return o.ApplyT(func(v *Endpoint) pulumi.BoolPtrOutput { return v.SplitTunnel }).(pulumi.BoolPtrOutput)
   479  }
   480  
   481  // A mapping of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   482  func (o EndpointOutput) Tags() pulumi.StringMapOutput {
   483  	return o.ApplyT(func(v *Endpoint) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   484  }
   485  
   486  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   487  //
   488  // Deprecated: Please use `tags` instead.
   489  func (o EndpointOutput) TagsAll() pulumi.StringMapOutput {
   490  	return o.ApplyT(func(v *Endpoint) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   491  }
   492  
   493  // The transport protocol to be used by the VPN session. Default value is `udp`.
   494  func (o EndpointOutput) TransportProtocol() pulumi.StringPtrOutput {
   495  	return o.ApplyT(func(v *Endpoint) pulumi.StringPtrOutput { return v.TransportProtocol }).(pulumi.StringPtrOutput)
   496  }
   497  
   498  // The ID of the VPC to associate with the Client VPN endpoint. If no security group IDs are specified in the request, the default security group for the VPC is applied.
   499  func (o EndpointOutput) VpcId() pulumi.StringOutput {
   500  	return o.ApplyT(func(v *Endpoint) pulumi.StringOutput { return v.VpcId }).(pulumi.StringOutput)
   501  }
   502  
   503  // The port number for the Client VPN endpoint. Valid values are `443` and `1194`. Default value is `443`.
   504  func (o EndpointOutput) VpnPort() pulumi.IntPtrOutput {
   505  	return o.ApplyT(func(v *Endpoint) pulumi.IntPtrOutput { return v.VpnPort }).(pulumi.IntPtrOutput)
   506  }
   507  
   508  type EndpointArrayOutput struct{ *pulumi.OutputState }
   509  
   510  func (EndpointArrayOutput) ElementType() reflect.Type {
   511  	return reflect.TypeOf((*[]*Endpoint)(nil)).Elem()
   512  }
   513  
   514  func (o EndpointArrayOutput) ToEndpointArrayOutput() EndpointArrayOutput {
   515  	return o
   516  }
   517  
   518  func (o EndpointArrayOutput) ToEndpointArrayOutputWithContext(ctx context.Context) EndpointArrayOutput {
   519  	return o
   520  }
   521  
   522  func (o EndpointArrayOutput) Index(i pulumi.IntInput) EndpointOutput {
   523  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Endpoint {
   524  		return vs[0].([]*Endpoint)[vs[1].(int)]
   525  	}).(EndpointOutput)
   526  }
   527  
   528  type EndpointMapOutput struct{ *pulumi.OutputState }
   529  
   530  func (EndpointMapOutput) ElementType() reflect.Type {
   531  	return reflect.TypeOf((*map[string]*Endpoint)(nil)).Elem()
   532  }
   533  
   534  func (o EndpointMapOutput) ToEndpointMapOutput() EndpointMapOutput {
   535  	return o
   536  }
   537  
   538  func (o EndpointMapOutput) ToEndpointMapOutputWithContext(ctx context.Context) EndpointMapOutput {
   539  	return o
   540  }
   541  
   542  func (o EndpointMapOutput) MapIndex(k pulumi.StringInput) EndpointOutput {
   543  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Endpoint {
   544  		return vs[0].(map[string]*Endpoint)[vs[1].(string)]
   545  	}).(EndpointOutput)
   546  }
   547  
   548  func init() {
   549  	pulumi.RegisterInputType(reflect.TypeOf((*EndpointInput)(nil)).Elem(), &Endpoint{})
   550  	pulumi.RegisterInputType(reflect.TypeOf((*EndpointArrayInput)(nil)).Elem(), EndpointArray{})
   551  	pulumi.RegisterInputType(reflect.TypeOf((*EndpointMapInput)(nil)).Elem(), EndpointMap{})
   552  	pulumi.RegisterOutputType(EndpointOutput{})
   553  	pulumi.RegisterOutputType(EndpointArrayOutput{})
   554  	pulumi.RegisterOutputType(EndpointMapOutput{})
   555  }