vpc_nat_gateways
Creates, updates, deletes, gets or lists a vpc_nat_gateways
resource.
Overview
Name | vpc_nat_gateways |
Type | Resource |
Id | digitalocean.compute.vpc_nat_gateways |
Fields
The following fields are returned by SELECT
queries:
- vpcnatgateways_get
- vpcnatgateways_list
The response will be a JSON object with a key called vpc_nat_gateway
. This will be
set to a JSON object that contains the standard VPC NAT gateway attributes.
Name | Datatype | Description |
---|---|---|
id | string | The unique identifier for the VPC NAT gateway. This is automatically generated upon creation. (example: 70e1b58d-cdec-4e95-b3ee-2d4d95feff51) |
name | string | The human-readable name of the VPC NAT gateway. (example: my-vpc-nat-gateway) |
created_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the VPC NAT gateway was created. (title: The creation time of the VPC NAT gateway., example: 2020-07-28T18:00:00Z) |
egresses | object | An object containing egress information for the VPC NAT gateway. |
icmp_timeout_seconds | integer | The ICMP timeout in seconds for the VPC NAT gateway. |
region | string | The region in which the VPC NAT gateway is created. (example: tor1) |
size | integer | The size of the VPC NAT gateway. |
state | string | The current state of the VPC NAT gateway. (example: ACTIVE) |
tcp_timeout_seconds | integer | The TCP timeout in seconds for the VPC NAT gateway. |
type | string | The type of the VPC NAT gateway. (example: PUBLIC) |
udp_timeout_seconds | integer | The UDP timeout in seconds for the VPC NAT gateway. |
updated_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the VPC NAT gateway was last updated. (title: The last update time of the VPC NAT gateway., example: 2020-07-28T18:00:00Z) |
vpcs | array | An array of VPCs associated with the VPC NAT gateway. |
A JSON object with a key of vpc_nat_gateways
.
Name | Datatype | Description |
---|---|---|
id | string | The unique identifier for the VPC NAT gateway. This is automatically generated upon creation. (example: 70e1b58d-cdec-4e95-b3ee-2d4d95feff51) |
name | string | The human-readable name of the VPC NAT gateway. (example: my-vpc-nat-gateway) |
created_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the VPC NAT gateway was created. (title: The creation time of the VPC NAT gateway., example: 2020-07-28T18:00:00Z) |
egresses | object | An object containing egress information for the VPC NAT gateway. |
icmp_timeout_seconds | integer | The ICMP timeout in seconds for the VPC NAT gateway. |
region | string | The region in which the VPC NAT gateway is created. (example: tor1) |
size | integer | The size of the VPC NAT gateway. |
state | string | The current state of the VPC NAT gateway. (example: ACTIVE) |
tcp_timeout_seconds | integer | The TCP timeout in seconds for the VPC NAT gateway. |
type | string | The type of the VPC NAT gateway. (example: PUBLIC) |
udp_timeout_seconds | integer | The UDP timeout in seconds for the VPC NAT gateway. |
updated_at | string (date-time) | A time value given in ISO8601 combined date and time format that represents when the VPC NAT gateway was last updated. (title: The last update time of the VPC NAT gateway., example: 2020-07-28T18:00:00Z) |
vpcs | array | An array of VPCs associated with the VPC NAT gateway. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
vpcnatgateways_get | select | id | To show information about an individual VPC NAT gateway, send a GET request to/v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID . | |
vpcnatgateways_list | select | per_page , page , state , region , type , name | To list all VPC NAT gateways in your team, send a GET request to /v2/vpc_nat_gateways .The response body will be a JSON object with a key of vpc_nat_gateways containing an array of VPC NAT gateway objects.These each contain the standard VPC NAT gateway attributes. | |
vpcnatgateways_create | insert | data__name , data__type , data__region , data__size , data__vpcs | To create a new VPC NAT gateway, send a POST request to /v2/vpc_nat_gateways setting the required attributes.The response body will contain a JSON object with a key called vpc_nat_gateway containing the standard attributes for the new VPC NAT gateway. | |
vpcnatgateways_update | replace | id , data__name , data__size | To update the configuration of an existing VPC NAT Gateway, send a PUT request to/v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID . The request must contain a full representationof the VPC NAT Gateway including existing attributes. | |
vpcnatgateways_delete | delete | id | To destroy a VPC NAT Gateway, send a DELETE request to the /v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID endpoint.A successful response will include a 202 response code and no content. |
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 |
---|---|---|
id | string | The unique identifier of the VPC NAT gateway. (example: 70e1b58d-cdec-4e95-b3ee-2d4d95feff51) |
name | string | The name of the VPC NAT gateway. (example: my-vpc-nat-gateway) |
page | integer | Which 'page' of paginated results to return. (example: 1) |
per_page | integer | Number of items returned per page (example: 2) |
region | string | The region where the VPC NAT gateway is located. (example: tor1) |
state | string | The current state of the VPC NAT gateway. (example: active) |
type | string | The type of the VPC NAT gateway. (example: public) |
SELECT
examples
- vpcnatgateways_get
- vpcnatgateways_list
To show information about an individual VPC NAT gateway, send a GET request to/v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID
.
SELECT
id,
name,
created_at,
egresses,
icmp_timeout_seconds,
region,
size,
state,
tcp_timeout_seconds,
type,
udp_timeout_seconds,
updated_at,
vpcs
FROM digitalocean.compute.vpc_nat_gateways
WHERE id = '{{ id }}' -- required;
To list all VPC NAT gateways in your team, send a GET request to /v2/vpc_nat_gateways
.
The response body will be a JSON object with a key of vpc_nat_gateways
containing an array of VPC NAT gateway objects.
These each contain the standard VPC NAT gateway attributes.
SELECT
id,
name,
created_at,
egresses,
icmp_timeout_seconds,
region,
size,
state,
tcp_timeout_seconds,
type,
udp_timeout_seconds,
updated_at,
vpcs
FROM digitalocean.compute.vpc_nat_gateways
WHERE per_page = '{{ per_page }}'
AND page = '{{ page }}'
AND state = '{{ state }}'
AND region = '{{ region }}'
AND type = '{{ type }}'
AND name = '{{ name }}';
INSERT
examples
- vpcnatgateways_create
- Manifest
To create a new VPC NAT gateway, send a POST request to /v2/vpc_nat_gateways
setting the required attributes.
The response body will contain a JSON object with a key called vpc_nat_gateway
containing the standard attributes for the new VPC NAT gateway.
INSERT INTO digitalocean.compute.vpc_nat_gateways (
data__name,
data__type,
data__region,
data__size,
data__vpcs,
data__udp_timeout_seconds,
data__icmp_timeout_seconds,
data__tcp_timeout_seconds
)
SELECT
'{{ name }}' --required,
'{{ type }}' --required,
'{{ region }}' --required,
{{ size }} --required,
'{{ vpcs }}' --required,
{{ udp_timeout_seconds }},
{{ icmp_timeout_seconds }},
{{ tcp_timeout_seconds }}
RETURNING
vpc_nat_gateway
;
# Description fields are for documentation purposes
- name: vpc_nat_gateways
props:
- name: name
value: string
description: >
The human-readable name of the VPC NAT gateway.
- name: type
value: string
description: >
The type of the VPC NAT gateway.
valid_values: ['PUBLIC']
- name: region
value: string
description: >
The region in which the VPC NAT gateway is created.
valid_values: ['nyc1', 'nyc2', 'nyc3', 'ams2', 'ams3', 'sfo1', 'sfo2', 'sfo3', 'sgp1', 'lon1', 'fra1', 'tor1', 'blr1', 'syd1', 'atl1']
- name: size
value: integer
description: >
The size of the VPC NAT gateway.
- name: vpcs
value: array
description: >
An array of VPCs associated with the VPC NAT gateway.
- name: udp_timeout_seconds
value: integer
description: >
The UDP timeout in seconds for the VPC NAT gateway.
- name: icmp_timeout_seconds
value: integer
description: >
The ICMP timeout in seconds for the VPC NAT gateway.
- name: tcp_timeout_seconds
value: integer
description: >
The TCP timeout in seconds for the VPC NAT gateway.
REPLACE
examples
- vpcnatgateways_update
To update the configuration of an existing VPC NAT Gateway, send a PUT request to/v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID
. The request must contain a full representation
of the VPC NAT Gateway including existing attributes.
REPLACE digitalocean.compute.vpc_nat_gateways
SET
data__name = '{{ name }}',
data__size = {{ size }},
data__udp_timeout_seconds = {{ udp_timeout_seconds }},
data__icmp_timeout_seconds = {{ icmp_timeout_seconds }},
data__tcp_timeout_seconds = {{ tcp_timeout_seconds }}
WHERE
id = '{{ id }}' --required
AND data__name = '{{ name }}' --required
AND data__size = '{{ size }}' --required
RETURNING
vpc_nat_gateway;
DELETE
examples
- vpcnatgateways_delete
To destroy a VPC NAT Gateway, send a DELETE request to the /v2/vpc_nat_gateways/$VPC_NAT_GATEWAY_ID
endpoint.
A successful response will include a 202 response code and no content.
DELETE FROM digitalocean.compute.vpc_nat_gateways
WHERE id = '{{ id }}' --required;