assets
Creates, updates, deletes or gets an asset resource or lists assets in a region
Overview
| Name | assets |
| Type | Resource |
| Description | Resource schema for AWS::MediaPackage::Asset |
| Id | awscc.mediapackage.assets |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN of the Asset. |
created_at | string | The time the Asset was initially submitted for Ingest. |
egress_endpoints | array | The list of egress endpoints available for the Asset. |
id | string | The unique identifier for the Asset. |
packaging_group_id | string | The ID of the PackagingGroup for the Asset. |
resource_id | string | The resource ID to include in SPEKE key requests. |
source_arn | string | ARN of the source object in S3. |
source_role_arn | string | The IAM role_arn used to access the source S3 bucket. |
tags | array | A collection of tags associated with a resource |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for the Asset. |
region | string | AWS region. |
For more information, see AWS::MediaPackage::Asset.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | assets | INSERT | Id, PackagingGroupId, SourceArn, SourceRoleArn, region |
delete_resource | assets | DELETE | Identifier, region |
list_resources | assets_list_only | SELECT | region |
get_resource | assets | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 awscc.mediapackage.assets
WHERE
region = 'us-east-1' AND
Identifier = '{{ id }}';
Lists all assets in a region.
SELECT
region,
id
FROM awscc.mediapackage.assets_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new asset resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.mediapackage.assets (
Id,
PackagingGroupId,
SourceArn,
SourceRoleArn,
region
)
SELECT
'{{ id }}',
'{{ packaging_group_id }}',
'{{ source_arn }}',
'{{ source_role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.mediapackage.assets (
EgressEndpoints,
Id,
PackagingGroupId,
ResourceId,
SourceArn,
SourceRoleArn,
Tags,
region
)
SELECT
'{{ egress_endpoints }}',
'{{ id }}',
'{{ packaging_group_id }}',
'{{ resource_id }}',
'{{ source_arn }}',
'{{ source_role_arn }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: asset
props:
- name: egress_endpoints
value:
- packaging_configuration_id: '{{ packaging_configuration_id }}'
url: '{{ url }}'
- name: id
value: '{{ id }}'
- name: packaging_group_id
value: '{{ packaging_group_id }}'
- name: resource_id
value: '{{ resource_id }}'
- name: source_arn
value: '{{ source_arn }}'
- name: source_role_arn
value: '{{ source_role_arn }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
DELETE example
/*+ delete */
DELETE FROM awscc.mediapackage.assets
WHERE
Identifier = '{{ id }}' AND
region = 'us-east-1';
Permissions
To operate on the assets resource, the following permissions are required:
- Create
- Read
- Delete
- List
mediapackage-vod:CreateAsset,
mediapackage-vod:DescribeAsset,
mediapackage-vod:TagResource,
iam:PassRole
mediapackage-vod:DescribeAsset
mediapackage-vod:DescribeAsset,
mediapackage-vod:DeleteAsset
mediapackage-vod:ListAssets,
mediapackage-vod:DescribePackagingGroup