Skip to main content

packages

Creates, updates, deletes, gets or lists a packages resource.

Overview​

Namepackages
TypeResource
Idaws.iot.packages

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_datestring (date-time)The date the package was created.
default_version_namestringThe name of the default package version. (pattern: <code>[a-zA-Z0-9-_.]+</code>)
descriptionstringThe package description. (pattern: <code>[^\p{C}]+</code>)
last_modified_datestring (date-time)The date when the package was last updated.
package_arnstringThe ARN for the package.
package_namestringThe name of the software package. (pattern: <code>[a-zA-Z0-9-_.]+</code>)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_packageselectpackage_name, regionGets information about the specified software package. Requires permission to access the GetPackage action.
list_packagesselectregionmaxResults, nextTokenLists the software packages associated to the account. Requires permission to access the ListPackages action.
create_packageinsertpackage_name, regionclientTokenCreates an IoT software package that can be deployed to your fleet. Requires permission to access the CreatePackage and GetIndexingConfiguration actions.
update_packageupdatepackage_name, regionclientTokenUpdates the supported fields for a specific software package. Requires permission to access the UpdatePackage and GetIndexingConfiguration actions.
delete_packagedeletepackage_name, regionclientTokenDeletes a specific version from a software package. Note: All package versions must be deleted before deleting the software package. Requires permission to access the DeletePackageVersion action.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
package_namestringThe name of the target software package.
regionstringAWS region (default: us-east-1)
clientTokenstringA 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.
maxResultsintegerThe maximum number of results returned at one time.
nextTokenstringThe token for the next set of results.

SELECT examples​

Gets information about the specified software package. Requires permission to access the GetPackage action.

SELECT
creation_date,
default_version_name,
description,
last_modified_date,
package_arn,
package_name
FROM aws.iot.packages
WHERE package_name = '{{ package_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples​

Creates an IoT software package that can be deployed to your fleet. Requires permission to access the CreatePackage and GetIndexingConfiguration actions.

INSERT INTO aws.iot.packages (
description,
tags,
package_name,
region,
clientToken
)
SELECT
'{{ description }}',
'{{ tags }}',
'{{ package_name }}',
'{{ region }}',
'{{ clientToken }}'
RETURNING
description,
package_arn,
package_name
;

UPDATE examples​

Updates the supported fields for a specific software package. Requires permission to access the UpdatePackage and GetIndexingConfiguration actions.

UPDATE aws.iot.packages
SET
description = '{{ description }}',
defaultVersionName = '{{ defaultVersionName }}',
unsetDefaultVersion = {{ unsetDefaultVersion }}
WHERE
package_name = '{{ package_name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken}}';

DELETE examples​

Deletes a specific version from a software package. Note: All package versions must be deleted before deleting the software package. Requires permission to access the DeletePackageVersion action.

DELETE FROM aws.iot.packages
WHERE package_name = '{{ package_name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken }}'
;