Class WebSocketStage
(experimental) Represents a stage where an instance of the API is deployed.
Inherited Members
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class WebSocketStage : Resource, IWebSocketStage, IStage, IResource, IConstruct, IDependable
Syntax (vb)
Public Class WebSocketStage
Inherits Resource
Implements IWebSocketStage, IStage, IResource, IConstruct, IDependable
Remarks
Stability: Experimental
Resource: AWS::ApiGatewayV2::Stage
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
Function messageHandler;
var webSocketApi = new WebSocketApi(this, "mywsapi");
new WebSocketStage(this, "mystage", new WebSocketStageProps {
WebSocketApi = webSocketApi,
StageName = "dev",
AutoDeploy = true
});
webSocketApi.AddRoute("sendmessage", new WebSocketRouteOptions {
Integration = new WebSocketLambdaIntegration("SendMessageIntegration", messageHandler)
});
Synopsis
Constructors
WebSocketStage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
WebSocketStage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
WebSocketStage(Construct, String, IWebSocketStageProps) |
Properties
Api | (experimental) The API this stage is associated to. |
BaseApi | |
CallbackUrl | (experimental) The callback URL to this stage. |
StageName | (experimental) The name of the stage; |
Url | (experimental) The websocket URL to this stage. |
Methods
FromWebSocketStageAttributes(Construct, String, IWebSocketStageAttributes) | (experimental) Import an existing stage into this CDK app. |
GrantManagementApiAccess(IGrantable) | (experimental) Grant access to the API Gateway management API for this WebSocket API Stage to an IAM principal (Role/Group/User). |
Metric(String, IMetricOptions) | (experimental) Return the given named metric for this HTTP Api Gateway Stage. |
Constructors
WebSocketStage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected WebSocketStage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
WebSocketStage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected WebSocketStage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
WebSocketStage(Construct, String, IWebSocketStageProps)
public WebSocketStage(Construct scope, string id, IWebSocketStageProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IWebSocketStageProps
Remarks
Stability: Experimental
Properties
Api
(experimental) The API this stage is associated to.
public virtual IWebSocketApi Api { get; }
Property Value
Remarks
Stability: Experimental
BaseApi
CallbackUrl
(experimental) The callback URL to this stage.
public virtual string CallbackUrl { get; }
Property Value
System.String
Remarks
Stability: Experimental
StageName
(experimental) The name of the stage;
public virtual string StageName { get; }
Property Value
System.String
Remarks
its primary identifier.
Stability: Experimental
Url
(experimental) The websocket URL to this stage.
public virtual string Url { get; }
Property Value
System.String
Remarks
Stability: Experimental
Methods
FromWebSocketStageAttributes(Construct, String, IWebSocketStageAttributes)
(experimental) Import an existing stage into this CDK app.
public static IWebSocketStage FromWebSocketStageAttributes(Construct scope, string id, IWebSocketStageAttributes attrs)
Parameters
- scope Constructs.Construct
- id System.String
- attrs IWebSocketStageAttributes
Returns
Remarks
Stability: Experimental
GrantManagementApiAccess(IGrantable)
(experimental) Grant access to the API Gateway management API for this WebSocket API Stage to an IAM principal (Role/Group/User).
public virtual Grant GrantManagementApiAccess(IGrantable identity)
Parameters
- identity IGrantable
The principal.
Returns
Remarks
Stability: Experimental
Metric(String, IMetricOptions)
(experimental) Return the given named metric for this HTTP Api Gateway Stage.
public virtual Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
Remarks
Stability: Experimental