| 1 | |||
| 2 | package Paws::ApiGateway::Authorizer; | ||
| 3 | use Moose; | ||
| 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 API Gateway to | ||
| 30 | invoke the authorizer. To specify an IAM role for API Gateway to | ||
| 31 | 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 OpenAPI 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> or C<COGNITO_USER_POOLS> authorizer, this is | ||
| 76 | required and specifies the request header mapping expression for the | ||
| 77 | custom header holding the authorization token submitted by the client. | ||
| 78 | For example, if the token header name is C<Auth>, the header mapping | ||
| 79 | expression is 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 | =back | ||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | =head2 IdentityValidationExpression => Str | ||
| 102 | |||
| 103 | A validation expression for the incoming identity token. For C<TOKEN> | ||
| 104 | authorizers, this value is a regular expression. For | ||
| 105 | C<COGNITO_USER_POOLS> authorizers, API Gateway will match the C<aud> | ||
| 106 | field of the incoming token from the client against the specified | ||
| 107 | regular expression. It will invoke the authorizer's Lambda function | ||
| 108 | when there is a match. Otherwise, it will return a 401 Unauthorized | ||
| 109 | response without calling the Lambda function. The validation expression | ||
| 110 | does not apply to the C<REQUEST> authorizer. | ||
| 111 | |||
| 112 | |||
| 113 | =head2 Name => Str | ||
| 114 | |||
| 115 | [Required] The name of the authorizer. | ||
| 116 | |||
| 117 | |||
| 118 | =head2 ProviderARNs => ArrayRef[Str|Undef] | ||
| 119 | |||
| 120 | A list of the Amazon Cognito user pool ARNs for the | ||
| 121 | C<COGNITO_USER_POOLS> authorizer. Each element is of this format: | ||
| 122 | C<arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}>. | ||
| 123 | For a C<TOKEN> or C<REQUEST> authorizer, this is not defined. | ||
| 124 | |||
| 125 | |||
| 126 | =head2 Type => Str | ||
| 127 | |||
| 128 | The authorizer type. Valid values are C<TOKEN> for a Lambda function | ||
| 129 | using a single authorization token submitted in a custom header, | ||
| 130 | C<REQUEST> for a Lambda function using incoming request parameters, and | ||
| 131 | C<COGNITO_USER_POOLS> for using an Amazon Cognito user pool. | ||
| 132 | |||
| 133 | Valid values are: C<"TOKEN">, C<"REQUEST">, C<"COGNITO_USER_POOLS"> | ||
| 134 | =head2 _request_id => Str | ||
| 135 | |||
| 136 | |||
| 137 | =cut | ||
| 138 |