Route class

Represents a route.

Constructors

Route({required String routeKey, bool? apiGatewayManaged, bool? apiKeyRequired, List<String>? authorizationScopes, AuthorizationType? authorizationType, String? authorizerId, String? modelSelectionExpression, String? operationName, Map<String, String>? requestModels, Map<String, ParameterConstraints>? requestParameters, String? routeId, String? routeResponseSelectionExpression, String? target})
Route.fromJson(Map<String, dynamic> json)
factory

Properties

apiGatewayManaged bool?
Specifies whether a route is managed by API Gateway. If you created an API using quick create, the $default route is managed by API Gateway. You can't modify the $default route key.
final
apiKeyRequired bool?
Specifies whether an API key is required for this route. Supported only for WebSocket APIs.
final
authorizationScopes List<String>?
A list of authorization scopes configured on a route. The scopes are used with a JWT authorizer to authorize the method invocation. The authorization works by matching the route scopes against the scopes parsed from the access token in the incoming request. The method invocation is authorized if any route scope matches a claimed scope in the access token. Otherwise, the invocation is not authorized. When the route scope is configured, the client must provide an access token instead of an identity token for authorization purposes.
final
authorizationType AuthorizationType?
The authorization type for the route. For WebSocket APIs, valid values are NONE for open access, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer For HTTP APIs, valid values are NONE for open access, JWT for using JSON Web Tokens, AWS_IAM for using AWS IAM permissions, and CUSTOM for using a Lambda authorizer.
final
authorizerId String?
The identifier of the Authorizer resource to be associated with this route. The authorizer identifier is generated by API Gateway when you created the authorizer.
final
hashCode int
The hash code for this object.
no setterinherited
modelSelectionExpression String?
The model selection expression for the route. Supported only for WebSocket APIs.
final
operationName String?
The operation name for the route.
final
requestModels Map<String, String>?
The request models for the route. Supported only for WebSocket APIs.
final
requestParameters Map<String, ParameterConstraints>?
The request parameters for the route. Supported only for WebSocket APIs.
final
routeId String?
The route ID.
final
routeKey String
The route key for the route.
final
routeResponseSelectionExpression String?
The route response selection expression for the route. Supported only for WebSocket APIs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
target String?
The target for the route.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited