Groups(request);
printResultSubnetGroups(result);
}
private static void printResultSubnetGroups(DescribeClusterSubnetGroupsResult
result)
{
if (result == null)
{
System.out.println("\nDescribe cluster subnet groups result is
null.");
return;
}
for (ClusterSubnetGroup group : result.getClusterSubnetGroups())
{
printResultSubnetGroup(group);
}
}
private static void printResultSubnetGroup(ClusterSubnetGroup group) {
System.out.format("Name: %s, Description: %s\n", group.getClusterSubnet
GroupName(), group.getDescription());
for (Subnet subnet : group.getSubnets()) {
System.out.format(" Subnet: %s, %s, %s\n", subnet.getSubnetIdenti
fier(),
subnet.getSubnetAvailabilityZone().getName(), subnet.getSub
netStatus());
}
}
}
Manage Cluster Subnet Groups Using Amazon Redshift CLI
and API
You can use the following Amazon Redshift CLI operations to manage cluster subnet groups.
•
create-cluster-subnet-group
•
delete-cluster-subnet-group
•
describe-cluster-subnet-groups
•
modify-cluster-subnet-group
You can use the following Amazon Redshift APIs to manage cluster subnet groups.
•
CreateClusterSubnetGroup
•
DeleteClusterSubnetGroup
•
DescribeClusterSubnetGroups
•
ModifyClusterSubnetGroup
API Version 2012-12-01
31
Amazon Redshift Management Guide
Cluster Subnet Groups