packages
Creates, updates, deletes, gets or lists a packages resource.
Overview
| Name | packages |
| Type | Resource |
| Id | aws.iot.packages |
Fields
The following fields are returned by SELECT queries:
- get_package
- list_packages
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | The date the package was created. |
default_version_name | string | The name of the default package version. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
description | string | The package description. (pattern: <code>[^\p{C}]+</code>) |
last_modified_date | string (date-time) | The date when the package was last updated. |
package_arn | string | The ARN for the package. |
package_name | string | The name of the software package. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
| Name | Datatype | Description |
|---|---|---|
creation_date | string (date-time) | The date that the package was created. |
default_version_name | string | The name of the default package version. (pattern: <code>[a-zA-Z0-9-_.]+</code>) |
last_modified_date | string (date-time) | The date that the package was last updated. |
package_name | string | The name for the target software package. (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 | select | package_name, region | Gets information about the specified software package. Requires permission to access the GetPackage action. | |
list_packages | select | region | maxResults, nextToken | Lists the software packages associated to the account. Requires permission to access the ListPackages action. |
create_package | insert | package_name, region | clientToken | Creates an IoT software package that can be deployed to your fleet. Requires permission to access the CreatePackage and GetIndexingConfiguration actions. |
update_package | update | package_name, region | clientToken | Updates the supported fields for a specific software package. Requires permission to access the UpdatePackage and GetIndexingConfiguration actions. |
delete_package | delete | package_name, region | clientToken | 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. |
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 target software package. |
region | string | AWS region (default: us-east-1) |
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 returned at one time. |
nextToken | string | The token for the next set of results. |
SELECT examples
- get_package
- list_packages
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
;
Lists the software packages associated to the account. Requires permission to access the ListPackages action.
SELECT
creation_date,
default_version_name,
last_modified_date,
package_name
FROM aws.iot.packages
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_package
- Manifest
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
;
# Description fields are for documentation purposes
- name: packages
props:
- name: package_name
value: "{{ package_name }}"
description: Required parameter for the packages resource.
- name: region
value: "{{ region }}"
description: Required parameter for the packages resource.
- name: description
value: "{{ description }}"
- 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
- update_package
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
- delete_package
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 }}'
;