libZSservicesZSamazonka-apigatewayv2ZSamazonka-apigatewayv2
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ApiGatewayV2.CreateRoute

Description

Creates a Route for an API.

Synopsis

Creating a Request

data CreateRoute Source #

Creates a new Route resource to represent a route.

See: newCreateRoute smart constructor.

Constructors

CreateRoute' 

Fields

Instances

Instances details
Eq CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Read CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Show CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Generic CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Associated Types

type Rep CreateRoute :: Type -> Type #

NFData CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Methods

rnf :: CreateRoute -> () #

Hashable CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

ToJSON CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

AWSRequest CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Associated Types

type AWSResponse CreateRoute #

ToHeaders CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Methods

toHeaders :: CreateRoute -> [Header] #

ToPath CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

ToQuery CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

type Rep CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

type Rep CreateRoute = D1 ('MetaData "CreateRoute" "Amazonka.ApiGatewayV2.CreateRoute" "libZSservicesZSamazonka-apigatewayv2ZSamazonka-apigatewayv2" 'False) (C1 ('MetaCons "CreateRoute'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "authorizationScopes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "modelSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "requestModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))))) :*: (S1 ('MetaSel ('Just "routeResponseSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "requestParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text ParameterConstraints))) :*: S1 ('MetaSel ('Just "authorizerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "operationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "authorizationType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AuthorizationType)) :*: S1 ('MetaSel ('Just "apiKeyRequired") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "apiId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "routeKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))))
type AWSResponse CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

newCreateRoute Source #

Create a value of CreateRoute with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:authorizationScopes:CreateRoute', createRoute_authorizationScopes - The authorization scopes supported by this route.

$sel:modelSelectionExpression:CreateRoute', createRoute_modelSelectionExpression - The model selection expression for the route. Supported only for WebSocket APIs.

$sel:requestModels:CreateRoute', createRoute_requestModels - The request models for the route. Supported only for WebSocket APIs.

$sel:routeResponseSelectionExpression:CreateRoute', createRoute_routeResponseSelectionExpression - The route response selection expression for the route. Supported only for WebSocket APIs.

$sel:requestParameters:CreateRoute', createRoute_requestParameters - The request parameters for the route. Supported only for WebSocket APIs.

$sel:authorizerId:CreateRoute', createRoute_authorizerId - 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.

$sel:operationName:CreateRoute', createRoute_operationName - The operation name for the route.

$sel:authorizationType:CreateRoute', createRoute_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.

$sel:apiKeyRequired:CreateRoute', createRoute_apiKeyRequired - Specifies whether an API key is required for the route. Supported only for WebSocket APIs.

$sel:target:CreateRoute', createRoute_target - The target for the route.

$sel:apiId:CreateRoute', createRoute_apiId - The API identifier.

$sel:routeKey:CreateRoute', createRoute_routeKey - The route key for the route.

Request Lenses

createRoute_authorizationScopes :: Lens' CreateRoute (Maybe [Text]) Source #

The authorization scopes supported by this route.

createRoute_modelSelectionExpression :: Lens' CreateRoute (Maybe Text) Source #

The model selection expression for the route. Supported only for WebSocket APIs.

createRoute_requestModels :: Lens' CreateRoute (Maybe (HashMap Text Text)) Source #

The request models for the route. Supported only for WebSocket APIs.

createRoute_routeResponseSelectionExpression :: Lens' CreateRoute (Maybe Text) Source #

The route response selection expression for the route. Supported only for WebSocket APIs.

createRoute_requestParameters :: Lens' CreateRoute (Maybe (HashMap Text ParameterConstraints)) Source #

The request parameters for the route. Supported only for WebSocket APIs.

createRoute_authorizerId :: Lens' CreateRoute (Maybe Text) Source #

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.

createRoute_operationName :: Lens' CreateRoute (Maybe Text) Source #

The operation name for the route.

createRoute_authorizationType :: Lens' CreateRoute (Maybe AuthorizationType) Source #

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.

createRoute_apiKeyRequired :: Lens' CreateRoute (Maybe Bool) Source #

Specifies whether an API key is required for the route. Supported only for WebSocket APIs.

createRoute_target :: Lens' CreateRoute (Maybe Text) Source #

The target for the route.

createRoute_routeKey :: Lens' CreateRoute Text Source #

The route key for the route.

Destructuring the Response

data CreateRouteResponse' Source #

See: newCreateRouteResponse' smart constructor.

Constructors

CreateRouteResponse'' 

