Skip to content

modify_vpn_tunnel_certificate async

modify_vpn_tunnel_certificate(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    vpn_connection_id: Optional[VpnConnectionId] = None,
    vpn_tunnel_outside_ip_address: Optional[String] = None,
    dry_run: Optional[Boolean] = None,
) -> ModifyVpnTunnelCertificateResult

Modifies the VPN tunnel endpoint certificate.

Parameters:

  • vpn_connection_id (Optional[VpnConnectionId], default: None ) –

    The ID of the Amazon Web Services Site-to-Site VPN connection.

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

    The external IP address of the VPN tunnel.

  • 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/async_ec2.py
async def modify_vpn_tunnel_certificate(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    vpn_connection_id: Optional[
        "capo_ec2.types.vpn_connection_id.VpnConnectionId"
    ] = None,
    vpn_tunnel_outside_ip_address: Optional["capo_ec2.types.string.String"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.modify_vpn_tunnel_certificate_result.ModifyVpnTunnelCertificateResult":
    """<p>Modifies the VPN tunnel endpoint certificate.</p>

    Args:
        vpn_connection_id: <p>The ID of the Amazon Web Services Site-to-Site VPN connection.</p>
        vpn_tunnel_outside_ip_address: <p>The external IP address of the VPN tunnel.</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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.modify_vpn_tunnel_certificate_request.ModifyVpnTunnelCertificateRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.modify_vpn_tunnel_certificate_result.ModifyVpnTunnelCertificateResult"
    ]:
        import capo_ec2._operations.amazon_ec2.modify_vpn_tunnel_certificate

        (
            output,
            http_response,
        ) = await capo_ec2._operations.amazon_ec2.modify_vpn_tunnel_certificate.async_modify_vpn_tunnel_certificate(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_ec2.types.modify_vpn_tunnel_certificate_result.ModifyVpnTunnelCertificateResult",
    ) -> dict[str, Any]:
        import capo_ec2.types.modify_vpn_tunnel_certificate_result

        return capo_ec2.types.modify_vpn_tunnel_certificate_result.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "ModifyVpnTunnelCertificate", redact_output=_redact_output
        ),
    )
    input_: capo_ec2.types.modify_vpn_tunnel_certificate_request.ModifyVpnTunnelCertificateRequest = {}
    if vpn_connection_id is not None:
        input_["vpn_connection_id"] = vpn_connection_id
    if vpn_tunnel_outside_ip_address is not None:
        input_["vpn_tunnel_outside_ip_address"] = vpn_tunnel_outside_ip_address
    if dry_run is not None:
        input_["dry_run"] = dry_run

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output