Skip to main content

assets

Creates, updates, deletes or gets an asset resource or lists assets in a region

Overview

Nameassets
TypeResource
DescriptionResource schema for AWS::MediaPackage::Asset
Idaws.mediapackage.assets

Fields

NameDatatypeDescription
arnstringThe ARN of the Asset.
created_atstringThe time the Asset was initially submitted for Ingest.
egress_endpointsarrayThe list of egress endpoints available for the Asset.
idstringThe unique identifier for the Asset.
packaging_group_idstringThe ID of the PackagingGroup for the Asset.
resource_idstringThe resource ID to include in SPEKE key requests.
source_arnstringARN of the source object in S3.
source_role_arnstringThe IAM role_arn used to access the source S3 bucket.
tagsarrayA collection of tags associated with a resource
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTId, PackagingGroupId, SourceArn, SourceRoleArn, region
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all assets in a region.

SELECT
region,
arn,
created_at,
egress_endpoints,
id,
packaging_group_id,
resource_id,
source_arn,
source_role_arn,
tags
FROM aws.mediapackage.assets
WHERE region = 'us-east-1';

Gets all properties from an individual asset.

SELECT
region,
arn,
created_at,
egress_endpoints,
id,
packaging_group_id,
resource_id,
source_arn,
source_role_arn,
tags
FROM aws.mediapackage.assets
WHERE region = 'us-east-1' AND data__Identifier = '<Id>';

INSERT example

Use the following StackQL query and manifest file to create a new asset resource, using stack-deploy.

/*+ create */
INSERT INTO aws.mediapackage.assets (
Id,
PackagingGroupId,
SourceArn,
SourceRoleArn,
region
)
SELECT
'{{ Id }}',
'{{ PackagingGroupId }}',
'{{ SourceArn }}',
'{{ SourceRoleArn }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.mediapackage.assets
WHERE data__Identifier = '<Id>'
AND region = 'us-east-1';

Permissions

To operate on the assets resource, the following permissions are required:

Create

mediapackage-vod:CreateAsset,
mediapackage-vod:DescribeAsset,
mediapackage-vod:TagResource,
iam:PassRole

Read

mediapackage-vod:DescribeAsset

Delete

mediapackage-vod:DescribeAsset,
mediapackage-vod:DeleteAsset

List

mediapackage-vod:ListAssets,
mediapackage-vod:DescribePackagingGroup