Skip to content

delete_target_account_configuration async

delete_target_account_configuration(
    experiment_template_id: ExperimentTemplateId,
    account_id: TargetAccountId,
    *,
    config_overrides: Optional[AsyncfisClientConfig] = None,
) -> DeleteTargetAccountConfigurationResponse

Deletes the specified target account configuration of the experiment template.

Parameters:

  • experiment_template_id (ExperimentTemplateId) –

    The ID of the experiment template.

  • account_id (TargetAccountId) –

    The Amazon Web Services account ID of the target account.

Raises:

Source code in docs_src/capo_fis/_services/async_fis.py
async def delete_target_account_configuration(
    self,
    experiment_template_id: "capo_fis.types.experiment_template_id.ExperimentTemplateId",
    account_id: "capo_fis.types.target_account_id.TargetAccountId",
    *,
    config_overrides: Optional[AsyncfisClientConfig] = None,
) -> "capo_fis.types.delete_target_account_configuration_response.DeleteTargetAccountConfigurationResponse":
    """<p>Deletes the specified target account configuration of the experiment template.</p>

    Args:
        experiment_template_id: <p>The ID of the experiment template.</p>
        account_id: <p>The Amazon Web Services account ID of the target account.</p>

    Raises:
        capo_fis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_fis.errors.validation_exception.ValidationException: <p>The specified input is not valid, or fails to satisfy the constraints for the request.</p>
        capo_fis.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_fis.types.delete_target_account_configuration_request.DeleteTargetAccountConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_fis.types.delete_target_account_configuration_response.DeleteTargetAccountConfigurationResponse"
    ]:
        import capo_fis._operations.fault_injection_simulator.delete_target_account_configuration

        (
            output,
            http_response,
        ) = await capo_fis._operations.fault_injection_simulator.delete_target_account_configuration.async_delete_target_account_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteTargetAccountConfiguration")
    )
    input_: capo_fis.types.delete_target_account_configuration_request.DeleteTargetAccountConfigurationRequest = {
        "experiment_template_id": experiment_template_id,
        "account_id": account_id,
    }

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