Skip to content

revoke_client_vpn_ingress

revoke_client_vpn_ingress(
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    client_vpn_endpoint_id: Optional[ClientVpnEndpointId] = None,
    target_network_cidr: Optional[String] = None,
    access_group_id: Optional[String] = None,
    revoke_all_groups: Optional[Boolean] = None,
    dry_run: Optional[Boolean] = None,
) -> RevokeClientVpnIngressResult

Removes an ingress authorization rule from a Client VPN endpoint.

Parameters:

  • client_vpn_endpoint_id (Optional[ClientVpnEndpointId], default: None ) –

    The ID of the Client VPN endpoint with which the authorization rule is associated.

  • target_network_cidr (Optional[String], default: None ) –

    The IPv4 address range, in CIDR notation, of the network for which access is being removed.

  • access_group_id (Optional[String], default: None ) –

    The ID of the Active Directory group for which to revoke access.

  • revoke_all_groups (Optional[Boolean], default: None ) –

    Indicates whether access should be revoked for all groups for a single TargetNetworkCidr that earlier authorized ingress for all groups using AuthorizeAllGroups. This does not impact other authorization rules that allowed ingress to the same TargetNetworkCidr with a specific AccessGroupId.

  • 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 is UnauthorizedOperation.

Raises:

Source code in docs_src/capo_ec2/_services/ec2.py
def revoke_client_vpn_ingress(
    self,
    *,
    config_overrides: Optional[EC2ClientConfig] = None,
    client_vpn_endpoint_id: Optional[
        "capo_ec2.types.client_vpn_endpoint_id.ClientVpnEndpointId"
    ] = None,
    target_network_cidr: Optional["capo_ec2.types.string.String"] = None,
    access_group_id: Optional["capo_ec2.types.string.String"] = None,
    revoke_all_groups: Optional["capo_ec2.types.boolean.Boolean"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.revoke_client_vpn_ingress_result.RevokeClientVpnIngressResult":
    """<p>Removes an ingress authorization rule from a Client VPN endpoint. </p>

    Args:
        client_vpn_endpoint_id: <p>The ID of the Client VPN endpoint with which the authorization rule is associated.</p>
        target_network_cidr: <p>The IPv4 address range, in CIDR notation, of the network for which access is being removed.</p>
        access_group_id: <p>The ID of the Active Directory group for which to revoke access. </p>
        revoke_all_groups: <p>Indicates whether access should be revoked for all groups for a single <code>TargetNetworkCidr</code> that earlier authorized ingress for all groups using <code>AuthorizeAllGroups</code>. This does not impact other authorization rules that allowed ingress to the same <code>TargetNetworkCidr</code> with a specific <code>AccessGroupId</code>.</p>
        dry_run: <p>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 <code>DryRunOperation</code>. Otherwise, it is <code>UnauthorizedOperation</code>.</p>

    Raises:
        capo_ec2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ec2.types.revoke_client_vpn_ingress_request.RevokeClientVpnIngressRequest]",
    ) -> OperationResponse[
        "capo_ec2.types.revoke_client_vpn_ingress_result.RevokeClientVpnIngressResult"
    ]:
        import capo_ec2._operations.amazon_ec2.revoke_client_vpn_ingress

        output, http_response = (
            capo_ec2._operations.amazon_ec2.revoke_client_vpn_ingress.revoke_client_vpn_ingress(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RevokeClientVpnIngress")
    )
    input_: capo_ec2.types.revoke_client_vpn_ingress_request.RevokeClientVpnIngressRequest = {}
    if client_vpn_endpoint_id is not None:
        input_["client_vpn_endpoint_id"] = client_vpn_endpoint_id
    if target_network_cidr is not None:
        input_["target_network_cidr"] = target_network_cidr
    if access_group_id is not None:
        input_["access_group_id"] = access_group_id
    if revoke_all_groups is not None:
        input_["revoke_all_groups"] = revoke_all_groups
    if dry_run is not None:
        input_["dry_run"] = dry_run

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output