diff --git a/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts b/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts index b78078fca525a..bae896b7ed394 100644 --- a/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts +++ b/packages/@aws-cdk/aws-route53-targets/lib/api-gatewayv2-domain-name.ts @@ -1,11 +1,10 @@ -import * as apigv2 from '@aws-cdk/aws-apigatewayv2'; import * as route53 from '@aws-cdk/aws-route53'; /** * Defines an API Gateway V2 domain name as the alias target. */ export class ApiGatewayv2Domain implements route53.IAliasRecordTarget { - constructor(private readonly domainName: apigv2.IDomainName) { } + constructor(private readonly domainName: ApiGateWayDomainName) { } public bind(_record: route53.IRecordSet): route53.AliasRecordTargetConfig { return { @@ -14,3 +13,19 @@ export class ApiGatewayv2Domain implements route53.IAliasRecordTarget { }; } } + +/** + * Represents an APIGatewayV2 DomainName + */ +export interface ApiGatewayDomainName { + /** + * The region-specific Amazon Route 53 Hosted Zone ID of the regional endpoint. + */ + readonly regionalHostedZoneId: string; + + /** + * The domain name associated with the regional endpoint for this custom domain name. + */ + readonly regionalDomainName: string; + +} diff --git a/packages/@aws-cdk/aws-route53-targets/package.json b/packages/@aws-cdk/aws-route53-targets/package.json index fcfda8916e586..2c68369fedd80 100644 --- a/packages/@aws-cdk/aws-route53-targets/package.json +++ b/packages/@aws-cdk/aws-route53-targets/package.json @@ -65,6 +65,7 @@ "devDependencies": { "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-certificatemanager": "0.0.0", + "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-lambda": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", @@ -74,7 +75,6 @@ }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", - "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-cloudfront": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", @@ -91,7 +91,6 @@ "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-apigateway": "0.0.0", - "@aws-cdk/aws-apigatewayv2": "0.0.0", "@aws-cdk/aws-cloudfront": "0.0.0", "@aws-cdk/aws-cognito": "0.0.0", "@aws-cdk/aws-ec2": "0.0.0", diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/apigateway/call-http-api.ts b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/apigateway/call-http-api.ts index e06e46c2580b0..ebad2904e3e5b 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/lib/apigateway/call-http-api.ts +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/lib/apigateway/call-http-api.ts @@ -1,11 +1,20 @@ -import * as apigatewayv2 from '@aws-cdk/aws-apigatewayv2'; import * as iam from '@aws-cdk/aws-iam'; import * as sfn from '@aws-cdk/aws-stepfunctions'; import * as cdk from '@aws-cdk/core'; -import { Construct } from 'constructs'; +import { Construct, IConstruct } from 'constructs'; import { CallApiGatewayEndpointBase } from './base'; import { CallApiGatewayEndpointBaseProps } from './base-types'; +/** + * An APIGateWayV2 Http API resource representation + */ +export interface IApiGatewayV2HttpApi extends IConstruct { + /** + * The identifier of this API Gateway HTTP API. + */ + readonly apiId: string; +} + /** * Properties for calling an HTTP API Endpoint */ @@ -13,7 +22,7 @@ export interface CallApiGatewayHttpApiEndpointProps extends CallApiGatewayEndpoi /** * API to call */ - readonly api: apigatewayv2.IHttpApi; + readonly api: IApiGatewayV2HttpApi; /** * Name of the stage where the API is deployed to in API Gateway diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json index 4c9d09cf00d59..64fa3303a9c00 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/package.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/package.json @@ -67,6 +67,8 @@ "@aws-cdk/assert": "0.0.0", "@aws-cdk/aws-s3-assets": "0.0.0", "@aws-cdk/aws-sns-subscriptions": "0.0.0", + "@aws-cdk/aws-apigatewayv2": "0.0.0", + "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "jest": "^26.6.3", @@ -74,8 +76,6 @@ }, "dependencies": { "@aws-cdk/aws-apigateway": "0.0.0", - "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-codebuild": "0.0.0", @@ -100,8 +100,6 @@ "homepage": "https://github.com/aws/aws-cdk", "peerDependencies": { "@aws-cdk/aws-apigateway": "0.0.0", - "@aws-cdk/aws-apigatewayv2": "0.0.0", - "@aws-cdk/aws-apigatewayv2-integrations": "0.0.0", "@aws-cdk/aws-batch": "0.0.0", "@aws-cdk/aws-cloudwatch": "0.0.0", "@aws-cdk/aws-codebuild": "0.0.0",