amazonka-apigatewayv2-2.0: Amazon ApiGatewayV2 SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

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
ToJSON CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.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

AWSRequest CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Associated Types

type AWSResponse CreateRoute #

Generic CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Associated Types

type Rep CreateRoute :: Type -> Type #

Read CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Show CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

NFData CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Methods

rnf :: CreateRoute -> () #

Eq CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Hashable CreateRoute Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

type AWSResponse 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" "amazonka-apigatewayv2-2.0-4MZ8oueToeLOWomgegceF" 'False) (C1 ('MetaCons "CreateRoute'" 'PrefixI 'True) (((S1 ('MetaSel ('Just "apiKeyRequired") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "authorizationScopes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "authorizationType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AuthorizationType)))) :*: (S1 ('MetaSel ('Just "authorizerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "modelSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "operationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "requestModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text Text))) :*: (S1 ('MetaSel ('Just "requestParameters") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text ParameterConstraints))) :*: S1 ('MetaSel ('Just "routeResponseSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))) :*: (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))))))

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:

CreateRoute, createRoute_apiKeyRequired - Specifies whether an API key is required for the route. Supported only for WebSocket APIs.

CreateRoute, createRoute_authorizationScopes - The authorization scopes supported by this route.

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.

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.

CreateRoute, createRoute_modelSelectionExpression - The model selection expression for the route. Supported only for WebSocket APIs.

CreateRoute, createRoute_operationName - The operation name for the route.

CreateRoute, createRoute_requestModels - The request models for the route. Supported only for WebSocket APIs.

CreateRoute, createRoute_requestParameters - The request parameters for the route. Supported only for WebSocket APIs.

CreateRoute, createRoute_routeResponseSelectionExpression - The route response selection expression for the route. Supported only for WebSocket APIs.

CreateRoute, createRoute_target - The target for the route.

CreateRoute, createRoute_apiId - The API identifier.

CreateRoute, createRoute_routeKey - The route key for the route.

Request Lenses

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

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

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

The authorization scopes supported by this 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_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_modelSelectionExpression :: Lens' CreateRoute (Maybe Text) Source #

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

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

The operation name for the route.

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

The request models 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_routeResponseSelectionExpression :: Lens' CreateRoute (Maybe Text) Source #

The route response selection expression 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

  • 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.

  • apiKeyRequired :: Maybe Bool

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

  • 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.

  • 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.

  • 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.

  • modelSelectionExpression :: Maybe Text

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

  • operationName :: Maybe Text

    The operation name for the route.

  • requestModels :: Maybe (HashMap Text Text)

    The request models 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.

  • routeKey :: Maybe Text

    The route key for the route.

  • routeResponseSelectionExpression :: Maybe Text

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

  • target :: Maybe Text

    The target for the route.

  • httpStatus :: Int

    The response's http status code.

Instances

Instances details
Generic CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Associated Types

type Rep CreateRouteResponse' :: Type -> Type #

Read CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Show CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

NFData CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

Methods

rnf :: CreateRouteResponse' -> () #

Eq CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

type Rep CreateRouteResponse' Source # 
Instance details

Defined in Amazonka.ApiGatewayV2.CreateRoute

type Rep CreateRouteResponse' = D1 ('MetaData "CreateRouteResponse'" "Amazonka.ApiGatewayV2.CreateRoute" "amazonka-apigatewayv2-2.0-4MZ8oueToeLOWomgegceF" 'False) (C1 ('MetaCons "CreateRouteResponse''" 'PrefixI 'True) (((S1 ('MetaSel ('Just "apiGatewayManaged") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "apiKeyRequired") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "authorizationScopes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: ((S1 ('MetaSel ('Just "authorizationType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe AuthorizationType)) :*: S1 ('MetaSel ('Just "authorizerId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "modelSelectionExpression") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "operationName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 ('MetaSel ('Just "requestModels") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (HashMap Text 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 "routeKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "routeResponseSelectionExpression") '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:

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.

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

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.

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.

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.

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

CreateRoute, createRouteResponse'_operationName - The operation name for the route.

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

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

CreateRouteResponse', createRouteResponse'_routeId - The route ID.

CreateRoute, createRouteResponse'_routeKey - The route key for the route.

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

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

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

Response Lenses

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'_apiKeyRequired :: Lens' CreateRouteResponse' (Maybe Bool) Source #

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

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'_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'_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'_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'_requestParameters :: Lens' CreateRouteResponse' (Maybe (HashMap Text ParameterConstraints)) Source #

The request parameters 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.