realtime_log_configs
Creates, updates, deletes, gets or lists a realtime_log_configs resource.
Overview
| Name | realtime_log_configs |
| Type | Resource |
| Id | aws.cloudfront.realtime_log_configs |
Fields
The following fields are returned by SELECT queries:
- list_realtime_log_configs
| Name | Datatype | Description |
|---|---|---|
is_truncated | boolean | A flag that indicates whether there are more real-time log configurations than are contained in this list. |
items | string | Contains the list of real-time log configurations. |
marker | string | This parameter indicates where this list of real-time log configurations begins. This list includes real-time log configurations that occur after the marker. |
max_items | integer | The maximum number of real-time log configurations requested. |
next_marker | string | If there are more items in the list than are in this response, this element is present. It contains the value that you should use in the Marker field of a subsequent request to continue listing real-time log configurations where you left off. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_realtime_log_configs | select | region | MaxItems, Marker | Gets a list of real-time log configurations. You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request. |
create_realtime_log_config | insert | region, EndPoints, SamplingRate | Creates a real-time log configuration. After you create a real-time log configuration, you can attach it to one or more cache behaviors to send real-time log data to the specified Amazon Kinesis data stream. For more information about real-time log configurations, see Real-time logs in the Amazon CloudFront Developer Guide. | |
update_realtime_log_config | update | region | Updates a real-time log configuration. When you update a real-time log configuration, all the parameters are updated with the values provided in the request. You cannot update some parameters independent of others. To update a real-time log configuration: Call GetRealtimeLogConfig to get the current real-time log configuration. Locally modify the parameters in the real-time log configuration that you want to update. Call this API (UpdateRealtimeLogConfig) by providing the entire real-time log configuration, including the parameters that you modified and those that you didn't. You cannot update a real-time log configuration's Name or ARN. | |
delete_realtime_log_config | delete | region | Deletes a real-time log configuration. You cannot delete a real-time log configuration if it's attached to a cache behavior. First update your distributions to remove the real-time log configuration from all cache behaviors, then delete the real-time log configuration. To delete a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to delete. | |
get_realtime_log_config | exec | region | Gets a real-time log configuration. To get a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to get. |
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) |
Marker | string | Use this field when paginating results to indicate where to begin in your list of real-time log configurations. The response includes real-time log configurations in the list that occur after the marker. To get the next page of the list, set this field's value to the value of NextMarker from the current page's response. |
MaxItems | string | The maximum number of real-time log configurations that you want in the response. |
SELECT examples
- list_realtime_log_configs
Gets a list of real-time log configurations. You can optionally specify the maximum number of items to receive in the response. If the total number of items in the list exceeds the maximum that you specify, or the default maximum, the response is paginated. To get the next page of items, send a subsequent request that specifies the NextMarker value from the current response as the Marker value in the subsequent request.
SELECT
is_truncated,
items,
marker,
max_items,
next_marker
FROM aws.cloudfront.realtime_log_configs
WHERE region = '{{ region }}' -- required
AND MaxItems = '{{ MaxItems }}'
AND Marker = '{{ Marker }}'
;
INSERT examples
- create_realtime_log_config
- Manifest
Creates a real-time log configuration. After you create a real-time log configuration, you can attach it to one or more cache behaviors to send real-time log data to the specified Amazon Kinesis data stream. For more information about real-time log configurations, see Real-time logs in the Amazon CloudFront Developer Guide.
INSERT INTO aws.cloudfront.realtime_log_configs (
EndPoints,
Fields,
Name,
SamplingRate,
region
)
SELECT
'{{ EndPoints }}' /* required */,
'{{ Fields }}',
'{{ Name }}',
{{ SamplingRate }} /* required */,
'{{ region }}'
RETURNING
arn,
end_points,
fields,
name,
sampling_rate
;
# Description fields are for documentation purposes
- name: realtime_log_configs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the realtime_log_configs resource.
- name: EndPoints
value:
- StreamType: "{{ StreamType }}"
KinesisStreamConfig:
RoleARN: "{{ RoleARN }}"
StreamARN: "{{ StreamARN }}"
- name: Fields
value:
- "{{ Fields }}"
- name: Name
value: "{{ Name }}"
- name: SamplingRate
value: {{ SamplingRate }}
UPDATE examples
- update_realtime_log_config
Updates a real-time log configuration. When you update a real-time log configuration, all the parameters are updated with the values provided in the request. You cannot update some parameters independent of others. To update a real-time log configuration: Call GetRealtimeLogConfig to get the current real-time log configuration. Locally modify the parameters in the real-time log configuration that you want to update. Call this API (UpdateRealtimeLogConfig) by providing the entire real-time log configuration, including the parameters that you modified and those that you didn't. You cannot update a real-time log configuration's Name or ARN.
UPDATE aws.cloudfront.realtime_log_configs
SET
EndPoints = '{{ EndPoints }}',
Fields = '{{ Fields }}',
Name = '{{ Name }}',
ARN = '{{ ARN }}',
SamplingRate = {{ SamplingRate }}
WHERE
region = '{{ region }}' --required
RETURNING
arn,
end_points,
fields,
name,
sampling_rate;
DELETE examples
- delete_realtime_log_config
Deletes a real-time log configuration. You cannot delete a real-time log configuration if it's attached to a cache behavior. First update your distributions to remove the real-time log configuration from all cache behaviors, then delete the real-time log configuration. To delete a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to delete.
DELETE FROM aws.cloudfront.realtime_log_configs
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- get_realtime_log_config
Gets a real-time log configuration. To get a real-time log configuration, you can provide the configuration's name or its Amazon Resource Name (ARN). You must provide at least one. If you provide both, CloudFront uses the name to identify the real-time log configuration to get.
EXEC aws.cloudfront.realtime_log_configs.get_realtime_log_config
@region='{{ region }}' --required
@@json=
'{
"Name": "{{ Name }}",
"ARN": "{{ ARN }}"
}'
;