The default ApiKey and the corresponding Usage Plan is created unless the
deployment is intentionally disabled by setting the deploy property to false.
The default method options is set with ApiKey required at the root of the
RestApi so that an ApiKey (could be a different one setup by the user) is
required for all method invocations, unless specifically overridden by the
user using additional method options for child methods. CcRestapi does allow
the user to make ApiKey not required by default if the user set the
ApiKeyRequired property to false intentionally in the root defaultMethodOptions
when creating the CcRestapi construct instance. In this case, the default
ApiKey and Usage Plan would still be created but the ApiKey would not be
required. To completely disable the creation of the default ApiKey and Usage
Plan, set the flag ccDoNotCreateDefaultApiKey to true when creating the
CcRestapi construct instance.
The default deployment stage of CcRestapi enables access logs using the
destination of a specific CloudWatch LogGroup based on the name
DefaultRestApiAccessLogGroup. The log entry format is the CDK default
Common Log Format.
To use a custom access log destination or use a custom log entry format,
simply configured the accessLogDestination property or the accessLogFormat
property in the deployOptions.
To turn off access log completely, though, the user has to set the property
ccDoNotEnableDefaultAccessLog to true. This property tells the CcRestapi
construct to not enable the default access log at the default access log
destination, but the user can still configure a custom access log destination
if this property is set to true. If the user sets this property to true, and
does not configure a custom access log destination, but configures an access
log format, then an error will be thrown, same to the CDK RestApi under
similar circumstances.
CloudKitect API Gateway Component
Default Configuration
Endpoint: Regional API Key: Required Tracing: Enabled Protocol Version: SecurityPolicyProtocol.TLS_V1_2_2021
Default ApiKey and Usage Plan
The default ApiKey and the corresponding Usage Plan is created unless the deployment is intentionally disabled by setting the deploy property to false. The default method options is set with ApiKey required at the root of the RestApi so that an ApiKey (could be a different one setup by the user) is required for all method invocations, unless specifically overridden by the user using additional method options for child methods. CcRestapi does allow the user to make ApiKey not required by default if the user set the ApiKeyRequired property to false intentionally in the root defaultMethodOptions when creating the CcRestapi construct instance. In this case, the default ApiKey and Usage Plan would still be created but the ApiKey would not be required. To completely disable the creation of the default ApiKey and Usage Plan, set the flag ccDoNotCreateDefaultApiKey to true when creating the CcRestapi construct instance.
Access Logs
The default deployment stage of CcRestapi enables access logs using the destination of a specific CloudWatch LogGroup based on the name DefaultRestApiAccessLogGroup. The log entry format is the CDK default Common Log Format.
To use a custom access log destination or use a custom log entry format, simply configured the accessLogDestination property or the accessLogFormat property in the deployOptions.
To turn off access log completely, though, the user has to set the property ccDoNotEnableDefaultAccessLog to true. This property tells the CcRestapi construct to not enable the default access log at the default access log destination, but the user can still configure a custom access log destination if this property is set to true. If the user sets this property to true, and does not configure a custom access log destination, but configures an access log format, then an error will be thrown, same to the CDK RestApi under similar circumstances.
Default Alarms
Examples
Default Usage
Custom Configuration
Compliance
It addresses the following compliance requirements