« blib/lib/Paws/ApiGatewayV2/CreateApiResponse.pm
↑ Summary
blib/lib/Paws/ApiGatewayV2/CreateAuthorizerInput.pm »
| 1 | |||
| 2 | package Paws::ApiGatewayV2::CreateAuthorizer; | ||
| 3 | use Moose; | ||
| 4 | has ApiId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'apiId', required => 1); | ||
| 5 | has AuthorizerCredentialsArn => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerCredentialsArn'); | ||
| 6 | has AuthorizerPayloadFormatVersion => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerPayloadFormatVersion'); | ||
| 7 | has AuthorizerResultTtlInSeconds => (is => 'ro', isa => 'Int', traits => ['NameInRequest'], request_name => 'authorizerResultTtlInSeconds'); | ||
| 8 | has AuthorizerType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerType', required => 1); | ||
| 9 | has AuthorizerUri => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerUri'); | ||
| 10 | has EnableSimpleResponses => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'enableSimpleResponses'); | ||
| 11 | has IdentitySource => (is => 'ro', isa => 'ArrayRef[Str|Undef]', traits => ['NameInRequest'], request_name => 'identitySource', required => 1); | ||
| 12 | has IdentityValidationExpression => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'identityValidationExpression'); | ||
| 13 | has JwtConfiguration => (is => 'ro', isa => 'Paws::ApiGatewayV2::JWTConfiguration', traits => ['NameInRequest'], request_name => 'jwtConfiguration'); | ||
| 14 | has Name => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'name', required => 1); | ||
| 15 | |||
| 16 | use MooseX::ClassAttribute; | ||
| 17 | |||
| 18 | class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateAuthorizer'); | ||
| 19 | class_has _api_uri => (isa => 'Str', is => 'ro', default => '/v2/apis/{apiId}/authorizers'); | ||
| 20 | class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); | ||
| 21 | class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApiGatewayV2::CreateAuthorizerResponse'); | ||
| 22 | 1; | ||
| 23 | |||
| 24 | ### main pod documentation begin ### | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | Paws::ApiGatewayV2::CreateAuthorizer - Arguments for method CreateAuthorizer on L<Paws::ApiGatewayV2> | ||
| 29 | |||
| 30 | =head1 DESCRIPTION | ||
| 31 | |||
| 32 | This class represents the parameters used for calling the method CreateAuthorizer on the | ||
| 33 | L<AmazonApiGatewayV2|Paws::ApiGatewayV2> service. Use the attributes of this class | ||
| 34 | as arguments to method CreateAuthorizer. | ||
| 35 | |||
| 36 | You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateAuthorizer. | ||
| 37 | |||
| 38 | =head1 SYNOPSIS | ||
| 39 | |||
| 40 | my $apigateway = Paws->service('ApiGatewayV2'); | ||
| 41 | my $CreateAuthorizerResponse = $apigateway->CreateAuthorizer( | ||
| 42 | ApiId => 'My__string', | ||
| 43 | AuthorizerType => 'REQUEST', | ||
| 44 | IdentitySource => [ 'My__string', ... ], | ||
| 45 | Name => 'MyStringWithLengthBetween1And128', | ||
| 46 | AuthorizerCredentialsArn => 'MyArn', # OPTIONAL | ||
| 47 | AuthorizerPayloadFormatVersion => | ||
| 48 | 'MyStringWithLengthBetween1And64', # OPTIONAL | ||
| 49 | AuthorizerResultTtlInSeconds => 1, # OPTIONAL | ||
| 50 | AuthorizerUri => 'MyUriWithLengthBetween1And2048', # OPTIONAL | ||
| 51 | EnableSimpleResponses => 1, # OPTIONAL | ||
| 52 | IdentityValidationExpression => | ||
| 53 | 'MyStringWithLengthBetween0And1024', # OPTIONAL | ||
| 54 | JwtConfiguration => { | ||
| 55 | Audience => [ 'My__string', ... ], # OPTIONAL | ||
| 56 | Issuer => 'MyUriWithLengthBetween1And2048', | ||
| 57 | }, # OPTIONAL | ||
| 58 | ); | ||
| 59 | |||
| 60 | # Results: | ||
| 61 | my $AuthorizerCredentialsArn = | ||
| 62 | $CreateAuthorizerResponse->AuthorizerCredentialsArn; | ||
| 63 | my $AuthorizerId = $CreateAuthorizerResponse->AuthorizerId; | ||
| 64 | my $AuthorizerPayloadFormatVersion = | ||
| 65 | $CreateAuthorizerResponse->AuthorizerPayloadFormatVersion; | ||
| 66 | my $AuthorizerResultTtlInSeconds = | ||
| 67 | $CreateAuthorizerResponse->AuthorizerResultTtlInSeconds; | ||
| 68 | my $AuthorizerType = $CreateAuthorizerResponse->AuthorizerType; | ||
| 69 | my $AuthorizerUri = $CreateAuthorizerResponse->AuthorizerUri; | ||
| 70 | my $EnableSimpleResponses = | ||
| 71 | $CreateAuthorizerResponse->EnableSimpleResponses; | ||
| 72 | my $IdentitySource = $CreateAuthorizerResponse->IdentitySource; | ||
| 73 | my $IdentityValidationExpression = | ||
| 74 | $CreateAuthorizerResponse->IdentityValidationExpression; | ||
| 75 | my $JwtConfiguration = $CreateAuthorizerResponse->JwtConfiguration; | ||
| 76 | my $Name = $CreateAuthorizerResponse->Name; | ||
| 77 | |||
| 78 | # Returns a L<Paws::ApiGatewayV2::CreateAuthorizerResponse> object. | ||
| 79 | |||
| 80 | Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. | ||
| 81 | For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/apigateway/CreateAuthorizer> | ||
| 82 | |||
| 83 | =head1 ATTRIBUTES | ||
| 84 | |||
| 85 | |||
| 86 | =head2 B<REQUIRED> ApiId => Str | ||
| 87 | |||
| 88 | The API identifier. | ||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | =head2 AuthorizerCredentialsArn => Str | ||
| 93 | |||
| 94 | Specifies the required credentials as an IAM role for API Gateway to | ||
| 95 | invoke the authorizer. To specify an IAM role for API Gateway to | ||
| 96 | assume, use the role's Amazon Resource Name (ARN). To use | ||
| 97 | resource-based permissions on the Lambda function, don't specify this | ||
| 98 | parameter. Supported only for REQUEST authorizers. | ||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | =head2 AuthorizerPayloadFormatVersion => Str | ||
| 103 | |||
| 104 | Specifies the format of the payload sent to an HTTP API Lambda | ||
| 105 | authorizer. Required for HTTP API Lambda authorizers. Supported values | ||
| 106 | are 1.0 and 2.0. To learn more, see Working with AWS Lambda authorizers | ||
| 107 | for HTTP APIs | ||
| 108 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html). | ||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | =head2 AuthorizerResultTtlInSeconds => Int | ||
| 113 | |||
| 114 | The time to live (TTL) for cached authorizer results, in seconds. If it | ||
| 115 | equals 0, authorization caching is disabled. If it is greater than 0, | ||
| 116 | API Gateway caches authorizer responses. The maximum value is 3600, or | ||
| 117 | 1 hour. Supported only for HTTP API Lambda authorizers. | ||
| 118 | |||
| 119 | |||
| 120 | |||
| 121 | =head2 B<REQUIRED> AuthorizerType => Str | ||
| 122 | |||
| 123 | The authorizer type. Specify REQUEST for a Lambda function using | ||
| 124 | incoming request parameters. Specify JWT to use JSON Web Tokens | ||
| 125 | (supported only for HTTP APIs). | ||
| 126 | |||
| 127 | Valid values are: C<"REQUEST">, C<"JWT"> | ||
| 128 | |||
| 129 | =head2 AuthorizerUri => Str | ||
| 130 | |||
| 131 | The authorizer's Uniform Resource Identifier (URI). For REQUEST | ||
| 132 | authorizers, this must be a well-formed Lambda function URI, for | ||
| 133 | example, | ||
| 134 | 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. | ||
| 135 | In general, the URI has this form: | ||
| 136 | arn:aws:apigateway:{region}:lambda:path/{service_api} , where {region} | ||
| 137 | is the same as the region hosting the Lambda function, path indicates | ||
| 138 | that the remaining substring in the URI should be treated as the path | ||
| 139 | to the resource, including the initial /. For Lambda functions, this is | ||
| 140 | usually of the form /2015-03-31/functions/[FunctionARN]/invocations. | ||
| 141 | Supported only for REQUEST authorizers. | ||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | =head2 EnableSimpleResponses => Bool | ||
| 146 | |||
| 147 | Specifies whether a Lambda authorizer returns a response in a simple | ||
| 148 | format. By default, a Lambda authorizer must return an IAM policy. If | ||
| 149 | enabled, the Lambda authorizer can return a boolean value instead of an | ||
| 150 | IAM policy. Supported only for HTTP APIs. To learn more, see Working | ||
| 151 | with AWS Lambda authorizers for HTTP APIs | ||
| 152 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html) | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | =head2 B<REQUIRED> IdentitySource => ArrayRef[Str|Undef] | ||
| 157 | |||
| 158 | The identity source for which authorization is requested. | ||
| 159 | |||
| 160 | For a REQUEST authorizer, this is optional. The value is a set of one | ||
| 161 | or more mapping expressions of the specified request parameters. The | ||
| 162 | identity source can be headers, query string parameters, stage | ||
| 163 | variables, and context parameters. For example, if an Auth header and a | ||
| 164 | Name query string parameter are defined as identity sources, this value | ||
| 165 | is route.request.header.Auth, route.request.querystring.Name for | ||
| 166 | WebSocket APIs. For HTTP APIs, use selection expressions prefixed with | ||
| 167 | $, for example, $request.header.Auth, $request.querystring.Name. These | ||
| 168 | parameters are used to perform runtime validation for Lambda-based | ||
| 169 | authorizers by verifying all of the identity-related request parameters | ||
| 170 | are present in the request, not null, and non-empty. Only when this is | ||
| 171 | true does the authorizer invoke the authorizer Lambda function. | ||
| 172 | Otherwise, it returns a 401 Unauthorized response without calling the | ||
| 173 | Lambda function. For HTTP APIs, identity sources are also used as the | ||
| 174 | cache key when caching is enabled. To learn more, see Working with AWS | ||
| 175 | Lambda authorizers for HTTP APIs | ||
| 176 | (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-lambda-authorizer.html). | ||
| 177 | |||
| 178 | For JWT, a single entry that specifies where to extract the JSON Web | ||
| 179 | Token (JWT) from inbound requests. Currently only header-based and | ||
| 180 | query parameter-based selections are supported, for example | ||
| 181 | $request.header.Authorization. | ||
| 182 | |||
| 183 | |||
| 184 | |||
| 185 | =head2 IdentityValidationExpression => Str | ||
| 186 | |||
| 187 | This parameter is not used. | ||
| 188 | |||
| 189 | |||
| 190 | |||
| 191 | =head2 JwtConfiguration => L<Paws::ApiGatewayV2::JWTConfiguration> | ||
| 192 | |||
| 193 | Represents the configuration of a JWT authorizer. Required for the JWT | ||
| 194 | authorizer type. Supported only for HTTP APIs. | ||
| 195 | |||
| 196 | |||
| 197 | |||
| 198 | =head2 B<REQUIRED> Name => Str | ||
| 199 | |||
| 200 | The name of the authorizer. | ||
| 201 | |||
| 202 | |||
| 203 | |||
| 204 | |||
| 205 | =head1 SEE ALSO | ||
| 206 | |||
| 207 | This class forms part of L<Paws>, documenting arguments for method CreateAuthorizer in L<Paws::ApiGatewayV2> | ||
| 208 | |||
| 209 | =head1 BUGS and CONTRIBUTIONS | ||
| 210 | |||
| 211 | The source code is located here: L<https://github.com/pplu/aws-sdk-perl> | ||
| 212 | |||
| 213 | Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues> | ||
| 214 | |||
| 215 | =cut | ||
| 216 |