DeleteAppInputSourceCommand

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

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ResiliencehubClient, DeleteAppInputSourceCommand } from "@aws-sdk/client-resiliencehub"; // ES Modules import
// const { ResiliencehubClient, DeleteAppInputSourceCommand } = require("@aws-sdk/client-resiliencehub"); // CommonJS import
const client = new ResiliencehubClient(config);
const input = { // DeleteAppInputSourceRequest
  appArn: "STRING_VALUE", // required
  sourceArn: "STRING_VALUE",
  terraformSource: { // TerraformSource
    s3StateFileUrl: "STRING_VALUE", // required
  },
  clientToken: "STRING_VALUE",
  eksSourceClusterNamespace: { // EksSourceClusterNamespace
    eksClusterArn: "STRING_VALUE", // required
    namespace: "STRING_VALUE", // required
  },
};
const command = new DeleteAppInputSourceCommand(input);
const response = await client.send(command);
// { // DeleteAppInputSourceResponse
//   appArn: "STRING_VALUE",
//   appInputSource: { // AppInputSource
//     sourceName: "STRING_VALUE",
//     importType: "CfnStack" || "Resource" || "AppRegistryApp" || "ResourceGroup" || "Terraform" || "EKS", // required
//     sourceArn: "STRING_VALUE",
//     terraformSource: { // TerraformSource
//       s3StateFileUrl: "STRING_VALUE", // required
//     },
//     resourceCount: Number("int"),
//     eksSourceClusterNamespace: { // EksSourceClusterNamespace
//       eksClusterArn: "STRING_VALUE", // required
//       namespace: "STRING_VALUE", // required
//     },
//   },
// };

DeleteAppInputSourceCommand Input

Parameter
Type
Description
appArn
Required
string | undefined

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.

clientToken
string | undefined

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.

eksSourceClusterNamespace
EksSourceClusterNamespace | undefined

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

sourceArn
string | undefined

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.

terraformSource
TerraformSource | undefined

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

DeleteAppInputSourceCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
appArn
string | undefined

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.

appInputSource
AppInputSource | undefined

Name of the input source from where the application resource is imported from.

Throws

Name
Fault
Details
AccessDeniedException
client

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
client

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
server

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

ResourceNotFoundException
client

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

ThrottlingException
client

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

ValidationException
client

This exception occurs when a request is not valid.

ResiliencehubServiceException
Base exception class for all service exceptions from Resiliencehub service.