Closed gandlusn closed 4 years ago
ApiKey: Type: 'AWS::ApiGateway::ApiKey' DependsOn:
How can I replicate same thing in AWS CDK.
Thank you
Looks like we don't support this value in the CDK just yet. Marking this as a feature request.
Until then, you can use overrides to add this to the underlying cfn layer. This should work as a workaround here.
Turns out we already have an issue open for this - https://github.com/aws/aws-cdk/issues/3233. Resolving as duplicate.
I want to create API key with custom value for API gateway usage plan, but as of now I don't see a attribute to set value of the API[1], I am aware that CDK converts code into CF template, and Cloud Formation has Value attribute defined in it[2], then my question is is there a way to create custom-api key in API Gateway using CDK
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-apigateway/lib/api-key.ts
[1]. https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-apigateway/lib/api-key.ts [2]. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-apikey.html#cfn-apigateway-apikey-generatedistinctid