- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DeleteSnapshotCommand
Deletes a directory snapshot.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DirectoryServiceClient, DeleteSnapshotCommand } from "@aws-sdk/client-directory-service"; // ES Modules import
// const { DirectoryServiceClient, DeleteSnapshotCommand } = require("@aws-sdk/client-directory-service"); // CommonJS import
const client = new DirectoryServiceClient(config);
const input = { // DeleteSnapshotRequest
SnapshotId: "STRING_VALUE", // required
};
const command = new DeleteSnapshotCommand(input);
const response = await client.send(command);
// { // DeleteSnapshotResult
// SnapshotId: "STRING_VALUE",
// };
DeleteSnapshotCommand Input
See DeleteSnapshotCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
SnapshotId Required | string | undefined | The identifier of the directory snapshot to be deleted. |
DeleteSnapshotCommand Output
See DeleteSnapshotCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
SnapshotId | string | undefined | The identifier of the directory snapshot that was deleted. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ClientException | client | A client exception has occurred. |
EntityDoesNotExistException | client | The specified entity could not be found. |
InvalidParameterException | client | One or more parameters are not valid. |
ServiceException | server | An exception has occurred in Directory Service. |
DirectoryServiceServiceException | Base exception class for all service exceptions from DirectoryService service. |