@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:58.331Z") 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 . |
IStage.Jsii$Default, IStage.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Stage(software.amazon.jsii.JsiiObjectRef objRef) |
|
Stage(software.constructs.Construct scope,
java.lang.String id,
StageProps props) |
Modifier and Type | Method and Description |
---|---|
IRestApi |
getRestApi()
RestApi to which this stage is associated.
|
java.lang.String |
getStageArn()
Returns the resource ARN for this stage:.
|
java.lang.String |
getStageName()
Name of this stage.
|
java.lang.String |
urlForPath()
Returns the invoke URL for a certain path.
|
java.lang.String |
urlForPath(java.lang.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applyRemovalPolicy, getEnv, getStack
getNode
protected Stage(software.amazon.jsii.JsiiObjectRef objRef)
protected Stage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public Stage(software.constructs.Construct scope, java.lang.String id, StageProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public java.lang.String urlForPath(java.lang.String path)
path
- The resource path.public java.lang.String urlForPath()
public IRestApi getRestApi()
getRestApi
in interface IStage
public java.lang.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.
public java.lang.String getStageName()
getStageName
in interface IStage