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 | awscc.mediatailor.source_locations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
access_configuration | object | <p>Access configuration parameters.</p> |
arn | string | <p>The ARN of the source location.</p> |
default_segment_delivery_configuration | object | <p>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.</p> |
http_configuration | object | <p>The HTTP configuration for the source location.</p> |
segment_delivery_configurations | array | <p>A list of the segment delivery configurations associated with this resource.</p> |
source_location_name | string | |
tags | array | The tags to assign to the source location. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
source_location_name | string | |
region | string | AWS region. |
For more information, see AWS::MediaTailor::SourceLocation.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | source_locations | INSERT | HttpConfiguration, SourceLocationName, region |
delete_resource | source_locations | DELETE | Identifier, region |
update_resource | source_locations | UPDATE | Identifier, PatchDocument, region |
list_resources | source_locations_list_only | SELECT | region |
get_resource | source_locations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
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 = 'us-east-1' AND
Identifier = '{{ source_location_name }}';
Lists all source_locations in a region.
SELECT
region,
source_location_name
FROM awscc.mediatailor.source_locations_list_only
WHERE
region = 'us-east-1';
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 awscc.mediatailor.source_locations (
HttpConfiguration,
SourceLocationName,
region
)
SELECT
'{{ http_configuration }}',
'{{ source_location_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.mediatailor.source_locations (
AccessConfiguration,
DefaultSegmentDeliveryConfiguration,
HttpConfiguration,
SegmentDeliveryConfigurations,
SourceLocationName,
Tags,
region
)
SELECT
'{{ access_configuration }}',
'{{ default_segment_delivery_configuration }}',
'{{ http_configuration }}',
'{{ segment_delivery_configurations }}',
'{{ source_location_name }}',
'{{ 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: access_configuration
value:
access_type: '{{ access_type }}'
secrets_manager_access_token_configuration:
header_name: '{{ header_name }}'
secret_arn: '{{ secret_arn }}'
secret_string_key: '{{ secret_string_key }}'
- name: default_segment_delivery_configuration
value:
base_url: '{{ base_url }}'
- name: http_configuration
value:
base_url: '{{ base_url }}'
- name: segment_delivery_configurations
value:
- base_url: '{{ base_url }}'
name: '{{ name }}'
- name: source_location_name
value: '{{ source_location_name }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
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 }}';
DELETE example
/*+ delete */
DELETE FROM awscc.mediatailor.source_locations
WHERE
Identifier = '{{ source_location_name }}' AND
region = 'us-east-1';
Permissions
To operate on the source_locations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
mediatailor:CreateSourceLocation,
mediatailor:DescribeSourceLocation,
mediatailor:TagResource,
secretsmanager:DescribeSecret,
secretsmanager:GetSecretValue,
kms:CreateGrant
mediatailor:DescribeSourceLocation
mediatailor:DescribeSourceLocation,
mediatailor:TagResource,
mediatailor:UntagResource,
mediatailor:UpdateSourceLocation,
secretsmanager:DescribeSecret,
secretsmanager:GetSecretValue,
kms:CreateGrant
mediatailor:DeleteSourceLocation,
mediatailor:DescribeSourceLocation
mediatailor:ListSourceLocations