Class WebSocketStage
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.apigatewayv2.WebSocketStage
- All Implemented Interfaces:
IResource
,IStage
,IWebSocketStage
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-11T18:01:10.811Z")
@Stability(Stable)
public class WebSocketStage
extends Resource
implements IWebSocketStage, IStage
Represents a stage where an instance of the API is deployed.
Example:
import software.amazon.awscdk.aws_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());
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IStage
IStage.Jsii$Default, IStage.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.apigatewayv2.IWebSocketStage
IWebSocketStage.Jsii$Default, IWebSocketStage.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
WebSocketStage
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
WebSocketStage
(software.amazon.jsii.JsiiObjectRef objRef) WebSocketStage
(software.constructs.Construct scope, String id, WebSocketStageProps props) -
Method Summary
Modifier and TypeMethodDescriptionstatic IWebSocketStage
fromWebSocketStageAttributes
(software.constructs.Construct scope, String id, WebSocketStageAttributes attrs) Import an existing stage into this CDK app.getApi()
The API this stage is associated to.protected IApi
The callback URL to this stage.The name of the stage;getUrl()
The websocket URL to this stage.grantManagementApiAccess
(IGrantable identity) Grant access to the API Gateway management API for this WebSocket API Stage to an IAM principal (Role/Group/User).Return the given named metric for this HTTP Api Gateway Stage.metric
(String metricName, MetricOptions props) Return the given named metric for this HTTP Api Gateway Stage.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
WebSocketStage
protected WebSocketStage(software.amazon.jsii.JsiiObjectRef objRef) -
WebSocketStage
protected WebSocketStage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
WebSocketStage
@Stability(Stable) public WebSocketStage(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WebSocketStageProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromWebSocketStageAttributes
@Stability(Stable) @NotNull public static IWebSocketStage fromWebSocketStageAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull WebSocketStageAttributes attrs) Import an existing stage into this CDK app.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
grantManagementApiAccess
Grant access to the API Gateway management API for this WebSocket API Stage to an IAM principal (Role/Group/User).- Parameters:
identity
- The principal. This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this HTTP Api Gateway Stage. -
metric
Return the given named metric for this HTTP Api Gateway Stage. -
getApi
The API this stage is associated to.- Specified by:
getApi
in interfaceIWebSocketStage
-
getBaseApi
-
getCallbackUrl
The callback URL to this stage.- Specified by:
getCallbackUrl
in interfaceIWebSocketStage
-
getStageName
The name of the stage;its primary identifier.
- Specified by:
getStageName
in interfaceIStage
-
getUrl
The websocket URL to this stage.
-