packages
Creates, updates, deletes or gets a package resource or lists packages in a region
Overview
| Name | packages |
| Type | Resource |
| Description | Creates a package and storage location in an Amazon S3 access point. |
| Id | awscc.panorama.packages |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
package_name | string | A name for the package. |
package_id | string | |
arn | string | |
storage_location | object | A storage location. |
created_time | integer | |
tags | array | Tags for the package. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
package_id | string | |
region | string | AWS region. |
For more information, see AWS::Panorama::Package.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | packages | INSERT | PackageName, region |
delete_resource | packages | DELETE | Identifier, region |
update_resource | packages | UPDATE | Identifier, PatchDocument, region |
list_resources | packages_list_only | SELECT | region |
get_resource | packages | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual package.
SELECT
region,
package_name,
package_id,
arn,
storage_location,
created_time,
tags
FROM awscc.panorama.packages
WHERE
region = 'us-east-1' AND
Identifier = '{{ package_id }}';
Lists all packages in a region.
SELECT
region,
package_id
FROM awscc.panorama.packages_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new package resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.panorama.packages (
PackageName,
region
)
SELECT
'{{ package_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.panorama.packages (
PackageName,
StorageLocation,
Tags,
region
)
SELECT
'{{ package_name }}',
'{{ storage_location }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: package
props:
- name: package_name
value: '{{ package_name }}'
- name: storage_location
value:
bucket: '{{ bucket }}'
repo_prefix_location: '{{ repo_prefix_location }}'
generated_prefix_location: '{{ generated_prefix_location }}'
binary_prefix_location: '{{ binary_prefix_location }}'
manifest_prefix_location: '{{ manifest_prefix_location }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a package resource, using stack-deploy.
/*+ update */
UPDATE awscc.panorama.packages
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ package_id }}';
DELETE example
/*+ delete */
DELETE FROM awscc.panorama.packages
WHERE
Identifier = '{{ package_id }}' AND
region = 'us-east-1';
Permissions
To operate on the packages resource, the following permissions are required:
- Create
- Read
- Update
- List
- Delete
panorama:CreatePackage,
panorama:ListTagsForResource,
panorama:TagResource,
panorama:DescribePackage,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion
panorama:DescribePackage,
panorama:ListTagsForResource,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion
panorama:DescribePackage,
panorama:ListTagsForResource,
panorama:TagResource,
panorama:UntagResource,
s3:PutObject,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion
panorama:ListPackages,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion
panorama:DeletePackage,
panorama:DescribePackage,
s3:DeleteObject,
s3:DeleteObjectVersion,
s3:DeleteObjectVersionTagging,
s3:ListObjects,
s3:ListObjectsV2,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion