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:44.880Z") @Stability(Stable) public class CfnStage extends CfnResource implements IInspectable
A CloudFormation AWS::ApiGateway::Stage.

The AWS::ApiGateway::Stage resource creates a stage for a deployment.

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.apigateway.*;
 CfnStage cfnStage = CfnStage.Builder.create(this, "MyCfnStage")
         .restApiId("restApiId")
         // the properties below are optional
         .accessLogSetting(AccessLogSettingProperty.builder()
                 .destinationArn("destinationArn")
                 .format("format")
                 .build())
         .cacheClusterEnabled(false)
         .cacheClusterSize("cacheClusterSize")
         .canarySetting(CanarySettingProperty.builder()
                 .deploymentId("deploymentId")
                 .percentTraffic(123)
                 .stageVariableOverrides(Map.of(
                         "stageVariableOverridesKey", "stageVariableOverrides"))
                 .useStageCache(false)
                 .build())
         .clientCertificateId("clientCertificateId")
         .deploymentId("deploymentId")
         .description("description")
         .documentationVersion("documentationVersion")
         .methodSettings(List.of(MethodSettingProperty.builder()
                 .cacheDataEncrypted(false)
                 .cacheTtlInSeconds(123)
                 .cachingEnabled(false)
                 .dataTraceEnabled(false)
                 .httpMethod("httpMethod")
                 .loggingLevel("loggingLevel")
                 .metricsEnabled(false)
                 .resourcePath("resourcePath")
                 .throttlingBurstLimit(123)
                 .throttlingRateLimit(123)
                 .build()))
         .stageName("stageName")
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .tracingEnabled(false)
         .variables(Map.of(
                 "variablesKey", "variables"))
         .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.
  • Constructor Details

    • CfnStage

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

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

      @Stability(Stable) public CfnStage(@NotNull Construct scope, @NotNull String id, @NotNull CfnStageProps props)
      Create a new AWS::ApiGateway::Stage.

      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.
      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()
      The collection of tags.

      Each tag element is associated with a given resource.

    • getRestApiId

      @Stability(Stable) @NotNull public String getRestApiId()
      The string identifier of the associated RestApi.
    • setRestApiId

      @Stability(Stable) public void setRestApiId(@NotNull String value)
      The string identifier of the associated RestApi.
    • getAccessLogSetting

      @Stability(Stable) @Nullable public Object getAccessLogSetting()
      Access log settings, including the access log format and access log destination ARN.
    • setAccessLogSetting

      @Stability(Stable) public void setAccessLogSetting(@Nullable IResolvable value)
      Access log settings, including the access log format and access log destination ARN.
    • setAccessLogSetting

      @Stability(Stable) public void setAccessLogSetting(@Nullable CfnStage.AccessLogSettingProperty value)
      Access log settings, including the access log format and access log destination ARN.
    • getCacheClusterEnabled

      @Stability(Stable) @Nullable public Object getCacheClusterEnabled()
      Specifies whether a cache cluster is enabled for the stage.
    • setCacheClusterEnabled

      @Stability(Stable) public void setCacheClusterEnabled(@Nullable Boolean value)
      Specifies whether a cache cluster is enabled for the stage.
    • setCacheClusterEnabled

      @Stability(Stable) public void setCacheClusterEnabled(@Nullable IResolvable value)
      Specifies whether a cache cluster is enabled for the stage.
    • getCacheClusterSize

      @Stability(Stable) @Nullable public String getCacheClusterSize()
      The stage's cache capacity in GB.

      For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .

    • setCacheClusterSize

      @Stability(Stable) public void setCacheClusterSize(@Nullable String value)
      The stage's cache capacity in GB.

      For more information about choosing a cache size, see Enabling API caching to enhance responsiveness .

    • getCanarySetting

      @Stability(Stable) @Nullable public Object getCanarySetting()
      Settings for the canary deployment in this stage.
    • setCanarySetting

      @Stability(Stable) public void setCanarySetting(@Nullable IResolvable value)
      Settings for the canary deployment in this stage.
    • setCanarySetting

      @Stability(Stable) public void setCanarySetting(@Nullable CfnStage.CanarySettingProperty value)
      Settings for the canary deployment in this stage.
    • getClientCertificateId

      @Stability(Stable) @Nullable public String getClientCertificateId()
      The identifier of a client certificate for an API stage.
    • setClientCertificateId

      @Stability(Stable) public void setClientCertificateId(@Nullable String value)
      The identifier of a client certificate for an API stage.
    • getDeploymentId

      @Stability(Stable) @Nullable public String getDeploymentId()
      The identifier of the Deployment that the stage points to.
    • setDeploymentId

      @Stability(Stable) public void setDeploymentId(@Nullable String value)
      The identifier of the Deployment that the stage points to.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The stage's description.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The stage's description.
    • getDocumentationVersion

      @Stability(Stable) @Nullable public String getDocumentationVersion()
      The version of the associated API documentation.
    • setDocumentationVersion

      @Stability(Stable) public void setDocumentationVersion(@Nullable String value)
      The version of the associated API documentation.
    • getMethodSettings

      @Stability(Stable) @Nullable public Object getMethodSettings()
      A map that defines the method settings for a Stage resource.

      Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\* /\* for overriding all methods in the stage.

    • setMethodSettings

      @Stability(Stable) public void setMethodSettings(@Nullable IResolvable value)
      A map that defines the method settings for a Stage resource.

      Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\* /\* for overriding all methods in the stage.

    • setMethodSettings

      @Stability(Stable) public void setMethodSettings(@Nullable List<Object> value)
      A map that defines the method settings for a Stage resource.

      Keys (designated as /{method_setting_key below) are method paths defined as {resource_path}/{http_method} for an individual method override, or /\* /\* for overriding all methods in the stage.

    • getStageName

      @Stability(Stable) @Nullable public String getStageName()
      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway.

      Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

    • setStageName

      @Stability(Stable) public void setStageName(@Nullable String value)
      The name of the stage is the first path segment in the Uniform Resource Identifier (URI) of a call to API Gateway.

      Stage names can only contain alphanumeric characters, hyphens, and underscores. Maximum length is 128 characters.

    • getTracingEnabled

      @Stability(Stable) @Nullable public Object getTracingEnabled()
      Specifies whether active tracing with X-ray is enabled for the Stage.
    • setTracingEnabled

      @Stability(Stable) public void setTracingEnabled(@Nullable Boolean value)
      Specifies whether active tracing with X-ray is enabled for the Stage.
    • setTracingEnabled

      @Stability(Stable) public void setTracingEnabled(@Nullable IResolvable value)
      Specifies whether active tracing with X-ray is enabled for the Stage.
    • getVariables

      @Stability(Stable) @Nullable public Object getVariables()
      A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.

      Variable names are limited to alphanumeric characters. Values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+ .

    • setVariables

      @Stability(Stable) public void setVariables(@Nullable IResolvable value)
      A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.

      Variable names are limited to alphanumeric characters. Values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+ .

    • setVariables

      @Stability(Stable) public void setVariables(@Nullable Map<String,String> value)
      A map (string-to-string map) that defines the stage variables, where the variable name is the key and the variable value is the value.

      Variable names are limited to alphanumeric characters. Values must match the following regular expression: [A-Za-z0-9-._~:/?#&=,]+ .