File Coverage

blib/lib/Paws/ApiGateway/Method.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::Method;
3 1     1   868 use Moose;
  1         4  
  1         103  
4             has ApiKeyRequired => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'apiKeyRequired');
5             has AuthorizationType => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizationType');
6             has AuthorizerId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'authorizerId');
7             has HttpMethod => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'httpMethod');
8             has MethodIntegration => (is => 'ro', isa => 'Paws::ApiGateway::Integration', traits => ['NameInRequest'], request_name => 'methodIntegration');
9             has MethodResponses => (is => 'ro', isa => 'Paws::ApiGateway::MapOfMethodResponse', traits => ['NameInRequest'], request_name => 'methodResponses');
10             has OperationName => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'operationName');
11             has RequestModels => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToString', traits => ['NameInRequest'], request_name => 'requestModels');
12             has RequestParameters => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToBoolean', traits => ['NameInRequest'], request_name => 'requestParameters');
13             has RequestValidatorId => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'requestValidatorId');
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::Method
23              
24             =head1 ATTRIBUTES
25              
26              
27             =head2 ApiKeyRequired => Bool
28              
29             A boolean flag specifying whether a valid ApiKey is required to invoke
30             this method.
31              
32              
33             =head2 AuthorizationType => Str
34              
35             The method's authorization type. Valid values are C<NONE> for open
36             access, C<AWS_IAM> for using AWS IAM permissions, C<CUSTOM> for using a
37             custom authorizer, or C<COGNITO_USER_POOLS> for using a Cognito user
38             pool.
39              
40              
41             =head2 AuthorizerId => Str
42              
43             The identifier of an Authorizer to use on this method. The
44             C<authorizationType> must be C<CUSTOM>.
45              
46              
47             =head2 HttpMethod => Str
48              
49             The method's HTTP verb.
50              
51              
52             =head2 MethodIntegration => L<Paws::ApiGateway::Integration>
53              
54             Gets the method's integration responsible for passing the
55             client-submitted request to the back end and performing necessary
56             transformations to make the request compliant with the back end.
57              
58             =head1 Example:
59              
60             =head2 Request
61              
62             GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T213210Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
63              
64             =head2 Response
65              
66             The successful response returns a C<200 OK> status code and a payload
67             similar to the following:
68              
69             { "_links": { "curies": [ { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-{rel}.html", "name": "integration", "templated": true }, { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-integration-response-{rel}.html", "name": "integrationresponse", "templated": true } ], "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integration:responses": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integration:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration" }, "integrationresponse:put": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/{status_code}", "templated": true } }, "cacheKeyParameters": [], "cacheNamespace": "0cjtch", "credentials": "arn:aws:iam::123456789012:role/apigAwsProxyRole", "httpMethod": "POST", "passthroughBehavior": "WHEN_NO_MATCH", "requestTemplates": { "application/json": "{\n \"a\": \"$input.params('operand1')\",\n \"b\": \"$input.params('operand2')\", \n \"op\": \"$input.params('operator')\" \n}" }, "type": "AWS", "uri": "arn:aws:apigateway:us-west-2:lambda:path//2015-03-31/functions/arn:aws:lambda:us-west-2:123456789012:function:Calc/invocations", "_embedded": { "integration:responses": { "_links": { "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200", "name": "200", "title": "200" }, "integrationresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" }, "integrationresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/integration/responses/200" } }, "responseParameters": { "method.response.header.operator": "integration.response.body.op", "method.response.header.operand_2": "integration.response.body.b", "method.response.header.operand_1": "integration.response.body.a" }, "responseTemplates": { "application/json": "#set($res = $input.path('$'))\n{\n \"result\": \"$res.a, $res.b, $res.op => $res.c\",\n \"a\" : \"$res.a\",\n \"b\" : \"$res.b\",\n \"op\" : \"$res.op\",\n \"c\" : \"$res.c\"\n}" }, "selectionPattern": "", "statusCode": "200" } } }
70              
71             AWS CLI
72              
73              
74             =head2 MethodResponses => L<Paws::ApiGateway::MapOfMethodResponse>
75              
76             Gets a method response associated with a given HTTP status code.
77              
78             The collection of method responses are encapsulated in a key-value map,
79             where the key is a response's HTTP status code and the value is a
80             MethodResponse resource that specifies the response returned to the
81             caller from the back end through the integration response.
82              
83             =head1 Example: Get a 200 OK response of a GET method
84              
85             =head2 Request
86              
87             GET /restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200 HTTP/1.1 Content-Type: application/json Host: apigateway.us-east-1.amazonaws.com Content-Length: 117 X-Amz-Date: 20160613T215008Z Authorization: AWS4-HMAC-SHA256 Credential={access_key_ID}/20160613/us-east-1/apigateway/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature={sig4_hash}
88              
89             =head2 Response
90              
91             The successful response returns a C<200 OK> status code and a payload
92             similar to the following:
93              
94             { "_links": { "curies": { "href": "http://docs.aws.amazon.com/apigateway/latest/developerguide/restapi-method-response-{rel}.html", "name": "methodresponse", "templated": true }, "self": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200", "title": "200" }, "methodresponse:delete": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" }, "methodresponse:update": { "href": "/restapis/uojnr9hd57/resources/0cjtch/methods/GET/responses/200" } }, "responseModels": { "application/json": "Empty" }, "responseParameters": { "method.response.header.operator": false, "method.response.header.operand_2": false, "method.response.header.operand_1": false }, "statusCode": "200" }
95              
96             AWS CLI
97              
98              
99             =head2 OperationName => Str
100              
101             A human-friendly operation identifier for the method. For example, you
102             can assign the C<operationName> of C<ListPets> for the C<GET /pets>
103             method in PetStore example.
104              
105              
106             =head2 RequestModels => L<Paws::ApiGateway::MapOfStringToString>
107              
108             A key-value map specifying data schemas, represented by Model
109             resources, (as the mapped value) of the request payloads of given
110             content types (as the mapping key).
111              
112              
113             =head2 RequestParameters => L<Paws::ApiGateway::MapOfStringToBoolean>
114              
115             A key-value map defining required or optional method request parameters
116             that can be accepted by Amazon API Gateway. A key is a method request
117             parameter name matching the pattern of
118             C<method.request.{location}.{name}>, where C<location> is
119             C<querystring>, C<path>, or C<header> and C<name> is a valid and unique
120             parameter name. The value associated with the key is a Boolean flag
121             indicating whether the parameter is required (C<true>) or optional
122             (C<false>). The method request parameter names defined here are
123             available in Integration to be mapped to integration request parameters
124             or templates.
125              
126              
127             =head2 RequestValidatorId => Str
128              
129             The identifier of a RequestValidator for request validation.
130              
131              
132             =head2 _request_id => Str
133              
134              
135             =cut
136