Class CfnHttpApi

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, ITaggable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.97.0 (build 729de35)", date="2024-04-18T17:54:24.584Z") @Stability(Stable) public class CfnHttpApi extends CfnResource implements IInspectable, ITaggable
https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlesshttpapi.

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;
 CfnHttpApi cfnHttpApi = CfnHttpApi.Builder.create(this, "MyCfnHttpApi")
         .accessLogSetting(AccessLogSettingProperty.builder()
                 .destinationArn("destinationArn")
                 .format("format")
                 .build())
         .auth(HttpApiAuthProperty.builder()
                 .authorizers(authorizers)
                 .defaultAuthorizer("defaultAuthorizer")
                 .build())
         .corsConfiguration(false)
         .defaultRouteSettings(RouteSettingsProperty.builder()
                 .dataTraceEnabled(false)
                 .detailedMetricsEnabled(false)
                 .loggingLevel("loggingLevel")
                 .throttlingBurstLimit(123)
                 .throttlingRateLimit(123)
                 .build())
         .definitionBody(definitionBody)
         .definitionUri("definitionUri")
         .description("description")
         .disableExecuteApiEndpoint(false)
         .domain(HttpApiDomainConfigurationProperty.builder()
                 .certificateArn("certificateArn")
                 .domainName("domainName")
                 // the properties below are optional
                 .basePath("basePath")
                 .endpointConfiguration("endpointConfiguration")
                 .mutualTlsAuthentication(MutualTlsAuthenticationProperty.builder()
                         .truststoreUri("truststoreUri")
                         .truststoreVersion(false)
                         .build())
                 .route53(Route53ConfigurationProperty.builder()
                         .distributedDomainName("distributedDomainName")
                         .evaluateTargetHealth(false)
                         .hostedZoneId("hostedZoneId")
                         .hostedZoneName("hostedZoneName")
                         .ipV6(false)
                         .build())
                 .securityPolicy("securityPolicy")
                 .build())
         .failOnWarnings(false)
         .routeSettings(RouteSettingsProperty.builder()
                 .dataTraceEnabled(false)
                 .detailedMetricsEnabled(false)
                 .loggingLevel("loggingLevel")
                 .throttlingBurstLimit(123)
                 .throttlingRateLimit(123)
                 .build())
         .stageName("stageName")
         .stageVariables(Map.of(
                 "stageVariablesKey", "stageVariables"))
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
    • REQUIRED_TRANSFORM

      @Stability(Stable) public static final String REQUIRED_TRANSFORM
      The Transform a template must use in order to use this resource.
  • Constructor Details

    • CfnHttpApi

      protected CfnHttpApi(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnHttpApi

      protected CfnHttpApi(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnHttpApi

      @Stability(Stable) public CfnHttpApi(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable CfnHttpApiProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties.
    • CfnHttpApi

      @Stability(Stable) public CfnHttpApi(@NotNull software.constructs.Construct scope, @NotNull String id)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      Tag Manager which manages the tags for this resource.
      Specified by:
      getTags in interface ITaggable
    • getAccessLogSetting

      @Stability(Stable) @Nullable public Object getAccessLogSetting()
    • setAccessLogSetting

      @Stability(Stable) public void setAccessLogSetting(@Nullable IResolvable value)
    • setAccessLogSetting

      @Stability(Stable) public void setAccessLogSetting(@Nullable CfnHttpApi.AccessLogSettingProperty value)
    • getAuth

      @Stability(Stable) @Nullable public Object getAuth()
    • setAuth

      @Stability(Stable) public void setAuth(@Nullable IResolvable value)
    • setAuth

      @Stability(Stable) public void setAuth(@Nullable CfnHttpApi.HttpApiAuthProperty value)
    • getCorsConfiguration

      @Stability(Stable) @Nullable public Object getCorsConfiguration()
    • setCorsConfiguration

      @Stability(Stable) public void setCorsConfiguration(@Nullable Boolean value)
    • setCorsConfiguration

      @Stability(Stable) public void setCorsConfiguration(@Nullable IResolvable value)
    • setCorsConfiguration

      @Stability(Stable) public void setCorsConfiguration(@Nullable CfnHttpApi.CorsConfigurationObjectProperty value)
    • getDefaultRouteSettings

      @Stability(Stable) @Nullable public Object getDefaultRouteSettings()
    • setDefaultRouteSettings

      @Stability(Stable) public void setDefaultRouteSettings(@Nullable IResolvable value)
    • setDefaultRouteSettings

      @Stability(Stable) public void setDefaultRouteSettings(@Nullable CfnHttpApi.RouteSettingsProperty value)
    • getDefinitionBody

      @Stability(Stable) @Nullable public Object getDefinitionBody()
    • setDefinitionBody

      @Stability(Stable) public void setDefinitionBody(@Nullable Object value)
    • getDefinitionUri

      @Stability(Stable) @Nullable public Object getDefinitionUri()
    • setDefinitionUri

      @Stability(Stable) public void setDefinitionUri(@Nullable String value)
    • setDefinitionUri

      @Stability(Stable) public void setDefinitionUri(@Nullable IResolvable value)
    • setDefinitionUri

      @Stability(Stable) public void setDefinitionUri(@Nullable CfnHttpApi.S3LocationProperty value)
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
    • getDisableExecuteApiEndpoint

      @Stability(Stable) @Nullable public Object getDisableExecuteApiEndpoint()
    • setDisableExecuteApiEndpoint

      @Stability(Stable) public void setDisableExecuteApiEndpoint(@Nullable Boolean value)
    • setDisableExecuteApiEndpoint

      @Stability(Stable) public void setDisableExecuteApiEndpoint(@Nullable IResolvable value)
    • getDomain

      @Stability(Stable) @Nullable public Object getDomain()
    • setDomain

      @Stability(Stable) public void setDomain(@Nullable IResolvable value)
    • setDomain

      @Stability(Stable) public void setDomain(@Nullable CfnHttpApi.HttpApiDomainConfigurationProperty value)
    • getFailOnWarnings

      @Stability(Stable) @Nullable public Object getFailOnWarnings()
    • setFailOnWarnings

      @Stability(Stable) public void setFailOnWarnings(@Nullable Boolean value)
    • setFailOnWarnings

      @Stability(Stable) public void setFailOnWarnings(@Nullable IResolvable value)
    • getRouteSettings

      @Stability(Stable) @Nullable public Object getRouteSettings()
    • setRouteSettings

      @Stability(Stable) public void setRouteSettings(@Nullable IResolvable value)
    • setRouteSettings

      @Stability(Stable) public void setRouteSettings(@Nullable CfnHttpApi.RouteSettingsProperty value)
    • getStageName

      @Stability(Stable) @Nullable public String getStageName()
    • setStageName

      @Stability(Stable) public void setStageName(@Nullable String value)
    • getStageVariables

      @Stability(Stable) @Nullable public Object getStageVariables()
    • setStageVariables

      @Stability(Stable) public void setStageVariables(@Nullable IResolvable value)
    • setStageVariables

      @Stability(Stable) public void setStageVariables(@Nullable Map<String,String> value)
    • getTagsRaw

      @Stability(Stable) @Nullable public Map<String,String> getTagsRaw()
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable Map<String,String> value)