Interface CfnApiProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnApiProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:46.785Z")
@Stability(Stable)
public interface CfnApiProps
extends software.amazon.jsii.JsiiSerializable
Properties for defining a
CfnApi.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sam.*;
Object authorizers;
Object definitionBody;
Object gatewayResponses;
Object methodSettings;
Object models;
CfnApiProps cfnApiProps = CfnApiProps.builder()
.stageName("stageName")
// the properties below are optional
.accessLogSetting(AccessLogSettingProperty.builder()
.destinationArn("destinationArn")
.format("format")
.build())
.alwaysDeploy(false)
.auth(AuthProperty.builder()
.addDefaultAuthorizerToCorsPreflight(false)
.authorizers(authorizers)
.defaultAuthorizer("defaultAuthorizer")
.build())
.binaryMediaTypes(List.of("binaryMediaTypes"))
.cacheClusterEnabled(false)
.cacheClusterSize("cacheClusterSize")
.canarySetting(CanarySettingProperty.builder()
.deploymentId("deploymentId")
.percentTraffic(123)
.stageVariableOverrides(Map.of(
"stageVariableOverridesKey", "stageVariableOverrides"))
.useStageCache(false)
.build())
.cors("cors")
.definitionBody(definitionBody)
.definitionUri("definitionUri")
.description("description")
.disableExecuteApiEndpoint(false)
.domain(DomainConfigurationProperty.builder()
.certificateArn("certificateArn")
.domainName("domainName")
// the properties below are optional
.basePath(List.of("basePath"))
.endpointConfiguration("endpointConfiguration")
.mutualTlsAuthentication(MutualTlsAuthenticationProperty.builder()
.truststoreUri("truststoreUri")
.truststoreVersion("truststoreVersion")
.build())
.ownershipVerificationCertificateArn("ownershipVerificationCertificateArn")
.route53(Route53ConfigurationProperty.builder()
.distributedDomainName("distributedDomainName")
.evaluateTargetHealth(false)
.hostedZoneId("hostedZoneId")
.hostedZoneName("hostedZoneName")
.ipV6(false)
.build())
.securityPolicy("securityPolicy")
.build())
.endpointConfiguration("endpointConfiguration")
.gatewayResponses(gatewayResponses)
.methodSettings(List.of(methodSettings))
.minimumCompressionSize(123)
.models(models)
.name("name")
.openApiVersion("openApiVersion")
.tags(Map.of(
"tagsKey", "tags"))
.tracingEnabled(false)
.variables(Map.of(
"variablesKey", "variables"))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnApiPropsstatic final classAn implementation forCfnApiProps -
Method Summary
Modifier and TypeMethodDescriptionstatic CfnApiProps.Builderbuilder()default ObjectReturns union: eitherIResolvableorCfnApi.AccessLogSettingPropertydefault ObjectReturns union: eitherBooleanorIResolvabledefault ObjectgetAuth()Returns union: eitherIResolvableorCfnApi.AuthPropertydefault ObjectReturns union: eitherBooleanorIResolvabledefault Stringdefault ObjectReturns union: eitherIResolvableorCfnApi.CanarySettingPropertydefault ObjectgetCors()default Objectdefault Objectdefault Stringdefault ObjectReturns union: eitherBooleanorIResolvabledefault ObjectReturns union: eitherIResolvableorCfnApi.DomainConfigurationPropertydefault Objectdefault Objectdefault Objectdefault Numberdefault Objectdefault StringgetName()default StringgetTags()default ObjectReturns union: eitherBooleanorIResolvabledefault ObjectMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getStageName
- See Also:
-
getAccessLogSetting
Returns union: eitherIResolvableorCfnApi.AccessLogSettingProperty- See Also:
-
getAlwaysDeploy
Returns union: eitherBooleanorIResolvable- See Also:
-
getAuth
Returns union: eitherIResolvableorCfnApi.AuthProperty- See Also:
-
getBinaryMediaTypes
- See Also:
-
getCacheClusterEnabled
Returns union: eitherBooleanorIResolvable- See Also:
-
getCacheClusterSize
- See Also:
-
getCanarySetting
Returns union: eitherIResolvableorCfnApi.CanarySettingProperty- See Also:
-
getCors
- See Also:
-
getDefinitionBody
- See Also:
-
getDefinitionUri
- See Also:
-
getDescription
- See Also:
-
getDisableExecuteApiEndpoint
Returns union: eitherBooleanorIResolvable- See Also:
-
getDomain
Returns union: eitherIResolvableorCfnApi.DomainConfigurationProperty- See Also:
-
getEndpointConfiguration
- See Also:
-
getGatewayResponses
- See Also:
-
getMethodSettings
- See Also:
-
getMinimumCompressionSize
- See Also:
-
getModels
- See Also:
-
getName
- See Also:
-
getOpenApiVersion
- See Also:
-
getTags
- See Also:
-
getTracingEnabled
Returns union: eitherBooleanorIResolvable- See Also:
-
getVariables
- See Also:
-
builder
- Returns:
- a
CfnApiProps.BuilderofCfnApiProps
-