Class Stage
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigateway.StageBase
software.amazon.awscdk.services.apigateway.Stage
- All Implemented Interfaces:
IResource,IStage,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.110.0 (build 336b265)",
date="2025-04-22T23:08:06.451Z")
@Stability(Stable)
public class Stage
extends StageBase
Example:
// production stage
LogGroup prodLogGroup = new LogGroup(this, "PrdLogs");
RestApi api = RestApi.Builder.create(this, "books")
.deployOptions(StageOptions.builder()
.accessLogDestination(new LogGroupLogDestination(prodLogGroup))
.accessLogFormat(AccessLogFormat.jsonWithStandardFields())
.build())
.build();
Deployment deployment = Deployment.Builder.create(this, "Deployment").api(api).build();
// development stage
LogGroup devLogGroup = new LogGroup(this, "DevLogs");
Stage.Builder.create(this, "dev")
.deployment(deployment)
.accessLogDestination(new LogGroupLogDestination(devLogGroup))
.accessLogFormat(AccessLogFormat.jsonWithStandardFields(JsonWithStandardFieldProps.builder()
.caller(false)
.httpMethod(true)
.ip(true)
.protocol(true)
.requestTime(true)
.resourcePath(true)
.responseLength(true)
.status(true)
.user(true)
.build()))
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.apigateway.IStage
IStage.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedStage(software.amazon.jsii.JsiiObjectRef objRef) Stage(software.constructs.Construct scope, String id, StageProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IStagefromStageAttributes(software.constructs.Construct scope, String id, StageAttributes attrs) Import a Stage by its attributes.RestApi to which this stage is associated.Name of this stage.Methods inherited from class software.amazon.awscdk.services.apigateway.StageBase
addApiKey, addApiKey, getStageArn, metric, metric, metricCacheHitCount, metricCacheHitCount, metricCacheMissCount, metricCacheMissCount, metricClientError, metricClientError, metricCount, metricCount, metricIntegrationLatency, metricIntegrationLatency, metricLatency, metricLatency, metricServerError, metricServerError, urlForPath, urlForPathMethods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Stage
protected Stage(software.amazon.jsii.JsiiObjectRef objRef) -
Stage
protected Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
Stage
@Stability(Stable) public Stage(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull StageProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromStageAttributes
@Stability(Stable) @NotNull public static IStage fromStageAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull StageAttributes attrs) Import a Stage by its attributes.- Parameters:
scope- This parameter is required.id- This parameter is required.attrs- This parameter is required.
-
getRestApi
RestApi to which this stage is associated.- Specified by:
getRestApiin interfaceIStage- Specified by:
getRestApiin classStageBase
-
getStageName
Name of this stage.- Specified by:
getStageNamein interfaceIStage- Specified by:
getStageNamein classStageBase
-