associate_client_vpn_target_network
¶
associate_client_vpn_target_network(
*,
config_overrides: Optional[EC2ClientConfig] = None,
client_vpn_endpoint_id: Optional[ClientVpnEndpointId] = None,
subnet_id: Optional[SubnetId] = None,
client_token: Optional[String] = None,
dry_run: Optional[Boolean] = None,
availability_zone: Optional[AvailabilityZoneName] = None,
availability_zone_id: Optional[AvailabilityZoneId] = None,
) -> AssociateClientVpnTargetNetworkResult
Associates a target network with a Client VPN endpoint. A target network is a subnet in a VPC. You can associate multiple subnets from the same VPC with a Client VPN endpoint. You can associate only one subnet in each Availability Zone. We recommend that you associate at least two subnets to provide Availability Zone redundancy.
If you specified a VPC when you created the Client VPN endpoint or if you have previous subnet associations, the specified subnet must be in the same VPC. To specify a subnet that's in a different VPC, you must first modify the Client VPN endpoint (ModifyClientVpnEndpoint) and change the VPC that's associated with it.
Parameters:
-
client_vpn_endpoint_id(Optional[ClientVpnEndpointId], default:None) –The ID of the Client VPN endpoint.
-
subnet_id(Optional[SubnetId], default:None) –The ID of the subnet to associate with the Client VPN endpoint. Required for VPC-based endpoints. For Transit Gateway-based endpoints, use
AvailabilityZoneorAvailabilityZoneIdinstead. -
client_token(Optional[String], default:None) –Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see Ensuring idempotency.
-
dry_run(Optional[Boolean], default:None) –Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it isUnauthorizedOperation. -
availability_zone(Optional[AvailabilityZoneName], default:None) –The Availability Zone name for the Transit Gateway association. Required if when associating an Availability Zone with a Client VPN endpoint that uses a Transit Gateway. You cannot specify both
SubnetIdandAvailabilityZone. -
availability_zone_id(Optional[AvailabilityZoneId], default:None) –The Availability Zone ID for the Transit Gateway association. Required if when associating an Availability Zone with a Client VPN endpoint that uses a Transit Gateway. You cannot specify both
AvailabilityZoneandAvailabilityZoneId.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_ec2/_services/ec2.py
3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 | |