Skip to main content

package_versions

Creates, updates, deletes or gets a package_version resource or lists package_versions in a region

Overview

Namepackage_versions
TypeResource
DescriptionRegisters a package version.
Idawscc.panorama.package_versions

Fields

NameDatatypeDescription
owner_accountstringAn owner account.
package_idstringA package ID.
package_arnstring
package_versionstringA package version.
patch_versionstringA patch version.
mark_latestbooleanWhether to mark the new version as the latest version.
is_latest_patchboolean
package_namestring
statusstring
status_descriptionstring
registered_timeinteger
regionstringAWS region.

For more information, see AWS::Panorama::PackageVersion.

Methods

NameAccessible byRequired Params
create_resourceINSERTPackageId, PackageVersion, PatchVersion, region
delete_resourceDELETEIdentifier, region
update_resourceUPDATEIdentifier, PatchDocument, region
get_resourceSELECTIdentifier, 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.

/*+ 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
;

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:

ParameterDescription
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:

panorama:RegisterPackageVersion,
panorama:DescribePackageVersion,
s3:ListBucket,
s3:PutObject,
s3:GetObject,
s3:GetObjectVersion