You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to get a subnetId with a tag (actually the tag is applied by creation through CDK, so it's especially troublesome to not be able to find this).
In this example, you show how to apply a tag, but not how to find a resource with a Tag. Presently, I need to replace something like the following in the AWS SDK:
Filter filter = new Filter().withName("vpc-id").withValues(vpcId).withName("tag:Name").withValues("infraStack/CodeBuild VPC/PrivateSubnet1");
DescribeSubnetsRequest describeSubnetsRequest = new DescribeSubnetsRequest().withFilters(filter);
String subnetId = null;
try {
subnetId = getClient().describeSubnets(describeSubnetsRequest).getSubnets().iterator().next().getSubnetId();
Right now CDK doesn't necessarily have API or user guide documentation on how to do this--or I'm not finding it.
The text was updated successfully, but these errors were encountered:
User wrote:
I'm trying to get a subnetId with a tag (actually the tag is applied by creation through CDK, so it's especially troublesome to not be able to find this).
In this example, you show how to apply a tag, but not how to find a resource with a Tag. Presently, I need to replace something like the following in the AWS SDK:
Right now CDK doesn't necessarily have API or user guide documentation on how to do this--or I'm not finding it.
The text was updated successfully, but these errors were encountered: