Skip to main content

source_locations

Creates, updates, deletes or gets a source_location resource or lists source_locations in a region

Overview

Namesource_locations
TypeResource
DescriptionDefinition of AWS::MediaTailor::SourceLocation Resource Type
Idawscc.mediatailor.source_locations

Fields

NameDatatypeDescription
access_configurationobject

Access configuration parameters.

arnstring

The ARN of the source location.

default_segment_delivery_configurationobject

The optional configuration for a server that serves segments. Use this if you want the segment delivery server to be different from the source location server. For example, you can configure your source location server to be an origination server, such as MediaPackage, and the segment delivery server to be a content delivery network (CDN), such as CloudFront. If you don't specify a segment delivery server, then the source location server is used.

http_configurationobject

The HTTP configuration for the source location.

segment_delivery_configurationsarray

A list of the segment delivery configurations associated with this resource.

source_location_namestring
tagsarrayThe tags to assign to the source location.
regionstringAWS region.

For more information, see AWS::MediaTailor::SourceLocation.

Methods

NameResourceAccessible byRequired Params
create_resourcesource_locationsINSERTHttpConfiguration, SourceLocationName, region
delete_resourcesource_locationsDELETEIdentifier, region
update_resourcesource_locationsUPDATEIdentifier, PatchDocument, region
list_resourcessource_locations_list_onlySELECTregion
get_resourcesource_locationsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual source_location.

SELECT
region,
access_configuration,
arn,
default_segment_delivery_configuration,
http_configuration,
segment_delivery_configurations,
source_location_name,
tags
FROM awscc.mediatailor.source_locations
WHERE
region = '{{ region }}' AND
Identifier = '{{ source_location_name }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.mediatailor.source_locations (
HttpConfiguration,
SourceLocationName,
region
)
SELECT
'{{ http_configuration }}',
'{{ source_location_name }}',
'{{ 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 source_location resource, using stack-deploy.

/*+ update */
UPDATE awscc.mediatailor.source_locations
SET PatchDocument = string('{{ {
"AccessConfiguration": access_configuration,
"DefaultSegmentDeliveryConfiguration": default_segment_delivery_configuration,
"HttpConfiguration": http_configuration,
"SegmentDeliveryConfigurations": segment_delivery_configurations,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ source_location_name }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.mediatailor.source_locations
WHERE
Identifier = '{{ source_location_name }}' 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 source_locations resource, the following permissions are required:

mediatailor:CreateSourceLocation,
mediatailor:DescribeSourceLocation,
mediatailor:TagResource,
secretsmanager:DescribeSecret,
secretsmanager:GetSecretValue,
kms:CreateGrant