peerings
Creates, updates, deletes, gets or lists a peerings
resource.
Overview
Name | peerings |
Type | Resource |
Id | digitalocean.vpcs.peerings |
Fields
Name | Datatype | Description |
---|---|---|
id | string | A unique ID that can be used to identify and reference the VPC peering. |
name | string | The name of the VPC peering. Must be unique within the team and may only contain alphanumeric characters and dashes. |
created_at | string | A time value given in ISO8601 combined date and time format. |
status | string | The current status of the VPC peering. |
vpc_ids | array | An array of the two peered VPCs IDs. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
vpcs_list_peerings | SELECT | vpc_id | To list all of a VPC's peerings, send a GET request to /v2/vpcs/$VPC_ID/peerings . |
vpcs_create_peerings | INSERT | vpc_id, data__name, data__vpc_id | To create a new VPC peering for a given VPC, send a POST request to /v2/vpcs/$VPC_ID/peerings . |
vpcs_patch_peerings | UPDATE | vpc_id, vpc_peering_id | To update the name of a VPC peering in a particular VPC, send a PATCH request to /v2/vpcs/$VPC_ID/peerings/$VPC_PEERING_ID with the new name in the request body. |
SELECT
examples
To list all of a VPC's peerings, send a GET request to /v2/vpcs/$VPC_ID/peerings
.
SELECT
id,
name,
created_at,
status,
vpc_ids
FROM digitalocean.vpcs.peerings
WHERE vpc_id = '{{ vpc_id }}';
INSERT
example
Use the following StackQL query and manifest file to create a new peerings
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO digitalocean.vpcs.peerings (
data__name,
data__vpc_id,
vpc_id
)
SELECT
'{{ name }}',
'{{ vpc_id }}'
;
- name: peerings
props:
- name: vpc_id
value: string
- name: data__name
value: string
- name: data__vpc_id
value: string
- name: name
value: string
- name: vpc_id
value: string
UPDATE
example
Updates a peerings
resource.
/*+ update */
UPDATE digitalocean.vpcs.peerings
SET
name = '{{ name }}'
WHERE
vpc_id = '{{ vpc_id }}'
AND vpc_peering_id = '{{ vpc_peering_id }}';