Fields

  • authorizationScopes :: Maybe [Text]

    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.

  • modelSelectionExpression :: Maybe Text

    The model selection expression for the route. Supported only for WebSocket APIs.

  • requestModels :: Maybe (HashMap Text Text)

    The request models for the route. Supported only for WebSocket APIs.

  • routeResponseSelectionExpression :: Maybe Text

    The route response selection expression for the route. Supported only for WebSocket APIs.

  • requestParameters :: Maybe (HashMap Text ParameterConstraints)

    The request parameters for the route. Supported only for WebSocket APIs.

  • routeId :: Maybe Text

    The route ID.

  • authorizerId :: Maybe Text

    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.

  • operationName :: Maybe Text

    The operation name for the route.

  • apiGatewayManaged :: Maybe 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.

  • authorizationType :: Maybe 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.

  • apiKeyRequired :: Maybe Bool

    Specifies whether an API key is required for this route. Supported only for WebSocket APIs.

  • routeKey :: Maybe Text

    The route key for the route.

  • target :: Maybe Text

    The target for the route.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Eq CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Read CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Show CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Generic CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Associated Types

type Rep CreateRouteResponse' :: Type -> Type #

NFData CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Methods

rnf :: CreateRouteResponse' -> () #

type Rep CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

type Rep CreateRouteResponse' = D1 ('MetaData "CreateRouteResponse'" "Amazonka.ApiGatewayV2.CreateRoute" "libZSservicesZSamazonka-apigatewayv2ZSamazonka-apigatewayv2" 'False) (C1 ('MetaCons "CreateRouteResponse''" 'PrefixI 'True) (((S1 ('MetaSel ('Just "authorizationScopes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "modelSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "requestModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))))) :*: ((S1 ('MetaSel ('Just "routeResponseSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "requestParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text ParameterConstraints)))) :*: (S1 ('MetaSel ('Just "routeId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "authorizerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "operationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "apiGatewayManaged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "authorizationType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AuthorizationType)))) :*: ((S1 ('MetaSel ('Just "apiKeyRequired") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "routeKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))))

newCreateRouteResponse' Source #

Create a value of CreateRouteResponse' with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:authorizationScopes:CreateRoute', createRouteResponse'_authorizationScopes - 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.

$sel:modelSelectionExpression:CreateRoute', createRouteResponse'_modelSelectionExpression - The model selection expression for the route. Supported only for WebSocket APIs.

$sel:requestModels:CreateRoute', createRouteResponse'_requestModels - The request models for the route. Supported only for WebSocket APIs.

$sel:routeResponseSelectionExpression:CreateRoute', createRouteResponse'_routeResponseSelectionExpression - The route response selection expression for the route. Supported only for WebSocket APIs.

$sel:requestParameters:CreateRoute', createRouteResponse'_requestParameters - The request parameters for the route. Supported only for WebSocket APIs.

$sel:routeId:CreateRouteResponse'', createRouteResponse'_routeId - The route ID.

$sel:authorizerId:CreateRoute', createRouteResponse'_authorizerId - 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.

$sel:operationName:CreateRoute', createRouteResponse'_operationName - The operation name for the route.

$sel:apiGatewayManaged:CreateRouteResponse'', createRouteResponse'_apiGatewayManaged - 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.

$sel:authorizationType:CreateRoute', createRouteResponse'_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.

$sel:apiKeyRequired:CreateRoute', createRouteResponse'_apiKeyRequired - Specifies whether an API key is required for this route. Supported only for WebSocket APIs.

$sel:routeKey:CreateRoute', createRouteResponse'_routeKey - The route key for the route.

$sel:target:CreateRoute', createRouteResponse'_target - The target for the route.

$sel:httpStatus:CreateRouteResponse'', createRouteResponse'_httpStatus - The response's http status code.

Response Lenses

createRouteResponse'_authorizationScopes :: Lens' CreateRouteResponse' (Maybe [Text]) Source #

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.

createRouteResponse'_modelSelectionExpression :: Lens' CreateRouteResponse' (Maybe Text) Source #

The model selection expression for the route. Supported only for WebSocket APIs.

createRouteResponse'_requestModels :: Lens' CreateRouteResponse' (Maybe (HashMap Text Text)) Source #

The request models for the route. Supported only for WebSocket APIs.

createRouteResponse'_routeResponseSelectionExpression :: Lens' CreateRouteResponse' (Maybe Text) Source #

The route response selection expression for the route. Supported only for WebSocket APIs.

createRouteResponse'_requestParameters :: Lens' CreateRouteResponse' (Maybe (HashMap Text ParameterConstraints)) Source #

The request parameters for the route. Supported only for WebSocket APIs.

createRouteResponse'_authorizerId :: Lens' CreateRouteResponse' (Maybe Text) Source #

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.

createRouteResponse'_apiGatewayManaged :: Lens' CreateRouteResponse' (Maybe Bool) Source #

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.

createRouteResponse'_authorizationType :: Lens' CreateRouteResponse' (Maybe AuthorizationType) Source #

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.

createRouteResponse'_apiKeyRequired :: Lens' CreateRouteResponse' (Maybe Bool) Source #

Specifies whether an API key is required for this route. Supported only for WebSocket APIs.