Skip to main content

realtime_log_configs

Creates, updates, deletes or gets a realtime_log_config resource or lists realtime_log_configs in a region

Overview

Namerealtime_log_configs
TypeResource
DescriptionA real-time log configuration.
Idawscc.cloudfront.realtime_log_configs

Fields

NameDatatypeDescription
arnstring
end_pointsarrayContains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration.
fieldsarrayA list of fields that are included in each real-time log record. In an API response, the fields are provided in the same order in which they are sent to the Amazon Kinesis data stream.<br />For more information about fields, see &#91;Real-time log configuration fields&#93;(https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields) in the &#42;Amazon CloudFront Developer Guide&#42;.
namestringThe unique name of this real-time log configuration.
sampling_ratenumberThe sampling rate for this real-time log configuration. The sampling rate determines the percentage of viewer requests that are represented in the real-time log data. The sampling rate is an integer between 1 and 100, inclusive.
regionstringAWS region.

For more information, see AWS::CloudFront::RealtimeLogConfig.

Methods

NameResourceAccessible byRequired Params
create_resourcerealtime_log_configsINSERTName, EndPoints, Fields, SamplingRate, region
delete_resourcerealtime_log_configsDELETEIdentifier, region
update_resourcerealtime_log_configsUPDATEIdentifier, PatchDocument, region
list_resourcesrealtime_log_configs_list_onlySELECTregion
get_resourcerealtime_log_configsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual realtime_log_config.

SELECT
region,
arn,
end_points,
fields,
name,
sampling_rate
FROM awscc.cloudfront.realtime_log_configs
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.cloudfront.realtime_log_configs (
EndPoints,
Fields,
Name,
SamplingRate,
region
)
SELECT
'{{ end_points }}',
'{{ fields }}',
'{{ name }}',
'{{ sampling_rate }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a realtime_log_config resource, using stack-deploy.

/*+ update */
UPDATE awscc.cloudfront.realtime_log_configs
SET PatchDocument = string('{{ {
"EndPoints": end_points,
"Fields": fields,
"SamplingRate": sampling_rate
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';

DELETE example

/*+ delete */
DELETE FROM awscc.cloudfront.realtime_log_configs
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';

Permissions

To operate on the realtime_log_configs resource, the following permissions are required:

cloudfront:CreateRealtimeLogConfig,
iam:PassRole