@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-07T23:46:59.655Z") @Stability(value=Experimental) public class Stage extends Resource implements IStage
// production stage
LogGroup prdLogGroup = new LogGroup(this, "PrdLogs");
RestApi api = RestApi.Builder.create(this, "books")
.deployOptions(StageOptions.builder()
.accessLogDestination(new LogGroupLogDestination(prdLogGroup))
.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();
| Modifier and Type | Class and Description |
|---|---|
static class |
Stage.Builder
(experimental) A fluent builder for
Stage. |
software.amazon.jsii.JsiiObject.InitializationModeIStage.Jsii$Default, IStage.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Stage(software.constructs.Construct scope,
String id,
StageProps props) |
protected |
Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Stage(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
IRestApi |
getRestApi()
(experimental) RestApi to which this stage is associated.
|
String |
getStageArn()
(experimental) Returns the resource ARN for this stage:.
|
String |
getStageName()
(experimental) Name of this stage.
|
String |
urlForPath()
(experimental) Returns the invoke URL for a certain path.
|
String |
urlForPath(String path)
(experimental) Returns the invoke URL for a certain path.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackgetNodeprotected Stage(software.amazon.jsii.JsiiObjectRef objRef)
protected Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Stage(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
StageProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public String urlForPath(@Nullable String path)
path - The resource path.@Stability(value=Experimental) @NotNull public String urlForPath()
@Stability(value=Experimental) @NotNull public IRestApi getRestApi()
getRestApi in interface IStage@Stability(value=Experimental) @NotNull public String getStageArn()
arn:aws:apigateway:{region}::/restapis/{restApiId}/stages/{stageName}
Note that this is separate from the execute-api ARN for methods and resources within this stage.
@Stability(value=Experimental) @NotNull public String getStageName()
getStageName in interface IStageCopyright © 2022. All rights reserved.