Class CfnApi
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.CfnElement
software.amazon.awscdk.core.CfnRefElement
software.amazon.awscdk.core.CfnResource
software.amazon.awscdk.services.sam.CfnApi
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:35.577Z")
@Stability(Stable)
public class CfnApi
extends CfnResource
implements IInspectable
A CloudFormation
AWS::Serverless::Api
.
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; CfnApi cfnApi = CfnApi.Builder.create(this, "MyCfnApi") .stageName("stageName") // the properties below are optional .accessLogSetting(AccessLogSettingProperty.builder() .destinationArn("destinationArn") .format("format") .build()) .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();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Example:static interface
Example:static final class
A fluent builder forCfnApi
.static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:static interface
Example:Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAWS::Serverless::Api.AccessLogSetting
.getAuth()
AWS::Serverless::Api.Auth
.AWS::Serverless::Api.BinaryMediaTypes
.AWS::Serverless::Api.CacheClusterEnabled
.AWS::Serverless::Api.CacheClusterSize
.AWS::Serverless::Api.CanarySetting
.getCors()
AWS::Serverless::Api.Cors
.AWS::Serverless::Api.DefinitionBody
.AWS::Serverless::Api.DefinitionUri
.AWS::Serverless::Api.Description
.AWS::Serverless::Api.DisableExecuteApiEndpoint
.AWS::Serverless::Api.Domain
.AWS::Serverless::Api.EndpointConfiguration
.AWS::Serverless::Api.GatewayResponses
.AWS::Serverless::Api.MethodSettings
.AWS::Serverless::Api.MinimumCompressionSize
.AWS::Serverless::Api.Models
.getName()
AWS::Serverless::Api.Name
.AWS::Serverless::Api.OpenApiVersion
.AWS::Serverless::Api.StageName
.getTags()
AWS::Serverless::Api.Tags
.AWS::Serverless::Api.TracingEnabled
.AWS::Serverless::Api.Variables
.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setAccessLogSetting
(IResolvable value) AWS::Serverless::Api.AccessLogSetting
.void
AWS::Serverless::Api.AccessLogSetting
.void
setAuth
(IResolvable value) AWS::Serverless::Api.Auth
.void
setAuth
(CfnApi.AuthProperty value) AWS::Serverless::Api.Auth
.void
setBinaryMediaTypes
(List<String> value) AWS::Serverless::Api.BinaryMediaTypes
.void
setCacheClusterEnabled
(Boolean value) AWS::Serverless::Api.CacheClusterEnabled
.void
AWS::Serverless::Api.CacheClusterEnabled
.void
setCacheClusterSize
(String value) AWS::Serverless::Api.CacheClusterSize
.void
setCanarySetting
(IResolvable value) AWS::Serverless::Api.CanarySetting
.void
AWS::Serverless::Api.CanarySetting
.void
AWS::Serverless::Api.Cors
.void
setCors
(IResolvable value) AWS::Serverless::Api.Cors
.void
AWS::Serverless::Api.Cors
.void
setDefinitionBody
(Object value) AWS::Serverless::Api.DefinitionBody
.void
setDefinitionUri
(String value) AWS::Serverless::Api.DefinitionUri
.void
setDefinitionUri
(IResolvable value) AWS::Serverless::Api.DefinitionUri
.void
AWS::Serverless::Api.DefinitionUri
.void
setDescription
(String value) AWS::Serverless::Api.Description
.void
AWS::Serverless::Api.DisableExecuteApiEndpoint
.void
AWS::Serverless::Api.DisableExecuteApiEndpoint
.void
setDomain
(IResolvable value) AWS::Serverless::Api.Domain
.void
AWS::Serverless::Api.Domain
.void
setEndpointConfiguration
(String value) AWS::Serverless::Api.EndpointConfiguration
.void
AWS::Serverless::Api.EndpointConfiguration
.void
AWS::Serverless::Api.EndpointConfiguration
.void
setGatewayResponses
(Object value) AWS::Serverless::Api.GatewayResponses
.void
setMethodSettings
(List<Object> value) AWS::Serverless::Api.MethodSettings
.void
setMethodSettings
(IResolvable value) AWS::Serverless::Api.MethodSettings
.void
setMinimumCompressionSize
(Number value) AWS::Serverless::Api.MinimumCompressionSize
.void
AWS::Serverless::Api.Models
.void
AWS::Serverless::Api.Name
.void
setOpenApiVersion
(String value) AWS::Serverless::Api.OpenApiVersion
.void
setStageName
(String value) AWS::Serverless::Api.StageName
.void
setTracingEnabled
(Boolean value) AWS::Serverless::Api.TracingEnabled
.void
setTracingEnabled
(IResolvable value) AWS::Serverless::Api.TracingEnabled
.void
setVariables
(Map<String, String> value) AWS::Serverless::Api.Variables
.void
setVariables
(IResolvable value) AWS::Serverless::Api.Variables
.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class. -
REQUIRED_TRANSFORM
TheTransform
a template must use in order to use this resource.
-
-
Constructor Details
-
CfnApi
protected CfnApi(software.amazon.jsii.JsiiObjectRef objRef) -
CfnApi
protected CfnApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnApi
@Stability(Stable) public CfnApi(@NotNull Construct scope, @NotNull String id, @NotNull CfnApiProps props) Create a newAWS::Serverless::Api
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getTags
AWS::Serverless::Api.Tags
. -
getDefinitionBody
AWS::Serverless::Api.DefinitionBody
. -
setDefinitionBody
AWS::Serverless::Api.DefinitionBody
. -
getGatewayResponses
AWS::Serverless::Api.GatewayResponses
. -
setGatewayResponses
AWS::Serverless::Api.GatewayResponses
. -
getModels
AWS::Serverless::Api.Models
. -
setModels
AWS::Serverless::Api.Models
. -
getStageName
AWS::Serverless::Api.StageName
. -
setStageName
AWS::Serverless::Api.StageName
. -
getAccessLogSetting
AWS::Serverless::Api.AccessLogSetting
. -
setAccessLogSetting
AWS::Serverless::Api.AccessLogSetting
. -
setAccessLogSetting
AWS::Serverless::Api.AccessLogSetting
. -
getAuth
AWS::Serverless::Api.Auth
. -
setAuth
AWS::Serverless::Api.Auth
. -
setAuth
AWS::Serverless::Api.Auth
. -
getBinaryMediaTypes
AWS::Serverless::Api.BinaryMediaTypes
. -
setBinaryMediaTypes
AWS::Serverless::Api.BinaryMediaTypes
. -
getCacheClusterEnabled
AWS::Serverless::Api.CacheClusterEnabled
. -
setCacheClusterEnabled
AWS::Serverless::Api.CacheClusterEnabled
. -
setCacheClusterEnabled
AWS::Serverless::Api.CacheClusterEnabled
. -
getCacheClusterSize
AWS::Serverless::Api.CacheClusterSize
. -
setCacheClusterSize
AWS::Serverless::Api.CacheClusterSize
. -
getCanarySetting
AWS::Serverless::Api.CanarySetting
. -
setCanarySetting
AWS::Serverless::Api.CanarySetting
. -
setCanarySetting
AWS::Serverless::Api.CanarySetting
. -
getCors
AWS::Serverless::Api.Cors
. -
setCors
AWS::Serverless::Api.Cors
. -
setCors
AWS::Serverless::Api.Cors
. -
setCors
AWS::Serverless::Api.Cors
. -
getDefinitionUri
AWS::Serverless::Api.DefinitionUri
. -
setDefinitionUri
AWS::Serverless::Api.DefinitionUri
. -
setDefinitionUri
AWS::Serverless::Api.DefinitionUri
. -
setDefinitionUri
AWS::Serverless::Api.DefinitionUri
. -
getDescription
AWS::Serverless::Api.Description
. -
setDescription
AWS::Serverless::Api.Description
. -
getDisableExecuteApiEndpoint
AWS::Serverless::Api.DisableExecuteApiEndpoint
. -
setDisableExecuteApiEndpoint
AWS::Serverless::Api.DisableExecuteApiEndpoint
. -
setDisableExecuteApiEndpoint
AWS::Serverless::Api.DisableExecuteApiEndpoint
. -
getDomain
AWS::Serverless::Api.Domain
. -
setDomain
AWS::Serverless::Api.Domain
. -
setDomain
AWS::Serverless::Api.Domain
. -
getEndpointConfiguration
AWS::Serverless::Api.EndpointConfiguration
. -
setEndpointConfiguration
AWS::Serverless::Api.EndpointConfiguration
. -
setEndpointConfiguration
AWS::Serverless::Api.EndpointConfiguration
. -
setEndpointConfiguration
@Stability(Stable) public void setEndpointConfiguration(@Nullable CfnApi.EndpointConfigurationProperty value) AWS::Serverless::Api.EndpointConfiguration
. -
getMethodSettings
AWS::Serverless::Api.MethodSettings
. -
setMethodSettings
AWS::Serverless::Api.MethodSettings
. -
setMethodSettings
AWS::Serverless::Api.MethodSettings
. -
getMinimumCompressionSize
AWS::Serverless::Api.MinimumCompressionSize
. -
setMinimumCompressionSize
AWS::Serverless::Api.MinimumCompressionSize
. -
getName
AWS::Serverless::Api.Name
. -
setName
AWS::Serverless::Api.Name
. -
getOpenApiVersion
AWS::Serverless::Api.OpenApiVersion
. -
setOpenApiVersion
AWS::Serverless::Api.OpenApiVersion
. -
getTracingEnabled
AWS::Serverless::Api.TracingEnabled
. -
setTracingEnabled
AWS::Serverless::Api.TracingEnabled
. -
setTracingEnabled
AWS::Serverless::Api.TracingEnabled
. -
getVariables
AWS::Serverless::Api.Variables
. -
setVariables
AWS::Serverless::Api.Variables
. -
setVariables
AWS::Serverless::Api.Variables
.
-