CreatePackageCommand

Creates a package and storage location in an Amazon S3 access point.

Example Syntax

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

import { PanoramaClient, CreatePackageCommand } from "@aws-sdk/client-panorama"; // ES Modules import
// const { PanoramaClient, CreatePackageCommand } = require("@aws-sdk/client-panorama"); // CommonJS import
const client = new PanoramaClient(config);
const input = { // CreatePackageRequest
  PackageName: "STRING_VALUE", // required
  Tags: { // TagMap
    "<keys>": "STRING_VALUE",
  },
};
const command = new CreatePackageCommand(input);
const response = await client.send(command);
// { // CreatePackageResponse
//   PackageId: "STRING_VALUE",
//   Arn: "STRING_VALUE",
//   StorageLocation: { // StorageLocation
//     Bucket: "STRING_VALUE", // required
//     RepoPrefixLocation: "STRING_VALUE", // required
//     GeneratedPrefixLocation: "STRING_VALUE", // required
//     BinaryPrefixLocation: "STRING_VALUE", // required
//     ManifestPrefixLocation: "STRING_VALUE", // required
//   },
// };

CreatePackageCommand Input

See CreatePackageCommandInput for more details

Parameter
Type
Description
PackageName
Required
string | undefined

A name for the package.

Tags
Record<string, string> | undefined

Tags for the package.

CreatePackageCommand Output

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

The package's storage location.

Arn
string | undefined

The package's ARN.

PackageId
string | undefined

The package's ID.

Throws

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.

ValidationException
client

The request contains an invalid parameter value.

PanoramaServiceException
Base exception class for all service exceptions from Panorama service.