@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-20T22:20:02.328Z") public class WebSocketStage extends Resource implements IWebSocketStage, IStage
Example:
import software.amazon.awscdk.services.apigatewayv2.integrations.WebSocketLambdaIntegration; Function messageHandler; WebSocketApi webSocketApi = new WebSocketApi(this, "mywsapi"); WebSocketStage.Builder.create(this, "mystage") .webSocketApi(webSocketApi) .stageName("dev") .autoDeploy(true) .build(); webSocketApi.addRoute("sendmessage", WebSocketRouteOptions.builder() .integration(new WebSocketLambdaIntegration("SendMessageIntegration", messageHandler)) .build());
Modifier and Type | Class and Description |
---|---|
static class |
WebSocketStage.Builder
(experimental) A fluent builder for
WebSocketStage . |
IWebSocketStage.Jsii$Default, IWebSocketStage.Jsii$Proxy
Modifier | Constructor and Description |
---|---|
protected |
WebSocketStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
WebSocketStage(software.amazon.jsii.JsiiObjectRef objRef) |
|
WebSocketStage(software.constructs.Construct scope,
java.lang.String id,
WebSocketStageProps props) |
Modifier and Type | Method and Description |
---|---|
static IWebSocketStage |
fromWebSocketStageAttributes(software.constructs.Construct scope,
java.lang.String id,
WebSocketStageAttributes attrs)
(experimental) Import an existing stage into this CDK app.
|
IWebSocketApi |
getApi()
(experimental) The API this stage is associated to.
|
protected IApi |
getBaseApi() |
java.lang.String |
getCallbackUrl()
(experimental) The callback URL to this stage.
|
java.lang.String |
getStageName()
(experimental) The name of the stage;
|
java.lang.String |
getUrl()
(experimental) The websocket URL to this stage.
|
Grant |
grantManagementApiAccess(IGrantable identity)
(experimental) Grant access to the API Gateway management API for this WebSocket API Stage to an IAM principal (Role/Group/User).
|
Metric |
metric(java.lang.String metricName)
(experimental) Return the given named metric for this HTTP Api Gateway Stage.
|
Metric |
metric(java.lang.String metricName,
MetricOptions props)
(experimental) Return the given named metric for this HTTP Api Gateway Stage.
|
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 WebSocketStage(software.amazon.jsii.JsiiObjectRef objRef)
protected WebSocketStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public WebSocketStage(software.constructs.Construct scope, java.lang.String id, WebSocketStageProps props)
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.public static IWebSocketStage fromWebSocketStageAttributes(software.constructs.Construct scope, java.lang.String id, WebSocketStageAttributes attrs)
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.public Grant grantManagementApiAccess(IGrantable identity)
identity
- The principal. This parameter is required.public Metric metric(java.lang.String metricName, MetricOptions props)
public Metric metric(java.lang.String metricName)
public IWebSocketApi getApi()
getApi
in interface IWebSocketStage
protected IApi getBaseApi()
public java.lang.String getCallbackUrl()
getCallbackUrl
in interface IWebSocketStage
public java.lang.String getStageName()
its primary identifier.
getStageName
in interface IStage