byoip_prefixes
Creates, updates, deletes, gets or lists a byoip_prefixes
resource.
Overview
Name | byoip_prefixes |
Type | Resource |
Id | digitalocean.network.byoip_prefixes |
Fields
The following fields are returned by SELECT
queries:
- byoip_prefixes_get
- byoip_prefixes_list
Details of the requested BYOIP prefix
Name | Datatype | Description |
---|---|---|
name | string | Name of the BYOIP prefix (example: ) |
project_id | string | The ID of the project associated with the BYOIP prefix (example: 12345678-1234-1234-1234-123456789012) |
advertised | boolean | Whether the BYOIP prefix is being advertised |
failure_reason | string | Reason for failure, if applicable (example: ) |
locked | boolean | Whether the BYOIP prefix is locked |
prefix | string | The IP prefix in CIDR notation (example: 203.0.113.0/24) |
region | string | Region where the BYOIP prefix is located (example: nyc3) |
status | string | Status of the BYOIP prefix (example: active) |
uuid | string | Unique identifier for the BYOIP prefix (example: f47ac10b-58cc-4372-a567-0e02b2c3d479) |
validations | array | List of validation statuses for the BYOIP prefix |
List of BYOIP prefixes as an array of BYOIP prefix JSON objects
Name | Datatype | Description |
---|---|---|
name | string | Name of the BYOIP prefix (example: ) |
project_id | string | The ID of the project associated with the BYOIP prefix (example: 12345678-1234-1234-1234-123456789012) |
advertised | boolean | Whether the BYOIP prefix is being advertised |
failure_reason | string | Reason for failure, if applicable (example: ) |
locked | boolean | Whether the BYOIP prefix is locked |
prefix | string | The IP prefix in CIDR notation (example: 203.0.113.0/24) |
region | string | Region where the BYOIP prefix is located (example: nyc3) |
status | string | Status of the BYOIP prefix (example: active) |
uuid | string | Unique identifier for the BYOIP prefix (example: f47ac10b-58cc-4372-a567-0e02b2c3d479) |
validations | array | List of validation statuses for the BYOIP prefix |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
byoip_prefixes_get | select | byoip_prefix_uuid | To get a BYOIP prefix, send a GET request to /v2/byoip_prefixes/$byoip_prefix_uuid . A successful response will return the details of the specified BYOIP prefix. | |
byoip_prefixes_list | select | per_page , page | To list all BYOIP prefixes, send a GET request to /v2/byoip_prefixes .A successful response will return a list of all BYOIP prefixes associated with the account. | |
byoip_prefixes_create | insert | data__prefix , data__region , data__signature | To create a BYOIP prefix, send a POST request to /v2/byoip_prefixes .A successful request will initiate the process of bringing your BYOIP Prefix into your account. The response will include the details of the created prefix, including its UUID and status. | |
byoip_prefixes_patch | update | byoip_prefix_uuid | To update a BYOIP prefix, send a PATCH request to /v2/byoip_prefixes/$byoip_prefix_uuid .Currently, you can update the advertisement status of the prefix. The response will include the updated details of the prefix. | |
byoip_prefixes_delete | delete | byoip_prefix_uuid | To delete a BYOIP prefix and remove it from your account, send a DELETE request to /v2/byoip_prefixes/$byoip_prefix_uuid .A successful request will receive a 202 status code with no body in response. This indicates that the request was accepted and the prefix is being deleted. |
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 |
---|---|---|
byoip_prefix_uuid | string (uuid) | The unique identifier for the BYOIP Prefix. (example: f47ac10b-58cc-4372-a567-0e02b2c3d479) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
SELECT
examples
- byoip_prefixes_get
- byoip_prefixes_list
To get a BYOIP prefix, send a GET request to /v2/byoip_prefixes/$byoip_prefix_uuid
.
A successful response will return the details of the specified BYOIP prefix.
SELECT
name,
project_id,
advertised,
failure_reason,
locked,
prefix,
region,
status,
uuid,
validations
FROM digitalocean.network.byoip_prefixes
WHERE byoip_prefix_uuid = '{{ byoip_prefix_uuid }}' -- required;
To list all BYOIP prefixes, send a GET request to /v2/byoip_prefixes
.
A successful response will return a list of all BYOIP prefixes associated with the account.
SELECT
name,
project_id,
advertised,
failure_reason,
locked,
prefix,
region,
status,
uuid,
validations
FROM digitalocean.network.byoip_prefixes
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}';
INSERT
examples
- byoip_prefixes_create
- Manifest
To create a BYOIP prefix, send a POST request to /v2/byoip_prefixes
.
A successful request will initiate the process of bringing your BYOIP Prefix into your account.
The response will include the details of the created prefix, including its UUID and status.
INSERT INTO digitalocean.network.byoip_prefixes (
data__prefix,
data__region,
data__signature
)
SELECT
'{{ prefix }}' --required,
'{{ region }}' --required,
'{{ signature }}' --required
RETURNING
region,
status,
uuid
;
# Description fields are for documentation purposes
- name: byoip_prefixes
props:
- name: prefix
value: string
description: >
The IP prefix in CIDR notation to bring
- name: region
value: string
description: >
The region where the prefix will be created
- name: signature
value: string
description: >
The signature hash for the prefix creation request
UPDATE
examples
- byoip_prefixes_patch
To update a BYOIP prefix, send a PATCH request to /v2/byoip_prefixes/$byoip_prefix_uuid
.
Currently, you can update the advertisement status of the prefix.
The response will include the updated details of the prefix.
UPDATE digitalocean.network.byoip_prefixes
SET
data__advertise = {{ advertise }}
WHERE
byoip_prefix_uuid = '{{ byoip_prefix_uuid }}' --required
RETURNING
byoip_prefix;
DELETE
examples
- byoip_prefixes_delete
To delete a BYOIP prefix and remove it from your account, send a DELETE request
to /v2/byoip_prefixes/$byoip_prefix_uuid
.
A successful request will receive a 202 status code with no body in response.
This indicates that the request was accepted and the prefix is being deleted.
DELETE FROM digitalocean.network.byoip_prefixes
WHERE byoip_prefix_uuid = '{{ byoip_prefix_uuid }}' --required;