invalidations
Creates, updates, deletes, gets or lists an invalidations resource.
Overview
| Name | invalidations |
| Type | Resource |
| Id | aws.cloudfront.invalidations |
Fields
The following fields are returned by SELECT queries:
- get_invalidation
- list_invalidations
| Name | Datatype | Description |
|---|---|---|
create_time | string | The date and time the invalidation request was first made. |
id | string | The identifier for the invalidation request. For example: IDFDVBD632BHDS5. |
invalidation_batch | string | The current invalidation information for the batch request. |
status | string | The status of the invalidation request. When the invalidation batch is finished, the status is Completed. |
| Name | Datatype | Description |
|---|---|---|
is_truncated | boolean | A flag that indicates whether more invalidation batch requests 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 invalidation batches in the list. |
items | string | A complex type that contains one InvalidationSummary element for each invalidation batch created by the current Amazon Web Services account. |
marker | string | The value that you provided for the Marker request parameter. |
max_items | integer | The value that you provided for the MaxItems request parameter. |
next_marker | string | If IsTruncated is true, this element is present and contains the value that you can use for the Marker request parameter to continue listing your invalidation batches where they left off. |
quantity | integer | The number of invalidation batches 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_invalidation | select | distribution_id, id, region | Get the information about an invalidation. | |
list_invalidations | select | distribution_id, region | Marker, MaxItems | Lists invalidation batches. |
create_invalidation | insert | distribution_id, region, InvalidationBatch | Create a new invalidation. For more information, see Invalidating files 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 |
|---|---|---|
distribution_id | string | The distribution's id. |
id | string | The identifier for the invalidation request, for example, IDFDVBD632BHDS5. |
region | string | AWS region (default: us-east-1) |
Marker | string | Use this parameter when paginating results to indicate where to begin in your list of invalidation batches. Because the results are returned in decreasing order from most recent to oldest, the most recent results are on the first page, the second page will contain earlier results, and so on. To get the next page of results, set Marker to the value of the NextMarker from the current page's response. This value is the same as the ID of the last invalidation batch on that page. |
MaxItems | string | The maximum number of invalidation batches that you want in the response body. |
SELECT examples
- get_invalidation
- list_invalidations
Get the information about an invalidation.
SELECT
create_time,
id,
invalidation_batch,
status
FROM aws.cloudfront.invalidations
WHERE distribution_id = '{{ distribution_id }}' -- required
AND id = '{{ id }}' -- required
AND region = '{{ region }}' -- required
;
Lists invalidation batches.
SELECT
is_truncated,
items,
marker,
max_items,
next_marker,
quantity
FROM aws.cloudfront.invalidations
WHERE distribution_id = '{{ distribution_id }}' -- required
AND region = '{{ region }}' -- required
AND Marker = '{{ Marker }}'
AND MaxItems = '{{ MaxItems }}'
;
INSERT examples
- create_invalidation
- Manifest
Create a new invalidation. For more information, see Invalidating files in the Amazon CloudFront Developer Guide.
INSERT INTO aws.cloudfront.invalidations (
InvalidationBatch,
distribution_id,
region
)
SELECT
'{{ InvalidationBatch }}' /* required */,
'{{ distribution_id }}',
'{{ region }}'
RETURNING
create_time,
id,
invalidation_batch,
status
;
# Description fields are for documentation purposes
- name: invalidations
props:
- name: distribution_id
value: "{{ distribution_id }}"
description: Required parameter for the invalidations resource.
- name: region
value: "{{ region }}"
description: Required parameter for the invalidations resource.
- name: InvalidationBatch
description: |
An invalidation batch.
value:
Paths:
Quantity: {{ Quantity }}
Items:
- "{{ Items }}"
CallerReference: "{{ CallerReference }}"