File Coverage

blib/lib/Paws/ApiGateway/Authorizer.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::ApiGateway::Authorizer;
3 1     1   548 use Moose;
  1         3  
  1         9  
4             has AuthorizerCredentials => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerCredentials');
5             has AuthorizerResultTtlInSeconds => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'authorizerResultTtlInSeconds');
6             has AuthorizerUri => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerUri');
7             has AuthType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authType');
8             has Id => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'id');
9             has IdentitySource => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'identitySource');
10             has IdentityValidationExpression => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'identityValidationExpression');
11             has Name => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'name');
12             has ProviderARNs => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'providerARNs');
13             has Type => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'type');
14              
15             has _request_id => (is => 'ro', isa => 'Str');
16             1;
17              
18             ### main pod documentation begin ###
19              
20             =head1 NAME
21              
22             Paws::ApiGateway::Authorizer
23              
24             =head1 ATTRIBUTES
25              
26              
27             =head2 AuthorizerCredentials => Str
28              
29             Specifies the required credentials as an IAM role for Amazon API
30             Gateway to invoke the authorizer. To specify an IAM role for Amazon API
31             Gateway to assume, use the role's Amazon Resource Name (ARN). To use
32             resource-based permissions on the Lambda function, specify null.
33              
34              
35             =head2 AuthorizerResultTtlInSeconds => Int
36              
37             The TTL in seconds of cached authorizer results. If it equals 0,
38             authorization caching is disabled. If it is greater than 0, API Gateway
39             will cache authorizer responses. If this field is not set, the default
40             value is 300. The maximum value is 3600, or 1 hour.
41              
42              
43             =head2 AuthorizerUri => Str
44              
45             Specifies the authorizer's Uniform Resource Identifier (URI). For
46             C<TOKEN> or C<REQUEST> authorizers, this must be a well-formed Lambda
47             function URI, for example,
48             C<arn:aws:apigateway:us-west-2:lambda:path/2015-03-31/functions/arn:aws:lambda:us-west-2:{account_id}:function:{lambda_function_name}/invocations>.
49             In general, the URI has this form
50             C<arn:aws:apigateway:{region}:lambda:path/{service_api}>, where
51             C<{region}> is the same as the region hosting the Lambda function,
52             C<path> indicates that the remaining substring in the URI should be
53             treated as the path to the resource, including the initial C</>. For
54             Lambda functions, this is usually of the form
55             C</2015-03-31/functions/[FunctionARN]/invocations>.
56              
57              
58             =head2 AuthType => Str
59              
60             Optional customer-defined field, used in Swagger imports and exports
61             without functional impact.
62              
63              
64             =head2 Id => Str
65              
66             The identifier for the authorizer resource.
67              
68              
69             =head2 IdentitySource => Str
70              
71             The identity source for which authorization is requested.
72              
73             =over
74              
75             =item * For a C<TOKEN> authorizer, this is required and specifies the
76             request header mapping expression for the custom header holding the
77             authorization token submitted by the client. For example, if the token
78             header name is C<Auth>, the header mapping expression is
79             C<method.request.header.Auth>.
80              
81             =item * For the C<REQUEST> authorizer, this is required when
82             authorization caching is enabled. The value is a comma-separated string
83             of one or more mapping expressions of the specified request parameters.
84             For example, if an C<Auth> header, a C<Name> query string parameter are
85             defined as identity sources, this value is
86             C<method.request.header.Auth, method.request.querystring.Name>. These
87             parameters will be used to derive the authorization caching key and to
88             perform runtime validation of the C<REQUEST> authorizer by verifying
89             all of the identity-related request parameters are present, not null
90             and non-empty. Only when this is true does the authorizer invoke the
91             authorizer Lambda function, otherwise, it returns a 401 Unauthorized
92             response without calling the Lambda function. The valid value is a
93             string of comma-separated mapping expressions of the specified request
94             parameters. When the authorization caching is not enabled, this
95             property is optional.
96              
97             =item * For a C<COGNITO_USER_POOLS> authorizer, this property is not
98             used.
99              
100             =back
101              
102              
103              
104             =head2 IdentityValidationExpression => Str
105              
106             A validation expression for the incoming identity token. For C<TOKEN>
107             authorizers, this value is a regular expression. Amazon API Gateway
108             will match the incoming token from the client against the specified
109             regular expression. It will invoke the authorizer's Lambda function
110             there is a match. Otherwise, it will return a 401 Unauthorized response
111             without calling the Lambda function. The validation expression does not
112             apply to the C<REQUEST> authorizer.
113              
114              
115             =head2 Name => Str
116              
117             [Required] The name of the authorizer.
118              
119              
120             =head2 ProviderARNs => ArrayRef[Str|Undef]
121              
122             A list of the Amazon Cognito user pool ARNs for the
123             C<COGNITO_USER_POOLS> authorizer. Each element is of this format:
124             C<arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}>.
125             For a C<TOKEN> or C<REQUEST> authorizer, this is not defined.
126              
127              
128             =head2 Type => Str
129              
130             [Required] The authorizer type. Valid values are C<TOKEN> for a Lambda
131             function using a single authorization token submitted in a custom
132             header, C<REQUEST> for a Lambda function using incoming request
133             parameters, and C<COGNITO_USER_POOLS> for using an Amazon Cognito user
134             pool.
135              
136             Valid values are: C<"TOKEN">, C<"REQUEST">, C<"COGNITO_USER_POOLS">
137             =head2 _request_id => Str
138              
139              
140             =cut
141