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
Idawscc.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.

For more information, see AWS::MediaPackage::Asset.

Methods

NameResourceAccessible byRequired Params
create_resourceassetsINSERTId, PackagingGroupId, SourceArn, SourceRoleArn, region
delete_resourceassetsDELETEIdentifier, region
list_resourcesassets_list_onlySELECTregion
get_resourceassetsSELECTIdentifier, region

SELECT examples

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 = '{{ region }}' AND
Identifier = '{{ id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.mediapackage.assets (
Id,
PackagingGroupId,
SourceArn,
SourceRoleArn,
region
)
SELECT
'{{ id }}',
'{{ packaging_group_id }}',
'{{ source_arn }}',
'{{ source_role_arn }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.mediapackage.assets
WHERE
Identifier = '{{ 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:

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 assets resource, the following permissions are required:

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