advertisement_status
Creates, updates, deletes, gets or lists an advertisement_status resource.
Overview
| Name | advertisement_status |
| Type | Resource |
| Id | cloudflare.addressing.advertisement_status |
Fields
The following fields are returned by SELECT queries:
- list
Get Advertisement Status response
| Name | Datatype | Description |
|---|---|---|
advertised | boolean | Advertisement status of the prefix. If true, the BGP route for the prefix is advertised to the Internet. If false, the BGP route is withdrawn. |
advertised_modified_at | string (date-time) | Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled. (example: 2014-01-01T05:20:00.12345Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | prefix_id, account_id | View the current advertisement state for a prefix. Deprecated: Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix. | |
edit | update | prefix_id, account_id, advertised | Advertise or withdraw the BGP route for a prefix. Deprecated: Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix. |
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 |
|---|---|---|
account_id | string | The Cloudflare account ID. |
prefix_id | string | The IP prefix ID. |
SELECT examples
- list
View the current advertisement state for a prefix. Deprecated: Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix.
SELECT
advertised,
advertised_modified_at
FROM cloudflare.addressing.advertisement_status
WHERE prefix_id = '{{ prefix_id }}' -- required
AND account_id = '{{ account_id }}' -- required
;
UPDATE examples
- edit
Advertise or withdraw the BGP route for a prefix. Deprecated: Prefer the BGP Prefixes endpoints, which additionally allow for advertising and withdrawing subnets of an IP prefix.
UPDATE cloudflare.addressing.advertisement_status
SET
advertised = {{ advertised }}
WHERE
prefix_id = '{{ prefix_id }}' --required
AND account_id = '{{ account_id }}' --required
AND advertised = {{ advertised }} --required
RETURNING
errors,
messages,
result,
success;