realtime_log_configs
Creates, updates, deletes or gets a realtime_log_config resource or lists realtime_log_configs in a region
Overview
| Name | realtime_log_configs |
| Type | Resource |
| Description | A real-time log configuration. |
| Id | awscc.cloudfront.realtime_log_configs |
Fields
| Name | Datatype | Description |
|---|---|---|
arn | string | |
end_points | array | Contains information about the Amazon Kinesis data stream where you are sending real-time log data for this real-time log configuration. |
fields | array | A 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 [Real-time log configuration fields](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/real-time-logs.html#understand-real-time-log-config-fields) in the *Amazon CloudFront Developer Guide*. |
name | string | The unique name of this real-time log configuration. |
sampling_rate | number | The 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. |
region | string | AWS region. |
For more information, see AWS::CloudFront::RealtimeLogConfig.
Methods
| Name | Accessible by | Required Params |
|---|---|---|
create_resource | INSERT | Name, EndPoints, Fields, SamplingRate, 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 properties from an individual realtime_log_config.
SELECT
region,
arn,
end_points,
fields,
name,
sampling_rate
FROM awscc.cloudfront.realtime_log_configs
WHERE data__Identifier = '<Arn>';
INSERT example
Use the following StackQL query and manifest file to create a new realtime_log_config resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.cloudfront.realtime_log_configs (
EndPoints,
Fields,
Name,
SamplingRate,
region
)
SELECT
'{{ EndPoints }}',
'{{ Fields }}',
'{{ Name }}',
'{{ SamplingRate }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.cloudfront.realtime_log_configs (
EndPoints,
Fields,
Name,
SamplingRate,
region
)
SELECT
'{{ EndPoints }}',
'{{ Fields }}',
'{{ Name }}',
'{{ SamplingRate }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: realtime_log_config
props:
- name: EndPoints
value:
- KinesisStreamConfig:
RoleArn: '{{ RoleArn }}'
StreamArn: '{{ StreamArn }}'
StreamType: '{{ StreamType }}'
- name: Fields
value:
- '{{ Fields[0] }}'
- name: Name
value: '{{ Name }}'
- name: SamplingRate
value: null
DELETE example
/*+ delete */
DELETE FROM awscc.cloudfront.realtime_log_configs
WHERE data__Identifier = '<Arn>'
AND region = 'us-east-1';
Permissions
To operate on the realtime_log_configs resource, the following permissions are required:
Create
cloudfront:CreateRealtimeLogConfig,
iam:PassRole
Delete
cloudfront:DeleteRealtimeLogConfig,
cloudfront:GetRealtimeLogConfig
List
cloudfront:ListRealtimeLogConfigs
Read
cloudfront:GetRealtimeLogConfig
Update
cloudfront:UpdateRealtimeLogConfig,
cloudfront:GetRealtimeLogConfig,
iam:PassRole