MCPcopy Create free account
hub / github.com/adobe/Marinus / cloudServicesRouter

Function cloudServicesRouter

web_server/routes/cloud_services.js:48–717  ·  view source on GitHub ↗
(envConfig)

Source from the content-addressed store, hash-verified

46
47/* eslint-disable-next-line no-unused-vars */
48export default function cloudServicesRouter(envConfig) {
49 /**
50 * @swagger
51 *
52 * security:
53 * - APIKeyHeader: []
54 *
55 * tags:
56 * - name: AWS - IP check
57 * description: Check whether the provided IPv4 address is known to belong in AWS.
58 *
59 * definitions:
60 * AWSIPv4CheckResponse:
61 * type: object
62 * properties:
63 * status:
64 * type: boolean
65 * example: true
66 * description: A boolean indicating whether the IP belongs to AWS
67 * record:
68 * type: string
69 * example: 1.2.3.0/24
70 * description: The matching AWS CIDR range.
71 *
72 * /api/v1.0/aws/ip_check:
73 * get:
74 * # Operation-specific security:
75 * security:
76 * - APIKeyHeader: []
77 * description: Determines whether an IPv4 address belongs to AWS in general. This does not check whether the IP is assigned to your organization within AWS.
78 * tags: [AWS - IP check]
79 * produces:
80 * - application/json
81 * parameters:
82 * - name: ip
83 * type: string
84 * required: true
85 * description: The IPv4 address to check.
86 * in: query
87 * responses:
88 * 200:
89 * description: Returns an object with status and the matching AWS IPv4 CIDR.
90 * type: object
91 * schema:
92 * $ref: '#/definitions/AWSIPv4CheckResponse'
93 * 400:
94 * description: Bad request parameters.
95 * schema:
96 * $ref: '#/definitions/BadInputError'
97 * 500:
98 * description: Server error.
99 * schema:
100 * $ref: '#/definitions/ServerError'
101 */
102 router.route('/aws/ip_check')
103 .get(function (req, res) {
104
105 if (!is_valid_strings(req.query)) {

Callers 1

routesFunction · 0.85

Calls 1

is_valid_stringsFunction · 0.70

Tested by

no test coverage detected