package_versions
Creates, updates, deletes or gets a package_version
resource or lists package_versions
in a region
Overview
Name | package_versions |
Type | Resource |
Description | Schema for PackageVersion Resource Type |
Id | aws.panorama.package_versions |
Fields
Name | Datatype | Description |
---|---|---|
owner_account | string | |
package_id | string | |
package_arn | string | |
package_version | string | |
patch_version | string | |
mark_latest | boolean | |
is_latest_patch | boolean | |
package_name | string | |
status | string | |
status_description | string | |
registered_time | integer | |
updated_latest_patch_version | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | PackageId, PackageVersion, PatchVersion, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all properties from an individual package_version
.
SELECT
region,
owner_account,
package_id,
package_arn,
package_version,
patch_version,
mark_latest,
is_latest_patch,
package_name,
status,
status_description,
registered_time,
updated_latest_patch_version
FROM aws.panorama.package_versions
WHERE region = 'us-east-1' AND data__Identifier = '<PackageId>|<PackageVersion>|<PatchVersion>';
INSERT
example
Use the following StackQL query and manifest file to create a new package_version
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.panorama.package_versions (
PackageId,
PackageVersion,
PatchVersion,
region
)
SELECT
'{{ PackageId }}',
'{{ PackageVersion }}',
'{{ PatchVersion }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.panorama.package_versions (
OwnerAccount,
PackageId,
PackageVersion,
PatchVersion,
MarkLatest,
UpdatedLatestPatchVersion,
region
)
SELECT
'{{ OwnerAccount }}',
'{{ PackageId }}',
'{{ PackageVersion }}',
'{{ PatchVersion }}',
'{{ MarkLatest }}',
'{{ UpdatedLatestPatchVersion }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: package_version
props:
- name: OwnerAccount
value: '{{ OwnerAccount }}'
- name: PackageId
value: '{{ PackageId }}'
- name: PackageVersion
value: '{{ PackageVersion }}'
- name: PatchVersion
value: '{{ PatchVersion }}'
- name: MarkLatest
value: '{{ MarkLatest }}'
- name: UpdatedLatestPatchVersion
value: null
DELETE
example
/*+ delete */
DELETE FROM aws.panorama.package_versions
WHERE data__Identifier = '<PackageId|PackageVersion|PatchVersion>'
AND region = 'us-east-1';
Permissions
To operate on the package_versions
resource, the following permissions are required:
Create
panorama:RegisterPackageVersion,
panorama:DescribePackageVersion,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion
Read
panorama:DescribePackageVersion,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion
Update
panorama:DescribePackageVersion,
panorama:RegisterPackageVersion,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion
Delete
panorama:DeregisterPackageVersion,
panorama:DescribePackageVersion,
s3:DeleteObject,
s3:DeleteObjectVersion,
s3:DeleteObjectVersionTagging,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion