diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/cdk.out new file mode 100644 index 0000000000000..188478b55560e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"41.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/integ.json new file mode 100644 index 0000000000000..71e1b0ee3aaaa --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "41.0.0", + "testCases": { + "restapi-ip-address-type-test-integ/DefaultTest": { + "stacks": [ + "restapi-ip-address-type-test-stack" + ], + "assertionStack": "restapi-ip-address-type-test-integ/DefaultTest/DeployAssert", + "assertionStackName": "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/manifest.json new file mode 100644 index 0000000000000..03112baacf2bd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/manifest.json @@ -0,0 +1,813 @@ +{ + "version": "42.0.0", + "artifacts": { + "restapi-ip-address-type-test-stack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "restapi-ip-address-type-test-stack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "restapi-ip-address-type-test-stack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "restapi-ip-address-type-test-stack.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/0986b8dec07b02e274b566c21876b97c85b2f3cbe4cbc753c3727758393abf93.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "restapi-ip-address-type-test-stack.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "restapi-ip-address-type-test-stack.assets" + ], + "metadata": { + "/restapi-ip-address-type-test-stack/Vpc": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "restrictDefaultSecurityGroup": false, + "natGateways": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/Vpc/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Vpc8378EB38" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet1": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": {} + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1Subnet5C2D37C4" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTable6C95E38E" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1RouteTableAssociation97140677" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet1DefaultRoute3DA9E72A" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet2": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": true, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": {} + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2Subnet691E08A3" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTable94F7E489" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2RouteTableAssociationDD5762D8" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/DefaultRoute": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcPublicSubnet2DefaultRoute97F91067" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIsolatedSubnet1SubnetE48C5737" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIsolatedSubnet1RouteTable4771E3E5" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIsolatedSubnet1RouteTableAssociationD300FCBB" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + }, + { + "type": "aws:cdk:analytics:construct", + "data": { + "availabilityZone": "*", + "vpcId": "*", + "cidrBlock": "*", + "mapPublicIpOnLaunch": false, + "ipv6CidrBlock": "*", + "assignIpv6AddressOnCreation": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/Subnet": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIsolatedSubnet2Subnet16364B91" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/RouteTable": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIsolatedSubnet2RouteTable1D30AF7D" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/RouteTableAssociation": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIsolatedSubnet2RouteTableAssociationF7B18CCA" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/IGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcIGWD7BA715C" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/VPCGW": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVPCGWBF912B6E" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/VpcEndpoint": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "vpc": "*", + "service": { + "privateDnsDefault": true, + "name": "*", + "port": "*" + }, + "privateDnsEnabled": true + } + } + ], + "/restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/SecurityGroup": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "vpc": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addIngressRule": [ + { + "canInlineRule": true, + "connections": "*", + "uniqueId": "*" + }, + {}, + "*", + false + ] + } + } + ], + "/restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/SecurityGroup/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVpcEndpointSecurityGroup0E497F39" + } + ], + "/restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "VpcVpcEndpoint697E0D62" + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "endpointConfiguration": { + "types": [ + "EDGE" + ] + } + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeIpv4ApiCFB9ED42" + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Deployment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "api": "*", + "retainDeployments": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToLogicalId": [ + {} + ] + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Deployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeIpv4ApiDeploymentAAA722F1b22002174628ba0e84625e834ba7d7ac" + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/DeploymentStage.prod": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "deployment": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/DeploymentStage.prod/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeIpv4ApiDeploymentStageprodD2CA6885" + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Endpoint": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeIpv4ApiEndpoint041D724F" + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Default": [ + { + "type": "aws:cdk:analytics:construct", + "data": "*" + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Default/GET": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "resource": "*", + "httpMethod": "*", + "integration": "*", + "options": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeIpv4Api/Default/GET/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeIpv4ApiGETFFC4D99B" + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "endpointConfiguration": { + "types": [ + "EDGE" + ] + } + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeDualStackApi70584C34" + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Deployment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "api": "*", + "retainDeployments": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToLogicalId": [ + {} + ] + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Deployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeDualStackApiDeployment257C3F6F7104d13eb1093c3722e3eb2cf05813c8" + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/DeploymentStage.prod": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "deployment": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/DeploymentStage.prod/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeDualStackApiDeploymentStageprodF8D00A4B" + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Endpoint": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeDualStackApiEndpoint07363117" + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Default": [ + { + "type": "aws:cdk:analytics:construct", + "data": "*" + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Default/GET": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "resource": "*", + "httpMethod": "*", + "integration": "*", + "options": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/EdgeDualStackApi/Default/GET/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "EdgeDualStackApiGET6F5A20B5" + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "endpointConfiguration": { + "types": [ + "REGIONAL" + ] + } + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalIpv4Api7846288A" + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Deployment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "api": "*", + "retainDeployments": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToLogicalId": [ + {} + ] + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Deployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalIpv4ApiDeployment29258D8A8646fa5566626943f8c2fea6834644cd" + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/DeploymentStage.prod": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "deployment": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/DeploymentStage.prod/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalIpv4ApiDeploymentStageprod068741CD" + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Endpoint": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalIpv4ApiEndpoint4DBD9FD1" + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Default": [ + { + "type": "aws:cdk:analytics:construct", + "data": "*" + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Default/GET": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "resource": "*", + "httpMethod": "*", + "integration": "*", + "options": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalIpv4Api/Default/GET/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalIpv4ApiGET97CBC6B6" + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "endpointConfiguration": { + "types": [ + "REGIONAL" + ] + } + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalDualStackApi8E297664" + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Deployment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "api": "*", + "retainDeployments": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToLogicalId": [ + {} + ] + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Deployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalDualStackApiDeployment29E88BD6051b7fb9f17179f7ec0983f9eb188ea0" + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/DeploymentStage.prod": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "deployment": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/DeploymentStage.prod/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalDualStackApiDeploymentStageprod5DA52830" + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Endpoint": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalDualStackApiEndpoint76388023" + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Default": [ + { + "type": "aws:cdk:analytics:construct", + "data": "*" + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Default/GET": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "resource": "*", + "httpMethod": "*", + "integration": "*", + "options": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/RegionalDualStackApi/Default/GET/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "RegionalDualStackApiGET21115B38" + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "endpointConfiguration": { + "types": [ + "*" + ] + } + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToResourcePolicy": [ + {} + ] + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToResourcePolicy": [ + {} + ] + } + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PrivateDualStackApi2CCFC682" + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Deployment": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "description": "*", + "api": "*", + "retainDeployments": "*" + } + }, + { + "type": "aws:cdk:analytics:method", + "data": { + "addToLogicalId": [ + {} + ] + } + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Deployment/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PrivateDualStackApiDeploymentB8DAB5721935cdcd96f76b2b894fbe54157fe042" + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/DeploymentStage.prod": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "deployment": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/DeploymentStage.prod/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PrivateDualStackApiDeploymentStageprod0A975547" + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Endpoint": [ + { + "type": "aws:cdk:logicalId", + "data": "PrivateDualStackApiEndpointD2C12CE0" + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Default": [ + { + "type": "aws:cdk:analytics:construct", + "data": "*" + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Default/GET": [ + { + "type": "aws:cdk:analytics:construct", + "data": { + "resource": "*", + "httpMethod": "*", + "integration": "*", + "options": "*" + } + } + ], + "/restapi-ip-address-type-test-stack/PrivateDualStackApi/Default/GET/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "PrivateDualStackApiGET41804A3C" + } + ], + "/restapi-ip-address-type-test-stack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/restapi-ip-address-type-test-stack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "restapi-ip-address-type-test-stack" + }, + "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets" + ], + "metadata": { + "/restapi-ip-address-type-test-integ/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/restapi-ip-address-type-test-integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "restapi-ip-address-type-test-integ/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + }, + "minimumCliVersion": "2.1006.0" +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapi-ip-address-type-test-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapi-ip-address-type-test-stack.assets.json new file mode 100644 index 0000000000000..4e46f513a764b --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapi-ip-address-type-test-stack.assets.json @@ -0,0 +1,20 @@ +{ + "version": "41.0.0", + "files": { + "0986b8dec07b02e274b566c21876b97c85b2f3cbe4cbc753c3727758393abf93": { + "displayName": "restapi-ip-address-type-test-stack Template", + "source": { + "path": "restapi-ip-address-type-test-stack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "0986b8dec07b02e274b566c21876b97c85b2f3cbe4cbc753c3727758393abf93.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapi-ip-address-type-test-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapi-ip-address-type-test-stack.template.json new file mode 100644 index 0000000000000..a564637d4db3e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapi-ip-address-type-test-stack.template.json @@ -0,0 +1,864 @@ +{ + "Resources": { + "Vpc8378EB38": { + "Type": "AWS::EC2::VPC", + "Properties": { + "CidrBlock": "10.0.0.0/16", + "EnableDnsHostnames": true, + "EnableDnsSupport": true, + "InstanceTenancy": "default", + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc" + } + ] + } + }, + "VpcPublicSubnet1Subnet5C2D37C4": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.0.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTable6C95E38E": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/PublicSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet1RouteTableAssociation97140677": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet1Subnet5C2D37C4" + } + } + }, + "VpcPublicSubnet1DefaultRoute3DA9E72A": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet1RouteTable6C95E38E" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcPublicSubnet2Subnet691E08A3": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.64.0/18", + "MapPublicIpOnLaunch": true, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Public" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Public" + }, + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTable94F7E489": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/PublicSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcPublicSubnet2RouteTableAssociationDD5762D8": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + }, + "SubnetId": { + "Ref": "VpcPublicSubnet2Subnet691E08A3" + } + } + }, + "VpcPublicSubnet2DefaultRoute97F91067": { + "Type": "AWS::EC2::Route", + "Properties": { + "DestinationCidrBlock": "0.0.0.0/0", + "GatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "RouteTableId": { + "Ref": "VpcPublicSubnet2RouteTable94F7E489" + } + }, + "DependsOn": [ + "VpcVPCGWBF912B6E" + ] + }, + "VpcIsolatedSubnet1SubnetE48C5737": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 0, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.128.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Isolated" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcIsolatedSubnet1RouteTable4771E3E5": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcIsolatedSubnet1RouteTableAssociationD300FCBB": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcIsolatedSubnet1RouteTable4771E3E5" + }, + "SubnetId": { + "Ref": "VpcIsolatedSubnet1SubnetE48C5737" + } + } + }, + "VpcIsolatedSubnet2Subnet16364B91": { + "Type": "AWS::EC2::Subnet", + "Properties": { + "AvailabilityZone": { + "Fn::Select": [ + 1, + { + "Fn::GetAZs": "" + } + ] + }, + "CidrBlock": "10.0.192.0/18", + "MapPublicIpOnLaunch": false, + "Tags": [ + { + "Key": "aws-cdk:subnet-name", + "Value": "Isolated" + }, + { + "Key": "aws-cdk:subnet-type", + "Value": "Isolated" + }, + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcIsolatedSubnet2RouteTable1D30AF7D": { + "Type": "AWS::EC2::RouteTable", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcIsolatedSubnet2RouteTableAssociationF7B18CCA": { + "Type": "AWS::EC2::SubnetRouteTableAssociation", + "Properties": { + "RouteTableId": { + "Ref": "VpcIsolatedSubnet2RouteTable1D30AF7D" + }, + "SubnetId": { + "Ref": "VpcIsolatedSubnet2Subnet16364B91" + } + } + }, + "VpcIGWD7BA715C": { + "Type": "AWS::EC2::InternetGateway", + "Properties": { + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc" + } + ] + } + }, + "VpcVPCGWBF912B6E": { + "Type": "AWS::EC2::VPCGatewayAttachment", + "Properties": { + "InternetGatewayId": { + "Ref": "VpcIGWD7BA715C" + }, + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcVpcEndpointSecurityGroup0E497F39": { + "Type": "AWS::EC2::SecurityGroup", + "Properties": { + "GroupDescription": "restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/SecurityGroup", + "SecurityGroupEgress": [ + { + "CidrIp": "0.0.0.0/0", + "Description": "Allow all outbound traffic by default", + "IpProtocol": "-1" + } + ], + "SecurityGroupIngress": [ + { + "CidrIp": { + "Fn::GetAtt": [ + "Vpc8378EB38", + "CidrBlock" + ] + }, + "Description": { + "Fn::Join": [ + "", + [ + "from ", + { + "Fn::GetAtt": [ + "Vpc8378EB38", + "CidrBlock" + ] + }, + ":443" + ] + ] + }, + "FromPort": 443, + "IpProtocol": "tcp", + "ToPort": 443 + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc" + } + ], + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "VpcVpcEndpoint697E0D62": { + "Type": "AWS::EC2::VPCEndpoint", + "Properties": { + "PrivateDnsEnabled": true, + "SecurityGroupIds": [ + { + "Fn::GetAtt": [ + "VpcVpcEndpointSecurityGroup0E497F39", + "GroupId" + ] + } + ], + "ServiceName": { + "Fn::Join": [ + "", + [ + "com.amazonaws.", + { + "Ref": "AWS::Region" + }, + ".execute-api" + ] + ] + }, + "SubnetIds": [ + { + "Ref": "VpcIsolatedSubnet1SubnetE48C5737" + }, + { + "Ref": "VpcIsolatedSubnet2Subnet16364B91" + } + ], + "Tags": [ + { + "Key": "Name", + "Value": "restapi-ip-address-type-test-stack/Vpc" + } + ], + "VpcEndpointType": "Interface", + "VpcId": { + "Ref": "Vpc8378EB38" + } + } + }, + "EdgeIpv4ApiCFB9ED42": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "EndpointConfiguration": { + "IpAddressType": "ipv4", + "Types": [ + "EDGE" + ] + }, + "Name": "EdgeIpv4Api" + } + }, + "EdgeIpv4ApiDeploymentAAA722F1b22002174628ba0e84625e834ba7d7ac": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "EdgeIpv4ApiCFB9ED42" + } + }, + "DependsOn": [ + "EdgeIpv4ApiGETFFC4D99B" + ] + }, + "EdgeIpv4ApiDeploymentStageprodD2CA6885": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "DeploymentId": { + "Ref": "EdgeIpv4ApiDeploymentAAA722F1b22002174628ba0e84625e834ba7d7ac" + }, + "RestApiId": { + "Ref": "EdgeIpv4ApiCFB9ED42" + }, + "StageName": "prod" + } + }, + "EdgeIpv4ApiGETFFC4D99B": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "NONE", + "HttpMethod": "GET", + "Integration": { + "Type": "MOCK" + }, + "ResourceId": { + "Fn::GetAtt": [ + "EdgeIpv4ApiCFB9ED42", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "EdgeIpv4ApiCFB9ED42" + } + } + }, + "EdgeDualStackApi70584C34": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "EndpointConfiguration": { + "IpAddressType": "dualstack", + "Types": [ + "EDGE" + ] + }, + "Name": "EdgeDualStackApi" + } + }, + "EdgeDualStackApiDeployment257C3F6F7104d13eb1093c3722e3eb2cf05813c8": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "EdgeDualStackApi70584C34" + } + }, + "DependsOn": [ + "EdgeDualStackApiGET6F5A20B5" + ] + }, + "EdgeDualStackApiDeploymentStageprodF8D00A4B": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "DeploymentId": { + "Ref": "EdgeDualStackApiDeployment257C3F6F7104d13eb1093c3722e3eb2cf05813c8" + }, + "RestApiId": { + "Ref": "EdgeDualStackApi70584C34" + }, + "StageName": "prod" + } + }, + "EdgeDualStackApiGET6F5A20B5": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "NONE", + "HttpMethod": "GET", + "Integration": { + "Type": "MOCK" + }, + "ResourceId": { + "Fn::GetAtt": [ + "EdgeDualStackApi70584C34", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "EdgeDualStackApi70584C34" + } + } + }, + "RegionalIpv4Api7846288A": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "EndpointConfiguration": { + "IpAddressType": "ipv4", + "Types": [ + "REGIONAL" + ] + }, + "Name": "RegionalIpv4Api" + } + }, + "RegionalIpv4ApiDeployment29258D8A8646fa5566626943f8c2fea6834644cd": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "RegionalIpv4Api7846288A" + } + }, + "DependsOn": [ + "RegionalIpv4ApiGET97CBC6B6" + ] + }, + "RegionalIpv4ApiDeploymentStageprod068741CD": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "DeploymentId": { + "Ref": "RegionalIpv4ApiDeployment29258D8A8646fa5566626943f8c2fea6834644cd" + }, + "RestApiId": { + "Ref": "RegionalIpv4Api7846288A" + }, + "StageName": "prod" + } + }, + "RegionalIpv4ApiGET97CBC6B6": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "NONE", + "HttpMethod": "GET", + "Integration": { + "Type": "MOCK" + }, + "ResourceId": { + "Fn::GetAtt": [ + "RegionalIpv4Api7846288A", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "RegionalIpv4Api7846288A" + } + } + }, + "RegionalDualStackApi8E297664": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "EndpointConfiguration": { + "IpAddressType": "dualstack", + "Types": [ + "REGIONAL" + ] + }, + "Name": "RegionalDualStackApi" + } + }, + "RegionalDualStackApiDeployment29E88BD6051b7fb9f17179f7ec0983f9eb188ea0": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "RegionalDualStackApi8E297664" + } + }, + "DependsOn": [ + "RegionalDualStackApiGET21115B38" + ] + }, + "RegionalDualStackApiDeploymentStageprod5DA52830": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "DeploymentId": { + "Ref": "RegionalDualStackApiDeployment29E88BD6051b7fb9f17179f7ec0983f9eb188ea0" + }, + "RestApiId": { + "Ref": "RegionalDualStackApi8E297664" + }, + "StageName": "prod" + } + }, + "RegionalDualStackApiGET21115B38": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "NONE", + "HttpMethod": "GET", + "Integration": { + "Type": "MOCK" + }, + "ResourceId": { + "Fn::GetAtt": [ + "RegionalDualStackApi8E297664", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "RegionalDualStackApi8E297664" + } + } + }, + "PrivateDualStackApi2CCFC682": { + "Type": "AWS::ApiGateway::RestApi", + "Properties": { + "EndpointConfiguration": { + "IpAddressType": "dualstack", + "Types": [ + "PRIVATE" + ] + }, + "Name": "PrivateDualStackApi", + "Policy": { + "Statement": [ + { + "Action": "execute-api:Invoke", + "Condition": { + "StringNotEquals": { + "aws:SourceVpce": [ + { + "Ref": "VpcVpcEndpoint697E0D62" + } + ] + } + }, + "Effect": "Deny", + "Principal": { + "AWS": "*" + }, + "Resource": "execute-api:/*" + }, + { + "Action": "execute-api:Invoke", + "Effect": "Allow", + "Principal": { + "AWS": "*" + }, + "Resource": "execute-api:/*" + } + ], + "Version": "2012-10-17" + } + } + }, + "PrivateDualStackApiDeploymentB8DAB5721935cdcd96f76b2b894fbe54157fe042": { + "Type": "AWS::ApiGateway::Deployment", + "Properties": { + "Description": "Automatically created by the RestApi construct", + "RestApiId": { + "Ref": "PrivateDualStackApi2CCFC682" + } + }, + "DependsOn": [ + "PrivateDualStackApiGET41804A3C" + ] + }, + "PrivateDualStackApiDeploymentStageprod0A975547": { + "Type": "AWS::ApiGateway::Stage", + "Properties": { + "DeploymentId": { + "Ref": "PrivateDualStackApiDeploymentB8DAB5721935cdcd96f76b2b894fbe54157fe042" + }, + "RestApiId": { + "Ref": "PrivateDualStackApi2CCFC682" + }, + "StageName": "prod" + } + }, + "PrivateDualStackApiGET41804A3C": { + "Type": "AWS::ApiGateway::Method", + "Properties": { + "AuthorizationType": "NONE", + "HttpMethod": "GET", + "Integration": { + "Type": "MOCK" + }, + "ResourceId": { + "Fn::GetAtt": [ + "PrivateDualStackApi2CCFC682", + "RootResourceId" + ] + }, + "RestApiId": { + "Ref": "PrivateDualStackApi2CCFC682" + } + } + } + }, + "Outputs": { + "EdgeIpv4ApiEndpoint041D724F": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "EdgeIpv4ApiCFB9ED42" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "EdgeIpv4ApiDeploymentStageprodD2CA6885" + }, + "/" + ] + ] + } + }, + "EdgeDualStackApiEndpoint07363117": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "EdgeDualStackApi70584C34" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "EdgeDualStackApiDeploymentStageprodF8D00A4B" + }, + "/" + ] + ] + } + }, + "RegionalIpv4ApiEndpoint4DBD9FD1": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "RegionalIpv4Api7846288A" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "RegionalIpv4ApiDeploymentStageprod068741CD" + }, + "/" + ] + ] + } + }, + "RegionalDualStackApiEndpoint76388023": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "RegionalDualStackApi8E297664" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "RegionalDualStackApiDeploymentStageprod5DA52830" + }, + "/" + ] + ] + } + }, + "PrivateDualStackApiEndpointD2C12CE0": { + "Value": { + "Fn::Join": [ + "", + [ + "https://", + { + "Ref": "PrivateDualStackApi2CCFC682" + }, + ".execute-api.", + { + "Ref": "AWS::Region" + }, + ".", + { + "Ref": "AWS::URLSuffix" + }, + "/", + { + "Ref": "PrivateDualStackApiDeploymentStageprod0A975547" + }, + "/" + ] + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets.json new file mode 100644 index 0000000000000..d10ba55c4f172 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.assets.json @@ -0,0 +1,20 @@ +{ + "version": "41.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "displayName": "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42 Template", + "source": { + "path": "restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/restapiipaddresstypetestintegDefaultTestDeployAssertAA7C2A42.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/tree.json new file mode 100644 index 0000000000000..fd2ec8d4a3860 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.js.snapshot/tree.json @@ -0,0 +1 @@ +{"version":"tree-0.1","tree":{"id":"App","path":"","children":{"restapi-ip-address-type-test-stack":{"id":"restapi-ip-address-type-test-stack","path":"restapi-ip-address-type-test-stack","children":{"Vpc":{"id":"Vpc","path":"restapi-ip-address-type-test-stack/Vpc","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/Vpc/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPC","aws:cdk:cloudformation:props":{"cidrBlock":"10.0.0.0/16","enableDnsHostnames":true,"enableDnsSupport":true,"instanceTenancy":"default","tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc"}]}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPC","version":"0.0.0"}},"PublicSubnet1":{"id":"PublicSubnet1","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1","children":{"Subnet":{"id":"Subnet","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/Subnet","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[0,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.0.0/18","mapPublicIpOnLaunch":true,"tags":[{"key":"aws-cdk:subnet-name","value":"Public"},{"key":"aws-cdk:subnet-type","value":"Public"},{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"}},"Acl":{"id":"Acl","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/RouteTable","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/RouteTableAssociation","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VpcPublicSubnet1RouteTable6C95E38E"},"subnetId":{"Ref":"VpcPublicSubnet1Subnet5C2D37C4"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"}},"DefaultRoute":{"id":"DefaultRoute","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet1/DefaultRoute","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","gatewayId":{"Ref":"VpcIGWD7BA715C"},"routeTableId":{"Ref":"VpcPublicSubnet1RouteTable6C95E38E"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PublicSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{}]}},"PublicSubnet2":{"id":"PublicSubnet2","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2","children":{"Subnet":{"id":"Subnet","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/Subnet","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[1,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.64.0/18","mapPublicIpOnLaunch":true,"tags":[{"key":"aws-cdk:subnet-name","value":"Public"},{"key":"aws-cdk:subnet-type","value":"Public"},{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"}},"Acl":{"id":"Acl","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/RouteTable","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/RouteTableAssociation","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VpcPublicSubnet2RouteTable94F7E489"},"subnetId":{"Ref":"VpcPublicSubnet2Subnet691E08A3"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"}},"DefaultRoute":{"id":"DefaultRoute","path":"restapi-ip-address-type-test-stack/Vpc/PublicSubnet2/DefaultRoute","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Route","aws:cdk:cloudformation:props":{"destinationCidrBlock":"0.0.0.0/0","gatewayId":{"Ref":"VpcIGWD7BA715C"},"routeTableId":{"Ref":"VpcPublicSubnet2RouteTable94F7E489"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRoute","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PublicSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":true,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{}]}},"IsolatedSubnet1":{"id":"IsolatedSubnet1","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1","children":{"Subnet":{"id":"Subnet","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/Subnet","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[0,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.128.0/18","mapPublicIpOnLaunch":false,"tags":[{"key":"aws-cdk:subnet-name","value":"Isolated"},{"key":"aws-cdk:subnet-type","value":"Isolated"},{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"}},"Acl":{"id":"Acl","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/RouteTable","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet1/RouteTableAssociation","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VpcIsolatedSubnet1RouteTable4771E3E5"},"subnetId":{"Ref":"VpcIsolatedSubnet1SubnetE48C5737"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PrivateSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"}]}},"IsolatedSubnet2":{"id":"IsolatedSubnet2","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2","children":{"Subnet":{"id":"Subnet","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/Subnet","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::Subnet","aws:cdk:cloudformation:props":{"availabilityZone":{"Fn::Select":[1,{"Fn::GetAZs":""}]},"cidrBlock":"10.0.192.0/18","mapPublicIpOnLaunch":false,"tags":[{"key":"aws-cdk:subnet-name","value":"Isolated"},{"key":"aws-cdk:subnet-type","value":"Isolated"},{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnet","version":"0.0.0"}},"Acl":{"id":"Acl","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/Acl","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":[]}},"RouteTable":{"id":"RouteTable","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/RouteTable","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::RouteTable","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnRouteTable","version":"0.0.0"}},"RouteTableAssociation":{"id":"RouteTableAssociation","path":"restapi-ip-address-type-test-stack/Vpc/IsolatedSubnet2/RouteTableAssociation","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SubnetRouteTableAssociation","aws:cdk:cloudformation:props":{"routeTableId":{"Ref":"VpcIsolatedSubnet2RouteTable1D30AF7D"},"subnetId":{"Ref":"VpcIsolatedSubnet2Subnet16364B91"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.PrivateSubnet","version":"0.0.0","metadata":[{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"},{"availabilityZone":"*","vpcId":"*","cidrBlock":"*","mapPublicIpOnLaunch":false,"ipv6CidrBlock":"*","assignIpv6AddressOnCreation":"*"}]}},"IGW":{"id":"IGW","path":"restapi-ip-address-type-test-stack/Vpc/IGW","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::InternetGateway","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc"}]}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnInternetGateway","version":"0.0.0"}},"VPCGW":{"id":"VPCGW","path":"restapi-ip-address-type-test-stack/Vpc/VPCGW","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPCGatewayAttachment","aws:cdk:cloudformation:props":{"internetGatewayId":{"Ref":"VpcIGWD7BA715C"},"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment","version":"0.0.0"}},"VpcEndpoint":{"id":"VpcEndpoint","path":"restapi-ip-address-type-test-stack/Vpc/VpcEndpoint","children":{"SecurityGroup":{"id":"SecurityGroup","path":"restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/SecurityGroup","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/SecurityGroup/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::SecurityGroup","aws:cdk:cloudformation:props":{"groupDescription":"restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/SecurityGroup","securityGroupEgress":[{"cidrIp":"0.0.0.0/0","description":"Allow all outbound traffic by default","ipProtocol":"-1"}],"securityGroupIngress":[{"cidrIp":{"Fn::GetAtt":["Vpc8378EB38","CidrBlock"]},"ipProtocol":"tcp","fromPort":443,"toPort":443,"description":{"Fn::Join":["",["from ",{"Fn::GetAtt":["Vpc8378EB38","CidrBlock"]},":443"]]}}],"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc"}],"vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnSecurityGroup","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.SecurityGroup","version":"0.0.0","metadata":[{"vpc":"*"},{"addIngressRule":[{"canInlineRule":true,"connections":"*","uniqueId":"*"},{},"*",false]}]}},"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/Vpc/VpcEndpoint/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::EC2::VPCEndpoint","aws:cdk:cloudformation:props":{"tags":[{"key":"Name","value":"restapi-ip-address-type-test-stack/Vpc"}],"privateDnsEnabled":true,"securityGroupIds":[{"Fn::GetAtt":["VpcVpcEndpointSecurityGroup0E497F39","GroupId"]}],"serviceName":{"Fn::Join":["",["com.amazonaws.",{"Ref":"AWS::Region"},".execute-api"]]},"subnetIds":[{"Ref":"VpcIsolatedSubnet1SubnetE48C5737"},{"Ref":"VpcIsolatedSubnet2Subnet16364B91"}],"vpcEndpointType":"Interface","vpcId":{"Ref":"Vpc8378EB38"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.CfnVPCEndpoint","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.InterfaceVpcEndpoint","version":"0.0.0","metadata":[{"vpc":"*","service":{"privateDnsDefault":true,"name":"*","port":"*"},"privateDnsEnabled":true}]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_ec2.Vpc","version":"0.0.0","metadata":[{"restrictDefaultSecurityGroup":false,"natGateways":"*"}]}},"EdgeIpv4Api":{"id":"EdgeIpv4Api","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"endpointConfiguration":{"ipAddressType":"ipv4","types":["EDGE"]},"name":"EdgeIpv4Api"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"}},"Deployment":{"id":"Deployment","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Deployment","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Deployment/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"Automatically created by the RestApi construct","restApiId":{"Ref":"EdgeIpv4ApiCFB9ED42"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":"*"},{"addToLogicalId":[{}]}]}},"DeploymentStage.prod":{"id":"DeploymentStage.prod","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/DeploymentStage.prod","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/DeploymentStage.prod/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"deploymentId":{"Ref":"EdgeIpv4ApiDeploymentAAA722F1b22002174628ba0e84625e834ba7d7ac"},"restApiId":{"Ref":"EdgeIpv4ApiCFB9ED42"},"stageName":"prod"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*"}]}},"Endpoint":{"id":"Endpoint","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"Default":{"id":"Default","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Default","children":{"GET":{"id":"GET","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Default/GET","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeIpv4Api/Default/GET/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Fn::GetAtt":["EdgeIpv4ApiCFB9ED42","RootResourceId"]},"restApiId":{"Ref":"EdgeIpv4ApiCFB9ED42"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.RestApi","version":"0.0.0","metadata":[{"endpointConfiguration":{"types":["EDGE"]}}]}},"EdgeDualStackApi":{"id":"EdgeDualStackApi","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"endpointConfiguration":{"ipAddressType":"dualstack","types":["EDGE"]},"name":"EdgeDualStackApi"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"}},"Deployment":{"id":"Deployment","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Deployment","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Deployment/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"Automatically created by the RestApi construct","restApiId":{"Ref":"EdgeDualStackApi70584C34"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":"*"},{"addToLogicalId":[{}]}]}},"DeploymentStage.prod":{"id":"DeploymentStage.prod","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/DeploymentStage.prod","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/DeploymentStage.prod/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"deploymentId":{"Ref":"EdgeDualStackApiDeployment257C3F6F7104d13eb1093c3722e3eb2cf05813c8"},"restApiId":{"Ref":"EdgeDualStackApi70584C34"},"stageName":"prod"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*"}]}},"Endpoint":{"id":"Endpoint","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"Default":{"id":"Default","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Default","children":{"GET":{"id":"GET","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Default/GET","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/EdgeDualStackApi/Default/GET/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Fn::GetAtt":["EdgeDualStackApi70584C34","RootResourceId"]},"restApiId":{"Ref":"EdgeDualStackApi70584C34"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.RestApi","version":"0.0.0","metadata":[{"endpointConfiguration":{"types":["EDGE"]}}]}},"RegionalIpv4Api":{"id":"RegionalIpv4Api","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"endpointConfiguration":{"ipAddressType":"ipv4","types":["REGIONAL"]},"name":"RegionalIpv4Api"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"}},"Deployment":{"id":"Deployment","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Deployment","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Deployment/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"Automatically created by the RestApi construct","restApiId":{"Ref":"RegionalIpv4Api7846288A"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":"*"},{"addToLogicalId":[{}]}]}},"DeploymentStage.prod":{"id":"DeploymentStage.prod","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/DeploymentStage.prod","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/DeploymentStage.prod/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"deploymentId":{"Ref":"RegionalIpv4ApiDeployment29258D8A8646fa5566626943f8c2fea6834644cd"},"restApiId":{"Ref":"RegionalIpv4Api7846288A"},"stageName":"prod"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*"}]}},"Endpoint":{"id":"Endpoint","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"Default":{"id":"Default","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Default","children":{"GET":{"id":"GET","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Default/GET","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalIpv4Api/Default/GET/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Fn::GetAtt":["RegionalIpv4Api7846288A","RootResourceId"]},"restApiId":{"Ref":"RegionalIpv4Api7846288A"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.RestApi","version":"0.0.0","metadata":[{"endpointConfiguration":{"types":["REGIONAL"]}}]}},"RegionalDualStackApi":{"id":"RegionalDualStackApi","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"endpointConfiguration":{"ipAddressType":"dualstack","types":["REGIONAL"]},"name":"RegionalDualStackApi"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"}},"Deployment":{"id":"Deployment","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Deployment","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Deployment/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"Automatically created by the RestApi construct","restApiId":{"Ref":"RegionalDualStackApi8E297664"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":"*"},{"addToLogicalId":[{}]}]}},"DeploymentStage.prod":{"id":"DeploymentStage.prod","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/DeploymentStage.prod","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/DeploymentStage.prod/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"deploymentId":{"Ref":"RegionalDualStackApiDeployment29E88BD6051b7fb9f17179f7ec0983f9eb188ea0"},"restApiId":{"Ref":"RegionalDualStackApi8E297664"},"stageName":"prod"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*"}]}},"Endpoint":{"id":"Endpoint","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"Default":{"id":"Default","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Default","children":{"GET":{"id":"GET","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Default/GET","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/RegionalDualStackApi/Default/GET/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Fn::GetAtt":["RegionalDualStackApi8E297664","RootResourceId"]},"restApiId":{"Ref":"RegionalDualStackApi8E297664"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.RestApi","version":"0.0.0","metadata":[{"endpointConfiguration":{"types":["REGIONAL"]}}]}},"PrivateDualStackApi":{"id":"PrivateDualStackApi","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"endpointConfiguration":{"ipAddressType":"dualstack","types":["PRIVATE"]},"name":"PrivateDualStackApi","policy":{"Statement":[{"Action":"execute-api:Invoke","Condition":{"StringNotEquals":{"aws:SourceVpce":[{"Ref":"VpcVpcEndpoint697E0D62"}]}},"Effect":"Deny","Principal":{"AWS":"*"},"Resource":"execute-api:/*"},{"Action":"execute-api:Invoke","Effect":"Allow","Principal":{"AWS":"*"},"Resource":"execute-api:/*"}],"Version":"2012-10-17"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"}},"Deployment":{"id":"Deployment","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Deployment","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Deployment/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"Automatically created by the RestApi construct","restApiId":{"Ref":"PrivateDualStackApi2CCFC682"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":"*"},{"addToLogicalId":[{}]}]}},"DeploymentStage.prod":{"id":"DeploymentStage.prod","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/DeploymentStage.prod","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/DeploymentStage.prod/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"deploymentId":{"Ref":"PrivateDualStackApiDeploymentB8DAB5721935cdcd96f76b2b894fbe54157fe042"},"restApiId":{"Ref":"PrivateDualStackApi2CCFC682"},"stageName":"prod"}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*"}]}},"Endpoint":{"id":"Endpoint","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"Default":{"id":"Default","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Default","children":{"GET":{"id":"GET","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Default/GET","children":{"Resource":{"id":"Resource","path":"restapi-ip-address-type-test-stack/PrivateDualStackApi/Default/GET/Resource","attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Fn::GetAtt":["PrivateDualStackApi2CCFC682","RootResourceId"]},"restApiId":{"Ref":"PrivateDualStackApi2CCFC682"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]}}},"constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.RestApi","version":"0.0.0","metadata":[{"endpointConfiguration":{"types":["*"]}},{"addToResourcePolicy":[{}]},{"addToResourcePolicy":[{}]}]}},"BootstrapVersion":{"id":"BootstrapVersion","path":"restapi-ip-address-type-test-stack/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"restapi-ip-address-type-test-stack/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"}},"restapi-ip-address-type-test-integ":{"id":"restapi-ip-address-type-test-integ","path":"restapi-ip-address-type-test-integ","children":{"DefaultTest":{"id":"DefaultTest","path":"restapi-ip-address-type-test-integ/DefaultTest","children":{"Default":{"id":"Default","path":"restapi-ip-address-type-test-integ/DefaultTest/Default","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}},"DeployAssert":{"id":"DeployAssert","path":"restapi-ip-address-type-test-integ/DefaultTest/DeployAssert","children":{"BootstrapVersion":{"id":"BootstrapVersion","path":"restapi-ip-address-type-test-integ/DefaultTest/DeployAssert/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"restapi-ip-address-type-test-integ/DefaultTest/DeployAssert/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}},"constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"}}},"constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTestCase","version":"0.0.0"}}},"constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTest","version":"0.0.0"}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}}},"constructInfo":{"fqn":"aws-cdk-lib.App","version":"0.0.0"}}} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.ts new file mode 100644 index 0000000000000..9d8ee3067e7b1 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.restapi-ip-address-type.ts @@ -0,0 +1,62 @@ +import * as cdk from 'aws-cdk-lib'; +import { IntegTest } from '@aws-cdk/integ-tests-alpha'; +import * as apigateway from 'aws-cdk-lib/aws-apigateway'; +import * as ec2 from 'aws-cdk-lib/aws-ec2'; + +const app = new cdk.App(); + +const stack = new cdk.Stack(app, 'restapi-ip-address-type-test-stack'); + +const vpc = new ec2.Vpc(stack, 'Vpc', { + restrictDefaultSecurityGroup: false, + natGateways: 0, +}); +const vpcEndpoint = vpc.addInterfaceEndpoint('VpcEndpoint', { + service: ec2.InterfaceVpcEndpointAwsService.APIGATEWAY, + privateDnsEnabled: true, +}); + +const edgeIpv4Api = new apigateway.RestApi(stack, 'EdgeIpv4Api', { + endpointConfiguration: { + types: [apigateway.EndpointType.EDGE], + ipAddressType: apigateway.IpAddressType.IPV4, + }, +}); +edgeIpv4Api.root.addMethod('GET'); + +const edgeDualStackApi = new apigateway.RestApi(stack, 'EdgeDualStackApi', { + endpointConfiguration: { + types: [apigateway.EndpointType.EDGE], + ipAddressType: apigateway.IpAddressType.DUAL_STACK, + }, +}); +edgeDualStackApi.root.addMethod('GET'); + +const regionalIpv4Api = new apigateway.RestApi(stack, 'RegionalIpv4Api', { + endpointConfiguration: { + types: [apigateway.EndpointType.REGIONAL], + ipAddressType: apigateway.IpAddressType.IPV4, + }, +}); +regionalIpv4Api.root.addMethod('GET'); + +const regionalDualStackApi = new apigateway.RestApi(stack, 'RegionalDualStackApi', { + endpointConfiguration: { + types: [apigateway.EndpointType.REGIONAL], + ipAddressType: apigateway.IpAddressType.DUAL_STACK, + }, +}); +regionalDualStackApi.root.addMethod('GET'); + +const privateDualstackApi = new apigateway.RestApi(stack, 'PrivateDualStackApi', { + endpointConfiguration: { + types: [apigateway.EndpointType.PRIVATE], + ipAddressType: apigateway.IpAddressType.DUAL_STACK, + }, +}); +privateDualstackApi.root.addMethod('GET'); +privateDualstackApi.grantInvokeFromVpcEndpointsOnly([vpcEndpoint]); + +new IntegTest(app, 'restapi-ip-address-type-test-integ', { + testCases: [stack], +}); diff --git a/packages/aws-cdk-lib/aws-apigateway/README.md b/packages/aws-cdk-lib/aws-apigateway/README.md index 62319d1b506e7..3f7d9452267a2 100644 --- a/packages/aws-cdk-lib/aws-apigateway/README.md +++ b/packages/aws-cdk-lib/aws-apigateway/README.md @@ -1476,6 +1476,20 @@ const api = new apigateway.RestApi(this, 'api', { }); ``` +You can also configure [endpoint IP address type](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-ip-address-type.html). +The default value is `IpAddressType.DUAL_STACK` for private API, and `IpAddressType.IPV4` for regional and edge-optimized API. + +```ts +const api = new apigateway.RestApi(this, 'api', { + endpointConfiguration: { + types: [ apigateway.EndpointType.REGIONAL ], + ipAddressType: apigateway.IpAddressType.DUAL_STACK, + } +}); +``` + +**Note**: If creating a private API, the `IPV4` IP address type is not supported. + You can also create an association between your Rest API and a VPC endpoint. By doing so, API Gateway will generate a new Route53 Alias DNS record which you can use to invoke your private APIs. More info can be found diff --git a/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts b/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts index 9b95a55fda37d..a28eec7c49b18 100644 --- a/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts +++ b/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts @@ -713,7 +713,14 @@ export abstract class RestApiBase extends Resource implements IRestApi, iam.IRes throw new ValidationError('Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed', this); } if (props.endpointConfiguration) { + const endpointConfiguration = props.endpointConfiguration; + const isPrivateApi = endpointConfiguration.types.includes(EndpointType.PRIVATE); + const isIpv4Only = endpointConfiguration.ipAddressType === IpAddressType.IPV4; + if (isPrivateApi && isIpv4Only) { + throw new ValidationError('Private APIs can only have a dualstack IP address type.', this); + } return { + ipAddressType: props.endpointConfiguration.ipAddressType, types: props.endpointConfiguration.types, vpcEndpointIds: props.endpointConfiguration?.vpcEndpoints?.map(vpcEndpoint => vpcEndpoint.vpcEndpointId), }; @@ -1062,6 +1069,30 @@ export interface EndpointConfiguration { * @default - no ALIASes are created for the endpoint. */ readonly vpcEndpoints?: ec2.IVpcEndpoint[]; + + /** + * The IP address types that can invoke the API. + * + * @see https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-ip-address-type.html + * + * @default undefined - AWS default is DUAL_STACK for private API, IPV4 for all other APIs. + */ + readonly ipAddressType?: IpAddressType; +} + +/** + * Supported IP Address Types + */ +export enum IpAddressType { + /** + * IPv4 address type + */ + IPV4 = 'ipv4', + + /** + * IPv4 and IPv6 address type + */ + DUAL_STACK = 'dualstack', } export enum ApiKeySourceType { diff --git a/packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts b/packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts index cebd1e35e79c6..c6a13ca55f151 100644 --- a/packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts +++ b/packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts @@ -541,6 +541,39 @@ describe('restapi', () => { })).toThrow(/Only one of the RestApi props, endpointTypes or endpointConfiguration, is allowed/); }); + test.each([ + apigw.IpAddressType.IPV4, + apigw.IpAddressType.DUAL_STACK, + ])('configure ip address type', (ipAddressType) => { + // WHEN + const api = new apigw.RestApi(stack, 'api', { + endpointConfiguration: { + types: [apigw.EndpointType.EDGE], + ipAddressType, + }, + }); + + api.root.addMethod('GET'); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ApiGateway::RestApi', { + EndpointConfiguration: { + Types: ['EDGE'], + IpAddressType: ipAddressType, + }, + }); + }); + + test('throw error for configuring IPv4 for private endpoint', () => { + // THEN + expect(() => new apigw.RestApi(stack, 'api', { + endpointConfiguration: { + types: [apigw.EndpointType.PRIVATE], + ipAddressType: apigw.IpAddressType.IPV4, + }, + })).toThrow('Private APIs can only have a dualstack IP address type.'); + }); + test('"cloneFrom" can be used to clone an existing API', () => { const cloneFrom = apigw.RestApi.fromRestApiId(stack, 'RestApi', 'foobar');