hostnames
Creates, updates, deletes, gets or lists a hostnames resource.
Overview
| Name | hostnames |
| Type | Resource |
| Id | cloudflare.web3.hostnames |
Fields
The following fields are returned by SELECT queries:
- get
- list
Web3 Hostname Details response.
| Name | Datatype | Description |
|---|---|---|
id | string | Specify the identifier of the hostname. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | Specify the hostname that points to the target gateway via CNAME. (example: gateway.example.com) |
created_on | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
description | string | Specify an optional description of the hostname. (example: This is my IPFS gateway.) |
dnslink | string | Specify the DNSLink value used if the target is ipfs. (example: /ipns/onboarding.ipfs.cloudflare.com) |
modified_on | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
status | string | Specifies the status of the hostname's activation. (active, pending, deleting, error) (example: active) |
target | string | Specify the target gateway of the hostname. (ethereum, ipfs, ipfs_universal_path) (example: ipfs) |
List Web3 Hostnames response.
| Name | Datatype | Description |
|---|---|---|
id | string | Specify the identifier of the hostname. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
name | string | Specify the hostname that points to the target gateway via CNAME. (example: gateway.example.com) |
created_on | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
description | string | Specify an optional description of the hostname. (example: This is my IPFS gateway.) |
dnslink | string | Specify the DNSLink value used if the target is ipfs. (example: /ipns/onboarding.ipfs.cloudflare.com) |
modified_on | string (date-time) | (example: 2014-01-01T05:20:00.12345Z) |
status | string | Specifies the status of the hostname's activation. (active, pending, deleting, error) (example: active) |
target | string | Specify the target gateway of the hostname. (ethereum, ipfs, ipfs_universal_path) (example: ipfs) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | identifier, zone_id | ||
list | select | zone_id | ||
create | insert | zone_id, name, target | ||
edit | update | identifier, zone_id | ||
delete | delete | identifier, zone_id |
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 |
|---|---|---|
identifier | string | Resource identifier. |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- get
- list
Web3 Hostname Details response.
SELECT
id,
name,
created_on,
description,
dnslink,
modified_on,
status,
target
FROM cloudflare.web3.hostnames
WHERE identifier = '{{ identifier }}' -- required
AND zone_id = '{{ zone_id }}' -- required
;
List Web3 Hostnames response.
SELECT
id,
name,
created_on,
description,
dnslink,
modified_on,
status,
target
FROM cloudflare.web3.hostnames
WHERE zone_id = '{{ zone_id }}' -- required
;
INSERT examples
- create
- Manifest
No description available.
INSERT INTO cloudflare.web3.hostnames (
description,
dnslink,
name,
target,
zone_id
)
SELECT
'{{ description }}',
'{{ dnslink }}',
'{{ name }}' /* required */,
'{{ target }}' /* required */,
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
result_info,
success
;
# Description fields are for documentation purposes
- name: hostnames
props:
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the hostnames resource.
- name: description
value: "{{ description }}"
description: |
Specify an optional description of the hostname.
- name: dnslink
value: "{{ dnslink }}"
description: |
Specify the DNSLink value used if the target is ipfs.
- name: name
value: "{{ name }}"
description: |
Specify the hostname that points to the target gateway via CNAME.
- name: target
value: "{{ target }}"
description: |
Specify the target gateway of the hostname.
valid_values: ['ethereum', 'ipfs', 'ipfs_universal_path']
UPDATE examples
- edit
No description available.
UPDATE cloudflare.web3.hostnames
SET
description = '{{ description }}',
dnslink = '{{ dnslink }}'
WHERE
identifier = '{{ identifier }}' --required
AND zone_id = '{{ zone_id }}' --required
RETURNING
errors,
messages,
result,
result_info,
success;
DELETE examples
- delete
No description available.
DELETE FROM cloudflare.web3.hostnames
WHERE identifier = '{{ identifier }}' --required
AND zone_id = '{{ zone_id }}' --required
;