endpoints
Creates, updates, deletes, gets or lists a endpoints
resource.
Overview
Name | endpoints |
Type | Resource |
Id | digitalocean.cdn.endpoints |
Fields
Name | Datatype | Description |
---|---|---|
column_anon | `` |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
cdn_get_endpoint | SELECT | cdn_id | To show information about an existing CDN endpoint, send a GET request to /v2/cdn/endpoints/$ENDPOINT_ID . |
cdn_list_endpoints | SELECT |
| To list all of the CDN endpoints available on your account, send a GET request to /v2/cdn/endpoints . |
cdn_create_endpoint | INSERT | data__origin | To create a new CDN endpoint, send a POST request to /v2/cdn/endpoints . The origin attribute must be set to the fully qualified domain name (FQDN) of a DigitalOcean Space. Optionally, the TTL may be configured by setting the ttl attribute. A custom subdomain may be configured by specifying the custom_domain and certificate_id attributes. |
cdn_delete_endpoint | DELETE | cdn_id | To delete a specific CDN endpoint, send a DELETE request to /v2/cdn/endpoints/$ENDPOINT_ID . A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. |
cdn_purge_cache | EXEC | cdn_id, data__files | To purge cached content from a CDN endpoint, send a DELETE request to /v2/cdn/endpoints/$ENDPOINT_ID/cache . The body of the request should include a files attribute containing a list of cached file paths to be purged. A path may be for a single file or may contain a wildcard (* ) to recursively purge all files under a directory. When only a wildcard is provided, all cached files will be purged. There is a rate limit of 50 files per 20 seconds that can be purged. CDN endpoints have a rate limit of 5 requests per 10 seconds. Purging files using a wildcard path counts as a single request against the API's rate limit. Two identical purge requests cannot be sent at the same time. |
cdn_update_endpoints | EXEC | cdn_id | To update the TTL, certificate ID, or the FQDN of the custom subdomain for an existing CDN endpoint, send a PUT request to /v2/cdn/endpoints/$ENDPOINT_ID . |
SELECT
examples
To list all of the CDN endpoints available on your account, send a GET request to /v2/cdn/endpoints
.
SELECT
column_anon
FROM digitalocean.cdn.endpoints
;
INSERT
example
Use the following StackQL query and manifest file to create a new endpoints
resource.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.cdn.endpoints (
data__origin,
data__ttl,
data__certificate_id,
data__custom_domain
)
SELECT
'{{ origin }}',
'{{ ttl }}',
'{{ certificate_id }}',
'{{ custom_domain }}'
;
/*+ create */
INSERT INTO digitalocean.cdn.endpoints (
data__origin
)
SELECT
'{{ origin }}'
;
- name: endpoints
props:
- name: data__origin
value: string
- name: origin
value: string
- name: ttl
value: integer
- name: certificate_id
value: string
- name: custom_domain
value: string
DELETE
example
Deletes the specified endpoints
resource.
/*+ delete */
DELETE FROM digitalocean.cdn.endpoints
WHERE cdn_id = '{{ cdn_id }}';