Skip to content

delete_application_status_check async

delete_application_status_check(
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    application_status_check_id: Optional[ApplicationStatusCheckId] = None,
    client_token: Optional[String] = None,
    dry_run: Optional[Boolean] = None,
) -> DeleteApplicationStatusCheckResult

Deletes an application status check. The following rules apply:

  • Deleting a check automatically removes all of its associations.

  • Use DescribeApplicationStatusChecks to view existing checks before deleting.

Parameters:

  • application_status_check_id (Optional[ApplicationStatusCheckId], default: None ) –

    The ID of the application status check to delete.

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

    A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same token, the service ignores the request but does not return an error. For more information, see Ensuring idempotency.

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

    Checks whether you have the required permissions for the operation, 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:

Examples:

To delete an application status check This example deletes the specified application status check.

>>> await client.delete_application_status_check(application_status_check_id='asc-0123456789abcdef0')
Source code in docs_src/capo_ec2/_services/async_ec2.py
async def delete_application_status_check(
    self,
    *,
    config_overrides: Optional[AsyncEC2ClientConfig] = None,
    application_status_check_id: Optional[
        "capo_ec2.types.application_status_check_id.ApplicationStatusCheckId"
    ] = None,
    client_token: Optional["capo_ec2.types.string.String"] = None,
    dry_run: Optional["capo_ec2.types.boolean.Boolean"] = None,
) -> "capo_ec2.types.delete_application_status_check_result.DeleteApplicationStatusCheckResult":
    """<p>Deletes an application status check. The following rules apply:</p> <ul> <li> <p>Deleting a check automatically removes all of its associations.</p> </li> <li> <p>Use <code>DescribeApplicationStatusChecks</code> to view existing checks before deleting.</p> </li> </ul>

    Args:
        application_status_check_id: <p>The ID of the application status check to delete.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same token, the service ignores the request but does not return an error. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html">Ensuring idempotency</a>.</p>
        dry_run: <p>Checks whether you have the required permissions for the operation, 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.

    Examples:
        To delete an application status check
        This example deletes the specified application status check.

        >>> await client.delete_application_status_check(application_status_check_id='asc-0123456789abcdef0')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ec2.types.delete_application_status_check_request.DeleteApplicationStatusCheckRequest]",
    ) -> AsyncOperationResponse[
        "capo_ec2.types.delete_application_status_check_result.DeleteApplicationStatusCheckResult"
    ]:
        import capo_ec2._operations.amazon_ec2.delete_application_status_check

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteApplicationStatusCheck")
    )
    input_: capo_ec2.types.delete_application_status_check_request.DeleteApplicationStatusCheckRequest = {}
    if application_status_check_id is not None:
        input_["application_status_check_id"] = application_status_check_id
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    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