package_versions
Creates, updates, deletes, gets or lists a package_versions resource.
Overview
| Name | package_versions |
| Type | Resource |
| Id | aws.iot.package_versions |
Fields
The following fields are returned by SELECT queries:
- get_package_version
- list_package_versions
| Name | Datatype | Description |
|---|---|---|
artifact | object | A specific package version artifact associated with a software package version. |
attributes | object | Metadata that were added to the package version that can be used to define a package version’s configuration. |
creation_date | string (date-time) | The date when the package version was created. |
description | string | The package version description. (pattern: <code>[^\p{C}]+</code>) |
error_reason | string | Error reason for a package version failure during creation or update. |
last_modified_date | string (date-time) | The date when the package version was last updated. |
package_name | string | The name of the software package. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
package_version_arn | string | The ARN for the package version. (pattern: <code>^arn:[!-~]+$</code>) |
recipe | string | The inline job document associated with a software package version used for a quick job deployment. |
sbom | object | A specific software bill of matrerials associated with a software package version. |
sbom_validation_status | string | The status of the validation for a new software bill of materials added to a software package version. (IN_PROGRESS, FAILED, SUCCEEDED) |
status | string | The status associated to the package version. For more information, see Package version lifecycle. (DRAFT, PUBLISHED, DEPRECATED) |
version_name | string | The name of the package version. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | The date that the package version was created. |
last_modified_date | string (date-time) | The date that the package version was last updated. |
package_name | string | The name of the associated software package. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
status | string | The status of the package version. For more information, see Package version lifecycle. (DRAFT, PUBLISHED, DEPRECATED) |
version_name | string | The name of the target package version. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_package_version | select | package_name, version_name, region | Gets information about the specified package version. Requires permission to access the GetPackageVersion action. | |
list_package_versions | select | package_name, region | status, maxResults, nextToken | Lists the software package versions associated to the account. Requires permission to access the ListPackageVersions action. |
create_package_version | insert | package_name, version_name, region | clientToken | Creates a new version for an existing IoT software package. Requires permission to access the CreatePackageVersion and GetIndexingConfiguration actions. |
associate_sbom_with_package_version | update | package_name, version_name, region, sbom | clientToken | Associates the selected software bill of materials (SBOM) with a specific software package version. Requires permission to access the AssociateSbomWithPackageVersion action. |
update_package_version | update | package_name, version_name, region | clientToken | Updates the supported fields for a specific package version. Requires permission to access the UpdatePackageVersion and GetIndexingConfiguration actions. |
delete_package_version | delete | package_name, version_name, region | clientToken | 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. |
disassociate_sbom_from_package_version | exec | package_name, version_name, region | clientToken | Disassociates 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.
| Name | Datatype | Description |
|---|---|---|
package_name | string | The name of the new software package. |
region | string | AWS region (default: us-east-1) |
version_name | string | The name of the new package version. |
clientToken | string | 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. |
maxResults | integer | The maximum number of results to return at one time. |
nextToken | string | The token for the next set of results. |
status | string | The status of the package version. For more information, see Package version lifecycle. |
SELECT examples
- get_package_version
- list_package_versions
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
;
Lists the software package versions associated to the account. Requires permission to access the ListPackageVersions action.
SELECT
creation_date,
last_modified_date,
package_name,
status,
version_name
FROM aws.iot.package_versions
WHERE package_name = '{{ package_name }}' -- required
AND region = '{{ region }}' -- required
AND status = '{{ status }}'
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_package_version
- Manifest
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
;
# Description fields are for documentation purposes
- name: package_versions
props:
- name: package_name
value: "{{ package_name }}"
description: Required parameter for the package_versions resource.
- name: version_name
value: "{{ version_name }}"
description: Required parameter for the package_versions resource.
- name: region
value: "{{ region }}"
description: Required parameter for the package_versions resource.
- name: description
value: "{{ description }}"
- name: attributes
value: "{{ attributes }}"
- name: artifact
description: |
A specific package version artifact associated with a software package version.
value:
s3Location:
bucket: "{{ bucket }}"
key: "{{ key }}"
version: "{{ version }}"
- name: recipe
value: "{{ recipe }}"
- name: tags
value: "{{ tags }}"
- name: clientToken
value: "{{ clientToken }}"
description: 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.
description: 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.
UPDATE examples
- associate_sbom_with_package_version
- update_package_version
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;
Updates the supported fields for a specific package version. Requires permission to access the UpdatePackageVersion and GetIndexingConfiguration actions.
UPDATE aws.iot.package_versions
SET
description = '{{ description }}',
attributes = '{{ attributes }}',
artifact = '{{ artifact }}',
action = '{{ action }}',
recipe = '{{ recipe }}'
WHERE
package_name = '{{ package_name }}' --required
AND version_name = '{{ version_name }}' --required
AND region = '{{ region }}' --required
AND clientToken = '{{ clientToken}}';
DELETE examples
- delete_package_version
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
- disassociate_sbom_from_package_version
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 }}'
;