diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/apigatewayspecrestapiDefaultTestDeployAssertD16AA485.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/apigatewayspecrestapiDefaultTestDeployAssertD16AA485.assets.json index 29f325cf1bbf7..ff35a548f709e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/apigatewayspecrestapiDefaultTestDeployAssertD16AA485.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/apigatewayspecrestapiDefaultTestDeployAssertD16AA485.assets.json @@ -1,5 +1,5 @@ { - "version": "44.0.0", + "version": "48.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "displayName": "apigatewayspecrestapiDefaultTestDeployAssertD16AA485 Template", @@ -8,7 +8,7 @@ "packaging": "file" }, "destinations": { - "current_account-current_region": { + "current_account-current_region-d8d86b35": { "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}" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/cdk.out index b3a26d44a5f73..523a9aac37cbf 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"44.0.0"} \ No newline at end of file +{"version":"48.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/integ.json index b14a2e32aae84..dc7025a2b8bd7 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "44.0.0", + "version": "48.0.0", "testCases": { "apigateway-spec-restapi/DefaultTest": { "stacks": [ @@ -9,5 +9,5 @@ "assertionStackName": "apigatewayspecrestapiDefaultTestDeployAssertD16AA485" } }, - "minimumCliVersion": "2.1018.0" + "minimumCliVersion": "2.1027.0" } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/manifest.json index 08c2d87f9b5d2..c4fc5473e00d9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "44.0.0", + "version": "48.0.0", "artifacts": { "test-apigateway-spec-restapi.assets": { "type": "cdk:asset-manifest", @@ -18,7 +18,7 @@ "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}/e91a55b212d6c61a7de6cee809a2dc05eefd57c6a49e4314283cd42db2a26b90.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f02e9077cb2b4edf5636431cb6f8a000ee6f12dc2b4db3ba6ec25573a057ada2.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -402,7 +402,7 @@ "/test-apigateway-spec-restapi/my-api/Deployment/Resource": [ { "type": "aws:cdk:logicalId", - "data": "myapiDeployment92F2CB491b0e40e722acabc99cc39958c957686d" + "data": "myapiDeployment92F2CB49a6f2b34c48304b5ea39e505074a5a8ee" } ], "/test-apigateway-spec-restapi/my-api/DeploymentStage.beta": [ @@ -549,6 +549,15 @@ "type": "aws:cdk:logicalId", "data": "CheckBootstrapVersion" } + ], + "myapiDeployment92F2CB491b0e40e722acabc99cc39958c957686d": [ + { + "type": "aws:cdk:logicalId", + "data": "myapiDeployment92F2CB491b0e40e722acabc99cc39958c957686d", + "trace": [ + "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" + ] + } ] }, "displayName": "test-apigateway-spec-restapi" @@ -606,7 +615,485 @@ "properties": { "file": "tree.json" } + }, + "aws-cdk-lib/feature-flag-report": { + "type": "cdk:feature-flag-report", + "properties": { + "module": "aws-cdk-lib", + "flags": { + "@aws-cdk/aws-signer:signingProfileNamePassedToCfn": { + "recommendedValue": true, + "explanation": "Pass signingProfileName to CfnSigningProfile" + }, + "@aws-cdk/core:newStyleStackSynthesis": { + "recommendedValue": true, + "explanation": "Switch to new stack synthesis method which enables CI/CD", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/core:stackRelativeExports": { + "recommendedValue": true, + "explanation": "Name exports based on the construct paths relative to the stack, rather than the global construct path", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-ecs-patterns:secGroupsDisablesImplicitOpenListener": { + "recommendedValue": true, + "explanation": "Disable implicit openListener when custom security groups are provided" + }, + "@aws-cdk/aws-rds:lowercaseDbIdentifier": { + "recommendedValue": true, + "explanation": "Force lowercasing of RDS Cluster names in CDK", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": { + "recommendedValue": true, + "explanation": "Allow adding/removing multiple UsagePlanKeys independently", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-lambda:recognizeVersionProps": { + "recommendedValue": true, + "explanation": "Enable this feature flag to opt in to the updated logical id calculation for Lambda Version created using the `fn.currentVersion`.", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-lambda:recognizeLayerVersion": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable this feature flag to opt in to the updated logical id calculation for Lambda Version created using the `fn.currentVersion`." + }, + "@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": { + "recommendedValue": true, + "explanation": "Enable this feature flag to have cloudfront distributions use the security policy TLSv1.2_2021 by default.", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/core:checkSecretUsage": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable this flag to make it impossible to accidentally use SecretValues in unsafe locations" + }, + "@aws-cdk/core:target-partitions": { + "recommendedValue": [ + "aws", + "aws-cn" + ], + "explanation": "What regions to include in lookup tables of environment agnostic stacks" + }, + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": { + "userValue": true, + "recommendedValue": true, + "explanation": "ECS extensions will automatically add an `awslogs` driver if no logging is specified" + }, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable this feature flag to have Launch Templates generated by the `InstanceRequireImdsv2Aspect` use unique names." + }, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": { + "userValue": true, + "recommendedValue": true, + "explanation": "ARN format used by ECS. In the new ARN format, the cluster name is part of the resource ID." + }, + "@aws-cdk/aws-iam:minimizePolicies": { + "userValue": true, + "recommendedValue": true, + "explanation": "Minimize IAM policies by combining Statements" + }, + "@aws-cdk/core:validateSnapshotRemovalPolicy": { + "userValue": true, + "recommendedValue": true, + "explanation": "Error on snapshot removal policies on resources that do not support it." + }, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": { + "userValue": true, + "recommendedValue": true, + "explanation": "Generate key aliases that include the stack name" + }, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable this feature flag to create an S3 bucket policy by default in cases where an AWS service would automatically create the Policy if one does not exist." + }, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": { + "userValue": true, + "recommendedValue": true, + "explanation": "Restrict KMS key policy for encrypted Queues a bit more" + }, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": { + "userValue": true, + "recommendedValue": true, + "explanation": "Make default CloudWatch Role behavior safe for multiple API Gateways in one environment" + }, + "@aws-cdk/core:enablePartitionLiterals": { + "userValue": true, + "recommendedValue": true, + "explanation": "Make ARNs concrete if AWS partition is known" + }, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": { + "userValue": true, + "recommendedValue": true, + "explanation": "Event Rules may only push to encrypted SQS queues in the same account" + }, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": { + "userValue": true, + "recommendedValue": true, + "explanation": "Avoid setting the \"ECS\" deployment controller when adding a circuit breaker" + }, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable this feature to by default create default policy names for imported roles that depend on the stack the role is in." + }, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": { + "userValue": true, + "recommendedValue": true, + "explanation": "Use S3 Bucket Policy instead of ACLs for Server Access Logging" + }, + "@aws-cdk/aws-route53-patters:useCertificate": { + "userValue": true, + "recommendedValue": true, + "explanation": "Use the official `Certificate` resource instead of `DnsValidatedCertificate`" + }, + "@aws-cdk/customresources:installLatestAwsSdkDefault": { + "userValue": false, + "recommendedValue": false, + "explanation": "Whether to install the latest SDK by default in AwsCustomResource" + }, + "@aws-cdk/aws-rds:databaseProxyUniqueResourceName": { + "userValue": true, + "recommendedValue": true, + "explanation": "Use unique resource name for Database Proxy" + }, + "@aws-cdk/aws-codedeploy:removeAlarmsFromDeploymentGroup": { + "userValue": true, + "recommendedValue": true, + "explanation": "Remove CloudWatch alarms from deployment group" + }, + "@aws-cdk/aws-apigateway:authorizerChangeDeploymentLogicalId": { + "userValue": true, + "recommendedValue": true, + "explanation": "Include authorizer configuration in the calculation of the API deployment logical ID." + }, + "@aws-cdk/aws-ec2:launchTemplateDefaultUserData": { + "userValue": true, + "recommendedValue": true, + "explanation": "Define user data for a launch template by default when a machine image is provided." + }, + "@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments": { + "userValue": true, + "recommendedValue": true, + "explanation": "SecretTargetAttachments uses the ResourcePolicy of the attached Secret." + }, + "@aws-cdk/aws-redshift:columnId": { + "userValue": true, + "recommendedValue": true, + "explanation": "Whether to use an ID to track Redshift column changes" + }, + "@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable AmazonEMRServicePolicy_v2 managed policies" + }, + "@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": { + "userValue": true, + "recommendedValue": true, + "explanation": "Restrict access to the VPC default security group" + }, + "@aws-cdk/aws-apigateway:requestValidatorUniqueId": { + "userValue": true, + "recommendedValue": true, + "explanation": "Generate a unique id for each RequestValidator added to a method" + }, + "@aws-cdk/aws-kms:aliasNameRef": { + "userValue": true, + "recommendedValue": true, + "explanation": "KMS Alias name and keyArn will have implicit reference to KMS Key" + }, + "@aws-cdk/aws-kms:applyImportedAliasPermissionsToPrincipal": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enable grant methods on Aliases imported by name to use kms:ResourceAliases condition" + }, + "@aws-cdk/aws-autoscaling:generateLaunchTemplateInsteadOfLaunchConfig": { + "userValue": true, + "recommendedValue": true, + "explanation": "Generate a launch template when creating an AutoScalingGroup" + }, + "@aws-cdk/core:includePrefixInUniqueNameGeneration": { + "userValue": true, + "recommendedValue": true, + "explanation": "Include the stack prefix in the stack name generation process" + }, + "@aws-cdk/aws-efs:denyAnonymousAccess": { + "userValue": true, + "recommendedValue": true, + "explanation": "EFS denies anonymous clients accesses" + }, + "@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enables support for Multi-AZ with Standby deployment for opensearch domains" + }, + "@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enables aws-lambda-nodejs.Function to use the latest available NodeJs runtime as the default" + }, + "@aws-cdk/aws-efs:mountTargetOrderInsensitiveLogicalId": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, mount targets will have a stable logicalId that is linked to the associated subnet." + }, + "@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, a scope of InstanceParameterGroup for AuroraClusterInstance with each parameters will change." + }, + "@aws-cdk/aws-appsync:useArnForSourceApiAssociationIdentifier": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, will always use the arn for identifiers for CfnSourceApiAssociation in the GraphqlApi construct rather than id." + }, + "@aws-cdk/aws-rds:preventRenderingDeprecatedCredentials": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, creating an RDS database cluster from a snapshot will only render credentials for snapshot credentials." + }, + "@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the CodeCommit source action is using the default branch name 'main'." + }, + "@aws-cdk/aws-cloudwatch-actions:changeLambdaPermissionLogicalIdForLambdaAction": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the logical ID of a Lambda permission for a Lambda action includes an alarm ID." + }, + "@aws-cdk/aws-codepipeline:crossAccountKeysDefaultValueToFalse": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enables Pipeline to set the default value for crossAccountKeys to false." + }, + "@aws-cdk/aws-codepipeline:defaultPipelineTypeToV2": { + "userValue": true, + "recommendedValue": true, + "explanation": "Enables Pipeline to set the default pipeline type to V2." + }, + "@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, IAM Policy created from KMS key grant will reduce the resource scope to this key only." + }, + "@aws-cdk/pipelines:reduceAssetRoleTrustScope": { + "recommendedValue": true, + "explanation": "Remove the root account principal from PipelineAssetsFileRole trust policy", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-eks:nodegroupNameAttribute": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, nodegroupName attribute of the provisioned EKS NodeGroup will not have the cluster name prefix." + }, + "@aws-cdk/aws-ec2:ebsDefaultGp3Volume": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the default volume type of the EBS volume will be GP3" + }, + "@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, remove default deployment alarm settings" + }, + "@aws-cdk/custom-resources:logApiResponseDataPropertyTrueDefault": { + "userValue": false, + "recommendedValue": false, + "explanation": "When enabled, the custom resource used for `AwsCustomResource` will configure the `logApiResponseData` property as true by default" + }, + "@aws-cdk/aws-s3:keepNotificationInImportedBucket": { + "userValue": false, + "recommendedValue": false, + "explanation": "When enabled, Adding notifications to a bucket in the current stack will not remove notification from imported stack." + }, + "@aws-cdk/aws-stepfunctions-tasks:useNewS3UriParametersForBedrockInvokeModelTask": { + "recommendedValue": true, + "explanation": "When enabled, use new props for S3 URI field in task definition of state machine for bedrock invoke model.", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/core:explicitStackTags": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, stack tags need to be assigned explicitly on a Stack." + }, + "@aws-cdk/aws-ecs:enableImdsBlockingDeprecatedFeature": { + "userValue": false, + "recommendedValue": false, + "explanation": "When set to true along with canContainersAccessInstanceRole=false in ECS cluster, new updated commands will be added to UserData to block container accessing IMDS. **Applicable to Linux only. IMPORTANT: See [details.](#aws-cdkaws-ecsenableImdsBlockingDeprecatedFeature)**" + }, + "@aws-cdk/aws-ecs:disableEcsImdsBlocking": { + "userValue": true, + "recommendedValue": true, + "explanation": "When set to true, CDK synth will throw exception if canContainersAccessInstanceRole is false. **IMPORTANT: See [details.](#aws-cdkaws-ecsdisableEcsImdsBlocking)**" + }, + "@aws-cdk/aws-ecs:reduceEc2FargateCloudWatchPermissions": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, we will only grant the necessary permissions when users specify cloudwatch log group through logConfiguration" + }, + "@aws-cdk/aws-dynamodb:resourcePolicyPerReplica": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled will allow you to specify a resource policy per replica, and not copy the source table policy to all replicas" + }, + "@aws-cdk/aws-ec2:ec2SumTImeoutEnabled": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, initOptions.timeout and resourceSignalTimeout values will be summed together." + }, + "@aws-cdk/aws-appsync:appSyncGraphQLAPIScopeLambdaPermission": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, a Lambda authorizer Permission created when using GraphqlApi will be properly scoped with a SourceArn." + }, + "@aws-cdk/aws-rds:setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the value of property `instanceResourceId` in construct `DatabaseInstanceReadReplica` will be set to the correct value which is `DbiResourceId` instead of currently `DbInstanceArn`" + }, + "@aws-cdk/core:cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, CFN templates added with `cfn-include` will error if the template contains Resource Update or Create policies with CFN Intrinsics that include non-primitive values." + }, + "@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, both `@aws-sdk` and `@smithy` packages will be excluded from the Lambda Node.js 18.x runtime to prevent version mismatches in bundled applications." + }, + "@aws-cdk/aws-stepfunctions-tasks:fixRunEcsTaskPolicy": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the resource of IAM Run Ecs policy generated by SFN EcsRunTask will reference the definition, instead of constructing ARN." + }, + "@aws-cdk/aws-ec2:bastionHostUseAmazonLinux2023ByDefault": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the BastionHost construct will use the latest Amazon Linux 2023 AMI, instead of Amazon Linux 2." + }, + "@aws-cdk/core:aspectStabilization": { + "recommendedValue": true, + "explanation": "When enabled, a stabilization loop will be run when invoking Aspects during synthesis.", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, use a new method for DNS Name of user pool domain target without creating a custom resource." + }, + "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the default security group ingress rules will allow IPv6 ingress from anywhere" + }, + "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the default behaviour of OIDC provider will reject unauthorized connections" + }, + "@aws-cdk/core:enableAdditionalMetadataCollection": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, CDK will expand the scope of usage data collected to better inform CDK development and improve communication for security concerns and emerging issues." + }, + "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": { + "userValue": false, + "recommendedValue": false, + "explanation": "[Deprecated] When enabled, Lambda will create new inline policies with AddToRolePolicy instead of adding to the Default Policy Statement" + }, + "@aws-cdk/aws-s3:setUniqueReplicationRoleName": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, CDK will automatically generate a unique role name that is used for s3 object replication." + }, + "@aws-cdk/pipelines:reduceStageRoleTrustScope": { + "recommendedValue": true, + "explanation": "Remove the root account principal from Stage addActions trust policy", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-events:requireEventBusPolicySid": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, grantPutEventsTo() will use resource policies with Statement IDs for service principals." + }, + "@aws-cdk/core:aspectPrioritiesMutating": { + "userValue": true, + "recommendedValue": true, + "explanation": "When set to true, Aspects added by the construct library on your behalf will be given a priority of MUTATING." + }, + "@aws-cdk/aws-dynamodb:retainTableReplica": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, table replica will be default to the removal policy of source table unless specified otherwise." + }, + "@aws-cdk/cognito:logUserPoolClientSecretValue": { + "recommendedValue": false, + "explanation": "When disabled, the value of the user pool client secret will not be logged in the custom resource lambda function logs." + }, + "@aws-cdk/pipelines:reduceCrossAccountActionRoleTrustScope": { + "recommendedValue": true, + "explanation": "When enabled, scopes down the trust policy for the cross-account action role", + "unconfiguredBehavesLike": { + "v2": true + } + }, + "@aws-cdk/aws-stepfunctions:useDistributedMapResultWriterV2": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the resultWriterV2 property of DistributedMap will be used insted of resultWriter" + }, + "@aws-cdk/s3-notifications:addS3TrustKeyPolicyForSnsSubscriptions": { + "userValue": true, + "recommendedValue": true, + "explanation": "Add an S3 trust policy to a KMS key resource policy for SNS subscriptions." + }, + "@aws-cdk/aws-ec2:requirePrivateSubnetsForEgressOnlyInternetGateway": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, the EgressOnlyGateway resource is only created if private subnets are defined in the dual-stack VPC." + }, + "@aws-cdk/aws-ec2-alpha:useResourceIdForVpcV2Migration": { + "recommendedValue": false, + "explanation": "When enabled, use resource IDs for VPC V2 migration" + }, + "@aws-cdk/aws-s3:publicAccessBlockedByDefault": { + "userValue": true, + "recommendedValue": true, + "explanation": "When enabled, setting any combination of options for BlockPublicAccess will automatically set true for any options not defined." + }, + "@aws-cdk/aws-lambda:useCdkManagedLogGroup": { + "userValue": false, + "recommendedValue": true, + "explanation": "When enabled, CDK creates and manages loggroup for the lambda function" + } + } + } } }, - "minimumCliVersion": "2.1018.0" + "minimumCliVersion": "2.1027.0" } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.assets.json index c082053572c56..226711c3197d3 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.assets.json @@ -1,5 +1,5 @@ { - "version": "44.0.0", + "version": "48.0.0", "files": { "68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb": { "displayName": "my-api/APIDefinition", @@ -8,23 +8,23 @@ "packaging": "file" }, "destinations": { - "current_account-current_region": { + "current_account-current_region-30dbd999": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", "objectKey": "68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb.yaml", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } }, - "e91a55b212d6c61a7de6cee809a2dc05eefd57c6a49e4314283cd42db2a26b90": { + "f02e9077cb2b4edf5636431cb6f8a000ee6f12dc2b4db3ba6ec25573a057ada2": { "displayName": "test-apigateway-spec-restapi Template", "source": { "path": "test-apigateway-spec-restapi.template.json", "packaging": "file" }, "destinations": { - "current_account-current_region": { + "current_account-current_region-b2191f5e": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "e91a55b212d6c61a7de6cee809a2dc05eefd57c6a49e4314283cd42db2a26b90.json", + "objectKey": "f02e9077cb2b4edf5636431cb6f8a000ee6f12dc2b4db3ba6ec25573a057ada2.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.template.json index 920f1fb7a519e..cb86c65cf312d 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/test-apigateway-spec-restapi.template.json @@ -3,6 +3,10 @@ "myapi4C7BF186": { "Type": "AWS::ApiGateway::RestApi", "Properties": { + "BinaryMediaTypes": [ + "image/png", + "application/pdf" + ], "BodyS3Location": { "Bucket": { "Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" @@ -518,7 +522,7 @@ "UpdateReplacePolicy": "Retain", "DeletionPolicy": "Retain" }, - "myapiDeployment92F2CB491b0e40e722acabc99cc39958c957686d": { + "myapiDeployment92F2CB49a6f2b34c48304b5ea39e505074a5a8ee": { "Type": "AWS::ApiGateway::Deployment", "Properties": { "Description": "beta stage", @@ -550,7 +554,7 @@ "CacheClusterEnabled": true, "CacheClusterSize": "0.5", "DeploymentId": { - "Ref": "myapiDeployment92F2CB491b0e40e722acabc99cc39958c957686d" + "Ref": "myapiDeployment92F2CB49a6f2b34c48304b5ea39e505074a5a8ee" }, "Description": "beta stage", "MethodSettings": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/tree.json index 136467dcdefb1..7a0a6a5b1ea42 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.js.snapshot/tree.json @@ -1 +1 @@ -{"version":"tree-0.1","tree":{"id":"App","path":"","constructInfo":{"fqn":"aws-cdk-lib.App","version":"0.0.0"},"children":{"test-apigateway-spec-restapi":{"id":"test-apigateway-spec-restapi","path":"test-apigateway-spec-restapi","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"},"children":{"my-api":{"id":"my-api","path":"test-apigateway-spec-restapi/my-api","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.SpecRestApi","version":"0.0.0","metadata":[{"apiDefinition":"*","disableExecuteApiEndpoint":true,"minCompressionSize":"*","retainDeployments":true,"cloudWatchRole":true,"deployOptions":{"cacheClusterEnabled":true,"stageName":"*","description":"*","loggingLevel":"INFO","dataTraceEnabled":true,"methodOptions":"*"},"mode":"merge"}]},"children":{"APIDefinition":{"id":"APIDefinition","path":"test-apigateway-spec-restapi/my-api/APIDefinition","constructInfo":{"fqn":"aws-cdk-lib.aws_s3_assets.Asset","version":"0.0.0"},"children":{"Stage":{"id":"Stage","path":"test-apigateway-spec-restapi/my-api/APIDefinition/Stage","constructInfo":{"fqn":"aws-cdk-lib.AssetStaging","version":"0.0.0"}},"AssetBucket":{"id":"AssetBucket","path":"test-apigateway-spec-restapi/my-api/APIDefinition/AssetBucket","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.BucketBase","version":"0.0.0","metadata":[]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"bodyS3Location":{"bucket":{"Fn::Sub":"cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"},"key":"68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb.yaml"},"disableExecuteApiEndpoint":true,"minimumCompressionSize":1024,"mode":"merge","name":"my-api"}}},"Default":{"id":"Default","path":"test-apigateway-spec-restapi/my-api/Default","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]},"children":{"v1":{"id":"v1","path":"test-apigateway-spec-restapi/my-api/Default/v1","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Fn::GetAtt":["myapi4C7BF186","RootResourceId"]},"pathPart":"v1","restApiId":{"Ref":"myapi4C7BF186"}}}},"toys":{"id":"toys","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"myapiv113487378"},"pathPart":"toys","restApiId":{"Ref":"myapi4C7BF186"}}}},"GET":{"id":"GET","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":{"apiKeyRequired":true}}]},"children":{"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys":{"id":"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET/ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/",{"Ref":"myapiDeploymentStagebeta96434BEB"},"/GET/v1/toys"]]}}}},"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys":{"id":"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET/ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/test-invoke-stage/GET/v1/toys"]]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"apiKeyRequired":true,"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:",{"Ref":"AWS::Region"},":lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"myapiv1toysA55FCBC4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}},"POST":{"id":"POST","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/POST","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/POST/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"POST","integration":{"type":"MOCK"},"resourceId":{"Ref":"myapiv1toysA55FCBC4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}},"PUT":{"id":"PUT","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/PUT","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/PUT/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"PUT","integration":{"type":"MOCK"},"resourceId":{"Ref":"myapiv1toysA55FCBC4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}}}},"appliances":{"id":"appliances","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"myapiv113487378"},"pathPart":"appliances","restApiId":{"Ref":"myapi4C7BF186"}}}},"GET":{"id":"GET","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Ref":"myapiv1appliances507FEFF4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}}}},"books":{"id":"books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"myapiv113487378"},"pathPart":"books","restApiId":{"Ref":"myapi4C7BF186"}}}},"GET":{"id":"GET","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books":{"id":"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET/ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/",{"Ref":"myapiDeploymentStagebeta96434BEB"},"/GET/v1/books"]]}}}},"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books":{"id":"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET/ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/test-invoke-stage/GET/v1/books"]]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:",{"Ref":"AWS::Region"},":lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"myapiv1books1D4BE6C1"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}},"POST":{"id":"POST","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books":{"id":"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST/ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/",{"Ref":"myapiDeploymentStagebeta96434BEB"},"/POST/v1/books"]]}}}},"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books":{"id":"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST/ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/test-invoke-stage/POST/v1/books"]]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"POST","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:",{"Ref":"AWS::Region"},":lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"myapiv1books1D4BE6C1"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}}}}}}}},"CloudWatchRole":{"id":"CloudWatchRole","path":"test-apigateway-spec-restapi/my-api/CloudWatchRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"0.0.0","metadata":[{"assumedBy":{"principalAccount":"*","assumeRoleAction":"*"},"managedPolicies":[{"managedPolicyArn":"*"}]},{"applyRemovalPolicy":["retain"]}]},"children":{"ImportCloudWatchRole":{"id":"ImportCloudWatchRole","path":"test-apigateway-spec-restapi/my-api/CloudWatchRole/ImportCloudWatchRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":["*"]}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/CloudWatchRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"}}],"Version":"2012-10-17"},"managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"]]}]}}}}},"Account":{"id":"Account","path":"test-apigateway-spec-restapi/my-api/Account","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnAccount","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Account","aws:cdk:cloudformation:props":{"cloudWatchRoleArn":{"Fn::GetAtt":["myapiCloudWatchRole095452E5","Arn"]}}}},"Deployment":{"id":"Deployment","path":"test-apigateway-spec-restapi/my-api/Deployment","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":true},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Deployment/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"beta stage","restApiId":{"Ref":"myapi4C7BF186"}}}}}},"DeploymentStage.beta":{"id":"DeploymentStage.beta","path":"test-apigateway-spec-restapi/my-api/DeploymentStage.beta","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*","cacheClusterEnabled":true,"stageName":"*","description":"*","loggingLevel":"INFO","dataTraceEnabled":true,"methodOptions":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/DeploymentStage.beta/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"cacheClusterEnabled":true,"cacheClusterSize":"0.5","deploymentId":{"Ref":"myapiDeployment92F2CB491b0e40e722acabc99cc39958c957686d"},"description":"beta stage","methodSettings":[{"httpMethod":"*","resourcePath":"/*","dataTraceEnabled":true,"loggingLevel":"INFO"},{"httpMethod":"GET","resourcePath":"/~1api~1appliances","cachingEnabled":true,"dataTraceEnabled":false}],"restApiId":{"Ref":"myapi4C7BF186"},"stageName":"beta"}}}}},"Endpoint":{"id":"Endpoint","path":"test-apigateway-spec-restapi/my-api/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"ApiKey":{"id":"ApiKey","path":"test-apigateway-spec-restapi/my-api/ApiKey","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ApiKey","version":"0.0.0","metadata":[{"stages":["*"]}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/ApiKey/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnApiKey","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::ApiKey","aws:cdk:cloudformation:props":{"enabled":true,"stageKeys":[{"restApiId":{"Ref":"myapi4C7BF186"},"stageName":{"Ref":"myapiDeploymentStagebeta96434BEB"}}]}}}}},"UsagePlan":{"id":"UsagePlan","path":"test-apigateway-spec-restapi/my-api/UsagePlan","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.UsagePlan","version":"0.0.0","metadata":[{"name":"*","apiKey":"*","description":"*","throttle":{"rateLimit":"*"},"quota":{"limit":"*","period":"MONTH"}},{"addApiStage":[{"throttle":[{"method":"*","throttle":{"rateLimit":"*","burstLimit":"*"}}]}]}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/UsagePlan/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnUsagePlan","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::UsagePlan","aws:cdk:cloudformation:props":{"apiStages":[{"apiId":{"Ref":"myapi4C7BF186"},"stage":{"Ref":"myapiDeploymentStagebeta96434BEB"},"throttle":{"/v1/toys/GET":{"burstLimit":2,"rateLimit":10}}}],"description":"Free tier monthly usage plan","quota":{"limit":10000,"period":"MONTH"},"throttle":{"rateLimit":5},"usagePlanName":"Basic"}}},"UsagePlanKeyResource:testapigatewayspecrestapimyapiApiKey950FF760":{"id":"UsagePlanKeyResource:testapigatewayspecrestapimyapiApiKey950FF760","path":"test-apigateway-spec-restapi/my-api/UsagePlan/UsagePlanKeyResource:testapigatewayspecrestapimyapiApiKey950FF760","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnUsagePlanKey","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::UsagePlanKey","aws:cdk:cloudformation:props":{"keyId":{"Ref":"myapiApiKey43446CCF"},"keyType":"API_KEY","usagePlanId":{"Ref":"myapiUsagePlan56F9C4F2"}}}}}}}},"MyHandler":{"id":"MyHandler","path":"test-apigateway-spec-restapi/MyHandler","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.Function","version":"0.0.0","metadata":[{"runtime":"*","code":"*","handler":"*"}]},"children":{"ServiceRole":{"id":"ServiceRole","path":"test-apigateway-spec-restapi/MyHandler/ServiceRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"0.0.0","metadata":[{"assumedBy":{"principalAccount":"*","assumeRoleAction":"*"},"managedPolicies":[{"managedPolicyArn":"*"}]}]},"children":{"ImportServiceRole":{"id":"ImportServiceRole","path":"test-apigateway-spec-restapi/MyHandler/ServiceRole/ImportServiceRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":["*"]}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/MyHandler/ServiceRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}],"Version":"2012-10-17"},"managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"]]}]}}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/MyHandler/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnFunction","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Function","aws:cdk:cloudformation:props":{"code":{"zipFile":"exports.handler = function handlerCode(event, _, callback) {\n return callback(undefined, {\n isBase64Encoded: false,\n statusCode: 200,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(event),\n });\n }"},"handler":"index.handler","role":{"Fn::GetAtt":["MyHandlerServiceRoleFFA06653","Arn"]},"runtime":"nodejs18.x"}}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"test-apigateway-spec-restapi/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"test-apigateway-spec-restapi/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}}},"apigateway-spec-restapi":{"id":"apigateway-spec-restapi","path":"apigateway-spec-restapi","constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTest","version":"0.0.0"},"children":{"DefaultTest":{"id":"DefaultTest","path":"apigateway-spec-restapi/DefaultTest","constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTestCase","version":"0.0.0"},"children":{"Default":{"id":"Default","path":"apigateway-spec-restapi/DefaultTest/Default","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}},"DeployAssert":{"id":"DeployAssert","path":"apigateway-spec-restapi/DefaultTest/DeployAssert","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"},"children":{"BootstrapVersion":{"id":"BootstrapVersion","path":"apigateway-spec-restapi/DefaultTest/DeployAssert/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"apigateway-spec-restapi/DefaultTest/DeployAssert/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}}}}}}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}}}}} \ No newline at end of file +{"version":"tree-0.1","tree":{"id":"App","path":"","constructInfo":{"fqn":"aws-cdk-lib.App","version":"0.0.0"},"children":{"test-apigateway-spec-restapi":{"id":"test-apigateway-spec-restapi","path":"test-apigateway-spec-restapi","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"},"children":{"my-api":{"id":"my-api","path":"test-apigateway-spec-restapi/my-api","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.SpecRestApi","version":"0.0.0","metadata":[{"apiDefinition":"*","disableExecuteApiEndpoint":true,"minCompressionSize":"*","retainDeployments":true,"cloudWatchRole":true,"deployOptions":{"cacheClusterEnabled":true,"stageName":"*","description":"*","loggingLevel":"INFO","dataTraceEnabled":true,"methodOptions":"*"},"mode":"merge"}]},"children":{"APIDefinition":{"id":"APIDefinition","path":"test-apigateway-spec-restapi/my-api/APIDefinition","constructInfo":{"fqn":"aws-cdk-lib.aws_s3_assets.Asset","version":"0.0.0"},"children":{"Stage":{"id":"Stage","path":"test-apigateway-spec-restapi/my-api/APIDefinition/Stage","constructInfo":{"fqn":"aws-cdk-lib.AssetStaging","version":"0.0.0"}},"AssetBucket":{"id":"AssetBucket","path":"test-apigateway-spec-restapi/my-api/APIDefinition/AssetBucket","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.BucketBase","version":"0.0.0","metadata":[]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnRestApi","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::RestApi","aws:cdk:cloudformation:props":{"binaryMediaTypes":["image/png","application/pdf"],"bodyS3Location":{"bucket":{"Fn::Sub":"cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"},"key":"68497ac876de4e963fc8f7b5f1b28844c18ecc95e3f7c6e9e0bf250e03c037fb.yaml"},"disableExecuteApiEndpoint":true,"minimumCompressionSize":1024,"mode":"merge","name":"my-api"}}},"Default":{"id":"Default","path":"test-apigateway-spec-restapi/my-api/Default","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ResourceBase","version":"0.0.0","metadata":["*"]},"children":{"v1":{"id":"v1","path":"test-apigateway-spec-restapi/my-api/Default/v1","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Fn::GetAtt":["myapi4C7BF186","RootResourceId"]},"pathPart":"v1","restApiId":{"Ref":"myapi4C7BF186"}}}},"toys":{"id":"toys","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"myapiv113487378"},"pathPart":"toys","restApiId":{"Ref":"myapi4C7BF186"}}}},"GET":{"id":"GET","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":{"apiKeyRequired":true}}]},"children":{"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys":{"id":"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET/ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/",{"Ref":"myapiDeploymentStagebeta96434BEB"},"/GET/v1/toys"]]}}}},"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys":{"id":"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET/ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.toys","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/test-invoke-stage/GET/v1/toys"]]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"apiKeyRequired":true,"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:",{"Ref":"AWS::Region"},":lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"myapiv1toysA55FCBC4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}},"POST":{"id":"POST","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/POST","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/POST/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"POST","integration":{"type":"MOCK"},"resourceId":{"Ref":"myapiv1toysA55FCBC4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}},"PUT":{"id":"PUT","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/PUT","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/toys/PUT/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"PUT","integration":{"type":"MOCK"},"resourceId":{"Ref":"myapiv1toysA55FCBC4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}}}},"appliances":{"id":"appliances","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"myapiv113487378"},"pathPart":"appliances","restApiId":{"Ref":"myapi4C7BF186"}}}},"GET":{"id":"GET","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/appliances/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"MOCK"},"resourceId":{"Ref":"myapiv1appliances507FEFF4"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}}}},"books":{"id":"books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Resource","version":"0.0.0","metadata":[{"parent":"*","pathPart":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnResource","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Resource","aws:cdk:cloudformation:props":{"parentId":{"Ref":"myapiv113487378"},"pathPart":"books","restApiId":{"Ref":"myapi4C7BF186"}}}},"GET":{"id":"GET","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books":{"id":"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET/ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/",{"Ref":"myapiDeploymentStagebeta96434BEB"},"/GET/v1/books"]]}}}},"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books":{"id":"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET/ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.GET..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/test-invoke-stage/GET/v1/books"]]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/GET/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"GET","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:",{"Ref":"AWS::Region"},":lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"myapiv1books1D4BE6C1"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}},"POST":{"id":"POST","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Method","version":"0.0.0","metadata":[{"resource":"*","httpMethod":"*","integration":"*","options":"*"}]},"children":{"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books":{"id":"ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST/ApiPermission.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/",{"Ref":"myapiDeploymentStagebeta96434BEB"},"/POST/v1/books"]]}}}},"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books":{"id":"ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST/ApiPermission.Test.testapigatewayspecrestapimyapiA4A36FD7.POST..v1.books","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"principal":"apigateway.amazonaws.com","sourceArn":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":execute-api:",{"Ref":"AWS::Region"},":",{"Ref":"AWS::AccountId"},":",{"Ref":"myapi4C7BF186"},"/test-invoke-stage/POST/v1/books"]]}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Default/v1/books/POST/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnMethod","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Method","aws:cdk:cloudformation:props":{"authorizationType":"NONE","httpMethod":"POST","integration":{"type":"AWS_PROXY","uri":{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":apigateway:",{"Ref":"AWS::Region"},":lambda:path/2015-03-31/functions/",{"Fn::GetAtt":["MyHandler6B74D312","Arn"]},"/invocations"]]},"integrationHttpMethod":"POST"},"resourceId":{"Ref":"myapiv1books1D4BE6C1"},"restApiId":{"Ref":"myapi4C7BF186"}}}}}}}}}}}},"CloudWatchRole":{"id":"CloudWatchRole","path":"test-apigateway-spec-restapi/my-api/CloudWatchRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"0.0.0","metadata":[{"assumedBy":{"principalAccount":"*","assumeRoleAction":"*"},"managedPolicies":[{"managedPolicyArn":"*"}]},{"applyRemovalPolicy":["retain"]}]},"children":{"ImportCloudWatchRole":{"id":"ImportCloudWatchRole","path":"test-apigateway-spec-restapi/my-api/CloudWatchRole/ImportCloudWatchRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":["*"]}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/CloudWatchRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"apigateway.amazonaws.com"}}],"Version":"2012-10-17"},"managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/service-role/AmazonAPIGatewayPushToCloudWatchLogs"]]}]}}}}},"Account":{"id":"Account","path":"test-apigateway-spec-restapi/my-api/Account","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnAccount","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Account","aws:cdk:cloudformation:props":{"cloudWatchRoleArn":{"Fn::GetAtt":["myapiCloudWatchRole095452E5","Arn"]}}}},"Deployment":{"id":"Deployment","path":"test-apigateway-spec-restapi/my-api/Deployment","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Deployment","version":"0.0.0","metadata":[{"description":"*","api":"*","retainDeployments":true},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]},{"addToLogicalId":[{}]}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/Deployment/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnDeployment","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Deployment","aws:cdk:cloudformation:props":{"description":"beta stage","restApiId":{"Ref":"myapi4C7BF186"}}}}}},"DeploymentStage.beta":{"id":"DeploymentStage.beta","path":"test-apigateway-spec-restapi/my-api/DeploymentStage.beta","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.Stage","version":"0.0.0","metadata":[{"deployment":"*","cacheClusterEnabled":true,"stageName":"*","description":"*","loggingLevel":"INFO","dataTraceEnabled":true,"methodOptions":"*"}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/DeploymentStage.beta/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnStage","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::Stage","aws:cdk:cloudformation:props":{"cacheClusterEnabled":true,"cacheClusterSize":"0.5","deploymentId":{"Ref":"myapiDeployment92F2CB49a6f2b34c48304b5ea39e505074a5a8ee"},"description":"beta stage","methodSettings":[{"httpMethod":"*","resourcePath":"/*","dataTraceEnabled":true,"loggingLevel":"INFO"},{"httpMethod":"GET","resourcePath":"/~1api~1appliances","cachingEnabled":true,"dataTraceEnabled":false}],"restApiId":{"Ref":"myapi4C7BF186"},"stageName":"beta"}}}}},"Endpoint":{"id":"Endpoint","path":"test-apigateway-spec-restapi/my-api/Endpoint","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"0.0.0"}},"ApiKey":{"id":"ApiKey","path":"test-apigateway-spec-restapi/my-api/ApiKey","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.ApiKey","version":"0.0.0","metadata":[{"stages":["*"]}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/ApiKey/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnApiKey","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::ApiKey","aws:cdk:cloudformation:props":{"enabled":true,"stageKeys":[{"restApiId":{"Ref":"myapi4C7BF186"},"stageName":{"Ref":"myapiDeploymentStagebeta96434BEB"}}]}}}}},"UsagePlan":{"id":"UsagePlan","path":"test-apigateway-spec-restapi/my-api/UsagePlan","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.UsagePlan","version":"0.0.0","metadata":[{"name":"*","apiKey":"*","description":"*","throttle":{"rateLimit":"*"},"quota":{"limit":"*","period":"MONTH"}},{"addApiStage":[{"throttle":[{"method":"*","throttle":{"rateLimit":"*","burstLimit":"*"}}]}]}]},"children":{"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/my-api/UsagePlan/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnUsagePlan","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::UsagePlan","aws:cdk:cloudformation:props":{"apiStages":[{"apiId":{"Ref":"myapi4C7BF186"},"stage":{"Ref":"myapiDeploymentStagebeta96434BEB"},"throttle":{"/v1/toys/GET":{"burstLimit":2,"rateLimit":10}}}],"description":"Free tier monthly usage plan","quota":{"limit":10000,"period":"MONTH"},"throttle":{"rateLimit":5},"usagePlanName":"Basic"}}},"UsagePlanKeyResource:testapigatewayspecrestapimyapiApiKey950FF760":{"id":"UsagePlanKeyResource:testapigatewayspecrestapimyapiApiKey950FF760","path":"test-apigateway-spec-restapi/my-api/UsagePlan/UsagePlanKeyResource:testapigatewayspecrestapimyapiApiKey950FF760","constructInfo":{"fqn":"aws-cdk-lib.aws_apigateway.CfnUsagePlanKey","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::ApiGateway::UsagePlanKey","aws:cdk:cloudformation:props":{"keyId":{"Ref":"myapiApiKey43446CCF"},"keyType":"API_KEY","usagePlanId":{"Ref":"myapiUsagePlan56F9C4F2"}}}}}}}},"MyHandler":{"id":"MyHandler","path":"test-apigateway-spec-restapi/MyHandler","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.Function","version":"0.0.0","metadata":[{"runtime":"*","code":"*","handler":"*"}]},"children":{"ServiceRole":{"id":"ServiceRole","path":"test-apigateway-spec-restapi/MyHandler/ServiceRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"0.0.0","metadata":[{"assumedBy":{"principalAccount":"*","assumeRoleAction":"*"},"managedPolicies":[{"managedPolicyArn":"*"}]}]},"children":{"ImportServiceRole":{"id":"ImportServiceRole","path":"test-apigateway-spec-restapi/MyHandler/ServiceRole/ImportServiceRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"0.0.0","metadata":["*"]}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/MyHandler/ServiceRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}],"Version":"2012-10-17"},"managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"]]}]}}}}},"Resource":{"id":"Resource","path":"test-apigateway-spec-restapi/MyHandler/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnFunction","version":"0.0.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Function","aws:cdk:cloudformation:props":{"code":{"zipFile":"exports.handler = function handlerCode(event, _, callback) {\n return callback(undefined, {\n isBase64Encoded: false,\n statusCode: 200,\n headers: { 'content-type': 'application/json' },\n body: JSON.stringify(event),\n });\n }"},"handler":"index.handler","role":{"Fn::GetAtt":["MyHandlerServiceRoleFFA06653","Arn"]},"runtime":"nodejs18.x"}}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"test-apigateway-spec-restapi/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"test-apigateway-spec-restapi/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}}},"apigateway-spec-restapi":{"id":"apigateway-spec-restapi","path":"apigateway-spec-restapi","constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTest","version":"0.0.0"},"children":{"DefaultTest":{"id":"DefaultTest","path":"apigateway-spec-restapi/DefaultTest","constructInfo":{"fqn":"@aws-cdk/integ-tests-alpha.IntegTestCase","version":"0.0.0"},"children":{"Default":{"id":"Default","path":"apigateway-spec-restapi/DefaultTest/Default","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}},"DeployAssert":{"id":"DeployAssert","path":"apigateway-spec-restapi/DefaultTest/DeployAssert","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"0.0.0"},"children":{"BootstrapVersion":{"id":"BootstrapVersion","path":"apigateway-spec-restapi/DefaultTest/DeployAssert/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"0.0.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"apigateway-spec-restapi/DefaultTest/DeployAssert/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"0.0.0"}}}}}}}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.4.2"}}}}} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.ts index 6bb8957b429e5..f006bf64eef5e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigateway/test/integ.spec-restapi.ts @@ -14,6 +14,7 @@ class Test extends cdk.Stack { apiDefinition: apigateway.ApiDefinition.fromAsset(path.join(__dirname, 'sample-definition.yaml')), disableExecuteApiEndpoint: true, minCompressionSize: Size.bytes(1024), + binaryMediaTypes: ['image/png', 'application/pdf'], retainDeployments: true, cloudWatchRole: true, deployOptions: { diff --git a/packages/aws-cdk-lib/aws-apigateway/README.md b/packages/aws-cdk-lib/aws-apigateway/README.md index 3f7d9452267a2..6504117937c2a 100644 --- a/packages/aws-cdk-lib/aws-apigateway/README.md +++ b/packages/aws-cdk-lib/aws-apigateway/README.md @@ -1652,6 +1652,15 @@ const api = new apigateway.SpecRestApi(this, 'books-api', { }); ``` +`SpecRestApi` also supports binary media types, similar to `RestApi`: + +```ts +const api = new apigateway.SpecRestApi(this, 'books-api', { + apiDefinition: apigateway.ApiDefinition.fromAsset('path-to-file.json'), + binaryMediaTypes: ['image/png', 'application/pdf'] +}); +``` + ### Endpoint configuration By default, `SpecRestApi` will create an edge optimized endpoint. diff --git a/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts b/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts index 9d5d86fca66df..dc5b81ac96824 100644 --- a/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts +++ b/packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts @@ -300,6 +300,14 @@ export interface SpecRestApiProps extends RestApiBaseProps { */ readonly apiDefinition: ApiDefinition; + /** + * The list of binary media mime-types that are supported by the RestApi + * resource, such as "image/png" or "application/octet-stream" + * + * @default - RestApi supports only UTF-8-encoded text payloads. + */ + readonly binaryMediaTypes?: string[]; + /** * A Size(in bytes, kibibytes, mebibytes etc) that is used to enable compression (with non-negative * between 0 and 10485760 (10M) bytes, inclusive) or disable compression @@ -802,6 +810,7 @@ export class SpecRestApi extends RestApiBase { policy: Lazy.any({ produce: () => this.resourcePolicy }), failOnWarnings: props.failOnWarnings, minimumCompressionSize: props.minCompressionSize?.toBytes(), + binaryMediaTypes: props.binaryMediaTypes, body: apiDefConfig.inlineDefinition ?? undefined, bodyS3Location: apiDefConfig.inlineDefinition ? undefined : apiDefConfig.s3Location, endpointConfiguration: this._configureEndpoints(props), 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 aed8ba56b2cb3..c4b995457eeee 100644 --- a/packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts +++ b/packages/aws-cdk-lib/aws-apigateway/test/restapi.test.ts @@ -1168,6 +1168,30 @@ describe('SpecRestApi', () => { }); }); + test('SpecRestApi binaryMediaTypes', () => { + // GIVEN + const app = new App({ + context: { + '@aws-cdk/aws-apigateway:disableCloudWatchRole': true, + }, + }); + + stack = new Stack(app); + const api = new apigw.SpecRestApi(stack, 'SpecRestApi', { + apiDefinition: apigw.ApiDefinition.fromInline({ foo: 'bar' }), + binaryMediaTypes: ['image/png', 'application/octet-stream'], + }); + + // WHEN + api.root.addMethod('GET'); + + // THEN + Template.fromStack(stack).hasResourceProperties('AWS::ApiGateway::RestApi', { + Name: 'SpecRestApi', + BinaryMediaTypes: ['image/png', 'application/octet-stream'], + }); + }); + test('"endpointConfiguration" can be used to specify endpoint types for the api', () => { // WHEN const api = new apigw.SpecRestApi(stack, 'api', {