source_locations
Creates, updates, deletes or gets a source_location resource or lists source_locations in a region
Overview
| Name | source_locations |
| Type | Resource |
| Description | Definition of AWS::MediaTailor::SourceLocation Resource Type |
| Id | aws.mediatailor.source_locations |
Fields
| Name | Datatype | Description |
|---|---|---|
access_configuration | object | Access configuration parameters. |
arn | string | The ARN of the source location. |
default_segment_delivery_configuration | object | 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_configuration | object | The HTTP configuration for the source location. |
segment_delivery_configurations | array | A list of the segment delivery configurations associated with this resource. |
source_location_name | string | |
tags | array | The tags to assign to the source location. |
region | string | AWS region. |
For more information, see AWS::MediaTailor::SourceLocation.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | HttpConfiguration, SourceLocationName, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT examples
Gets all source_locations in a region.
SELECT
region,
access_configuration,
arn,
default_segment_delivery_configuration,
http_configuration,
segment_delivery_configurations,
source_location_name,
tags
FROM aws.mediatailor.source_locations
WHERE region = 'us-east-1';
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 aws.mediatailor.source_locations
WHERE region = 'us-east-1' AND data__Identifier = '<SourceLocationName>';
INSERT example
Use the following StackQL query and manifest file to create a new source_location resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.mediatailor.source_locations (
HttpConfiguration,
SourceLocationName,
region
)
SELECT
'{{ HttpConfiguration }}',
'{{ SourceLocationName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.mediatailor.source_locations (
AccessConfiguration,
DefaultSegmentDeliveryConfiguration,
HttpConfiguration,
SegmentDeliveryConfigurations,
SourceLocationName,
Tags,
region
)
SELECT
'{{ AccessConfiguration }}',
'{{ DefaultSegmentDeliveryConfiguration }}',
'{{ HttpConfiguration }}',
'{{ SegmentDeliveryConfigurations }}',
'{{ SourceLocationName }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: source_location
props:
- name: AccessConfiguration
value:
AccessType: '{{ AccessType }}'
SecretsManagerAccessTokenConfiguration:
HeaderName: '{{ HeaderName }}'
SecretArn: '{{ SecretArn }}'
SecretStringKey: '{{ SecretStringKey }}'
- name: DefaultSegmentDeliveryConfiguration
value:
BaseUrl: '{{ BaseUrl }}'
- name: HttpConfiguration
value:
BaseUrl: '{{ BaseUrl }}'
- name: SegmentDeliveryConfigurations
value:
- BaseUrl: '{{ BaseUrl }}'
Name: '{{ Name }}'
- name: SourceLocationName
value: '{{ SourceLocationName }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE example
/*+ delete */
DELETE FROM aws.mediatailor.source_locations
WHERE data__Identifier = '<SourceLocationName>'
AND region = 'us-east-1';
Permissions
To operate on the source_locations resource, the following permissions are required:
Create
mediatailor:CreateSourceLocation,
mediatailor:DescribeSourceLocation,
mediatailor:TagResource,
secretsmanager:DescribeSecret,
secretsmanager:GetSecretValue,
kms:CreateGrant
Read
mediatailor:DescribeSourceLocation
Update
mediatailor:DescribeSourceLocation,
mediatailor:TagResource,
mediatailor:UntagResource,
mediatailor:UpdateSourceLocation,
secretsmanager:DescribeSecret,
secretsmanager:GetSecretValue,
kms:CreateGrant
Delete
mediatailor:DeleteSourceLocation,
mediatailor:DescribeSourceLocation
List
mediatailor:ListSourceLocations