Values.CreateAuthorizerRequestSourceRequest to add a new Authorizer to an existing RestApi resource.
type nonrec t = {restApiId : String_.t;The string identifier of the associated RestApi.
*)name : String_.t;The name of the authorizer.
*)type_ : AuthorizerType.t;The authorizer type. Valid values are TOKEN for a Lambda function using a single authorization token submitted in a custom header, REQUEST for a Lambda function using incoming request parameters, and COGNITO_USER_POOLS for using an Amazon Cognito user pool.
*)providerARNs : ListOfARNs.t option;A list of the Amazon Cognito user pool ARNs for the COGNITO_USER_POOLS authorizer. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}. For a TOKEN or REQUEST authorizer, this is not defined.
*)authType : String_.t option;Optional customer-defined field, used in OpenAPI imports and exports without functional impact.
*)identitySource : String_.t option;The identity source for which authorization is requested. For a TOKEN or COGNITO_USER_POOLS authorizer, this is required and specifies the request header mapping expression for the custom header holding the authorization token submitted by the client. For example, if the token header name is Auth, the header mapping expression is method.request.header.Auth. For the REQUEST authorizer, this is required when authorization caching is enabled. The value is a comma-separated string of one or more mapping expressions of the specified request parameters. For example, if an Auth header, a Name query string parameter are defined as identity sources, this value is method.request.header.Auth, method.request.querystring.Name. These parameters will be used to derive the authorization caching key and to perform runtime validation of the REQUEST authorizer by verifying all of the identity-related request parameters are present, not null and non-empty. Only when this is true does the authorizer invoke the authorizer Lambda function, otherwise, it returns a 401 Unauthorized response without calling the Lambda function. The valid value is a string of comma-separated mapping expressions of the specified request parameters. When the authorization caching is not enabled, this property is optional.
*)identityValidationExpression : String_.t option;A validation expression for the incoming identity token. For TOKEN authorizers, this value is a regular expression. For COGNITO_USER_POOLS authorizers, API Gateway will match the aud field of the incoming token from the client against the specified regular expression. It will invoke the authorizer's Lambda function when there is a match. Otherwise, it will return a 401 Unauthorized response without calling the Lambda function. The validation expression does not apply to the REQUEST authorizer.
*)}val make :
?providerARNs:??? ->
?authType:??? ->
?authorizerUri:??? ->
?authorizerCredentials:??? ->
?identitySource:??? ->
?identityValidationExpression:??? ->
?authorizerResultTtlInSeconds:??? ->
restApiId:String_.t ->
name:String_.t ->
type_:AuthorizerType.t ->
unit ->
tval to_value :
t ->
[> `Structure of
(string
* [> `Enum of string
| `Integer of NullableInteger.t
| `List of [> `String of ProviderARN.t ] list
| `String of String_.t ])
list ]