Skip to main content

package_versions

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

Overview

Namepackage_versions
TypeResource
Idaws.iot.package_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
artifactobjectA specific package version artifact associated with a software package version.
attributesobjectMetadata that were added to the package version that can be used to define a package version’s configuration.
creation_datestring (date-time)The date when the package version was created.
descriptionstringThe package version description. (pattern: <code>[^\p{C}]+</code>)
error_reasonstringError reason for a package version failure during creation or update.
last_modified_datestring (date-time)The date when the package version was last updated.
package_namestringThe name of the software package. (pattern: <code>[a-zA-Z0-9-_.]+</code>)
package_version_arnstringThe ARN for the package version. (pattern: <code>^arn:[!-~]+$</code>)
recipestringThe inline job document associated with a software package version used for a quick job deployment.
sbomobjectA specific software bill of matrerials associated with a software package version.
sbom_validation_statusstringThe status of the validation for a new software bill of materials added to a software package version. (IN_PROGRESS, FAILED, SUCCEEDED)
statusstringThe status associated to the package version. For more information, see Package version lifecycle. (DRAFT, PUBLISHED, DEPRECATED)
version_namestringThe name of the package version. (pattern: <code>[a-zA-Z0-9-_.]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_package_versionselectpackage_name, version_name, regionGets information about the specified package version. Requires permission to access the GetPackageVersion action.
list_package_versionsselectpackage_name, regionstatus, maxResults, nextTokenLists the software package versions associated to the account. Requires permission to access the ListPackageVersions action.
create_package_versioninsertpackage_name, version_name, regionclientTokenCreates a new version for an existing IoT software package. Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions.
associate_sbom_with_package_versionupdatepackage_name, version_name, region, sbomclientTokenAssociates the selected software bill of materials (SBOM) with a specific software package version. Requires permission to access the AssociateSbomWithPackageVersion action.
update_package_versionupdatepackage_name, version_name, regionclientTokenUpdates the supported fields for a specific package version. Requires permission to access the UpdatePackageVersion and GetIndexingConfiguration actions.
delete_package_versiondeletepackage_name, version_name, regionclientTokenDeletes a specific version from a software package. Note: If a package version is designated as default, you must remove the designation from the software package using the UpdatePackage action.
disassociate_sbom_from_package_versionexecpackage_name, version_name, regionclientTokenDisassociates the selected software bill of materials (SBOM) from a specific software package version. Requires permission to access the DisassociateSbomWithPackageVersion 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 new software package.
regionstringAWS region (default: us-east-1)
version_namestringThe name of the new package version.
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 to return at one time.
nextTokenstringThe token for the next set of results.
statusstringThe status of the package version. For more information, see Package version lifecycle.

SELECT examples

Gets information about the specified package version. Requires permission to access the GetPackageVersion action.

SELECT
artifact,
attributes,
creation_date,
description,
error_reason,
last_modified_date,
package_name,
package_version_arn,
recipe,
sbom,
sbom_validation_status,
status,
version_name
FROM aws.iot.package_versions
WHERE package_name = '{{ package_name }}' -- required
AND version_name = '{{ version_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a new version for an existing IoT software package. Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions.

INSERT INTO aws.iot.package_versions (
description,
attributes,
artifact,
recipe,
tags,
package_name,
version_name,
region,
clientToken
)
SELECT
'{{ description }}',
'{{ attributes }}',
'{{ artifact }}',
'{{ recipe }}',
'{{ tags }}',
'{{ package_name }}',
'{{ version_name }}',
'{{ region }}',
'{{ clientToken }}'
RETURNING
attributes,
description,
error_reason,
package_name,
package_version_arn,
status,
version_name
;

UPDATE examples

Associates the selected software bill of materials (SBOM) with a specific software package version. Requires permission to access the AssociateSbomWithPackageVersion action.

UPDATE aws.iot.package_versions
SET
sbom = '{{ sbom }}'
WHERE
package_name = '{{ package_name }}' --required
AND version_name = '{{ version_name }}' --required
AND region = '{{ region }}' --required
AND sbom = '{{ sbom }}' --required
AND clientToken = '{{ clientToken}}'
RETURNING
package_name,
sbom,
sbom_validation_status,
version_name;

DELETE examples

Deletes a specific version from a software package. Note: If a package version is designated as default, you must remove the designation from the software package using the UpdatePackage action.

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

Lifecycle Methods

Disassociates the selected software bill of materials (SBOM) from a specific software package version. Requires permission to access the DisassociateSbomWithPackageVersion action.

EXEC aws.iot.package_versions.disassociate_sbom_from_package_version
@package_name='{{ package_name }}' --required,
@version_name='{{ version_name }}' --required,
@region='{{ region }}' --required,
@clientToken='{{ clientToken }}'
;