- 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.
DeletePackageCommand
Deletes a package.
To delete a package, you need permission to call s3:DeleteObject
in addition to permissions for the AWS Panorama API.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { PanoramaClient, DeletePackageCommand } from "@aws-sdk/client-panorama"; // ES Modules import
// const { PanoramaClient, DeletePackageCommand } = require("@aws-sdk/client-panorama"); // CommonJS import
const client = new PanoramaClient(config);
const input = { // DeletePackageRequest
PackageId: "STRING_VALUE", // required
ForceDelete: true || false,
};
const command = new DeletePackageCommand(input);
const response = await client.send(command);
// {};
DeletePackageCommand Input
See DeletePackageCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
PackageId Required | string | undefined | The package's ID. |
ForceDelete | boolean | undefined | Delete the package even if it has artifacts stored in its access point. Deletes the package's artifacts from Amazon S3. |
DeletePackageCommand Output
See DeletePackageCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | The requestor does not have permission to access the target action or resource. |
ConflictException | client | The target resource is in use. |
InternalServerException | server | An internal error occurred. |
ResourceNotFoundException | client | The target resource was not found. |
ValidationException | client | The request contains an invalid parameter value. |
PanoramaServiceException | Base exception class for all service exceptions from Panorama service. |