Skip to content

delete_ipam_external_resource_verification_token async

delete_ipam_external_resource_verification_token(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional[Boolean] = None,
    ipam_external_resource_verification_token_id: Optional[
        IpamExternalResourceVerificationTokenId
    ] = None,
) -> DeleteIpamExternalResourceVerificationTokenResult

Delete a verification token.

A verification token is an Amazon Web Services-generated random value that you can use to prove ownership of an external resource. For example, you can use a verification token to validate that you control a public IP address range when you bring an IP address range to Amazon Web Services (BYOIP).

Parameters:

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

    A check for 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.

  • ipam_external_resource_verification_token_id (Optional[IpamExternalResourceVerificationTokenId], default: None ) –

    The token ID.

Raises:

Source code in docs_src/capo_ec2/_services/async_ec2.py
async def delete_ipam_external_resource_verification_token(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
    ipam_external_resource_verification_token_id: Optional[
        "capo_ec2.types.ipam_external_resource_verification_token_id.IpamExternalResourceVerificationTokenId"
    ] = None,
) -> "capo_ec2.types.delete_ipam_external_resource_verification_token_result.DeleteIpamExternalResourceVerificationTokenResult":
    """<p>Delete a verification token.</p> <p>A verification token is an Amazon Web Services-generated random value that you can use to prove ownership of an external resource. For example, you can use a verification token to validate that you control a public IP address range when you bring an IP address range to Amazon Web Services (BYOIP). </p>

    Args:
        dry_run: <p>A check for 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>
        ipam_external_resource_verification_token_id: <p>The token ID.</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.delete_ipam_external_resource_verification_token_request.DeleteIpamExternalResourceVerificationTokenRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.delete_ipam_external_resource_verification_token_result.DeleteIpamExternalResourceVerificationTokenResult"
    ]:
        import capo_ec2._operations.amazon_ec2.delete_ipam_external_resource_verification_token

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

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("DeleteIpamExternalResourceVerificationToken"),
    )
    input_: capo_ec2.types.delete_ipam_external_resource_verification_token_request.DeleteIpamExternalResourceVerificationTokenRequest = {}
    if dry_run is not None:
        input_["dry_run"] = dry_run
    if ipam_external_resource_verification_token_id is not None:
        input_["ipam_external_resource_verification_token_id"] = (
            ipam_external_resource_verification_token_id
        )

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