HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //usr/lib/python3.6/site-packages/awscli/examples/apigatewayv2/update-route.rst
**To add an authorizer to a route**

The following ``update-route`` example updates the specified route to use a JWT authorizer. ::

    aws apigatewayv2 update-route \
        --api-id a1b2c3d4  \
        --route-id a1b2c3  \
        --authorization-type JWT \
        --authorizer-id a1b2c5 \
        --authorization-scopes user.id user.email  

Output::

    {
        "ApiKeyRequired": false,
        "AuthorizationScopes": [
            "user.id",
            "user.email"
        ],
        "AuthorizationType": "JWT",
        "AuthorizerId": "a1b2c5",
        "OperationName": "GET HTTP",
        "RequestParameters": {},
        "RouteId": "a1b2c3",
        "RouteKey": "GET /pets",
        "Target": "integrations/a1b2c6"
    }

For more information, see `Controlling access to HTTP APIs with JWT authorizers <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-jwt-authorizer.html>`__ in the *Amazon API Gateway Developer Guide*.