- 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.
UpdatePackageCommand
Updates the supported fields for a specific software package.
Requires permission to access the UpdatePackage and GetIndexingConfiguration actions.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTClient, UpdatePackageCommand } from "@aws-sdk/client-iot"; // ES Modules import
// const { IoTClient, UpdatePackageCommand } = require("@aws-sdk/client-iot"); // CommonJS import
const client = new IoTClient(config);
const input = { // UpdatePackageRequest
packageName: "STRING_VALUE", // required
description: "STRING_VALUE",
defaultVersionName: "STRING_VALUE",
unsetDefaultVersion: true || false,
clientToken: "STRING_VALUE",
};
const command = new UpdatePackageCommand(input);
const response = await client.send(command);
// {};
UpdatePackageCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
packageName Required | string | undefined | The name of the target software package. |
clientToken | string | undefined | A unique case-sensitive identifier that you can provide to ensure the idempotency of the request. Don't reuse this client token if a new idempotent request is required. |
defaultVersionName | string | undefined | The name of the default package version. Note: You cannot name a |
description | string | undefined | The package description. |
unsetDefaultVersion | boolean | undefined | Indicates whether you want to remove the named default package version from the software package. Set as Note: You cannot name a |
UpdatePackageCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ConflictException | client | The request conflicts with the current state of the resource. |
InternalServerException | server | Internal error from the service that indicates an unexpected error or that the service is unavailable. |
ResourceNotFoundException | client | The specified resource does not exist. |
ThrottlingException | client | The rate exceeds the limit. |
ValidationException | client | The request is not valid. |
IoTServiceException | Base exception class for all service exceptions from IoT service. |