Class ApiGatewayConfig

java.lang.Object
software.amazon.smithy.aws.apigateway.openapi.ApiGatewayConfig

public final class ApiGatewayConfig extends Object
API Gateway OpenAPI configuration.
  • Constructor Details

    • ApiGatewayConfig

      public ApiGatewayConfig()
  • Method Details

    • getDisableCloudFormationSubstitution

      public boolean getDisableCloudFormationSubstitution()
      Returns:
      Returns true if CloudFormation substitutions are disabled.
    • setDisableCloudFormationSubstitution

      public void setDisableCloudFormationSubstitution(boolean disableCloudFormationSubstitution)
      Disables CloudFormation substitutions of specific paths when they contain ${} placeholders. When found, these are expanded into CloudFormation Fn::Sub intrinsic functions.
      Parameters:
      disableCloudFormationSubstitution - Set to true to disable intrinsics.
    • getApiGatewayType

      public ApiGatewayConfig.ApiType getApiGatewayType()
      Returns:
      the type of API Gateway API to generate.
    • setApiGatewayType

      public void setApiGatewayType(ApiGatewayConfig.ApiType apiGatewayType)
      Sets the type of API Gateway API to generate.

      If not set, this value defaults to a "REST" API.

      Parameters:
      apiGatewayType - API type to set.
    • getAdditionalAllowedCorsHeaders

      @Deprecated public List<String> getAdditionalAllowedCorsHeaders()
    • getAdditionalAllowedCorsHeadersSet

      public Set<String> getAdditionalAllowedCorsHeadersSet()
      Returns:
      the set of additional allowed CORS headers.
    • setAdditionalAllowedCorsHeaders

      public void setAdditionalAllowedCorsHeaders(Collection<String> additionalAllowedCorsHeaders)
      Sets the additional allowed CORS headers.
      Parameters:
      additionalAllowedCorsHeaders - additional cors headers to be allowed.
    • getCorsOriginKey

      public String getCorsOriginKey()
      Gets the key to select from the origins map of the cors trait when generating a REST API.

      REST APIs only support a single Access-Control-Allow-Origin value. When the cors trait uses the origins map, this setting is required to select which entry to use by key.

      This setting is ignored for HTTP APIs, which natively support multiple origins.

      Returns:
      the configured origin key, or null if not set.
    • setCorsOriginKey

      public void setCorsOriginKey(String corsOriginKey)
      Sets the key to select from the origins map of the cors trait when generating a REST API.
      Parameters:
      corsOriginKey - The origin key to select.
    • getApiGatewayDefaults

      public ApiGatewayDefaults getApiGatewayDefaults()
    • setApiGatewayDefaults

      public void setApiGatewayDefaults(ApiGatewayDefaults apiGatewayDefaults)