@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-05-19T23:09:31.638Z") @Stability(value=Stable) 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
A fluent builder for
Stage . |
software.amazon.jsii.JsiiObject.InitializationMode
IStage.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()
RestApi to which this stage is associated.
|
String |
getStageArn()
Returns the resource ARN for this stage:.
|
String |
getStageName()
Name of this stage.
|
String |
urlForPath()
Returns the invoke URL for a certain path.
|
String |
urlForPath(String path)
Returns the invoke URL for a certain path.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected Stage(software.amazon.jsii.JsiiObjectRef objRef)
protected Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) 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=Stable) @NotNull public String urlForPath(@Nullable String path)
path
- The resource path.@Stability(value=Stable) @NotNull public String urlForPath()
@Stability(value=Stable) @NotNull public IRestApi getRestApi()
getRestApi
in interface IStage
@Stability(value=Stable) @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=Stable) @NotNull public String getStageName()
getStageName
in interface IStage
Copyright © 2023. All rights reserved.