Class CfnHttpApi

java.lang.Object
software.amazon.jsii.JsiiObject
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.662Z") @Stability(Stable) public class CfnHttpApi extends CfnResource implements IInspectable
A CloudFormation AWS::Serverless::HttpApi.

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();
 
  • 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 Construct scope, @NotNull String id, @Nullable CfnHttpApiProps props)
      Create a new AWS::Serverless::HttpApi.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
    • CfnHttpApi

      @Stability(Stable) public CfnHttpApi(@NotNull Construct scope, @NotNull String id)
      Create a new AWS::Serverless::HttpApi.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      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()
      AWS::Serverless::HttpApi.Tags.
    • getDefinitionBody

      @Stability(Stable) @NotNull public Object getDefinitionBody()
      AWS::Serverless::HttpApi.DefinitionBody.
    • setDefinitionBody

      @Stability(Stable) public void setDefinitionBody(@NotNull Object value)
      AWS::Serverless::HttpApi.DefinitionBody.
    • getAccessLogSetting

      @Stability(Stable) @Nullable public Object getAccessLogSetting()
      AWS::Serverless::HttpApi.AccessLogSetting.
    • setAccessLogSetting

      @Stability(Stable) public void setAccessLogSetting(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.AccessLogSetting.
    • setAccessLogSetting

      @Stability(Stable) public void setAccessLogSetting(@Nullable CfnHttpApi.AccessLogSettingProperty value)
      AWS::Serverless::HttpApi.AccessLogSetting.
    • getAuth

      @Stability(Stable) @Nullable public Object getAuth()
      AWS::Serverless::HttpApi.Auth.
    • setAuth

      @Stability(Stable) public void setAuth(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.Auth.
    • setAuth

      @Stability(Stable) public void setAuth(@Nullable CfnHttpApi.HttpApiAuthProperty value)
      AWS::Serverless::HttpApi.Auth.
    • getCorsConfiguration

      @Stability(Stable) @Nullable public Object getCorsConfiguration()
      AWS::Serverless::HttpApi.CorsConfiguration.
    • setCorsConfiguration

      @Stability(Stable) public void setCorsConfiguration(@Nullable Boolean value)
      AWS::Serverless::HttpApi.CorsConfiguration.
    • setCorsConfiguration

      @Stability(Stable) public void setCorsConfiguration(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.CorsConfiguration.
    • setCorsConfiguration

      @Stability(Stable) public void setCorsConfiguration(@Nullable CfnHttpApi.CorsConfigurationObjectProperty value)
      AWS::Serverless::HttpApi.CorsConfiguration.
    • getDefaultRouteSettings

      @Stability(Stable) @Nullable public Object getDefaultRouteSettings()
      AWS::Serverless::HttpApi.DefaultRouteSettings.
    • setDefaultRouteSettings

      @Stability(Stable) public void setDefaultRouteSettings(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.DefaultRouteSettings.
    • setDefaultRouteSettings

      @Stability(Stable) public void setDefaultRouteSettings(@Nullable CfnHttpApi.RouteSettingsProperty value)
      AWS::Serverless::HttpApi.DefaultRouteSettings.
    • getDefinitionUri

      @Stability(Stable) @Nullable public Object getDefinitionUri()
      AWS::Serverless::HttpApi.DefinitionUri.
    • setDefinitionUri

      @Stability(Stable) public void setDefinitionUri(@Nullable String value)
      AWS::Serverless::HttpApi.DefinitionUri.
    • setDefinitionUri

      @Stability(Stable) public void setDefinitionUri(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.DefinitionUri.
    • setDefinitionUri

      @Stability(Stable) public void setDefinitionUri(@Nullable CfnHttpApi.S3LocationProperty value)
      AWS::Serverless::HttpApi.DefinitionUri.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      AWS::Serverless::HttpApi.Description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      AWS::Serverless::HttpApi.Description.
    • getDisableExecuteApiEndpoint

      @Stability(Stable) @Nullable public Object getDisableExecuteApiEndpoint()
      AWS::Serverless::HttpApi.DisableExecuteApiEndpoint.
    • setDisableExecuteApiEndpoint

      @Stability(Stable) public void setDisableExecuteApiEndpoint(@Nullable Boolean value)
      AWS::Serverless::HttpApi.DisableExecuteApiEndpoint.
    • setDisableExecuteApiEndpoint

      @Stability(Stable) public void setDisableExecuteApiEndpoint(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.DisableExecuteApiEndpoint.
    • getDomain

      @Stability(Stable) @Nullable public Object getDomain()
      AWS::Serverless::HttpApi.Domain.
    • setDomain

      @Stability(Stable) public void setDomain(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.Domain.
    • setDomain

      @Stability(Stable) public void setDomain(@Nullable CfnHttpApi.HttpApiDomainConfigurationProperty value)
      AWS::Serverless::HttpApi.Domain.
    • getFailOnWarnings

      @Stability(Stable) @Nullable public Object getFailOnWarnings()
      AWS::Serverless::HttpApi.FailOnWarnings.
    • setFailOnWarnings

      @Stability(Stable) public void setFailOnWarnings(@Nullable Boolean value)
      AWS::Serverless::HttpApi.FailOnWarnings.
    • setFailOnWarnings

      @Stability(Stable) public void setFailOnWarnings(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.FailOnWarnings.
    • getRouteSettings

      @Stability(Stable) @Nullable public Object getRouteSettings()
      AWS::Serverless::HttpApi.RouteSettings.
    • setRouteSettings

      @Stability(Stable) public void setRouteSettings(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.RouteSettings.
    • setRouteSettings

      @Stability(Stable) public void setRouteSettings(@Nullable CfnHttpApi.RouteSettingsProperty value)
      AWS::Serverless::HttpApi.RouteSettings.
    • getStageName

      @Stability(Stable) @Nullable public String getStageName()
      AWS::Serverless::HttpApi.StageName.
    • setStageName

      @Stability(Stable) public void setStageName(@Nullable String value)
      AWS::Serverless::HttpApi.StageName.
    • getStageVariables

      @Stability(Stable) @Nullable public Object getStageVariables()
      AWS::Serverless::HttpApi.StageVariables.
    • setStageVariables

      @Stability(Stable) public void setStageVariables(@Nullable IResolvable value)
      AWS::Serverless::HttpApi.StageVariables.
    • setStageVariables

      @Stability(Stable) public void setStageVariables(@Nullable Map<String,String> value)
      AWS::Serverless::HttpApi.StageVariables.