@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-02-15T19:53:17.431Z") @Stability(value=Experimental) public class WebSocketStage extends Resource implements IWebSocketStage, IStage
Example:
import software.amazon.awscdk.services.apigatewayv2.integrations.alpha.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. |
software.amazon.jsii.JsiiObject.InitializationModeIWebSocketStage.Jsii$Default, IWebSocketStage.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
WebSocketStage(software.constructs.Construct scope,
String id,
WebSocketStageProps props) |
protected |
WebSocketStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
WebSocketStage(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
static IWebSocketStage |
fromWebSocketStageAttributes(software.constructs.Construct scope,
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() |
String |
getCallbackUrl()
(experimental) The callback URL to this stage.
|
String |
getStageName()
(experimental) The name of the stage;
|
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(String metricName)
(experimental) Return the given named metric for this HTTP Api Gateway Stage.
|
Metric |
metric(String metricName,
MetricOptions props)
(experimental) Return the given named metric for this HTTP Api Gateway Stage.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected WebSocketStage(software.amazon.jsii.JsiiObjectRef objRef)
protected WebSocketStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public WebSocketStage(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
WebSocketStageProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Experimental) @NotNull public static IWebSocketStage fromWebSocketStageAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WebSocketStageAttributes attrs)
scope - This parameter is required.id - This parameter is required.attrs - This parameter is required.@Stability(value=Experimental) @NotNull public Grant grantManagementApiAccess(@NotNull IGrantable identity)
identity - The principal. This parameter is required.@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName)
@Stability(value=Experimental) @NotNull public IWebSocketApi getApi()
getApi in interface IWebSocketStage@Stability(value=Experimental) @NotNull protected IApi getBaseApi()
@Stability(value=Experimental) @NotNull public String getCallbackUrl()
getCallbackUrl in interface IWebSocketStage@Stability(value=Experimental) @NotNull public String getStageName()
its primary identifier.
getStageName in interface IStageCopyright © 2023. All rights reserved.