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 | Registers a package version. |
| Id | awscc.panorama.package_versions |
Fields
| Name | Datatype | Description |
|---|---|---|
owner_account | string | An owner account. |
package_id | string | A package ID. |
package_arn | string | |
package_version | string | A package version. |
patch_version | string | A patch version. |
mark_latest | boolean | Whether to mark the new version as the latest version. |
is_latest_patch | boolean | |
package_name | string | |
status | string | |
status_description | string | |
registered_time | integer | |
region | string | AWS region. |
For more information, see AWS::Panorama::PackageVersion.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | PackageId, PackageVersion, PatchVersion, region |
delete_resource | DELETE | Identifier, region |
update_resource | UPDATE | Identifier, PatchDocument, region |
get_resource | SELECT | 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 awscc.panorama.package_versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ package_id }}|{{ package_version }}|{{ patch_version }}';
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 awscc.panorama.package_versions (
PackageId,
PackageVersion,
PatchVersion,
region
)
SELECT
'{{ package_id }}',
'{{ package_version }}',
'{{ patch_version }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.panorama.package_versions (
OwnerAccount,
PackageId,
PackageVersion,
PatchVersion,
MarkLatest,
UpdatedLatestPatchVersion,
region
)
SELECT
'{{ owner_account }}',
'{{ package_id }}',
'{{ package_version }}',
'{{ patch_version }}',
'{{ mark_latest }}',
'{{ updated_latest_patch_version }}',
'{{ 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_version
props:
- name: owner_account
value: '{{ owner_account }}'
- name: package_id
value: '{{ package_id }}'
- name: package_version
value: '{{ package_version }}'
- name: patch_version
value: '{{ patch_version }}'
- name: mark_latest
value: '{{ mark_latest }}'
- name: updated_latest_patch_version
value: null
UPDATE example
Use the following StackQL query and manifest file to update a package_version resource, using stack-deploy.
/*+ update */
UPDATE awscc.panorama.package_versions
SET PatchDocument = string('{{ {
"MarkLatest": mark_latest,
"UpdatedLatestPatchVersion": updated_latest_patch_version
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ package_id }}|{{ package_version }}|{{ patch_version }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.panorama.package_versions
WHERE
Identifier = '{{ package_id }}|{{ package_version }}|{{ patch_version }}' 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 package_versions resource, the following permissions are required:
- Create
- Read
- Update
- Delete
panorama:RegisterPackageVersion,
panorama:DescribePackageVersion,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion
panorama:DescribePackageVersion,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion
panorama:DescribePackageVersion,
panorama:RegisterPackageVersion,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion
panorama:DeregisterPackageVersion,
panorama:DescribePackageVersion,
s3:DeleteObject,
s3:DeleteObjectVersion,
s3:DeleteObjectVersionTagging,
s3:ListBucket,
s3:GetObject,
s3:GetObjectVersion