Skip to main content

subnet_groups

Creates, updates, deletes, gets or lists a subnet_groups resource.

Overview

Namesubnet_groups
TypeResource
Idaws.dax.subnet_groups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
descriptionstringThe description of the subnet group.
subnet_group_namestringThe name of the subnet group.
subnetsarrayA list of subnets associated with the subnet group.
supported_network_typesarrayThe network types supported by this subnet. Returns an array of strings that can include ipv4, ipv6, or both, indicating whether the subnet group supports IPv4 only, IPv6 only, or dual-stack deployments.
vpc_idstringThe Amazon Virtual Private Cloud identifier (VPC ID) of the subnet group.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_subnet_groupsselectregionReturns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.
create_subnet_groupinsertregion, SubnetGroupName, SubnetIdsCreates a new subnet group.
update_subnet_groupupdateregion, SubnetGroupNameModifies an existing subnet group.
delete_subnet_groupdeleteregionDeletes a subnet group. You cannot delete a subnet group if it is associated with any DAX clusters.

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
regionstringAWS region (default: us-east-1)

SELECT examples

Returns a list of subnet group descriptions. If a subnet group name is specified, the list will contain only the description of that group.

SELECT
description,
subnet_group_name,
subnets,
supported_network_types,
vpc_id
FROM aws.dax.subnet_groups
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new subnet group.

INSERT INTO aws.dax.subnet_groups (
SubnetGroupName,
Description,
SubnetIds,
region
)
SELECT
'{{ SubnetGroupName }}' /* required */,
'{{ Description }}',
'{{ SubnetIds }}' /* required */,
'{{ region }}'
RETURNING
subnet_group
;

UPDATE examples

Modifies an existing subnet group.

UPDATE aws.dax.subnet_groups
SET
SubnetGroupName = '{{ SubnetGroupName }}',
Description = '{{ Description }}',
SubnetIds = '{{ SubnetIds }}'
WHERE
region = '{{ region }}' --required
AND SubnetGroupName = '{{ SubnetGroupName }}' --required
RETURNING
subnet_group;

DELETE examples

Deletes a subnet group. You cannot delete a subnet group if it is associated with any DAX clusters.

DELETE FROM aws.dax.subnet_groups
WHERE region = '{{ region }}' --required
;