Skip to main content

advertisement_status

Creates, updates, deletes, gets or lists an advertisement_status resource.

Overview

Nameadvertisement_status
TypeResource
Idcloudflare.addressing.advertisement_status

Fields

The following fields are returned by SELECT queries:

Get Advertisement Status response

NameDatatypeDescription
advertisedbooleanAdvertisement 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_atstring (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:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectprefix_id, account_idView 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.
editupdateprefix_id, account_id, advertisedAdvertise 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.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
prefix_idstringThe IP prefix ID.

SELECT examples

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

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;