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.103.1 (build bef2dea)", date="2024-10-11T15:55:52.441Z") @Stability(Stable) public class CfnStage extends CfnResource implements IInspectable, ITaggable
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();
 

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.
  • 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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnStageProps 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. 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
    • 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.
    • setCacheClusterSize

      @Stability(Stable) public void setCacheClusterSize(@Nullable String value)
      The stage's cache capacity in GB.
    • 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.
    • setMethodSettings

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

      @Stability(Stable) public void setMethodSettings(@Nullable List<Object> value)
      A map that defines the method settings for a Stage resource.
    • 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.
    • 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.
    • getTagsRaw

      @Stability(Stable) @Nullable public List<CfnTag> getTagsRaw()
      The collection of tags.
    • setTagsRaw

      @Stability(Stable) public void setTagsRaw(@Nullable List<CfnTag> value)
      The collection of tags.
    • 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.
    • 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.
    • 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.