Skip to content

Conversation

badmintoncryer
Copy link
Contributor

Issue # (if applicable)

None

Reason for this change

AWS APIGW (REST API) now supports for configuring endpoint IP address type.

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-ip-address-type.html

Description of changes

  • Define IpAddressType
  • Add ipAddressType to EndpointConfiguration

Describe any new or updated permissions being added

None

Description of how you validated changes

Add both unit and integ tests

Checklist


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team April 11, 2025 16:19
@github-actions github-actions bot added p2 distinguished-contributor [Pilot] contributed 50+ PRs to the CDK labels Apr 11, 2025
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.98%. Comparing base (74cbe27) to head (cfd6604).
Report is 42 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #34114   +/-   ##
=======================================
  Coverage   83.98%   83.98%           
=======================================
  Files         120      120           
  Lines        6976     6976           
  Branches     1178     1178           
=======================================
  Hits         5859     5859           
  Misses       1005     1005           
  Partials      112      112           
Flag Coverage Δ
suite.unit 83.98% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk ∅ <ø> (∅)
packages/aws-cdk-lib/core 83.98% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@laurelmay laurelmay left a comment

Choose a reason for hiding this comment

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

@badmintoncryer
Copy link
Contributor Author

@laurelmay Thank you for your review!

Should DomainName also be updated to support ipAddressType as well?

I can also update the DomainName in this PR, but since it's a separate functionality, I thought it might be better to split it into a separate PR. What do you think?
If you feel it's necessary, I'm happy to take care of it!

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Apr 12, 2025
@laurelmay
Copy link
Contributor

I can also update the DomainName in this PR, but since it's a separate functionality, I thought it might be better to split it into a separate PR. What do you think?

I think it can be separate! Doing the integration tests for things that require DNS names can be a bit of a hurdle. Just thought I'd point it out in case you wanted to do it hear. Thanks for your work on this!

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Apr 15, 2025
@badmintoncryer
Copy link
Contributor Author

@laurelmay Thank for your review!

throw new ValidationError('Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed', this);
}
if (props.endpointConfiguration) {
const endpointConfiguration = props.endpointConfiguration;
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a blocking comment but would appreciate better readability. Something like

const isPrivateApi = endpointConfiguration.types.includes(EndpointType.PRIVATE);
const isIpv4Only = endpointConfiguration.ipAddressType === IpAddressType.IPV4;

if (isPrivateApi && isIpv4Only) {
  throw new ValidationError(
    'Private APIs must use a dualstack IP address type (IPv4 + IPv6).',
    this
  );
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I've updated my implementation.

Copy link
Contributor

@QuantumNeuralCoder QuantumNeuralCoder left a comment

Choose a reason for hiding this comment

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

Reviewed and good to go

Copy link
Contributor

mergify bot commented Apr 15, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Apr 15, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 15, 2025
Copy link
Contributor

mergify bot commented Apr 15, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot dismissed QuantumNeuralCoder’s stale review April 15, 2025 20:35

Pull request has been modified.

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Apr 15, 2025
Copy link
Contributor

@QuantumNeuralCoder QuantumNeuralCoder left a comment

Choose a reason for hiding this comment

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

Ship it

Copy link
Contributor

mergify bot commented Apr 16, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Apr 16, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated.

You should update or rebase your pull request manually. If you do, this pull request will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

@mergify mergify bot dismissed QuantumNeuralCoder’s stale review April 16, 2025 22:07

Pull request has been modified.

@badmintoncryer
Copy link
Contributor Author

@QuantumNeuralCoder Could you please approve again?

@badmintoncryer
Copy link
Contributor Author

badmintoncryer commented May 2, 2025

@QuantumNeuralCoder Could you please confirm again? CI jobs had failed after your approval again.

Copy link
Contributor

mergify bot commented May 5, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: f2fd1d5
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented May 5, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit efdcb9d into aws:main May 5, 2025
14 of 15 checks passed
Copy link
Contributor

github-actions bot commented May 5, 2025

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2025
@badmintoncryer badmintoncryer deleted the ipaddress-type branch May 5, 2025 21:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

distinguished-contributor [Pilot] contributed 50+ PRs to the CDK p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants