awstin.apigateway package¶
awstin.apigateway.auth module¶
-
awstin.apigateway.auth.
accept
(principal_id, resource_arn)[source]¶ Return an auth lambda response granting access to the given resource ARN to the given principle ID.
- Parameters
principal_id (str) – The principal ID to grant access to
resource_arn (str) – The ARN of the resource to grant access to
- Returns
Auth lambda response
- Return type
dict
-
awstin.apigateway.auth.
invalid
(body='Invalid')[source]¶ Return an auth lambda response indicating the request is invalid.
- Parameters
body (str, optional) – Optional resposnse body. Default “Invalid”
- Returns
Auth lambda response
- Return type
dict
-
awstin.apigateway.auth.
reject
(principal_id, resource_arn)[source]¶ Return an auth lambda response rejecting access to the given resource ARN to the given principle ID.
- Parameters
principal_id (str) – The principal ID to reject access to
resource_arn (str) – The ARN of the resource to reject access to
- Returns
Auth lambda response
- Return type
dict
Return an auth lambda response indicating the requester is unauthorized.
- Parameters
body (str, optional) – Optional resposnse body. Default “Unauthorized”
- Returns
Auth lambda response
- Return type
dict