CfnClientVpnEndpoint
- class aws_cdk.aws_ec2.CfnClientVpnEndpoint(scope, id, *, authentication_options, client_cidr_block, connection_log_options, server_certificate_arn, client_connect_options=None, client_login_banner_options=None, description=None, dns_servers=None, security_group_ids=None, self_service_portal=None, session_timeout_hours=None, split_tunnel=None, tag_specifications=None, transport_protocol=None, vpc_id=None, vpn_port=None)
Bases:
CfnResource
A CloudFormation
AWS::EC2::ClientVpnEndpoint
.Specifies a Client VPN endpoint. A Client VPN endpoint is the resource you create and configure to enable and manage client VPN sessions. It is the destination endpoint at which all client VPN sessions are terminated.
- CloudformationResource:
AWS::EC2::ClientVpnEndpoint
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 cfn_client_vpn_endpoint = ec2.CfnClientVpnEndpoint(self, "MyCfnClientVpnEndpoint", authentication_options=[ec2.CfnClientVpnEndpoint.ClientAuthenticationRequestProperty( type="type", # the properties below are optional active_directory=ec2.CfnClientVpnEndpoint.DirectoryServiceAuthenticationRequestProperty( directory_id="directoryId" ), federated_authentication=ec2.CfnClientVpnEndpoint.FederatedAuthenticationRequestProperty( saml_provider_arn="samlProviderArn", # the properties below are optional self_service_saml_provider_arn="selfServiceSamlProviderArn" ), mutual_authentication=ec2.CfnClientVpnEndpoint.CertificateAuthenticationRequestProperty( client_root_certificate_chain_arn="clientRootCertificateChainArn" ) )], client_cidr_block="clientCidrBlock", connection_log_options=ec2.CfnClientVpnEndpoint.ConnectionLogOptionsProperty( enabled=False, # the properties below are optional cloudwatch_log_group="cloudwatchLogGroup", cloudwatch_log_stream="cloudwatchLogStream" ), server_certificate_arn="serverCertificateArn", # the properties below are optional client_connect_options=ec2.CfnClientVpnEndpoint.ClientConnectOptionsProperty( enabled=False, # the properties below are optional lambda_function_arn="lambdaFunctionArn" ), client_login_banner_options=ec2.CfnClientVpnEndpoint.ClientLoginBannerOptionsProperty( enabled=False, # the properties below are optional banner_text="bannerText" ), description="description", dns_servers=["dnsServers"], security_group_ids=["securityGroupIds"], self_service_portal="selfServicePortal", session_timeout_hours=123, split_tunnel=False, tag_specifications=[ec2.CfnClientVpnEndpoint.TagSpecificationProperty( resource_type="resourceType", tags=[CfnTag( key="key", value="value" )] )], transport_protocol="transportProtocol", vpc_id="vpcId", vpn_port=123 )
Create a new
AWS::EC2::ClientVpnEndpoint
.- Parameters:
scope (
Construct
) –scope in which this resource is defined.
id (
str
) –scoped id of the resource.
authentication_options (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,ClientAuthenticationRequestProperty
,Dict
[str
,Any
]]]]) – Information about the authentication method to be used to authenticate clients.client_cidr_block (
str
) – 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. Client CIDR range must have a size of at least /22 and must not be greater than /12.connection_log_options (
Union
[IResolvable
,ConnectionLogOptionsProperty
,Dict
[str
,Any
]]) – Information about the client connection logging options. If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged: - Client connection requests - Client connection results (successful and unsuccessful) - Reasons for unsuccessful client connection requests - Client connection termination timeserver_certificate_arn (
str
) – The ARN of the server certificate. For more information, see the AWS Certificate Manager User Guide .client_connect_options (
Union
[IResolvable
,ClientConnectOptionsProperty
,Dict
[str
,Any
],None
]) – The options for managing connection authorization for new client connections.client_login_banner_options (
Union
[IResolvable
,ClientLoginBannerOptionsProperty
,Dict
[str
,Any
],None
]) – Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.description (
Optional
[str
]) – A brief description of the Client VPN endpoint.dns_servers (
Optional
[Sequence
[str
]]) – 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 configured on the device is used for the DNS server.security_group_ids (
Optional
[Sequence
[str
]]) – 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.self_service_portal (
Optional
[str
]) – Specify whether to enable the self-service portal for the Client VPN endpoint. Default Value:enabled
session_timeout_hours (
Union
[int
,float
,None
]) – The maximum VPN session duration time in hours. Valid values:8 | 10 | 12 | 24
Default value:24
split_tunnel (
Union
[bool
,IResolvable
,None
]) – Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint. By default, split-tunnel on a VPN endpoint is disabled. For information about split-tunnel VPN endpoints, see Split-tunnel AWS Client VPN endpoint in the AWS Client VPN Administrator Guide .tag_specifications (
Union
[IResolvable
,Sequence
[Union
[IResolvable
,TagSpecificationProperty
,Dict
[str
,Any
]]],None
]) – The tags to apply to the Client VPN endpoint during creation.transport_protocol (
Optional
[str
]) – The transport protocol to be used by the VPN session. Default value:udp
vpc_id (
Optional
[str
]) – 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.vpn_port (
Union
[int
,float
,None
]) – The port number to assign to the Client VPN endpoint for TCP and UDP traffic. Valid Values:443
|1194
Default Value:443
Methods
- add_deletion_override(path)
Syntactic sugar for
addOverride(path, undefined)
.- Parameters:
path (
str
) – The path of the value to delete.- Return type:
None
- add_depends_on(target)
Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.
This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.
- Parameters:
target (
CfnResource
) –- Return type:
None
- add_metadata(key, value)
Add a value to the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –value (
Any
) –
- See:
- Return type:
None
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- add_override(path, value)
Adds an override to the synthesized CloudFormation resource.
To add a property override, either use
addPropertyOverride
or prefixpath
with “Properties.” (i.e.Properties.TopicName
).If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.
To include a literal
.
in the property name, prefix with a\
. In most programming languages you will need to write this as"\\."
because the\
itself will need to be escaped.For example:
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"]) cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")
would add the overrides Example:
"Properties": { "GlobalSecondaryIndexes": [ { "Projection": { "NonKeyAttributes": [ "myattribute" ] ... } ... }, { "ProjectionType": "INCLUDE" ... }, ] ... }
The
value
argument toaddOverride
will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.- Parameters:
path (
str
) –The path of the property, you can use dot notation to override values in complex types. Any intermdediate keys will be created as needed.
value (
Any
) –The value. Could be primitive or complex.
- Return type:
None
- add_property_deletion_override(property_path)
Adds an override that deletes the value of a property from the resource definition.
- Parameters:
property_path (
str
) – The path to the property.- Return type:
None
- add_property_override(property_path, value)
Adds an override to a resource property.
Syntactic sugar for
addOverride("Properties.<...>", value)
.- Parameters:
property_path (
str
) – The path of the property.value (
Any
) – The value.
- Return type:
None
- apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)
Sets the deletion policy of the resource based on the removal policy specified.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Parameters:
policy (
Optional
[RemovalPolicy
]) –apply_to_update_replace_policy (
Optional
[bool
]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: truedefault (
Optional
[RemovalPolicy
]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resoure, please consult that specific resource’s documentation.
- Return type:
None
- get_att(attribute_name)
Returns a token for an runtime attribute of this resource.
Ideally, use generated attribute accessors (e.g.
resource.arn
), but this can be used for future compatibility in case there is no generated attribute.- Parameters:
attribute_name (
str
) – The name of the attribute.- Return type:
- get_metadata(key)
Retrieve a value value from the CloudFormation Resource Metadata.
- Parameters:
key (
str
) –- See:
- Return type:
Any
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html
Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.
- inspect(inspector)
Examines the CloudFormation resource and discloses attributes.
- Parameters:
inspector (
TreeInspector
) –tree inspector to collect and process attributes.
- Return type:
None
- override_logical_id(new_logical_id)
Overrides the auto-generated logical ID with a specific ID.
- Parameters:
new_logical_id (
str
) – The new logical ID to use for this stack element.- Return type:
None
- to_string()
Returns a string representation of this construct.
- Return type:
str
- Returns:
a string representation of this resource
Attributes
- CFN_RESOURCE_TYPE_NAME = 'AWS::EC2::ClientVpnEndpoint'
- authentication_options
Information about the authentication method to be used to authenticate clients.
- cfn_options
Options for this resource, such as condition, update policy etc.
- cfn_resource_type
AWS resource type.
- client_cidr_block
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. Client CIDR range must have a size of at least /22 and must not be greater than /12.
- client_connect_options
The options for managing connection authorization for new client connections.
- client_login_banner_options
Options for enabling a customizable text banner that will be displayed on AWS provided clients when a VPN session is established.
- connection_log_options
Information about the client connection logging options.
If you enable client connection logging, data about client connections is sent to a Cloudwatch Logs log stream. The following information is logged:
Client connection requests
Client connection results (successful and unsuccessful)
Reasons for unsuccessful client connection requests
Client connection termination time
- creation_stack
return:
the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.
- description
A brief description of the Client VPN endpoint.
- dns_servers
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 configured on the device is used for the DNS server.
- logical_id
The logical ID for this CloudFormation stack element.
The logical ID of the element is calculated from the path of the resource node in the construct tree.
To override this value, use
overrideLogicalId(newLogicalId)
.- Returns:
the logical ID as a stringified token. This value will only get resolved during synthesis.
- node
The construct tree node associated with this construct.
- ref
Return a string that will be resolved to a CloudFormation
{ Ref }
for this element.If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through
Lazy.any({ produce: resource.ref })
.
- security_group_ids
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.
- self_service_portal
Specify whether to enable the self-service portal for the Client VPN endpoint.
Default Value:
enabled
- server_certificate_arn
The ARN of the server certificate.
For more information, see the AWS Certificate Manager User Guide .
- session_timeout_hours
The maximum VPN session duration time in hours.
Valid values:
8 | 10 | 12 | 24
Default value:
24
- split_tunnel
Indicates whether split-tunnel is enabled on the AWS Client VPN endpoint.
By default, split-tunnel on a VPN endpoint is disabled.
For information about split-tunnel VPN endpoints, see Split-tunnel AWS Client VPN endpoint in the AWS Client VPN Administrator Guide .
- stack
The stack in which this element is defined.
CfnElements must be defined within a stack scope (directly or indirectly).
- tag_specifications
The tags to apply to the Client VPN endpoint during creation.
- transport_protocol
The transport protocol to be used by the VPN session.
Default value:
udp
- vpc_id
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.
- vpn_port
The port number to assign to the Client VPN endpoint for TCP and UDP traffic.
Valid Values:
443
|1194
Default Value:
443
Static Methods
- classmethod is_cfn_element(x)
Returns
true
if a construct is a stack element (i.e. part of the synthesized cloudformation template).Uses duck-typing instead of
instanceof
to allow stack elements from different versions of this library to be included in the same stack.- Parameters:
x (
Any
) –- Return type:
bool
- Returns:
The construct as a stack element or undefined if it is not a stack element.
- classmethod is_cfn_resource(construct)
Check whether the given construct is a CfnResource.
- Parameters:
construct (
IConstruct
) –- Return type:
bool
- classmethod is_construct(x)
Return whether the given object is a Construct.
- Parameters:
x (
Any
) –- Return type:
bool
CertificateAuthenticationRequestProperty
- class CfnClientVpnEndpoint.CertificateAuthenticationRequestProperty(*, client_root_certificate_chain_arn)
Bases:
object
Information about the client certificate to be used for authentication.
- Parameters:
client_root_certificate_chain_arn (
str
) – The ARN of the client certificate. The certificate must be signed by a certificate authority (CA) and it must be provisioned in AWS Certificate Manager (ACM).- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 certificate_authentication_request_property = ec2.CfnClientVpnEndpoint.CertificateAuthenticationRequestProperty( client_root_certificate_chain_arn="clientRootCertificateChainArn" )
Attributes
- client_root_certificate_chain_arn
The ARN of the client certificate.
The certificate must be signed by a certificate authority (CA) and it must be provisioned in AWS Certificate Manager (ACM).
ClientAuthenticationRequestProperty
- class CfnClientVpnEndpoint.ClientAuthenticationRequestProperty(*, type, active_directory=None, federated_authentication=None, mutual_authentication=None)
Bases:
object
Describes the authentication method to be used by a Client VPN endpoint.
For more information, see Authentication in the AWS Client VPN Administrator Guide .
- Parameters:
type (
str
) – The type of client authentication to be used.active_directory (
Union
[IResolvable
,DirectoryServiceAuthenticationRequestProperty
,Dict
[str
,Any
],None
]) – Information about the Active Directory to be used, if applicable. You must provide this information if Type isdirectory-service-authentication
.federated_authentication (
Union
[IResolvable
,FederatedAuthenticationRequestProperty
,Dict
[str
,Any
],None
]) – Information about the IAM SAML identity provider, if applicable.mutual_authentication (
Union
[IResolvable
,CertificateAuthenticationRequestProperty
,Dict
[str
,Any
],None
]) – Information about the authentication certificates to be used, if applicable. You must provide this information if Type iscertificate-authentication
.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 client_authentication_request_property = ec2.CfnClientVpnEndpoint.ClientAuthenticationRequestProperty( type="type", # the properties below are optional active_directory=ec2.CfnClientVpnEndpoint.DirectoryServiceAuthenticationRequestProperty( directory_id="directoryId" ), federated_authentication=ec2.CfnClientVpnEndpoint.FederatedAuthenticationRequestProperty( saml_provider_arn="samlProviderArn", # the properties below are optional self_service_saml_provider_arn="selfServiceSamlProviderArn" ), mutual_authentication=ec2.CfnClientVpnEndpoint.CertificateAuthenticationRequestProperty( client_root_certificate_chain_arn="clientRootCertificateChainArn" ) )
Attributes
- active_directory
Information about the Active Directory to be used, if applicable.
You must provide this information if Type is
directory-service-authentication
.
- federated_authentication
Information about the IAM SAML identity provider, if applicable.
- mutual_authentication
Information about the authentication certificates to be used, if applicable.
You must provide this information if Type is
certificate-authentication
.
- type
The type of client authentication to be used.
ClientConnectOptionsProperty
- class CfnClientVpnEndpoint.ClientConnectOptionsProperty(*, enabled, lambda_function_arn=None)
Bases:
object
Indicates whether client connect options are enabled.
The default is
false
(not enabled).- Parameters:
enabled (
Union
[bool
,IResolvable
]) – Indicates whether client connect options are enabled. The default isfalse
(not enabled).lambda_function_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) of the AWS Lambda function used for connection authorization.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 client_connect_options_property = ec2.CfnClientVpnEndpoint.ClientConnectOptionsProperty( enabled=False, # the properties below are optional lambda_function_arn="lambdaFunctionArn" )
Attributes
- enabled
Indicates whether client connect options are enabled.
The default is
false
(not enabled).
- lambda_function_arn
The Amazon Resource Name (ARN) of the AWS Lambda function used for connection authorization.
ConnectionLogOptionsProperty
- class CfnClientVpnEndpoint.ConnectionLogOptionsProperty(*, enabled, cloudwatch_log_group=None, cloudwatch_log_stream=None)
Bases:
object
Describes the client connection logging options for the Client VPN endpoint.
- Parameters:
enabled (
Union
[bool
,IResolvable
]) – Indicates whether connection logging is enabled.cloudwatch_log_group (
Optional
[str
]) – The name of the CloudWatch Logs log group. Required if connection logging is enabled.cloudwatch_log_stream (
Optional
[str
]) – The name of the CloudWatch Logs log stream to which the connection data is published.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 connection_log_options_property = ec2.CfnClientVpnEndpoint.ConnectionLogOptionsProperty( enabled=False, # the properties below are optional cloudwatch_log_group="cloudwatchLogGroup", cloudwatch_log_stream="cloudwatchLogStream" )
Attributes
- cloudwatch_log_group
The name of the CloudWatch Logs log group.
Required if connection logging is enabled.
- cloudwatch_log_stream
The name of the CloudWatch Logs log stream to which the connection data is published.
- enabled
Indicates whether connection logging is enabled.
DirectoryServiceAuthenticationRequestProperty
- class CfnClientVpnEndpoint.DirectoryServiceAuthenticationRequestProperty(*, directory_id)
Bases:
object
Describes the Active Directory to be used for client authentication.
- Parameters:
directory_id (
str
) – The ID of the Active Directory to be used for authentication.- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 directory_service_authentication_request_property = ec2.CfnClientVpnEndpoint.DirectoryServiceAuthenticationRequestProperty( directory_id="directoryId" )
Attributes
- directory_id
The ID of the Active Directory to be used for authentication.
FederatedAuthenticationRequestProperty
- class CfnClientVpnEndpoint.FederatedAuthenticationRequestProperty(*, saml_provider_arn, self_service_saml_provider_arn=None)
Bases:
object
The IAM SAML identity provider used for federated authentication.
- Parameters:
saml_provider_arn (
str
) – The Amazon Resource Name (ARN) of the IAM SAML identity provider.self_service_saml_provider_arn (
Optional
[str
]) – The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.
- Link:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 federated_authentication_request_property = ec2.CfnClientVpnEndpoint.FederatedAuthenticationRequestProperty( saml_provider_arn="samlProviderArn", # the properties below are optional self_service_saml_provider_arn="selfServiceSamlProviderArn" )
Attributes
- saml_provider_arn
The Amazon Resource Name (ARN) of the IAM SAML identity provider.
- self_service_saml_provider_arn
The Amazon Resource Name (ARN) of the IAM SAML identity provider for the self-service portal.