streaming_distributions
Creates, updates, deletes, gets or lists a streaming_distributions resource.
Overview
| Name | streaming_distributions |
| Type | Resource |
| Id | aws.cloudfront.streaming_distributions |
Fields
The following fields are returned by SELECT queries:
- get_streaming_distribution
- list_streaming_distributions
| Name | Datatype | Description |
|---|---|---|
arn | string | The ARN (Amazon Resource Name) for the distribution. For example: arn:aws:cloudfront::123456789012:distribution/EDFDVBD632BHDS5, where 123456789012 is your Amazon Web Services account ID. |
active_trusted_signers | string | A complex type that lists the Amazon Web Services accounts, if any, that you included in the TrustedSigners complex type for this distribution. These are the accounts that you want to allow to create signed URLs for private content. The Signer complex type lists the Amazon Web Services account number of the trusted signer or self if the signer is the Amazon Web Services account that created the distribution. The Signer element also includes the IDs of any active CloudFront key pairs that are associated with the trusted signer's Amazon Web Services account. If no KeyPairId element appears for a Signer, that signer can't create signed URLs. For more information, see Serving Private Content through CloudFront in the Amazon CloudFront Developer Guide. |
domain_name | string | The domain name that corresponds to the streaming distribution, for example, s5c39gqb8ow64r.cloudfront.net. |
id | string | The identifier for the RTMP distribution. For example: EGTXBD79EXAMPLE. |
last_modified_time | string | The date and time that the distribution was last modified. |
status | string | The current status of the RTMP distribution. When the status is Deployed, the distribution's information is propagated to all CloudFront edge locations. |
streaming_distribution_config | string | The current configuration information for the RTMP distribution. |
| Name | Datatype | Description |
|---|---|---|
is_truncated | boolean | A flag that indicates whether more streaming distributions remain to be listed. If your results were truncated, you can make a follow-up pagination request using the Marker request parameter to retrieve more distributions in the list. |
items | string | A complex type that contains one StreamingDistributionSummary element for each distribution that was created by the current Amazon Web Services account. |
marker | string | The value you provided for the Marker request parameter. |
max_items | integer | The value you provided for the MaxItems request parameter. |
next_marker | string | If IsTruncated is true, this element is present and contains the value you can use for the Marker request parameter to continue listing your RTMP distributions where they left off. |
quantity | integer | The number of streaming distributions that were created by the current Amazon Web Services account. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_streaming_distribution | select | id, region | Gets information about a specified RTMP distribution, including the distribution configuration. | |
list_streaming_distributions | select | region | Marker, MaxItems | List streaming distributions. |
create_streaming_distribution | insert | region, StreamingDistributionConfig | This API is deprecated. Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. For more information, read the announcement on the Amazon CloudFront discussion forum. | |
update_streaming_distribution | update | id, region, StreamingDistributionConfig | If-Match | Update a streaming distribution. |
delete_streaming_distribution | delete | id, region | If-Match | Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps. To delete an RTMP distribution using the CloudFront API: Disable the RTMP distribution. Submit a GET Streaming Distribution Config request to get the current configuration and the Etag header for the distribution. Update the XML document that was returned in the response to your GET Streaming Distribution Config request to change the value of Enabled to false. Submit a PUT Streaming Distribution Config request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Then set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET Streaming Distribution Config request in Step 2. Review the response to the PUT Streaming Distribution Config request to confirm that the distribution was successfully disabled. Submit a GET Streaming Distribution Config request to confirm that your changes have propagated. When propagation is complete, the value of Status is Deployed. Submit a DELETE Streaming Distribution request. Set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET Streaming Distribution Config request in Step 2. Review the response to your DELETE Streaming Distribution request to confirm that the distribution was successfully deleted. For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the Amazon CloudFront Developer 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 |
|---|---|---|
id | string | The distribution ID. |
region | string | AWS region (default: us-east-1) |
If-Match | string | The value of the ETag header that you received when you disabled the streaming distribution. For example: E2QWRUHAPOMQZL. |
Marker | string | The value that you provided for the Marker request parameter. |
MaxItems | string | The value that you provided for the MaxItems request parameter. |
SELECT examples
- get_streaming_distribution
- list_streaming_distributions
Gets information about a specified RTMP distribution, including the distribution configuration.
SELECT
arn,
active_trusted_signers,
domain_name,
id,
last_modified_time,
status,
streaming_distribution_config
FROM aws.cloudfront.streaming_distributions
WHERE id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
List streaming distributions.
SELECT
is_truncated,
items,
marker,
max_items,
next_marker,
quantity
FROM aws.cloudfront.streaming_distributions
WHERE region = '{{ region }}' -- required
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;
INSERT examples
- create_streaming_distribution
- Manifest
This API is deprecated. Amazon CloudFront is deprecating real-time messaging protocol (RTMP) distributions on December 31, 2020. For more information, read the announcement on the Amazon CloudFront discussion forum.
INSERT INTO aws.cloudfront.streaming_distributions (
StreamingDistributionConfig,
region
)
SELECT
'{{ StreamingDistributionConfig }}' /* required */,
'{{ region }}'
RETURNING
arn,
active_trusted_signers,
domain_name,
id,
last_modified_time,
status,
streaming_distribution_config
;
# Description fields are for documentation purposes
- name: streaming_distributions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the streaming_distributions resource.
- name: StreamingDistributionConfig
description: |
The RTMP distribution's configuration information.
value:
CallerReference: "{{ CallerReference }}"
S3Origin:
DomainName: "{{ DomainName }}"
OriginAccessIdentity: "{{ OriginAccessIdentity }}"
Aliases:
Quantity: {{ Quantity }}
Items:
- "{{ Items }}"
Comment: "{{ Comment }}"
Logging:
Enabled: {{ Enabled }}
Bucket: "{{ Bucket }}"
Prefix: "{{ Prefix }}"
TrustedSigners:
Enabled: {{ Enabled }}
Quantity: {{ Quantity }}
Items:
- "{{ Items }}"
PriceClass: "{{ PriceClass }}"
Enabled: {{ Enabled }}
UPDATE examples
- update_streaming_distribution
Update a streaming distribution.
UPDATE aws.cloudfront.streaming_distributions
SET
StreamingDistributionConfig = '{{ StreamingDistributionConfig }}'
WHERE
id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND StreamingDistributionConfig = '{{ StreamingDistributionConfig }}' --required
AND `If-Match` = '{{ If-Match}}'
RETURNING
arn,
active_trusted_signers,
domain_name,
id,
last_modified_time,
status,
streaming_distribution_config;
DELETE examples
- delete_streaming_distribution
Delete a streaming distribution. To delete an RTMP distribution using the CloudFront API, perform the following steps. To delete an RTMP distribution using the CloudFront API: Disable the RTMP distribution. Submit a GET Streaming Distribution Config request to get the current configuration and the Etag header for the distribution. Update the XML document that was returned in the response to your GET Streaming Distribution Config request to change the value of Enabled to false. Submit a PUT Streaming Distribution Config request to update the configuration for your distribution. In the request body, include the XML document that you updated in Step 3. Then set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET Streaming Distribution Config request in Step 2. Review the response to the PUT Streaming Distribution Config request to confirm that the distribution was successfully disabled. Submit a GET Streaming Distribution Config request to confirm that your changes have propagated. When propagation is complete, the value of Status is Deployed. Submit a DELETE Streaming Distribution request. Set the value of the HTTP If-Match header to the value of the ETag header that CloudFront returned when you submitted the GET Streaming Distribution Config request in Step 2. Review the response to your DELETE Streaming Distribution request to confirm that the distribution was successfully deleted. For information about deleting a distribution using the CloudFront console, see Deleting a Distribution in the Amazon CloudFront Developer Guide.
DELETE FROM aws.cloudfront.streaming_distributions
WHERE id = '{{ id }}' --required
AND region = '{{ region }}' --required
AND `If-Match` = '{{ If-Match }}'
;