API - API Gateway module
This module creates the API Gateway and all resources.
Example
Typical Usage::
from stacks.resources.api_gateway import api_gateway
created_api_gateway = api_gateway.create_api_gateway(
self,
"WaReviewRemediationItemsApiGateway",
remediation_items_table_arn,
reports_table_arn,
customers_table_arn,
choices_table_arn,
generate_report_function_arn,
wa_workload_function_arn,
customer_credentials_function_arn,
question_updater_function_arn,
api_doc_function_arn,
admin_userpool_arn
)
create_api_gateway(stack, name, dynamodb_remediation_items_table_arn, dynamodb_reports_table_arn, dynamodb_customers_table_arn, dynamodb_choices_table_arn, dynamodb_workload_tracker_table_arn, generate_report_function_arn, wa_workload_function_arn, customer_credentials_function_arn, question_updater_function_arn, api_doc_function_arn, admin_userpool_arn)
Create the API Gateway, all resource and methods.
Attributes:
Name | Type | Description |
---|---|---|
stack |
aws_cdk.core.Stack
|
CDK Stack. |
name |
str
|
Name of the API Gateway |
dynamodb_remediation_items_table_arn |
str
|
ARN of the DynamoDB Table with the Remediation Items. |
dynamodb_reports_table_arn |
str
|
ARN of the DynamoDB Table with the Reports. |
dynamodb_customers_table_arn |
str
|
ARN of the DynamoDB Table with the Customers. |
dynamodb_choices_table_arn |
str
|
ARN of the DynamoDB Table with the Choices. |
generate_report_function_arn |
str
|
ARN of the Lambda Function for generating the Reports. |
wa_workload_function_arn |
str
|
ARN of the Lambda Function for getting the WA Worklodas from AWS. |
customer_credentials_function_arn |
str
|
ARN of the Lambda Function for getting and updating the Customer Credentials. |
question_updater_function_arn |
str
|
ARN of the Lambda Function to update the Choices / Questions. |
api_doc_function_arn |
str
|
ARN of the Lambda Function to serve the API Dos. |
admin_userpool_arn |
str
|
Cognito User Pool ARN used for the endpoint authentication. |
Returns:
Type | Description |
---|---|
apigateway.RestApi
|
aws_cdk.aws_apigateway.RestApi): The created Rest API Gateway. |
Source code in infrastructure/stacks/resources/api_gateway/api_gateway.py
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
|