GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — chore(ec2): add ListVpcSubnets method and pagination by iamhopaul123 · Pull Request #1210 · aws/copilot-cli

This repository was archived by the owner on Jun 22, 2026. It is now read-only.

Conversation

@iamhopaul123

@iamhopaul123 iamhopaul123 commented Jul 30, 2020

Copy link
Copy Markdown
Contributor

Part of #1192.

  1. Add ListVpcSubnets to list all subnets given a VPC ID.
  2. Add pagination when calling DescribeSubnets so that we won't miss results in following pages.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iamhopaul123
chore(ec2): add ListVpcSubnets method and pagination
5d5f75c
@iamhopaul123
iamhopaul123 requested review from Louise15926 and efekarakus July 30, 2020 21:53
@iamhopaul123
iamhopaul123 requested a review from a team as a code owner July 30, 2020 21:53
@amazon-ecs-cli-v2-pr-manager
amazon-ecs-cli-v2-pr-manager requested a review from kohidave July 30, 2020 21:53
kohidave
kohidave reviewed Jul 30, 2020
View reviewed changes

@kohidave kohidave left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! We getting somewhere now!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread internal/pkg/aws/ec2/ec2.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread internal/pkg/aws/ec2/ec2.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread internal/pkg/aws/ec2/ec2.go Resolved

Uh oh!

There was an error while loading. Please reload this page.

@iamhopaul123 iamhopaul123 added the WIP Pull requests that are being modified now. label Jul 30, 2020
@iamhopaul123
iamhopaul123 force-pushed the ec2/add-new-subnet-apis branch from d622a7d to ccedec2 Compare July 30, 2020 23:05
@iamhopaul123
Address feedback
01f240b
@iamhopaul123
iamhopaul123 force-pushed the ec2/add-new-subnet-apis branch from ccedec2 to 01f240b Compare July 30, 2020 23:22
@iamhopaul123 iamhopaul123 removed the WIP Pull requests that are being modified now. label Jul 30, 2020
kohidave
kohidave approved these changes Jul 31, 2020
View reviewed changes
Louise15926
Louise15926 approved these changes Jul 31, 2020
View reviewed changes

@Louise15926 Louise15926 left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mergify
mergify Bot merged commit 88a2910 into aws:master Jul 31, 2020
efekarakus
efekarakus reviewed Jul 31, 2020
View reviewed changes
Comment thread internal/pkg/aws/ec2/ec2.go
}

// ListVpcSubnets lists all subnets given a VPC ID.
func (c *EC2) ListVpcSubnets(vpcID string) (*Subnets, error) {

@efekarakus efekarakus Jul 31, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamhopaul123 https://github.com/golang/go/wiki/CodeReviewComments#initialisms omggg
ListVPCSubnets

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread internal/pkg/aws/ec2/ec2.go
Comment on lines +46 to +47
PublicSubnets []string
PrivateSubnets []string

@efekarakus efekarakus Jul 31, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type Subnets struct {
    Public []string
    Private []string
}

Subnets.PublicSubnets is redundant :P

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iamhopaul123 iamhopaul123 Jul 31, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll update it in the next one :P

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

3 more reviewers
@efekarakus efekarakus efekarakus left review comments
@kohidave kohidave kohidave approved these changes
@Louise15926 Louise15926 Louise15926 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@iamhopaul123 @kohidave @efekarakus @Louise15926
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.