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 = '{{ region }}' AND
Identifier = '{{ package_id }}';
Lists all packages in a region.
SELECT
region,
package_id
FROM awscc.panorama.packages_list_only
WHERE
region = '{{ region }}';
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.panorama.packages (
PackageName,
StorageLocation,
Tags,
region
)
SELECT
'{{ package_name }}',
'{{ storage_location }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
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 }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.panorama.packages
WHERE
Identifier = '{{ package_id }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
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