in src/lambdas/modular_api_handler/processors/application_processor.py [0:0]
def routes(cls) -> tuple[Route, ...]:
resp = (HTTPStatus.CREATED, ApplicationResponse, None)
return (
cls.route(
Endpoint.APPLICATIONS_AWS_ROLE,
HTTPMethod.POST,
'post_aws_role',
summary='Create application with type AWS_ROLE',
response=resp,
permission=Permission.APPLICATION_CREATE
),
cls.route(
Endpoint.APPLICATIONS_AWS_CREDENTIALS,
HTTPMethod.POST,
'post_aws_credentials',
summary='Create application with type AWS_CREDENTIALS',
response=resp,
permission=Permission.APPLICATION_CREATE
),
cls.route(
Endpoint.APPLICATIONS_AZURE_CREDENTIALS,
HTTPMethod.POST,
'post_azure_credentials',
summary='Create application with type AZURE_CREDENTIALS',
response=resp,
permission=Permission.APPLICATION_CREATE
),
cls.route(
Endpoint.APPLICATIONS_AZURE_CERTIFICATE,
HTTPMethod.POST,
'post_azure_certificate',
summary='Create application with type AZURE_CERTIFICATE',
response=resp,
permission=Permission.APPLICATION_CREATE
),
cls.route(
Endpoint.APPLICATIONS_GCP_SERVICE_ACCOUNT,
HTTPMethod.POST,
'post_gcp_service_account',
summary='Create application with type GCP_SERVICE_ACCOUNT',
response=resp,
permission=Permission.APPLICATION_CREATE
),
cls.route(
Endpoint.APPLICATIONS,
HTTPMethod.GET,
'query',
response=(HTTPStatus.OK, ApplicationsResponse, None),
permission=Permission.APPLICATION_DESCRIBE
),
cls.route(
Endpoint.APPLICATIONS_ID,
HTTPMethod.GET,
'get',
response=(HTTPStatus.OK, ApplicationResponse, None),
summary='Queries a single application by id',
permission=Permission.APPLICATION_DESCRIBE
),
cls.route(
Endpoint.APPLICATIONS_ID,
HTTPMethod.PATCH,
'patch',
response=(HTTPStatus.OK, ApplicationResponse, None),
summary='Allows to update certain fields in application',
permission=Permission.APPLICATION_UPDATE
),
cls.route(
Endpoint.APPLICATIONS_ID,
HTTPMethod.DELETE,
'delete',
summary='Deletes the application',
response=(HTTPStatus.OK, MessageModel, None),
permission=Permission.APPLICATION_DELETE
)
)