apigateway: private domain name #33352
Labels
@aws-cdk/aws-apigateway
Related to Amazon API Gateway
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
With the launch of Custom Domain Names for private REST APIs last year, support for this feature as L2 constructs would simplify usage.
Use Case
For uses of private custom domain names, users are currently required to use L1 constructs as there's currently no L2 support. By exposing support for private custom domains as L2 constructs similar to how public domain names already are, their use would be simpler. These constructs could then be used for all uses of private custom domain names.
Proposed Solution
I propose adding the following three constructs:
PrivateDomainName
that maps toCfnDomainNameV2
PrivateBasePathMapping
that maps toCfnBasePathMappingV2
DomainNameAccessAssociation
that maps toCfnDomainNameAccessAssociation
As private domain names use a new underlying cloudformation type as opposed to the existing domain name construct, I believe that they should use a new L2 constructs specific to private domain names.
interface IPrivateDomainName
Properties
string
example.com
).string
string
class PrivateDomainName (Construct)
Construct Props
ICertificate
string
EndpointType
PolicyDocument
SecurityPolicy
Properties
string
example.com
).string
string
Methods
class PrivateBasePathMapping (Construct)
Construct Props
IPrivateDomainName
IRestApi
boolean
Stage
class DomainNameAccessAssociation (Construct)
Construct Props
string
AccessAssociationSourceType
IPrivateDomain
interface IAccessAssociationSource
Methods
class VpcEndpointAccessAssociationSource
Initializer
Other Information
apigateway_access_associations package
Although domain name access associations only support vpc endpoints at the moment, it may may make sense to break out the proposed
VpcEndpointAccessAssociationSource
to its ownapigateway_access_associations
package so that future sources can be added there and the core apigateway package minimizes its dependencies on external services.apigateway-alpha package
Due to the introduction of multiple constructs, it may be needed to implement them under an alpha package for experimentation until ready to be graduated to stable.
DomainNameV2 construct
Although not explored in this proposal, it may be worth looking into the creation of a new DomainNameV2 construct that would support both public and private domain names.
Acknowledgements
CDK version used
2.178.1
Environment details (OS name and version, etc.)
macos 15.1
The text was updated successfully, but these errors were encountered: