DeleteArchiveCommand

Deletes the specified archive.

Example Syntax

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

import { CloudWatchEventsClient, DeleteArchiveCommand } from "@aws-sdk/client-cloudwatch-events"; // ES Modules import
// const { CloudWatchEventsClient, DeleteArchiveCommand } = require("@aws-sdk/client-cloudwatch-events"); // CommonJS import
const client = new CloudWatchEventsClient(config);
const input = { // DeleteArchiveRequest
  ArchiveName: "STRING_VALUE", // required
};
const command = new DeleteArchiveCommand(input);
const response = await client.send(command);
// {};

DeleteArchiveCommand Input

See DeleteArchiveCommandInput for more details

Parameter
Type
Description
ArchiveName
Required
string | undefined

The name of the archive to delete.

DeleteArchiveCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
ConcurrentModificationException
client

There is concurrent modification on a rule, target, archive, or replay.

InternalException
server

This exception occurs due to unexpected causes.

ResourceNotFoundException
client

An entity that you specified does not exist.

CloudWatchEventsServiceException
Base exception class for all service exceptions from CloudWatchEvents service.