Skip to content

delete_app_input_source

delete_app_input_source(
    app_arn: Arn,
    *,
    config_overrides: Optional[resiliencehubClientConfig] = None,
    source_arn: Optional[Arn] = None,
    terraform_source: Optional[TerraformSource] = None,
    client_token: Optional[ClientToken] = None,
    eks_source_cluster_namespace: Optional[EksSourceClusterNamespace] = None,
) -> DeleteAppInputSourceResponse

Deletes the input source and all of its imported resources from the Resilience Hub application.

Parameters:

  • app_arn (Arn) –

    Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:partition:resiliencehub:region:account:app/app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

  • source_arn (Optional[Arn], default: None ) –

    The Amazon Resource Name (ARN) of the imported resource you want to remove from the Resilience Hub application. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

  • terraform_source (Optional[TerraformSource], default: None ) –

    The imported Terraform s3 state file you want to remove from the Resilience Hub application.

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

    Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.

  • eks_source_cluster_namespace (Optional[EksSourceClusterNamespace], default: None ) –

    The namespace on your Amazon Elastic Kubernetes Service cluster that you want to delete from the Resilience Hub application.

Raises:

  • AccessDeniedException –

    You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.

  • ConflictException –

    This exception occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.

  • InternalServerException –

    This exception occurs when there is an internal failure in the Resilience Hub service.

  • ResourceNotFoundException –

    This exception occurs when the specified resource could not be found.

  • ThrottlingException –

    This exception occurs when you have exceeded the limit on the number of requests per second.

  • ValidationException –

    This exception occurs when a request is not valid.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_resiliencehub/_services/resiliencehub.py
def delete_app_input_source(
    self,
    app_arn: "capo_resiliencehub.types.arn.Arn",
    *,
    config_overrides: Optional[resiliencehubClientConfig] = None,
    source_arn: Optional["capo_resiliencehub.types.arn.Arn"] = None,
    terraform_source: Optional[
        "capo_resiliencehub.types.terraform_source.TerraformSource"
    ] = None,
    client_token: Optional[
        "capo_resiliencehub.types.client_token.ClientToken"
    ] = None,
    eks_source_cluster_namespace: Optional[
        "capo_resiliencehub.types.eks_source_cluster_namespace.EksSourceClusterNamespace"
    ] = None,
) -> "capo_resiliencehub.types.delete_app_input_source_response.DeleteAppInputSourceResponse":
    """<p>Deletes the input source and all of its imported resources from the Resilience Hub application.</p>

    Args:
        app_arn: <p>Amazon Resource Name (ARN) of the Resilience Hub application. The format for this ARN is: arn:<code>partition</code>:resiliencehub:<code>region</code>:<code>account</code>:app/<code>app-id</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
        source_arn: <p>The Amazon Resource Name (ARN) of the imported resource you want to remove from the Resilience Hub application. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>Amazon Web Services General Reference</i> guide.</p>
        terraform_source: <p>The imported Terraform s3 state file you want to remove from the Resilience Hub application.</p>
        client_token: <p>Used for an idempotency token. A client token is a unique, case-sensitive string of up to 64 ASCII characters. You should not reuse the same client token for other API requests.</p>
        eks_source_cluster_namespace: <p>The namespace on your Amazon Elastic Kubernetes Service cluster that you want to delete from the Resilience Hub application.</p>

    Raises:
        capo_resiliencehub.errors.access_denied_exception.AccessDeniedException: <p>You don't have permissions to perform the requested operation. The user or role that is making the request must have at least one IAM permissions policy attached that grants the required permissions.</p>
        capo_resiliencehub.errors.conflict_exception.ConflictException: <p>This exception occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception.</p>
        capo_resiliencehub.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Resilience Hub service.</p>
        capo_resiliencehub.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception occurs when the specified resource could not be found.</p>
        capo_resiliencehub.errors.throttling_exception.ThrottlingException: <p>This exception occurs when you have exceeded the limit on the number of requests per second.</p>
        capo_resiliencehub.errors.validation_exception.ValidationException: <p>This exception occurs when a request is not valid.</p>
        capo_resiliencehub.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_resiliencehub.types.delete_app_input_source_request.DeleteAppInputSourceRequest]",
    ) -> OperationResponse[
        "capo_resiliencehub.types.delete_app_input_source_response.DeleteAppInputSourceResponse"
    ]:
        import capo_resiliencehub._operations.aws_resilience_hub.delete_app_input_source

        output, http_response = (
            capo_resiliencehub._operations.aws_resilience_hub.delete_app_input_source.delete_app_input_source(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteAppInputSource")
    )
    input_: capo_resiliencehub.types.delete_app_input_source_request.DeleteAppInputSourceRequest = {
        "app_arn": app_arn
    }
    if source_arn is not None:
        input_["source_arn"] = source_arn
    if terraform_source is not None:
        input_["terraform_source"] = terraform_source
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if eks_source_cluster_namespace is not None:
        input_["eks_source_cluster_namespace"] = eks_source_cluster_namespace

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