source_locations
Creates, updates, deletes, gets or lists a source_locations resource.
Overview
| Name | source_locations |
| Type | Resource |
| Id | aws.mediatailor.source_locations |
Fields
The following fields are returned by SELECT queries:
- describe_source_location
- list_source_locations
| Name | Datatype | Description |
|---|---|---|
access_configuration | object | Access configuration parameters. |
arn | string | The ARN of the source location. |
creation_time | string (date-time) | The timestamp that indicates when the source location was created. |
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. |
last_modified_time | string (date-time) | The timestamp that indicates when the source location was last modified. |
segment_delivery_configurations | array | A list of the segment delivery configurations associated with this resource. |
source_location_name | string | The name of the source location. |
tags | object | The tags assigned to the source location. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources. |
| Name | Datatype | Description |
|---|---|---|
access_configuration | object | Access configuration parameters. |
arn | string | The ARN of the SourceLocation. |
creation_time | string (date-time) | The timestamp that indicates when the source location was created. |
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. |
last_modified_time | string (date-time) | The timestamp that indicates when the source location was last modified. |
segment_delivery_configurations | array | The segment delivery configurations for the source location. |
source_location_name | string | The name of the source location. |
tags | object | The tags assigned to the source location. Tags are key-value pairs that you can associate with Amazon resources to help with organization, access control, and cost tracking. For more information, see Tagging AWS Elemental MediaTailor Resources. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_source_location | select | source_location_name, region | Describes a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide. | |
list_source_locations | select | region | maxResults, nextToken | Lists the source locations for a channel. A source location defines the host server URL, and contains a list of sources. |
create_source_location | insert | source_location_name, region, HttpConfiguration | Creates a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide. | |
update_source_location | update | source_location_name, region, HttpConfiguration | Updates a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide. | |
delete_source_location | delete | source_location_name, region | Deletes a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
source_location_name | string | The name of the source location. |
maxResults | integer | The maximum number of source locations that you want MediaTailor to return in response to the current request. If there are more than MaxResults source locations, use the value of NextToken in the response to get the next page of results. The default value is 100. MediaTailor uses DynamoDB-based pagination, which means that a response might contain fewer than MaxResults items, including 0 items, even when more results are available. To retrieve all results, you must continue making requests using the NextToken value from each response until the response no longer includes a NextToken value. |
nextToken | string | Pagination token returned by the list request when results exceed the maximum allowed. Use the token to fetch the next page of results. For the first ListSourceLocations request, omit this value. For subsequent requests, get the value of NextToken from the previous response and specify that value for NextToken in the request. Continue making requests until the response no longer includes a NextToken value, which indicates that all results have been retrieved. |
SELECT examples
- describe_source_location
- list_source_locations
Describes a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide.
SELECT
access_configuration,
arn,
creation_time,
default_segment_delivery_configuration,
http_configuration,
last_modified_time,
segment_delivery_configurations,
source_location_name,
tags
FROM aws.mediatailor.source_locations
WHERE source_location_name = '{{ source_location_name }}' -- required
AND region = '{{ region }}' -- required
;
Lists the source locations for a channel. A source location defines the host server URL, and contains a list of sources.
SELECT
access_configuration,
arn,
creation_time,
default_segment_delivery_configuration,
http_configuration,
last_modified_time,
segment_delivery_configurations,
source_location_name,
tags
FROM aws.mediatailor.source_locations
WHERE region = '{{ region }}' -- required
AND maxResults = '{{ maxResults }}'
AND nextToken = '{{ nextToken }}'
;
INSERT examples
- create_source_location
- Manifest
Creates a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide.
INSERT INTO aws.mediatailor.source_locations (
AccessConfiguration,
DefaultSegmentDeliveryConfiguration,
HttpConfiguration,
SegmentDeliveryConfigurations,
Tags,
source_location_name,
region
)
SELECT
'{{ AccessConfiguration }}',
'{{ DefaultSegmentDeliveryConfiguration }}',
'{{ HttpConfiguration }}' /* required */,
'{{ SegmentDeliveryConfigurations }}',
'{{ Tags }}',
'{{ source_location_name }}',
'{{ region }}'
RETURNING
access_configuration,
arn,
creation_time,
default_segment_delivery_configuration,
http_configuration,
last_modified_time,
segment_delivery_configurations,
source_location_name,
tags
;
# Description fields are for documentation purposes
- name: source_locations
props:
- name: source_location_name
value: "{{ source_location_name }}"
description: Required parameter for the source_locations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the source_locations resource.
- name: AccessConfiguration
description: |
Access configuration parameters.
value:
AccessType: "{{ AccessType }}"
SecretsManagerAccessTokenConfiguration:
HeaderName: "{{ HeaderName }}"
SecretArn: "{{ SecretArn }}"
SecretStringKey: "{{ SecretStringKey }}"
- name: DefaultSegmentDeliveryConfiguration
description: |
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.
value:
BaseUrl: "{{ BaseUrl }}"
- name: HttpConfiguration
description: |
The HTTP configuration for the source location.
value:
BaseUrl: "{{ BaseUrl }}"
- name: SegmentDeliveryConfigurations
value:
- BaseUrl: "{{ BaseUrl }}"
Name: "{{ Name }}"
- name: Tags
value: "{{ Tags }}"
UPDATE examples
- update_source_location
Updates a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide.
UPDATE aws.mediatailor.source_locations
SET
AccessConfiguration = '{{ AccessConfiguration }}',
DefaultSegmentDeliveryConfiguration = '{{ DefaultSegmentDeliveryConfiguration }}',
HttpConfiguration = '{{ HttpConfiguration }}',
SegmentDeliveryConfigurations = '{{ SegmentDeliveryConfigurations }}'
WHERE
source_location_name = '{{ source_location_name }}' --required
AND region = '{{ region }}' --required
AND HttpConfiguration = '{{ HttpConfiguration }}' --required
RETURNING
access_configuration,
arn,
creation_time,
default_segment_delivery_configuration,
http_configuration,
last_modified_time,
segment_delivery_configurations,
source_location_name,
tags;
DELETE examples
- delete_source_location
Deletes a source location. A source location is a container for sources. For more information about source locations, see Working with source locations in the MediaTailor User Guide.
DELETE FROM aws.mediatailor.source_locations
WHERE source_location_name = '{{ source_location_name }}' --required
AND region = '{{ region }}' --required
;